<%@ page title="PatientVisitEntry" language="C#" masterpagefile="~/Owner/Owner.master" autoeventwireup="true" inherits="Owner_PatientVisitEntry, App_Web_lji1fwdy" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="PagePanel" runat="server" ChildrenAsTriggers="true">
        <ContentTemplate>
            <div class="main-content container-fluid" id="home">
                <div class="page-title">
                    <h3>Patient Visit</h3>
                </div>
                <section class="section">
                    <div class="row bspace">
                        <div class="col-md-12">
                            <div class="divider">
                                <div class="divider-text">Patient Visit Details</div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2">
                                    <label class="label">Visit Date</label>
                                    <asp:TextBox ID="txtVisitDate" runat="server" CssClass="form-control" TextMode="Date" placeholder="Visit Date" required AutoComplete="off"></asp:TextBox>
                                </div>
                                <div class="col-md-4">
                                    <label class="label">Owner Name</label>
                                    <asp:TextBox ID="txtOwnerName" runat="server" CssClass="form-control" placeholder="Owner Name" required AutoComplete="off"></asp:TextBox>                                 
                                    <asp:Label ID="lblOwnerID" runat="server" Visible="false"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <label class="label">Patient Name</label>
                                    <asp:TextBox ID="txtPatientName" runat="server" CssClass="form-control" AutoPostBack="true" OnTextChanged="txtPatientName_TextChanged" placeholder="Patient Name" required AutoComplete="off"></asp:TextBox>
                                    <cc1:AutoCompleteExtender ID="txtPatientName_AutoCompleteExtender" runat="server" BehaviorID="txtPatientName_AutoCompleteExtender" CompletionListCssClass="completionList" CompletionListHighlightedItemCssClass="itemHighlighted" CompletionListItemCssClass="listItem" DelimiterCharacters="" ServicePath="AutoComplete.asmx" ServiceMethod="GetPatientName" TargetControlID="txtPatientName">
                                    </cc1:AutoCompleteExtender>
                                </div>
                                <div class="col-md-3">
                                    <label class="label">Complaint </label>
                                    <asp:TextBox ID="txtComplaint" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Complaint" required AutoComplete="off"></asp:TextBox>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-6">
                                    <label class="label">Doctor Name</label>
                                    <asp:CheckBoxList ID="ddlDoctor" runat="server" CssClass="form-group" AppendDataBoundItems="true" SelectionMode="Multiple" RepeatColumns="3" Font-Size="Small">
                                        <%--    <asp:ListItem Text="Select" Value="0" Selected="True"></asp:ListItem>--%>
                                    </asp:CheckBoxList>
                                </div>
                                <div class="col-md-6">
                                    <label class="label">Department </label>
                                    <asp:CheckBoxList ID="ChkDepartment" runat="server" ClientIDMode="Static" SelectionMode="Multiple" AppendDataBoundItems="true" CssClass="form-group" RepeatColumns="3" Font-Size="Small">
                                    </asp:CheckBoxList>
                                </div>
                            </div>
                            <div class="row" id="VisitDetails" runat="server" visible="false">
                                <div class="row">
                                    <div class="col-md-4">
                                        <label class="label">Diagnosis </label>
                                        <asp:TextBox ID="txtDiag" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Diagnosis" AutoComplete="off"></asp:TextBox>
                                    </div>
                                    <div class="col-md-4">
                                        <label class="label">Notes </label>
                                        <asp:TextBox ID="txtNotes" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Notes" AutoComplete="off"></asp:TextBox>
                                    </div>
                                    <div class="col-md-4">
                                        <label class="label">Phy. Examination </label>
                                        <asp:TextBox ID="txtPhyExam" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Phy. Examination " AutoComplete="off"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="row">

                                    <div class="col-md-4">
                                        <label class="label">Treatment </label>
                                        <asp:TextBox ID="txtTreatment" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Treatment" AutoComplete="off"></asp:TextBox>
                                    </div>
                                    <div class="col-md-4">
                                        <label class="label">Advice </label>
                                        <asp:TextBox ID="txtAdvice" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Advice" AutoComplete="off"></asp:TextBox>
                                    </div>
                                    <div class="col-md-4">
                                        <label class="label">Follow Up Date </label>
                                        <asp:TextBox ID="txtFollowUpDate" runat="server" CssClass="form-control" TextMode="Date" placeholder="Follow Up Date" AutoComplete="off"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                                <asp:Label ID="lblID" runat="server" Visible="false"></asp:Label>
                                <asp:Label ID="lblPatientID" runat="server" Visible="false"></asp:Label>
                                <asp:Label ID="lblUserID" runat="server" Visible="false"></asp:Label>
                                <asp:Label ID="lblMsg" runat="server" ForeColor="Green"></asp:Label>
                            </div>
                            <div class="row bspace">
                                <div class="col-md-6 float-md-right">
                                    <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn btn-primary" OnClick="btnSave_Click" OnClientClick="SetUserName()" />
                                    <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="btn btn-primary" OnClick="btnReset_Click" />
                                </div>
                            </div>
                        </div>
                        <%-- <div class="col-md-4">
                            <div class="divider">
                                <div class="divider-text">
                                Today's Patient Visit List
                                </div>
                            </div>
                            <div class="row">
                            </div>
                        </div>--%>
                    </div>
                </section>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script type="text/javascript">
        function SplitOwnerName() {
            var testName = $("#home").find('#<%=txtOwnerName.ClientID %>').val();
            if (String(testName).includes("#")) {
                var total = testName.split("#");
                for (var i = 0; i < total.length; i++) {
                    if (i == 0) {
                        var userName = total[0];
                        '<%Session["OwnerID"] = "' + userName + '"; %>';
                    }
                    if (i == 1) {
                        $("#home").find('#<%=txtOwnerName.ClientID %>').val("");
                        $("#home").find('#<%=txtOwnerName.ClientID %>').val(total[1]);
                    }
                }
            }
        }
    </script>--%>
</asp:Content>

