<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Data Rekam Medis
            <small>Klinik</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">Berkas</li>
        </ol>
    </section>
    <?php
    $caseID = $this->uri->segment(3);
    $code = $this->uri->segment(4);
    $datapasien = $this->db->query("Select * from Cases where [Case ID] = '$caseID'")->row_array();
    ?>
    <!-- Main content -->
    <section class="content">
        <!-- riki -->
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">Tambah Pemeriksaan : <?= $datapasien['Case ID'] . '-' . $datapasien['Description']; ?></u></h3>
                <div class="box-tools pull-right">
                    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
                </div>
            </div><!-- /.box-header -->
            <div class="box-body">
                <?php
                $caseID = $datapasien['Case ID'];
                $kode = $this->uri->segment(4); 
                ?>
                <form action="<?= base_url('PemeriksaanGigi/Simpan/'.$caseID.'/'.$kode); ?>" method="post">
                <div class="form-group">
                    <input type="hidden" name="caseid" value="<?= $datapasien['Case ID']; ?>">
                    <input type="hidden" name="namapasien" value="<?= $datapasien['Description']; ?>">
                    <label>Date :</label>
                    <div class="input-group">
                        <div class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </div>
                        <input type="text" class="form-control" name="tglpriksa" data-inputmask="'alias': yyy/mm/d'" value="<?= date('Y-m-d'); ?>" readonly data-mask>
                    </div>

                </div>


                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon">
                            <i class="fa fa-pencil"></i>
                        </div>
                        <input type="text" class="form-control" name="kodegigi" value="<?= $code; ?>" readonly data-mask>
                    </div>

                </div>


                <div class="form-group">
                    <label>Pemeriksaan:</label>
                    <div class="input-group">
                        <select name="jenis" class="teanganData" data-live-search="true">
                            <?php
                            foreach ($jenis as $p) :
                            ?>
                                <option selected value="<?= $p['id']; ?>"><?= $p['jenis']; ?></option>
                            <?php
                            endforeach;
                            ?>
                        </select>
                    </div>

                </div>


                <div class="form-group">
                    <label>Keterangan :</label>
                    <div class="input-group">
                       <textarea class="form-control" rows="5" cols="130" name="keterangan" value="" placeholder="Keterangan..">

                       </textarea>
                    </div>
                </div>

                <button type="submit" class="btn btn-success"><i class="fa fa-save"> Simpan</i></button>
            </form>
            </div><!-- /.box-body -->
            <div class="box-footer">
                <small>Daftar Pasien <?= date('d F Y'); ?> - @Klinik <?= date('Y'); ?></small>
            </div>
        </div><!-- /.box -->

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