<div class="panel panel-default" id="painelSelecaoLista">
    <div class="panel-body">
        <form onsubmit="$.fn.Carregando()" method="post">
            <div class="row">

                <div class="col-sm-7 col-sm-7">
                    <div id="painelListaPacienteFila">
                        <div id="painelDefault">
                            <div class="row">
                                <table class="table table-bordered" style="background-color: white; overflow: auto; ">
                                    <tbody style="width: 750px ;height: 500px; margin-left: 5px">
                                    <?php
                                    foreach ($listapaciente as $paciente) {
                                        ?>
                                        <tr>
                                            <td id="tdinpu">
                                                <input type="radio" id="<?= $paciente->HANDLE ?>"
                                                       value="<?= $paciente->NOME ?>"
                                                       name="radioNomePaciente" required>
                                            </td>
											
                                            <td id="tdlabel" style="font-size: 14px">
                                                <label for="<?= $paciente->HANDLE ?>">
                                                    <?= utf8_encode($paciente->NOME) . ', CPF: ' . substr_replace(utf8_encode($paciente->CPF), '***', 3, -4) ?> 
                                                </label>
                                            </td>
                                        </tr>
                                    <?php } ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-sm-5" align="center" id="panelButtonLista">
                    <div class="row">
                        <div class="col-md-12"  id="btnActionGroup">
                            <div id="btnControleDefault" align="left">
                                <button type="submit" name="GERAR" id="btnAction" class="btn btn-primary">
                                    <img src="assets/img/GERAR3.png" class="img-circle">
                                    GERAR
                                </button>
                            </div>
                        </div>

                        <div class="col-md-12" id="btnActionGroup">
                            <div id="btnControleDefault" align="left">
                                <button type="submit" name="VOLTAR" id="btnAction" onClick="history.go(-1)"
                                        class="btn btn-primary">
                                    <img src="assets/img/VOLTAR.png" class="img-circle">
                                    VOLTAR
                                </button>
                            </div>
                        </div>

                        <div class="col-md-12" id="btnActionGroup">
                            <div id="btnControleDefault" align="left" >
                                <button style="border-color: #eeefdf;background-color: #e8130b;background-image: none" type="submit" name="OUTROPACIENTE" id="btnAction"
                                        class="btn btn-primary">
                                    <img style="border-color: #eeefdf;background-color: #e8130b;" src="assets/img/nenhum_lista.png" class="img-circle">
                                    NENHUM DA LISTA
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </form>

    </div>
</div>
<?php
if (isset($senhagerada)) {
    if (MENSAGEM_SENHA) {
        echo "<script>confirmMessage('messageDialog','" . MENSAGEM_SENHA . "',800,300,'" . base_url() . "');</script>";
    } else {
        echo "<script>confirmMessage('messageDialog','PRESENÇA CONFIRMADA COM SUCESSO <br> SUA SENHA É: " . $senhagerada[0]->NUMERO . "',800,300,'" . base_url() . "');</script>";
    }

}
?>

<div id="messageDialog"></div>