<?php
ob_start();
include 'head.php';
include 'header.php';
include 'sidebar.php';


$stmt3 = $pdo->prepare("SELECT * FROM tblpsp WHERE isDeleted='N' ORDER BY pspName ASC");
$stmt3->execute();
$psps = $stmt3->fetchAll();

$stmt6 = $pdo->prepare("SELECT * FROM tblpatient WHERE isDeleted='N' ORDER BY patientName ASC");
$stmt6->execute();
$addedpatient = $stmt6->fetchAll();

$stmt7 = $pdo->prepare("SELECT * FROM tbldrugs WHERE isDeleted='N' ORDER BY drugName ASC");
$stmt7->execute();
$medications = $stmt7->fetchAll();

$stmt8 = $pdo->prepare("SELECT * FROM tblphysicians WHERE isDeleted='N' ORDER BY firstName ASC");
$stmt8->execute();
$physicians = $stmt8->fetchAll();

$stmt8 = $pdo->prepare("SELECT * FROM tblprovince WHERE countryId='1' ORDER BY provinceName ASC");
$stmt8->execute();
$provinces = $stmt8->fetchAll();


$stmt80 = $pdo->prepare("SELECT * FROM tblpatientstatus WHERE isDeleted='N' ORDER BY StatusName ASC");
$stmt80->execute();
$pstatus = $stmt80->fetchAll();


if (isset($_GET['id'])) {
   $stmt1 = $pdo->prepare("SELECT tblpatient.*, tblpatientdetails.*, tblwcpart1.*, tblwcpart2.*, tblwcpart3.*, tblwcpart4.*, tblwcpart5.*, tblwcpart6.* FROM tblpatient 
   inner join tblpatientdetails on tblpatient.id=tblpatientdetails.pId 
   LEFT JOIN tblwcpart1 ON tblpatientdetails.pId = tblwcpart1.pId and tblpatientdetails.fileId=tblwcpart1.fileId
   LEFT JOIN tblwcpart2 ON tblpatientdetails.pId = tblwcpart2.pId and tblpatientdetails.fileId=tblwcpart2.fileId
   LEFT JOIN tblwcpart3 ON tblpatientdetails.pId = tblwcpart3.pId and tblpatientdetails.fileId=tblwcpart3.fileId 
   LEFT JOIN tblwcpart4 ON tblpatientdetails.pId = tblwcpart4.pId and tblpatientdetails.fileId=tblwcpart4.fileId  
   LEFT JOIN tblwcpart5 ON tblpatientdetails.pId = tblwcpart5.pId and tblpatientdetails.fileId=tblwcpart5.fileId      
   LEFT JOIN tblwcpart6 ON tblpatientdetails.pId = tblwcpart6.pId and tblpatientdetails.fileId=tblwcpart6.fileId      
   WHERE tblpatient.isDeleted='N' AND tblpatient.id=? AND tblpatientdetails.fileId = ?");
$stmt1->execute([$_GET['id'],$_GET['fileId']]);
$patientDetails = $stmt1->fetch();

$stmt7 = $pdo->prepare("SELECT * FROM tblpatientdocs WHERE isDeleted='N'  AND pId=? AND fileId=? AND module='patient' ORDER BY id ASC");
$stmt7->execute([$_GET['id'],$_GET['fileId']]);
$generaldocs = $stmt7->fetchAll();

$stmt7 = $pdo->prepare("SELECT * FROM tblpatientdocs WHERE isDeleted='N'  AND pId=? AND fileId=? AND module='MedicationDocuments' ORDER BY id ASC");
$stmt7->execute([$_GET['id'],$_GET['fileId']]);
$medicaldocs = $stmt7->fetchAll();

$stmt7 = $pdo->prepare("SELECT * FROM tblpatientdocs WHERE isDeleted='N'  AND pId=? AND fileId=? AND module='ScreeningImmunizationDocuments' ORDER BY id ASC");
$stmt7->execute([$_GET['id'],$_GET['fileId']]);
$screeningdocs = $stmt7->fetchAll();

$stmt1 = $pdo->prepare("SELECT * from tblreimbursement      
                              WHERE pId=? and fileId=?");
$stmt1->execute([$_GET['id'],$_GET['fileId']]);
$repatientDetails = $stmt1->fetch();


   $stmtz1 = $pdo->prepare("SELECT * from tblphysicians      
                                 WHERE id=?");
   $stmtz1->execute([$repatientDetails['physicianId']]);
   $physicianDetails = $stmtz1->fetch();



   $stmt1 = $pdo->prepare("SELECT empId,userName from tbluser WHERE isDeleted='N'");
   $stmt1->execute();
   $employees = $stmt1->fetchAll();
} else {
   header("location:index.php");
}
?>
<style>
   ul.inbuiltwc fieldset span {
      display: -webkit-box;
   }

   ul.inbuiltwc fieldset span input {
      margin: 0px 10px;
   }

   .editWc span.nextline,
   .reviewform span.nextline {
      display: block !important;
   }

   .editWc span.nextline label,
   .reviewform span.nextline label {
      margin-left: 10px;
   }

   .row.mg10 {
      margin: 10px 0px;
   }

   .editWc .ftitle h3,
   .editWc h3.ftitle {
      font-size: 18px !important;
      padding: 5px 0px;
      font-weight: 600;
   }

   .editWc label.description,
   .editWc label {
      font-weight: 500 !important;
      font-size: 14px;
   }

   .editWc select.form-control,
   .editWc input.form-control,
   .editWc .select2-results__options li,
   .editWc .select2-search__field {
      font-size: 14px !important;
   }

   .editWc fieldset span {
      vertical-align: middle !important;
      display: inline-flex !important;
   }

   li.line {
      border: 1px solid #cccccc;
   }

   section.content.w70 {
      width: 80%;
      margin-left: 15%;
   }

   aside {
      width: 15%;
   }

   .myeditpatient span.req {
      line-height: 0px !important;
      padding: 0px !important;
      display: inline-flex !important;
      margin-left: 5px;
   }
</style>
<!-- form start -->

<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
   <!-- Content Header (Page header) -->
   <!-- Main content -->
   <section class="content myeditpatient w70">
      <div class="container-fluid">
         <div class="row">
            <!-- left column -->
            <div class="col-md-12">
               <!-- general form elements -->
               <div class="card card-default">
                  <div class="card-header">
                     <h3 class="card-title">Patient Details</h3>
                     <div class="offset-9">
                        <a href="patient_form_download.php?id=<?= $_GET['id']; ?>&fileId=<?=$_GET['fileId'];?>" target="_blank"
                           class="btn btn-default bg-gradient-default">Download</a>
                        <?php
                        $url = "../de/";
                        if (isset($_GET['token'])) {
                           $url = "../";
                        }
                        ?>
                        <a href="<?= $url; ?>" class="btn btn-default bg-gradient-default">Back</a>
                     </div>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body">
                     <div class="form-wizard">
                        <div class="steps" id="shift">
                           <ul>
                              <li>
                                 <span>1</span>
                                 Patient Info
                              </li>
                              <li>
                                 <span>2</span>
                                 Welcome Call
                              </li>
                              <li>
                                 <span>3</span>
                                 Reimbursement
                              </li>
                              <li>
                                 <span>4</span>
                                 Review
                              </li>
                           </ul>
                        </div>

                        <div class="editmycontainer myContainer">

                           <div class="form-container animated">
                              <h3 class="text-center ftitle">Create Account</h3>
                              <form method="POST" class="araddpatient editWc " enctype="multipart/form-data">
                                 <div class="row">

                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">First Name</label>
                                          <input disabled type="text" class="form-control" id='patientFName' required
                                             name="patientFName"
                                             value="<?php if (isset($patientDetails['firstName'])) {
                                                echo $patientDetails['firstName'];
                                             } ?>"
                                             placeholder="Enter Patient First Name">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">Last Name</label>
                                          <input disabled type="text" class="form-control" id='patientLName'
                                             value="<?php if (isset($patientDetails['lastName'])) {
                                                echo $patientDetails['lastName'];
                                             } ?>"
                                             name="patientLName" placeholder="Enter Patient Last Name">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">DOB</label>
                                          <input disabled type="date" class="form-control" id='dob' required
                                             value="<?php if (isset($patientDetails['dob'])) {
                                                echo $patientDetails['dob'];
                                             } ?>"
                                             name="dob" placeholder="Enter Patient DOB">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="gender">Gender</label>
                                          <select disabled class="form-control" id="gender" name="gender" required>
                                             <option value="">Select Gender</option>
                                             <option value="F" <?php if (isset($patientDetails['gender'])) {
                                                echo ($patientDetails['gender'] == 'F') ? 'selected' : '';
                                             } ?>>Female</option>
                                             <option value="M" <?php if (isset($patientDetails['gender'])) {
                                                echo ($patientDetails['gender'] == 'M') ? 'selected' : '';
                                             } ?>>Male</option>
                                             <option value="O" <?php if (isset($patientDetails['gender'])) {
                                                echo ($patientDetails['gender'] == 'O') ? 'selected' : '';
                                             } ?>>Other</option>
                                          </select>
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label>Mobile Number</label>
                                          <div class="input-group">
                                             <div class="input-group-prepend">
                                                <span class="input-group-text"><i class="fas fa-phone"></i></span>
                                             </div>
                                             <input disabled type="text" class="form-control"
                                                value="<?php if (isset($patientDetails['phone'])) {
                                                   echo $patientDetails['phone'];
                                                } ?>"
                                                name="phone" id="phone"
                                                data-inputmask="&quot;mask&quot;: &quot;(999) 999-9999&quot;"
                                                data-mask="" inputmode="text">
                                             <div class="invalid-feedback">Please enter phone number</div>
                                          </div>
                                          <!-- /.input group -->
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">Email</label>
                                          <input disabled type="email" class="form-control" id='email'
                                             value="<?php if (isset($patientDetails['email'])) {
                                                echo $patientDetails['email'];
                                             } ?>"
                                             required name="email" placeholder="Enter Patient Email">
                                       </div>
                                    </div>
                                    <div class="clearfix"></div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">Address 1</label>
                                          <input disabled type="text" class="form-control" id='address1'
                                             value="<?php if (isset($patientDetails['address1'])) {
                                                echo $patientDetails['address1'];
                                             } ?>"
                                             required name="address1" placeholder="Enter Address">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">Address 2</label>
                                          <input disabled type="text" class="form-control" id='address2'
                                             value="<?php if (isset($patientDetails['address2'])) {
                                                echo $patientDetails['address2'];
                                             } ?>"
                                             name="address2" placeholder="Enter Address">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">City</label>
                                          <input disabled type="text" class="form-control" id='city'
                                             value="<?php if (isset($patientDetails['city'])) {
                                                echo $patientDetails['city'];
                                             } ?>"
                                             required name="city" placeholder="Enter City">
                                       </div>
                                    </div>
                                    <div class="col-sm-6 fixselect">
                                       <div class="form-group">
                                          <label for="drugName">Province</label>
                                          <input disabled type="text" class="form-control" id='province'
                                             value="<?php if (isset($patientDetails['province'])) {
                                                echo $patientDetails['province'];
                                             } ?>"
                                             required name="province" placeholder="Enter Province">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="drugName">Postal Code</label>
                                          <input disabled type="text" class="form-control" id='postalCode'
                                             value="<?php if (isset($patientDetails['postalCode'])) {
                                                echo $patientDetails['postalCode'];
                                             } ?>"
                                             required name="postalCode" placeholder="Enter Postal Code">
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="krollId">Kroll ID </label>
                                          <input disabled type="text" class="form-control" id='krollId' required name="krollId"
                                             value="<?php if (isset($patientDetails['krollId'])) {
                                                echo $patientDetails['krollId'];
                                             } ?>"
                                             placeholder="Enter Kroll Id">
                                       </div>
                                    </div>
                                    <div class="clearfix"></div>
                                    <div class="col-sm-6 fixselect">
                                       <div class="form-group">
                                          <label for="medicationId">Medication</label>
                                          <select disabled class="form-control select2bs4" name='medicationId' required
                                             id="medicationId">
                                             <option>Select Medication</option>
                                             <?php foreach ($medications as $medication) { ?>
                                                <option value="<?php echo $medication['id']; ?>" <?php if (isset($patientDetails['medicationId'])) {
                                                      echo ($medication['id'] == $patientDetails['medicationId']) ? 'selected' : '';
                                                   } ?>><?php echo $medication['drugName']; ?></option>
                                             <?php } ?>
                                          </select>
                                       </div>
                                    </div>
                                    <div class="col-sm-6">
                                       <div class="form-group">
                                          <label for="paymentId">PSP</label>
                                          <select disabled class="form-control" name='pspId' required id="pspId">
                                             <option>Select PSP</option>
                                             <?php foreach ($psps as $psp) { ?>
                                                <option value="<?php echo $psp['id']; ?>" <?php if (isset($patientDetails['pspId'])) {
                                                      echo ($psp['id'] == $patientDetails['pspId']) ? 'selected' : '';
                                                   } ?>>
                                                   <?php echo $psp['pspName']; ?></option>
                                             <?php } ?>
                                          </select>
                                          <div id='pspDiv'></div>
                                       </div>
                                    </div>
                                 </div>
                                 <div class="row" id="fileInputs">
                                    <?php foreach ($generaldocs as $ge) { ?>
                                       <div class="col-md-5">
                                          <div class="form-group fileRow">
                                             <label for="paymentId">File Name (Title)</label>
                                             <select disabled disabled name="fileTitle[]" class="form-control">
                                                <option disabled>Select File Name</option>
                                                <option value="SA & PA" <?= ($ge['title'] == "SA & PA") ? 'selected' : ''; ?>>
                                                   SA & PA [special authorization & prior authorization (signed by MD or
                                                   not)]</option>
                                                <option value="LU code" <?= ($ge['title'] == "LU code") ? 'selected' : ''; ?>>
                                                   LU code</option>
                                                <option value="Medical clearance" <?= ($ge['title'] == "Medical clearance") ? 'selected' : ''; ?>>Medical clearance</option>
                                                <option value="TB test results" <?= ($ge['title'] == "TB test results") ? 'selected' : ''; ?>>TB test results</option>
                                                <option value="Lab requisitions" <?= ($ge['title'] == "Lab requisitions") ? 'selected' : ''; ?>>Lab requisitions</option>
                                                <option
                                                   value="EAP requests, approvals, denials, & requests for additional information"
                                                   <?= ($ge['title'] == "EAP requests, approvals, denials, & requests for additional information") ? 'selected' : ''; ?>>EAP requests, approvals,
                                                   denials, & requests for additional information</option>
                                                <option value="Consult/clinical notes" <?= ($ge['title'] == "Consult/clinical notes") ? 'selected' : ''; ?>>Consult/clinical notes</option>
                                                <option value="PSP packages" <?= ($ge['title'] == "PSP packages") ? 'selected' : ''; ?>>PSP packages</option>
                                                <option value="PSP requesting copy of current rx" <?= ($ge['title'] == "PSP requesting copy of current rx") ? 'selected' : ''; ?>>PSP requesting
                                                   copy of current rx</option>
                                                <option value="Compass packages" <?= ($ge['title'] == "Compass packages") ? 'selected' : ''; ?>>Compass packages</option>
                                                <option value="MD note" <?= ($ge['title'] == "MD note") ? 'selected' : ''; ?>>
                                                   MD note</option>
                                                <option value="PSP note" <?= ($ge['title'] == "PSP note") ? 'selected' : ''; ?>>PSP note</option>
                                                <option value="TDM requisition" <?= ($ge['title'] == "TDM requisition") ? 'selected' : ''; ?>>TDM requisition</option>
                                             </select>
                                          </div>
                                       </div>
                                       <div class="col-md-4">
                                          <div class="fileRow form-group">
                                             <label for="paymentId">File Attachment</label>
                                             <input disabled type="text" disabled name="files[]" readonly
                                                value="<?= $ge['filename']; ?>" class="form-control fileInput">
                                          </div>
                                       </div>
                                       <div class="right flex">
                                          <a class="btn btn-success"
                                             href="uploads/<?= $patientDetails['province']; ?><?= $patientDetails['krollId']; ?>/<?= $ge['filename']; ?>"
                                             download><i title="Download Attachment" class="fa fa-download"></i></a>
                                          <a class="btn btn-info text-white"
                                             href="uploads/<?= $patientDetails['province']; ?><?= $patientDetails['krollId']; ?>/<?= $ge['filename']; ?>"
                                             target="_blank"><i title="View Attachment" class="fa fa-eye"></i></a>
                                          
                                       </div>
                                    <?php } ?>
                                    
                                 </div>
                                 <div class="form-group col-md-12">
                                    <label for="switch">Notes</label>
                                    <textarea disabled class="form-control" name="notes" id="notes"
                                       rows="2"><?php if (isset($patientDetails['notes'])) {
                                          echo $patientDetails['notes'];
                                       } ?></textarea>
                                 </div>
                                 <ul class="inbuiltwc row">
                                    <li class="text-center ftitle accordion">
                                       <h3>Prescription Drug Information</h3>
                                    </li>


                                    <li class="col-md-4">
                                       <label class="description" for="patientDrugName">Drug Name: </label>
                                       <div>
                                          <select disabled disabled class="form-control form-control" id="patientDrugName"
                                             name="patientDrugName">
                                             <option value="">Select Drug</option>
                                             <?php foreach ($medications as $medication) { ?>
                                                <option value="<?php echo $medication['drugName']; ?>" <?php echo ($medication['drugName'] == $patientDetails['patientDrugName']) ? 'selected' : ''; ?>><?php echo $medication['drugName']; ?></option>
                                             <?php } ?>
                                          </select>
                                       </div>
                                    </li>

                                    <li class="col-md-4">
                                       <label class="description" for="dose">Dose: </label>
                                       <div>
                                          <input disabled id="dose" disabled name="dose" class="form-control" type="text"
                                             value="<?php echo $patientDetails['dosage']; ?>" autocomplete="off">
                                       </div>
                                    </li>
                                    <li class="clearfix"></li>
                                    <li class="col-md-4">
                                       <label class="description" for="roa">Route of Administration: </label>
                                       <div>
                                          <select disabled disabled class="form-control" id="roa" name="roa">
                                             <option value=""></option>
                                             <option value="Subcutaneous" <?php echo ("Subcutaneous" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>
                                                Subcutaneous</option>
                                             <option value="Intramuscular" <?php echo ("Intramuscular" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>Intramuscular</option>
                                             <option value="Intravenous" <?php echo ("Intravenous" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>
                                                Intravenous</option>
                                             <option value="Oral" <?php echo ("Oral" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>Oral</option>
                                          </select>
                                       </div>
                                    </li>


                                    <li class="clearfix"></li>

                                    <li class="col-md-6">
                                       <label class="description" for="prescriberName">Prescriber's Name : </label>
                                       <div>
                                          <input disabled disabled id="prescriberName" name="prescriberName" class="form-control"
                                             type="text" value="<?php echo $patientDetails['prescriberName']; ?>"
                                             autocomplete="off">
                                       </div>
                                    </li>

                                    <li class="col-md-6">
                                       <label class="description" for="prescriberSpecialty">Prescriber's Specialty:
                                       </label>
                                       <div>
                                          <input disabled disabled id="prescriberSpecialty" name="prescriberSpecialty"
                                             class="form-control" type="text"
                                             value="<?php echo $patientDetails['prescriberSpecialty']; ?>"
                                             autocomplete="off">
                                       </div>
                                    </li>

                                    <li class="col-md-6">
                                       <label class="description" for="team">Team: </label>
                                       <div>
                                          <input disabled disabled id="team" name="team" class="form-control" type="text"
                                             value="<?php echo $patientDetails['team']; ?>" autocomplete="off">
                                       </div>
                                    </li>

                                    <li class="col-md-6">
                                       <label class="description" for="staff">Staff: </label>
                                       <div>
                                          <input disabled disabled id="staff" name="staff" class="form-control" type="text"
                                             value="<?php echo $patientDetails['staff']; ?>" autocomplete="off">
                                       </div>
                                    </li>

                                    <li>
                                       <span class="description">Did Patient get Sample Dose from Prescribers office?
                                       </span>
                                       <div>
                                          <fieldset>

                                             <span class="flex">
                                                <input disabled disabled type="radio" id="yesDpgsd" <?php echo ("Y" == $patientDetails['presciberOffice']) ? 'checked' : ''; ?>
                                                   name="Dpgsd" value="Y" class="custom-radio">
                                                <label for="yesDpgsd" class="radio-label">Yes</label>
                                             </span>

                                             <span class="flex">
                                                <input disabled disabled type="radio" id="noDpgsd" <?php echo ("N" == $patientDetails['presciberOffice']) ? 'checked' : ''; ?>
                                                   name="Dpgsd" value="N" class="custom-radio">
                                                <label for="noDpgsd" class="radio-label">No</label>
                                             </span>
                                          </fieldset>
                                       </div>
                                    </li>

                                    <li class="sampleDosePrescriber col-md-4">
                                       <fieldset>
                                          <label class="smpDate">Date Patient Received Sample Dose: </label>
                                          <div>
                                             <input disabled disabled type="date" class="form-control" id="smpDate"
                                                value="<?php echo $patientDetails['sampleDoseReceived']; ?>"
                                                name="smpDate">
                                          </div>
                                       </fieldset>
                                    </li>

                                 </ul>
                                 <div class="form-group text-right mar-b-0">
                                    <input  type="button" value="NEXT" class="btn btn-default next">
                                   
                                 </div>
                              </form>
                           </div>


                           <div class="form-container animated">
                              <!--<h2 class="text-center form-title">Welcome Call</h2> -->
                              <!-- FORM SECTION -->
                              <div class="row">
                                 <form method="POST" class="araddpatient editWc " enctype="multipart/form-data">
                                    <!--NEW WELCOME CALL -->
                                    <ul class="inbuiltwc row">
                                       <li class="text-center ftitle accordion">
                                          <h3>Pre-Treatment Phase</h3>
                                       </li>
                                       <li>
                                          <p> Welcome Call, Counseling....</p>
                                       </li>
                                       <li class="col-md-4">
                                          <label class="description" for="entryDate">Entry Date: </label>
                                          <div>
                                             <input disabled type="date" class="form-control" id="entryDate" name="entryDate"
                                                value="<?= date('Y-m-d', strtotime($patientDetails['createdDate'])); ?>"
                                                readonly>
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="pfn">Patient First Name: </label>
                                          <div>
                                             <input disabled id="pfn" name="pfn" readonly="readonly" class="form-control"
                                                type="text" value="<?= $patientDetails['firstName']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="pmn">Patient Middle Name: </label>
                                          <div>
                                             <input disabled id="pmn" name="pmn" readonly="readonly" class="form-control"
                                                type="text" value="<?= $patientDetails['middleName']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="pln">Patient Last Name: </label>
                                          <div>
                                             <input disabled id="pln" name="pln" readonly="readonly" class="form-control"
                                                type="text" value="<?= $patientDetails['lastName']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>


                                       <li class="col-md-4">
                                          <label class="description" for="kpi">Kroll Patient ID: </label>
                                          <div>
                                             <input disabled id="kpi" name="kpi" readonly="readonly" class="form-control"
                                                type="text" value="<?= $patientDetails['krollId']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="pdob">Patient DOB: </label>
                                          <div>
                                             <input disabled type="date" class="form-control" id="pdob" name="pdob"
                                                value="<?= $patientDetails['dob']; ?>" readonly>
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="yob">Year of Birth </label>
                                          <div>
                                             <input disabled id="yob" name="yob" class="form-control" type="text"
                                                value="<?= date('Y', strtotime($patientDetails['dob'])); ?>" readonly
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="pgender">Gender: </label>
                                          <div>
                                             <select disabled class="form-control" readonly id="pgender" name="pgender">
                                                <option value="">Select Gender</option>
                                                <option value="F" <?php echo ($patientDetails['gender'] == 'F') ? 'selected' : 'disabled'; ?>>Female</option>
                                                <option value="M" <?php echo ($patientDetails['gender'] == 'M') ? 'selected' : 'disabled'; ?>>Male</option>
                                                <option value="O" <?php echo ($patientDetails['gender'] == 'O') ? 'selected' : 'disabled'; ?>>Other</option>
                                             </select>
                                          </div>
                                       </li>
                                       <!-- WC PART 1 -->
                                       <?php
                                       $firstAttemptContact = 'hidden';
                                       $secondAttemptContact = 'hidden';
                                       $thirdAttemptContact = 'hidden';
                                       $welcomeCallCompletionDate = 'hidden';
                                       $welcomeCallCompleteBy = 'hidden';
                                       if ($patientDetails['wcStatus'] == 2) {
                                          $firstAttemptContact = '';
                                       }
                                       if ($patientDetails['wcStatus'] == 3) {
                                          $firstAttemptContact = '';
                                          $secondAttemptContact = '';
                                       }
                                       if ($patientDetails['wcStatus'] == 4 || $patientDetails['wcStatus'] == 6) {
                                          $firstAttemptContact = '';
                                          $secondAttemptContact = '';
                                          $thirdAttemptContact = '';
                                       }
                                       if ($patientDetails['wcStatus'] == 5) {
                                          $welcomeCallCompletionDate = '';
                                          $welcomeCallCompleteBy = '';
                                       }
                                       ?>
                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Welcome Call
                                          </h3>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="wcStatus">Welcome Call Status: </label>
                                          <div>
                                             <select disabled class="form-control" id="wcStatus" name="wcStatus">
                                                <option value="1" <?= ($patientDetails['wcStatus'] == 1) ? 'selected' : '' ?>>New - Patient Not Yet Contacted</option>
                                                <option value="2" <?= ($patientDetails['wcStatus'] == 2) ? 'selected' : '' ?>>Pending - 1st Patient Contact Attempted</option>
                                                <option value="3" <?= ($patientDetails['wcStatus'] == 3) ? 'selected' : '' ?>>Pending - 2nd Patient Contact Attempted</option>
                                                <option value="4" <?= ($patientDetails['wcStatus'] == 4) ? 'selected' : '' ?>>Pending - 3rd Patient Contact Attempted</option>
                                                <option value="5" <?= ($patientDetails['wcStatus'] == 5) ? 'selected' : '' ?>>Complete - Contact Complete</option>
                                                <option value="6" <?= ($patientDetails['wcStatus'] == 6) ? 'selected' : '' ?>>Incomplete - Enrollment Discontinued - Patient Cannot be reached
                                                </option>
                                                <option value="7" <?= ($patientDetails['wcStatus'] == 7) ? 'selected' : '' ?>>Clarification: Waiting for information from prescriber</option>
                                                <option value="8" <?= ($patientDetails['wcStatus'] == 8) ? 'selected' : '' ?>>PPN: No welcome call required</option>
                                                <option value="9" <?= ($patientDetails['wcStatus'] == 9) ? 'selected' : '' ?>>Other pharmacy: No welcome call required</option>
                                                <option value="10" <?= ($patientDetails['wcStatus'] == 10) ? 'selected' : '' ?>>Patient not getting medication - closed</option>
                                                <option value="11" <?= ($patientDetails['wcStatus'] == 11) ? 'selected' : '' ?>>Entered in error - disregard</option>
                                                <option value="12" <?= ($patientDetails['wcStatus'] == 12) ? 'selected' : '' ?>>Pending patient update - patient contacted waiting for info
                                                </option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="wcsdd">Welcome Call Status Due Date: </label>
                                          <div>
                                             <input disabled type="date" class="form-control" id="wcsdd" name="wcsdd"
                                                value="<?= $patientDetails['wcStatusDueDate']; ?>"
                                                placeholder="Enter Welcome Call Status Due Date">
                                          </div>
                                       </li>
                                       <li class="clearfix">
                                       <li class="firstAttemptContact <?= $firstAttemptContact; ?> col-md-4">
                                          <fieldset>
                                             <label class="description" for="firstAttemptDatetime">1st Contact Attempt
                                                Date and Time: </label>
                                             <div>
                                                <input disabled type="datetime-local" class="form-control"
                                                   id="firstAttemptDatetime"
                                                   value="<?= $patientDetails['wcFirstAttempt']; ?>"
                                                   name="firstAttemptDatetime">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <li class="secondAttemptContact <?= $secondAttemptContact; ?> col-md-4">
                                          <fieldset>
                                             <label class="description" for="secondAttemptDatetime">2nd Contact Attempt
                                                Date and Time: </label>
                                             <div>
                                                <input disabled type="datetime-local" class="form-control"
                                                   id="secondAttemptDatetime"
                                                   value="<?= $patientDetails['wcSecondAttempt']; ?>"
                                                   name="secondAttemptDatetime">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <li class="thirdAttemptContact <?= $thirdAttemptContact; ?> col-md-4">
                                          <fieldset>
                                             <label class="description" for="thirdAttemptDatetime">3rd Contact Attempt
                                                Date and Time: </label>
                                             <div>
                                                <input disabled type="datetime-local" class="form-control"
                                                   id="thirdAttemptDatetime"
                                                   value="<?= $patientDetails['wcThirdAttempt']; ?>"
                                                   name="thirdAttemptDatetime">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="welcomeCallCompletionDate <?= $welcomeCallCompletionDate; ?> col-md-4">
                                          <fieldset>
                                             <label class="description" for="welcomeCallCompletionDate">Welcome Call
                                                Completion Date: </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="welcomeCallCompletionDate"
                                                   value="<?= $patientDetails['wcCompletionDate']; ?>"
                                                   name="welcomeCallCompletionDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li>
                                          <label class="description" for="wcn">Welcome Call Notes: </label>
                                          <div>
                                             <textarea disabled id="wcn" name="wcn" class="form-control" rows="8"
                                                cols="90"><?= $patientDetails['wcNotes']; ?></textarea>
                                          </div>
                                       </li>

                                       <li class="col-md-4 welcomeCallCompleteBy <?= $welcomeCallCompleteBy; ?>">
                                          <label class="description" for="wccb">Welcome Call Completed By: </label>
                                          <div class="fixselect">
                                             <select disabled class="form-control select2bs4" id="wccb" name="wccb">
                                                <option value="" <?= ($patientDetails['wcCompletedBy'] == "") ? 'selected' : '' ?>></option>
                                                <?php foreach ($employees as $emp) { ?>

                                                   <option value="<?= $emp['empId']; ?>"
                                                      <?= ($patientDetails['wcCompletedBy'] == $emp['empId']) ? 'selected' : '' ?>><?= $emp['userName']; ?></option>

                                                <?php } ?>
                                             </select>
                                          </div>
                                       </li>
                                       <!-- WC END PART 1 -->
                                       <!-- WC PART 2 -->
                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Patient Demographic Information:
                                          </h3>
                                       </li>

                                       <li>
                                          <label class="description" for="phcn">Provincial Health Card Number: </label>
                                          <div>
                                             <input disabled id="phcn" name="phcn" class="form-control" type="text"
                                                value="<?= $patientDetails['provincialHCN']; ?>" autocomplete="off">
                                          </div>
                                       </li>


                                       <li>
                                          <label class="description" for="psa">Patient Street Address: </label>
                                          <div>
                                             <input disabled id="psa" name="psa" class="form-control" type="text"
                                                value="<?= $patientDetails['address1']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li>
                                          <label class="description" for="al2">Address Line 2: </label>
                                          <div>
                                             <input disabled id="al2" name="al2" class="form-control" type="text"
                                                value="<?= $patientDetails['address2']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-6">
                                          <label class="description" for="pcity">City: </label>
                                          <div>
                                             <input disabled id="pcity" name="pcity" class="form-control" type="text"
                                                value="<?= $patientDetails['city']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-6">
                                          <label class="description" for="pprovince">Province: </label>
                                          <div>
                                             <input disabled id="pprovince" name="pprovince" class="form-control" type="text"
                                                value="<?= $patientDetails['province']; ?>" autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-6">
                                          <label class="description" for="ppostal">Postal: </label>
                                          <div>
                                             <input disabled id="ppostal" name="ppostal" class="form-control" type="text"
                                                value="<?= $patientDetails['postalCode']; ?>" autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-6">
                                          <fieldset>
                                             <div class="form-group">
                                                <label for="pphone">Patient Phone Number:</label>
                                                <div class="input-group">
                                                   <div class="input-group-prepend">
                                                      <span class="input-group-text"><i class="fas fa-phone"></i></span>
                                                   </div>
                                                   <input disabled type="text" class="form-control"
                                                      value="<?php if (isset($patientDetails['phone'])) {
                                                         echo $patientDetails['phone'];
                                                      } ?>"
                                                      name="pphone" id="phone"
                                                      data-inputmask="&quot;mask&quot;: &quot;(999) 999-9999&quot;"
                                                      data-mask="" value="<?= $patientDetails['phone']; ?>"
                                                      inputmode="text">
                                                   <div class="invalid-feedback">Please enter phone number</div>
                                                </div>
                                                <!-- /.input group -->
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix"></li>
                                       <li class="col-md-6">
                                          <label class="description" for="element_7">Patient Email: </label>
                                          <div>
                                             <input disabled id="element_7" name="element_7" class="form-control large"
                                                type="text" maxlength="255" value="<?= $patientDetails['email']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <?php
                                       $secondary = 'hidden';
                                       $ck = '';
                                       if ($patientDetails['sFirstName'] && $patientDetails['sRelationship']) {
                                          $secondary = '';
                                          $ck = 'checked';
                                       }

                                       ?>

                                       <li class="">
                                          <div>
                                             <fieldset>
                                                <span><input disabled id="asc" name="asc" <?= $ck; ?> class="form-checkbox"
                                                      type="checkbox" value="1" autocomplete="off">
                                                   <label class="choice" for="asc">Add Secondary Contact</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li class="<?= $secondary; ?> secondaryContact">
                                          <fieldset class="row">
                                             <label class="description">Name of Secondary Contact: </label>
                                             <div class="col-md-4">
                                                <input disabled id="noscf" name="noscf" type="text" class="form-control"
                                                   maxlength="255" size="8" value="<?= $patientDetails['sFirstName']; ?>"
                                                   autocomplete="off">
                                                <label for="noscf">First</label>
                                             </div>

                                             <div class="col-md-4">
                                                <input disabled id="noscl" name="noscl" type="text" class="form-control"
                                                   maxlength="255" size="14" value="<?= $patientDetails['sLastName']; ?>"
                                                   autocomplete="off">
                                                <label for="noscl">Last</label>
                                             </div>
                                             </span>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $secondary; ?> secondaryContact col-md-4">
                                          <fieldset>

                                             <label class="description" for="scpn">Secondary Contact Phone Number:
                                             </label>
                                             <div class="input-group">
                                                <div class="input-group-prepend">
                                                   <span class="input-group-text"><i class="fas fa-phone"></i></span>
                                                </div>
                                                <input disabled type="text" class="form-control" name="scpn" id="scpn"
                                                   value="<?= $patientDetails['sPhone']; ?>"
                                                   data-inputmask="&quot;mask&quot;: &quot;(999) 999-9999&quot;"
                                                   data-mask="" inputmode="text">
                                                <div class="invalid-feedback">Please enter phone number</div>
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $secondary; ?> secondaryContact col-md-4">
                                          <label class="description" for="sce">Secondary Contact Email: </label>
                                          <div>
                                             <input disabled id="sce" name="sce" class="form-control" type="text" maxlength="255"
                                                value="<?= $patientDetails['sEmail']; ?>" autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="<?= $secondary; ?> secondaryContact col-md-4">
                                          <label class="description" for="rtp">Relationship to Patient: </label>
                                          <div>
                                             <input disabled id="rtp" name="rtp" placeholderforcheck="" class="form-control"
                                                type="text" value="<?= $patientDetails['sRelationship']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="preferences">Preferences: </label>
                                          <div>
                                             <input disabled id="preferences" name="preferences" class="form-control" type="text"
                                                value="<?= $patientDetails['prefrences']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="text-center ftitle accordion">
                                          <h3>Medication &amp; Medical History Information</h3>
                                       </li>

                                       <li>
                                          <label class="description" for="ma">Medication Allergies: </label>
                                          <div>
                                             <textarea disabled id="ma" name="ma" placeholderforcheck="" class="form-control"
                                                rows="8"
                                                cols="90"><?= $patientDetails['medicationAllergies']; ?></textarea>
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="la">Latex Allergies: </label>
                                          <div>
                                             <select disabled class="form-control" id="la" name="la">
                                                <option value="" selected="selected"></option>
                                                <option value="Y" <?php echo ("Y" == $patientDetails['latexAllergies']) ? 'selected' : ''; ?>>Yes</option>
                                                <option value="N" <?php echo ("N" == $patientDetails['latexAllergies']) ? 'selected' : ''; ?>>No</option>
                                             </select>
                                             <!-- <textarea disabled id="la" name="la" class="form-control" rows="8" cols="90"><?= $patientDetails['latexAllergies']; ?></textarea> -->
                                          </div>
                                       </li>

                                       <li class="col-md-12">
                                          <label class="description">Medical Conditions </label>
                                          <div>
                                             <fieldset class="row">
                                                <div class="col-md-3">
                                                   <span class="webkitbox"><input disabled id="bloodClots" name="mc[]" <?php if (in_array("Blood Clots", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Blood Clots"
                                                         autocomplete="off">
                                                      <label for="bloodClots">Blood Clots</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="breastfeeding" name="mc[]" <?php if (in_array("Breast Feeding", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Breast Feeding"
                                                         autocomplete="off">
                                                      <label class="choice" for="breastfeeding">Breast Feeding</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="cancer" name="mc[]" <?php if (in_array("Cancer", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Cancer"
                                                         autocomplete="off">
                                                      <label class="choice" for="cancer">Cancer</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="diabetes" name="mc[]" <?php if (in_array("Diabetes", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Diabetes"
                                                         autocomplete="off">
                                                      <label class="choice" for="diabetes">Diabetes</label>
                                                   </span>

                                                </div>
                                                <div class="col-md-3">
                                                   <span class="webkitbox"><input disabled id="heartAttack" name="mc[]" <?php if (in_array("Heart attack", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Heart attack"
                                                         autocomplete="off">
                                                      <label class="choice" for="heartAttack">Heart Attack</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="heartDisease" name="mc[]" <?php if (in_array("Heart disease", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Heart disease"
                                                         autocomplete="off">
                                                      <label class="choice" for="heartDisease">Heart Disease</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="historyOfShingles" name="mc[]"
                                                         <?php if (in_array("History of Shingles", explode(",", $patientDetails['medicalConditions']))) {
                                                            echo "checked";
                                                         } ?>
                                                         class="form-checkbox" type="checkbox"
                                                         value="History of Shingles" autocomplete="off">
                                                      <label class="choice" for="historyOfShingles">History of
                                                         Shingles</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="hyperlipidemia" name="mc[]" <?php if (in_array("Hyperlipidemia", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Hyperlipidemia"
                                                         autocomplete="off">
                                                      <label class="choice" for="hyperlipidemia">Hyperlipidemia</label>
                                                   </span>
                                                </div>

                                                <div class="col-md-3">
                                                   <span class="webkitbox"><input disabled id="immuocompromised" name="mc[]"
                                                         <?php if (in_array("Immuocompromised", explode(",", $patientDetails['medicalConditions']))) {
                                                            echo "checked";
                                                         } ?>
                                                         class="form-checkbox" type="checkbox" value="Immuocompromised"
                                                         autocomplete="off">
                                                      <label class="choice"
                                                         for="immuocompromised">Immuocompromised</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="kidneyDisease" name="mc[]" <?php if (in_array("Kidney Disease", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Kidney Disease"
                                                         autocomplete="off">
                                                      <label class="choice" for="kidneyDisease">Kidney Disease</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="lactoseIntolerance" name="mc[]"
                                                         <?php if (in_array("Lactose Intolerance", explode(",", $patientDetails['medicalConditions']))) {
                                                            echo "checked";
                                                         } ?>
                                                         class="form-checkbox" type="checkbox"
                                                         value="Lactose Intolerance" autocomplete="off">
                                                      <label class="choice" for="lactoseIntolerance">Lactose
                                                         Intolerance</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="liverDisease" name="mc[]" <?php if (in_array("Liver Disease", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Liver Disease"
                                                         autocomplete="off">
                                                      <label class="choice" for="liverDisease">Liver Disease</label>
                                                   </span>
                                                </div>
                                                <div class="col-md-3">
                                                   <span class="webkitbox"><input disabled id="stroke" name="mc[]" <?php if (in_array("Stroke", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="Stroke"
                                                         autocomplete="off">
                                                      <label class="choice" for="stroke">Stroke</label>
                                                   </span>
                                                   <span class="webkitbox"><input disabled id="tb" name="mc[]" <?php if (in_array("TB", explode(",", $patientDetails['medicalConditions']))) {
                                                      echo "checked";
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="TB"
                                                         autocomplete="off">
                                                      <label class="choice" for="tb">TB</label>
                                                   </span>
                                                </div>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <li>
                                          <label class="description" for="mcco">Medical Conditions Comments/Other:
                                          </label>
                                          <div>
                                             <textarea disabled id="mcco" name="mcco" placeholderforcheck="" class="form-control"
                                                rows="8"
                                                cols="90"><?= $patientDetails['medicalConditionsComments']; ?></textarea>
                                          </div>
                                       </li>

                                       <li>
                                          <label class="description" for="currentMed">Current Medications (OTC,
                                             Prescribed, Herbal): </label>
                                          <div>
                                             <textarea disabled id="currentMed" name="currentMed" class="form-control" rows="8"
                                                cols="90"><?= $patientDetails['currentMedications']; ?></textarea>
                                          </div>
                                       </li>

                                       <li>
                                          <label for="pmmd" class="description">Patient Medical/Medication Documents:
                                          </label>

                                          <?php if (count($medicaldocs) > 0) {
                                             foreach ($medicaldocs as $md) { ?>
                                                <div class="row mg10">
                                                   <div class="col-md-6">
                                                      <input disabled type="text" disabled name="pmmd[]" multiple
                                                         class="form-control fileInput" value="<?= $md['filename']; ?>"
                                                         title="<?= $md['filename']; ?>" id="pmmd">
                                                   </div>
                                                   <div class="col-md-6">
                                                      <a class="btn btn-success"
                                                         href="uploads/<?= $patientDetails['province']; ?><?= $patientDetails['krollId']; ?>/<?= $md['module']; ?>/<?= $md['filename']; ?>"
                                                         download><i title="Download Attachment"
                                                            class="fa fa-download"></i></a>
                                                      <a class="btn btn-info text-white"
                                                         href="uploads/<?= $patientDetails['province']; ?><?= $patientDetails['krollId']; ?>/<?= $md['module']; ?>/<?= $md['filename']; ?>"
                                                         target="_blank"><i title="View Attachment" class="fa fa-eye"></i></a>
                                                     
                                                   </div>
                                                </div>
                                             <?php }
                                          } ?>
                                          
                                       </li>

                                       <li class="checkboxes col-md-12">
                                          <label class="description">Lifestyle </label>
                                          <div>
                                             <fieldset class="row">
                                                <span class="col-md-3 webkitbox"><input disabled id="smoking" name="lifestyle[]"
                                                      <?php if (in_array("Smoking/Vaping", explode(",", $patientDetails['lifestyle']))) {
                                                         echo "checked";
                                                      } ?>
                                                      class="form-checkbox" type="checkbox" value="Smoking/Vaping"
                                                      autocomplete="off">
                                                   <label class="choice" for="smoking">Smoking/Vaping</label>
                                                </span>
                                                <span class="col-md-3 webkitbox"><input disabled id="feeding" name="lifestyle[]"
                                                      <?php if (in_array("Breast Feeding", explode(",", $patientDetails['lifestyle']))) {
                                                         echo "checked";
                                                      } ?>
                                                      class="form-checkbox" type="checkbox" value="Breast Feeding"
                                                      autocomplete="off">
                                                   <label class="choice" for="feeding">Breast Feeding</label>
                                                </span>
                                                <span class="col-md-3 webkitbox"><input disabled id="pregnant" name="lifestyle[]"
                                                      <?php if (in_array("Pregnant", explode(",", $patientDetails['lifestyle']))) {
                                                         echo "checked";
                                                      } ?>
                                                      class="form-checkbox" type="checkbox" value="Pregnant"
                                                      autocomplete="off">
                                                   <label class="choice" for="pregnant">Pregnant</label>
                                                </span>
                                                <span class="col-md-3 webkitbox"><input disabled id="alcohol" name="lifestyle[]"
                                                      <?php if (in_array("Alcohol Use", explode(",", $patientDetails['lifestyle']))) {
                                                         echo "checked";
                                                      } ?>
                                                      class="form-checkbox" type="checkbox" value="Alcohol Use"
                                                      autocomplete="off">
                                                   <label class="choice" for="alcohol">Alcohol Use</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li>
                                          <label class="description" for="lc">Lifestyle Comments </label>
                                          <div>
                                             <textarea disabled id="lc" name="lc" placeholderforcheck="" class="form-control"
                                                rows="8" cols="90"><?= $patientDetails['lifestyleComments']; ?></textarea>
                                          </div>
                                       </li>

                                       <li class="text-center ftitle accordion">
                                          <h3>Pre-Biologic Medications</h3>
                                       </li>

                                       <li>
                                          <p>List all previous Medication(s) the patient has taken for their condition.
                                          </p>
                                       </li>
                                       <?php
                                       $previosMedications = explode(',', $patientDetails['pmName']);
                                       $pmDosage = explode(',', $patientDetails['pmDosage']);
                                       $pmSwitchReason = explode(',', $patientDetails['pmSwitchReason']);
                                       $pmStartDate = explode(',', $patientDetails['pmStartDate']);
                                       $pmEndDate = explode(',', $patientDetails['pmEndDate']);
                                       $confirmStartEndDate = explode(',', $patientDetails['confirmStartEndDate']);


                                       $previousMedCount = count($previosMedications);
                                       $j = 1;
                                       for ($i = 0; $i < $previousMedCount; $i++) {
                                          ?>

                                          <li class="prmedication" data-id="">
                                             <label class="description" for="pmpw<?= $j; ?>">Previous Medication #<?= $j; ?>
                                                Patient was on for their Condition: </label>
                                             <div>
                                                <input disabled id="pmpw<?= $j; ?>" name="pmpw[]" placeholder="Name of Drug"
                                                   class="form-control" type="text" value="<?= $previosMedications[$i]; ?>"
                                                   autocomplete="off">
                                             </div>
                                          </li>

                                          <li class="prmedication">
                                             <label class="description" for="pmdosage<?= $j; ?>">Previous Medication #1
                                                Dosage: </label>
                                             <div>
                                                <input disabled id="pmdosage<?= $j; ?>" name="pmdosage[]" class="form-control"
                                                   type="text" value="<?= $pmDosage[$i]; ?>" autocomplete="off">
                                             </div>
                                          </li>

                                          <li class="prmedication">
                                             <label class="description" for="wpsf<?= $j; ?>">Why did Patient switch from
                                                previous Medication #1? </label>
                                             <div>
                                                <input disabled id="wpsf<?= $j; ?>" name="wpsf[]" placeholderforcheck=""
                                                   class="form-control" type="text" value="<?= $pmSwitchReason[$i]; ?>"
                                                   autocomplete="off">
                                             </div>
                                          </li>
                                          <?php
                                          $doesNotKnow = '';
                                          $dndClass = '';
                                          if ($pmStartDate[$i] == "") {
                                             $doesNotKnow = 'checked';
                                             $dndClass = 'hidden';
                                          }

                                          ?>
                                          <li class="checkboxes prmedication">

                                             <div>
                                                <fieldset>
                                                   <span><input disabled id="pdkse<?= $j; ?>" name="pdkse[]" <?= $doesNotKnow; ?>
                                                         class="form-checkbox pdkse" type="checkbox" value="1"
                                                         autocomplete="off">
                                                      <label class="choice" for="pdkse<?= $j; ?>">Patient does not know
                                                         Start/End Date</label>
                                                   </span>
                                                </fieldset>
                                             </div>
                                          </li>


                                          <li class="pdkse<?= $j; ?> col-md-4 prmedication <?= $dndClass; ?>">
                                             <fieldset>
                                                <label class="description" for="pmsd<?= $j; ?>">Previous Medication #1 Start
                                                   Date: </label>
                                                <div>
                                                   <input disabled type="date" class="form-control" id="pmsd<?= $j; ?>"
                                                      value="<?= $pmStartDate[$i]; ?>" name="pmsd[]">
                                                </div>
                                             </fieldset>
                                          </li>

                                          <li class="pdkse<?= $j; ?> col-md-4 prmedication <?= $dndClass; ?>">
                                             <fieldset>
                                                <label class="pmed<?= $j; ?>">Previous Medication #1 End Date: </label>
                                                <div>
                                                   <input disabled type="date" class="form-control" id="pmed<?= $j; ?>" name="pmed[]"
                                                      value="<?= $pmEndDate[$i]; ?>"
                                                      placeholder="Previous Medication #1 End Date">
                                                </div>
                                             </fieldset>
                                          </li>


                                          <li class="checkboxes prmedication">
                                             <div>
                                                <fieldset>
                                                   <span><input disabled id="csephp<?= $j; ?>" name="csephp[]" <?php if ($confirmStartEndDate[$i] == "1") {
                                                      echo 'checked';
                                                   } ?>
                                                         class="form-checkbox" type="checkbox" value="1"
                                                         autocomplete="off">
                                                      <label class="choice" for="csephp<?= $j; ?>">Confirm Start/End Date
                                                         with Patient's Home Pharmacy</label>
                                                   </span>
                                                </fieldset>
                                             </div>
                                          </li>

                                          <li class="checkboxes prmedication">
                                             <div>
                                                <fieldset>
                                                   <span><input disabled id="adpm<?= $j; ?>" name="adpm<?= $j; ?>" data-id="<?= $j; ?>"
                                                         class="form-checkbox addpreviousMedication" type="checkbox"
                                                         value="<?= $j; ?>" autocomplete="off">
                                                      <label class="choice" for="adpm<?= $j; ?>">Add Additional Previous
                                                         Medication #<?= $j + 1; ?></label>
                                                   </span>
                                                </fieldset>
                                             </div>
                                          </li>
                                          <li>
                                             <hr>
                                             </hr>
                                          </li>
                                          <li class="hidden lastprmedication<?= $j; ?>">
                                          </li>
                                          <?php $j++;
                                       } ?>


                                       <li class="text-center ftitle accordion">
                                          <h3>Prescription Drug Information</h3>
                                       </li>


                                       <li class="col-md-4">
                                          <label class="description" for="patientDrugName">Drug Name: </label>
                                          <div>
                                             <select disabled class="form-control form-control" id="patientDrugName"
                                                name="patientDrugName">
                                                <option value="">Select Drug</option>
                                                <?php foreach ($medications as $medication) { ?>
                                                   <option value="<?php echo $medication['drugName']; ?>" <?php echo ($medication['drugName'] == $patientDetails['patientDrugName']) ? 'selected' : ''; ?>><?php echo $medication['drugName']; ?></option>
                                                <?php } ?>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="dose">Dose: </label>
                                          <div>
                                             <input disabled id="dose" name="dose" class="form-control" type="text"
                                                value="<?php echo $patientDetails['dosage']; ?>" autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="roa">Route of Administration: </label>
                                          <div>
                                             <select disabled class="form-control" id="roa" name="roa">
                                                <option value=""></option>
                                                <option value="Subcutaneous" <?php echo ("Subcutaneous" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>Subcutaneous</option>
                                                <option value="Intramuscular" <?php echo ("Intramuscular" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>Intramuscular</option>
                                                <option value="Intravenous" <?php echo ("Intravenous" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>Intravenous</option>
                                                <option value="Oral" <?php echo ("Oral" == $patientDetails['routeOfAdmin']) ? 'selected' : ''; ?>>Oral
                                                </option>
                                             </select>
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="pwkl">Patient Weight (kg/lb) </label>
                                          <div>
                                             <input disabled id="pwkl" name="pwkl" class="form-control" type="text"
                                                value="<?php echo $patientDetails['patientWeight']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="indication">Indication: </label>
                                          <div>
                                             <input disabled id="indication" name="indication" class="form-control" type="text"
                                                value="<?php echo $patientDetails['indication']; ?>" autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="oluse">Off-Label Use: </label>
                                          <div>
                                             <select disabled class="form-control" id="oluse" name="oluse">
                                                <option value="" selected="selected"></option>
                                                <option value="Y" <?php echo ("Y" == $patientDetails['offLabelUse']) ? 'selected' : ''; ?>>Yes</option>
                                                <option value="N" <?php echo ("N" == $patientDetails['offLabelUse']) ? 'selected' : ''; ?>>No</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-6">
                                          <label class="description" for="prescriberName">Prescriber's Name : </label>
                                          <div>
                                             <input disabled id="prescriberName" name="prescriberName" class="form-control"
                                                type="text" value="<?php echo $patientDetails['prescriberName']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-6">
                                          <label class="description" for="prescriberSpecialty">Prescriber's Specialty:
                                          </label>
                                          <div>
                                             <input disabled id="prescriberSpecialty" name="prescriberSpecialty"
                                                class="form-control" type="text"
                                                value="<?php echo $patientDetails['prescriberSpecialty']; ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-6">
                                          <label class="description" for="team">Team: </label>
                                          <div>
                                             <input disabled id="team" name="team" class="form-control" type="text"
                                                value="<?php echo $patientDetails['team']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-6">
                                          <label class="description" for="staff">Staff: </label>
                                          <div>
                                             <input disabled id="staff" name="staff" class="form-control" type="text"
                                                value="<?php echo $patientDetails['staff']; ?>" autocomplete="off">
                                          </div>
                                       </li>

                                       <li>
                                          <span class="description">Did Patient get Sample Dose from Prescribers office?
                                             </span>
                                          <div>
                                             <fieldset>

                                                <span class="flex">
                                                   <input disabled type="radio" id="yesDpgsd" <?php echo ("Y" == $patientDetails['presciberOffice']) ? 'checked' : ''; ?>
                                                      name="Dpgsd" value="Y" class="custom-radio">
                                                   <label for="yesDpgsd" class="radio-label">Yes</label>
                                                </span>

                                                <span class="flex">
                                                   <input disabled type="radio" id="noDpgsd" <?php echo ("N" == $patientDetails['presciberOffice']) ? 'checked' : ''; ?>
                                                      name="Dpgsd" value="N" class="custom-radio">
                                                   <label for="noDpgsd" class="radio-label">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li class="sampleDosePrescriber col-md-4">
                                          <fieldset>
                                             <label class="smpDate">Date Patient Received Sample Dose: </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="smpDate"
                                                   value="<?php echo $patientDetails['sampleDoseReceived']; ?>"
                                                   name="smpDate">
                                             </div>
                                          </fieldset>
                                       </li>


                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Pre-Treatment Phase
                                          </h3>
                                       </li>

                                       <li>
                                          <h4>Screening/Immunization</h4>
                                       </li>
                                       <?php

                                       $ScrnConfirmationDate = 'hidden';
                                       $screeningVaccinationRequired = 'hidden';
                                       $scrnImmFollowUpDate = 'hidden';

                                       if ($patientDetails['sis'] == 4) {
                                          $ScrnConfirmationDate = '';
                                       }
                                       if ($patientDetails['sis'] == 1 || $patientDetails['sis'] == 2) {
                                          $screeningVaccinationRequired = '';
                                          $scrnImmFollowUpDate = '';
                                       }
                                       ?>
                                       <li class="col-md-6">
                                          <label class="description" for="sis">Screening/Immunization Status: </label>
                                          <div>
                                             <select disabled class="form-control" id="sis" name="sis">
                                                <option value=" "></option>
                                                <option value="1" <?php echo ("1" == $patientDetails['sis']) ? 'selected' : ''; ?>>Pending - Screening/Immunization Required</option>
                                                <option value="2" <?php echo ("2" == $patientDetails['sis']) ? 'selected' : ''; ?>>Pending - Patient Update</option>
                                                <option value="3" <?php echo ("3" == $patientDetails['sis']) ? 'selected' : ''; ?>>Pending - Medical Clerance Received</option>
                                                <option value="4" <?php echo ("4" == $patientDetails['sis']) ? 'selected' : ''; ?>>Completed - Medical Clerance Confirmed</option>
                                                <option value="5" <?php echo ("5" == $patientDetails['sis']) ? 'selected' : ''; ?>>Screening/Immunization Not Required</option>
                                             </select>
                                          </div>
                                       </li>


                                       <li class="screeningVaccinationRequired <?= $screeningVaccinationRequired; ?>">
                                          <span class="description">Screenings/Vaccinations Required: </span>
                                          <div>
                                             <fieldset>
                                                <span><input disabled id="tbskin" name="svr[]" class="form-checkbox" <?php if (in_array("TB Skin", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="TB Skin"
                                                      autocomplete="off">
                                                   <label class="choice" for="tbskin">TB Skin</label>
                                                </span>
                                                <span><input disabled id="TBQ" name="svr[]" class="form-checkbox" <?php if (in_array("TBQ", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="TBQ" autocomplete="off">
                                                   <label class="choice" for="TBQ">TBQ</label>
                                                </span>
                                                <span><input disabled id="Chest" name="svr[]" class="form-checkbox" <?php if (in_array("Chest X-Ray", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Chest X-Ray"
                                                      autocomplete="off">
                                                   <label class="choice" for="Chest">Chest X-Ray</label>
                                                </span>
                                                <span><input disabled id="Shingrix" name="svr[]" class="form-checkbox" <?php if (in_array("Shingrix", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Shingrix"
                                                      autocomplete="off">
                                                   <label class="choice" for="Shingrix">Shingrix</label>
                                                </span>
                                                <span><input disabled id="HepatitisB" name="svr[]" class="form-checkbox" <?php if (in_array("Hepatitis B", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Hepatitis B"
                                                      autocomplete="off">
                                                   <label class="choice" for="HepatitisB">Hepatitis B</label>
                                                </span>
                                                <span><input disabled id="HepatitisC" name="svr[]" class="form-checkbox" <?php if (in_array("Hepatitis C", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Hepatitis C"
                                                      autocomplete="off">
                                                   <label class="choice" for="HepatitisC">Hepatitis C</label>
                                                </span>
                                                <span><input disabled id="HIV" name="svr[]" class="form-checkbox" <?php if (in_array("HIV", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="HIV" autocomplete="off">
                                                   <label class="choice" for="HIV">HIV</label>
                                                </span>
                                                <span><input disabled id="Prevnar" name="svr[]" class="form-checkbox" <?php if (in_array("Prevnar", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Prevnar"
                                                      autocomplete="off">
                                                   <label class="choice" for="Prevnar">Prevnar</label>
                                                </span>
                                                <span><input disabled id="Twinrix" name="svr[]" class="form-checkbox" <?php if (in_array("Twinrix", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Twinrix"
                                                      autocomplete="off">
                                                   <label class="choice" for="Twinrix">Twinrix</label>
                                                </span>
                                                <span><input disabled id="Other" name="svr[]" class="form-checkbox" <?php if (in_array("Other", explode(",", $patientDetails['svr']))) {
                                                   echo "checked";
                                                } ?> type="checkbox" value="Other" autocomplete="off">
                                                   <label class="choice" for="Other">Other</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li
                                          class="<?php if (in_array("TB Skin", explode(",", $patientDetails['svr']))) {
                                             echo "";
                                          } else {
                                             echo 'hidden';
                                          } ?> tbskinshow">
                                          <label class="description">TB Skin Screening Status </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="tbskinscreeningPending" <?php echo ("Pending" == $patientDetails['tbskinscreening']) ? 'checked' : ''; ?> name="tbskinscreening" class="custom-radio" type="radio"
                                                      value="Pending" autocomplete="off">
                                                   <label class="choice" for="tbskinscreeningPending">Pending</label>
                                                </span>
                                                <span><input disabled id="tbskinscreeningReceived" <?php echo ("Received" == $patientDetails['tbskinscreening']) ? 'checked' : ''; ?> name="tbskinscreening" class="custom-radio" type="radio"
                                                      value="Received" autocomplete="off">
                                                   <label class="choice" for="tbskinscreeningReceived">Received</label>
                                                </span>
                                                <span><input disabled id="tbskinscreeningConfirmed" <?php echo ("Confirmed" == $patientDetails['tbskinscreening']) ? 'checked' : ''; ?> name="tbskinscreening" class="custom-radio" type="radio"
                                                      value="Confirmed" autocomplete="off">
                                                   <label class="choice"
                                                      for="tbskinscreeningConfirmed">Confirmed</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <li
                                          class="<?php if (in_array("Chest X-Ray", explode(",", $patientDetails['svr']))) {
                                             echo "";
                                          } else {
                                             echo 'hidden';
                                          } ?>  chestxrayshow">
                                          <label class="description">Chest X-Ray Screening Status </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="CXSSPending" name="CXSS" <?php echo ("Pending" == $patientDetails['cxss']) ? 'checked' : ''; ?>
                                                      class="custom-radio" type="radio" value="Pending"
                                                      autocomplete="off">
                                                   <label class="choice" for="CXSSPending">Pending</label>
                                                </span>
                                                <span><input disabled id="CXSSReceived" name="CXSS" <?php echo ("Received" == $patientDetails['cxss']) ? 'checked' : ''; ?>
                                                      class="custom-radio" type="radio" value="Received"
                                                      autocomplete="off">
                                                   <label class="choice" for="CXSSReceived">Received</label>
                                                </span>
                                                <span><input disabled id="CXSSConfirmed" name="CXSS" <?php echo ("Confirmed" == $patientDetails['cxss']) ? 'checked' : ''; ?>
                                                      class="custom-radio" type="radio" value="Confirmed"
                                                      autocomplete="off">
                                                   <label class="choice" for="CXSSConfirmed">Confirmed</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li
                                          class="<?php if (in_array("Other", explode(",", $patientDetails['svr']))) {
                                             echo "";
                                          } else {
                                             echo 'hidden';
                                          } ?> otherScreenImm">
                                          <label class="description" for="osi">Other Screenings/Immunizations: </label>
                                          <div>
                                             <textarea disabled id="osi" name="osi" placeholderforcheck="" class="form-control"
                                                rows="8" cols="90"><?php echo $patientDetails['osi']; ?></textarea>
                                          </div>
                                       </li>

                                       <li class="col-md-6 scrnImmFollowUpDate <?= $scrnImmFollowUpDate; ?>">
                                          <label class="description" for="sisfupd">Screening/Immunization Status Follow
                                             Up Date: </label>
                                          <div>
                                             <input disabled type="date" class="form-control" id="sisfupd" name="sisfupd"
                                                value="<?php echo $patientDetails['sisfupd']; ?>"
                                                placeholder="Screening/Immunization Status Follow Up Date">
                                          </div>
                                       </li>

                                       <li class="">
                                          <label for="sid" class="description">Screening/Immunization Documentation:
                                          </label>

                                          <?php if (count($screeningdocs) > 0) {
                                             foreach ($screeningdocs as $md) { ?>
                                                <div class="row mg10">
                                                   <div class="col-md-6">
                                                      <input disabled type="text" disabled name="sid[]" multiple
                                                         class="form-control fileInput" value="<?= $md['filename']; ?>"
                                                         title="<?= $md['filename']; ?>" id="pmmd">
                                                   </div>
                                                   <div class="col-md-6">
                                                      <a class="btn btn-success"
                                                         href="uploads/<?= $patientDetails['province']; ?><?= $patientDetails['krollId']; ?>/<?= $md['module']; ?>/<?= $md['filename']; ?>"
                                                         download><i title="Download Attachment"
                                                            class="fa fa-download"></i></a>
                                                      <a class="btn btn-info text-white"
                                                         href="uploads/<?= $patientDetails['province']; ?><?= $patientDetails['krollId']; ?>/<?= $md['module']; ?>/<?= $md['filename']; ?>"
                                                         target="_blank"><i title="View Attachment" class="fa fa-eye"></i></a>
                                                     
                                                   </div>
                                                </div>
                                             <?php }
                                          } ?>


                                          
                                       </li>

                                       <li class="col-md-4 <?= $ScrnConfirmationDate; ?>">

                                          <label class="description" for="sicd">Screening/Immunization Confirmation
                                             Date: </label>
                                          <div>
                                             <input disabled type="date" class="form-control"
                                                value="<?php echo $patientDetails['sicd']; ?>" id="sicd" name="sicd"
                                                placeholder="Screening/Immunization Confirmation Date">
                                          </div>

                                       </li>

                                       <li class="clearfix"></li>


                                       <li class="col-md-4">
                                          <label class="description" for="mccb">Medical Clearance Confirmed By: </label>
                                          <div>
                                             <select disabled class="form-control" id="mccb" name="mccb">
                                                <option value="" <?php echo ("" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Medical Clearance Confirmed By</option>
                                                <option value="Jessie Reid" <?php echo ("Jessie Reid" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Jessie Reid
                                                </option>
                                                <option value="Jasmine Lu" <?php echo ("Jasmine Lu" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Jasmine Lu
                                                </option>
                                                <option value="Juwariah Mahmood" <?php echo ("Juwariah Mahmood" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Juwariah
                                                   Mahmood</option>
                                                <option value="Kam Bhucher" <?php echo ("Kam Bhucher" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Kam Bhucher
                                                </option>
                                                <option value="Lavina Chagani" <?php echo ("Lavina Chagani" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Lavina
                                                   Chagani</option>
                                                <option value="Nadia Abou Elnas" <?php echo ("Nadia Abou Elnas" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Nadia Abou
                                                   Elnas</option>
                                                <option value="Nadia Sutcliffe" <?php echo ("Nadia Sutcliffe" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Nadia
                                                   Sutcliffe</option>
                                                <option value="Nancy Moore" <?php echo ("Nancy Moore" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Nancy Moore
                                                </option>
                                                <option value="Namarit Rai" <?php echo ("Namarit Rai" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Namarit Rai
                                                </option>
                                                <option value="Prachi Patel" <?php echo ("Prachi Patel" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Prachi Patel
                                                </option>
                                                <option value="Ranvir Rai" <?php echo ("Ranvir Rai" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Ranvir Rai
                                                </option>
                                                <option value="Ryan Marsall" <?php echo ("Ryan Marsall" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Ryan Marsall
                                                </option>
                                                <option value="Sonia Sohal" <?php echo ("Sonia Sohal" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Sonia Sohal
                                                </option>
                                                <option value="Zunera Alim" <?php echo ("Zunera Alim" == $patientDetails['mccb']) ? 'selected' : ''; ?>>Zunera Alim
                                                </option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Counseling
                                          </h3>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="counselingStatus">Counseling Status: </label>
                                          <div>
                                             <select disabled class="form-control" id="counselingStatus" name="counselingStatus">
                                                <option value=""></option>
                                                <option <?php if (isset($patientDetails['counselingStatus'])) {
                                                   if ($patientDetails['counselingStatus'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="1">Pending - Not Yet Completed</option>
                                                <option <?php if (isset($patientDetails['counselingStatus'])) {
                                                   if ($patientDetails['counselingStatus'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="2">Completed - Counseling Complete
                                                </option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="csfud">Counseling Status Follow Up Date:
                                          </label>
                                          <input disabled type="date" class="form-control"
                                             value="<?php if (isset($patientDetails['csfud'])) {
                                                echo $patientDetails['csfud'];
                                             } ?>"
                                             id="csfud" name="csfud">
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">

                                          <label class="description" for="ccd">Counseling Completion Date: </label>
                                          <div>
                                             <input disabled type="date" class="form-control" id="ccd"
                                                value="<?php if (isset($patientDetails['ccd'])) {
                                                   echo $patientDetails['ccd'];
                                                } ?>"
                                                name="ccd" placeholder="Counseling Completion Date">
                                          </div>

                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="ccby">Counseling Completed By: </label>
                                          <div>
                                             <select disabled class="form-control" id="ccby" name="ccby">
                                                <option value="" selected="selected">Counseling Completed By</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Jessie Reid") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Jessie Reid">Jessie Reid</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Juwariah Mahmood") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Juwariah Mahmood">Juwariah
                                                   Mahmood</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Kam Bhucher") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Kam Bhucher">Kam Bhucher
                                                </option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Nadia Abou Elnas") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Nadia Abou Elnas">Nadia
                                                   Abou Elnas</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Nadia Sutcliffe") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Nadia Sutcliffe">Nadia
                                                   Sutcliffe</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Namarit Rai") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Nancy Moore">Namarit Rai</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Namarit Rai") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Namarit Rai">Namarit Rai</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Prachi Patel") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Prachi Patel">Prachi Patel
                                                </option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Ranvir Rai") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Ranvir Rai">Ranvir Rai</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Ryan Marsall") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Ryan Marsall">Ryan Marsall
                                                </option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Zunera Alim") {
                                                      echo 'selected';
                                                   }
                                                } ?>value="Sonia Sohal">Zunera Alim</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Zunera Alim") {
                                                      echo 'selected';
                                                   }
                                                } ?>value="Zunera Alim">Zunera Alim</option>
                                                <option <?php if (isset($patientDetails['ccby'])) {
                                                   if ($patientDetails['ccby'] == "Jasmine Lu") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="Jasmine Lu">Jasmine Lu</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li>
                                          <label class="description" for="counselingNotes">Counseling Notes: </label>
                                          <div>
                                             <textarea disabled id="counselingNotes" name="counselingNotes" class="form-control"
                                                rows="8"
                                                cols="90"><?php if (isset($patientDetails['counselingNotes'])) {
                                                   echo $patientDetails['counselingNotes'];
                                                } ?></textarea>
                                          </div>
                                       </li>

                                       <li>
                                          <label class="description" for="screeningImmunization">Screening/Immunization
                                             Status Notes: </label>
                                          <div>
                                             <textarea disabled id="screeningImmunization" name="screeningImmunization"
                                                class="form-control" rows="8"
                                                cols="90"><?php if (isset($patientDetails['screeningImmunization'])) {
                                                   echo $patientDetails['counselingNotes'];
                                                } ?></textarea>
                                          </div>
                                       </li>
                                    </ul>
                                    <div class="form-group text-center mar-b-0">
                                       <input  type="button" value="BACK" class="btn btn-warning back">
                                       <input  type="button" value="NEXT" class="btn btn-primary next">
                                      
                                    </div>

                                 </form>
                              </div>
                           </div>



                           <div class="form-container animated">
                              <!--<h2 class="text-center form-title">Welcome Call</h2> -->
                              <!-- FORM SECTION -->
                              <div class="row">
                                 <form method="POST" class="araddpatient editWc " enctype="multipart/form-data">

                                    <!--NEW WELCOME CALL -->
                                    <ul class="inbuiltwc row">



                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Coverage Details
                                          </h3>
                                       </li>

                                       <li>
                                          <label class="description" for="notesForNav">Notes For Navigator: </label>
                                          <div>
                                             <textarea disabled id="notesForNav" name="notesForNav" class="form-control" rows="8"
                                                cols="90"><?php if (isset($repatientDetails['notesForNav'])) {
                                                   echo $repatientDetails['notesForNav'];
                                                } ?></textarea>
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="reimbursementStatus">Reimbursement Status
                                          </label>
                                          <div>
                                             <select disabled class="form-control" id="reimbursementStatus"
                                                name="reimbursementStatus">
                                                <option value="" selected="selected"></option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="1">Pending - SA Submitted by RX Connect
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="2">Pending - SA Submitted by PSP</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="3">Pending - EAP Submitted</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="4">Pending - Limited Use Code</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="8">Pending - Appeal Submission</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="11">Pending - patient to be enrolled into
                                                   PSP</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="12">Pending - PSP to initiate SA process
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="13">Pending - patient to provide PSP with
                                                   more information</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="14">Pending - Patient to provide Rx
                                                   Connect with more information</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "15") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="15">Pending - Patient Signature</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="16">Pending - Physician Signature
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "17") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="17">Pending- Insurance decision</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="10">Complete - Free of Charge</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="6">Complete - Coverage Established
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="24">Complete - Coverage Established- PPN
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="25">Complete - Coverage Established - Not
                                                   using Rx Pharmacy</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="26">Complete- Coverage Established - Not
                                                   using Rx Connect</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="27">Complete- Compassionate</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "30") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="30">Patient prefers local pharmacy - No
                                                   reimb</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="7">Reimbursement Not Required</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="18">PSP to start EAP process</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "19") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="19">Rx Connect to start EAP Process
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="20">Rx Connect to start SA process
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "21") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="21">Pending EAP decision</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "22") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="22">Patient transfered out</option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="23">Pending Medical clearance from MD
                                                </option>
                                                <option <?php if (isset($repatientDetails['reimbursementStatus'])) {
                                                   if ($repatientDetails['reimbursementStatus'] == "37") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="37">Pending - Screening Test/Immunization
                                                </option>
                                             </select>
                                          </div>
                                       </li>
<li class="clearfix"></li>

                                       <li class="col-md-4">
                                       <label for="status">Patient Status:</label>
        <select disabled id="pstatus" class="form-control" name="pstatus">
            <option value="">Select Patient Status</option>
            <?php foreach($pstatus as $pa){ ?>
               <option <?php if (isset($repatientDetails['patientStatus'])) {
                                                   if ($repatientDetails['patientStatus'] == $pa['StatusID']) {
                                                      echo 'selected';
                                                   }
                                                } ?> value="<?=$pa['StatusID'];?>"><?=$pa['StatusName'];?></option>
            <?php } ?>
            <!-- Options will be dynamically populated via jQuery -->
        </select>

                                             </li>
                                             <li class="col-md-4">
        <label for="substatus">Patient Substatus:</label>
        <select disabled id="substatus" class="form-control" name="substatus" <?php if (isset($repatientDetails['patientSubStatus'])) { if ($repatientDetails['patientSubStatus'] == ''){echo 'disabled';} }?>>
            
            <?php if (isset($repatientDetails['patientSubStatus'])) {
               if ($repatientDetails['patientSubStatus'] != '') { ?>
            <option 
            <?php if (isset($repatientDetails['patientSubStatus'])) { echo 'selected';}?> 
            value="<?php if (isset($repatientDetails['patientSubStatus'])) { echo $repatientDetails['patientSubStatus'];}?>">
            <?php if (isset($repatientDetails['patientSubStatus'])) { echo getPatientSubStatus($pdo,$repatientDetails['patientSubStatus']);}?>
            </option>
            <?php } } else {?>
               <option value="">Select Substatus</option>
               <?php } ?>
            <!-- Options will be dynamically populated based on Patient Status -->
        </select>

                                             </li>
                                       <li>
                                          <label class="description" for="rsn">Reimbursement Status Notes: </label>
                                          <div>
                                             <textarea disabled id="rsn" name="rsn" class="form-control" rows="8"
                                                cols="90"><?php if (isset($repatientDetails['rsn'])) {
                                                   echo $repatientDetails['notesForNav'];
                                                } ?></textarea>
                                          </div>
                                       </li>

                                       <li class="col-md-5">
                                          <label class="description">Reimbursement Status Follow Up Date: </label>
                                          <input disabled type="date" class="form-control"
                                             value="<?php if (isset($repatientDetails['rsfud'])) {
                                                echo $repatientDetails['rsfud'];
                                             } ?>"
                                             id="rsfud" name="rsfud">
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description">Reimbursement Completion Date: </label>
                                          <input disabled type="date" class="form-control"
                                             value="<?php if (isset($repatientDetails['rcd'])) {
                                                echo $repatientDetails['rcd'];
                                             } ?>"
                                             id="rcd" name="rcd">
                                       </li>
                                       <li class="col-md-4">
                                          <label class="description">Reimbursement Completed By: </label>
                                          <select disabled class="form-control" id="rcby" name="rcby">

                                             <?php $rcby = '';
                                             if (isset($repatientDetails['rcby'])) {
                                                $rcby = $repatientDetails['rcby'];
                                             } ?>
                                             <option value="" <?= ($rcby == "") ? 'selected' : '' ?>></option>
                                             <?php foreach ($employees as $emp) { ?>
                                                <option value="<?= $emp['empId']; ?>" <?= ($rcby == $emp['empId']) ? 'selected' : '' ?>><?= $emp['userName']; ?></option>

                                             <?php } ?>
                                          </select>
                                       </li>

                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Physician Details
                                          </h3>
                                       </li>
                                       <li class="col-md-4 physicianId">
                                          <label class="description">Physician Name: </label>
                                          <select disabled class="form-control" id="physicianId" name="physicianId">

                                             <?php $physicianId = '';
                                             if (isset($repatientDetails['physicianId'])) {
                                                $physicianId = $repatientDetails['physicianId'];
                                             } ?>
                                             <option value="" <?= ($physicianId == "") ? 'selected' : '' ?>></option>
                                             <option value="0">Add New Physician</option>
                                             <?php foreach ($physicians as $physician) { ?>
                                                <option value="<?= $physician['id']; ?>" <?= ($physicianId == $physician['id']) ? 'selected' : '' ?>><?= $physician['firstName']; ?>
                                                   <?= $physician['lastName']; ?></option>

                                             <?php } ?>
                                          </select>
                                       </li>
                                       <li class="clearfix"></li>

                                       <li class="col-md-4 hidden customPhysician physicianDetails">
                                          <label class="description">Physician First Name: </label>
                                          <input disabled type="text" name="physicianFirstName" class="form-control"
                                             value="<?php if (isset($physicianDetails['firstName'])) {
                                                echo $physicianDetails['fullName'];
                                             } ?>"
                                             id="physicianFirstName">
                                       </li>
                                       <li class="col-md-4 hidden customPhysician physicianDetails">
                                          <label class="description">Physician Last Name: </label>
                                          <input disabled type="text" name="physicianLastName" class="form-control"
                                             value="<?php if (isset($physicianDetails['lastName'])) {
                                                echo $physicianDetails['lastName'];
                                             } ?>"
                                             id="physicianLastName">
                                       </li>
                                       <li class="clearfix"></li>

                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Hospital/Site : </label>
                                          <input disabled type="text" name="hospital" class="form-control"
                                             value="<?php if (isset($physicianDetails['hospital'])) {
                                                echo $physicianDetails['hospital'];
                                             } ?>"
                                             id="hospital">
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Primary Specialty: </label>
                                          <input disabled type="text" name="primarySpecialty" class="form-control"
                                             value="<?php if (isset($physicianDetails['primarySpecialty'])) {
                                                echo $physicianDetails['primarySpecialty'];
                                             } ?>"
                                             id="primarySpecialty">
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Street Address: </label>
                                          <input disabled type="text" name="physicianAddress" class="form-control"
                                             value="<?php if (isset($physicianDetails['streetAddress'])) {
                                                echo $physicianDetails['streetAddress'];
                                             } ?>"
                                             id="physicianAddress">
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician City: </label>
                                          <input disabled type="text" name="physicianCity" class="form-control"
                                             value="<?php if (isset($physicianDetails['city'])) {
                                                echo $physicianDetails['city'];
                                             } ?>"
                                             id="physicianCity">
                                       </li>

                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Province: </label>
                                          <select disabled class="form-control" name='physicianProvince' required
                                             id="physicianProvince">
                                             <option>Select Province</option>
                                             <?php foreach ($provinces as $province) { ?>
                                                <option <?php if (isset($physicianDetails['province'])) {
                                                   if ($physicianDetails['province'] == $province['provinceName']) {
                                                      echo 'selected';
                                                   }
                                                } ?> value="<?php echo $province['provinceName']; ?>">
                                                   <?php echo $province['provinceName']; ?></option>
                                             <?php } ?>
                                          </select>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Postal Code: </label>
                                          <input disabled type="text" name="physicianPostalCode" class="form-control"
                                             value="<?php if (isset($physicianDetails['postalCode'])) {
                                                echo $physicianDetails['postalCode'];
                                             } ?>"
                                             id="physicianPostalCode">
                                       </li>


                                       <li class="clearfix"></li>

                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Contact Number: </label>
                                          <input disabled type="text" name="physicianPhone" class="form-control"
                                             value="<?php if (isset($physicianDetails['phone'])) {
                                                echo $physicianDetails['phone'];
                                             } ?>"
                                             id="physicianPhone">
                                       </li>
                                       <li class="col-md-4 physicianDetails">
                                          <label class="description">Physician Email Address: </label>
                                          <input disabled type="email" name="physicianEmail" class="form-control"
                                             value="<?php if (isset($physicianDetails['email'])) {
                                                echo $physicianDetails['email'];
                                             } ?>"
                                             id="physicianEmail">
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="customPhysician hidden">
                                          <button name="submitPhysician" class="btn btn-primary"
                                             id="submitPhysician">Save</button>
                                          <button name="resetPhysician" class="btn btn-secondary"
                                             id="resetPhysician">Reset</button>
                                       </li>

                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             Pharmacy Details
                                          </h3>
                                       </li>
                                       <li class="col-md-4">
                                          <label class="description" for="pharmacyType">Pharmacy Type: </label>
                                          <div>
                                             <select disabled id="pharmacyType" name="pharmacyType" class="form-control"                                         
                                                autocomplete="off">
                                                   <option value="Rx Connect" <?php if (isset($repatientDetails['pharmacyType'])) { if($repatientDetails['pharmacyType']=='Rx Connect') { echo 'selected';} } ?>>Rx Connect</option>
                                                   <option value="Other" <?php if (isset($repatientDetails['pharmacyType'])) { if($repatientDetails['pharmacyType']=='Other') { echo 'selected';} } ?>>Other</option>
                                                </select>
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="pharmacyName">Pharmacy Name: </label>
                                          <div>
                                             <input disabled id="pharmacyName" name="pharmacyName" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['pharmacyName'])) {
                                                   echo $repatientDetails['pharmacyName'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="pharmacyPhone">Pharmacy Phone: </label>
                                          <div>
                                             <input disabled id="pharmacyPhone" name="pharmacyPhone" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['pharmacyPhone'])) {
                                                   echo $repatientDetails['pharmacyPhone'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="col-md-4">
                                          <label class="description" for="pharmacyFax">Pharmacy Fax: </label>
                                          <div>
                                             <input disabled id="pharmacyFax" name="pharmacyFax" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['pharmacyFax'])) {
                                                   echo $repatientDetails['pharmacyFax'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       
                                       <li class="text-center ftitle accordion">
                                          <h3>Clinic Details</h3>
                                       </li>
                                       <li class="col-md-4">
                                          <label class="description" for="treatmentFacilityName">Treatment Facility Name: </label>
                                          <div>
                                             <input disabled id="treatmentFacilityName" name="treatmentFacilityName" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['treatmentFacilityName'])) {
                                                   echo $repatientDetails['treatmentFacilityName'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="treatmentFacilityType">Treatment Facility Type: </label>
                                          <div>
                                             <input disabled id="treatmentFacilityType" name="treatmentFacilityType" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['treatmentFacilityType'])) {
                                                   echo $repatientDetails['treatmentFacilityType'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="treatmentFacilityProvince">Treatment Facility Province: </label>
                                          <div>
                                          <select disabled class="form-control" name='treatmentFacilityProvince' required
                                             id="treatmentFacilityProvince">
                                             <option>Select Province</option>
                                             <?php foreach ($provinces as $province) { ?>
                                                <option <?php if (isset($repatientDetails['treatmentFacilityProvince'])) {
                                                   if ($repatientDetails['treatmentFacilityProvince'] == $province['provinceName']) {
                                                      echo 'selected';
                                                   }
                                                } ?> value="<?php echo $province['provinceName']; ?>">
                                                   <?php echo $province['provinceName']; ?></option>
                                             <?php } ?>
                                          </select>
                                             
                                          </div>
                                       </li>
                                       <li class="col-md-4">
                                          <label class="description" for="treatmentFacilityPostalCode">Treatment Facility Postal Code: </label>
                                          <div>
                                             <input disabled id="treatmentFacilityPostalCode" name="treatmentFacilityPostalCode" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['treatmentFacilityPostalCode'])) {
                                                   echo $repatientDetails['treatmentFacilityPostalCode'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                    

                                       <li class="text-center ftitle accordion">
                                          <h3>Primary Plan</h3>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="ipal">Insurance Provider (all locations):
                                          </label>
                                          <div>
                                             <select disabled class="form-control" id="ipal" name="ipal">
                                                <option value="" <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "52") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="52">Adjudicare</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "57") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="57">Alberta Blue Cross (Group)</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "58") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="58">Alberta Blue Cross (Non group)
                                                </option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "53") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="53">Benecaid</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "59") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="59">BC Pharmacare</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="4">Canada Life</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="5">Chamber of Commerce</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="6">Claim secure</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="7">Coughlin Associates</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="8">Cowan Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="9">Desjardins</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="10">Equitable Life</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "39") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="39">Empire Life</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="11">Global Benefits</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="12">GMS Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="13">Greenshield</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="14">Group Medical Services</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "15") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="15">Group Premier Medical</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="16">Group Source</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "17") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="17">Industrial Alliance</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="18">Johnson cold - RTO</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "19") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="19">Johnston Group</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="20">La Survivance</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "21") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="21">Le Capital</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "22") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="22">Local 180/183</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="23">Manion Wilkens</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "43") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="43">MDM Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="24">Manulife</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="25">Manulife Affinity Markets</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="26">Medic Construction</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="27">NIHB</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "40") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="40">NexGenRx</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "47") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="47">ODB - Seniors</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "48") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="48">
                                                   ODB - OHIP+</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "49") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="49">
                                                   ODSP</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="28">
                                                   Ontario Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "29") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="29">Ontario Drug Plan</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "51") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="51">Ontario Works</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "30") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="30">OTIP - Ontario Teachers</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "61") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="61">Pacific Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "31") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="31">RBC Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "32") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="32">
                                                   Reliable</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "33") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="33">
                                                   Rwam</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "34") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="34">
                                                   Standard Life</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "35") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="35">
                                                   Sunlife</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "36") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="36">
                                                   The Cooperators</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "37") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="37">
                                                   Trillium</option>
                                                <option <?php if (isset($repatientDetails['ipal'])) {
                                                   if ($repatientDetails['ipal'] == "50") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="50">
                                                   Veterans Affairs Canada</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="Carrier">Carrier: </label>
                                          <div>
                                             <input disabled id="Carrier" name="Carrier" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['Carrier'])) {
                                                   echo $repatientDetails['Carrier'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="groupCN">Group/Contract Number: </label>
                                          <div>
                                             <input disabled id="groupCN" name="groupCN" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['groupCN'])) {
                                                   echo $repatientDetails['groupCN'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="">
                                          <label class="description" for="certificateNumber">Client ID/Certificate
                                             Number: </label>
                                          <div>
                                             <input disabled id="certificateNumber" name="certificateNumber"
                                                value="<?php if (isset($repatientDetails['certificateNumber'])) {
                                                   echo $repatientDetails['certificateNumber'];
                                                } ?>"
                                                class="form-control" type="text" value="" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="">
                                          <span class="description">Cardholder: </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="cardholderSelf" <?php if (isset($repatientDetails['cardholder'])) {
                                                   if ($repatientDetails['cardholder'] == "Self") {
                                                      echo 'checked';
                                                   }
                                                } ?>
                                                      name="cardholder" class="custom-radio" type="radio" value="Self"
                                                      autocomplete="off">
                                                   <label class="choice" for="cardholderSelf">Self</label>
                                                </span>
                                                <span><input disabled id="cardholderSpouse" name="cardholder"
                                                      class="custom-radio" type="radio" value="Spouse" <?php if (isset($repatientDetails['cardholder'])) {
                                                         if ($repatientDetails['cardholder'] == "Spouse") {
                                                            echo 'checked';
                                                         }
                                                      } ?>
                                                      autocomplete="off">
                                                   <label class="choice" for="cardholderSpouse">Spouse</label>
                                                </span>
                                                <span><input disabled id="cardholderDependent" name="cardholder"
                                                      class="custom-radio" type="radio" value="Dependent" <?php if (isset($repatientDetails['cardholder'])) {
                                                         if ($repatientDetails['cardholder'] == "Dependent") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="cardholderDependent">Dependent</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $cardholder1 = 'hidden';
                                       if (isset($repatientDetails['cardholder'])) {
                                          if ($repatientDetails['cardholder'] == "Spouse") {
                                             $cardholder1 = '';
                                          }
                                       }
                                       if (isset($repatientDetails['cardholder'])) {
                                          if ($repatientDetails['cardholder'] == "Dependent") {
                                             $cardholder1 = '';
                                          }
                                       }
                                       ?>
                                       <li class="<?= $cardholder1; ?> cardholderShow">
                                          <fieldset>
                                             <label class="description">Cardholder Name (Primary): </label>
                                             <div class="row">
                                                <span class="col-md-4 simple_name_1 nextline">
                                                   <input disabled id="cardFirst" name="cardholderName1" type="text"
                                                      value="<?php if (isset($repatientDetails['cardholderName1'])) {
                                                         echo $repatientDetails['cardholderName1'];
                                                      } ?>"
                                                      class="form-control" maxlength="125" size="8" value=""
                                                      autocomplete="off">
                                                   <label class="" for="cardFirst">First</label>
                                                </span>

                                                <span class="col-md-4 simple_name_2 nextline">
                                                   <input disabled id="cardLast" name="cardholderName2" type="text"
                                                      value="<?php if (isset($repatientDetails['cardholderName2'])) {
                                                         echo $repatientDetails['cardholderName2'];
                                                      } ?>"
                                                      class="form-control" maxlength="125" size="14" value=""
                                                      autocomplete="off">
                                                   <label for="cardLast">Last</label>
                                                </span>
                                             </div>

                                          </fieldset>
                                       </li>

                                       <li class="<?= $cardholder1; ?> col-md-4 cardholderShow">
                                          <fieldset>
                                             <label class="description">Cardholder Date of Birth (Primary): </label>
                                             <input disabled type="date" class="form-control" id="cardholderDOB"
                                                value="<?php if (isset($repatientDetails['cardholderDOB'])) {
                                                   echo $repatientDetails['cardholderDOB'];
                                                } ?>"
                                                name="cardholderDOB">
                                          </fieldset>
                                       </li>
                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="coveragePercentage">Coverage percentage:
                                          </label>
                                          <div class="inline-flex">

                                             <input disabled id="coveragePercentage" name="coveragePercentage"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['coveragePercentage'])) {
                                                   echo $repatientDetails['coveragePercentage'];
                                                } ?>"
                                                autocomplete="off">
                                             <span class="block right">%</span>
                                          </div>
                                       </li>
                                       <li id="li_298" class="col-md-4">
                                          <label class="description" for="coinsurancePayment">Coinsurance payment:
                                          </label>
                                          <div class="inline-flex">
                                             <span class="block">$</span>
                                             <input disabled id="coinsurancePayment" name="coinsurancePayment"
                                                value="<?php if (isset($repatientDetails['coinsurancePayment'])) {
                                                   echo asDollarsx($repatientDetails['coinsurancePayment']);
                                                } ?>"
                                                class="form-control " type="text" value="" autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="deductible">Deductible: </label>
                                          <div>
                                             <input disabled id="deductible" name="deductible" class="form-control"
                                                value="<?php if (isset($repatientDetails['deductible'])) {
                                                   echo $repatientDetails['deductible'];
                                                } ?>"
                                                type="text" value="" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="annualMax">Annual Max: </label>
                                          <div>
                                             <input disabled id="annualMax" name="annualMax" class="form-control"
                                                value="<?php if (isset($repatientDetails['annualMax'])) {
                                                   echo $repatientDetails['annualMax'];
                                                } ?>"
                                                type="text" value="" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="lifetimeMax">Lifetime Max: </label>
                                          <div>
                                             <input disabled id="lifetimeMax" name="lifetimeMax" class="form-control"
                                                value="<?php if (isset($repatientDetails['lifetimeMax'])) {
                                                   echo $repatientDetails['lifetimeMax'];
                                                } ?>"
                                                type="text" value="" autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="copayMax">Copay Max (Sliding Copay): </label>
                                          <div>
                                             <input disabled id="copayMax" name="copayMax" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['copayMax'])) {
                                                   echo $repatientDetails['copayMax'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="">
                                          <span class="description">SA/EAP Required (Primary Plan)? </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="sarequiredYes" name="sarequired" class="custom-radio"
                                                      type="radio" value="Y" <?php if (isset($repatientDetails['sarequired'])) {
                                                         if ($repatientDetails['sarequired'] == "Y") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="sarequiredYes">Yes</label>
                                                </span>
                                                <span><input disabled id="sarequiredNo" name="sarequired" class="custom-radio"
                                                      type="radio" value="N" <?php if (isset($repatientDetails['sarequired'])) {
                                                         if ($repatientDetails['sarequired'] == "N") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="sarequiredNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $sarequiredshow = 'hidden';
                                       if (isset($repatientDetails['sarequired'])) {
                                          if ($repatientDetails['sarequired'] == "Y") {
                                             $sarequiredshow = '';
                                          }
                                       } ?>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description" id="dAppealSub">SA Initiated Date (Primary):
                                             </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="dAppealSub"
                                                   value="<?php if (isset($repatientDetails['dAppealSub'])) {
                                                      echo $repatientDetails['dAppealSub'];
                                                   } ?>"
                                                   name="dAppealSub">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequiredshow; ?> sarequiredshow"></li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description" id="saMdSentDate">SA Sent to MD Date (Primary):
                                             </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdSentDate"
                                                   value="<?php if (isset($repatientDetails['saMdSentDate'])) {
                                                      echo $repatientDetails['saMdSentDate'];
                                                   } ?>"
                                                   name="saMdSentDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description" id="saMdReceivedDate">SA Received by MD Date
                                                (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdReceivedDate"
                                                   value="<?php if (isset($repatientDetails['saMdReceivedDate'])) {
                                                      echo $repatientDetails['saMdReceivedDate'];
                                                   } ?>"
                                                   name="saMdReceivedDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequiredshow; ?> sarequiredshow"></li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description" id="saPatientSentDate">SA Sent to Patient Date
                                                (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientSentDate"
                                                   value="<?php if (isset($repatientDetails['saPatientSentDate'])) {
                                                      echo $repatientDetails['saPatientSentDate'];
                                                   } ?>"
                                                   name="saPatientSentDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description" id="saPatientReceivedDate">SA Received by
                                                Patient Date (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientReceivedDate"
                                                   value="<?php if (isset($repatientDetails['saPatientReceivedDate'])) {
                                                      echo $repatientDetails['saPatientReceivedDate'];
                                                   } ?>"
                                                   name="saPatientReceivedDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequiredshow; ?> sarequiredshow"></li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Submission Date (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapSub"
                                                   value="<?php if (isset($repatientDetails['saEapSub'])) {
                                                      echo $repatientDetails['saEapSub'];
                                                   } ?>"
                                                   name="saEapSub">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Outcome Date (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapOutcome"
                                                   value="<?php if (isset($repatientDetails['saEapOutcome'])) {
                                                      echo $repatientDetails['saEapOutcome'];
                                                   } ?>"
                                                   name="saEapOutcome">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequiredshow; ?> sarequiredshow"></li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Date (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpiry"
                                                   value="<?php if (isset($repatientDetails['saEapExpiry'])) {
                                                      echo $repatientDetails['saEapExpiry'];
                                                   } ?>"
                                                   name="saEapExpiry">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>

                                             <label class="description">SA/EAP Expiry Follow Up Date (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpF"
                                                   value="<?php if (isset($repatientDetails['saEapExpF'])) {
                                                      echo $repatientDetails['saEapExpF'];
                                                   } ?>"
                                                   name="saEapExpF">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequiredshow; ?> sarequiredshow"></li>

                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <label class="description" for="luCode">LU Code (Primary): </label>
                                          <div>
                                             <input disabled id="luCode" name="luCode" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['luCode'])) {
                                                   echo $repatientDetails['luCode'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>



                                       <li class="<?= $sarequiredshow; ?> col-md-4 sarequiredshow">
                                          <fieldset>

                                             <label class="description">LU Expiry Date (Primary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="luExpiry"
                                                   value="<?php if (isset($repatientDetails['luExpiry'])) {
                                                      echo $repatientDetails['luExpiry'];
                                                   } ?>"
                                                   name="luExpiry">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <!-- <li class="hidden sarequiredshow">
                                       <fieldset>
                                          <label class="description" id="dAppealSub">Date Appeal Submitted (Primary): </label>
                                          <div>
                                             <input disabled type="date" class="form-control" id="dAppealSub" value="<?php if (isset($repatientDetails['dAppealSub'])) {
                                                echo $repatientDetails['dAppealSub'];
                                             } ?>" name="dAppealSub">
                                          </div>
                                       </fieldset>
                                    </li> -->


                                       <li class="">
                                          <label class="description">Does Patient Have a Secondary Plan? </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="dphspYes" name="dphsp" class="custom-radio"
                                                      type="radio" value="Y" <?php if (isset($repatientDetails['dphsp'])) {
                                                         if ($repatientDetails['dphsp'] == "Y") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="dphspYes">Yes</label>
                                                </span>
                                                <span><input disabled id="dphspNo" name="dphsp" class="custom-radio" type="radio"
                                                      value="N" <?php if (isset($repatientDetails['dphsp'])) {
                                                         if ($repatientDetails['dphsp'] == "N") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="dphspNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <!--Secondary Start -->
                                       <?php $secondaryShow = 'hidden';
                                       if (isset($repatientDetails['dphsp'])) {
                                          if ($repatientDetails['dphsp'] == "Y") {
                                             $secondaryShow = '';
                                          }
                                       } ?>
                                       <li class="text-center ftitle accordion <?= $secondaryShow; ?> secondaryShow">
                                          <h3>Secondary Plan</h3>
                                       </li>

                                       <li class="col-md-6  <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="ipal_secondary">Secondary Insurance Provider
                                             (all locations): </label>
                                          <div>
                                             <select disabled class="form-control" id="ipal_secondary" name="ipal_secondary">
                                                <option value="" <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "52") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="52">Adjudicare</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "57") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="57">Alberta Blue Cross (Group)</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "58") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="58">Alberta Blue Cross (Non group)
                                                </option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "53") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="53">Benecaid</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "59") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="59">BC Pharmacare</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="4">Canada Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="5">Chamber of Commerce</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="6">Claim secure</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="7">Coughlin Associates</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="8">Cowan Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="9">Desjardins</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="10">Equitable Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "39") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="39">Empire Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="11">Global Benefits</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="12">GMS Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="13">Greenshield</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="14">Group Medical Services</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "15") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="15">Group Premier Medical</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="16">Group Source</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "17") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="17">Industrial Alliance</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="18">Johnson cold - RTO</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "19") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="19">Johnston Group</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="20">La Survivance</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "21") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="21">Le Capital</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "22") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="22">Local 180/183</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="23">Manion Wilkens</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "43") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="43">MDM Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="24">Manulife</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="25">Manulife Affinity Markets</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="26">Medic Construction</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="27">NIHB</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "40") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="40">NexGenRx</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "47") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="47">ODB - Seniors</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "48") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="48">ODB - OHIP+</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "49") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="49">ODSP</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="28">Ontario Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "29") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="29">Ontario Drug Plan</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "51") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="51">Ontario Works</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "30") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="30">OTIP - Ontario Teachers</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "61") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="61">Pacific Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "31") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="31">RBC Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "32") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="32">Reliable</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "33") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="33">Rwam</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "34") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="34">Standard Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "35") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="35">Sunlife</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "36") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="36">The Cooperators</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "37") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="37">Trillium</option>
                                                <option <?php if (isset($repatientDetails['ipal_secondary'])) {
                                                   if ($repatientDetails['ipal_secondary'] == "50") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="50">Veterans Affairs Canada</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix <?= $secondaryShow; ?> secondaryShow"></li>

                                       <li class="col-md-4 <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="Carrier_secondary">Carrier (Secondary Plan):
                                          </label>
                                          <div>
                                             <input disabled id="Carrier_secondary" name="Carrier_secondary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['Carrier_secondary'])) {
                                                   echo $repatientDetails['Carrier_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-5 <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="groupCN_secondary">Group/Contract Number
                                             (Secondary): </label>
                                          <div>
                                             <input disabled id="groupCN_secondary" name="groupCN_secondary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['groupCN_secondary'])) {
                                                   echo $repatientDetails['groupCN_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="certificateNumber_secondary">Client
                                             ID/Certificate Number (Secondary): </label>
                                          <div>
                                             <input disabled id="certificateNumber_secondary" name="certificateNumber_secondary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['certificateNumber_secondary'])) {
                                                   echo $repatientDetails['certificateNumber_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $secondaryShow; ?> secondaryShow">
                                          <span class="description">Cardholder (Secondary): </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="cardholderSelf_secondary" <?php if (isset($repatientDetails['cardholderSelf_secondary'])) {
                                                      if ($repatientDetails['cardholder_secondary'] == "Self") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="cardholder_secondary" class="custom-radio"
                                                      type="radio" value="Self" autocomplete="off">
                                                   <label class="choice" for="cardholderSelf_secondary">Self</label>
                                                </span>
                                                <span>
                                                   <input disabled id="cardholderSpouse_secondary" name="cardholder_secondary"
                                                      class="custom-radio" type="radio" <?php if (isset($repatientDetails['cardholder_secondary'])) {
                                                         if ($repatientDetails['cardholder_secondary'] == "Spouse") {
                                                            echo 'checked';
                                                         }
                                                      } ?> value="Spouse" autocomplete="off">
                                                   <label class="choice" for="cardholderSpouse_secondary">Spouse</label>
                                                </span>
                                                <span>
                                                   <input disabled id="cardholderDependent_secondary" name="cardholder_secondary"
                                                      class="custom-radio" type="radio" value="Dependent" <?php if (isset($repatientDetails['cardholder_secondary'])) {
                                                         if ($repatientDetails['cardholder_secondary'] == "Dependent") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice"
                                                      for="cardholderDependent_secondary">Dependent</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $cardholder2 = 'hidden';
                                       if (isset($repatientDetails['cardholder_secondary'])) {
                                          if ($repatientDetails['cardholder_secondary'] == "Spouse") {
                                             $cardholder2 = '';
                                          }
                                       }
                                       if (isset($repatientDetails['cardholder_secondary'])) {
                                          if ($repatientDetails['cardholder_secondary'] == "Dependent") {
                                             $cardholder2 = '';
                                          }
                                       }
                                       ?>
                                       <li class="<?= $cardholder2; ?> cardholder_secondaryShow">
                                          <fieldset>
                                             <label class="description">Cardholder Name (Secondary): </label>

                                             <div class="row">
                                                <span class="col-md-4 simple_name_1 nextline">
                                                   <input disabled id="cardSecondaryFirst" name="cardholderSecondaryName1"
                                                      type="text"
                                                      value="<?php if (isset($repatientDetails['cardholderSecondaryName1'])) {
                                                         echo $repatientDetails['cardholderSecondaryName1'];
                                                      } ?>"
                                                      class="form-control" maxlength="125" size="8" value=""
                                                      autocomplete="off">
                                                   <label for="cardSecondaryFirst">First</label>
                                                </span>

                                                <span class="col-md-4 simple_name_2 nextline">
                                                   <input disabled id="cardSecondaryLast" name="cardholderSecondaryName2"
                                                      type="text"
                                                      value="<?php if (isset($repatientDetails['cardholderSecondaryName2'])) {
                                                         echo $repatientDetails['cardholderSecondaryName2'];
                                                      } ?>"
                                                      class="form-control" maxlength="125" size="14" value=""
                                                      autocomplete="off">
                                                   <label for="cardSecondaryLast">Last</label>
                                                </span>
                                             </div>

                                          </fieldset>
                                       </li>

                                       <li class="<?= $cardholder2; ?> col-md-4 cardholder_secondaryShow">
                                          <fieldset>
                                             <label class="description">Cardholder Date of Birth (Secondary): </label>
                                             <input disabled type="date" class="form-control" id="cardholderSecondaryDOB"
                                                value="<?php if (isset($repatientDetails['cardholderSecondaryDOB'])) {
                                                   echo $repatientDetails['cardholderSecondaryDOB'];
                                                } ?>"
                                                name="cardholderSecondaryDOB">
                                          </fieldset>
                                       </li>
                                       <li class="clearfix  <?= $secondaryShow; ?> secondaryShow"></li>


                                       <li class="col-md-4 <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="coveragePercentage_secondary">Coverage
                                             percentage (Secondary): </label>
                                          <div class="inline-flex">
                                             <input disabled id="coveragePercentage_secondary"
                                                name="coveragePercentage_secondary" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['coveragePercentage_secondary'])) {
                                                   echo $repatientDetails['coveragePercentage_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                             <span class="block right">%</span>
                                          </div>
                                       </li>





                                       <li class="col-md-4 <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="deductible_secondary">Deductible (Secondary):
                                          </label>
                                          <div>
                                             <input disabled id="deductible_secondary" name="deductible_secondary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['deductible_secondary'])) {
                                                   echo $repatientDetails['deductible_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix  <?= $secondaryShow; ?> secondaryShow"></li>
                                       <li class="col-md-4  hidden secondaryShow">
                                          <label class="description" for="annualMax_secondary">Annual Max (Secondary):
                                          </label>
                                          <div>
                                             <input disabled id="annualMax_secondary" name="annualMax_secondary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['annualMax_secondary'])) {
                                                   echo $repatientDetails['annualMax_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="clearfix  <?= $secondaryShow; ?> secondaryShow"></li>
                                       <li class="col-md-4  <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="lifetimeMax_secondary">Lifetime Max
                                             (Secondary): </label>
                                          <div>
                                             <input disabled id="lifetimeMax_secondary" name="lifetimeMax_secondary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['lifetimeMax_secondary'])) {
                                                   echo $repatientDetails['lifetimeMax_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-5  <?= $secondaryShow; ?> secondaryShow">
                                          <label class="description" for="copayMax_secondary">Copay Max (Sliding Copay)
                                             (Secondary): </label>
                                          <div>
                                             <input disabled id="copayMax_secondary" name="copayMax_secondary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['copayMax_secondary'])) {
                                                   echo $repatientDetails['copayMax_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $secondaryShow; ?> secondaryShow">
                                          <span class="description">SA/EAP Required (Secondary Plan)? </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="sarequiredYes_secondary" <?php if (isset($repatientDetails['sarequired_secondary'])) {
                                                      if ($repatientDetails['sarequired_secondary'] == "Y") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="sarequired_secondary" class="custom-radio"
                                                      type="radio" value="Y" autocomplete="off">
                                                   <label class="choice" for="sarequiredYes_secondary">Yes</label>
                                                </span>
                                                <span>
                                                   <input disabled id="sarequiredNo_secondary" name="sarequired_secondary" <?php if (isset($repatientDetails['sarequired_secondary'])) {
                                                      if ($repatientDetails['sarequired_secondary'] == "N") {
                                                         echo 'checked';
                                                      }
                                                   } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="sarequiredNo_secondary">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $sarequired_secondaryshow = 'hidden';
                                       if (isset($repatientDetails['sarequired_secondary'])) {
                                          if ($repatientDetails['sarequired_secondary'] == "Y") {
                                             $sarequired_secondaryshow = '';
                                          }
                                       } ?>
                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description" id="dAppealSub_secondary">SA Initiated Date
                                                (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="dAppealSub_secondary"
                                                   value="<?php if (isset($repatientDetails['dAppealSub_secondary'])) {
                                                      echo $repatientDetails['dAppealSub_secondary'];
                                                   } ?>"
                                                   name="dAppealSub_secondary">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <!--New Added -->
                                       <li class="clearfix <?= $sarequired_secondaryshow; ?> sarequired_secondaryshow">
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description" id="saMdSentDate2">SA Sent to MD Date
                                                (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdSentDate2"
                                                   value="<?php if (isset($repatientDetails['saMdSentDate2'])) {
                                                      echo $repatientDetails['saMdSentDate2'];
                                                   } ?>"
                                                   name="saMdSentDate2">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description" id="saMdReceivedDate2">SA Received by MD Date
                                                (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdReceivedDate2"
                                                   value="<?php if (isset($repatientDetails['saMdReceivedDate2'])) {
                                                      echo $repatientDetails['saMdReceivedDate2'];
                                                   } ?>"
                                                   name="saMdReceivedDate2">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequired_secondaryshow; ?> sarequired_secondaryshow">
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description" id="saPatientSentDate2">SA Sent to Patient Date
                                                (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientSentDate2"
                                                   value="<?php if (isset($repatientDetails['saPatientSentDate2'])) {
                                                      echo $repatientDetails['saPatientSentDate2'];
                                                   } ?>"
                                                   name="saPatientSentDate2">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description" id="saPatientReceivedDate2">SA Received by
                                                Patient Date (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientReceivedDate2"
                                                   value="<?php if (isset($repatientDetails['saPatientReceivedDate2'])) {
                                                      echo $repatientDetails['saPatientReceivedDate2'];
                                                   } ?>"
                                                   name="saPatientReceivedDate2">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <!-- New Added End -->
                                       <li class="<?= $sarequired_secondaryshow; ?> sarequired_secondaryshow clearfix">
                                       </li>
                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Submission Date (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapSub_secondary"
                                                   value="<?php if (isset($repatientDetails['saEapSub_secondary'])) {
                                                      echo $repatientDetails['saEapSub_secondary'];
                                                   } ?>"
                                                   name="saEapSub_secondary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Outcome Date (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapOutcome_secondary"
                                                   value="<?php if (isset($repatientDetails['saEapOutcome_secondary'])) {
                                                      echo $repatientDetails['saEapOutcome_secondary'];
                                                   } ?>"
                                                   name="saEapOutcome_secondary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> sarequired_secondaryshow clearfix">
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Date (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpiry_secondary"
                                                   value="<?php if (isset($repatientDetails['saEapExpiry_secondary'])) {
                                                      echo $repatientDetails['saEapExpiry_secondary'];
                                                   } ?>"
                                                   name="saEapExpiry_secondary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Follow Up Date (Secondary):
                                             </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpF_secondary"
                                                   value="<?php if (isset($repatientDetails['saEapExpF_secondary'])) {
                                                      echo $repatientDetails['saEapExpF_secondary'];
                                                   } ?>"
                                                   name="saEapExpF_secondary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> sarequired_secondaryshow clearfix">
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <label class="description" for="luCode_secondary">LU Code (Secondary):
                                          </label>
                                          <div>
                                             <input disabled id="luCode_secondary" name="luCode_secondary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['luCode_secondary'])) {
                                                   echo $repatientDetails['luCode_secondary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $sarequired_secondaryshow; ?> col-md-4 sarequired_secondaryshow">
                                          <fieldset>
                                             <label class="description">LU Expiry Date (Secondary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="luExpiry_secondary"
                                                   value="<?php if (isset($repatientDetails['luExpiry_secondary'])) {
                                                      echo $repatientDetails['luExpiry_secondary'];
                                                   } ?>"
                                                   name="luExpiry_secondary">
                                             </div>
                                          </fieldset>
                                       </li>



                                       <li class="<?= $secondaryShow; ?> secondaryShow">
                                          <label class="description">Does Patient Have a Tertiary Plan? </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="dphspYes_tertiary" name="dphsp_tertiary" <?php if (isset($repatientDetails['dphsp_tertiary'])) {
                                                      if ($repatientDetails['dphsp_tertiary'] == "Y") {
                                                         echo 'checked';
                                                      }
                                                   } ?>
                                                      class="custom-radio" type="radio" value="Y" autocomplete="off">
                                                   <label class="choice" for="dphspYes_tertiary">Yes</label>
                                                </span>
                                                <span>
                                                   <input disabled id="dphspNo_tertiary" name="dphsp_tertiary"
                                                      class="custom-radio" type="radio" <?php if (isset($repatientDetails['dphsp_tertiary'])) {
                                                         if ($repatientDetails['dphsp_tertiary'] == "N") {
                                                            echo 'checked';
                                                         }
                                                      } ?>
                                                      value="N" autocomplete="off">
                                                   <label class="choice" for="dphspNo_tertiary">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $tertiaryShow = 'hidden';
                                       if (isset($repatientDetails['dphsp_tertiary'])) {
                                          if ($repatientDetails['dphsp_tertiary'] == "Y") {
                                             $tertiaryShow = '';
                                          }
                                       } ?>

                                       <!--Secondary End -->
                                       <!--Tertiary Start -->
                                       <li class="text-center ftitle accordion <?= $tertiaryShow; ?> tertiaryShow">
                                          <h3>Tertiary Plan</h3>
                                       </li>

                                       <li class="col-md-6 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="ipal_tertiary">Tertiary Insurance Provider
                                             (all locations): </label>
                                          <div>
                                             <select disabled class="form-control" id="ipal_tertiary" name="ipal_tertiary">
                                                <option value="" <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "52") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="52">Adjudicare</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "57") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="57">Alberta Blue Cross (Group)</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "58") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="58">Alberta Blue Cross (Non group)
                                                </option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "53") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="53">Benecaid</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "59") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="59">BC Pharmacare</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="4">Canada Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="5">Chamber of Commerce</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="6">Claim secure</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="7">Coughlin Associates</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="8">Cowan Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="9">Desjardins</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="10">Equitable Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "39") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="39">Empire Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="11">Global Benefits</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="12">GMS Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="13">Greenshield</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="14">Group Medical Services</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "15") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="15">Group Premier Medical</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="16">Group Source</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "17") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="17">Industrial Alliance</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="18">Johnson cold - RTO</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "19") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="19">Johnston Group</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="20">La Survivance</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "21") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="21">Le Capital</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "22") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="22">Local 180/183</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="23">Manion Wilkens</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "43") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="43">MDM Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="24">Manulife</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="25">Manulife Affinity Markets</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="26">Medic Construction</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="27">NIHB</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "40") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="40">NexGenRx</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "47") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="47">ODB - Seniors</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "48") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="48">ODB - OHIP+</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "49") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="49">ODSP</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="28">Ontario Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "29") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="29">Ontario Drug Plan</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "51") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="51">Ontario Works</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "30") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="30">OTIP - Ontario Teachers</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "61") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="61">Pacific Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "31") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="31">RBC Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "32") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="32">Reliable</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "33") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="33">Rwam</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "34") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="34">Standard Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "35") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="35">Sunlife</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "36") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="36">The Cooperators</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "37") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="37">Trillium</option>
                                                <option <?php if (isset($repatientDetails['ipal_tertiary'])) {
                                                   if ($repatientDetails['ipal_tertiary'] == "50") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="50">Veterans Affairs Canada</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix <?= $tertiaryShow; ?> tertiaryShow"></li>

                                       <li class="col-md-4 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="Carrier_tertiary">Carrier (Tertiary): </label>
                                          <div>
                                             <input disabled id="Carrier_tertiary" name="Carrier_tertiary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['Carrier_tertiary'])) {
                                                   echo $repatientDetails['Carrier_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="groupCN_tertiary">Group/Contract Number
                                             (Tertiary): </label>
                                          <div>
                                             <input disabled id="groupCN_tertiary" name="groupCN_tertiary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['groupCN_tertiary'])) {
                                                   echo $repatientDetails['groupCN_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="certificateNumber_tertiary">Client
                                             ID/Certificate Number (Tertiary): </label>
                                          <div>
                                             <input disabled id="certificateNumber_tertiary" name="certificateNumber_tertiary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['certificateNumber_tertiary'])) {
                                                   echo $repatientDetails['certificateNumber_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $tertiaryShow; ?> tertiaryShow">
                                          <span class="description">Cardholder (Tertiary): </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="cardholderSelf_tertiary" <?php if (isset($repatientDetails['cardholder_tertiary'])) {
                                                      if ($repatientDetails['cardholder_tertiary'] == "Self") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="cardholder_tertiary"
                                                      class="custom-radio" type="radio" value="Self" autocomplete="off">
                                                   <label class="choice" for="cardholderSelf_tertiary">Self</label>
                                                </span>
                                                <span>
                                                   <input disabled id="cardholderSpouse_tertiary" name="cardholder_tertiary"
                                                      class="custom-radio" type="radio" value="Spouse" <?php if (isset($repatientDetails['cardholder_tertiary'])) {
                                                         if ($repatientDetails['cardholder_tertiary'] == "Spouse") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="cardholderSpouse_tertiary">Spouse</label>
                                                </span>
                                                <span>
                                                   <input disabled id="cardholderDependent_tertiary" name="cardholder_tertiary"
                                                      class="custom-radio" type="radio" value="Dependent" <?php if (isset($repatientDetails['cardholder_tertiary'])) {
                                                         if ($repatientDetails['cardholder_tertiary'] == "Dependent") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice"
                                                      for="cardholderDependent_tertiary">Dependent</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $cardholder3 = 'hidden';
                                       if (isset($repatientDetails['cardholder_tertiary'])) {
                                          if ($repatientDetails['cardholder_tertiary'] == "Spouse") {
                                             $cardholder3 = '';
                                          }
                                       }
                                       if (isset($repatientDetails['cardholder_tertiary'])) {
                                          if ($repatientDetails['cardholder_tertiary'] == "Dependent") {
                                             $cardholder3 = '';
                                          }
                                       }
                                       ?>
                                       <li class="<?= $cardholder3; ?> cardholder_tertiaryShow">
                                          <fieldset>
                                             <label class="description">Cardholder Name (Tertiary): </label>
                                             <div class="row">
                                                <span class="col-md-4 simple_name_1 nextline">
                                                   <input disabled id="cardTertiaryFirst" name="cardholderTertiaryName1"
                                                      type="text" class="form-control" maxlength="125" size="8"
                                                      value="<?php if (isset($repatientDetails['cardholderTertiaryName1'])) {
                                                         echo $repatientDetails['cardholderTertiaryName1'];
                                                      } ?>"
                                                      autocomplete="off">
                                                   <label for="cardTertiaryFirst">First</label>
                                                </span>

                                                <span class="col-md-4 simple_name_2 nextline">
                                                   <input disabled id="cardTertiaryLast" name="cardholderTertiaryName2"
                                                      type="text" class="form-control" maxlength="125" size="14"
                                                      value="<?php if (isset($repatientDetails['cardholderTertiaryName2'])) {
                                                         echo $repatientDetails['cardholderTertiaryName2'];
                                                      } ?>"
                                                      autocomplete="off">
                                                   <label for="cardTertiaryLast">Last</label>
                                                </span>
                                             </div>

                                          </fieldset>
                                       </li>

                                       <li class="<?= $cardholder3; ?> col-md-4 cardholder_tertiaryShow">
                                          <fieldset>
                                             <label class="description">Cardholder Date of Birth (Tertiary): </label>
                                             <input disabled type="date" class="form-control" id="cardholderTertiaryDOB"
                                                name="cardholderTertiaryDOB"
                                                value="<?php if (isset($repatientDetails['cardholderTertiaryDOB'])) {
                                                   echo $repatientDetails['cardholderTertiaryDOB'];
                                                } ?>">
                                          </fieldset>
                                       </li>
                                       <li class="clearfix <?= $tertiaryShow; ?> tertiaryShow"></li>

                                       <li class="col-md-4 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="coveragePercentage_tertiary">Coverage
                                             percentage (Tertiary): </label>
                                          <div class="inline-flex">
                                             <input disabled id="coveragePercentage_tertiary" name="coveragePercentage_tertiary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['coveragePercentage_tertiary'])) {
                                                   echo $repatientDetails['coveragePercentage_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                             <span class="block right">%</span>
                                          </div>
                                       </li>



                                       <li class="clearfix <?= $tertiaryShow; ?> tertiaryShow"></li>

                                       <li class="col-md-4 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="deductible_tertiary">Deductible (Tertiary):
                                          </label>
                                          <div>
                                             <input disabled id="deductible_tertiary" name="deductible_tertiary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['deductible_tertiary'])) {
                                                   echo $repatientDetails['deductible_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="annualMax_tertiary">Annual Max (Tertiary):
                                          </label>
                                          <div>
                                             <input disabled id="annualMax_tertiary" name="annualMax_tertiary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['annualMax_tertiary'])) {
                                                   echo $repatientDetails['annualMax_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="clearfix <?= $tertiaryShow; ?> tertiaryShow"></li>

                                       <li class="col-md-4 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="lifetimeMax_tertiary">Lifetime Max (Tertiary):
                                          </label>
                                          <div>
                                             <input disabled id="lifetimeMax_tertiary" name="lifetimeMax_tertiary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['lifetimeMax_tertiary'])) {
                                                   echo $repatientDetails['lifetimeMax_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-5 <?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description" for="copayMax_tertiary">Copay Max (Sliding Copay)
                                             (Tertiary): </label>
                                          <div>
                                             <input disabled id="copayMax_tertiary" name="copayMax_tertiary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['copayMax_tertiary'])) {
                                                   echo $repatientDetails['copayMax_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $tertiaryShow; ?> tertiaryShow">
                                          <span class="description">SA/EAP Required (Tertiary Plan)? </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="sarequiredYes_tertiary" name="sarequired_tertiary" <?php if (isset($repatientDetails['sarequired_tertiary'])) {
                                                      if ($repatientDetails['sarequired_tertiary'] == "Y") {
                                                         echo 'checked';
                                                      }
                                                   } ?> class="custom-radio" type="radio" value="Y"
                                                      autocomplete="off">
                                                   <label class="choice" for="sarequiredYes_tertiary">Yes</label>
                                                </span>
                                                <span>
                                                   <input disabled id="sarequiredNo_tertiary" name="sarequired_tertiary" <?php if (isset($repatientDetails['sarequired_tertiary'])) {
                                                      if ($repatientDetails['sarequired_tertiary'] == "N") {
                                                         echo 'checked';
                                                      }
                                                   } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="sarequiredNo_tertiary">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $sarequired_tertiaryShow = 'hidden';
                                       if (isset($repatientDetails['sarequired_tertiary'])) {
                                          if ($repatientDetails['sarequired_tertiary'] == "Y") {
                                             $sarequired_tertiaryShow = '';
                                          }
                                       } ?>
                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description" for="dAppealSub_tertiary">SA Initiated Date
                                                (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="dAppealSub_tertiary"
                                                   name="dAppealSub_tertiary"
                                                   value="<?php if (isset($repatientDetails['dAppealSub_tertiary'])) {
                                                      echo $repatientDetails['dAppealSub_tertiary'];
                                                   } ?>">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <!--New Added -->
                                       <li class="clearfix <?= $sarequired_tertiaryShow; ?> sarequired_tertiaryShow"></li>

                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description" id="saMdSentDate3">SA Sent to MD Date
                                                (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdSentDate3"
                                                   value="<?php if (isset($repatientDetails['saMdSentDate3'])) {
                                                      echo $repatientDetails['saMdSentDate3'];
                                                   } ?>"
                                                   name="saMdSentDate3">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description" id="saMdReceivedDate3">SA Received by MD Date
                                                (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdReceivedDate3"
                                                   value="<?php if (isset($repatientDetails['saMdReceivedDate3'])) {
                                                      echo $repatientDetails['saMdReceivedDate3'];
                                                   } ?>"
                                                   name="saMdReceivedDate3">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequired_tertiaryShow; ?> sarequired_tertiaryShow"></li>

                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description" id="saPatientSentDate3">SA Sent to Patient Date
                                                (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientSentDate3"
                                                   value="<?php if (isset($repatientDetails['saPatientSentDate3'])) {
                                                      echo $repatientDetails['saPatientSentDate3'];
                                                   } ?>"
                                                   name="saPatientSentDate3">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description" id="saPatientReceivedDate3">SA Received by
                                                Patient Date (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientReceivedDate3"
                                                   value="<?php if (isset($repatientDetails['saPatientReceivedDate3'])) {
                                                      echo $repatientDetails['saPatientReceivedDate3'];
                                                   } ?>"
                                                   name="saPatientReceivedDate3">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <!-- New Added End -->
                                       <li class="clearfix <?= $sarequired_tertiaryShow; ?> sarequired_tertiaryShow"></li>
                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Submission Date (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapSub_tertiary"
                                                   name="saEapSub_tertiary"
                                                   value="<?php if (isset($repatientDetails['saEapSub_tertiary'])) {
                                                      echo $repatientDetails['saEapSub_tertiary'];
                                                   } ?>">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Outcome Date (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapOutcome_tertiary"
                                                   name="saEapOutcome_tertiary"
                                                   value="<?php if (isset($repatientDetails['saEapOutcome_tertiary'])) {
                                                      echo $repatientDetails['saEapOutcome_tertiary'];
                                                   } ?>">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <li class="clearfix <?= $sarequired_tertiaryShow; ?> sarequired_tertiaryShow"></li>
                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Date (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpiry_tertiary"
                                                   name="saEapExpiry_tertiary"
                                                   value="<?php if (isset($repatientDetails['saEapExpiry_tertiary'])) {
                                                      echo $repatientDetails['saEapExpiry_tertiary'];
                                                   } ?>">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Follow Up Date (Tertiary):
                                             </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpF_tertiary"
                                                   name="saEapExpF_tertiary"
                                                   value="<?php if (isset($repatientDetails['saEapExpF_tertiary'])) {
                                                      echo $repatientDetails['saEapExpF_tertiary'];
                                                   } ?>">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <li class="clearfix <?= $sarequired_tertiaryShow; ?> sarequired_tertiaryShow"></li>
                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <label class="description" for="luCode_tertiary">LU Code (Tertiary): </label>
                                          <div>
                                             <input disabled id="luCode_tertiary" name="luCode_tertiary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['luCode_tertiary'])) {
                                                   echo $repatientDetails['luCode_tertiary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="<?= $sarequired_tertiaryShow; ?> col-md-4 sarequired_tertiaryShow">
                                          <fieldset>
                                             <label class="description">LU Expiry Date (Tertiary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="luExpiry_tertiary"
                                                   name="luExpiry_tertiary"
                                                   value="<?php if (isset($repatientDetails['luExpiry_tertiary'])) {
                                                      echo $repatientDetails['luExpiry_tertiary'];
                                                   } ?>">
                                             </div>
                                          </fieldset>
                                       </li>



                                       <li class="<?= $tertiaryShow; ?> tertiaryShow">
                                          <label class="description">Does Patient Have a Quaternary Plan? </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="dphspYes_quaternary" name="dphsp_quaternary" <?php if (isset($repatientDetails['dphsp_quaternary'])) {
                                                      if ($repatientDetails['dphsp_quaternary'] == "Y") {
                                                         echo 'checked';
                                                      }
                                                   } ?> class="custom-radio" type="radio" value="Y"
                                                      autocomplete="off">
                                                   <label class="choice" for="dphspYes_quaternary">Yes</label>
                                                </span>
                                                <span>
                                                   <input disabled id="dphspNo_quaternary" name="dphsp_quaternary" <?php if (isset($repatientDetails['dphsp_quaternary'])) {
                                                      if ($repatientDetails['dphsp_quaternary'] == "N") {
                                                         echo 'checked';
                                                      }
                                                   } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="dphspNo_quaternary">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $quaternaryShow = 'hidden';
                                       if (isset($repatientDetails['dphsp_quaternary'])) {
                                          if ($repatientDetails['dphsp_quaternary'] == "Y") {
                                             $quaternaryShow = '';
                                          }
                                       } ?>
                                       <!--Tertiary End -->
                                       <!--Quaternary Start -->
                                       <li class="text-center ftitle accordion <?= $quaternaryShow; ?> quaternaryShow">
                                          <h3>Quaternary Plan</h3>
                                       </li>

                                       <li class="col-md-6 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="ipal_quaternary">Quaternary Insurance Provider
                                             (all locations): </label>
                                          <div>
                                             <select disabled class="form-control" id="ipal_quaternary" name="ipal_quaternary">
                                                <option value="" <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "52") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="52">Adjudicare</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "57") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="57">Alberta Blue Cross (Group)</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "58") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="58">Alberta Blue Cross (Non group)
                                                </option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "53") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="53">Benecaid</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "59") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="59">BC Pharmacare</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="4">Canada Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="5">Chamber of Commerce</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="6">Claim secure</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="7">Coughlin Associates</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="8">Cowan Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="9">Desjardins</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="10">Equitable Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "39") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="39">Empire Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="11">Global Benefits</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="12">GMS Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="13">Greenshield</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="14">Group Medical Services</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "15") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="15">Group Premier Medical</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="16">Group Source</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "17") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="17">Industrial Alliance</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="18">Johnson cold - RTO</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "19") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="19">Johnston Group</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="20">La Survivance</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "21") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="21">Le Capital</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "22") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="22">Local 180/183</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="23">Manion Wilkens</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "43") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="43">MDM Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="24">Manulife</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="25">Manulife Affinity Markets</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="26">Medic Construction</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="27">NIHB</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "40") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="40">NexGenRx</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "47") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="47">ODB - Seniors</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "48") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="48">ODB - OHIP+</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "49") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="49">ODSP</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="28">Ontario Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "29") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="29">Ontario Drug Plan</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "51") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="51">Ontario Works</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "30") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="30">OTIP - Ontario Teachers</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "61") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="61">Pacific Blue Cross</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "31") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="31">RBC Insurance</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "32") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="32">Reliable</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "33") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="33">Rwam</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "34") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="34">Standard Life</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "35") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="35">Sunlife</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "36") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="36">The Cooperators</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "37") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="37">Trillium</option>
                                                <option <?php if (isset($repatientDetails['ipal_quaternary'])) {
                                                   if ($repatientDetails['ipal_quaternary'] == "50") {
                                                      echo 'selected';
                                                   }
                                                } ?>
                                                   value="50">Veterans Affairs Canada</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix <?= $quaternaryShow; ?> quaternaryShow"></li>

                                       <li class="col-md-4 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="Carrier_quaternary">Carrier (Quaternary):
                                          </label>
                                          <div>
                                             <input disabled id="Carrier_quaternary" name="Carrier_quaternary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['Carrier_quaternary'])) {
                                                   echo $repatientDetails['Carrier_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-5 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="groupCN_quaternary">Group/Contract Number
                                             (Quaternary): </label>
                                          <div>
                                             <input disabled id="groupCN_quaternary" name="groupCN_quaternary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['groupCN_quaternary'])) {
                                                   echo $repatientDetails['groupCN_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="certificateNumber_quaternary">Client
                                             ID/Certificate Number (Quaternary): </label>
                                          <div>
                                             <input disabled id="certificateNumber_quaternary"
                                                name="certificateNumber_quaternary" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['certificateNumber_quaternary'])) {
                                                   echo $repatientDetails['certificateNumber_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $quaternaryShow; ?> quaternaryShow">
                                          <span class="description">Cardholder (Quaternary): </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="cardholderSelf_quaternary" <?php if (isset($repatientDetails['cardholder_quaternary'])) {
                                                      if ($repatientDetails['cardholder_quaternary'] == "Self") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="cardholder_quaternary"
                                                      class="custom-radio" type="radio" value="Self" autocomplete="off">
                                                   <label class="choice" for="cardholderSelf_quaternary">Self</label>
                                                </span>
                                                <span>
                                                   <input disabled id="cardholderSpouse_quaternary" <?php if (isset($repatientDetails['cardholder_quaternary'])) {
                                                      if ($repatientDetails['cardholder_quaternary'] == "Spouse") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="cardholder_quaternary"
                                                      class="custom-radio" type="radio" value="Spouse"
                                                      autocomplete="off">
                                                   <label class="choice"
                                                      for="cardholderSpouse_quaternary">Spouse</label>
                                                </span>
                                                <span>
                                                   <input disabled id="cardholderDependent_quaternary" <?php if (isset($repatientDetails['cardholder_quaternary'])) {
                                                      if ($repatientDetails['cardholder_quaternary'] == "Dependent") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="cardholder_quaternary"
                                                      class="custom-radio" type="radio" value="Dependent"
                                                      autocomplete="off">
                                                   <label class="choice"
                                                      for="cardholderDependent_quaternary">Dependent</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $cardholder4 = 'hidden';
                                       if (isset($repatientDetails['cardholder_quaternary'])) {
                                          if ($repatientDetails['cardholder_quaternary'] == "Spouse") {
                                             $cardholder4 = '';
                                          }
                                       }
                                       if (isset($repatientDetails['cardholder_quaternary'])) {
                                          if ($repatientDetails['cardholder_quaternary'] == "Dependent") {
                                             $cardholder4 = '';
                                          }
                                       }
                                       ?>
                                       <li class="<?= $cardholder4; ?> cardholder_quaternaryShow">
                                          <fieldset>
                                             <label class="description">Cardholder Name (Quaternary): </label>

                                             <div class="row">
                                                <span class="col-md-4 simple_name_1 nextline">
                                                   <input disabled id="cardQuaternaryFirst" name="cardholderQuaternaryName1"
                                                      type="text" class="form-control" maxlength="125" size="8"
                                                      value="<?php if (isset($repatientDetails['cardholderQuaternaryName1'])) {
                                                         echo $repatientDetails['cardholderQuaternaryName1'];
                                                      } ?>"
                                                      autocomplete="off">
                                                   <label for="cardQuaternaryFirst">First</label>
                                                </span>

                                                <span class="col-md-4 simple_name_2 nextline">
                                                   <input disabled id="cardQuaternaryLast" name="cardholderQuaternaryName2"
                                                      type="text"
                                                      value="<?php if (isset($repatientDetails['cardholderQuaternaryName2'])) {
                                                         echo $repatientDetails['cardholderQuaternaryName2'];
                                                      } ?>"
                                                      class="form-control" maxlength="125" size="14"
                                                      value="<?php if (isset($repatientDetails['cardholderQuaternaryName2'])) {
                                                         echo $repatientDetails['cardholderQuaternaryName2'];
                                                      } ?>"
                                                      autocomplete="off">
                                                   <label for="cardQuaternaryLast">Last</label>
                                                </span>
                                             </div>

                                          </fieldset>
                                       </li>

                                       <li class="<?= $cardholder4; ?> col-md-4 cardholder_quaternaryShow">
                                          <fieldset>
                                             <label class="description">Cardholder Date of Birth (Quaternary): </label>

                                             <input disabled type="date" class="form-control" id="cardholderQuaternaryDOB"
                                                value="<?php if (isset($repatientDetails['cardholderQuaternaryDOB'])) {
                                                   echo $repatientDetails['cardholderQuaternaryDOB'];
                                                } ?>"
                                                name="cardholderQuaternaryDOB">
                                          </fieldset>
                                       </li>
                                       <li class="clearfix <?= $quaternaryShow; ?> quaternaryShow"></li>
                                       <li class="col-md-4 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="coveragePercentage_quaternary">Coverage
                                             percentage (Quaternary): </label>
                                          <div class="inline-flex">
                                             <input disabled id="coveragePercentage_quaternary"
                                                name="coveragePercentage_quaternary"
                                                value="<?php if (isset($repatientDetails['coveragePercentage_quaternary'])) {
                                                   echo $repatientDetails['coveragePercentage_quaternary'];
                                                } ?>"
                                                class="form-control" type="text" autocomplete="off">
                                             <span class="block right">%</span>
                                          </div>
                                       </li>

                                       <li class="clearfix <?= $quaternaryShow; ?> quaternaryShow"></li>
                                       <li class="col-md-4 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="deductible_quaternary">Deductible
                                             (Quaternary): </label>
                                          <div>
                                             <input disabled id="deductible_quaternary" name="deductible_quaternary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['deductible_quaternary'])) {
                                                   echo $repatientDetails['deductible_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="annualMax_quaternary">Annual Max (Quaternary):
                                          </label>
                                          <div>
                                             <input disabled id="annualMax_quaternary" name="annualMax_quaternary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['annualMax_quaternary'])) {
                                                   echo $repatientDetails['annualMax_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="clearfix <?= $quaternaryShow; ?> quaternaryShow"></li>

                                       <li class="col-md-4 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="lifetimeMax_quaternary">Lifetime Max
                                             (Quaternary): </label>
                                          <div>
                                             <input disabled id="lifetimeMax_quaternary" name="lifetimeMax_quaternary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['lifetimeMax_quaternary'])) {
                                                   echo $repatientDetails['lifetimeMax_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-5 <?= $quaternaryShow; ?> quaternaryShow">
                                          <label class="description" for="copayMax_quaternary">Copay Max (Sliding Copay)
                                             (Quaternary): </label>
                                          <div>
                                             <input disabled id="copayMax_quaternary" name="copayMax_quaternary"
                                                class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['copayMax_quaternary'])) {
                                                   echo $repatientDetails['copayMax_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $quaternaryShow; ?> quaternaryShow">
                                          <span class="description">SA/EAP Required (Quaternary Plan)? </span>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span>
                                                   <input disabled id="sarequiredYes_quaternary" <?php if (isset($repatientDetails['sarequired_quaternary'])) {
                                                      if ($repatientDetails['sarequired_quaternary'] == "Y") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="sarequired_quaternary"
                                                      class="custom-radio" type="radio" value="Y" autocomplete="off">
                                                   <label class="choice" for="sarequiredYes_quaternary">Yes</label>
                                                </span>
                                                <span>
                                                   <input disabled id="sarequiredNo_quaternary" <?php if (isset($repatientDetails['sarequired_quaternary'])) {
                                                      if ($repatientDetails['sarequired_quaternary'] == "N") {
                                                         echo 'checked';
                                                      }
                                                   } ?> name="sarequired_quaternary"
                                                      class="custom-radio" type="radio" value="N" autocomplete="off">
                                                   <label class="choice" for="sarequiredNo_quaternary">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $sarequired_quaternaryShow = 'hidden';
                                       if (isset($repatientDetails['sarequired_quaternary'])) {
                                          if ($repatientDetails['sarequired_quaternary'] == "Y") {
                                             $sarequired_quaternaryShow = '';
                                          }
                                       } ?>
                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description" id="dAppealSub_quaternary">SA Initiated Date
                                                (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="dAppealSub_quaternary"
                                                   value="<?php if (isset($repatientDetails['dAppealSub_quaternary'])) {
                                                      echo $repatientDetails['dAppealSub_quaternary'];
                                                   } ?>"
                                                   name="dAppealSub_quaternary">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <!--New Added -->
                                       <li class="clearfix <?= $sarequired_quaternaryShow; ?> sarequired_quaternaryShow">
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description" id="saMdSentDate4">SA Sent to MD Date
                                                (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdSentDate4"
                                                   value="<?php if (isset($repatientDetails['saMdSentDate4'])) {
                                                      echo $repatientDetails['saMdSentDate4'];
                                                   } ?>"
                                                   name="saMdSentDate4">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description" id="saMdReceivedDate4">SA Received by MD Date
                                                (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saMdReceivedDate4"
                                                   value="<?php if (isset($repatientDetails['saMdReceivedDate4'])) {
                                                      echo $repatientDetails['saMdReceivedDate4'];
                                                   } ?>"
                                                   name="saMdReceivedDate4">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequired_quaternaryShow; ?> sarequired_quaternaryShow">
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description" id="saPatientSentDate4">SA Sent to Patient Date
                                                (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientSentDate4"
                                                   value="<?php if (isset($repatientDetails['saPatientSentDate4'])) {
                                                      echo $repatientDetails['saPatientSentDate4'];
                                                   } ?>"
                                                   name="saPatientSentDate4">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description" id="saPatientReceivedDate4">SA Received by
                                                Patient Date (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saPatientReceivedDate4"
                                                   value="<?php if (isset($repatientDetails['saPatientReceivedDate4'])) {
                                                      echo $repatientDetails['saPatientReceivedDate4'];
                                                   } ?>"
                                                   name="saPatientReceivedDate4">
                                             </div>
                                          </fieldset>
                                       </li>
                                       <!-- New Added End -->

                                       <li class="clearfix <?= $sarequired_quaternaryShow; ?> sarequired_quaternaryShow">
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 quaternaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Submission Date (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapSub_quaternary"
                                                   value="<?php if (isset($repatientDetails['saEapSub_quaternary'])) {
                                                      echo $repatientDetails['saEapSub_quaternary'];
                                                   } ?>"
                                                   name="saEapSub_quaternary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Outcome Date (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapOutcome_quaternary"
                                                   value="<?php if (isset($repatientDetails['saEapOutcome_quaternary'])) {
                                                      echo $repatientDetails['saEapOutcome_quaternary'];
                                                   } ?>"
                                                   name="saEapOutcome_quaternary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequired_quaternaryShow; ?> sarequired_quaternaryShow">
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Date (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpiry_quaternary"
                                                   value="<?php if (isset($repatientDetails['saEapExpiry_quaternary'])) {
                                                      echo $repatientDetails['saEapExpiry_quaternary'];
                                                   } ?>"
                                                   name="saEapExpiry_quaternary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description">SA/EAP Expiry Follow Up Date (Quaternary):
                                             </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="saEapExpF_quaternary"
                                                   value="<?php if (isset($repatientDetails['saEapExpF_quaternary'])) {
                                                      echo $repatientDetails['saEapExpF_quaternary'];
                                                   } ?>"
                                                   name="saEapExpF_quaternary">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix <?= $sarequired_quaternaryShow; ?> sarequired_quaternaryShow">
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <label class="description" for="luCode_quaternary">LU Code (Quaternary):
                                          </label>
                                          <div>
                                             <input disabled id="luCode_quaternary" name="luCode_quaternary" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['luCode_quaternary'])) {
                                                   echo $repatientDetails['luCode_quaternary'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="<?= $sarequired_quaternaryShow; ?> col-md-4 sarequired_quaternaryShow">
                                          <fieldset>
                                             <label class="description">LU Expiry Date (Quaternary): </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="luExpiry_quaternary"
                                                   value="<?php if (isset($repatientDetails['luExpiry_quaternary'])) {
                                                      echo $repatientDetails['luExpiry_quaternary'];
                                                   } ?>"
                                                   name="luExpiry_quaternary">
                                             </div>
                                          </fieldset>
                                       </li>



                                       <!--Quaternary End -->

                                       <li class="line"></li>

                                       <li class="">
                                          <label class="description">Does plan have a MANDATORY PPN on file? </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="dphmpfYes" name="dphmpf" <?php if (isset($repatientDetails['dphmpf'])) {
                                                   if ($repatientDetails['dphmpf'] == "Y") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="Y"
                                                      autocomplete="off">
                                                   <label class="choice" for="dphmpfYes">Yes</label>
                                                </span>
                                                <span><input disabled id="dphmpfNo" name="dphmpf" <?php if (isset($repatientDetails['dphmpf'])) {
                                                   if ($repatientDetails['dphmpf'] == "N") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="dphmpfNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li class="hidden">
                                          <label class="description">Does the Patient Have Any Public Coverage? </label>
                                          <div>
                                             <fieldset>
                                                <span><input disabled id="dphapcYes" name="dphapc" <?php if (isset($repatientDetails['dphapc'])) {
                                                   if ($repatientDetails['dphapc'] == "Y") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="Y"
                                                      autocomplete="off">
                                                   <label class="choice" for="dphapcYes">Yes</label>
                                                </span>
                                                <span><input disabled id="dphapcNo" name="dphapc" <?php if (isset($repatientDetails['dphapc'])) {
                                                   if ($repatientDetails['dphapc'] == "N") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="dphapcNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li class="hidden">
                                          <label class="description" for="pcct">Please Confirm Coverage Type: </label>
                                          <div>
                                             <input disabled id="pcct" name="pcct" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['pcct'])) {
                                                   echo $repatientDetails['pcct'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="hidden">
                                          <label class="description" for="pcd">Public Coverage Details: </label>
                                          <div>
                                             <textarea disabled id="pcd" name="pcd" class="form-control" rows="8"
                                                cols="90"><?php if (isset($repatientDetails['pcd'])) {
                                                   echo $repatientDetails['pcd'];
                                                } ?></textarea>
                                          </div>
                                          <p class="remarks"><small>Group Number, Health Number</small></p>
                                       </li>

                                       <li class="">
                                          <label class="description">Financial Assistance </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="financialAssistanceYes" name="financialAssistance"
                                                      <?php if (isset($repatientDetails['financialAssistance'])) {
                                                         if ($repatientDetails['financialAssistance'] == "Y") {
                                                            echo 'checked';
                                                         }
                                                      } ?> class="custom-radio" type="radio" value="Y"
                                                      autocomplete="off">
                                                   <label class="choice" for="financialAssistanceYes">Yes</label>
                                                </span>
                                                <span><input disabled id="financialAssistanceNo" name="financialAssistance" <?php if (isset($repatientDetails['financialAssistance'])) {
                                                   if ($repatientDetails['financialAssistance'] == "N") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="financialAssistanceNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li>
                                          <label class="description" for="copayCard">CoPay Card: </label>
                                          <div>
                                             <input disabled id="copayCard" name="copayCard" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['copayCard'])) {
                                                   echo $repatientDetails['copayCard'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-4">
                                          <label class="description" for="piRxCRM">Patient invited to RxCRM: </label>
                                          <div>
                                             <select disabled class="form-control" id="piRxCRM" name="piRxCRM">
                                                <option value="" <?php if (isset($repatientDetails['piRxCRM'])) {
                                                   if ($repatientDetails['piRxCRM'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="1" <?php if (isset($repatientDetails['piRxCRM'])) {
                                                   if ($repatientDetails['piRxCRM'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Yes</option>
                                                <option value="2" <?php if (isset($repatientDetails['piRxCRM'])) {
                                                   if ($repatientDetails['piRxCRM'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?>>No</option>
                                                <option value="3" <?php if (isset($repatientDetails['piRxCRM'])) {
                                                   if ($repatientDetails['piRxCRM'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Patient declined</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="">
                                          <label class="description">Consent: verbal consent obtained for RxC staff to
                                             send messages, documents &amp; forms via RXCRM (app or appless): </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="consentYes" name="consent" class="custom-radio" <?php if (isset($repatientDetails['consent'])) {
                                                   if ($repatientDetails['consent'] == "Y") {
                                                      echo 'checked';
                                                   }
                                                } ?> type="radio" value="Y" autocomplete="off">
                                                   <label class="choice" for="consentYes">Yes</label>
                                                </span>
                                                <span><input disabled id="consentNo" name="consent" class="custom-radio" <?php if (isset($repatientDetails['consent'])) {
                                                   if ($repatientDetails['consent'] == "N") {
                                                      echo 'checked';
                                                   }
                                                } ?> type="radio" value="N" autocomplete="off">
                                                   <label class="choice" for="consentNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li class="">
                                          <label class="description">Consent: verbal consent obtained to release and
                                             share information with Physicians, PSP, Public and Private Payor: </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="consentReleaseYes" <?php if (isset($repatientDetails['consentRelease'])) {
                                                   if ($repatientDetails['consentRelease'] == "Y") {
                                                      echo 'checked';
                                                   }
                                                } ?> name="consentRelease" class="custom-radio"
                                                      type="radio" value="Y" autocomplete="off">
                                                   <label class="choice" for="consentReleaseYes">Yes</label>
                                                </span>
                                                <span><input disabled id="consentReleaseNo" name="consentRelease" <?php if (isset($repatientDetails['consentRelease'])) {
                                                   if ($repatientDetails['consentRelease'] == "N") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="N"
                                                      autocomplete="off">
                                                   <label class="choice" for="consentReleaseNo">No</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>

                                       <li class="col-md-12">
                                          <fieldset class="row">

                                             <label class="description">Name of Rx Connect Employee that obtained verbal
                                                consent: </label>
                                             <span class="col-md-4 nextline">
                                                <input disabled id="consentVFirst" name="consentVFirst" type="text"
                                                   class="form-control" maxlength="255" size="8"
                                                   value="<?php if (isset($repatientDetails['consentVFirst'])) {
                                                      echo $repatientDetails['consentVFirst'];
                                                   } ?>"
                                                   autocomplete="off">
                                                <label for="consentVFirst">First</label>
                                             </span>
                                             <span class="col-md-4 nextline">
                                                <input disabled id="consentVLast" name="consentVLast" type="text"
                                                   class="form-control" maxlength="255" size="14"
                                                   value="<?php if (isset($repatientDetails['consentVLast'])) {
                                                      echo $repatientDetails['consentVLast'];
                                                   } ?>"
                                                   autocomplete="off">
                                                <label for="consentVLast">Last</label>
                                             </span>
                                          </fieldset>
                                       </li>

                                       <li class="text-center ftitle accordion">
                                          <h3>
                                             First Appointment Details
                                          </h3>
                                       </li>

                                       <li class="">
                                          <label class="description">Injection Training Location: </label>
                                          <div class="inline-flex">
                                             <fieldset>
                                                <span><input disabled id="injTraLocV" name="injTraLoc" class="custom-radio"
                                                      type="radio" value="1" <?php if (isset($repatientDetails['injTraLoc'])) {
                                                         if ($repatientDetails['injTraLoc'] == "1") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="injTraLocV">Virtual</label>
                                                </span>
                                                <span><input disabled id="injTraLocC" name="injTraLoc" class="custom-radio"
                                                      type="radio" value="2" <?php if (isset($repatientDetails['injTraLoc'])) {
                                                         if ($repatientDetails['injTraLoc'] == "2") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="injTraLocC">Clinic</label>
                                                </span>
                                                <span><input disabled id="injTraLocP" name="injTraLoc" class="custom-radio"
                                                      type="radio" value="3" <?php if (isset($repatientDetails['injTraLoc'])) {
                                                         if ($repatientDetails['injTraLoc'] == "3") {
                                                            echo 'checked';
                                                         }
                                                      } ?> autocomplete="off">
                                                   <label class="choice" for="injTraLocP">Patient Denied</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>
                                       <?php $virtualShow = 'hidden';
                                       $clinicShow = 'hidden';
                                       if (isset($repatientDetails['injTraLoc'])) {
                                          if ($repatientDetails['injTraLoc'] == "1") {
                                             $virtualShow = '';
                                          }
                                       }
                                       if (isset($repatientDetails['injTraLoc'])) {
                                          if ($repatientDetails['injTraLoc'] == "2") {
                                             $clinicShow = '';
                                          }
                                       }
                                       ?>
                                       <li class="<?= $virtualShow; ?> col-md-6 fixselect virtualShow">
                                          <label class="description" for="vinjTraSites">Virtual Injection Training
                                             Sites: </label>
                                          <div>
                                             <select disabled class="form-control select2bs4" id="vinjTraSites"
                                                name="vinjTraSites">
                                                <option value="" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="4" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Rx Connect Pharmacy Solutions - Alberta</option>
                                                <option value="5" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Bowmanville Infusion Clinic</option>
                                                <option value="6" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Burlington GI Infusion Clinic</option>
                                                <option value="7" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Burlington North Infusion Centre</option>
                                                <option value="8" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Burlington South Infusion Clinic</option>
                                                <option value="9" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Calgary Infusion Clinic</option>
                                                <option value="10" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Cambridge Injection Centre</option>
                                                <option value="26" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Chatham Infusion Clinic</option>
                                                <option value="11" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Hamilton Infusion Clinic</option>
                                                <option value="12" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Markham Infusion Centre</option>
                                                <option value="13" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Milton Infusion Clinic</option>
                                                <option value="14" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Mississauga North Infusion Clinic</option>
                                                <option value="16" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Niagara Infusion Centre</option>
                                                <option value="29" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "29") {
                                                      echo 'selected';
                                                   }
                                                } ?>>NS Clinic</option>
                                                <option value="18" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Oakville Infusion Clinic (Dr Dua)</option>
                                                <option value="20" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Ottawa Infusion Clinic</option>
                                                <option value="28" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Rx Connect Specialty Pharmacy - ONTARIO</option>
                                                <option value="27" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?>>St Catherine's Infusion Clinic (Dr Pratt)
                                                </option>
                                                <option value="23" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Virtual</option>
                                                <option value="24" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Waterloo Infusion Clinic</option>
                                                <option value="25" <?php if (isset($repatientDetails['vinjTraSites'])) {
                                                   if ($repatientDetails['vinjTraSites'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Windsor Infusion Clinic</option>
                                             </select>
                                          </div>
                                       </li>
                                       <li class="<?= $virtualShow; ?> clearfix"></li>
                                       <li class="<?= $clinicShow; ?> col-md-6 fixselect clinicShow">
                                          <label class="description" for="clinicInjTrainingSites">Clinic Injection
                                             Training Sites: </label>
                                          <div>
                                             <select disabled class="form-control select2bs4" id="clinicInjTrainingSites"
                                                name="clinicInjTrainingSites">
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?> value=""></option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="4">Rx Connect Pharmacy Solutions -
                                                   Alberta</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="5">Bowmanville Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="7">Burlington North Infusion Centre
                                                </option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="8">Burlington South Infusion Clinic
                                                </option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="9">Calgary Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "10") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="10">Cambridge Injection Centre</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="11">Hamilton Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "12") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="12">Markham Injection Centre</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="13">Milton Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="14" selected="selected">Mississauga North
                                                   Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="16">Niagara Infusion Centre</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="18">Oakville Infusion Clinic (Dr Dua)
                                                </option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "19") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="19">Rx Connect Specialty Pharmacy -
                                                   ONTARIO</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="20">Ottawa Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="23">Virtual</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="24">Waterloo Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="25">Windsor Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "27") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="27">Chatam Infusion Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="28">Not Rx Connect clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "29") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="29">Scarborough Clinic Dr. Hessami -
                                                   Injection Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "33") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="33">St. Catherines clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "30") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="30">NS Clinic</option>
                                                <option <?php if (isset($repatientDetails['clinicInjTrainingSites'])) {
                                                   if ($repatientDetails['clinicInjTrainingSites'] == "34") {
                                                      echo 'selected';
                                                   }
                                                } ?> value="34">Toronto Clinic Dr.Morris/Dr.Bacher -
                                                   Injection Clinic</option>
                                             </select>
                                          </div>
                                       </li>
                                       <!--begin here -->
                                       <li class="hidden">
                                          <label class="description">Infusion Services Location: </label>
                                          <div>
                                             <fieldset>

                                                <span><input disabled id="islc" name="isl" <?php if (isset($repatientDetails['isl'])) {
                                                   if ($repatientDetails['isl'] == "1") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="1"
                                                      autocomplete="off">
                                                   <label class="choice" for="islc">Clinic</label>
                                                </span>
                                                <span><input disabled id="islo" name="isl" <?php if (isset($repatientDetails['isl'])) {
                                                   if ($repatientDetails['isl'] == "2") {
                                                      echo 'checked';
                                                   }
                                                } ?> class="custom-radio" type="radio" value="2"
                                                      autocomplete="off">
                                                   <label class="choice" for="islo">Other</label>
                                                </span>
                                             </fieldset>
                                          </div>
                                       </li>


                                       <li class="hidden">
                                          <label class="description" for="clinicInfSite">Clinic Infusion Sites: </label>
                                          <div>
                                             <select disabled class="form-control" id="clinicInfSite" name="clinicInfSite">
                                                <option value="" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="5" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Bowmanville Infusion Clinic</option>
                                                <option value="6" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Burlington GI Infusion Clinic</option>
                                                <option value="7" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Burlington North Infusion Centre</option>
                                                <option value="8" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Burlington South Infusion Clinic</option>
                                                <option value="9" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Calgary Infusion Clinic</option>
                                                <option value="26" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "26") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Chatham Infusion Clinic</option>
                                                <option value="11" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Hamilton Infusion Clinic</option>
                                                <option value="13" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Milton Infusion Clinic</option>
                                                <option value="14" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Mississauga North Infusion Clinic</option>
                                                <option value="16" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Niagara Infusion Centre</option>
                                                <option value="18" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "18") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Oakville Infusion Clinic (Dr Dua)</option>
                                                <option value="20" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Ottawa Infusion Clinic</option>
                                                <option value="28" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "28") {
                                                      echo 'selected';
                                                   }
                                                } ?>>NS Clinic</option>
                                                <option value="24" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "24") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Waterloo Infusion Clinic</option>
                                                <option value="25" <?php if (isset($repatientDetails['clinicInfSite'])) {
                                                   if ($repatientDetails['clinicInfSite'] == "25") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Windsor Infusion Clinic</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="hidden">
                                          <label class="description" for="infOther">Infusion Other: </label>
                                          <div>
                                             <input disabled id="infOther" name="infOther" class="form-control" type="text"
                                                value="<?php if (isset($repatientDetails['infOther'])) {
                                                   echo $repatientDetails['infOther'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>

                                       <li class="col-md-6">
                                          <fieldset>
                                             <label class="description">First Appointment Date: </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="firstAppDate"
                                                   value="<?php if (isset($repatientDetails['firstAppDate'])) {
                                                      echo $repatientDetails['firstAppDate'];
                                                   } ?>"
                                                   name="firstAppDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-7">
                                          <span class="description">Appointment Time: </span>
                                          <fieldset class="inline-flex">
                                             <span class="nextline">
                                                <input disabled id="appointTimeHH" name="appointTimeHH" class="form-control "
                                                   size="2" type="text" maxlength="2"
                                                   value="<?php if (isset($repatientDetails['appointTimeHH'])) {
                                                      echo $repatientDetails['appointTimeHH'];
                                                   } ?>"
                                                   autocomplete="off">
                                                <label for="appointTimeHH" class="text-center">HH</label>
                                             </span>
                                             <span class="nextline">
                                                <input disabled id="appointTimeMM" name="appointTimeMM" class="form-control "
                                                   size="2" type="text" maxlength="2"
                                                   value="<?php if (isset($repatientDetails['appointTimeMM'])) {
                                                      echo $repatientDetails['appointTimeMM'];
                                                   } ?>"
                                                   autocomplete="off">
                                                <label for="appointTimeMM" class="text-center">MM</label>
                                             </span>
                                             <span class="nextline">
                                                <select disabled class="form-control" style="width:8em" id="appointTime"
                                                   name="appointTime">
                                                   <option <?php if (isset($repatientDetails['appointTime'])) {
                                                      if ($repatientDetails['appointTime'] == "AM") {
                                                         echo 'selected';
                                                      }
                                                   } ?> value="AM">AM</option>
                                                   <option <?php if (isset($repatientDetails['appointTime'])) {
                                                      if ($repatientDetails['appointTime'] == "PM") {
                                                         echo 'selected';
                                                      }
                                                   } ?> value="PM">PM</option>
                                                </select>
                                                <label for="appointTime" class="text-center">AM/PM</label>
                                             </span>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <fieldset>
                                             <label class="description">Treatment Start Date: </label>
                                             <div>
                                                <input disabled type="date" class="form-control" id="trtStrtDate"
                                                   value="<?php if (isset($repatientDetails['trtStrtDate'])) {
                                                      echo $repatientDetails['trtStrtDate'];
                                                   } ?>"
                                                   name="trtStrtDate">
                                             </div>
                                          </fieldset>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="infFess">Infusion Fees: </label>
                                          <div>
                                             <select disabled class="form-control" id="infFess" name="infFess">
                                                <option value="" <?php if (isset($repatientDetails['infFess'])) {
                                                   if ($repatientDetails['infFess'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="1" <?php if (isset($repatientDetails['infFess'])) {
                                                   if ($repatientDetails['infFess'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Pending patient appointment</option>
                                                <option value="2" <?php if (isset($repatientDetails['infFess'])) {
                                                   if ($repatientDetails['infFess'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Paid</option>
                                                <option value="3" <?php if (isset($repatientDetails['infFess'])) {
                                                   if ($repatientDetails['infFess'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?>>To be paid at clinic</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>

                                       <li class="col-md-4">
                                          <label class="description" for="cashpp">Cash Paying Patient: </label>
                                          <div>
                                             <select disabled class="form-control" id="cashpp" name="cashpp">
                                                <option value="" <?php if (isset($repatientDetails['cashpp'])) {
                                                   if ($repatientDetails['cashpp'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="1" <?php if (isset($repatientDetails['cashpp'])) {
                                                   if ($repatientDetails['cashpp'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Yes</option>
                                                <option value="2" <?php if (isset($repatientDetails['cashpp'])) {
                                                   if ($repatientDetails['cashpp'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?>>No</option>
                                                <option value="3" <?php if (isset($repatientDetails['cashpp'])) {
                                                   if ($repatientDetails['cashpp'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?>>NA</option>
                                             </select>
                                          </div>
                                       </li>

                                       <li class="clearfix"></li>

                                       <!--
                                    <li class="hidden">
                                       <label class="description" for="uid">UID: </label>
                                       <div>
                                          <input disabled id="uid" name="uid" readonly="readonly" class="form-control" type="text" value="" autocomplete="off">
                                       </div>
                                    </li> -->


                                       <!--
                                    <li class="hidden">
                                       <label class="description" for="hpatientId">Patient ID </label>
                                       <div>
                                          <input disabled id="hpatientId" name="hpatientId" readonly="readonly" class="form-control" type="text" value="" autocomplete="off">
                                       </div>
                                    </li>-->

                                       <li class="col-md-4">
                                          <label class="description" for="coverageType">Coverage Type </label>
                                          <div>
                                             <select disabled class="form-control" id="coverageType" name="coverageType">
                                                <option value="" <?php if (isset($repatientDetails['coverageType'])) {
                                                   if ($repatientDetails['coverageType'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="1" <?php if (isset($repatientDetails['coverageType'])) {
                                                   if ($repatientDetails['coverageType'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Public</option>
                                                <option value="2" <?php if (isset($repatientDetails['coverageType'])) {
                                                   if ($repatientDetails['coverageType'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Private</option>
                                                <option value="3" <?php if (isset($repatientDetails['coverageType'])) {
                                                   if ($repatientDetails['coverageType'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Public + Private</option>
                                                <option value="4" <?php if (isset($repatientDetails['coverageType'])) {
                                                   if ($repatientDetails['coverageType'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Compassionate</option>
                                             </select>
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="trtStatus">Treatment Status </label>
                                          <div>
                                             <select disabled class="form-control" id="trtStatus" name="trtStatus">
                                                <option value="" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="1" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Pending</option>
                                                <option value="11" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "11") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Pending - Patient unreachable</option>
                                                <option value="13" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "13") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Pending - Medical clearance</option>
                                                <option value="20" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "20") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Pending - test</option>
                                                <option value="2" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On treatment</option>
                                                <option value="21" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "21") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On Treatment - Rx Connect</option>
                                                <option value="6" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "6") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On treatment-Transfer out PPN</option>
                                                <option value="7" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "7") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On treatment-Transfer out pt choice</option>
                                                <option value="9" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "9") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On treatment-Transfer for bridging</option>
                                                <option value="14" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "14") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On treatment - Transfer compassionate use
                                                </option>
                                                <option value="3" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?>>On hold</option>
                                                <option value="23" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "23") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Not enrolled due to high deductible - changed
                                                   medication</option>
                                                <option value="4" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "4") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Discontinued</option>
                                                <option value="15" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "15") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Discontinued - Pt choice</option>
                                                <option value="16" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "16") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Discontinued - MD choice</option>
                                                <option value="5" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "5") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Transferred to other pharmacy</option>
                                                <option value="17" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "17") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Transfer to other pharmacy - Pt choice</option>
                                                <option value="8" <?php if (isset($repatientDetails['trtStatus'])) {
                                                   if ($repatientDetails['trtStatus'] == "8") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Transferred PPN</option>
                                             </select>
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <label class="description" for="pspPatientId">PSP Patient ID </label>
                                          <div>
                                             <input disabled id="pspPatientId" name="pspPatientId" class="form-control"
                                                type="text"
                                                value="<?php if (isset($repatientDetails['pspPatientId'])) {
                                                   echo $repatientDetails['pspPatientId'];
                                                } ?>"
                                                autocomplete="off">
                                          </div>
                                       </li>
                                       <li class="clearfix"></li>
                                       <li class="col-md-4">
                                          <!-- <label class="description" for="drugStatus">Drug Status: </label>
                                          <div>
                                             <select disabled class="form-control" id="drugStatus" name="drugStatus">
                                                <option value="" <?php if (isset($repatientDetails['drugStatus'])) {
                                                   if ($repatientDetails['drugStatus'] == "") {
                                                      echo 'selected';
                                                   }
                                                } ?>></option>
                                                <option value="1" <?php if (isset($repatientDetails['drugStatus'])) {
                                                   if ($repatientDetails['drugStatus'] == "1") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Bridging</option>
                                                <option value="2" <?php if (isset($repatientDetails['drugStatus'])) {
                                                   if ($repatientDetails['drugStatus'] == "2") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Commercial</option>
                                                <option value="3" <?php if (isset($repatientDetails['drugStatus'])) {
                                                   if ($repatientDetails['drugStatus'] == "3") {
                                                      echo 'selected';
                                                   }
                                                } ?>>Compassionate (FOC)</option>
                                             </select>
                                          </div> -->
                                          <label class="description" for="drugStatus">Patient Type:   </label>
                                          
                                          <!--NEW INPUT -->
<select class="form-control" name="patientType" disabled id="patientType">
<option title="" <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "") {echo 'selected';}} ?> value="0"></option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "1") {echo 'selected';}} ?> title="Pts receiving free goods because of approved clinical trial participation" value="1">Clinical Trial <i class="fa fa-info-circle"></i></option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "2") {echo 'selected';}} ?> title="Patients who have all doses covered by Payer, including those who may be on dose optimization" value="2">Commercial</option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "3") {echo 'selected';}} ?> value="3" title="Patient has regular dosing covered by payer and alternate dosing funded by Sanofi" >Commercial - Alt. Dose Free Goods </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "4") {echo 'selected';}} ?> value="4" title="PAP approved patients (medically approved on label compassionate requests)">Compassionate </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "5") {echo 'selected';}} ?> value="5"  title="Expanded FastStart where coverage is not yet available (ex. AD Infant)">Fast Start - Bridge </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "6") {echo 'selected';}} ?> value="6" title="FastStart patient">Fast Start - Retro </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "7") {echo 'selected';}} ?> value="7"  title="Patient is not eligible for FastStart but, if they are on drug, it is due to something like being incorrectly sampled by the MD, or re-enrolling in the program while they are already on drug; incorrectly sampled patients will not be continued to free drug after payer denial **new update so some previously incorrectly sampled patients are grandfathered to the LTB group">Fast Start Criteria Not Met </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "8") {echo 'selected';}} ?> title="PAP dose optimization;  includes patients who had commercial coverage, andbecause of a dose optimization, they are now 100% free goods" value="8">Free Goods - Dose Opt</option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "9") {echo 'selected';}} ?> value="9" title="Patients who have expended all coverage and are now receiving free goods ">Lifetime Plan Max </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "10") {echo 'selected';}} ?> value="10" title="Patients who lost coverage due to job or insurance access change">LOC </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "11") {echo 'selected';}} ?> value="11" title="Patients who qualified for FastStart but were denied by their payer">Long Term Bridging - Denial </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "12") {echo 'selected';}} ?> value="12" title="Legacy Asthma Bridging Program">Long Term Bridging - No Payer Access </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "13") {echo 'selected';}} ?> value="13" title="Patients who have commercial coverage but the low annual amount does not cover the full annual cost of treatment.">Low Annual Max </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "14") {echo 'selected';}} ?> value="14" title="SA lapse for RAMQ & NIHB patients with non-Innomar pharmacy; in the case of your pharmacy, it would be patients outside your pharmacy network vs outside of Innomar's network">SA Lapse </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "15") {echo 'selected';}} ?> value="15" title="SA lapse due to renewal delays (exc. RAMQ & NIHB) with an Innomar pharmacy">SA Lapse - Retro </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "16") {echo 'selected';}} ?> value="16" title="SA lapse for 1st NIHB/RAMQ renewals">Short Term Bridging/ Limited Timeframe </option>
<option  <?php if (isset($repatientDetails['patientType'])) {if ($repatientDetails['patientType'] == "17") {echo 'selected';}} ?> value="17" title="Information available is not sufficient to confirm FastStart eligiblity">Undefined / Missing Information </option>
</select>
                                       </li>
                                    </ul>
                                    <!-- Reimbursement CALL END -->
                                    <div class="form-group text-center mar-b-0">
                                       <input  type="button" value="BACK" class="btn btn-warning back">
                                       <input  type="button" value="NEXT" class="btn btn-primary next">
                                       
                                    </div>
                                 </form>
                              </div>
                           </div>

                           <div class="form-container animated">
                              <h2 class="text-center form-title">Review</h2>
                              <!-- FORM SECTION -->
                              <div class="row">
                                 <?php include 'review_include.php'; ?>
                                 <div class="form-group text-center mar-b-0">
                                    <input  type="button" value="BACK" class="btn btn-warning back">
                                 </div>
                              </div>
                           </div>

                           <script>
                           
                              $(document).ready(function () {

                                 $('.accordion').click(function () {
                                    var $ftitle = $(this).closest('.ftitle');
                                    var $nextftitle = $ftitle.nextUntil('.ftitle');

                                    // Hide all li elements between current and next .ftitle
                                    if ($nextftitle.hasClass('accordion-hide')) {
                                       $nextftitle.removeClass('accordion-hide');
                                    } else {
                                       // Hide all li elements between current and next .ftitle
                                       $nextftitle.addClass('accordion-hide');
                                    }
                                 });
                              });
                            
                              $(window).scroll(function () {
                                 var scrollHeight = $(this).scrollTop();
                                 var content = $('#shift');
                                 if (scrollHeight > 20) {
                                    content.addClass('moveToRight');
                                 } else {
                                    content.removeClass('moveToRight');
                                 }
                              });

                              var totalSteps = $(".steps li").length;
                              var currentPage = 1;
                              const searchParams = new URLSearchParams(window.location.search);
                              if (searchParams.get('token')) {
                                 currentPage = searchParams.get('token'); // price_descending
                              }

                              $(".steps li:nth-of-type(" + currentPage + ")").addClass("active");
                              if (currentPage == 3) {
                                 $(".steps li:nth-of-type(1)").addClass("active");
                                 $(".steps li:nth-of-type(2)").addClass("active");
                              }
                              if (currentPage == 2) {
                                 $(".steps li:nth-of-type(1)").addClass("active");
                              }
                              $(".myContainer .form-container:nth-of-type(" + currentPage + ")").addClass("active");

                              $(".steps li").on("click", function () {
                                 var stepVal = $(this).find("span").text();
                                 $(this).prevAll().addClass("active");
                                 $(this).addClass("active");
                                 $(this).nextAll().removeClass("active");
                                 $(".myContainer .form-container").removeClass("active flipInX");
                                 $(".myContainer .form-container:nth-of-type(" + stepVal + ")").addClass(
                                    "active flipInX"
                                 );
                              });


                              $(".form-container").on("click", ".next", function () {
                                 $(".steps li")
                                    .eq($(this).parents(".form-container").index() + 1)
                                    .addClass("active");
                                 $(this)
                                    .parents(".form-container")
                                    .removeClass("active")
                                    .next()
                                    .addClass("active flipInX");
                              });

                              $(".form-container").on("click", ".back", function () {
                                 $(".steps li")
                                    .eq($(this).parents(".form-container").index() - totalSteps)
                                    .removeClass("active");
                                 $(this)
                                    .parents(".form-container")
                                    .removeClass("active flipInX")
                                    .prev()
                                    .addClass("active flipInY");
                              });

                             
                           </script>
                           <!-- bs-custom-file-input -->
                           <script src="plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
                           <?php include('footer.php');
                           ob_end_flush();
                           ?>