<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="<?= base_url('assets/user.png'); ?>" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p><?= $_SESSION['username']; ?></p>
                <span style="font-size:10px;"> Login as <?= $_SESSION['userLoginAs']; ?></span>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <!-- search form -->
        <?php
        extract($_GET);
        if ($user['dept'] == 1 || $user['dept'] == 13 || $user['dept'] == 4) {
        ?>
            <form action="<?= base_url('rekamMedis/cariMr'); ?>" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="mr" value="<?= @$mr; ?>" class="form-control" placeholder="Cari medical record...">
                    <span class="input-group-btn">
                        <button type="submit" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
                    </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
        <?php
        } else {
        ?><br><?php
                }

                // ------
                if ($user['dept'] == 1) {
                    // DOKTER
                    ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('rekamMedis/pasien'); ?>">
                        <font color="green"><i class="fa fa-fw fa-edit text-blue"></i></font>
                        <span><small>Pasien</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Medical Record</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('rekamMedis/record'); ?>"><i class="fa fa-circle-o"></i> Data Medical Record</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-television text-red"></i>
                        <span>Monitoring</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('rekamMedis/monitoring?type=apotik'); ?>"><i class="fa fa-circle-o"></i> Apotik</a></li>
                        <li><a href="<?= base_url('rekamMedis/monitoringapotik?type=apotik'); ?>"><i class="fa fa-circle-o"></i> Record Apotik</a></li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('form/index'); ?>">
                        <font color="green"><i class="fa fa-fw fa-pencil text-blue"></i></font>
                        <span><small>Form</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('addCpptNonDokter'); ?>">
                        <font color="green"><i class="fa fa-fw fa-book text-blue"></i></font>
                        <span><small>CPPT</small></span>
                    </a>
                </li>
                <li class="header">FIND</li>
                <li>
                    <a href="<?= base_url('rekamMedis/cariBerkas'); ?>">
                        <font color="green"><i class="fa fa-fw fa-search text-red"></i></font> <span><small>Cari
                                Berkas</small></span>
                    </a>
                </li>
            </ul>
        <?php
                } else if ($user['dept'] == 2) {
                    // APOTEK
        ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>

                <li>
                    <a href="<?= base_url('rekamMedis/record'); ?>">
                        <font color="green"><i class="fa fa-fw fa-list text-yellow"></i></font>
                        <span><small>Pasien</small></span>
                    </a>
                </li>

                <li>
                    <a href="<?= base_url('apotek/listClaim'); ?>">
                        <font color="green"><i class="fa fa-fw fa-book text-red"></i></font>
                        <span><small>List Claim Obat</small></span>
                    </a>
                </li>


            </ul>
        <?php
                } else if ($user['dept'] == 3) {
                    // APOTEK
        ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>

                <li>
                    <a href="<?= base_url('anamnesa/pasien'); ?>">
                        <font color="green"><i class="fa fa-fw fa-users text-yellow"></i></font>
                        <span><small>Pasien</small></span>
                    </a>
                </li>

                <li>
                    <a href="<?= base_url('rekamMedis/listpasienanamnesa'); ?>">
                        <font color="green"><i class="fa fa-fw fa-list text-red"></i></font>
                        <span><small>List Anamesa Pasien</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Pendaftaran</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('pasien/pasien'); ?>"><i class="fa fa-circle-o"></i>Data Pasien</a></li>
                        <li><a href="<?= base_url('pendaftaran/cekpesertabpjs'); ?>"><i class="fa fa-circle-o"></i>Cek Peserta Bpjs</a></li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('addCpptNonDokter'); ?>">
                        <font color="green"><i class="fa fa-fw fa-book text-blue"></i></font>
                        <span><small>CPPT</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('rekamMedis/cariBerkas'); ?>">
                        <font color="green"><i class="fa fa-fw fa-search text-red"></i></font> <span><small>Cari
                                Berkas</small></span>
                    </a>
                </li>
            </ul>
        <?php
                } else if ($user['dept'] == 13) {
                    // SUPER ADMIN
        ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('rekamMedis/pasien'); ?>">
                        <font color="green"><i class="fa fa-fw fa-edit text-blue"></i></font>
                        <span><small>Pasien</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Pendaftaran</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('anamnesa/pasien'); ?>"><i class="fa fa-circle-o"></i> Pasien</a></li>
                        <li><a href="<?= base_url('pasien/pasien'); ?>"><i class="fa fa-circle-o"></i>Data Pasien</a></li>
                        <li><a href="<?= base_url('cases/list?tgl=' . date('Y-m-d')); ?>"><i class="fa fa-circle-o"></i>Cases</a></li>
                        <!-- <li><a href="<?= base_url('pasien/cancel'); ?>"><i class="fa fa-circle-o"></i>Cancel Pasien</a></li> -->
                        <li><a href="<?= base_url('pendaftaran/pelayananBpjs'); ?>"><i class="fa fa-circle-o"></i>Pelayanan Bpjs</a></li>
                        <li><a href="<?= base_url('pendaftaran/RecordpelayananBpjs'); ?>"><i class="fa fa-circle-o"></i>Record PelayananBpjs</a></li>
                        <li><a href="<?= base_url('pendaftaran/cekpesertabpjs'); ?>"><i class="fa fa-circle-o"></i>Cek Peserta Bpjs</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Apotek</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('Apotik/index'); ?>"><i class="fa fa-circle-o"></i> Pasien</a></li>
                        <li><a href="<?= base_url('Apotik/listRecord'); ?>"><i class="fa fa-circle-o"></i>Record</a></li>
                        <li><a href="<?= base_url('Apotik/pharmacy?tgl=' . date('Y-m-d')); ?>"><i class="fa fa-circle-o"></i>Pharmacy</a></li>
                        <li><a href="<?= base_url('Apotik/cancel'); ?>"><i class="fa fa-circle-o"></i>Cancel Pharmacy</a></li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('pendaftaran/form'); ?>">
                        <font color="Yellow"><i class="fa fa-fw fa-edit text-blue"></i></font>
                        <span><small>Form</small></span>
                    </a>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Transaction</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('transaction/index?status=open'); ?>"><i class="fa fa-circle-o"></i> Transaction Open</a></li>
                        <li><a href="<?= base_url('transaction/index?status=closed'); ?>"><i class="fa fa-circle-o"></i> Transaction Closed</a></li>
                    </ul>
                </li>


                <li>
                    <a href="<?= base_url('kasir/MenuKasir'); ?>">
                        <font color="green"><i class="fa fa-usd text-yellow"></i></font>
                        <span><small>Chasir</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Medical Record</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('rekamMedis/record'); ?>"><i class="fa fa-circle-o"></i> Data Medical Record</a></li>
                        <li><a href="<?= base_url('rekamMedis/penghapusanrecord'); ?>"><i class="fa fa-circle-o"></i> Penghapusan Berkas</a></li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('rekamMedis/pasien'); ?>">
                        <font color="green"><i class="fa fa-fw fa-list text-red"></i></font>
                        <span><small>List Anamesa Pasien</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-television text-red"></i>
                        <span>Monitoring</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('rekamMedis/monitoring?type=apotik'); ?>"><i class="fa fa-circle-o"></i> Apotik</a></li>
                        <li><a href="<?= base_url('rekamMedis/monitoringapotik?type=apotik'); ?>"><i class="fa fa-circle-o"></i> Record Apotik</a></li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('apotek/listClaim'); ?>">
                        <font color="gray"><i class="fa fa-fw fa-book text-gray"></i></font>
                        <span><small>List Claim Obat</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('user/klinik'); ?>">
                        <font color="pink"><i class="fa fa-fw fa-users text-pink"></i></font>
                        <span><small>User</small></span>
                    </a>
                </li>

                <li class="header">FIND</li>
                <li>
                    <a href="<?= base_url('rekamMedis/cariBerkas'); ?>">
                        <font color="green"><i class="fa fa-fw fa-search text-red"></i></font> <span><small>Cari
                                Berkas</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="<?= base_url('Laboratorium/historilab'); ?>">
                        <i class="fa fa-fw fa-television text-red"></i>
                        <span>History Lab</span>
                    </a>
                </li>
                </li>
                <li><a href="<?= base_url('Laboratorium/record'); ?>">
                        <font color="blue"><i class="fa fa-circle-o"></i></font> Request Lab
                    </a></li>
                <li>
                    <a href="<?= base_url('addCpptNonDokter'); ?>">
                        <font color="green"><i class="fa fa-fw fa-book text-blue"></i></font>
                        <span><small>CPPT</small></span>
                    </a>
                </li>


            </ul>
        <?php
                } else if ($user['dept'] == 4) {
        ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="<?= base_url('Laboratorium/historilab'); ?>">
                        <i class="fa fa-fw fa-television text-red"></i>
                        <span>History Lab</span>
                    </a>
                </li>
                </li>
                <li><a href="<?= base_url('Laboratorium/record'); ?>">
                        <font color="blue"><i class="fa fa-circle-o"></i></font> Request Lab
                    </a></li>
            </ul>

        <?php
                } else if ($user['dept'] == 5) {
        ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Pendaftaran</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('anamnesa/pasien'); ?>"><i class="fa fa-circle-o"></i> Pasien</a></li>
                        <li><a href="<?= base_url('pasien/pasien'); ?>"><i class="fa fa-circle-o"></i>Data Pasien</a></li>
                        <li><a href="<?= base_url('cases/list?tgl=' . date('Y-m-d')); ?>"><i class="fa fa-circle-o"></i>Cases</a></li>
                        <!-- <li><a href="<?= base_url('pasien/cancel'); ?>"><i class="fa fa-circle-o"></i>Cancel Pasien</a></li> -->
                        <li><a href="<?= base_url('pendaftaran/pelayananBpjs'); ?>"><i class="fa fa-circle-o"></i>Pelayanan Bpjs</a></li>
                        <li><a href="<?= base_url('generalConsent'); ?>"><i class="fa fa-circle-o"></i>General & Informed Consent</a></li>
                        <li><a href="<?= base_url('pendaftaran/RecordpelayananBpjs'); ?>"><i class="fa fa-circle-o"></i>Record PelayananBpjs</a></li>
                        <li><a href="<?= base_url('pendaftaran/cekpesertabpjs'); ?>"><i class="fa fa-circle-o"></i>Cek Peserta Bpjs</a></li>
                         <li><a href="<?= base_url('Mcu/index'); ?>"><i class="fa fa-circle-o"></i>Mcu</a></li>
                    </ul>
                </li>
                </li>
                <li>
                    <a href="<?= base_url('rekamMedis/pasien'); ?>">
                        <font color="green"><i class="fa fa-fw fa-edit text-blue"></i></font>
                        <span><small>Pasien</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('pendaftaran/form'); ?>">
                        <font color="Yellow"><i class="fa fa-fw fa-edit text-blue"></i></font>
                        <span><small>Form</small></span>
                    </a>
                </li>
            </ul>

        <?php
                } else if ($user['dept'] == 34) {
        ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Apotek</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('Apotik/index'); ?>"><i class="fa fa-circle-o"></i> Pasien</a></li>
                        <li><a href="<?= base_url('Apotik/listRecord'); ?>"><i class="fa fa-circle-o"></i>Record</a></li>
                        <li><a href="<?= base_url('Apotik/pharmacy?tgl=' . date('Y-m-d')); ?>"><i class="fa fa-circle-o"></i>Pharmacy</a></li>
                        <li><a href="<?= base_url('Apotik/cancel'); ?>"><i class="fa fa-circle-o"></i>Cancel Pharmacy</a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Pendaftaran</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('pasien/pasien'); ?>"><i class="fa fa-circle-o"></i>Data Pasien</a></li>
                    </ul>
                </li>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-television text-red"></i>
                        <span>Monitoring</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('rekamMedis/monitoring?type=apotik'); ?>"><i class="fa fa-circle-o"></i> Apotik</a></li>
                        <li><a href="<?= base_url('rekamMedis/monitoringapotik?type=apotik'); ?>"><i class="fa fa-circle-o"></i> Record Apotik</a></li>
                    </ul>
                </li>
                <!-- <li>
                    <a href="<?= base_url('rekamMedis/pasien'); ?>">
                        <font color="green"><i class="fa fa-fw fa-edit text-blue"></i></font>
                        <span><small>Pasien</small></span>
                    </a>
                </li> -->

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Transaction</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('transaction/index?status=open'); ?>"><i class="fa fa-circle-o"></i> Transaction Open</a></li>
                        <li><a href="<?= base_url('transaction/index?status=closed'); ?>"><i class="fa fa-circle-o"></i> Transaction Closed</a></li>
                    </ul>
                </li>

                <li>
                    <a href="<?= base_url('kasir/MenuKasir'); ?>">
                        <font color="green"><i class="fa fa-usd text-yellow"></i></font>
                        <span><small>Chasir</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('addCpptNonDokter'); ?>">
                        <font color="green"><i class="fa fa-fw fa-book text-blue"></i></font>
                        <span><small>CPPT</small></span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Laporan</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('DashboardLaporan/icd?tgl1='. date('Y-m-d')); ?>"><i class="fa fa-circle-o"></i>TOP ICD 10</a></li>
                        <li><a href="<?= base_url('DashboardLaporan/Lhp'); ?>"><i class="fa fa-circle-o"></i>LHP Harian</a></li>
                        <li><a href="<?= base_url('DashboardLaporan/lhpbpjs'); ?>"><i class="fa fa-circle-o"></i>LHP BPJS</a></li>
                        <li><a href="<?= base_url('DashboardLaporan/totalpatientbycompany'); ?>"><i class="fa fa-circle-o"></i>Total Pasien By Company</a></li>
                        <li><a href="<?= base_url('DashboardLaporan/totalpatientbytretment'); ?>"><i class="fa fa-circle-o"></i>Total Pasien By Treatment</a></li>
                        <li><a href="<?= base_url('DashboardLaporan/CashierIncomeShift'); ?>"><i class="fa fa-circle-o"></i>CashierIncomeShift</a></li>
                    </ul>
                </li>
            </ul>
            <?php
                } else if ($user['dept'] == 49) {
            ?>
            <ul class="sidebar-menu">
                <li class="header">MAIN NAVIGATION</li>
                <li>
                    <a href="<?= base_url('rekamMedis/'); ?>">
                        <font color="green"><i class="fa fa-fw fa-dashboard"></i></font>
                        <span><small>Dashboard</small></span>
                    </a>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-fw fa-list text-yellow"></i>
                        <span>Transaction</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="<?= base_url('transaction/index?status=open'); ?>"><i class="fa fa-circle-o"></i> Transaction Open</a></li>
                        <li><a href="<?= base_url('transaction/index?status=closed'); ?>"><i class="fa fa-circle-o"></i> Transaction Closed</a></li>
                    </ul>
                </li>


                <li>
                    <a href="<?= base_url('kasir/MenuKasir'); ?>">
                        <font color="green"><i class="fa fa-usd text-yellow"></i></font>
                        <span><small>Chasir</small></span>
                    </a>
                </li>
                <li>
                    <a href="<?= base_url('addCpptNonDokter'); ?>">
                        <font color="green"><i class="fa fa-fw fa-book text-blue"></i></font>
                        <span><small>CPPT</small></span>
                    </a>
                </li>
            </ul>
            <?php
            }
            ?>


    </section>
    <!-- /.sidebar -->
</aside>