<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="Sistem Informasi Rumah Sakit" />
    <meta name="author" content="IT RS" />
    <title>SINARAN | RSU ANANDA PURWOKERTO</title>

    <link href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <link href="<?php echo base_url('assets_/css/styles.css'); ?>" rel="stylesheet" />
    <link rel="shortcut icon" type="image/png" href="<?= base_url('assets_/assets/img/logo-mini.png') ?>">

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>

    <noscript>
        <meta http-equiv="refresh" content="0; url=<?php echo base_url('welcome'); ?>">
    </noscript>

    <style>
        /* --- FIX: HILANGKAN GARIS BAWAH (UNDERLINE) DI SIDEBAR --- */
        #layoutSidenav_nav .nav-link,
        #layoutSidenav_nav a {
            text-decoration: none !important;
            border-bottom: none !important;
        }

        #layoutSidenav_nav .nav-link:hover,
        #layoutSidenav_nav a:hover {
            text-decoration: none !important;
        }

        #layoutSidenav_nav .nav-link:active,
        #layoutSidenav_nav .nav-link:focus,
        #layoutSidenav_nav a:active,
        #layoutSidenav_nav a:focus {
            text-decoration: none !important;
            outline: none !important;
        }

        /* =========================================
           1. CUSTOM SCROLLBAR
           ========================================= */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }

        ::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

        /* =========================================
           2. SIDEBAR STYLING (MODERN LOOK)
           ========================================= */
        .sb-sidenav-green {
            background-color: #2c3e50 !important;
            color: #ecf0f1 !important;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        }

        .user-profile {
            padding: 20px 15px;
            margin-bottom: 10px;
            background-color: rgba(0, 0, 0, 0.1);
            color: #fff !important;
            font-weight: 600;
            display: flex;
            align-items: center;
            text-decoration: none;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .user-profile i {
            font-size: 20px;
            margin-right: 12px;
            color: #2ecc71;
        }

        .menu-toggle,
        .nav-link-main {
            cursor: pointer;
            padding: 12px 20px;
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.95rem;
            transition: all 0.3s ease;
            border-left: 4px solid transparent;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .menu-toggle:hover,
        .nav-link-main:hover {
            background-color: rgba(255, 255, 255, 0.05);
            color: #fff;
            border-left-color: #2ecc71;
        }

        .menu-toggle p {
            margin: 0;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .menu-dropdown {
            display: none;
            background-color: #1a252f;
        }

        .menu-dropdown .nav-link {
            padding: 10px 15px 10px 45px !important;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7) !important;
            transition: color 0.2s;
            display: block;
            text-decoration: none;
        }

        .menu-dropdown .nav-link:hover {
            color: #2ecc71 !important;
            background-color: transparent;
            padding-left: 50px !important;
        }

        .sb-nav-link-icon {
            display: inline-flex;
            width: 20px;
            justify-content: center;
            margin-right: 10px;
            opacity: 0.8;
        }

        .dropdown-icon {
            font-size: 0.8em;
            transition: transform 0.3s ease;
        }

        .dropdown-icon.rotate {
            transform: rotate(180deg);
        }

        /* =========================================
           3. HEADER & UTILITIES
           ========================================= */
        .navbar-brand {
            font-weight: 700;
            letter-spacing: 1px;
        }

        .logout-button {
            background-color: #e74c3c;
            border: none;
            padding: 5px 15px;
            font-size: 0.9rem;
            border-radius: 4px;
            transition: background 0.3s;
        }

        .logout-button:hover {
            background-color: #c0392b;
            color: white;
        }

        a {
            text-decoration: none;
        }

        /* =========================================
           4. KUNCI PERBAIKAN: FIX MENU TERPOTONG DI MOBILE
           ========================================= */
        .sb-sidenav {
            height: 100vh !important;
            display: flex;
            flex-direction: column;
        }

        .sb-sidenav-menu {
            flex-grow: 1;
            overflow-y: auto !important;
            /* Paksa scroll berfungsi */
            padding-bottom: 120px !important;
            /* Tambahkan ruang kosong di bawah agar menu Surveilan bisa ditarik naik */
        }
    </style>
</head>

<body class="sb-nav-fixed">

    <nav class="sb-topnav navbar navbar-expand navbar-dark bg-success shadow">
        <a class="navbar-brand ps-3" href="">SINARAN</a>
        <button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
        <ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
            <li class="nav-item">
                <a class="nav-link logout-button text-white" href="<?php echo base_url() ?>login/keluar">
                    <i class="fas fa-sign-out-alt"></i> Logout
                </a>
            </li>
        </ul>
    </nav>

    <div id="layoutSidenav">
        <div id="layoutSidenav_nav">
            <nav class="sb-sidenav accordion sb-sidenav-green" id="sidenavAccordion">

                <a id="navbarProfile" href="" class="user-profile">
                    <i class="fas fa-user-circle"></i>
                    <span><?= $this->session->userdata('nm_user') ?></span>
                </a>

                <div class="sb-sidenav-menu">
                    <div class="nav">

                        <?php if ($akses == '1006' && $app == 'AKT' || $akses == '1007' && $app == 'AKT') { ?>

                            <a class="nav-link-main text-white" href="<?php echo base_url('dashboard/keuanganlayanan') ?>">
                                <div><i class="fas fa-desktop sb-nav-link-icon"></i> Dashboard Layanan</div>
                            </a>

                            <div class="menu-toggle" data-target="#menu-billing">
                                <p>
                                    <span><i class="fas fa-file-invoice-dollar sb-nav-link-icon"></i> Menu Billing</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-billing" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billing') ?>">Data Billing</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/billingpenjamin') ?>">Billing Harian & Penjamin</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingicu') ?>">Billing Harian ICU/HCU</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkeuanganall') ?>">Billing Keuangan SIRUS (BPJS)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkeuangannonbpjs_umum') ?>">Billing Non-BPJS (Umum)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkeuangannonbpjs_asuransi') ?>">Billing Non-BPJS (Asuransi)</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeuanganbpjs') ?>">Rekap Keuangan</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeuangannonbpjs_umum') ?>">Rekap Non-BPJS (Umum)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeuangannonbpjs_asuransi') ?>">Rekap Non-BPJS (Asuransi)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeutahunan') ?>">Rekap Tahunan</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirbelumtagih') ?>">Data Kasir Belum Tertagih</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/rekapdatasirus') ?>">Rekap Keuangan (SIRUS)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekaphomecare') ?>">Rekap Keuangan Homecare</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/radiologi') ?>">Penjualan Radiologi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/laboratorium') ?>">Penjualan Laboratorium</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasi') ?>">Penjualan Farmasi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-kasir">
                                <p>
                                    <span><i class="fas fa-cash-register sb-nav-link-icon"></i> Kasir</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-kasir" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkasirall') ?>">Data Kasir All</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirperbankan') ?>">Data Kasir Perbank</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ikbs-keu">
                                <p>
                                    <span><i class="fas fa-procedures sb-nav-link-icon"></i> Menu IKBS</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ikbs-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/menuikbs') ?>">Data Pasien IKBS</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-rajal-keu">
                                <p>
                                    <span><i class="fas fa-walking sb-nav-link-icon"></i> Menu Rawat Jalan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rajal-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/pasienpoliall') ?>">Pasien Poli Seluruh</a>
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/polibatalkeuangan') ?>">Pasien Poli BATAL</a>
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/polidilayanikeuangan') ?>">Pasien Poli DILAYANI</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rmrajallayani') ?>">Data RM Rajal Dilayani DETAIL</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('menurawatjalan/polihomecarekeuangan') ?>">Pasien HOME CARE</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalperpoli') ?>">Rawat jalan Per Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalperdokter') ?>">Rawat jalan Per Dokter</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminpolikeuangan') ?>">Data Penjamin Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalanpoli') ?>">Data SMF & Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalantransfer') ?>">Transfer RJ-RI</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/polikonsul') ?>">Poli Konsul DPJP</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/antreanpoli') ?>">Antrean Poliklinik</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ranap-keu">
                                <p>
                                    <span><i class="fas fa-bed sb-nav-link-icon"></i> Menu Rawat Inap</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ranap-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasieninaptotal') ?>">Pasien Inap Total</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/viewpasieninapdtl') ?>">Pasien Inap Detail All</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamindpjp') ?>">Pasien Inap DPJP</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamininap') ?>">Data Penjamin Inap</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-igd-keu">
                                <p>
                                    <span><i class="fas fa-ambulance sb-nav-link-icon"></i> Menu IGD</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-igd-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/tampiligdrekap') ?>">Data IGD Rekap</a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigddilayani') ?>">Data IGD Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigdbatal') ?>">Data IGD Batal</a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigdtotal') ?>">Data IGD Total</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminigdkeuangan') ?>">Data Penjamin IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/respontimeigd') ?>">Data Respon Time IGD</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-rm-keu">
                                <p>
                                    <span><i class="fas fa-notes-medical sb-nav-link-icon"></i> Menu Rekam Medis</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rm-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/icdrajal') ?>">Coding ICD Rawat Jalan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/hunianinap') ?>">Data Hunian Rawat Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rujuk') ?>">Data Rujukan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminpoli') ?>">Data Penjamin Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminigd') ?>">Data Penjamin IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamininap') ?>">Data Penjamin Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IPRSborlostoi') ?>">Indikator Pelayanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekamedis') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demografiasalkeinap') ?>">Pasien POLI ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigdkeinap') ?>">Pasien IGD ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienmeniggal') ?>">Data Pasien Meninggal</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienispa') ?>">Data Pasien ISPA & Pneumoni</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demografiusia') ?>">Data Demografi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/datademousiaperpoli') ?>">Demografi Per Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demorekapall') ?>">Rekap Demografi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rmrajallayani') ?>">Data RM Rajal Dilayani </a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigddilayani') ?>">Data IGD Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/menuikbs') ?>">Data Pasien IKBS</a>
                                <a class="nav-link" href="<?php echo base_url('rm/newpatient') ?>">Data Pasien Baru Daftar Online</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-farmasi-keu">
                                <p>
                                    <span><i class="fas fa-pills sb-nav-link-icon"></i> Menu Farmasi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-farmasi-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/rujuk') ?>">Data Rujukan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasiwaktuserah') ?>">Waktu Serah</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasi') ?>">Farmasi Penjualan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasipembelian') ?>">Farmasi Pembelian</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/POfarmasi') ?>">Data PO Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/datastockfarmasi') ?>">Data Stok Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasiSO') ?>">Data SO Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/obatkronis') ?>">Obat Kronis</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-surveilan-keu">
                                <p>
                                    <span><i class="fas fa-microscope sb-nav-link-icon"></i> Surveilan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-surveilan-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/surveilan') ?>">Data PPI Infus</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirwatktutunggu') ?>">Waktu Layani Kasir</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IGDwaktulayani') ?>">Waktu Layani IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktutunggupoli') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktudilayanidokter') ?>">Waktu Layani Dokter</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-homecare-keu">
                                <p>
                                    <span><i class="fas fa-clinic-medical sb-nav-link-icon"></i> Homecare</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-homecare-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/polihomecarekeuangan') ?>">Pasien HOME CARE</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/homecarebilling') ?>">Rekap Billing Pasien Homecare</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-mcu-keu">
                                <p>
                                    <span><i class="fas fa-heartbeat sb-nav-link-icon"></i> MCU</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-mcu-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/mcu') ?>">Data Hasil MCU</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-vaksin-keu">
                                <p>
                                    <span><i class="fas fa-syringe sb-nav-link-icon"></i> Klinik Vaksin</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-vaksin-keu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/pesertasehat') ?>">Data Peserta Vaksin</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pesertasehattindakan') ?>">Data Peserta Tindakan</a>
                            </div>


                        <?php } else if ($akses == '112' && $app == 'DAFTAR') { ?>

                            <div class="menu-toggle" data-target="#menu-rm-pendaftaran">
                                <p>
                                    <span><i class="fas fa-folder-open sb-nav-link-icon"></i> Rekam Medis</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rm-pendaftaran" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">DASHBOARD LAYANAN</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/icdrajal') ?>">Coding ICD Rawat Jalan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/hunianinap') ?>">Data Hunian Rawat Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rujuk') ?>">Data Rujukan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminpoli') ?>">Data Penjamin Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminigd') ?>">Data Penjamin IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamininap') ?>">Data Penjamin Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IPRSborlostoi') ?>">Indikator Pelayanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekamedis') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demografiasalkeinap') ?>">Pasien POLI ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigdkeinap') ?>">Pasien IGD ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienmeniggal') ?>">Data Pasien Meninggal</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienispa') ?>">Data Pasien ISPA & Pneumoni</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rmrajallayani') ?>">Data RM Rajal Dilayani </a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigddilayani') ?>">Data IGD Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/menuikbs') ?>">Data Pasien IKBS</a>
                                <a class="nav-link" href="<?php echo base_url('rm/newpatient') ?>">Data Pasien Baru Daftar Online</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-demografi">
                                <p>
                                    <span><i class="fas fa-users sb-nav-link-icon"></i> Demografi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-demografi" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/demografiusia') ?>">Data Demografi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/datademousiaperpoli') ?>">Demografi Per Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demorekapall') ?>">Data Rekap Demografi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-lainnya">
                                <p>
                                    <span><i class="fas fa-bars sb-nav-link-icon"></i> Menu Lainnya</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-lainnya" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/batalSEP') ?>">Batal SEP</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/updateSEP') ?>">Update SEP</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ponek">
                                <p>
                                    <span><i class="fas fa-person-pregnant sb-nav-link-icon"></i>PONEK</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ponek" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/SRB') ?>">Data Pasien SRB PONEK</a>
                            </div>


                        <?php } else if ($akses == '9999' || $akses == '999' && $app == 'FARMASI' || $akses == '112' && $app == 'DAFTAR') { ?>

                            <div class="menu-toggle" data-target="#menu-farmasi-utama">
                                <p>
                                    <span><i class="fas fa-pills sb-nav-link-icon"></i> Menu Farmasi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-farmasi-utama" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">DASHBOARD LAYANAN</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rujuk') ?>">Data Rujukan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasiwaktuserah') ?>">Waktu Serah</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasi') ?>">Farmasi Penjualan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasipembelian') ?>">Farmasi Pembelian</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/POfarmasi') ?>">Data PO Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/datastockfarmasi') ?>">Data Stok Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasiSO') ?>">Data SO Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienprb') ?>">Pasien PRB</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/obatkronis') ?>">Obat Kronis</a>
                            </div>


                        <?php } else if ($akses == 'DIR' || $akses == '1011') { ?>

                            <div class="menu-toggle" data-target="#menu-rajal-dir">
                                <p>
                                    <span><i class="fas fa-walking sb-nav-link-icon"></i> Rawat Jalan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rajal-dir" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalanpoli') ?>">Data SMF & Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalhomecare') ?>">Data Home Care</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalperpoli') ?>">Rawat jalan Per Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalperdokter') ?>">Rawat jalan Per Dokter</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalantotal') ?>">Data Rawat Jalan Total</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalanbatal') ?>">Data Rawat Jalan Batal</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalandilayani') ?>">Data Rawat Jalan Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rmrajallayani') ?>">Data RM Rajal Dilayani Detail </a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalantransfer') ?>">Data Pasien Transfer RJ-RI</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/polikonsul') ?>">Data Poli Konsul DPJP</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminpoli') ?>">Penjamin Poliklinik</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/antreanpoli') ?>">Antrean Poliklinik</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/jadwalpoli') ?>">Jadwal Poliklinik</a>
                                <a class="nav-link" href="<?php echo base_url('rm/newpatient') ?>">Data Pasien Baru</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ponek">
                                <p>
                                    <span><i class="fas fa-person-pregnant sb-nav-link-icon"></i>PONEK</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ponek" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/SRB') ?>">Data Pasien SRB PONEK</a>
                            </div>


                        <?php } else if ($akses == 'RMI' || $akses == 'RAD' || $akses == '1011') { ?>

                            <div class="menu-toggle" data-target="#menu-ranap-rmi">
                                <p>
                                    <span><i class="fas fa-bed sb-nav-link-icon"></i> Rawat Inap</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ranap-rmi" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatinap') ?>">Data Pasien Rawat Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamininap') ?>">Data Penjamin Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasieninaptotal') ?>">Data Total Pasien Inap</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/viewpasieninapdtl') ?>">Pasien Inap Detail All</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/dataranapperdokter') ?>">Data Total Pasien Inap Per Dokter</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamindpjp') ?>">Data Pasien Inap DPJP</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-surveilan-rmi">
                                <p>
                                    <span><i class="fas fa-microscope sb-nav-link-icon"></i> Surveilan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-surveilan-rmi" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/surveilan') ?>">Data PPI Infus</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirwatktutunggu') ?>">Waktu Layani Kasir</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IGDwaktulayani') ?>">Waktu Layani IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktutunggupoli') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktudilayanidokter') ?>">Waktu Layani Dokter</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ponek">
                                <p>
                                    <span><i class="fas fa-person-pregnant sb-nav-link-icon"></i>PONEK</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                    <!-- <i class="fa-solid fa-person-pregnant"></i> -->
                                </p>
                            </div>
                            <div id="menu-ponek" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/SRB') ?>">Data Pasien SRB PONEK</a>
                            </div>


                        <?php } else if ($akses == 'IGD' && $app == 'IGD') { ?>

                            <div class="menu-toggle" data-target="#menu-igd-utama">
                                <p>
                                    <span><i class="fas fa-ambulance sb-nav-link-icon"></i> Instalasi Gawat Darurat</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-igd-utama" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/igd') ?>">Dashboard Pasien IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigd') ?>">Data Pasien IGD Total</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigdbatal') ?>">Data Pasien IGD Batal</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigddilayani') ?>">Data Pasien IGD Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigdkeinap') ?>">Data Pasien IGD ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/respontimeigd') ?>">Data Respon Time IGD</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-surveilan-igd">
                                <p>
                                    <span><i class="fas fa-microscope sb-nav-link-icon"></i> Surveilan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-surveilan-igd" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/surveilan') ?>">Data PPI Infus</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirwatktutunggu') ?>">Waktu Layani Kasir</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IGDwaktulayani') ?>">Waktu Layani IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktutunggupoli') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktudilayanidokter') ?>">Waktu Layani Dokter</a>
                            </div>


                        <?php } else if ($akses == 'RMI' && $app == 'RMI') { ?>

                            <div class="menu-toggle" data-target="#menu-ibs">
                                <p>
                                    <span><i class="fas fa-procedures sb-nav-link-icon"></i> Instalasi Bedah Sentral</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ibs" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dataikbs/ikbsjadwaloperasi') ?>">Data Jadwal Operasi</a>
                            </div>


                        <?php } else if ($akses == '101' && $app == 'LAB') { ?>

                            <div class="menu-toggle" data-target="#menu-lab">
                                <p>
                                    <span><i class="fas fa-flask sb-nav-link-icon"></i> Laboratorium</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-lab" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/laboratorium2') ?>">Penjualan Laboratorium</a>
                            </div>


                        <?php } else if ($akses == '101' && $app == 'RAD') { ?>

                            <div class="menu-toggle" data-target="#menu-rad">
                                <p>
                                    <span><i class="fas fa-x-ray sb-nav-link-icon"></i> Radiologi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rad" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/radiologi') ?>">Penjualan Radiologi</a>
                            </div>


                        <?php } else if ($akses == '1010' && $app == 'AKT') { ?>

                            <a class="nav-link-main text-white" href="<?php echo base_url('dashboard/utama') ?>">
                                <div><i class="fas fa-book-open sb-nav-link-icon"></i> Dashboard Sinaran</div>
                            </a>
                            <a class="nav-link-main text-white" href="https://sinaran.rsuananda.id/display" target="_blank">
                                <div><i class="fas fa-pie-chart sb-nav-link-icon"></i> Display Kuota Poli</div>
                            </a>
                            <a class="nav-link-main text-white" href="https://sinaran.rsuananda.id/dashboardand" target="_blank">
                                <div><i class="fas fa-wheelchair sb-nav-link-icon"></i> Dashboard Layanan Pasien</div>
                            </a>
                            <a class="nav-link-main text-white" href="<?php echo base_url('dashboard/dokumen') ?>">
                                <div><i class="fas fa-book-open sb-nav-link-icon"></i> Pustaka Dokumen</div>
                            </a>

                            <div class="menu-toggle" data-target="#menu-keuangan-pt">
                                <p>
                                    <span><i class="fas fa-coins sb-nav-link-icon"></i> Keuangan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-keuangan-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/billing') ?>">Data Billing</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/billingpenjamin') ?>">Billing Harian & Penjamin</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingicu') ?>">Billing Harian ICU/HCU</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkeuanganall') ?>">Billing Keuangan (BPJS)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkeuangannonbpjs_umum') ?>">Billing Non-BPJS (Umum)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkeuangannonbpjs_asuransi') ?>">Billing Non-BPJS (Asuransi)</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeuanganbpjs') ?>">Rekap Keuangan</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeuangannonbpjs_umum') ?>">Rekap Non-BPJS (Umum)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeuangannonbpjs_asuransi') ?>">Rekap Non-BPJS (Asuransi)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekapkeutahunan') ?>">Rekap Asuransi Tahunan</a> -->
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/rekapdatasirus') ?>">Rekap Keuangan (SIRUS)</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekaphomecare') ?>">Rekap Keuangan Homecare</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirbelumtagih') ?>">Data Kasir Belum Tertagih</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/radiologi') ?>">Penjualan Radiologi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/laboratorium') ?>">Penjualan Laboratorium</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasi') ?>">Penjualan Farmasi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-kasir-pt">
                                <p>
                                    <span><i class="fas fa-cash-register sb-nav-link-icon"></i> Kasir</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-kasir-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/billingkasirall') ?>">Data Kasir All</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirperbankan') ?>">Data Kasir Perbank</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-farmasi-pt">
                                <p>
                                    <span><i class="fas fa-pills sb-nav-link-icon"></i> Farmasi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-farmasi-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/rujuk') ?>">Data Rujukan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasiwaktuserah') ?>">Waktu Serah</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasi') ?>">Farmasi Penjualan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasipembelian') ?>">Farmasi Pembelian</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/datastockfarmasi') ?>">Data Stok Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienprb') ?>">Data Pasien PRB</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/POfarmasi') ?>">Data PO Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/farmasiSO') ?>">Data SO Farmasi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/obatkronis') ?>">Obat Kronis</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-lab-pt">
                                <p>
                                    <span><i class="fas fa-flask sb-nav-link-icon"></i> Laboratorium</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-lab-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/laboratorium2') ?>">Penjualan Laboratorium</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-rad-pt">
                                <p>
                                    <span><i class="fas fa-x-ray sb-nav-link-icon"></i> Radiologi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rad-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/radiologi') ?>">Penjualan Radiologi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ranap-pt">
                                <p>
                                    <span><i class="fas fa-bed sb-nav-link-icon"></i> Rawat Inap</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ranap-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasieninaptotal') ?>">Pasien Inap Total</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/viewpasieninapdtl') ?>">Pasien Inap Detail All</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/dataranapperdokter') ?>">Data Total Pasien Inap Per Dokter</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamindpjp') ?>">Pasien Inap DPJP</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamininap') ?>">Data Penjamin Inap</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-rajal-pt">
                                <p>
                                    <span><i class="fas fa-walking sb-nav-link-icon"></i> Rawat Jalan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rajal-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/pasienpoliall') ?>">Pasien Poli Seluruh</a>
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/polibatalkeuangan') ?>">Pasien Poli BATAL</a>
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/polidilayanikeuangan') ?>">Pasien Poli DILAYANI</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rmrajallayani') ?>">Data RM Rajal Dilayani DETAIL </a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalperpoli') ?>">Rawat jalan Per Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rajalperdokter') ?>">Rawat jalan Per Dokter</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('menurawatjalan/polihomecarekeuangan') ?>">Pasien HOME CARE</a> -->
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminpolikeuangan') ?>">Data Penjamin Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalanpoli') ?>">Data SMF & Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rawatjalantransfer') ?>">Transfer RJ-RI</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/polikonsul') ?>">Data Poli Konsul DPJP</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/antreanpolirajal') ?>">Antrean Poliklinik</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-vaksin-pt">
                                <p>
                                    <span><i class="fas fa-syringe sb-nav-link-icon"></i> Klinik Vaksin</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-vaksin-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/pesertasehat') ?>">Data Peserta Vaksin</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pesertasehattindakan') ?>">Data Peserta Tindakan</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-homecare-pt">
                                <p>
                                    <span><i class="fas fa-clinic-medical sb-nav-link-icon"></i> Home Care</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-homecare-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('menurawatjalan/polihomecarekeuangan') ?>">Pasien HOME CARE</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/homecarebilling') ?>">Rekap Billing Pasien Homecare</a>
                                <!-- <a class="nav-link" href="<?php echo base_url('dashboard/pesertasehattindakan') ?>">Data Peserta Tindakan</a> -->
                            </div>

                            <div class="menu-toggle" data-target="#menu-mcu-pt">
                                <p>
                                    <span><i class="fas fa-heartbeat sb-nav-link-icon"></i> MCU</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-mcu-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/mcu') ?>">Data Hasil MCU</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/mcucoba') ?>">Data Hasil MCU All Institusi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-ikbs-pt">
                                <p>
                                    <span><i class="fas fa-procedures sb-nav-link-icon"></i> IKBS</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-ikbs-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/menuikbs') ?>">Data Pasien IKBS</a>
                                <a class="nav-link" href="https://sinaran.rsuananda.id/ikbs" target="_blank">Display Jadwal Operasi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-rm-pt">
                                <p>
                                    <span><i class="fas fa-notes-medical sb-nav-link-icon"></i> Rekam Medis</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-rm-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/icdrajal') ?>">Coding ICD Rawat Jalan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/hunianinap') ?>">Data Hunian Rawat Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rujuk') ?>">Data Rujukan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminpoli') ?>">Data Penjamin Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminigd') ?>">Data Penjamin IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjamininap') ?>">Data Penjamin Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IPRSborlostoi') ?>">Indikator Pelayanan Rumah Sakit</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rekamedis') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demografiasalkeinap') ?>">Pasien POLI ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigdkeinap') ?>">Pasien IGD ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienmeniggal') ?>">Data Pasien Meninggal</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienispa') ?>">Data Pasien ISPA & Pneumoni</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demografiusia') ?>">Data Demografi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/datademousiaperpoli') ?>">Data Demografi Per Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/demorekapall') ?>">Data Rekap Demografi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/SRB') ?>">Data Pasien SRB PONEK</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/rmrajallayani') ?>">Data RM Rajal Dilayani Detail </a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigddilayani') ?>">Data IGD Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/menuikbs') ?>">Data Pasien IKBS</a>
                                <a class="nav-link" href="<?php echo base_url('rm/newpatient') ?>">Data Pasien Baru Daftar Online</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-gizi-pt">
                                <p>
                                    <span><i class="fas fa-utensils sb-nav-link-icon"></i> Gizi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-gizi-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/gizi') ?>">Riwayat Asuhan Gizi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/gizimalnutrisi') ?>">Data Mal Nutrisi Gizi</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-igd-pt">
                                <p>
                                    <span><i class="fas fa-ambulance sb-nav-link-icon"></i> IGD</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-igd-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/tampiligdrekap') ?>">Data IGD Rekap</a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigddilayani') ?>">Data IGD Dilayani</a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigdbatal') ?>">Data IGD Batal</a>
                                <a class="nav-link" href="<?php echo base_url('menuigdkeuangan/pasienigdtotal') ?>">Data IGD Total</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/penjaminigdkeuangan') ?>">Data Penjamin IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/pasienigdkeinap') ?>">Data Pasien IGD ke Inap</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/respontimeigd') ?>">Data Respon Time IGD</a>
                            </div>

                            <div class="menu-toggle" data-target="#menu-surveilan-pt">
                                <p>
                                    <span><i class="fas fa-microscope sb-nav-link-icon"></i> Surveilan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-surveilan-pt" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/surveilan') ?>">Data PPI Infus</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirwatktutunggu') ?>">Waktu Layani Kasir</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IGDwaktulayani') ?>">Waktu Layani IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktutunggupoli') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktudilayanidokter') ?>">Waktu Layani Dokter</a>
                            </div>


                        <?php } else if ($akses == 'GZI' && $app == 'LAB') { ?>

                            <div class="menu-toggle" data-target="#menu-gizi-utama">
                                <p>
                                    <span><i class="fas fa-utensils sb-nav-link-icon"></i> Menu Gizi</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-gizi-utama" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/dashboard') ?>">Dashboard Layanan</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/dokumen') ?>">Pustaka Dokumen</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/gizi') ?>">Riwayat Asuhan Gizi</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/gizimalnutrisi') ?>">Data Mal Nutrisi Gizi</a>
                            </div>


                        <?php } else if ($akses == '168' && $app == 'DAFTAR') { ?>

                            <div class="menu-toggle" data-target="#menu-mcu-utama">
                                <p>
                                    <span><i class="fas fa-heartbeat sb-nav-link-icon"></i> Menu MCU</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-mcu-utama" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/mcu') ?>">Data Hasil MCU</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/mcucoba') ?>">Data Hasil MCU All Institusi</a>
                            </div>


                        <?php } else if ($akses == 'MUTU' && $app == 'RMJ') { ?>

                            <div class="menu-toggle" data-target="#menu-mutu">
                                <p>
                                    <span><i class="fas fa-microscope sb-nav-link-icon"></i> Surveilan</span>
                                    <i class="fas fa-chevron-down dropdown-icon"></i>
                                </p>
                            </div>
                            <div id="menu-mutu" class="menu-dropdown">
                                <a class="nav-link" href="<?php echo base_url('dashboard/surveilan') ?>">Data PPI Infus</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/kasirwatktutunggu') ?>">Waktu Layani Kasir</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/IGDwaktulayani') ?>">Waktu Layani IGD</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktutunggupoli') ?>">Waktu Tunggu Poli</a>
                                <a class="nav-link" href="<?php echo base_url('dashboard/waktudilayanidokter') ?>">Waktu Layani Dokter</a>
                            </div>


                        <?php } else { ?>
                            <div class="sb-sidenav-menu-heading text-white-50">LAPORAN</div>
                            <a class="nav-link text-white" href="<?php echo base_url('dashboard/dokumen') ?>">
                                <div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
                                Pustaka Dokumen
                            </a>
                        <?php } ?>
                    </div>
                </div>
            </nav>
        </div>

        <script>
            $(document).ready(function() {
                // 1. Inisialisasi State Menu dari LocalStorage
                $('.menu-toggle').each(function() {
                    const targetId = $(this).data('target');
                    const storageKey = 'menu_state_' + targetId;
                    const state = localStorage.getItem(storageKey);
                    const $icon = $(this).find('.dropdown-icon');

                    if (state === 'open') {
                        $(targetId).show();
                        $icon.addClass('rotate').removeClass('fa-chevron-down').addClass('fa-chevron-up');
                    }
                });

                // 2. Event Listener untuk Klik Menu
                $('.menu-toggle').on('click', function() {
                    const targetId = $(this).data('target');
                    const $dropdown = $(targetId);
                    const $icon = $(this).find('.dropdown-icon');
                    const storageKey = 'menu_state_' + targetId;

                    $dropdown.slideToggle(300, function() {
                        if ($dropdown.is(':visible')) {
                            $icon.addClass('rotate').removeClass('fa-chevron-down').addClass('fa-chevron-up');
                            localStorage.setItem(storageKey, 'open');
                        } else {
                            $icon.removeClass('rotate').addClass('fa-chevron-down').removeClass('fa-chevron-up');
                            localStorage.setItem(storageKey, 'closed');
                        }
                    });
                });

                // 3. Mencegah menu tertutup saat klik item di dalamnya
                $('.menu-dropdown').on('click', '.nav-link', function(e) {
                    e.stopPropagation();
                });

                // 4. KUNCI PERBAIKAN: FUNGSI TOGGLE SIDEBAR SB-ADMIN
                // Ini memastikan tombol menu garis tiga di pojok kiri atas berfungsi.
                $('#sidebarToggle').on('click', function(e) {
                    e.preventDefault();
                    $('body').toggleClass('sb-sidenav-toggled');
                    localStorage.setItem('sb|sidebar-toggle', $('body').hasClass('sb-sidenav-toggled'));
                });
            });
        </script>