<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AppointHist.aspx.cs" Inherits="Axium.Web.Appoint.AppointHist" EnableViewState="true" %>
<%@ Register TagPrefix="axi" TagName="Pagination" Src="~/PatientAccess/Controls/Pagination.ascx" %>
<%@ Register TagPrefix="axi" TagName="Copyright" Src="~/PatientAccess/Controls/CopyrightControl.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Appointment History List</title>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous" />
    <link href="../Includes/Css/PA2.0/common.css" rel="stylesheet" type="text/css" />
    <link href="../Includes/Css/appointHist.css" rel="stylesheet" type="text/css" />

    <script src="../Includes/Scripts/jquery-3.5.1.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jquery-migrate-3.3.2.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/json2.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/utilities.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jqModal-r14.js" type="text/javascript"></script>  
    <script src="../Includes/Scripts/jquery.timer.js" type="text/javascript"></script>    
    <script src="../Includes/Scripts/PA2.0/common.js" type="text/javascript"></script>
    <script src="https://kit.fontawesome.com/95fbe47167.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>


</head>
<body>
    <form id="form1" runat="server" class="form-container">
    <div id="AppointmentHistory" class="container bg-transparent pl-0 ml-0">
        <div class="bg-white p-3">
            <div class="HideOnMobile">
                <nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item" aria-current="page"><a href="AppointList.aspx" onclick="parent.openModalSpinner();"><i class="fa fa-calendar"></i></a> <a href="AppointList.aspx" onclick="parent.openModalSpinner();">Appointments</a></li>
                        <li class="breadcrumb-item" aria-current="page"><a href="UpcomeAppt.aspx?dvappid=<%=AppointmentId%>" onclick="parent.openModalSpinner();">Appointment Details</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Appointment History</li>
                    </ol>
                </nav>
            </div>
            <div class="ShowOnMobile">
                <div class="row mb-3">
                    <div class="col-12">
                        <a href="UpcomeAppt.aspx?dvappid=<%=AppointmentId%>" onclick="parent.openModalSpinner();"><i class="fa fa-chevron-left"></i></a> <a href="UpcomeAppt.aspx?dvappid=<%=AppointmentId%>" onclick="parent.openModalSpinner();">Back to Appointment Details</a>
                    </div>
                </div>
            </div>

            <div id="Appointment" class="row mb-3">
                <h5 id="AppointDate" class="DateTime col-xl-2" runat="server"></h5>
	            <h5 id="AppointTime" class="DateTime col-xl-3" runat="server"></h5>
            </div>
            <hr />
            <div id="HistoryDetail">        
                <asp:Repeater ID="AppointHistRepeater" runat="server" EnableViewState="true" OnItemDataBound="HistAppoint_ItemDataBound">
                    <ItemTemplate>
                        <div class="mb-3">
                            <div id="HistStatusDiv" class="row row-mobile" runat="server">
                                <span class="Label col-xl-2">Status:</span>
                                <span class="col-xl-4"><%# Eval("HistAppointStatus")%> <asp:Literal ID="ConfirmLiteral" runat="server"></asp:Literal></span>
                            </div>
                            <asp:Literal ID="HistDate" runat="server"></asp:Literal>
                            <div ID="HistTimeDiv" class="row row-mobile" runat="server">
                                <span class="Label col-xl-2">Time:</span>
                                <span class="col-xl-4"><%# Eval("HistAppointTime")%></span>
                            </div>
                            <div ID="HistClinicChairDiv" class="row row-mobile" runat="server">
                                <span id="ClinicChairSpan" class="Label col-xl-2" runat="server">Clinic/Chair:</span>
                                <span id="ClinicChairLabel" class="col-xl-4" runat="server" ></span>
                            </div>
                            <div ID="HistMadeOnDiv" runat="server" class="row row-mobile">
                                <span class="Label col-xl-2">Made On:</span>
                                <span class="col-xl-4"><%# Eval("HistMadeOn", "{0:MMM dd, yyyy}")%></span>
                            </div>
                            <div ID="HistProviderDiv" runat="server" class="row row-mobile">
                                <span class="Label col-xl-2">Provider:</span>
                                <span class="col-xl-4"><%# Eval("HistPrimProvider")%></span>
                            </div>
                            <asp:Literal ID="SecondaryLiteral" runat="server"></asp:Literal>
                            <div ID="HistCodeDiv" class="row row-mobile" runat="server">
                                <span class="Label col-xl-2">Appointment Code:</span>
                                <span class="col-xl-4"><%# Eval("HistApptCode")%><%# Eval("HistApptCodeDesc")%></span>
                            </div>
                            <hr />
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
            <axi:Pagination ID="Pagination" runat="server" />   
        </div>
    </div>

    <asp:PlaceHolder ID="AutoLogout" runat="server" Visible="false" EnableViewState="false" />
    </form>
    <div class="mt-4">
        <axi:Copyright ID="Copyright" runat="server" class="mt-3"/>          
    </div>

    <script type="text/javascript">
        const AppointHist = function () {
            const init = function () {
                setPageTitle("Appointment History", true);
            };

            return {
                init
            };
        }
        jQuery(document).ready(function() {
            $childHeight = jQuery('#AppointmentHistory').height();
            jQuery('#UpcomeApptId', window.parent.document).css('height', $childHeight);
            jQuery('#AppointListId', window.parent.document).css('height', $childHeight);

            const appointHist = new AppointHist();

            parent.closeModalSpinner();
            appointHist.init();
        });
    </script>
</body>
</html>
