<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Data Pasien
            <small><?= $abdulradjak['NamaPerusahaan']; ?> - <?= $abdulradjak['KodePPK']; ?></small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Vclaim</a></li>
            <li class="active">Dashboard</li>
        </ol>
    </section>

    <!-- Main content -->

    <!-- Main content -->
    <section class="content">
        <!-- Default box -->
        <div class="box">
            <div class="box-body">
            <h4 style="font-weight: bold;" class="text-primary">Daftar Tanpa Mr </h4>
           
                <form action="<?= base_url('pasien/formsimpan'); ?>" method="post">

                    <div class="row">
                        <div class="col-md-6">
                            <table width="100%" class="table">
                                <tr>
                                    <td width="25%">
                                        No Kunjungan
                                    </td>
                                    <td>
                                        <input type="text" name="caseid" class="form-control" value="#New Caseid" disabled>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Nama Pasien
                                    </td>
                                    <td>
                                        <input type="text" name="FirstName" class="form-control" required>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Tanggal Lahir
                                    </td>
                                    <td>
                                        <input type="date" name="tglLahir" class="form-control" required>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Alamat
                                    </td>
                                    <td>
                                        <textarea type="text" name="alamat" class="form-control" value="" required> </textarea>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="col-md-6">
                            <table width="100%" class="table">
                            <tr>
                                    <td width="25%">
                                        No. Telpon
                                    </td>
                                    <td>
                                    <input type="text" name="telpon" class="form-control" required>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="25%">
                                        Jenis Kelamin
                                    </td>
                                    <td>
                                        <select name="Sex" class="form-control" required>
                                            <option value="" disabled></option>
                                            <option value="M"L>Laki-laki</option>
                                            <option value="F">Perempuan</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Penjamin
                                    </td>
                                    <td>
                                        <select name="Company" class="form-control teanganData" data-live-search="true" required>
                                            <option value=""></option>
                                            <?php
                                            foreach ($asuransi as $d) :
                                            ?>
                                            <option value="<?= $d['CompanyCode']; ?>"><?= $d['CompanyName']; ?>
                                            </option>
                                            <?php
                                            endforeach;
                                            ?>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Tujuan
                                    </td>
                                    <td>
                                        <select name="tujuan" class="form-control teanganData" data-live-search="true" required>
                                            <option value="">-- Pilih Tujuan Poli --</option>
                                            <?php
                                            foreach ($poli as $d) :
                                            ?>
                                            <option value="<?= $d['ActivityClass']; ?>">
                                                <?= $d['ActivityClass']; ?>
                                            </option>
                                            <?php
                                            endforeach;
                                            ?>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Doktor</td>
                                    <td>
                                        <select name="dokter" class="form-control teanganData" data-live-search="true">
                                            <option value="">- PILIH DOKTER -</option>
                                            <?php 
                                            foreach($dokter as $d):
                                                ?>
                                                <option value="<?= $d['DoctorID'];?>"><?= $d['FirstName'];?></option>
                                                <?php 
                                            endforeach;
                                            ?>
                                        </select>
                                    </td>
                                </tr>                          
                                <tr>
                                    <td colspan="2" align="right">
                                        <button type="submit" class="btn btn-sm btn-success"> Simpan <i
                                        class="fa  fa-arrow-right fa-fw"></i></button>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </form>

            </div><!-- /.box-body -->
            <div class="box-footer">
                <?= date('d F Y'); ?>
            </div><!-- /.box-footer-->
        </div><!-- /.box -->

    </section><!-- /.content -->
</div><!-- /.content-wrapper -->

<!-- Modal -->
<div class="modal fade" id="baru" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel"><i class="fa fa-fw fa-pencil"></i> PASIEN BARU</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <form action="<?= base_url('pasien/formNik'); ?>" method="get">
                    <input type="text" placeholder="NIK..." class="form-control" required name="nik">
                    <button style="width: 100%; border-radius: 0px;" type="submit" class="btn btn-sm btn-success">Daftar By NIK</button>
                </form>

                <div style="margin-top: 5px; text-align:right">
                    <a href="">Daftar Biasa</a>
                </div>


            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="caripasien" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel"><i class="fa fa-fw fa-search"></i> CARI PASIEN</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <form action="<?= base_url('pasien/cari'); ?>" method="get">
                    <select name="jenis" style="margin-bottom: 5px;" class="form-control" required>
                        <option value=""></option>
                        <option value="1">No MR</option>
                        <option value="2">Nama Depan</option>
                        <option value="3">Nama Belakang</option>
                        <!-- <option value="4">Tanggal Lahir</option> -->
                    </select>
                    <input type="text" style="margin-bottom: 5px;" placeholder="KETIK JENIS..." class="form-control" required name="pencarian">
                    <button style="width: 100%; border-radius: 0px;" type="submit" class="btn btn-sm btn-success">Cari</button>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>