<?php 

?>
<div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
        <div class="modal-header">
            <h3 class="modal-title" id="titulo-modal">Pacientes&nbsp;</h3>
            <!--<button type="button" class="close" data-dismiss="modal" aria-label="close">
              <span aria-hidden="true">&times;</span>
            </button>-->
        </div>
        <div class="modal-body">
            <table style="width: 100%" id="listTblPaciente" class="table table-bordered table-striped dt-responsive table-hover table-active">
                <thead class="thead-dark">
                    <tr>
                        <th>Nombre Completo</th>
                        <th>Acciones</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    foreach ($datos as $key => $value) {
                        $f="";
                        switch ($func) {
                            case 'seleccionar':
                                $f="seleccionarPaciente('".base64_encode($value["nombreCompleto"])."','".$value["clavePaciente"]."')";
                                break;
                            
                            default:
                                # code...
                                break;
                        }?>
                        <tr>
                            <td><?=$value["nombreCompleto"]?></td>
                            <td><button onclick="<?=$f?>" class="btn btn-sm btn-warning"><i class="fa fa-hand-pointer-o"></i></button></td>
                        </tr>
                    <?php
                    }?>
                </tbody>
            </table>
        </div>
        <div class="modal-footer">
        	<?php // agregar parametro todos los pacientes
            if($todos){
            ?>
            <button type="button" class="btn btn-primary" data-dismiss="modal">Todos</button>
            <?php
            }?>
            <button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
        </div>
    </div>
</div>