<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="~/PatientAccess/Users/InsuranceDetailOldVersion.aspx.cs" Inherits="Axium.Web.Users.InsuranceDetailOldVersion" %>

<!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></title>
    <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 type="text/javascript">
        function clickMarkCorrect(targetId, policyUserId) {
            updatePolicyUserId(targetId, policyUserId);
            var btn = document.getElementById("MarkCorrect");
            if (btn != null)
                $(btn).trigger('click');	// AX-24898.24919.2 btn.click();
        }
        function clickMarkIncorrect(targetId, policyUserId) {
            updatePolicyUserId(targetId, policyUserId);
            var btn = document.getElementById("MarkIncorrect");
            if (btn != null)
                $(btn).trigger('click');	// AX-24898.24919.2 btn.click();
        }
        function updatePolicyUserId(targetId, policyUserId) {
            var elmt = document.getElementById(targetId);
            if (elmt != null)
                elmt.value = policyUserId;
        }
        function toogleSpecificBalance(buttonId, contentId, toogleStateId) {
            //check if content needs to be shown/hidden
            if ($('#' + contentId).is(":visible")) {
                $('#' + contentId).hide(300, function () {
                    resizeWindow(true);
                });
                $('#' + toogleStateId).val(0);
                $('#' + buttonId).attr('title', 'Show Details');
                $('#' + buttonId).removeClass('Collapse');
                $('#' + buttonId).addClass('Expend');
            } else {
                $('#' + contentId).show(300, function () {
                    resizeWindow(true);
                });
                $('#' + toogleStateId).val(1);
                $('#' + buttonId).attr('title', 'Hide Details');
                $('#' + buttonId).removeClass('Expend');
                $('#' + buttonId).addClass('Collapse');
            }
        }
        function resizeWindow(animate) {
            var $childHeight = jQuery('#PolicyInformation').outerHeight();
            if (animate)
                jQuery('#insuranceIframeId', window.parent.document).animate({ 'height': $childHeight }, 300);
            else
                jQuery('#insuranceIframeId', window.parent.document).css({ 'height': $childHeight });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:HiddenField runat="server" ID="PolicyUserIdField" />
        <asp:Button ID="MarkCorrect" OnClick="MarkCorrectBtnClick" runat="server" style="visibility: hidden; position: absolute; " />
        <asp:Button ID="MarkIncorrect" OnClick="MarkIncorrectBtnClick" runat="server" style="visibility: hidden; position: absolute; " />

        <div id="PolicyInformation">
            <h1>Insurance Policy Details</h1>
            <div class="metaInfo metaInfoTitles">
                <asp:Label runat="server" ID="InsuranceCompanyName" CssClass="insuranceCompanyName"></asp:Label>
                <span class="history"><a href="~/PatientAccess/Users/InsuranceListOldVersion.aspx" id="BackLink" runat="server">Back</a></span>
            </div>
            
            <asp:Literal ID="Notifications" runat="server" Visible="false" EnableViewState="false" />
            
            <div class="confirmStatusBox">
                <asp:Label runat="server" ID="StatusCovered" CssClass="covered">ACTIVE</asp:Label>
                <asp:Label runat="server" ID="StatusNotCovered" CssClass="notCovered">FUTURE</asp:Label>
            </div>

            <asp:Panel ID="PolicyDetailBox" runat="server" CssClass="policyDetail">
                <asp:Panel ID="GroupBox" CssClass="group" runat="server">
                    <span class="labelField">Group:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="GroupLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="DivisionBox" CssClass="division" runat="server" >
                    <span class="labelField">Division:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="DivisionLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="EmployerNameBox" CssClass="employerName" runat="server">
                    <span class="labelField">Employer:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="EmployerNameLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="PlanTypeBox" CssClass="planType" runat="server">
                    <span class="labelField">Plan Type:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="PlanTypeLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="SubscriberNumberBox" CssClass="subscriberNumber" runat="server" >
                    <span class="labelField">Subscriber #:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="SubscriberNumberLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="StartDateBox" CssClass="startDate" runat="server" >
                    <span class="labelField">Start Date:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="StartDateLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="EndDateBox" CssClass="endDate" runat="server">
                    <span class="labelField">End Date:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="EndDateLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="LimitBox" CssClass="limitBalance" runat="server">
                    <span class="labelField">Family Limit Balance:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="LimitLbl"></asp:Label>
                </asp:Panel>
                <asp:Panel ID="DeductBox" CssClass="deductBalance" runat="server">
                    <span class="labelField">Family Deductible Balance:</span>
                    <asp:Label runat="server" CssClass="infoField" ID="DeductLbl"></asp:Label>
                </asp:Panel>
            </asp:Panel>
            
            <div id="PolicyHolderDetail">
                <h2>Policy Holder</h2>
                <asp:Panel runat="server" ID="PolicyHolderRow" CssClass="row">
                    <asp:Label runat="server" CssClass="individualName" ID="PolicyHolderNameLbl"></asp:Label>
                    <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>
                    
                    <asp:Panel runat="server" CssClass="individualSpecificBalance" ID="PolicyHolderSpecificBox">
                        <asp:Panel CssClass="SpecificBalanceTitle" runat="server" ID="SpecificBalanceTitle" >
                            Specific Limit/Deductible Balances
                            <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">
                                <asp:Panel runat="server" ID="SpecificBalanceHeaderRow" CssClass="HeaderRow">
                                    <asp:Label runat="server" ID="Description" CssClass="Description">Description</asp:Label>
                                    <asp:Label runat="server" ID="IsCategory" CssClass="IsCategory">Is Category?</asp:Label>
                                    <asp:Label runat="server" ID="AffectFamily" CssClass="AffectFamily" title="Changes to the limit/deductible balances for this category (sub-category) will affect the family and patient limit/deductible balances.">Affects Other Balances?</asp:Label>
                                    <asp:Label runat="server" ID="LimitHeader" CssClass="LimitBalance">Limit Balance</asp:Label>
                                    <asp:Label runat="server" ID="LimitOnPtHeader" CssClass="LimitOnPatient" 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?</asp:Label>
                                    <asp:Label runat="server" ID="DeductHeader" CssClass="DeductBalance">Deductible Balance</asp:Label>
                                </asp:Panel>
                                <asp:Repeater runat="server" ID="SpecificBalanceList" OnItemDataBound="BindSpecificBalanceList">
                                    <ItemTemplate>
                                        <asp:Panel runat="server" ID="SpecificBalanceRow" CssClass="Row">
                                            <asp:Label runat="server" ID="SpecificBalanceDescriptionLbl" CssClass="Description"></asp:Label>
                                            <asp:Label runat="server" ID="SpecificBalanceIsCategoryLbl" CssClass="IsCategory"></asp:Label>
                                            <asp:Label runat="server" ID="SpecificBalanceAffectFamilyLbl" CssClass="AffectFamily"></asp:Label>
                                            <asp:Label runat="server" ID="SpecificBalanceLimitLbl" CssClass="LimitBalance"></asp:Label>
                                            <asp:Label runat="server" ID="SpecificBalanceLimitOnPtLbl" CssClass="LimitOnPatient"></asp:Label>
                                            <asp:Label runat="server" ID="SpecificBalanceDeductLbl" CssClass="DeductBalance"></asp:Label>
                                        </asp:Panel>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </asp:Panel>
                            <asp:Panel runat="server" ID="SpecificBalanceNoItem" CssClass="noItem" Visible="False"></asp:Panel>
                        </asp:Panel>
                    </asp:Panel>
                    
                    <asp:Panel runat="server" ID="PolicyHolderMarkCorrectBox" Visible="False" CssClass="invalidInfo">
                        <asp:Button runat="server" ID="MarkCorrectButton" CssClass="button" />
                        <asp:Label runat="server" ID="MarkCorrectMsg"></asp:Label>
                    </asp:Panel>
                    
                    <asp:Panel runat="server" ID="PolicyHolderMarkIncorrectBox" Visible="False" CssClass="validInfo">
                        <asp:Button runat="server" ID="MarkIncorrectButton" CssClass="button" />
                        <asp:Label runat="server" ID="MarkIncorrectMsg"></asp:Label>
                    </asp:Panel>
                </asp:Panel>
            </div>
            
            <asp:Panel ID="DependentDetail" runat="server" >
                <h2>Dependents</h2>
                <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">
                                <asp:Panel CssClass="SpecificBalanceTitle" runat="server" ID="SpecificBalanceTitle" >
                                    Specific Limit/Deductible Balances
                                    <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">
                                        <asp:Panel runat="server" ID="SpecificBalanceHeaderRow" CssClass="HeaderRow">
                                            <asp:Label runat="server" ID="Description" CssClass="Description">Description</asp:Label>
                                            <asp:Label runat="server" ID="IsCategory" CssClass="IsCategory">Is Category?</asp:Label>
                                            <asp:Label runat="server" ID="AffectFamily" CssClass="AffectFamily" title="Changes to the limit/deductible balances for this category (sub-category) will affect the family and patient limit/deductible balances.">Affects Other Balances?</asp:Label>
                                            <asp:Label runat="server" ID="LimitHeader" CssClass="LimitBalance">Limit Balance</asp:Label>
                                            <asp:Label runat="server" ID="LimitOnPtHeader" CssClass="LimitOnPatient" 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?</asp:Label>
                                            <asp:Label runat="server" ID="DeductHeader" CssClass="DeductBalance">Deductible Balance</asp:Label>
                                        </asp:Panel>
                                        <asp:Repeater runat="server" ID="SpecificBalanceList" OnItemDataBound="BindSpecificBalanceList">
                                            <ItemTemplate>
                                                <asp:Panel runat="server" ID="SpecificBalanceRow" CssClass="Row">
                                                    <asp:Label runat="server" ID="SpecificBalanceDescriptionLbl" CssClass="Description"></asp:Label>
                                                    <asp:Label runat="server" ID="SpecificBalanceIsCategoryLbl" CssClass="IsCategory"></asp:Label>
                                                    <asp:Label runat="server" ID="SpecificBalanceAffectFamilyLbl" CssClass="AffectFamily"></asp:Label>
                                                    <asp:Label runat="server" ID="SpecificBalanceLimitLbl" CssClass="LimitBalance"></asp:Label>
                                                    <asp:Label runat="server" ID="SpecificBalanceLimitOnPtLbl" CssClass="LimitOnPatient"></asp:Label>
                                                    <asp:Label runat="server" ID="SpecificBalanceDeductLbl" CssClass="DeductBalance"></asp:Label>
                                                </asp:Panel>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </asp:Panel>
                                    <asp:Panel runat="server" ID="SpecificBalanceNoItem" CssClass="noItem" Visible="False"></asp:Panel>
                                </asp:Panel>
                            </asp:Panel>
                        
                            <asp:Panel runat="server" ID="DependentMarkCorrectBox" Visible="False" CssClass="invalidInfo">
                                <asp:Button runat="server" ID="MarkCorrectButton" CssClass="button" />
                                <asp:Label runat="server" ID="MarkCorrectMsg"></asp:Label>
                            </asp:Panel>
                    
                            <asp:Panel runat="server" ID="DependentMarkIncorrectBox" Visible="False" CssClass="validInfo">
                                <asp:Button runat="server" ID="MarkIncorrectButton" CssClass="button" />
                                <asp:Label runat="server" ID="MarkIncorrectMsg"></asp:Label>
                            </asp:Panel>
                        </asp:Panel>
                    </ItemTemplate>
                </asp:Repeater>
            </asp:Panel>
        </div>
    </form>
    <script type="text/javascript">
        jQuery(document).ready(function () {
            resizeWindow(false);
        });         
    </script>
</body>
</html>
