
<div class="page-sidebar-wrapper">
	<div class="page-sidebar navbar-collapse collapse">
		<ul class="page-sidebar-menu page-sidebar-menu-compact" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
			
			<?php if(in_array(1, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= $active == 'registrasi' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/reg_dir/registrasi') ?>">
					<i class="fa fa-users"></i>
					<span class="title">Pasien</span>
					<?= $active == 'registrasi' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			<?php }?>

			<?php if(in_array(2, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= $active == 'kunjungan' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/reg_dir/kunjungan') ?>">
					<i class="fa fa-share-square-o"></i>
					<span class="title">Kunjungan</span>
					<?= $active == 'kunjungan' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			<?php }?>

			<?php if(in_array(3, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= $active == 'ugd' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/ugd_dir/ugd') ?>">
					<i class="fa fa-archive"></i>
					<span class="title">Poliklinik Umum</span>
					<?= $active == 'ugd' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			<?php }?>

			<?php if(in_array(4, $this->session->userdata('id_global_hakakses'))){ ?>
			<!--
			<li <?= $active == 'gigi' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/ugd_dir/ugd/gigi') ?>">
					<i class="fa fa-address-book"></i>
					<span class="title">Poliklinik Gigi</span>
					<?= $active == 'gigi' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			-->
			<?php }?>

			<?php if(in_array(5, $this->session->userdata('id_global_hakakses'))){ ?>
			<!--
			<li <?= $active == 'spesialis' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/ugd_dir/ugd/spesialis') ?>">
					<i class="fa fa-grav"></i>
					<span class="title">Poliklinik Spesialis</span>
					<?= $active == 'spesialis' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			-->
			<?php $arr_active = array('spesialis','subspesialis-1','subspesialis-2','subspesialis-3','subspesialis-4')?>
			<!--
			<li <?= in_array($active,$arr_active) ? 'class="active open"' : '' ?>>
				<a>
					<i class="fa fa-book"></i>
					<span class="title">Poliklinik Spesialis</span>
					<?= @$sub_menu == 'spesialis' ? '<span class="selected"></span>' : '' ?>
					<span class="arrow <?= @$sub_menu == 'spesialis' ? 'open' : '' ?>"></span>
				</a>
				<ul class="sub-menu" <?= @$sub_menu == 'spesialis' ? 'style="display:block"' : '' ?>>
					
					<?php foreach ($this->Content_m->select_db('bbmc_re_sub_spesialis')->result() as $key ) { ?>
						<li <?= $active == 'subspesialis-'.$key->id_sub_spesialis ? 'class="active"' : '' ?>>
							<a href="<?= site_url('front_office/ugd_dir/ugd/spesialis/'.$key->id_sub_spesialis) ?>">
								<i class="fa fa-certificate"></i><?=str_replace("Spesialis", "", $key->sub_spesialis)?></a>
						</li>
					<?php }?>
					
				</ul>
				-->
			</li>

			<?php }?>

			<?php if(in_array(6, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= $active == 'rawat_jalan' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/ugd_dir/ugd/rawat_jalan') ?>">
					<i class="fa fa-briefcase"></i>
					<span class="title">Rawat Jalan</span>
					<?= $active == 'rawat_jalan' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			<?php }?>

			<?php if(in_array(7, $this->session->userdata('id_global_hakakses'))){ ?>
			<!--
			<li <?= $active == 'rawat_inap' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/ugd_dir/ugd/rawat_inap') ?>">
					<i class="fa fa-building"></i>
					<span class="title">Rawat Inap</span>
					<?= $active == 'rawat_inap' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			-->
			<?php }?>

			<?php if(in_array(8, $this->session->userdata('id_global_hakakses'))){ ?>

			<?php $arr_active = array('pemeriksaan_lab','laporan_lab','setting_lab','bbmc_re_laboratorium_template','penggunaan_lab','stok_lab')?>
			<!--
			<li <?= in_array($active,$arr_active) ? 'class="active open"' : '' ?>>
				<a>
					<i class="fa fa-flask"></i>
					<span class="title">Laboratorium</span>
					<?= @$sub_menu == 'laboratorium' ? '<span class="selected"></span>' : '' ?>
					<span class="arrow <?= @$sub_menu == 'laboratorium' ? 'open' : '' ?>"></span>
				</a>
				<ul class="sub-menu" <?= @$sub_menu == 'laboratorium' ? 'style="display:block"' : '' ?>>
					<li <?= $active == 'pemeriksaan_lab' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('front_office/ugd_dir/ugd/laboratorium') ?>">
							<i class="fa fa-certificate"></i>Pemeriksaan</a>
					</li>
					<li <?= $active == 'penggunaan_lab' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('front_office/ugd_dir/ugd/laboratorium_penggunaan') ?>">
							<i class="fa fa-certificate"></i>Penggunaan BHP</a>
					</li>
					<li <?= $active == 'stok_lab' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('front_office/ugd_dir/ugd/laboratorium_stok') ?>">
							<i class="fa fa-certificate"></i>Stok BHP</a>
					</li>
					
					<li <?= $active == 'laporan_lab' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('front_office/ugd_dir/ugd/laboratorium_laporan') ?>">
							<i class="fa fa-certificate"></i>Laporan</a>
					</li>
					
					<li <?= $active == 'setting_lab' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('front_office/ugd_dir/ugd/laboratorium_setting') ?>">
							<i class="fa fa-certificate"></i>Setting</a>
					</li>
				</ul>

			</li>
			-->
			<?php }?>

			<?php if(in_array(9, $this->session->userdata('id_global_hakakses'))){ ?>
			<!--
			<li <?= $active == 'radiologi' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/ugd_dir/ugd/radiologi') ?>">
					<i class="fa fa-cab"></i>
					<span class="title">Radiologi</span>
					<?= $active == 'radiologi' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			-->
			<?php }?>

			<?php if(in_array(10, $this->session->userdata('id_global_hakakses'))){ ?>
			<!--
			<li <?= @$sub_menu == 'asuransi' ? 'class="active open"' : '' ?>>
				<a>
					<i class="fa fa-book"></i>
					<span class="title">Asuransi</span>
					<?= @$sub_menu == 'asuransi' ? '<span class="selected"></span>' : '' ?>
					<span class="arrow <?= @$sub_menu == 'asuransi' ? 'open' : '' ?>"></span>
				</a>
				<ul class="sub-menu" <?= @$sub_menu == 'asuransi' ? 'style="display:block"' : '' ?>>
					
					<?php foreach ($this->Content_m->select_db('bbmc_re_tipe_pasien')->result() as $key ) { ?>
						<li <?= $active == 'asuransi-'.$key->id_tipe_pasien ? 'class="active"' : '' ?>>
							<a href="<?= site_url('front_office/ugd_dir/ugd/tipe_pasien_new/'.$key->id_tipe_pasien) ?>">
								<i class="fa fa-certificate"></i><?=$key->tipe_pasien?></a>
						</li>
					<?php }?>
					
				</ul>
			</li>
			-->
			<?php }?>

			<!--
			<?php if(in_array(15, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= @$sub_menu == 'apotek' ? 'class="active open"' : '' ?>>
				<a>
					<i class="fa fa-medkit"></i>
					<span class="title">Apotek</span>
					<?= @$sub_menu == 'asuransi' ? '<span class="selected"></span>' : '' ?>
					<span class="arrow <?= @$sub_menu == 'apotek' ? 'open' : '' ?>"></span>
				</a>
				<ul class="sub-menu" <?= @$sub_menu == 'apotek' ? 'style="display:block"' : '' ?>>
					<li class="nav-item <?=$active=='bbmc_re_apotik_obat'?'active open':''?>">
                        <a href="<?=site_url()?>/setting/db/bbmc_re_apotik_obat" class="nav-link "> <i class="fa fa-certificate"></i>Daftar Obat</a>
                    </li>
				</ul>
			</li>
			<?php }?>
			-->
			

			<?php if(in_array(11, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= $active == 'kasir' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/reg_dir/kunjungan/kasir') ?>">
					<i class="fa fa-money"></i>
					<span class="title">Pembayaran</span>
					<?= $active == 'kasir' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>	
			<?php }?>

			<!--
			<li <?=$active=='request_amprahan'?'class="active"':''?>>
				<a href="<?=site_url('setting/db/bbmc_tr_amprahan_request')?>">
					<i class="fa fa-send"></i>
					<span class="title">Request Amprahan</span>
					<?=$active=='request_amprahan'?'<span class="selected"></span>':''?>
				</a>
			</li>
			-->
			<!--
			<li <?=$active=='pengajuan'?'class="active"':''?>>
				<a href="<?=site_url('request_note')?>">
					<i class="fa fa-send"></i>
					<span class="title">Request Amprahan</span>
					<?=$active=='pengajuan'?'<span class="selected"></span>':''?>
				</a>
			</li>
			-->
			

			
			<?php if(in_array(12, $this->session->userdata('id_global_hakakses'))){ ?>
			<li <?= $active == 'dashboard' ? 'class="active"' : '' ?>>
				<a href="<?= site_url('front_office/dashboard') ?>">
					<i class="fa fa-area-chart"></i>
					<span class="title">Summary</span>
					<?= $active == 'dashboard' ? '<span class="selected"></span>' : '' ?>
				</a>
			</li>
			<?php }?>

			<?php if(in_array(13, $this->session->userdata('id_global_hakakses'))){ ?>
			<li style="display: nonee;" <?= @$sub_menu == 'pengaturan' ? 'class="active open"' : '' ?>>
				<a>
					<i class="fa fa-cog"></i>
					<span class="title">Pengaturan</span>
					<?= @$sub_menu == 'pengaturan' ? '<span class="selected"></span>' : '' ?>
					<span class="arrow <?= @$sub_menu == 'pengaturan' ? 'open' : '' ?>"></span>
				</a>
				<ul class="sub-menu" <?= @$sub_menu == 'pengaturan' ? 'style="display:block"' : '' ?>>
					
					<?php if(in_array(0, $this->session->userdata('id_global_hakakses'))){ ?>
					<li <?= $active == 'bbmc_re_staff' ? 'class="active"' : '' ?>>
						<a href="<?=site_url()?>/setting/db/bbmc_re_staff">
							<i class="fa fa-key"></i>
							User</a>
					</li>
					<li <?= $active == 'hakakses' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('setting/userpanel') ?>">
							<i class="fa fa-unlock"></i>
							Hakakses</a>
					</li>
					<?php }?>

					<li class="nav-item <?=@$sub_sub_menu == 'reference'?'active open':''?>">
                        <a href="javascript:;" class="nav-link nav-toggle">
                        	<i class="fa fa-pencil-square"></i>
                            <span class="title"> Reference</span>
                             <span class="arrow <?=@$sub_sub_menu == 'reference'?'open':''?>"></span>
                        </a>
                        <ul class="sub-menu" style="">
                        	<!--
                        	<li class="nav-item <?=$active=='biaya'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/siak_re_account_chart" class="nav-link "> <i class="fa fa-circle"></i>Biaya Perawatan </a>
                            </li>
                            -->
                        	<li class="nav-item <?=$active=='bbmc_re_agama'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_agama" class="nav-link "> <i class="fa fa-circle"></i>Agama </a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_alasan_keluar'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_alasan_keluar" class="nav-link "> <i class="fa fa-circle"></i>Alasan Keluar </a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_bidang'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_bidang" class="nav-link "> <i class="fa fa-circle"></i>Bidang </a>
                            </li>
                             <li class="nav-item <?=$active=='bbmc_re_staff_medis'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_staff_medis" class="nav-link "> <i class="fa fa-circle"></i>Staff Medis </a>
                            </li>
                           <li class="nav-item <?=$active=='bbmc_re_icd'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_icd" class="nav-link "> <i class="fa fa-circle"></i>ICD </a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_jenis_pelayanan'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_jenis_pelayanan" class="nav-link "> <i class="fa fa-circle"></i>Jenis Pelayanan</a>
                            </li>
                           	<li class="nav-item <?=$active=='bbmc_re_jenjang_pendidikan'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_jenjang_pendidikan" class="nav-link "> <i class="fa fa-circle"></i>Jenjang Pendidikan</a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_keadaan_saat_tiba'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_keadaan_saat_tiba" class="nav-link "> <i class="fa fa-circle"></i>Keadaan Saat Tiba</a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_kesadaran'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_kesadaran" class="nav-link "> <i class="fa fa-circle"></i>Kesadaran</a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_pekerjaan'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_pekerjaan" class="nav-link "> <i class="fa fa-circle"></i>Pekerjaan</a>
                            </li>
                           	<li class="nav-item <?=$active=='bbmc_re_perusahaan'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_perusahaan" class="nav-link "> <i class="fa fa-circle"></i>Perusahaan</a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_rujukan_dari'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_rujukan_dari" class="nav-link "> <i class="fa fa-circle"></i>Rujukan Dari</a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_status_marital'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_status_marital" class="nav-link "> <i class="fa fa-circle"></i>Status Marital</a>
                            </li>
                           	<li class="nav-item <?=$active=='bbmc_re_status_perawatan'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_status_perawatan" class="nav-link "> <i class="fa fa-circle"></i>Status Perawatan</a>
                            </li>
                            <li class="nav-item <?=$active=='bbmc_re_tempat_lab'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_tempat_lab" class="nav-link "> <i class="fa fa-circle"></i>Tempat Lab</a>
                            </li>
                          
                           
                       		<li class="nav-item <?=$active=='bbmc_re_tipe_kamar'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_tipe_kamar" class="nav-link "> <i class="fa fa-circle"></i>Tipe Kamar</a>
                            </li>
                            
                            <!--
                            harus dari IT yang nambah karena ada akun coa buat sinkron utang ketika pasien bayar di kasir
                            <li class="nav-item <?=$active=='bbmc_re_tipe_pasien'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_tipe_pasien" class="nav-link "> <i class="fa fa-circle"></i>Tipe Pasien</a>
                            </li>
                            -->
                           	<li class="nav-item <?=$active=='bbmc_re_tipe_perawatan'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_tipe_perawatan" class="nav-link "> <i class="fa fa-circle"></i>Tipe Perawatan</a>
                            </li>
                         	<li class="nav-item <?=$active=='bbmc_re_status_resep'?'active open':''?>">
                                <a href="<?=site_url()?>/setting/db/bbmc_re_status_resep" class="nav-link "> <i class="fa fa-circle"></i>Status Resep</a>
                            </li>
                            
                          
                          
                        </ul>
                    </li>
                    
					<li <?= $active == 'version' ? 'class="active"' : '' ?>>
						<a href="<?= site_url('setting/version') ?>">
							<i class="fa fa-sticky-note"></i>
							Version</a>
					</li>

				</ul>
			</li>
			<?php }?>


		</ul>
	</div>
</div>