<%@ page title="Exotic Birds" language="C#" masterpagefile="~/DoctorMasterPage.master" autoeventwireup="true" inherits="ExoticBirds, 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">
                    <h3>Exotic Birds</h3>
                </div>
                <section class="section">
                    <div class="divider">
                        <div class="divider-text">Exotic Birds</div>
                    </div>
                    <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" ReadOnly="True"></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" ReadOnly="True"></asp:TextBox>
                            <cc1:AutoCompleteExtender ID="txtOwnerName_AutoCompleteExtender" runat="server" BehaviorID="txtOwnerName_AutoCompleteExtender" CompletionListCssClass="completionList" CompletionListHighlightedItemCssClass="itemHighlighted" CompletionListItemCssClass="listItem" DelimiterCharacters="" ServicePath="AutoComplete.asmx" ServiceMethod="GetOwnerName" TargetControlID="txtOwnerName">
                            </cc1:AutoCompleteExtender>
                            <asp:Label ID="lblOwnerID" runat="server" Visible="false"></asp:Label>
                            <asp:Label ID="lblFollowUpID" 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" ReadOnly="True"></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-2">
                            <label class="label">Gender</label>
                            <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-select" Enabled="False">
                                <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" CssClass="form-select" Enabled="False">
                                <asp:ListItem Text="Exotic" Value="1" Selected="True"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-3">
                            <label class="label">Species</label>
                            <asp:TextBox ID="txtSpeciesType" runat="server" CssClass="form-control" placeholder="Species Type" Enabled="False"></asp:TextBox>
                        </div>
                        <div class="col-md-3" style="display: none">
                            <label class="label">Breed</label>
                            <asp:TextBox ID="txtBreed" runat="server" CssClass="form-control" placeholder="Breed">                              
                            </asp:TextBox>
                        </div>
                        <div class="col-md-1">
                            <label class="label">Age</label>
                            <asp:TextBox ID="txtAge" runat="server" CssClass="form-control" placeholder="Age" ReadOnly="True"></asp:TextBox>
                        </div>
                        <div class="col-md-1">
                            <label class="label">Weight</label>
                            <asp:TextBox ID="txtWeight" runat="server" CssClass="form-control" placeholder="Weight"></asp:TextBox>
                        </div>
                        <div class="col-md-4" style="display: none">
                            <label class="label">Allergies</label>
                            <asp:TextBox ID="txtAllergies" runat="server" TextMode="MultiLine" CssClass="form-control" placeholder="Allergies"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <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-4">
                            <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" style="display: none">
                            <label class="label">Primary Signs Observed</label>
                            <asp:TextBox ID="txtPrimSigns" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Primary Signs Observed" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Species</label>
                            <asp:DropDownList ID="ddlSpecies" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Captive Breed" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Wild Caught" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Parent Reared" Value="3"></asp:ListItem>
                                <asp:ListItem Text="Hand Reared" Value="4"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Reproductive History</label>
                            <asp:TextBox ID="txtReproductiveHist" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Reproductive History" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Source</label>
                            <asp:DropDownList ID="ddlSource" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Breeder" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Shop" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Other" Value="3"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Length Of Ownership</label>
                            <asp:TextBox ID="txtLengthOfOwner" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Length Of Ownership" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2" style="display: none">
                            <label class="label">Previous History</label>
                            <asp:TextBox ID="txtPrevHistory" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Previous History" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2" style="display: none">
                            <label class="label">When Purchased</label>
                            <asp:TextBox ID="txtWhenPurchased" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="When Purchased" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-2">
                            <label class="label">Environment</label>
                            <asp:DropDownList ID="ddlEnvironment" runat="server" CssClass="form-select" AutoPostBack="true" OnSelectedIndexChanged="ddlEnvironment_SelectedIndexChanged">
                                <asp:ListItem Text="Cage" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Perches" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Other" Value="3"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-4">
                            <label class="label">Environment Details</label>
                            <asp:TextBox ID="txtEnvironmentDetails" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Environment Details" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Type Of Lights Bird is exposed</label>
                            <asp:TextBox ID="txtExposedToLight" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Type Of Lights To Which Bird is exposed" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Cleaning Freq</label>
                            <asp:TextBox ID="txtCleaningFreq" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Type Of Lights To Which Bird is exposed" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Owner bird interaction</label>
                            <asp:TextBox ID="txtInteraction" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Owner bird interaction" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-2">
                            <label class="label">Contact With Other Bird</label>
                            <asp:TextBox ID="txtContactWithOtherBird" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Contact With Other Bird" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">ToxinsExposure</label>
                            <asp:TextBox ID="txtToxinsExposure" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Toxins Exposure" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Feeding</label>
                            <asp:TextBox ID="txtFeeding" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Feeding" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-2">
                            <label class="label">WaterSource</label>
                            <asp:TextBox ID="txtWaterSource" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Water Source" AutoComplete="off"></asp:TextBox>
                        </div>
                        <div class="col-md-3">
                            <label class="label">Food preparation and store method</label>
                            <asp:TextBox ID="txtPrepnStoreMethod" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Food Prepare and Store Method" AutoComplete="off"></asp:TextBox>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-4">
                            <label class="label">Behaviour Changes</label>
                            <asp:DropDownList ID="txtBehaviourChanges" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Increased Sleeping" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Fluffedup Feather" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Decreased Activity" Value="3"></asp:ListItem>
                                <asp:ListItem Text="Sitting on bottom of cage" Value="4"></asp:ListItem>
                                <asp:ListItem Text="Reduced or loss of apetite" Value="5"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Discharge</label>
                            <asp:DropDownList ID="ddlDischarge" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Occular" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Nasal" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Oral" Value="3"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Dyspnea</label>
                            <asp:DropDownList ID="ddlDyspned" runat="server" CssClass="form-select">
                                <asp:ListItem Text="Yes" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="No" Value="2"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Dropping</label>
                            <asp:TextBox ID="txtDroppinh" runat="server" list="DroppingList" CssClass="form-select" />
                            <datalist id="DroppingList">
                                <option value="Yes"></option>
                                <option value="No"></option>
                            </datalist>
                        </div>
                        <div class="col-md-2">
                            <label class="label">Trauma</label>
                            <asp:TextBox ID="txtTrauma" runat="server" list="TraumaList" CssClass="form-select" />
                            <datalist id="TraumaList">
                                <option value="Broken Toe Nail"></option>
                                <option value="Broken Beak"></option>
                                <option value="Mutilation"></option>
                                <option value="Broken Blood Feathers"></option>
                                <option value="Animal Bites"></option>
                            </datalist>
                        </div>
                    </div>
                    <div class="row bspace form-group">
                        <div class="col-md-2">
                            <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-2">
                            <label class="label">Tentative Diagnosis</label>
                            <asp:TextBox ID="txtTentDiag" runat="server" CssClass="form-control" TextMode="MultiLine" placeholder="Tentative Diagnosis" 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 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-2">
                            <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 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" HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass="hideGridColumn" />
                                 <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="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>
                        <asp:Label ID="lblMsg" runat="server" ForeColor="Green"></asp:Label>
                    </div>
                    <div class="row bspace">
                        <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" />
                        </div>
                        <div class="col-md-4">
                            <asp:Button ID="btnPrint" runat="server" CssClass="btn btn-primary btn-block" Text="Print" Visible="false" OnClick="btnPrint_Click" />
                            <asp:Button ID="btnShow" runat="server" Text="Show" CssClass="btn btn-primary btn-block" OnClick="btnShow_Click" Visible="false" />
                        </div>
                    </div>
                </section>
            </div>
            <asp:HiddenField ID="HiddenField1" runat="server" />
            <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
                BackgroundCssClass="modal fade" OkControlID="btnAppointmentPanelClose"
                PopupControlID="AppointmentPanel" TargetControlID="HiddenField1">
            </cc1:ModalPopupExtender>
            <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-lg"
                role="document" runat="server" id="AppointmentPanel">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalCenterTitle">Patient Appointment</h5>
                        <%-- <button type="button" id="btnAppointmentPanel" runat="server" class="close" data-bs-dismiss="modal" aria-label="Close">
                            <i data-feather="x"></i>
                        </button>--%>
                    </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("BirdEntryID") %>' />
                                                                    </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="GridPatientImages" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>



