{% extends 'dashboard_screen/base.html' %}

{% block content %}

            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container">
                        <div class="row">

                            <div class="col-lg-12">
                                 <!-- Basic Form Wizard -->

                            	<div class="card-box">
                            		<h4 class="m-t-0 header-title"><b>Add New Patient</b></h4>

									<form id="id_ajax_form_add_patient" action="/dashboard/add_patient/" class="form-horizontal" method="post" enctype="multipart/form-data">
                                        {% csrf_token %}
                                        <div>
                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>Client ID:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <select name="patient_client" class="select2-limiting" data-max-options="1" multiple="multiple" data-placeholder="Choose a Result" data-style="btn-white">
                                                                    {% for Client in Clients %}
                                                                         <option value="{{ Client.client_id }}" {% if Client == Patient.patient_client %} selected{% endif %}>{{ Client.client_code }}</option>
                                                                    {% endfor %}
                                                                </select>
                                                                <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-users"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>
                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>Patient External ID:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <input type="text" class="form-control" id="state-warning" maxlength="25" name="patient_external_id" placeholder="External ID" onKeyUp="this.value=this.value.toUpperCase();" />
                                                                <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-users"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                    <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>First Name: (*)</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <input type="text" class="form-control" id="state-warning"  required name="patient_first_name" placeholder="Enter First Name" />
                                                                <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b> Last Name: (*)</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <input type="text" name="patient_last_name" required class="form-control" id="state-warning" placeholder="Enter Last Name">
                                                                <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>DOB: mm/dd/yy (*)</b></h5>
                                                            <div class="input-group m-t-15">
                                                                 <input type="text" class="form-control" name="patient_dob" data-date-format="mm/dd/yyyy" placeholder="Enter patient Date of Birth " id="datepicker-autoclose">
                                                                 <span class="input-group-addon bg-custom b-0 text-white"><i class="icon-calender"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>Address:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                 <input type="text" name="patient_address" class="form-control" id="id_patient_address" placeholder="Enter Patient address">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa ion-map "></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                    <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>Address 2:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                 <input type="text" name="patient_address2" class="form-control" id="id_patient_address2" placeholder="Enter Patient address">
                                                                 <span class="input-group-addon bg-custom b-0 text-white"><i class="fa ion-map "></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                    <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>SSN:(*)</b></h5>
                                                            <div class="input-group m-t-15">
                                                                 <input type="text" class="form-control" maxlength="9" name="patient_ssn" id="exampleInputPassword1" placeholder="Enter patient SSN">
                                                             <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-legal"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                    <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>Phone:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <input type="tel" step="1" name="patient_phone" class="form-control" id="id_patient_phone" placeholder="Enter Patient Phone">
                                                                <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-phone"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>City:</b></h5>
                                                            <div class="input-group m-t-15">
                                                               <input type="text" name="patient_city" class="form-control" id="id_patient_city" placeholder="Enter City">
                                                               <span class="input-group-addon bg-custom b-0 text-white"><i class="fa ion-map"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>



                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>Zip Code:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <input type="text" name="patient_zipcode" class="form-control" id="exampleInputEmail1" placeholder="Zip Code">
                                                                <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-map-marker"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>

                                                   <div class="col-lg-3">
                                                        <div class="p-20">
                                                            <h5><b>State:</b></h5>
                                                            <div class="input-group m-t-15">
                                                                <select id="id_patient_state" name="patient_state" class="select2-limiting" data-max-options="1" multiple  data-placeholder="Choose a State" data-style="btn-white">
                                                                        {% if states %}
                                                                           {% for item in states %}
                                                                             <option value="{{ item.code }}">{{ item.name }}</option>
                                                                           {% endfor %}
                                                                        {% endif %}
                                                                </select>
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                            </div>
                                                        </div>
                                                   </div>
                                                    <div class="col-lg-12">

                                                        <div class="col-lg-3">
                                                            <div class="p-20">
                                                                <h5><b>Ethnicity:</b></h5>
                                                                <div class="input-group m-t-15">
                                                                      <select id="id_patient_ethnicity" name="patient_ethnicity" class="select2-limiting" data-max-options="1" multiple="multiple" data-placeholder="Choose a Ethnicty" data-style="btn-white">
                                                                          <option value="0"> Select Patient Ethnicty</option>
                                                                          <option value="1"> American Indian or Alaska Native</option>
                                                                          <option value="2"> Asian</option>
                                                                          <option value="3"> Black or African American</option>
                                                                          <option value="4"> Hispanic or Latino</option>
                                                                          <option value="5"> Native Hawaiian or Other Pacific Islander </option>
                                                                          <option value="6"> White</option>
                                                                          <option value="7"> Other</option>
                                                                       </select>
                                                                    <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                                </div>
                                                            </div>
                                                        </div>


                                                        <div class="col-lg-3">
                                                            <div class="p-20">
                                                                <h5><b>Gender:(*)</b></h5>
                                                                <div class="input-group m-t-15">
                                                                      <select id="id_patient_gender" required name="patient_gender" class="select2-limiting" data-max-options="1" multiple="multiple" data-placeholder="Choose a Gender" data-style="btn-white">
                                                                          <option value="M"> Male</option>
                                                                          <option value="F"> Female</option>
                                                                       </select>
                                                                    <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                                 </div>
                                                            </div>
                                                        </div>




                                                        <div class="col-lg-4">
                                                            <p class="text-muted font-13 m-b-15 m-t-20">Please select how the Patient will get the Notification.</p>
                                                            <div class="col-sm-12">
                                                                <div class="radio radio-inline">
                                                                    <input type="radio" id="inlineRadio2" value="1" name="notification">
                                                                    <label for="inlineRadio2"> Web Site </label>
                                                                </div>

                                                                <div class="radio radio-inline">
                                                                    <input type="radio" id="inlineRadio3" value="0" name="notification" checked>
                                                                    <label for="inlineRadio3"> Doctor Office </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group clearfix">
                                                       <label class="col-lg-6 control-label ">(*) Mandatory</label>
                                                    </div>

                                                     <div class="form-group m-b-0">
                                                        <div class="col-sm-offset-10 col-sm-10">
                                                          <button type="submit" name="save_patient" class="btn btn-default waves-effect waves-light">Save</button>
                                                        </div>
                                                    </div>

                                                    <div class="form-group clearfix">
                                                        <label class="col-lg-6 control-label ">{{ message }}</label>
                                                    </div>



                                         </div>
                                    </form>


                            	</div>


                            <!-- End row -->

                            </div> <!-- end col -->
                        </div>

						<!-- end row -->



                    </div> <!-- container -->

                </div> <!-- content -->


{% endblock %}