<%@ Page Language="C#" MasterPageFile="../PA2Master.master" MaintainScrollPositionOnPostback="true" AutoEventWireup="true" CodeBehind="~/PatientAccess/Users/InsuranceDetail.aspx.cs" Inherits="Axium.Web.Users.InsuranceDetail" %>
<%@ Register TagPrefix="axi" TagName="MarkIncorrectCorrectButton" Src="~/PatientAccess/Controls/MarkIncorrectCorrectButton.ascx" %>
<%@ Register TagPrefix="axi" TagName="Notification" Src="~/PatientAccess/Controls/Notification.ascx" %>
<%@ Register TagPrefix="axi" TagName="Copyright" Src="~/PatientAccess/Controls/CopyrightControl.ascx" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="Header" runat="server">
    <link href="../Includes/Css/PA2.0/InsuranceDetail.css" rel="stylesheet">
    <link href="../Includes/Css/PA2.0/CorrectIncorrectButton.css" rel="stylesheet"/>
    <link href="../Includes/Css/PA2.0/common.css" rel="stylesheet" />
</asp:Content>

<asp:Content ID="ContainerContent" ContentPlaceHolderID="Container" runat="server">
<form id="form1" runat="server" class="form-container">
<div class="container-fluid bg-white p-3" id="main-container">
<asp:HiddenField runat="server" ID="PolicyUserIdField"/>

<div class="row mb-3">
    <div class="col-12">
        <div id="breadcrumb" runat="server" class="row">
            <div class="HideOnMobile">
                <nav style="--bs-breadcrumb-divider: '>';" class="breadcrumb-padding" aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item" aria-current="page"><a href="InsuranceList.aspx" onclick="parent.openModalSpinner();"><i class="fa fa-id-badge"></i></a> <a href="InsuranceList.aspx" onclick="parent.openModalSpinner();">Insurance Policy Information</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Insurance Policy Details</li>
                    </ol>
                </nav>
            </div>
            <div class="ShowOnMobile mb-3">
                <a href="InsuranceList.aspx" onclick="parent.openModalSpinner();"><i class="fa fa-chevron-left"></i></a> <a href="InsuranceList.aspx" onclick="parent.openModalSpinner();">Back to Insurance Policy Information</a>
            </div>
        </div>
    </div>
</div>

<div class="row mb-2">
    <div class="col-12">
        <div class="d-flex align-items-center">
            <span runat="server" ID="InsuranceCompanyName" class="mr-3 title-span"></span>
            <span runat="server" ID="StatusCovered" class="badge pa-badge active ms-2 rounded-5">
                <i class="fa fa-check-circle"></i>
                Active
            </span>
            <span runat="server" ID="StatusNotCovered" class="badge pa-badge future ms-2 rounded-5">
                <i class="fa fa-minus-circle"></i>
                Future
            </span>
        </div>
    </div>
</div>

<asp:Panel ID="PolicyDetailBox" runat="server" CssClass="row">
    <div class="col-12">
        <asp:Panel ID="GroupBox" CssClass="group" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Group:</span>
                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="GroupLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="DivisionBox" CssClass="division" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Division:</span>
                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="DivisionLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="EmployerNameBox" CssClass="employerName" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Employer:</span>
                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="EmployerNameLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="PlanTypeBox" CssClass="planType" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Plan Type:</span>
                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="PlanTypeLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="SubscriberNumberBox" CssClass="subscriberNumber" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Subscriber #:</span>
                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="SubscriberNumberLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="StartDateBox" CssClass="startDate" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Start Date:</span>
                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="StartDateLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="EndDateBox" CssClass="endDate" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">End Date:</span>

                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="EndDateLbl"></asp:Label>

                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="LimitBox" CssClass="limitBalance" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Family Limit Balance:</span>

                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="LimitLbl"></asp:Label>

                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="DeductBox" CssClass="deductBalance" runat="server">
            <div class="row">
                <div class="col-4 col-sm-6">
                    <span class="labelField">Family Deductible Balance:</span>

                </div>
                <div class="col-8 col-sm-6">
                    <asp:Label runat="server" CssClass="infoField" ID="DeductLbl"></asp:Label>
                </div>
            </div>
        </asp:Panel>
    </div>
</asp:Panel>

<hr>

<div id="PolicyHolderDetail" class="row">
    <div class="col-12">
        <h5>Policy Holder: <asp:Label runat="server" CssClass="individualName" ID="PolicyHolderNameLbl"></asp:Label></h5>
        <asp:Panel runat="server" ID="PolicyHolderRow">
            <asp:Panel CssClass="individualIsCovered" runat="server" ID="PolicyHolderIsCoveredBox">
                <span class="labelField">Status:</span>
                <asp:Label runat="server" CssClass="infoField" ID="PolicyHolderIsCoveredLbl"></asp:Label>
            </asp:Panel>
            <asp:Panel CssClass="individualStartDate" runat="server" ID="PolicyHolderStartDateBox">
                <span class="labelField">Start Date:</span>
                <asp:Label runat="server" CssClass="infoField" ID="PolicyHolderStartDateLbl"></asp:Label>
            </asp:Panel>
            <asp:Panel CssClass="individualEndDate" runat="server" ID="PolicyHolderEndDateBox">
                <span class="labelField">End Date:</span>
                <asp:Label runat="server" CssClass="infoField" ID="PolicyHolderEndDateLbl"></asp:Label>
            </asp:Panel>
            <asp:Panel CssClass="individualLimitBalance" runat="server" ID="PolicyHolderLimitBox">
                <span class="labelField">Limit Balance:</span>
                <asp:Label runat="server" CssClass="infoField" ID="PolicyHolderLimitLbl"></asp:Label>
            </asp:Panel>
            <asp:Panel CssClass="individualDeductBalance" runat="server" ID="PolicyHolderDeductBox">
                <span class="labelField">Deductible Balance:</span>
                <asp:Label runat="server" CssClass="infoField" ID="PolicyHolderDeductLbl"></asp:Label>
            </asp:Panel>

            <hr>

            <asp:Panel runat="server" CssClass="individualSpecificBalance" ID="PolicyHolderSpecificBox">
                <asp:Panel CssClass="SpecificBalanceTitle text-link" runat="server" ID="SpecificBalanceTitle">
                    Specific Limit/Deductible Balances
                    <i class="fa fa-chevron-down"></i>
                    <asp:HiddenField runat="server" ID="SpecificBalanceToogleState" Value="0"/>
                </asp:Panel>
                <asp:Panel runat="server" ID="SpecificBalanceBox" CssClass="SpecificBalanceBox" style="display:none;">
                    <asp:Panel runat="server" ID="SpecificBalanceContent" CssClass="content">
                        <div class="table-responsive mt-4">
                            <table class="table table-hover table-striped table-sm">
                                <thead class="HeaderRow">
                                <tr>
                                    <th>Description</th>
                                    <th>Is Category?</th>
                                    <th title="Changes to the limit/deductible balances for this category (sub-category) will affect the family and patient limit/deductible balances.">Affects Other Balances?</th>
                                    <th>Limit Balance</th>
                                    <th title="The limit balance represents the maximum amount that can be charged for treatments in this category (sub-category) to the patient (Y) or insurance company (N)">Is Patient Max?</th>
                                    <th>Deductible Balance</th>
                                </tr>
                                </thead>
                                <tbody>
                                <asp:Repeater runat="server" ID="SpecificBalanceList" OnItemDataBound="BindSpecificBalanceList">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <asp:Label runat="server" ID="SpecificBalanceDescriptionLbl" CssClass="Description"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="SpecificBalanceIsCategoryLbl" CssClass="IsCategory"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="SpecificBalanceAffectFamilyLbl" CssClass="AffectFamily"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="SpecificBalanceLimitLbl" CssClass="LimitBalance"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="SpecificBalanceLimitOnPtLbl" CssClass="LimitOnPatient"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="SpecificBalanceDeductLbl" CssClass="DeductBalance"></asp:Label>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                                </tbody>
                            </table>
                        </div>
                    </asp:Panel>
                    <asp:Panel runat="server" ID="SpecificBalanceNoItem" CssClass="alert alert-secondary mt-3 text-center" role="alert" Visible="False"></asp:Panel>
                </asp:Panel>
            </asp:Panel>
        </asp:Panel>
    </div>
</div>

<asp:Panel ID="DependentDetail" runat="server">
    <hr>
    <div class="row">
        <div class="col-12">
            <h5>Dependents</h5>
            <asp:Repeater runat="server" ID="InsuranceUserList" OnItemDataBound="BindPolicyUserList">
                <ItemTemplate>
                    <asp:HiddenField runat="server" ID="PatientId"/>
                    <asp:Panel runat="server" ID="ItemRow">
                        <asp:Label runat="server" CssClass="individualName" ID="DependentNameLbl"></asp:Label>
                        <asp:Panel CssClass="individualRelation" runat="server" ID="DependentRelationBox">
                            <span class="labelField">Relation:</span>
                            <asp:Label runat="server" CssClass="infoField" ID="DependentRelationLbl"></asp:Label>
                        </asp:Panel>
                        <asp:Panel CssClass="individualIsCovered" runat="server" ID="DependentIsCoveredBox">
                            <span class="labelField">Status:</span>
                            <asp:Label runat="server" CssClass="infoField" ID="DependentIsCoveredLbl"></asp:Label>
                        </asp:Panel>
                        <asp:Panel CssClass="individualStartDate" runat="server" ID="DependentStartDateBox">
                            <span class="labelField">Start Date:</span>
                            <asp:Label runat="server" CssClass="infoField" ID="DependentStartDateLbl"></asp:Label>
                        </asp:Panel>
                        <asp:Panel CssClass="individualEndDate" runat="server" ID="DependentEndDateBox">
                            <span class="labelField">End Date:</span>
                            <asp:Label runat="server" CssClass="infoField" ID="DependentEndDateLbl"></asp:Label>
                        </asp:Panel>
                        <asp:Panel CssClass="individualLimitBalance" runat="server" ID="DependentLimitBox">
                            <span class="labelField">Limit Balance:</span>
                            <asp:Label runat="server" CssClass="infoField" ID="DependentLimitLbl"></asp:Label>
                        </asp:Panel>
                        <asp:Panel CssClass="individualDeductBalance" runat="server" ID="DependentDeductBox">
                            <span class="labelField">Deductible Balance:</span>
                            <asp:Label runat="server" CssClass="infoField" ID="DependentDeductLbl"></asp:Label>
                        </asp:Panel>

                        <asp:Panel runat="server" CssClass="individualSpecificBalance" ID="DependentSpecificBox">
                            <hr>
                            <asp:Panel CssClass="SpecificBalanceTitle text-link" runat="server" ID="SpecificBalanceTitle">
                                Specific Limit/Deductible Balances
                                <i class="fa fa-chevron-down"></i>
                                <asp:HiddenField runat="server" ID="SpecificBalanceToogleState" Value="0"/>
                            </asp:Panel>
                            <asp:Panel runat="server" ID="SpecificBalanceBox">
                                <asp:Panel runat="server" ID="SpecificBalanceContent" CssClass="content">
                                    <div class="table-responsive mt-4">
                                        <table class="table table-hover table-striped table-sm">
                                            <thead class="HeaderRow">
                                            <tr>
                                                <th>Description</th>
                                                <th>Is Category?</th>
                                                <th title="Changes to the limit/deductible balances for this category (sub-category) will affect the family and patient limit/deductible balances.">Affects Other Balances?</th>
                                                <th>Limit Balance</th>
                                                <th title="The limit balance represents the maximum amount that can be charged for treatments in this category (sub-category) to the patient (Y) or insurance company (N)">Is Patient Max?</th>
                                                <th>Deductible Balance</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <asp:Repeater runat="server" ID="SpecificBalanceList" OnItemDataBound="BindSpecificBalanceList">
                                                <ItemTemplate>
                                                    <tr>
                                                        <td>
                                                            <asp:Label runat="server" ID="SpecificBalanceDescriptionLbl" CssClass="Description"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label runat="server" ID="SpecificBalanceIsCategoryLbl" CssClass="IsCategory"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label runat="server" ID="SpecificBalanceAffectFamilyLbl" CssClass="AffectFamily"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label runat="server" ID="SpecificBalanceLimitLbl" CssClass="LimitBalance"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label runat="server" ID="SpecificBalanceLimitOnPtLbl" CssClass="LimitOnPatient"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:Label runat="server" ID="SpecificBalanceDeductLbl" CssClass="DeductBalance"></asp:Label>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                            </tbody>
                                        </table>
                                    </div>
                                </asp:Panel>
                                <asp:Panel runat="server" ID="SpecificBalanceNoItem" CssClass="alert alert-secondary mt-3 text-center" role="alert" Visible="False"></asp:Panel>
                            </asp:Panel>
                        </asp:Panel>
                        <axi:MarkIncorrectCorrectButton Visible="False" ID="DependentMarkIncorrectCorrectPanel" HasSpinner="true" runat="server"/>
                    </asp:Panel>
                </ItemTemplate>
            </asp:Repeater>
        </div>
    </div>
</asp:Panel>
</div>
<axi:MarkIncorrectCorrectButton Visible="False" ID="PolicyHolderMarkIncorrectCorrectPanel" HasSpinner="true" runat="server"/>

</form>
<axi:Copyright ID="Copyright" runat="server" />
</asp:Content>

<asp:Content ID="ScriptsContent" ContentPlaceHolderID="Scripts" runat="server">
    <script src="../Includes/Scripts/PA2.0/InsuranceDetail.js" type="text/javascript"></script>
    <axi:Notification ID="Notification" runat="server"/>
</asp:Content>