<!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="" />
    <meta name="author" content="" />
    <title>Index |KPP IGD</title>
    <link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="css/jquery.dataTables.min.css">
    <link href="css/styles.css" rel="stylesheet" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>

</head>

<body class="sb-nav-fixed">
    <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
        <!-- Navbar Brand-->
        <a class="navbar-brand ps-3" href="index.html">KPP v1.4</a>
        <!-- Sidebar Toggle-->
        <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>
        <!-- Navbar Search-->
        <form class="d-none d-md-inline-block form-inline ms-auto me-0 me-md-3 my-2 my-md-0" id="tampil" action="search.php" method="GET" enctype="multipart/form-data">
            <div class="input-group" hidden>
                <input hidden class="form-control me-2" type="search" id="isearch" name="isearch" placeholder="cari pasien" aria-label="Search">
                <button hidden class="btn btn-outline-success" onclick="loadDoc()" type="submit" name="submit" id="isearchbtn">Cari</button>
            </div>
        </form>
        <ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
            <!-- Navbar-->

            <a class="nav-link h6 mb-2 text-gray-800" href="#!" id="login" title="user keluar"></a>
            <a href="../index.php">
                <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-person-circle" title="user login" viewBox="0 0 16 16">
                    <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z" />
                    <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z" />
                </svg>
            </a>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"></a>
                <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
                    <li><a class="dropdown-item" onclick="settinglight()" id="settinglight" href="#!">Light</a></li>
                    <li><a hidden class="dropdown-item" onclick="settingdark()" id="settingdark" href="#!">Dark</a></li>
                    <li><a class="dropdown-item" href="#!">Activity Log</a></li>
                    <li>
                        <hr class="dropdown-divider" />
                    </li>
                    <li><a class="dropdown-item" href="model/logout.php?">Logout</a></li>
                </ul>
            </li>
        </ul>
    </nav>
    <script>
        function settinglight() {
            document.getElementById('sidenavAccordion').className = "sb-sidenav accordion sb-sidenav-light";
            document.getElementById('settinglight').hidden = true;
            document.getElementById('settingdark').hidden = false;
            return;
        }

        function settingdark() {
            document.getElementById('sidenavAccordion').className = "sb-sidenav accordion sb-sidenav-dark";
            document.getElementById('settinglight').hidden = false;
            document.getElementById('settingdark').hidden = true;
            return;
        }
    </script>
    <div id="layoutSidenav">
        <div id="layoutSidenav_nav">
            <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
                <div class="sb-sidenav-menu">
                    <div class="nav">
                        <div class="sb-sidenav-menu-heading">Core</div>
                        <a class="nav-link" href="index.html">
                            <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                            Dashboard
                        </a>

                        <a class="nav-link collapsed" href="" data-bs-toggle="collapse" data-bs-target="#collapseone" aria-expanded="false" aria-controls="collapseLayouts">
                            <div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
                            Indikator Mutu
                            <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                        </a>
                        <div class="collapse" id="collapseone" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordion">
                            <nav class="sb-sidenav-menu-nested nav">
                                <a class="nav-link" href="a_gelang.php">Gelang identitas</a>
<!--                                 <a class="nav-link" href="b_tranfusi.php">Pelaporan reaksi tranfusi</a> -->
                                <a class="nav-link" href="a_identifikasi.php">Identifikasi </a>
<!--                                 <a class="nav-link" href="d_paps.php">PAPS</a> -->
                                <a class="nav-link" href="c_prolong.php">LOS kurang 6 jam </a>
<!--                                 <a class="nav-link" href="c_respontime_sc.php">Respon Time SC</a> -->
                                 <a class="nav-link" href="c_billing_ok.php">Site Marking Pasien OK</a>

                                <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseLayouts">
                                    <div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
                                    Insiden
                                    <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                                </a>
                                <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<!--                                     <a class="nav-link" href="a_insiden.php?link=insiden">Laporan Insiden</a> -->
<!--                                     <a class="nav-link" href="a_insiden.php?link=kontrol">Kontrol</a> -->
                                </div>

                                <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapseFour" aria-expanded="false" aria-controls="collapseLayouts">
                                    <div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
                                    KIE
                                    <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                                </a>
                                <div id="collapseFour" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
                                    <a class="nav-link" href="page_not_found.html">Alur Pelayanan Ugd </a>
                                    <a class="nav-link" href="page_not_found.html">Resiko Penyakit </a>
                                    <a class="nav-link" href="page_not_found.html">Diagnosa Penyakit </a>
                                    <a class="nav-link" href="page_not_found.html">Manajemen Nyeri</a>
                                    <a class="nav-link" href="page_not_found.html">Bimbingan Rohani </a>
                                    <a class="nav-link" href="page_not_found.html">Materi Umum </a>
                                    <a class="nav-link" href="page_not_found.html">Cara Cuci Tangan</a>
                                    <a class="nav-link" href="page_not_found.html">Pemasangan Gelang ID</a>
                                </div>
                        </div>
                        <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#collapsePages" aria-expanded="false" aria-controls="collapsePages">
                            <div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
                            Pages
                            <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                        </a>
                        <div class="collapse" id="collapsePages" aria-labelledby="headingTwo" data-bs-parent="#sidenavAccordion">
                            <nav class="sb-sidenav-menu-nested nav accordion" id="sidenavAccordionPages">
                                <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#pagesCollapseAuth" aria-expanded="false" aria-controls="pagesCollapseAuth">
                                    Authentication
                                    <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                                </a>
                                <div class="collapse" id="pagesCollapseAuth" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordionPages">
                                    <nav class="sb-sidenav-menu-nested nav">
                                        <a class="nav-link" href="../login.php">Login</a>
                                        <a class="nav-link" href="../register.php">Register</a>
                                        <a class="nav-link" href="./page_not_found.html">Forgot Password</a>
                                    </nav>
                                </div>
                                <a class="nav-link collapsed" href="#" data-bs-toggle="collapse" data-bs-target="#pagesCollapseError" aria-expanded="false" aria-controls="pagesCollapseError">
                                    Error
                                    <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                                </a>
                                <div class="collapse" id="pagesCollapseError" aria-labelledby="headingOne" data-bs-parent="#sidenavAccordionPages">
                                    <nav class="sb-sidenav-menu-nested nav">
                                        <a class="nav-link" href="./page_not_found.html">404 Page</a>

                                    </nav>
                                </div>
                            </nav>
                        </div>
                        <div class="sb-sidenav-menu-heading">Addons</div>
                        <a class="nav-link" href="./page_not_found.html">
                            <div class="sb-nav-link-icon"><i class="fas fa-chart-area"></i></div>
                            Charts
                        </a>
                        <a class="nav-link" href="./page_not_found.html">
                            <div class="sb-nav-link-icon"><i class="fas fa-table"></i></div>
                            Tables
                        </a>
                    </div>
                </div>
                <div class="sb-sidenav-footer">
                    <div class="small">Logged in as:</div>
                    <p id="myuser"></p>

                </div>
            </nav>
        </div>
        <div id="layoutSidenav_content">
            <main>
                <div class="sb-sidenav-light h4" id="tittlepage"></div>
                <div class="accordion accordion-flush" id="accordionFlushExample">
                    <div class="accordion-item">
                        <h2 class="accordion-header" id="flush-headingOne">
                            <button id="linkfilter" class="accordion-button collapsed btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false" aria-controls="flush-collapseOne">
                                Filter Tanggal
                            </button>
                        </h2>
                        <div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
                            <!-- <div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the first item's accordion body.</div> -->
                            <div class="" id="pasien" role="menu">
                                <div class="modal-content">
                                    <div class="modal-header" align="center">
                                        <h6>Masukkan tanggal kedatangan</h6>
                                    </div>
                                    <form id="pasienfrm" method="POST" enctype="multipart/form-data">
                                        <div class="modal-body">
                                            <div class="row mb-3">
                                                <label for="pasienawal" class="col-sm-2 col-form-label col-form-label-sm">Tanggal</label>
                                                <div class="col-md-4" style="margin-bottom: 5pt;">
                                                    <input required type="datetime-local" name="awal" id="pasienawal" class="form-control form-control-sm">
                                                </div>
                                                <label for="pasienakhir" class="col-sm-2 col-form-label col-form-label-sm">Sampai dengan</label>
                                                <div class="col-md-4" style="margin-bottom: 5pt;">
                                                    <div class="input-group">
                                                        <input required type="datetime-local" name="akhir" id="pasienakhir" class="form-control form-control-sm">
                                                        <span class="input-group-btn">
                                                            <button id="printf" type="submit" name="printf" class="btn btn-primary btn-sm">cetak</button>
                                                        </span>
                                                    </div><!-- /input-group -->
                                                </div>
                                            </div>
                                            <div class="row mb-3" id="uraian" hidden>
                                                <label class="col-sm-2 col-form-label-sm" for="pasienruang">Filter Text</label>
                                                <div class="col-md-10" style="margin-bottom: 5pt;">
                                                    <input type="text" class="form-control form-control-sm" id="tindakan" name="tindakan">
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <script>
                    $(document).ready(function() {
                        login()

                        function login() {
                            $.ajax({
                                url: "model/login.php",
                                method: "GET",
                                success: function(data) {
                                    $('#myuser').html(data);
                                    var log = document.getElementById('myuser').innerHTML;
                                    if (log == "Logout") {
                                        alert('Silahkan anda login dulu!!')
                                        document.location.href = "../login.php";
                                    }
                                }
                            })
                        }
                    })
                </script>