<%@ page title="Animal Medicine" language="C#" masterpagefile="~/DoctorMasterPage.master" autoeventwireup="true" inherits="MedicineForm, App_Web_fzfkhksa" %>

<%@ 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">
                <div class="page-title">
                    <div class="row form-group">
                        <div class="col-md-6">
                            <h3>Animal Medicine</h3>
                        </div>
                        <div class="col-md-3" style="display: none">
                            <label class="label">Language</label>
                            <asp:DropDownList ID="ddlLanguage" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Hindi" Value="hi"></asp:ListItem>
                                <asp:ListItem Text="Kannada" Value="kn"></asp:ListItem>
                                <asp:ListItem Text="Marathi" Value="mr"></asp:ListItem>
                                <asp:ListItem Text="Telugu" Value="te"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>

                </div>
                <section class="section">
                    <div class="divider">
                        <div class="divider-text">Animal Medicine Details</div>
                    </div>
                    <div id="Panel" runat="server">
                        <div class="row form-group" style="pointer-events: none">
                            <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-3">
                                <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" placeholder="Patient Name" required AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Gender</label>
                                <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-select">
                                    <asp:ListItem Text="Male"></asp:ListItem>
                                    <asp:ListItem Text="Female"></asp:ListItem>
                                    <asp:ListItem Text="Neutered Male"></asp:ListItem>
                                    <asp:ListItem Text="Neutered Female"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Animal Type</label>
                                <asp:DropDownList ID="ddlAnimalType" runat="server" Enabled="false" CssClass="form-select" AutoPostBack="true" OnSelectedIndexChanged="ddlAnimalType_SelectedIndexChanged">
                                    <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem>
                                    <asp:ListItem Text="Large" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="Small" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="Equine" Value="3"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="row bspace form-group">
                            <div class="col-md-8" style="pointer-events: none">
                                <div class="row">
                                    <div class="col-md-4">
                                        <label class="label">Species</label>
                                        <asp:DropDownList ID="ddlSpeciesType" runat="server" CssClass="form-select" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="ddlSpeciesType_SelectedIndexChanged">
                                            <asp:ListItem Selected="True" Value="0" Text="Select"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                    <div class="col-md-4">
                                        <label class="label">Breed</label>
                                        <asp:DropDownList ID="ddlBreed" runat="server" CssClass="form-select" AppendDataBoundItems="true">
                                            <asp:ListItem Selected="True" Value="0" Text="Select"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                    <div class="col-md-2">
                                        <label class="label">Age</label>
                                        <asp:TextBox ID="txtAge" runat="server" CssClass="form-control" placeholder="Age"></asp:TextBox>
                                    </div>
                                    <div class="col-md-2">
                                        <label class="label">Weight</label>
                                        <asp:TextBox ID="txtWeight" runat="server" CssClass="form-control" placeholder="Weight"></asp:TextBox>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Allergies</label>
                                <asp:TextBox ID="txtAllergies" runat="server" TextMode="MultiLine" CssClass="form-control" placeholder="Allergies"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row bspace form-group">
                            <div class="col-md-6">
                                <label class="label">Primary Complaint </label>
                                <asp:TextBox ID="txtComplaint" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Complaint" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-6">
                                <label class="label">Past Treatment </label>
                                <asp:TextBox ID="txtPastTreatment" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Past Treatment" AutoComplete="off"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row bspace form-group">
                            <div class="col-md-4">
                                <label class="label">Food Intake</label>
                                <asp:TextBox ID="txtFoodOtherSign" runat="server" CssClass="form-control" list="FoodOtherSign">                                  
                                </asp:TextBox>
                                <datalist id="FoodOtherSign">
                                    <option value="Normal"></option>
                                    <option value="Reduced"></option>
                                    <option value="Absent"></option>
                                </datalist>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Water Intake</label>
                                <asp:TextBox ID="ddlWaterIntake" runat="server" CssClass="form-control" list="WaterIntakeList">                                  
                                </asp:TextBox>
                                <datalist id="WaterIntakeList">
                                    <option value="Normal"></option>
                                    <option value="Reduced"></option>
                                    <option value="Absent"></option>
                                </datalist>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Defecation</label>
                                <asp:TextBox list="DefecationList" ID="ddlDefecation" runat="server" CssClass="form-control">                                  
                                </asp:TextBox>
                                <datalist id="DefecationList">
                                    <option value="Normal"></option>
                                    <option value="Reduced"></option>
                                    <option value="Absent"></option>
                                </datalist>
                            </div>
                            <div class="col-md-2">
                                <label class="label">Urination</label>
                                <asp:TextBox ID="ddlUrination" runat="server" CssClass="form-control" list="UrinationList">                                  
                                </asp:TextBox>
                                <datalist id="UrinationList">
                                    <option value="Normal"></option>
                                    <option value="Reduced"></option>
                                    <option value="Absent"></option>
                                </datalist>
                            </div>
                        </div>
                        <div class="row bspace form-group" style="height: 250px">
                            <div class="col-md-4">
                                <label class="label">Feeding Pattern</label>
                                <asp:TextBox ID="txtFeedingPattern" runat="server" CssClass="form-control" TextMode="MultiLine" Style="height: 190px"></asp:TextBox>
                            </div>

                            <div class="col-md-4">
                                <label class="label">Defecation Details</label>
                                <asp:TextBox ID="txtDefecation" runat="server" CssClass="form-control" TextMode="MultiLine" Style="height: 190px"></asp:TextBox>
                            </div>
                            <div class="col-md-4">
                                <label class="label">Urination Details</label>
                                <asp:TextBox ID="txtUrinationDetails" runat="server" CssClass="form-control" TextMode="MultiLine" Style="height: 190px"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row bspace form-group">
                            <div class="col-md-2">
                                <div class="row bspace form-group">
                                    <label class="label">Vaccination</label>
                                    <asp:TextBox ID="ddlVaccination" runat="server" CssClass="form-select" list="VaccinationList">                                       
                                    </asp:TextBox>
                                    <datalist id="VaccinationList">
                                        <option value="Updated"></option>
                                        <option value="Due"></option>
                                    </datalist>
                                </div>
                                <div class="row bspace form-group">
                                    <label class="label">Deworming</label>
                                    <asp:TextBox ID="ddlDeworming" runat="server" CssClass="form-select" list="DewormingList">                                        
                                    </asp:TextBox>
                                    <datalist id="DewormingList">
                                        <option value="Updated"></option>
                                        <option value="Due"></option>
                                    </datalist>
                                </div>
                                <div class="row bspace form-group">
                                    <asp:Button runat="server" ID="btnShow" CssClass="btn btn-primary btn-block" Text="Add" CausesValidation="false" UseSubmitBehavior="false" OnClick="btnShow_Click" />
                                </div>
                            </div>
                            <div class="col-md-5">
                                <label class="label">Physical Examination Details</label>
                                <asp:TextBox ID="txtPhyExamination" runat="server" CssClass="form-control" TextMode="MultiLine" Style="height: 190px"></asp:TextBox>
                            </div>
                            <div class="col-md-5" style="overflow: scroll">
                                <label class="label">Body Examination Details</label>
                                <asp:TextBox ID="txtBodyPartDetails" runat="server" CssClass="form-control" TextMode="MultiLine" Style="height: 190px"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row form-group" runat="server" visible="false" id="PhyExamination">
                            <table class="table table-hover table-responsive">
                                <thead>
                                    <tr style="height: 15px">
                                        <th>Phy. Examination</th>
                                        <th>Details</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="RepeaterPhyExam" runat="server" OnItemDataBound="RepeaterPhyExam_ItemDataBound">
                                        <ItemTemplate>
                                            <tr style="height: 15px">
                                                <td>
                                                    <asp:Label ID="lblPhyExamination" runat="server" Text='<%# Eval("PhyExamination") %>'></asp:Label></td>
                                                <td>
                                                    <asp:Label ID="lblPhyExamID" runat="server" Text='<%# Eval("PhyExamID") %>' Visible="false"></asp:Label>
                                                    <asp:Label ID="lblDetails" runat="server" Text='<%# Eval("Details") %>' Visible="false"></asp:Label>
                                                    <%--    <asp:TextBox ID="ddlDetails" runat="server" list="DetailsList" CssClass="form-select"></asp:TextBox>
                                               <datalist id="DetailsList">
                                                        <asp:Repeater ID="repeatList" runat="server">
                                                            <ItemTemplate>
                                                                <option value='<%# Eval("Text") %>' itemid='<%# Eval("Value") %>'></option>
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                    </datalist>--%>
                                                    <asp:DropDownList ID="ddlDetails" runat="server" CssClass="form-select">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </tbody>
                            </table>
                            <asp:Button CssClass="btn btn-primary" Text="Close" runat="server" ID="btnClose" OnClick="btnClose_Click" CausesValidation="false" UseSubmitBehavior="false"></asp:Button>
                        </div>
                        <div class="row bspace" id="Large" runat="server" visible="false">
                            <div class="row form-group bspace">
                                <div class="col-md-3">
                                    <label class="label">Milk Yeild</label>
                                    <asp:TextBox ID="txtMilkYeild" runat="server" CssClass="form-control" placeholder="Milk Yeild" AutoComplete="off"></asp:TextBox>
                                </div>
                                <div class="col-md-3">
                                    <label class="label">Stage of Lact/Preg</label>
                                    <asp:TextBox ID="txtStage" runat="server" CssClass="form-control" placeholder="Stage of Lact/Preg" AutoComplete="off"></asp:TextBox>
                                </div>
                                <div class="col-md-3">
                                    <label class="label">No. Of Pregnancy</label>
                                    <asp:TextBox ID="txtNoPreg" runat="server" CssClass="form-control" placeholder="No. Of Pregnancy" AutoComplete="off"></asp:TextBox>
                                </div>
                                <div class="col-md-3">
                                    <label class="label">Rumination</label>
                                    <asp:TextBox ID="ddlRumination" runat="server" CssClass="form-select" list="RuminationList">                                       
                                    </asp:TextBox>
                                    <datalist id="RuminationList">
                                        <option value="Present"></option>
                                        <option value="Absent"></option>
                                    </datalist>
                                </div>
                            </div>

                        </div>
                        <div class="row bspace form-group" runat="server" visible="false" id="Equine">
                            <div class="row bspace form-group">
                                <div class="col-md-6">
                                    <label class="label">Change In Diet</label>
                                    <asp:TextBox ID="txtChangeInDiet" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Change In Diet" AutoComplete="off"></asp:TextBox>
                                </div>
                                <div class="col-md-6">
                                    <label class="label">When was Last Time Similar Symptoms observed</label>
                                    <asp:TextBox ID="txtLastTimeSimilarSymptoms" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Last Time Similar Symptoms observed" AutoComplete="off"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="row bspace form-group">
                            <div class="col-md-3">
                                <label class="label">Other Symptoms</label>
                                <asp:TextBox ID="txtOtherSymp" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Other Symptoms" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3">
                                <label class="label">Miscellaneous</label>
                                <asp:TextBox ID="txtMisc" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Miscellaneous" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3">
                                <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-3">
                                <label class="label">Advice </label>
                                <asp:TextBox ID="txtAdvice" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Advice" AutoComplete="off"></asp:TextBox>
                            </div>
                        </div>
                        <div class="row bspace form-group">
                            <div class="col-md-3">
                                <label class="label">Assesment </label>
                                <asp:TextBox ID="txtAssesment" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Assesment" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3">
                                <label class="label">Tentative Diag </label>
                                <asp:TextBox ID="txtTentativeDiag" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Tentative Diag" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-3 group">
                                <label class="label">Lab Examinations </label>
                                <asp:CheckBoxList ID="chkLabExam" runat="server" RepeatColumns="2" CssClass="form-group"></asp:CheckBoxList>
                            </div>
                            <div class="col-md-3">
                                <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 class="row bspace form-group" style="display: none">
                            <div class="col-md-6">
                                <label class="label">Charges</label>
                                <asp:TextBox ID="txtCharges" runat="server" CssClass="form-control" placeholder="Charges" AutoComplete="off"></asp:TextBox>
                            </div>
                            <div class="col-md-6">
                                <label class="label">Total Bill</label>
                                <asp:TextBox ID="txtTotalBill" runat="server" CssClass="form-control" placeholder="Total Bill" AutoComplete="off"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <asp:GridView ID="GridPatientImages" runat="server" AutoGenerateColumns="False" CssClass="table table-responsive">
                            <Columns>
                                <asp:BoundField DataField="SrNo" HeaderText="SrNo" />
                                <asp:BoundField DataField="ImageID" HeaderText="ImageID" SortExpression="ImageID" HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass="hideGridColumn" />
                                <asp:BoundField DataField="PatientID" HeaderText="PatientID" SortExpression="PatientID" HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass="hideGridColumn" />
                                <asp:BoundField DataField="ImageName" HeaderText="ImageName" SortExpression="ImageName" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkPath" runat="server"
                                            OnClick="lnkPath_Click" CommandArgument='<%# Eval("ImgPath") %>' Text="Open"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>                               
                            </Columns>
                        </asp:GridView>
                    </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="lblVisitID" 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>
                        <asp:Label ID="lblDepartment" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblDepartmentID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblVisitStatus" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblDocID" runat="server" Visible="false"></asp:Label>
                        <asp:Label ID="lblVisitedDepart" runat="server" Visible="false"></asp:Label>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-4">
                            <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btn btn-primary btn-block" OnClick="btnSave_Click" />
                        </div>
                        <div class="col-md-4">
                            <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="btn btn-primary btn-block" OnClick="btnReset_Click" CausesValidation="false" UseSubmitBehavior="false" />
                        </div>
                        <div class="col-md-4">
                            <%--  <input type="button" value="Print" onclick="print_current_page()" class="btn btn-primary btn-block" />--%>
                            <asp:Button ID="btnPrint" runat="server" CssClass="btn btn-primary btn-block" Text="Print" OnClick="btnPrint_Click" Visible="false" />
                            <asp:Button runat="server" ID="btnAppointment" CssClass="btn btn-primary btn-block" Text="Show" Visible="false" CausesValidation="false" UseSubmitBehavior="false" OnClick="btnAppointment_Click" />
                        </div>
                    </div>
                </section>
            </div>

            <asp:HiddenField ID="HiddenField1" runat="server" />
            <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
                BackgroundCssClass="modal fade" OkControlID="btnAppointmentPanel"
                PopupControlID="AppointmentPanel" TargetControlID="HiddenField1">
            </cc1:ModalPopupExtender>
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg"
                role="document" runat="server" id="AppointmentPanel" visible="false">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalCenterTitle">Patient Appointment</h5>
                    </div>
                    <div class="modal-body">
                        <div class="row" id="table-hover-row">
                            <div class="col-12">
                                <div class="card">
                                    <div class="card-content">

                                        <table class="table table-hover table-responsive">
                                            <thead>
                                                <tr>
                                                    <%--    <th>VisitID</th>--%>
                                                    <th>VisitDate</th>
                                                    <th>Complaint</th>
                                                    <th>Treatment</th>
                                                    <th>FollowUp</th>
                                                    <%-- <td>Department Name</td>--%>
                                                    <th>ACTION</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <asp:Repeater ID="RepeaterPatientVisit" runat="server">
                                                    <ItemTemplate>
                                                        <tr>
                                                            <%--     <td class="text-bold-500"><%# Esval("VisitID") %></td>--%>
                                                            <td><%# Eval("VisitDates") %></td>
                                                            <td class="text-bold-500"><%# Eval("Complaint") %></td>
                                                            <td><%# Eval("Treatment") %></td>
                                                            <td><%# Eval("FollowUps") %></td>
                                                            <td>
                                                                <div class="dropdown">
                                                                    <a class="btn btn-link font-24 p-0 line-height-1 no-arrow dropdown-toggle" href="#" role="button" data-toggle="dropdown">
                                                                        <i class="dw dw-more"></i>
                                                                    </a>
                                                                    <div class="dropdown-menu dropdown-menu-right dropdown-menu-icon-list">
                                                                        <asp:Button CssClass="dropdown-item" CausesValidation="false" UseSubmitBehavior="false" runat="server" ID="View" Text="View" OnClick="View_Click" CommandArgument='<%# Eval("MedicineEntryID") %>' />
                                                                    </div>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </tbody>
                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <asp:Button CssClass="btn btn-light-secondary" Text="Close" runat="server" ID="btnAppointmentPanelClose" OnClick="btnAppointmentPanelClose_Click" CausesValidation="false" UseSubmitBehavior="false"></asp:Button>
                    </div>
                </div>
                <%--   </div>--%>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnShow" />
            <asp:PostBackTrigger ControlID="btnSave" />
             <asp:PostBackTrigger ControlID="btnClose" />
            <asp:PostBackTrigger ControlID="GridPatientImages" />
        </Triggers>
    </asp:UpdatePanel>
 
</asp:Content>
