
<?php $__env->startSection('content'); ?>
<script type="text/javascript">
  $(document).ready(function(){
    $(document).foundation();
  });
  function showContent(){

    $('#checkAddress').change(function(){
     if(this.checked){

      $('#address').hide();
      $('#proxyAddress').show();

      document.getElementById("address1").value = 'N/A';
      document.getElementById("address2").value = 'N/A';
      document.getElementById("city").value = 'N/A';
      document.getElementById("state").value = 'N/A';
      document.getElementById("postal_code").value = '00000';

    }else{

      $('#address').show();
      $('#proxyAddress').hide();

      document.getElementById("address1").value = '';
      document.getElementById("address2").value = '';
      document.getElementById("city").value = '';
      document.getElementById("state").value = '';
      document.getElementById("postal_code").value = '';

    }
  });
  }

  function proxyAddress(){
    $('#checkProxy').change(function(){

      if(this.checked){
        $('#proxy').show();
        document.getElementById("address1").value = '<?php echo $provider->street; ?>';
        document.getElementById("address2").value = '<?php echo $provider->streetb; ?>';
        document.getElementById("city").value = '<?php echo $provider->city; ?>';
        document.getElementById("state").value = '<?php echo $provider->state; ?>';
        document.getElementById("postal_code").value = '<?php echo $provider->zip; ?>';
      //$('#address').show();
    }else{
      $('#proxy').hide();
      document.getElementById("address1").value = 'N/A';
      document.getElementById("address2").value = 'N/A';
      document.getElementById("city").value = 'N/A';
      document.getElementById("state").value = 'N/A';
      document.getElementById("postal_code").value = '00000';
    }

  });

  }
</script>

<link href="<?php echo e(URL::to("//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css")); ?>" rel="stylesheet">
<link rel="stylesheet" href="<?php echo e(URL::to('lib/foundation/css/foundation-datepicker.css')); ?>" />

<div class="row">

  <?php if(isset($error)): ?> 
  <div class="small-12 large-12 columns">
    <div data-alert class="alert-box alert">
      <?php echo e($error); ?>
      <a href="#" class="close">&times;</a> 
    </div>			
  </div>
  <?php endif; ?>  

  <div class="large-12 columns">
    <div class="row">
      <div class="small-12 medium-12 large-12 columns">
        <h2>Patient Information</h2>
      </div>
    </div>

    <div class="row">
      <div class="small-12 medium-12 large-12 columns">
        <p>This screen is for editing patient demographic information. </p>
      </div>
    </div>
  </div>
</div>

<div class="row">

 <!-- <form action="<?php echo e(URL::to('patients')); ?>" method="PATCH" data-abide>  -->

   <?php echo Form::model($patientData, array('route' => array('patients.update', $patientData->pid), 'method' => 'PUT', 'data-abide')); ?>

   <div class="small-12 medium-12 large-12  columns">

     <!--  <form> -->

      <div class="row">
        <div class="small-12 medium-12 large-10 columns">
          <label>First Name</label>
          <input type="text" id="first_name" name="first_name" placeholder="" required pattern="[a-zA-Z]+" value="<?php echo e($patientData->fname); ?>"/>
          <small class="error" data-error-message>First Name is required and must be a string.</small>
        </div>
        <div class="small-4 medium-2 large-2 columns">
          <label>Middle Name</label>
          <input type="text" id="middle_name" name="middle_name" placeholder="" pattern="[a-zA-Z]+" value="<?php echo e($patientData->mname); ?>"/>
          <small class="error" data-error-message>Must be a string.</small>
        </div>

      </div>

      <div class="row">
        <div class="small-12 medium-10 large-10 columns">
          <label>Last Name</label>
          <input type="text" id="last_name" name="last_name" placeholder="" required pattern="[a-zA-Z]+" value="<?php echo e($patientData->lname); ?>"/>
          <small class="error" data-error-message>Last Name is required and must be a string.</small>
        </div>
      </div>


      <div class="row">
        <div class="small-12 medium-6 large-6 columns">
          <div class="row collapse date" id="dp3" data-date-format="yyyy-mm-dd">
            <label>DOB</label>
            <div class="small-9 columns">
              <input type="text" id="DOB" name="DOB" pattern="date" value="<?php echo e($patientData->DOB); ?>" />
              <small class="error" data-error-message>Date format: yyyy-mm-dd.</small>
            </div>
            <div class="small-3 columns">
              <span class="postfix"><i class="fa fa-calendar"></i></span>
            </div>
          </div>
        </div>
      </div>

      <div class="row">
        <div class="small-12 medium-6 large-6 columns">
          <label>Sex ( <?php echo e($patientData->sex); ?> )</label>
          <select id="sex" name="sex">
            <option value="Male" <?php if($patientData->sex == 'Male') echo 'selected'; ?>>Male</option>
            <option value="Female" <?php if($patientData->sex == 'Female') echo 'selected'; ?>>Female</option>                  
          </select>
        </div>
      </div>
      <div class="row">
        <div class="small-12 medium-4 large-5 columns">
          <label>Email</label>
          <input type="email" id="email" name="email" required placeholder="" value="<?php echo e($patientData->email); ?>" />
          <small class="error" data-error-message>Invalid email format.</small>

        </div>
        <div class="small-12 medium-4 large-5 end columns">
          <label>Phone (Home)</label>
          <input type="text" id="phone_home" name="phone_home" placeholder="" value="<?php echo e($patientData->phone_home); ?>" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
          <small class="error" data-error-message>Phone format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
        </div>
      </div>

      <div class="row">
       <div class="small-12 medium-4 large-5 columns">
        <label>Phone (Cellular)</label>
        <input type="text" id="phone_cell" name="phone_cell" placeholder="" value="<?php echo e($patientData->phone_cell); ?>" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
        <small class="error" data-error-message>Phone format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
      </div>

      <div class="small-12 medium-4 large-5 end columns">
        <label>Fax</label>
        <input type="text" id="employee_fax" name="employee_fax" placeholder="" value="<?php echo e($patientExtraInfo->employee_fax); ?>" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
        <small class="error" data-error-message>Phone format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
      </div>
    </div> 



    <div class="row">
      <div class="large-12 columns">
        <hr>
        <h2>Patient Address</h2>
        <p>
          <label>
            N/A
            <input type="checkbox" <?php if(isset($patientExtraInfo->proxy_address) && $patientExtraInfo->proxy_address == 1) echo 'checked';?> id="checkAddress" name="checkAddress" onchange="javascript:showContent();"/>
          </label>
        </p>
      </div>

      <div class="row">
        <div id="proxyAddress" <?php if(!isset($patientExtraInfo->proxy_address) || $patientExtraInfo->proxy_address != 1) echo 'style="display:none;"';?> class="large-12 columns">
          <label>Proxy address</label>
          <input type="checkbox" id="checkProxy" <?php if(isset($patientExtraInfo->proxy_address) && $patientExtraInfo->proxy_address == 1) echo 'checked';?> name="proxy_address" value="1" onchange="javascript:proxyAddress();"/>                  
        </div>
      </div>

      <div id="proxy" <?php if(!isset($patientExtraInfo->proxy_address) || $patientExtraInfo->proxy_address != 1) echo 'style="display:none;"';?> >

        <div class="row">
          <div class="small-12 medium-9 large-9 columns">
            <label>Address 1</label>
            <strong><?php echo e($provider->street); ?></strong>
          </div>
        </div>
        <div class="row">
          <div class="small-12 medium-9 large-9 columns">
            <label>Address 2</label>
            <strong><?php echo e($provider->streetb); ?></strong>
          </div>
        </div>
        <div class="row">
          <div class="small-12 medium-9 large-9 columns">
            <label>City</label>
            <strong><?php echo e($provider->city); ?></strong>
          </div>
        </div>
        <div class="row">
          <div class="small-12 medium-5 large-5 columns">
            <label>State</label>
            <strong><?php echo e($provider->state); ?></strong>
          </div>
          <div class="small-12 medium-4 large-4 columns end">
            <label>Zipcode</label>
            <strong><?php echo e($provider->zip); ?></strong>
          </div>  
        </div>

      </div>

      <div id="address" <?php if(isset($patientExtraInfo->proxy_address) && $patientExtraInfo->proxy_address == 1) echo 'style="display:none;"';?> >

        <div class="row">
          <div class="small-12 medium-12 large-12 columns">
            <label>Address 1</label>
            <input type="text" id="address1" name="address1" placeholder="" required value="<?php echo e($patientData->street); ?>" />
            <small class="error" data-error-message>Street is required and must be a string.</small>
          </div>

        </div>

        <div class="row">
          <div class="small-12 medium-12 large-12 end columns">
            <label>Address 2</label>
            <input type="text" id="address2" name="address2" placeholder="" value="<?php echo e($patientExtraInfo->address2); ?>" />
            <small class="error" data-error-message>Street is required and must be a string.</small>
          </div>
        </div>

        <div class="row">
          <div class="small-12 medium-4 large-4 columns">
            <label>City</label>
            <input type="text" id="city" name="city" placeholder="" value="<?php echo e($patientData->city); ?>"  />
            <small class="error" data-error-message>Must be a string.</small>
          </div>
          <div class="small-12 medium-4 large-4 columns">
            <label>State</label>
                    <!-- <input type="text" id="state" name="state" placeholder="" value="<?php echo e($patientData->state); ?>"/>
                      <small class="error" data-error-message>Must be a string.</small> -->

                      <select id="state" name="state" >
                        <option value="AL" <?php if($patientData->state == 'AL') echo 'selected'; ?> >Alabama</option>
                        <option value="AK" <?php if($patientData->state == 'AK') echo 'selected'; ?>>Alaska</option>
                        <option value="AZ" <?php if($patientData->state == 'AZ') echo 'selected'; ?>>Arizona</option>
                        <option value="AR" <?php if($patientData->state == 'AR') echo 'selected'; ?>>Arkansas</option>
                        <option value="CA" <?php if($patientData->state == 'CA') echo 'selected'; ?>>California</option>
                        <option value="CO" <?php if($patientData->state == 'CO') echo 'selected'; ?>>Colorado</option>
                        <option value="CT" <?php if($patientData->state == 'CT') echo 'selected'; ?>>Connecticut</option>
                        <option value="DE" <?php if($patientData->state == 'DE') echo 'selected'; ?>>Delaware</option>
                        <option value="DC" <?php if($patientData->state == 'DC') echo 'selected'; ?>>District Of Columbia</option>
                        <option value="FL" <?php if($patientData->state == 'FL') echo 'selected'; ?>>Florida</option>
                        <option value="GA" <?php if($patientData->state == 'GA') echo 'selected'; ?>>Georgia</option>
                        <option value="HI" <?php if($patientData->state == 'HI') echo 'selected'; ?>>Hawaii</option>
                        <option value="ID" <?php if($patientData->state == 'ID') echo 'selected'; ?>>Idaho</option>
                        <option value="IL" <?php if($patientData->state == 'IL') echo 'selected'; ?>>Illinois</option>
                        <option value="IN" <?php if($patientData->state == 'IN') echo 'selected'; ?>>Indiana</option>
                        <option value="IA" <?php if($patientData->state == 'IA') echo 'selected'; ?>>Iowa</option>
                        <option value="KS" <?php if($patientData->state == 'KS') echo 'selected'; ?>>Kansas</option>
                        <option value="KY" <?php if($patientData->state == 'KY') echo 'selected'; ?>>Kentucky</option>
                        <option value="LA" <?php if($patientData->state == 'LA') echo 'selected'; ?>>Louisiana</option>
                        <option value="ME" <?php if($patientData->state == 'ME') echo 'selected'; ?>>Maine</option>
                        <option value="MD" <?php if($patientData->state == 'MD') echo 'selected'; ?>>Maryland</option>
                        <option value="MA" <?php if($patientData->state == 'MA') echo 'selected'; ?>>Massachusetts</option>
                        <option value="MI" <?php if($patientData->state == 'MI') echo 'selected'; ?>>Michigan</option>
                        <option value="MN" <?php if($patientData->state == 'MN') echo 'selected'; ?>>Minnesota</option>
                        <option value="MS" <?php if($patientData->state == 'MS') echo 'selected'; ?>>Mississippi</option>
                        <option value="MO" <?php if($patientData->state == 'MO') echo 'selected'; ?>>Missouri</option>
                        <option value="MT" <?php if($patientData->state == 'MT') echo 'selected'; ?>>Montana</option>
                        <option value="NE" <?php if($patientData->state == 'NE') echo 'selected'; ?>>Nebraska</option>
                        <option value="NV" <?php if($patientData->state == 'NV') echo 'selected'; ?>>Nevada</option>
                        <option value="NH" <?php if($patientData->state == 'NH') echo 'selected'; ?>>New Hampshire</option>
                        <option value="NJ" <?php if($patientData->state == 'NJ') echo 'selected'; ?>>New Jersey</option>
                        <option value="NM" <?php if($patientData->state == 'NM') echo 'selected'; ?>>New Mexico</option>
                        <option value="NY" <?php if($patientData->state == 'NY') echo 'selected'; ?>>New York</option>
                        <option value="NC" <?php if($patientData->state == 'NC') echo 'selected'; ?>>North Carolina</option>
                        <option value="ND" <?php if($patientData->state == 'ND') echo 'selected'; ?>>North Dakota</option>
                        <option value="OH" <?php if($patientData->state == 'OH') echo 'selected'; ?>>Ohio</option>
                        <option value="OK" <?php if($patientData->state == 'OK') echo 'selected'; ?>>Oklahoma</option>
                        <option value="OR" <?php if($patientData->state == 'OR') echo 'selected'; ?>>Oregon</option>
                        <option value="PA" <?php if($patientData->state == 'PA') echo 'selected'; ?>>Pennsylvania</option>
                        <option value="RI" <?php if($patientData->state == 'RI') echo 'selected'; ?>>Rhode Island</option>
                        <option value="SC" <?php if($patientData->state == 'SC') echo 'selected'; ?>>South Carolina</option>
                        <option value="SD" <?php if($patientData->state == 'SD') echo 'selected'; ?>>South Dakota</option>
                        <option value="TN" <?php if($patientData->state == 'TN') echo 'selected'; ?>>Tennessee</option>
                        <option value="TX" <?php if($patientData->state == 'TX') echo 'selected'; ?>>Texas</option>
                        <option value="UT" <?php if($patientData->state == 'UT') echo 'selected'; ?>>Utah</option>
                        <option value="VT" <?php if($patientData->state == 'VT') echo 'selected'; ?>>Vermont</option>
                        <option value="VA" <?php if($patientData->state == 'VA') echo 'selected'; ?>>Virginia</option>
                        <option value="WA" <?php if($patientData->state == 'WA') echo 'selected'; ?>>Washington</option>
                        <option value="WV" <?php if($patientData->state == 'WV') echo 'selected'; ?>>West Virginia</option>
                        <option value="WI" <?php if($patientData->state == 'WI') echo 'selected'; ?>>Wisconsin</option>
                        <option value="WY" <?php if($patientData->state == 'WY') echo 'selected'; ?>>Wyoming</option>
                        <option value="N/A" <?php if($patientData->state == 'N/A') echo 'selected'; ?>>N/A</option>
                      </select>
                    </div>
                    <div class="small-12 medium-4 large-4 end columns">
                      <label>Zipcode</label>
                      <input type="text" id="postal_code" name="postal_code" placeholder="" pattern="[0-9]{5}" required value="<?php echo e($patientData->postal_code); ?>"/>
                      <small class="error" data-error-message>Zipcode is required. Five numbers</small>
                    </div>

                    <div class="large-12 columns">
                      <hr>
                    </div>
                  </div>        

                </div>

            <!-- <div class="row">
                <div class="small-12 medium-4 large-4 columns">
                  <label>Provider</label>
                  <input type="text" placeholder="" id="provider" name="provider" value="<?php echo e($patientExtraInfo->provider); ?>"  required />
                  <small class="error" data-error-message>Provider is required</small>
                </div>
              </div> -->




              <hr>
              <div class="row">
                <div class="small-12 large-12 columns">
                  <div class="row">
                    <div class="small-12 large-12 columns">
                      <h2>Notification Preferences</h2>
                    </div>
                  </div>

                  <div class="row">

                    <div class="small-12 large-4 columns">
                      <label>E-mail <input type="radio" name="notification_preferences" checked<?php if($patientExtraInfo->notification_preferences == 'email') echo 'checked';?> value="email" /></label>
                    </div>
                    <div class="small-12 large-4 columns">
                      <label>Fax <input type="radio" name="notification_preferences" <?php if($patientExtraInfo->notification_preferences == 'fax') echo 'checked';?> value="fax" /></label>
                    </div>
                    <div class="small-12 large-4 columns">
                      <label>Text <input type="radio" name="notification_preferences"  <?php if($patientExtraInfo->notification_preferences == 'sms') echo 'checked';?> value="sms" /></label>
                    </div>

                  </div>
                  <div class="row">
                    <div class="small-12 medium-6 large-6 columns">
                      <label>Preferred Language
                        <?php if(isset($patientExtraInfo->employee_language)): ?>
                        (Current - <?php echo e($patientExtraInfo->employee_language); ?>)
                        <?php endif; ?>
                      </label>
                      <select id="employee_language" name="employee_language">
                        <option value="English" <?php if((isset($patientExtraInfo->employee_language)) && $patientExtraInfo->employee_language == 'English') echo 'selected'; ?> >English</option>
                        <option value="Spanish" <?php if((isset($patientExtraInfo->employee_language)) && $patientExtraInfo->employee_language == 'Spanish') echo 'selected'; ?> >Spanish</option>
                      </select>
                    </div> 
                  </div>
                </div>
              </div>

              <hr>
              <div class="row">
                <div class="small-12 large-12 columns">
                  <h2>Notification and Contact Preferences</h2>
                </div>
              </div>

              <div class="row">

                <div class="small-12 large-4 columns">
                  <label>E-mail <input type="radio" name="emp_notification_preferences" checked<?php if($patientExtraInfo->emp_notification_preferences == 'email') echo 'checked';?> value="email" /></label>
                </div>
                <div class="small-12 large-4 columns">
                  <label>Fax <input type="radio" name="emp_notification_preferences" <?php if($patientExtraInfo->emp_notification_preferences == 'fax') echo 'checked';?> value="fax" /></label>
                </div>
                <div class="small-12 large-4 columns">
                  <label>Text <input type="radio" name="emp_notification_preferences"  <?php if($patientExtraInfo->emp_notification_preferences == 'sms') echo 'checked';?> value="sms" /></label>
                </div>

              </div>  
              <div class="row">
                <div class="small-12 medium-12 large-12 columns">                  
                  <label>Contact</label>
                  <input type="text" id="name_contact" name="name_contact" placeholder="" required value="<?php echo e($patientExtraInfo->contact); ?>" />
                  <small class="error" data-error-message>Contact is required</small>
                </div>
              </div>
              <div class="row">
                <div class="small-12 medium-4 large-4 columns">
                  <label>Contact Email</label>
                  <input type="email" id="email_contact" name="email_contact" required placeholder="" value="<?php echo e($patientExtraInfo->contact_email); ?>" />
                  <small class="error" data-error-message>Contact Email is required with email format.</small>
                </div>
                <div class="small-12 medium-4 large-4 columns">
                  <label>Contact Phone</label>
                  <input type="text" id="contact_phone" name="phone_contact" placeholder="" required value="<?php echo e($patientData->phone_contact); ?>" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
                  <small class="error" data-error-message>Contact Phone is required, format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
                </div>
                <div class="small-12 medium-4 large-4 end columns">
                  <label>Fax</label>
                  <input type="text" id="fax" name="fax" placeholder="" value="<?php echo e($patientExtraInfo->fax); ?>" />
                </div>
              </div>
              <div class="row">
                <div class="small-12 medium-6 large-6 columns">
                  <label>Preferred Language
                    <?php if(isset($patientExtraInfo->language)): ?>
                    (Current - <?php echo e($patientExtraInfo->language); ?>)
                    <?php endif; ?>
                  </label>
                  <select id="language" name="language">
                    <option value="English" <?php if((isset($patientExtraInfo->language)) && $patientExtraInfo->language == 'English') echo 'selected'; ?> >English</option>
                    <option value="Spanish" <?php if((isset($patientExtraInfo->language)) && $patientExtraInfo->language == 'Spanish') echo 'selected'; ?> >Spanish</option>
                  </select>
                </div> 
              </div>
            </div>

            <div class="row">
              <div class="large-12 columns">
                <hr>
                <h2>Employer Information</h2>
              </div>
            </div>

            <div class="row">
              <div class="small-12 medium-12 large-12 columns">
                <label>Name</label>
                <input type="text" id="employer" name="employer" placeholder="" required value="<?php if(!is_null($employer)){echo $employer->name;}?>" />
                <small class="error" data-error-message>Employer Name is required</small>
              </div>
            </div>

            <div class="row">
              <div class="small-12 medium-12 large-12 columns">
                <label>Address1</label>
                <input type="text" id="employer_address" name="employer_address" placeholder="" required  value="<?php if(!is_null($employer)){echo $employer->street;}?>"  />
                <small class="error" data-error-message>Street is required and must be a string.</small>
              </div>
            </div>

            <div class="row">
              <div class="small-12 medium-12 large-12 columns">
                <label>Address2</label>
                <input type="text" id="employer_address2" name="employer_address2" placeholder=""  value="<?php echo e($patientExtraInfo->employer_address2); ?>"  />
                <small class="error" data-error-message>Street is required and must be a string.</small>
              </div>
            </div>              

            <div class="row">
              <div class="small-12 medium-4 large-4 columns">
                <label>City</label>
                <input type="text" id="employer_city" name="employer_city" placeholder="" required value="<?php if(!is_null($employer)){echo $employer->city;}?>" />
                <small class="error" data-error-message>Must be a string.</small>
              </div>
              <div class="small-12 medium-4 large-4 columns">
                <label>State</label>
                <select id="employer_state" name="employer_state">

                  <option value="AL" <?php if(!is_null($employer) and $employer->state == 'AL'){ echo 'selected'; }?>>Alabama</option>
                  <option value="AK" <?php if(!is_null($employer) and $employer->state == 'AK'){ echo 'selected'; }?>>Alaska</option>
                  <option value="AZ" <?php if(!is_null($employer) and $employer->state == 'AZ'){ echo 'selected'; }?>>Arizona</option>
                  <option value="AR" <?php if(!is_null($employer) and $employer->state == 'AR'){ echo 'selected'; }?>>Arkansas</option>
                  <option value="CA" <?php if(!is_null($employer) and $employer->state == 'CA'){ echo 'selected'; }?>>California</option>
                  <option value="CO" <?php if(!is_null($employer) and $employer->state == 'CO'){ echo 'selected'; }?>>Colorado</option>
                  <option value="CT" <?php if(!is_null($employer) and $employer->state == 'CT'){ echo 'selected'; }?>>Connecticut</option>
                  <option value="DE" <?php if(!is_null($employer) and $employer->state == 'DE'){ echo 'selected'; }?>>Delaware</option>
                  <option value="DC" <?php if(!is_null($employer) and $employer->state == 'DC'){ echo 'selected'; }?>>District Of Columbia</option>
                  <option value="FL" <?php if(!is_null($employer) and $employer->state == 'FL'){ echo 'selected'; }?>>Florida</option>
                  <option value="GA" <?php if(!is_null($employer) and $employer->state == 'GA'){ echo 'selected'; }?>>Georgia</option>
                  <option value="HI" <?php if(!is_null($employer) and $employer->state == 'HI'){ echo 'selected'; }?>>Hawaii</option>
                  <option value="ID" <?php if(!is_null($employer) and $employer->state == 'ID'){ echo 'selected'; }?>>Idaho</option>
                  <option value="IL" <?php if(!is_null($employer) and $employer->state == 'IL'){ echo 'selected'; }?>>Illinois</option>
                  <option value="IN" <?php if(!is_null($employer) and $employer->state == 'IN'){ echo 'selected'; }?>>Indiana</option>
                  <option value="IA" <?php if(!is_null($employer) and $employer->state == 'IA'){ echo 'selected'; }?>>Iowa</option>
                  <option value="KS" <?php if(!is_null($employer) and $employer->state == 'KS'){ echo 'selected'; }?>>Kansas</option>
                  <option value="KY" <?php if(!is_null($employer) and $employer->state == 'KY'){ echo 'selected'; }?>>Kentucky</option>
                  <option value="LA" <?php if(!is_null($employer) and $employer->state == 'LA'){ echo 'selected'; }?>>Louisiana</option>
                  <option value="ME" <?php if(!is_null($employer) and $employer->state == 'ME'){ echo 'selected'; }?>>Maine</option>
                  <option value="MD" <?php if(!is_null($employer) and $employer->state == 'MD'){ echo 'selected'; }?>>Maryland</option>
                  <option value="MA" <?php if(!is_null($employer) and $employer->state == 'MA'){ echo 'selected'; }?>>Massachusetts</option>
                  <option value="MI" <?php if(!is_null($employer) and $employer->state == 'MI'){ echo 'selected'; }?>>Michigan</option>
                  <option value="MN" <?php if(!is_null($employer) and $employer->state == 'MN'){ echo 'selected'; }?>>Minnesota</option>
                  <option value="MS" <?php if(!is_null($employer) and $employer->state == 'MS'){ echo 'selected'; }?>>Mississippi</option>
                  <option value="MO" <?php if(!is_null($employer) and $employer->state == 'MO'){ echo 'selected'; }?>>Missouri</option>
                  <option value="MT" <?php if(!is_null($employer) and $employer->state == 'MT'){ echo 'selected'; }?>>Montana</option>
                  <option value="NE" <?php if(!is_null($employer) and $employer->state == 'NE'){ echo 'selected'; }?>>Nebraska</option>
                  <option value="NV" <?php if(!is_null($employer) and $employer->state == 'NV'){ echo 'selected'; }?>>Nevada</option>
                  <option value="NH" <?php if(!is_null($employer) and $employer->state == 'NH'){ echo 'selected'; }?>>New Hampshire</option>
                  <option value="NJ" <?php if(!is_null($employer) and $employer->state == 'NJ'){ echo 'selected'; }?>>New Jersey</option>
                  <option value="NM" <?php if(!is_null($employer) and $employer->state == 'NM'){ echo 'selected'; }?>>New Mexico</option>
                  <option value="NY" <?php if(!is_null($employer) and $employer->state == 'NY'){ echo 'selected'; }?>>New York</option>
                  <option value="NC" <?php if(!is_null($employer) and $employer->state == 'NC'){ echo 'selected'; }?>>North Carolina</option>
                  <option value="ND" <?php if(!is_null($employer) and $employer->state == 'ND'){ echo 'selected'; }?>>North Dakota</option>
                  <option value="OH" <?php if(!is_null($employer) and $employer->state == 'OH'){ echo 'selected'; }?>>Ohio</option>
                  <option value="OK" <?php if(!is_null($employer) and $employer->state == 'OK'){ echo 'selected'; }?>>Oklahoma</option>
                  <option value="OR" <?php if(!is_null($employer) and $employer->state == 'OR'){ echo 'selected'; }?>>Oregon</option>
                  <option value="PA" <?php if(!is_null($employer) and $employer->state == 'PA'){ echo 'selected'; }?>>Pennsylvania</option>
                  <option value="RI" <?php if(!is_null($employer) and $employer->state == 'RI'){ echo 'selected'; }?>>Rhode Island</option>
                  <option value="SC" <?php if(!is_null($employer) and $employer->state == 'SC'){ echo 'selected'; }?>>South Carolina</option>
                  <option value="SD" <?php if(!is_null($employer) and $employer->state == 'SD'){ echo 'selected'; }?>>South Dakota</option>
                  <option value="TN" <?php if(!is_null($employer) and $employer->state == 'TN'){ echo 'selected'; }?>>Tennessee</option>
                  <option value="TX" <?php if(!is_null($employer) and $employer->state == 'TX'){ echo 'selected'; }?>>Texas</option>
                  <option value="UT" <?php if(!is_null($employer) and $employer->state == 'UT'){ echo 'selected'; }?>>Utah</option>
                  <option value="VT" <?php if(!is_null($employer) and $employer->state == 'VT'){ echo 'selected'; }?>>Vermont</option>
                  <option value="VA" <?php if(!is_null($employer) and $employer->state == 'VA'){ echo 'selected'; }?>>Virginia</option>
                  <option value="WA" <?php if(!is_null($employer) and $employer->state == 'WA'){ echo 'selected'; }?>>Washington</option>
                  <option value="WV" <?php if(!is_null($employer) and $employer->state == 'WV'){ echo 'selected'; }?>>West Virginia</option>
                  <option value="WI" <?php if(!is_null($employer) and $employer->state == 'WI'){ echo 'selected'; }?>>Wisconsin</option>
                  <option value="WY" <?php if(!is_null($employer) and $employer->state == 'WY'){ echo 'selected'; }?>>Wyoming</option>
                  <option value="N/A" <?php if(!is_null($employer) and $employer->state == 'N/A'){ echo 'selected'; }?>>N/A</option>
                </select>
              </div>
              <div class="small-12 medium-4 large-4 columns">
                <label>Zipcode</label>
                <input type="text" id="employer_postal_code" name="employer_postal_code" placeholder="" required value="<?php if(!is_null($employer)){echo $employer->postal_code;}?>"/>
                <small class="error" data-error-message>Zipcode is required.</small>
              </div>

            </div>

            <div class="row">
              <div class="small-12 medium-4 large-5 columns">
                <label>Email</label>
                <input type="email" id="employer_email" name="employer_email" required value="<?php if(!is_null($employer)){echo $employer->email;}?>"  placeholder="" />
                <small class="error" data-error-message>Invalid email format.</small>

              </div>
              <div class="small-12 medium-4 large-5 end columns">
                <label>Phone (Home)</label>
                <input type="text" id="employer_phone_home" name="employer_phone_home" value="<?php if(!is_null($employer)){echo $employer->phone_home;}?>"  placeholder="" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
                <small class="error" data-error-message>Phone format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
              </div>
            </div>

            <div class="row">
             <div class="small-12 medium-4 large-5 columns">
              <label>Phone (Cellular)</label>
              <input type="text" id="employer_phone_cell" name="employer_phone_cell" value="<?php if(!is_null($employer)){echo $employer->phone_cell;}?>"  placeholder="" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
              <small class="error" data-error-message>Phone format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
            </div>

            <div class="small-12 medium-4 large-5 end columns">
              <label>Fax</label>
              <input type="text" id="employer_fax" name="employer_fax" value="<?php if(!is_null($employer)){echo $employer->fax;}?>"  placeholder="" pattern="^(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}$" />
              <small class="error" data-error-message>Phone format:<br> (xxx)xxx-xxxx or xxx-xxx-xxxx</small>
            </div>
          </div> 


          <div class="row">
            <div class="small-12 medium-12 large-12 end columns">
              <label>Occupation / Company</label>
              <input type="text" id="employer_occupation" name="employer_occupation" placeholder="" required  value="<?php echo e($patientData->occupation); ?>" />
              <small class="error" data-error-message>Ocupation / Company is required.</small>
            </div>
            <div class="large-12 columns">
              <hr>
            </div>
          </div>

          <div class="row">
            <div class="small-6 medium-6 large-6 columns">
              <button class="expand">Save</button>
            </div>
            <div class="small-6 medium-6 large-6 columns">
              <a href="<?php echo e(URL::to('patients/' . $patientData->pid)); ?>" class="button expand">Cancel</a>
            </div>
          </div>

          <!-- </form> -->
        </div>

        <?php echo Form::close(); ?>

        <!--  </form> -->

      </div>

      <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
      <script src="<?php echo e(URL::to('lib/foundation/js/foundation-datepicker.js')); ?>"></script>


      <script>

        (function($) {

         $('.date').fdatepicker();
         
       })(jQuery);
     </script>


     <?php $__env->stopSection(); ?>
<?php echo $__env->make('master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>