wecuro_blog/application/modules/referral/views/activatePatient_28_07_2021.php

5219 lines
419 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
if($md_order->orderData!=""){
$md_order_data_object=json_decode($md_order->orderData);
}
$medication_count=count($md_order->md_order_medication);
// echo '<pre>'; print_r($md_order_data_object); echo '</pre>';die;
$lab_order_count=count($md_order->md_order_lab_order);
if($patient->icd_info!=""){
$icd_info_object=json_decode($patient->icd_info);
}
$icd_info_count=count($icd_info_object);
$subData['medication_count'] = $medication_count;
$subData['lab_order_count'] = $lab_order_count;
$subData['icd_info_count'] = $icd_info_count;
$subData['md_order_data_object'] = $md_order_data_object;
?>
<style type="text/css">
.app-content .wizard > .steps > ul > li.active .step {
background-color: #666EE8;
border-color: #666EE8;
color: #fff;
}
select.form-control:not([size]):not([multiple]) {
height: calc(1.6rem + 5px) !important;
}
</style>
<style type="text/css">
.required:after {
content:"*";
color:red;
}
</style>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
<div class="app-content content">
<section class="content-wrapper">
<div class="row">
<div class="col-12">
<div class="card">
<!-- <div class="card-header">
<div class="row">
<div class="col-12">
<h3 class="font-weight-bold"><?php echo lang('Activate Referral'); ?></h3>
</div>
</div>
</div> -->
<div class="card-header card-header-title-part card_mrgn">
<div class="row">
<div class="col-md-12">
<header class="panel-heading font-weight-bold">
<?php if(!$pdata->active_status) { ?>
<h3 class="mar_cus"><?php echo lang('Activate Referral'); ?></h3>
<?php }else{ ?>
<h3 class="mar_cus"><?php echo lang('Edit Referral'); ?></h3>
<?php } ?>
</header>
</div>
</div>
</div>
<hr class="mt-0 mb-0" />
<?php if(!$pdata->active_status) { ?>
<div class="col-md-12 panel-body mt-2">
<div class="col-md-12 panel-body">
<?php if ($pdata->progress != null) { ?>
<label>Completion Percentage (<span id="progress_lbl">0</span>%)</label>
<div class="progress">
<div class="progress-bar" id="progress_bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="card-body">
<div class="row">
<div class="col-md-12">
<?php
$tab1 = '';
$tab2 = '';
$tab3 = '';
$tab4 = '';
$tab5 = '';
$tab6 = '';
$tabPane1 = '';
$tabPane2 = '';
$tabPane3 = '';
$tabPane4 = '';
$tabPane5 = '';
$tabPane6 = '';
// if(!isset($_SESSION['actPtn_stat'])) {
// $tab1 = 'active';
// $tab2 = '';
// $tab3 = '';
// $tab4 = '';
// $tab5 = '';
// $tab6 = '';
// $tabPane1 = 'active in show';
// $tabPane2 = '';
// $tabPane3 = '';
// $tabPane4 = '';
// $tabPane5 = '';
// $tabPane6 = '';
// }
// if(isset($_SESSION['actPtn_stat']) && $_SESSION['actPtn_stat']=='step1'){
// $tab1 = '';
// $tab2 = 'active';
// $tab3 = '';
// $tab4 = '';
// $tab5 = '';
// $tab6 = '';
// $tabPane1 = '';
// $tabPane2 = 'active in show';
// $tabPane3 = '';
// $tabPane4 = '';
// $tabPane5 = '';
// $tabPane6 = '';
// }
// if(isset($_SESSION['actPtn_stat']) && $_SESSION['actPtn_stat']=='step2'){
// $tab1 = '';
// $tab2 = '';
// $tab3 = 'active';
// $tab4 = '';
// $tab5 = '';
// $tab6 = '';
// $tabPane1 = '';
// $tabPane2 = '';
// $tabPane3 = 'active in show';
// $tabPane4 = '';
// $tabPane5 = '';
// $tabPane6 = '';
// }
// if(isset($_SESSION['actPtn_stat']) && $_SESSION['actPtn_stat']=='step3'){
// $tab1 = 'disabled';
// $tab2 = 'disabled';
// $tab3 = 'disabled';
// $tab4 = 'active';
// $tabPane1 = '';
// $tabPane2 = '';
// $tabPane3 = '';
// $tabPane4 = 'active in show';
// }
if(!isset($pdata->form_status)){
$tab1 = 'active';
$tab2 = '';
$tab3 = '';
$tab4 = '';
$tab5 = '';
if($pdata->patient_auth_stat ){
$tab6 = '';
$tab7 = '';
}
else{
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = 'active in show';
$tabPane2 = '';
$tabPane3 = '';
$tabPane4 = '';
$tabPane5 = '';
$tabPane6 = '';
$tabPane7 = '';
}
if(isset($pdata->form_status) && $pdata->form_status == 1){
$tab1 = '';
$tab2 = 'active';
$tab3 = '';
$tab4 = '';
$tab5 = '';
if($pdata->patient_auth_stat ){
$tab6 = '';
$tab7 = '';
}
else{
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = '';
$tabPane2 = 'active in show';
$tabPane3 = '';
$tabPane4 = '';
$tabPane5 = '';
$tabPane6 = '';
$tabPane7 = '';
}
if(isset($pdata->form_status) && $pdata->form_status == 2){
$tab1 = '';
$tab2 = '';
$tab3 = 'active';
$tab4 = '';
$tab5 = '';
if($pdata->patient_auth_stat ){
$tab6 = '';
$tab7 = '';
}
else{
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = '';
$tabPane2 = '';
$tabPane3 = 'active in show';
$tabPane4 = '';
$tabPane5 = '';
$tabPane6 = '';
$tabPane7 = '';
}
if(isset($pdata->form_status) && $pdata->form_status == 3){
$tab1 = '';
$tab2 = '';
$tab3 = '';
$tab4 = 'active';
$tab5 = '';
if($pdata->patient_auth_stat ){
$tab6 = '';
$tab7 = '';
}
else{
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = '';
$tabPane2 = '';
$tabPane3 = '';
$tabPane4 = 'active in show';
$tabPane5 = '';
$tabPane6 = '';
$tabPane7 = '';
}
if(isset($pdata->form_status) && $pdata->form_status == 4){
$tab1 = '';
$tab2 = '';
$tab3 = '';
$tab4 = '';
$tab5 = 'active';
if($pdata->patient_auth_stat ){
$tab6 = '';
$tab7 = '';
}
else{
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = '';
$tabPane2 = '';
$tabPane3 = '';
$tabPane4 = '';
$tabPane5 = 'active in show';
$tabPane6 = 'disabled';
$tabPane7 = 'disabled';
}
if(isset($pdata->form_status) && $pdata->form_status == 5){
$tab1 = '';
$tab2 = '';
$tab3 = '';
$tab4 = '';
if($pdata->patient_auth_stat && $idata->payerType!='')
{
$tab5 = '';
$tab6 = 'active';
$tab7 = '';
}
else{
$tab5 = 'active';
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = '';
$tabPane2 = '';
$tabPane3 = '';
$tabPane4 = '';
if($pdata->patient_auth_stat && $idata->payerType!='')
{
$tabPane5 = '';
$tabPane6 = 'active in show';
$tabPane7 = '';
}
else{
$tabPane5 = 'active in show';
$tabPane6 = '';
$tabPane7 = '';
}
}
if(isset($pdata->form_status) && $pdata->form_status == 6){
$tab1 = '';
$tab2 = '';
$tab3 = '';
$tab4 = '';
$tab5 = '';
if($pdata->patient_auth_stat && $idata->payerType!='')
{
$tab6 = '';
$tab7 = 'active';
}
else{
$tab6 = 'disabled';
$tab7 = 'disabled';
}
$tabPane1 = '';
$tabPane2 = '';
$tabPane3 = '';
$tabPane4 = '';
$tabPane5 = '';
$tabPane6 = '';
$tabPane7 = 'active in show';
}
$tabStat = json_decode($pdata->from_tab_status);
$tabStatPctg = json_decode($pdata->from_tab_status_pctg);
?>
<ul class="nav nav-tabs nav-linetriangle no-hover-bg" id="myTab" role="tablist" style="border-bottom-color: #1e9ef1;; margin-bottom: 20px; border-radius: 0px;">
<li class="nav-item <?php echo $tab1; ?>">
<a class="nav-link <?php echo $tab1; ?>" id="base-tab31" data-toggle="tab" href="#tab31" role="tab" aria-selected="true"><?php if( (int)$tabStatPctg->form1 < 20) { ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?>General Information</a>
</li>
<li class="nav-item <?php echo $tab2; ?>">
<a class="nav-link <?php echo $tab2; ?>" id="base-tab36" data-toggle="tab" href="#tab36" role="tab" aria-selected="false"><?php if (!in_array('2', $tabStat)){ ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?>Patient Authorization &amp; Consents</a>
</li>
<li class="nav-item <?php echo $tab3; ?>">
<a class="nav-link <?php echo $tab3; ?>" id="base-tab33" data-toggle="tab" href="#tab33" role="tab" aria-selected="false"><?php if (!in_array('3', $tabStat)){ ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?>Service Needed</a>
</li>
<li class="nav-item <?php echo $tab4; ?>">
<a class="nav-link <?php echo $tab4; ?>" id="base-tab34" data-toggle="tab" href="#tab34" role="tab" aria-selected="false"><?php if (!in_array('4', $tabStat)){ ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?>Payer Information</a>
</li>
<li class="nav-item <?php echo $tab5; ?>">
<a class="nav-link <?php echo $tab5; ?>" id="base-tab32" data-toggle="tab" href="#tab32" role="tab" aria-selected="false"><?php if (!in_array('5', $tabStat)){ ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?>Medical Information</a>
</li>
<li class="nav-item <?php echo $tab6; ?>">
<a class="nav-link <?php echo $tab6; ?>" id="base-tab37" data-toggle="tab" href="#tab37" role="tab" aria-selected="false"><?php if(!$pdata->patient_auth_stat || $idata->payerType==''){ ?> <i class="la la-expeditedssl" style="color: gray;"></i> <?php }else{ ?> <?php if (!in_array('6', $tabStat)){ ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?> <?php } ?>Insurance authorization</a>
</li>
<?php if(!$pdata->active_status) { ?>
<li class="nav-item <?php echo $tab7; ?>">
<a class="nav-link <?php echo $tab7; ?>" id="base-tab35" data-toggle="tab" href="#tab35" role="tab" aria-selected="false"><?php if(!$pdata->patient_auth_stat || $idata->payerType==''){ ?> <i class="la la-expeditedssl" style="color: gray;"></i> <?php }else{ ?> <?php if (!$pdata->active_status){ ?> <i class="la la-exclamation-circle" style="color: orange;"></i> <?php } ?> <?php } ?>Activate</a>
</li>
<?php } ?>
</ul>
<div class="tab-content px-1 pt-1">
<div role="tabpanel" class="tab-pane <?php echo $tabPane1; ?>" id="tab31" aria-expanded="true" aria-labelledby="base-tab31" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" name="newGenInfo" action="<?php echo base_url(); ?>referral/editReferal?pid=<?=$_GET['pid']?>" method="post" enctype="multipart/form-data" onsubmit="return validateForm1()">
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<input type="hidden" name="pid" value="<?=$pid?>">
<input type="hidden" name="form_status" value="1">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="activeRef">
<div class="form-group">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="firstName3">
<?php echo lang('Referral Source'); ?>
<span class="danger">*</span>
</label>
<select class="form-control required" id="ref_info" name="pt_refrance_type" readonly="true" required="">
<option value="New Patient">New Patient</option>
<option value="Reffered by Patient">Reffered by Patient</option>
<option value="Reffered by Vendor">Reffered by Vendor</option>
</select>
</div>
</div>
<div class="col-md-6" id="ref_by_ptn" style="display: none;">
<div class="form-group">
<label for="lastName3">
<?php echo lang('Patient Id'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control required" id="ref_pt_id" name="pt_refrance_value" value="<?php echo $pdata->reference_id; ?>" readonly="true" required="">
</div>
</div>
<div class="col-md-6" id="ref_by_vendor" style="display: none;">
<div class="form-group">
<label for="lastName3">
<?php echo lang('Vendor'); ?>
<span class="danger">*</span>
</label>
<select class="form-control required" id="ref_vnd_id" name="vend_refrance_value" readonly="true" required="">
<option value="" selected>Choose...</option>
<?php foreach ($vendorList as $value) { ?>
<option <?php echo ($pdata->reference_id == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->vedor_name; ?></option>
<?php } ?>
</select>
</div>
</div>
<script type="text/javascript">
$(function(){
$("#ref_info").change(function(){
var selVal = $(this).val();
if(selVal == 'Reffered by Patient')
{
$("#ref_by_ptn").attr("required", "true");
$("#ref_by_vendor").removeAttr('required');
$("#ref_by_ptn").show();
$("#ref_by_vendor").hide();
}
else if(selVal == 'Reffered by Vendor'){
$("#ref_by_vendor").attr("required", "true");
$("#ref_by_ptn").removeAttr('required');
$("#ref_by_ptn").hide();
$("#ref_by_vendor").show();
}
else{
$("#ref_by_vendor").removeAttr('required');
$("#ref_by_ptn").removeAttr('required');
$("#ref_by_ptn").hide();
$("#ref_by_vendor").hide();
}
})
var refInfo = "<?php echo $pdata->reference_information; ?>";
// $("#id_100 select").val("val2");
$('#ref_info').val(refInfo).trigger('change');
});
</script>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Referral Recieve Date'); ?></label>
<input type="date" class="form-control" name="referal_recive_date" id="referalRecDate" value="<?php echo $pdata->referral_date; ?>" required="">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Referral Type'); ?></label>
<select class="form-control" name="referal_type" id="inputGroupSelect01">
<option value="" selected >Choose...</option>
<option <?php echo ($pdata->referral_type == 'New')?'selected':'' ; ?> value="New">New</option>
<option <?php echo ($pdata->referral_type == 'Restart')?'selected':'' ; ?> value="Restart" disabled>Restart</option>
</select>
</div>
<!-- <div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Referal Address'); ?></label>
<input type="text" class="form-control" name="referal_address" id="exampleInputEmail1">
</div> -->
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Referral Mode of Contact'); ?></label>
<select class="form-control" name="referal_contact" id="inputGroupSelect01">
<option value="" selected>Choose...</option>
<option <?php echo ($pdata->referral_contact == 'Address')?'selected':'' ; ?> value="Address">Address</option>
<option <?php echo ($pdata->referral_contact == 'Email')?'selected':'' ; ?> value="Email">Email</option>
<option <?php echo ($pdata->referral_contact == 'Fax')?'selected':'' ; ?> value="Fax">Fax</option>
<option <?php echo ($pdata->referral_contact == 'Phone')?'selected':'' ; ?> value="Phone">Phone</option>
</select>
</div>
<div class="col-md-6">
<label for="firstName3">
<?php echo lang('Level of Service needed'); ?>
<span class="danger">*</span>
</label>
<select class="form-control required" name="level_service" id="level_service">
<option value="" selected>Choose...</option>
<?php foreach ($lvlService as $value) { ?>
<option <?php echo ($pdata->level_of_service == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>" attr_name="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('First name'); ?><span class="danger">*</span></label>
<input type="text" class="form-control" name="fname"
value="<?php echo $pdata->first_name; ?>" required="">
<!-- value='<?php
if (!empty($setval)) {
echo set_value('name');
}
if (!empty($nurse->name)) {
echo $nurse->name;
}
?>'> -->
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Last name'); ?><span class="danger">*</span></label>
<input type="text" class="form-control" name="lname"
value="<?php echo $pdata->last_name; ?>" required="">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('email'); ?></label>
<label for="exampleInputEmail1" class="pull-right"><?php echo lang('Do not have'); ?>&nbsp;&nbsp;<input type="checkbox" name="donothave" id="donothave"></label>
<input type="email" class="form-control" name="email" id="refEmailId" value="<?php echo $pdata->patient_email; ?>" placeholder="">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Date of Birth'); ?></label>
<input type="date" class="form-control" name="dob" value="<?php echo $pdata->dob; ?>" id='ptdob' required>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" ><?php echo lang('Gender'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">
Male
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Female" value="Female" <?php echo ($pdata->gender == 'Female')?'checked':'' ; ?> >
<label class="form-check-label" for="Female">
Female
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Others" value="Others" <?php echo ($pdata->gender == 'Others')?'checked':'' ; ?> >
<label class="form-check-label" for="Others">
Others
</label>
</div>
</div>
</div>
<?php $dbData = explode(',', $pdata->primary_language); ?>
<div class="col-lg-6">
<label class="required"><?php echo lang('Language Preferances'); ?></label>
<select class="form-control" name="pnalguage[]" id="pnalguage" multiple>
<option value="" disabled="">Choose...</option>
<?php foreach ($langs as $value) { ?>
<option <?php echo (in_array($value->id, $dbData))? 'selected' : '' ; ?> value="<?php echo $value->id; ?>" attr_name="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Telephone'); ?></label>
<input type="text" class="form-control onlyNumber" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" name="telephone" value='<?php echo $pdata->telephone; ?>' placeholder="" required="">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Telephone 2'); ?></label>
<input type="text" class="form-control onlyNumber" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" name="cellphone" value='<?php echo $pdata->cellphone; ?>' placeholder="">
</div>
<!-- <div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Cell phone'); ?></label>
<input type="text" class="form-control onlyNumber" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" name="cellphone" value='<?php echo $pdata->cellphone; ?>' placeholder="" required="">
</div> -->
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Social Security Number # (enter last 4 digit)'); ?><span class="danger">*</span></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="">XXX - XX -</span>
</div>
<input type="text" class="form-control onlyNumber" name="socsec" value="<?php echo $pdata->soc_sec_no; ?>" minlength="4" maxlength="4" required="">
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Marital Status'); ?></label>
<select class="form-control" name="merital_stat" id="inputGroupSelect01" name="pnalguage" required>
<option selected disabled>Choose...</option>
<option <?php echo ($pdata->marital_stat == 'Married')?'selected':'' ; ?> value="Married">Married</option>
<option <?php echo ($pdata->marital_stat == 'Unmarried')?'selected':'' ; ?> value="Unmarried">Unmarried</option>
</select>
</div>
</div>
</div>
<?php
$HtFI = explode(',', $pdata->height);
$Htf = $HtFI[0];
$Hti = $HtFI[1];
?>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="firstName3"><?php echo lang('Height (Feet/Inch)'); ?></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="">Feet</span>
</div>
<select class="form-control" name="height" data-error="Please enter a valid height.">
<option value="" selected disabled>Select</option>
<?php for($i=1;$i<10;$i++){ ?>
<option value="<?php echo $i; ?>" <?php if($Htf==$i) echo 'selected'; ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<div class="input-group-prepend">
<span class="input-group-text" id="">inch</span>
</div>
<select class="form-control" name="heightInch" required data-error="Please enter a valid height.">
<option value="" selected disabled>Select</option>
<?php for($i=0;$i<12;$i++){ ?>
<option value="<?php echo $i; ?>" <?php if($Hti==$i) echo 'selected'; ?>><?php echo $i; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Weight'); ?></label>
<input type="text" class="form-control onlyNumber" name="weight" id="exampleInputEmail1" value=<?php echo $pdata->weight; ?>>
</div>
</div>
</div>
<?php
$pAdata = json_decode($pdata->address);
?>
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<input type="hidden" name="lang1" id="lang1">
<input type="hidden" name="long1" id="long1">
<input type="text" class="form-control" name="address1" id="address1" value="<?php echo $pAdata->address; ?>" required="">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment1" id="exampleInputEmail1" value="<?php echo $pAdata->Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity1" id="city1" value="<?php echo $pAdata->City; ?>" required="" readonly>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState1" id="state1" value="<?php echo $pAdata->State; ?>" required="" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty1" id="county1" value="<?php echo $pAdata->County; ?>" required="" readonly>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode1" id="zipcode1" value="<?php echo $pAdata->Zipcode; ?>" required="">
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader1" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn1" value="1" onclick="check_parmanent_address(this);"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<?php
$pAltAdata = json_decode($pdata->alt_address);
?>
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Alternating Billing Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<input type="hidden" name="lang2" id="lang2">
<input type="hidden" name="long2" id="long2">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
</label>
<input type="text" class="form-control" name="alt_address" id="address2" value="<?php echo $pAltAdata->address; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="altApartment" id="exampleInputEmail1" value="<?php echo $pAltAdata->Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
</label>
<input type="text" class="form-control" name="AltCity" id="city2" value="<?php echo $pAltAdata->City; ?>" readonly>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
</label>
<input type="text" class="form-control" name="altState" id="state2" value="<?php echo $pAltAdata->State; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
</label>
<input type="text" class="form-control" name="altCounty" id="county2" value="<?php echo $pAltAdata->County; ?>" readonly>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
</label>
<input type="text" class="form-control" name="altZipcode" id="zipcode2" value="<?php echo $pAltAdata->Zipcode; ?>">
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_alternative_address_loader2" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_alternative_address_btn2" value="2" onclick="check_parmanent_address(this);"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('Direction'); ?></label>
<textarea class="form-control" name="direction" id="exampleInputEmail1" ><?php echo $pdata->direction; ?></textarea>
</div>
</div>
</div>
<div class="col-md-12 form-group row mt-1" >
<button type="submit" name="submit" value="gen_info" class="btn btn-info"><?php echo lang('submit'); ?></button>
</div>
</form>
</div>
<!-- patient agreement -->
<div role="tabpanel" class="tab-pane <?php echo $tabPane2; ?>" id="tab36" aria-expanded="true" aria-labelledby="base-tab36" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" action="<?php echo base_url(); ?>referral/editReferal?pid=<?php echo $_GET['pid']; ?>" method="post" enctype="multipart/form-data" name="patientAgreementFrom" onsubmit="return validateForm4()" >
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<input type="hidden" name="pid" value="<?=$pid?>">
<input type="hidden" name="form_status" value="2">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="activeRef">
<input type="hidden" name="form_mode" value="<?php if($pdata->form_status>2) echo 'Edit'; else echo 'Add'; ?>">
<!-- <hr class="my-2"> -->
<h4 class="font-weight-bold">Advance Directive</h4>
<hr class="my-2">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Advance Directive'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="advanceDirective" id="Advance_yes" value="YES" <?php echo ($idata->AdvDirective == 'YES')?'checked':'' ; ?>>
<label class="form-check-label" for="Advance_yes">
YES
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="advanceDirective" id="Advance_no" value="NO" <?php echo ($idata->AdvDirective == 'NO')?'checked':'' ; ?>>
<label class="form-check-label" for="Advance_no">
NO
</label>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('IF YES'); ?></label>
<select class="form-control" name="advanceDirectiveIfyes" id="advanceDirectiveIfyes">
<option value="" selected>Choose...</option>
<option <?php if($idata->AdvDirectiveIfYes == "Do not Resuticate") echo 'selected'; ?> value="Do not Resuticate">Do not Resuticate</option>
<option <?php if($idata->AdvDirectiveIfYes == "Living Will") echo 'selected'; ?> value="Living Will">Living Will</option>
<option <?php if($idata->AdvDirectiveIfYes == "Health Care Proxy") echo 'selected'; ?> value="Health Care Proxy">Health Care Proxy</option>
<option <?php if($idata->AdvDirectiveIfYes == "New York Health Care Proxy") echo 'selected'; ?> value="New York Health Care Proxy">New York Health Care Proxy</option>
<option <?php if($idata->AdvDirectiveIfYes == "Other") echo 'selected'; ?> value="Other">Other</option>
<option <?php if($idata->AdvDirectiveIfYes == "File Upload") echo 'selected'; ?> value="file-upload" disabled>File Upload</option>
</select>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Date Recived'); ?></label>
<input type="date" class="form-control" name="advDateREcived" id="advDateREcived" placeholder="" value="<?php echo $idata->AdvDirectiveDateRecived; ?>" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6" id="advUploadFIle" style="display: none;">
<label for="exampleInputEmail1"><?php echo lang('Upload file'); ?></label>
<input type="file" class="form-control" name="advUploadFIle" placeholder="">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('DNR'); ?></label>
<input type="text" class="form-control" name="advDNR" id="advDNR" value="<?php echo $idata->advDnr; ?>" placeholder="" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Date Effective'); ?></label>
<input type="date" class="form-control" name="advDateEffective" id="advDateEffective" value="<?php echo $idata->AdvDirectiveDateRecived; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Physician'); ?></label>
<input type="text" class="form-control" name="advDateREcived" id="advDateREcived" value="<?php echo $idata->AdvDirectiveEffective; ?>">
</div>
</div>
</div>
<!-- advance directive -->
<hr class="my-2">
<h4 class="font-weight-bold">Emergency contact</h4>
<hr class="my-2">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('First Name'); ?></label>
<input type="text" class="form-control" name="emgNamefname" id="exampleInputEmail1" value="<?php echo $idata->emgContactFirstName; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Last Name'); ?></label>
<input type="text" class="form-control" name="emgNamelname" id="exampleInputEmail1" value="<?php echo $idata->emgContactLastName; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Relationship to the Patient'); ?></label>
<!-- <input type="text" class="form-control" name="emgRelationtoPt" id="exampleInputEmail1" value="<?php echo $idata->emgContactRelation; ?>"> -->
<select class="form-control" name="emgRelationtoPt" >
<option value="" disabled>Choose...</option>
<?php foreach ($relationList as $value) { ?>
<option <?php echo ($idata->emgContactRelation == $value->name)?'selected':'' ; ?> value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<?php $iAdata = json_decode($idata->emgContactAddress); ?>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<!-- <input type="hidden" name="lang2" id="lang2">
<input type="hidden" name="long2" id="long2"> -->
<input type="text" class="form-control" name="address3" id="address3" value="<?php echo $iAdata->address; ?>" required="">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment3" id="AddrApartment3" value="<?php echo $iAdata->Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity3" id="city3" value="<?php echo $iAdata->City; ?>" required="" readonly>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState3" id="state3" value="<?php echo $iAdata->State; ?>" required="" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty3" id="county3" value="<?php echo $iAdata->County; ?>" required="" readonly>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode3" id="zipcode3" value="<?php echo $iAdata->Zipcode; ?>" required="">
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader3" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn3" value="3" onclick="check_parmanent_address(this);"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Telephone'); ?></label>
<input type="text" class="form-control form-control onlyNumber" onkeyup="USformatPhoneNumber(this.value,this)" name="emgTelephone" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Other Number'); ?></label>
<input type="text" class="form-control form-control onlyNumber" onkeyup="USformatPhoneNumber(this.value,this)" name="emgOtrNumber" id="exampleInputEmail1" value="<?php echo $idata->emgContactOteNo; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Email'); ?></label>
<input type="text" class="form-control" name="emgEmail" id="exampleInputEmail1" value="<?php echo $idata->emgContactEmail; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Lives with Patient'); ?></label>
<!-- <input type="text" class="form-control" name="emglivesWithPatient" id="exampleInputEmail1" value="<?php echo $idata->emgContactLiveswithPatient; ?>"> -->
<div class="col-lg-6">
<!-- <label for="exampleInputEmail1"><?php echo lang('Access to home'); ?></label> -->
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="emglivesWithPatient" id="Lives_yes" value="YES" <?php echo ($idata->emgContactLiveswithPatient == 'YES')?'checked':'' ; ?>>
<label class="form-check-label" for="Lives_yes">
YES
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="emglivesWithPatient" id="Lives_no" value="NO" <?php echo ($idata->emgContactLiveswithPatient == 'NO')?'checked':'' ; ?>>
<label class="form-check-label" for="Lives_no">
NO
</label>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<!-- <label for="exampleInputEmail1"><?php echo lang('Access to home'); ?></label> -->
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="emgAccessTohome" id="Have_keys" value="Have keys" <?php echo ($idata->emgContactAccessToHome == 'Have keys')?'checked':'' ; ?> >
<label class="form-check-label" for="Have_keys">
Have keys
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="emgAccessTohome" id="Access_to_home" value="Access to home" <?php echo ($idata->emgContactAccessToHome == 'Access to home')?'checked':'' ; ?> >
<label class="form-check-label" for="Access_to_home">
Access to home
</label>
</div>
</div>
</div>
</div>
<!-- emergency contact -->
<hr class="my-2">
<div class="form-group pull-right">
<label for="exampleInputEmail1"><?php echo lang('Same as general'); ?>
&nbsp;&nbsp;<input type="checkbox" name="" id="designateSame">
</label>
</div>
<h4 class="font-weight-bold">Designate Other</h4>
<hr class="my-2">
<script type="text/javascript">
$("#designateSame").click(function(){
if($('#designateSame').prop('checked')){
document.forms["patientAgreementFrom"]["dg_fname"].value = document.forms["newGenInfo"]["fname"].value;
document.forms["patientAgreementFrom"]["dg_lname"].value = document.forms["newGenInfo"]["lname"].value;
document.forms["patientAgreementFrom"]["dg_telephone"].value = document.forms["newGenInfo"]["telephone"].value;
document.forms["patientAgreementFrom"]["dg_cell"].value = document.forms["newGenInfo"]["cellphone"].value;
}else{
document.forms["patientAgreementFrom"]["dg_fname"].value = "";
document.forms["patientAgreementFrom"]["dg_lname"].value = "";
document.forms["patientAgreementFrom"]["dg_telephone"].value = "";
document.forms["patientAgreementFrom"]["dg_cell"].value = "";
}
});
</script>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="dg_fname" value='<?php echo $pdata->designate_first_name; ?>'>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="dg_lname" value='<?php echo $pdata->designate_last_name; ?>' placeholder="">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Telephone'); ?></label>
<input type="text" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" class="form-control onlyNumber" name="dg_telephone" value='<?php echo $pdata->designate_telephone; ?>'>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Other Telephone'); ?></label>
<input type="text" onkeyup="USformatPhoneNumber(this.value,this)" minlength="10" maxlength="10" class="form-control onlyNumber" name="dg_cell" value='<?php echo $pdata->designate_cell; ?>'>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Email'); ?></label>
<input type="email" class="form-control" name="dg_email" value='<?php echo $pdata->designate_email; ?>'>
</div>
</div>
</div>
<div class="row">
<div class="col-12 mb-2">
<a class="badge badge-primary btn-sm badge_new_btn pull-right" target="_blank" href="<?=base_url()?>referral/patientAgreementForm?pid=<?=$pdata->id?>" style="padding: 5px 5px 7px !important;"> <i class="la la-link"></i><?=lang('Download patient agreement form')?></a>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<hr class="mt-0 mb-0" />
</div>
<div class="card-body">
<div class="row">
<div class=" col-md-12">
<label class="required" for="patient_agreement_Document_Verified"><?php echo lang('Document Verified'); ?></label>
<input type="checkbox" name="patient_agreement_Document_Verified" class="form-group" id="patient_agreement_Document_Verified" value="Verified" <?php echo ($pdata->patient_auth_stat == '1')?'checked' : ''; ?>>
</div>
</div>
<div class="row">
<div class=" col-md-12" id="msgActivation">
</div>
</div>
<?php foreach ($PAGDdocs as $trd){ ?>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<a target="_blank" href="<?=base_url()?><?=$trd->path?><?=$trd->file_name?>">
<img src="<?=base_url()?>uploads/attachment.png" class="img-thumbnail" style="height: 30px;">
</a><?=$trd->originalfilename?>
</div>
<div class="col-lg-4">
<!-- <input type="text" class="form-control" name="otherDoc_remarks" value="<?=$trd->remarks?>"> -->
<p class="form-control"> <?=$trd->remarks?> </p>
</div>
<div class="col-lg-2">
<a href="<?=base_url()?>referral/documentDelete?fid=<?=$trd->id?>&redirect=referral/editReferal?pid=<?=$pdata->id?>" class="badge badge-pill badge-danger white">Delete</a>
</div>
</div>
</div>
<?php } ?>
<div class="row">
<div class=" col-md-12" id="agreementVerifiedDocument">
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<button type="submit" name="submit" value="patientAgreement" id="patientAgreementBtn" class="btn btn-info <?php echo ($pdata->patient_auth_stat != '1')?'disabled' : ''; ?>" <?php echo ($pdata->patient_auth_stat != '1')?'disabled' : ''; ?>><?php echo lang('submit'); ?></button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- patient agreement -->
<div class="tab-pane <?php echo $tabPane3; ?>" id="tab33" aria-labelledby="base-tab33" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" action="<?php echo base_url(); ?>referral/editReferal?pid=<?php echo $_GET['pid']; ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<div class="form-group">
<input type="hidden" name="pid" value="<?=$pid?>">
<input type="hidden" name="fromType" value="activeRef">
<input type="hidden" name="form_status" value="3">
<input type="hidden" name="tabPgs" value="20">
<input type="hidden" name="form_mode" value="<?php if($pdata->form_status>3) echo 'Edit'; else echo 'Add'; ?>">
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Level of care needed'); ?></label>
<select class="form-control" name="level_care" id="inputGroupSelect01">
<option >Choose...</option>
<option <?php echo ($pdata->level_of_care == '1')?'selected':'' ; ?> value="1">1 High</option>
<option <?php echo ($pdata->level_of_care == '2')?'selected':'' ; ?> value="2">2</option>
<option <?php echo ($pdata->level_of_care == '3')?'selected':'' ; ?> value="3">3</option>
<option <?php echo ($pdata->level_of_care == '4')?'selected':'' ; ?> value="4">4</option>
<option <?php echo ($pdata->level_of_care == '5')?'selected':'' ; ?> value="5">5 Low</option>
</select>
</div>
<div class="col-md-6">
<label for="firstName3">
<?php echo lang('Service Activity/Therapy Needed'); ?>
<span class="danger">*</span>
</label>
<!-- <?php var_dump($serviceActivityTherapy); ?> -->
<select class="form-control required" name="service_activity" id="service_activity" required="">
<option value="" selected>Choose...</option>
<option value="Lab Draw">Lab Draw</option>
<?php foreach ($serviceActivityTherapy as $datas) { ?>
<?php $saTypeVal = ($pdata->service_type_required=='Service')? $pdata->service_ids : $pdata->therapy_ids ; ?>
<option <?php echo ($pdata->service_type_required.'~'.$saTypeVal == $datas['value'])?'selected':'' ; ?> value="<?=$datas['value']?>"><?=$datas['name']?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<?php $dbData = explode(',', $pdata->type_access); // var_dump($dbData); ?>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Type of access'); ?></label>
<select class="form-control" name="type_access[]" id="type_access" multiple>
<option value="" disabled>Choose...</option>
<?php foreach ($accessType as $value) { ?>
<option <?php echo (in_array($value->id, $dbData))? 'selected' : '' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
<!-- <div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Corresponding Requirements'); ?></label>
<input type="text" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div> -->
</div>
</div>
<!-- <hr class="my-1">
<h4 class="font-weight-bold">Medication</h4>
<hr class="my-1"> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-4">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Name'); ?></label>
<select class="form-control" name="medication_name" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Frequency'); ?></label>
<select class="form-control" name="medication_frequency" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Route'); ?></label>
<select class="form-control" name="medication_route" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div> -->
<script type="text/javascript">
$("#service_activity").change(function(){
if ($(this).val() == 'Lab Draw')
{
$("#forLabDraw").show();
}
else
{
$("#forLabDraw").hide();
}
});
</script>
<div id="forLabDraw" style="display: none;">
<hr class="my-1">
<h4 class="font-weight-bold">Lab Company</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Lab Company'); ?></label>
<select class="form-control" name="lab_company" id="inputGroupSelect01">
<option value="">Choose...</option>
<option value="">LabCorp</option>
<option value="">Quest</option>
<option value="">Other</option>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Type of Labs Required'); ?></label>
<select class="form-control" name="Type_lab_required" id="inputGroupSelect01">
<option value="">Choose...</option>
<option value="">Quest</option>
<option value="">Other</option>
</select>
</div>
</div>
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">Lab Frequency</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-4">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Intervals'); ?></label>
<select class="form-control" name="Intervals" id="inputGroupSelect01">
<option value="">Choose...</option>
<option value="Intervals are Daily">Intervals are Daily</option>
<option value="Weekly">Weekly</option>
<option value="Once a Week">Once a Week</option>
</select>
</div>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Day'); ?></label>
<select class="form-control" name="Day" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Time'); ?></label>
<select class="form-control" name="Time" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Patient seen by MD'); ?></label>
<input type="date" class="form-control" name="patient_seen_by_MD" value="<?php echo $pdata->patient_seen_by_MD; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Current Lab Work'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" <?php echo ($pdata->new_order == 'YES')?'checked':'' ; ?> name="current_lab_work" id="radio" value="YES">
<label class="form-check-label" for="YES">
YES
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" <?php echo ($pdata->new_order == 'NO')?'checked':'' ; ?> name="current_lab_work" id="radio" value="NO">
<label class="form-check-label" for="NO">
NO
</label>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Lab Order'); ?></label>
<input type="text" class="form-control" name="lab_order" value="<?php echo $pdata->lab_order; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Additional Lab Orders'); ?></label>
<input type="text" class="form-control" name="additional_lab_order" value="<?php echo $pdata->additional_lab_order; ?>" placeholder="">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Lab Frequency'); ?></label>
<select class="form-control" name="lab_frequency" id="inputGroupSelect01">
<option <?php echo ($pdata->lab_frequency == 'Weekly')?'selected':'' ; ?> value="Weekly">Weekly</option>
<option <?php echo ($pdata->lab_frequency == 'Every 2 weeks')?'selected':'' ; ?> value="Every 2 weeks">Every 2 weeks</option>
<option <?php echo ($pdata->lab_frequency == 'Every other week')?'selected':'' ; ?> value="Every other week">Every other week</option>
<option <?php echo ($pdata->lab_frequency == 'Every 6 months')?'selected':'' ; ?> value="Every 6 months">Every 6 months</option>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Other Lab Frequency'); ?></label>
<input type="text" class="form-control" name="other_lab_frequency" value="<?php echo $pdata->other_lab_frequency; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Tube'); ?></label>
<select class="form-control" name="tube_type" id="inputGroupSelect01">
<option value="" selected>Choose...</option>
<?php foreach ($tubes as $value) { ?>
<option <?php echo ($pdata->tube_type == $value->name)?'selected':'' ; ?> value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Formula'); ?></label>
<input type="text" class="form-control" name="formula"
value="<?php echo $pdata->formula; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Flush With (Water)'); ?></label>
<select class="form-control" name="flush_with" id="inputGroupSelect01">
<option value="" selected>Choose...</option>
<?php for($i = 10; $i<=240; $i++) { ?>
<option <?php echo ($pdata->flush_with == $i)?'selected':'' ; ?> value="<?=$i?>"><?php echo $i; ?> ML</option>
<?php } ?>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Flush Frequency'); ?></label>
<div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'Before Feed')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox1" value="Before Feed">
<label class="form-check-label" for="inlineCheckbox1">Before Feed</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'After Feed')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox2" value="After Feed">
<label class="form-check-label" for="inlineCheckbox2">After Feed</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'Before Medication')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox2" value="Before Medication">
<label class="form-check-label" for="inlineCheckbox2">Before Medication</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'After Madication')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox2" value="After Madication">
<label class="form-check-label" for="inlineCheckbox2">After Madication</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Daily Intake Requirment'); ?></label>
<input type="text" class="form-control" name="daily_intake_requirment" value="<?php echo $pdata->daily_intake_requirment; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fluide Restrictions'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="fluid_restriction" id="fluid_restriction_yes" value="YES" <?php echo ($pdata->fluid_restriction == 'YES')?'checked':'' ; ?>>
<label class="form-check-label" for="fluid_restriction_yes">YES</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="fluid_restriction" id="fluid_restriction_no" value="NO" <?php echo ($pdata->fluid_restriction == 'NO')?'checked':'' ; ?>>
<label class="form-check-label" for="fluid_restriction_no">NO</label>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fluide Restriction Amount'); ?></label>
<input type="text" class="form-control" name="fluide_restric_amount"
value="<?php echo $pdata->fluide_restric_amount ; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fluide Restriction Frequency'); ?></label>
<div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" name="fluide_restric_frequency" type="radio" id="inlineCheckbox3" value="Per day" <?php echo ($pdata->fluide_restric_frequency == 'Per day')?'checked':'' ; ?>>
<label class="form-check-label" for="inlineCheckbox2">Per day</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" name="fluide_restric_frequency" type="radio" id="inlineCheckbox4" value="Per Hour" <?php echo ($pdata->fluide_restric_frequency == 'Per Hour')?'checked':'' ; ?>>
<label class="form-check-label" for="inlineCheckbox2">Per Hour</label>
</div>
</div>
</div>
</div>
</div>
<!-- lab draw div -->
</div>
<!-- lab draw div -->
<div class="col-md-12 form-group">
<button type="submit" name="submit" value="services" class="btn btn-info"><?php echo lang('submit'); ?></button>
</div>
</form>
</div>
<div class="tab-pane <?php echo $tabPane4; ?>" id="tab34" aria-labelledby="base-tab34" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" action="<?php echo base_url(); ?>referral/editReferal?pid=<?php echo $_GET['pid']; ?>" method="post" enctype="multipart/form-data" name="newInsuranceFrom" onsubmit="return validateForm4()" >
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<input type="hidden" name="fromType" value="activeRef">
<input type="hidden" name="pid" value="<?=$pid?>">
<input type="hidden" name="form_status" value="4">
<input type="hidden" name="tabPgs" value="20">
<input type="hidden" name="form_mode" value="<?php if($pdata->form_status>4) echo 'Edit'; else echo 'Add'; ?>">
<!-- <hr class="my-2"> -->
<h4 class="font-weight-bold">Payer Type</h4>
<hr class="my-2">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Payer Type'); ?></label>
<!-- <input type="text" class="form-control" name="payerType" value="<?php echo $pdata->payerType; ?>"> -->
<select class="form-control" name="payerType" id="payer_type_1" required="">
<option value="" selected disabled="">Choose...</option>
<?php foreach ($payerType as $value) { ?>
<option <?php echo ($pdata->payerType == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<hr class="my-2">
<div class="form-group">
<div class="row" id="pmodeRow" style="display: none;">
<div class="col-md-3 pmodes" id="CreditDebit">
<input class="form-check form-check-inline paymodes" type="radio" name="paymentModes" id="CreditorDebitCard" value="Credit or Debit Card">
<label class="form-check-label" for="CreditorDebitCard">
Credit or Debit Card
</label>
</div>
<div class="col-md-3 pmodes" id="etf">
<input class="form-check form-check-inline paymodes" type="radio" name="paymentModes" id="EFT" value="EFT">
<label class="form-check-label" for="EFT">
EFT
</label>
</div>
<div class="col-md-3 pmodes" id="monthlyInvoice">
<input class="form-check form-check-inline paymodes" type="radio" name="paymentModes" id="MonthlyInvoice" value="Monthly Invoice">
<label class="form-check-label" for="MonthlyInvoice">
Monthly Invoice
</label>
</div>
<div class="col-md-3 pmodes" id="InsuranceInformation">
<input class="form-check form-check-inline paymodes" type="radio" style="display:none;" name="paymentModes" id="InsuranceInformationradio" value="Insurance Information">
<label class="form-check-label" for="InsuranceInformation">
Insurance Information
</label>
</div>
</div>
</div>
<span id="insInfoSection" class="paymodesSh" style="display: none;">
<hr class="my-2">
<h4 class="font-weight-bold">Insurance Information</h4>
<hr class="my-2">
<div class="form-group">
<div class="row" style="display: <?php echo ($pdata->reference_information == 'Reffered by Vendor')? 'block' : 'none'; ?>;">
<div class="col-lg-3">
<input class="form-check-input" type="checkbox" name="RefertoVendorDocument" id="RefertoVendorDocument" value="Refer to Vendor Document" notRequired="TRUE">
<label class="form-check-label" for="RefertoVendorDocument">
Refer to Vendor Document
</label>
</div>
<hr>
</div>
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Insurance Type'); ?></label>
<select class="form-control" name="insurance_type" id="insurance_type">
<option value="" selected>Choose...</option>
<option value="Madicaid" >Madicaid(MCOs)</option>
<option value="Private" >Private(PPOs)</option>
</select>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Insurance Plan'); ?></label>
<select class="form-control" name="insurance_plan" id="insurance_plan">
<option value="" selected>Choose...</option>
<?php foreach ($insuranceCompanyList as $value) { ?>
<option <?php echo ($pdata->reference_id == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->vedor_name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<span id="medicaidInfoSection" style="display: none;">
<hr class="my-2">
<h4 class="font-weight-bold">Medicaid information</h4>
<hr class="my-2">
<!-- <p class="lead"> Please fill all the emergency contact</p> -->
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Medicaid ID'); ?></label>
<input type="text" class="form-control" name="MedicaidId" id="exampleInputEmail1" value="<?php echo $idata->medicaid_id; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Medicaid adult'); ?></label>
<input type="text" class="form-control" name="medicaidAdult" id="exampleInputEmail1" value="<?php echo $idata->medicaid_adult; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Medicaid Pediatric'); ?></label>
<input type="text" class="form-control" name="MedicaidPediriatic" id="exampleInputEmail1" value="<?php echo $idata->medicaid_pedriatic; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Primary or Secondary'); ?></label>
<select class="form-control" name="primarySeconday" id="primarySeconday">
<option value="" selected>Choose...</option>
<option value="Primary">Primary</option>
<option value="Secondary">Secondary</option>
</select>
</div>
</div>
</div>
</span>
<span id="pvtInsInfoSection" style="display: none;">
<hr class="my-2">
<h4 class="font-weight-bold">Private Insurance</h4>
<hr class="my-2">
<!-- <p class="lead"> Please fill all the emergency contact</p> -->
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Insurance Plan ID or Policy Number'); ?></label>
<input type="text" class="form-control" name="privatePolicyNumber" id="privatePolicyNumber" value="<?php echo $idata->Pvt_Ins_PlanId_Policy_no; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Claim Number'); ?></label>
<input type="text" class="form-control" name="Private_claim_number" id="Private_claim_number" value="<?php echo $idata->claim_no; ?>">
</div>
</div>
</div>
</span>
</span>
<span id="CreditDebitPayOpt" class="paymodesSh" style="display: none;">
<hr class="my-2">
<h4 class="font-weight-bold">Credit or Debit Card</h4>
<hr class="my-2">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Credit Card Info'); ?></label>
<input type="text" class="form-control" name="CreditCardInfo" id="exampleInputEmail1" value="<?php echo $idata->CreditCardInfo; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('CC Number'); ?></label>
<input type="text" class="form-control" name="ccNumber" id="exampleInputEmail1" value="<?php echo $idata->ccNumber; ?>">
</div>
</div>
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Expiration'); ?></label>
<input type="text" class="form-control" name="ccExpiration" id="exampleInputEmail1" value="<?php echo $idata->ccExpiration; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('CVV'); ?></label>
<input type="text" class="form-control" name="ccCvv" id="exampleInputEmail1" value="<?php echo $idata->ccCvv; ?>">
</div>
</div>
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Zipcode'); ?></label>
<input type="text" class="form-control" name="ccZipcode" id="exampleInputEmail1" value="<?php echo $idata->ccZipcode; ?>">
</div>
</div>
</div>
</span>
<span id="ETFPayOpt" class="paymodesSh" style="display: none;">
<hr class="my-2">
<h4 class="font-weight-bold">EFT</h4>
<hr class="my-2">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Bank Account'); ?></label>
<input type="text" class="form-control" name="bankAccount" id="exampleInputEmail1" value="<?php echo $idata->bankAccount; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('name'); ?></label>
<input type="text" class="form-control" name="bankName" id="exampleInputEmail1" value="<?php echo $idata->bankName; ?>">
</div>
</div>
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Number'); ?></label>
<input type="text" class="form-control" name="bankNumber" id="exampleInputEmail1" value="<?php echo $idata->bankNumber; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Routing Number'); ?></label>
<input type="text" class="form-control" name="RoutingNumber" id="exampleInputEmail1" value="<?php echo $idata->RoutingNumber; ?>">
</div>
</div>
</div>
</span>
<span id="monthlyInvoicePayOpt" class="paymodesSh" style="display: none;">
<hr class="my-2">
<h4 class="font-weight-bold">Monthly Invoice</h4>
<hr class="my-2">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Monthly Invoice'); ?></label>
<input type="text" class="form-control" name="Monthly Invoice" id="exampleInputEmail1" value="<?php echo $idata->Monthly_Invoice; ?>">
</div>
</div>
</div>
</span>
<button type="submit" name="submit" value="insInfo" class="btn btn-info"><?php echo lang('submit'); ?></button>
</form>
</div>
<!-- md info -->
<div role="tabpanel" class="tab-pane <?php echo $tabPane5; ?>" id="tab32" aria-expanded="true" aria-labelledby="base-tab32" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" action="editReferal?pid=<?php echo $_GET['pid']; ?>" method="post" name="referalFrom" onsubmit="return validateForm3()" enctype="multipart/form-data">
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<input type="hidden" name="fromType" value="activeRef">
<input type="hidden" name="pid" value="<?=$pid?>">
<input type="hidden" name="form_status" value="5">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="form_mode" value="<?php if($pdata->form_status>4) echo 'Edit'; else echo 'Add'; ?>">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Primary Care Physician/MD Info (NPI)'); ?><span class="danger">*</span></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="">
NPI
<!-- <span id="npiNoValidating" style="display: none"><i class="la la-hourglass-start" style="color: blue;"></i></span>
<span id="npiValid" style="display: none"><i class="la la-check" style="color: green;"></i></span>
<span id="npiinValid" style="display: none"><i class="la la-close" style="color: red;"></i></span> -->
</span>
</div>
<input type="text" class="form-control" name="primaryCarePhyMdInfo" id="phymdNPI" value="<?php echo $pdata->primaryCarePhyMdNpi; ?>" minlength="10" maxlength="10" required>
<div class="input-group-append" id="npivalidateTab" style="display: none;">
<span class="input-group-text" >
<span id="npiNoValidating" style="display: none"><i class="la la-hourglass-start" style="color: blue;"></i></span>
<span id="npiValid" style="display: none"><i class="la la-check" style="color: green;">Valid</i></span>
<span id="npiinValid" style="display: none"><i class="la la-close" style="color: red;">Invalid</i></span>
</span>
</div>
</div>
<input type="hidden" name="npivalidate" id="npivalidate" value="<?php if($pdata->primaryCarePhyMdNpi!=""){echo "valid";} ?>">
</div>
<!-- <div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Diagnosis'); ?></label>
<input type="text" class="form-control" name="diagnosis" value="<?php echo $pdata->diagnosis; ?>">
</div> -->
</div>
</div>
<div class="col-md-12 form-group row mt-1">
<button type="submit" name="submit" value="mdOrders_info" class="btn btn-info"><?php echo lang('submit'); ?></button>
</div>
</form>
<?php if($pdata->primaryCarePhyMdNpi!=""){ ?>
<?php $this->load->view('md_order/OrderInsideView',$subData); ?>
<?php $this->load->view('md_order/InsideFooterScript',$subData); ?>
<?php } ?>
</div>
<!-- md info -->
<!-- insurance authotization -->
<div role="tabpanel" class="tab-pane <?php echo $tabPane6; ?>" id="tab37" aria-expanded="true" aria-labelledby="base-tab37" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<form role="form" action="<?php echo base_url(); ?>referral/editReferal?pid=<?php echo $_GET['pid']; ?>" method="post" enctype="multipart/form-data" name="newInsuranceFrom" onsubmit="return validateForm4()" >
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
<input type="hidden" name="fromType" value="activeRef">
<input type="hidden" name="pid" value="<?=$pid?>">
<input type="hidden" name="form_status" value="6">
<input type="hidden" name="tabPgs" value="20">
<input type="hidden" name="form_mode" value="<?php if($pdata->form_status>4) echo 'Edit'; else echo 'Add'; ?>">
<!-- <?php var_dump($insCompanyDetails); ?> -->
<div class="row">
<div class="col-12">
<!-- <div class="card">
<hr class="mt-0 mb-0" />
</div> -->
<div class="card-body">
<?php if($idata->paymentModes == 'Insurance Information'){ ?>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fax No.'); ?></label>
<input type="text" class="form-control" name="InsfaxNo" value="<?php echo $insCompanyDetails->fax_no; ?>">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Web Addrress'); ?></label>
<input type="text" class="form-control" name="InsWebAdd" value="<?php echo $insCompanyDetails->web_address; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('EIN No'); ?></label>
<input type="text" class="form-control" name="InsEin" value="<?php echo $insCompanyDetails->ein_no; ?>" minlength="9" maxlength="9">
</div>
</div>
<div class="col-lg-6">
<label for="firstName3" class="required"><?php echo lang('Contract Period'); ?></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="">Start</span>
</div>
<input type="date" class="form-control" name="InsContractStart" value="<?php echo $idata->InsContractStart; ?>" required>
<div class="input-group-prepend">
<span class="input-group-text" id="">End</span>
</div>
<input type="date" class="form-control" name="InsContractEnd" value="<?php echo $idata->InsContractEnd; ?>" required>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Location'); ?></label>
<input type="text" class="form-control" name="InsLocation" value="<?php echo $idata->InsEin; ?>">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Notes'); ?></label>
<textarea class="form-control" name="InsNotes"><?php echo $idata->InsEin; ?></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-6">
<label for="firstName3">
<?php echo lang('Skilled Nursing Care'); ?>
<span class="danger">*</span>
</label>
<select class="form-control" name="skilled_nursing_care" id="skilled_nursing_care" required="">
<option value="" selected>Choose...</option>
<?php foreach ($skillNursingCare as $value) { ?>
<option <?php echo ($idata->skilled_nursing_care == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>" attr_name="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
<div class="col-md-6">
<label for="firstName3">
<?php echo lang('HCPCS/CPT CODES'); ?>
<span class="danger">*</span>
</label>
<select class="form-control" name="HCPCS_codes" id="HCPCS_codes" required="">
<option value="" selected>Choose...</option>
<?php foreach ($HCPCSCodes as $value) { ?>
<option <?php echo ($idata->HCPCS_codes == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>" attr_name="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class=" col-md-12">
<label for="ins_agreement_doc_Verified" class="required"><?php echo lang('Insurance Document Verified'); ?></label>
<input type="checkbox" name="ins_agreement_doc_Verified" class="form-group" id="ins_agreement_doc_Verified" value="Verified" <?php echo ($pdata->insurance_auth_stat == '1')?'checked' : ''; ?>>
</div>
</div>
<div class="row">
<div class=" col-md-12" id="InsMsgActivation">
</div>
</div>
<?php foreach ($INSDdocs as $trd){ ?>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<a target="_blank" href="<?=base_url()?><?=$trd->path?><?=$trd->file_name?>">
<img src="<?=base_url()?>uploads/attachment.png" class="img-thumbnail" style="height: 30px;">
</a><?=$trd->originalfilename?>
</div>
<div class="col-lg-4">
<input type="text" class="form-control" name="otherDoc_remarks" value="<?=$trd->remarks?>">
</div>
<div class="col-lg-2">
<a href="<?=base_url()?>referral/documentDelete?fid=<?=$trd->id?>&redirect=referral/activatePatient?pid=<?=$pdata->id?>" class="badge badge-pill badge-danger white">Delete</a>
</div>
</div>
</div>
<?php } ?>
<div class="row">
<div class=" col-md-12" id="insVerifiedDocument">
</div>
</div>
<?php } else { ?>
<div class="row">
<div class=" col-md-12">
<label for="exampleInputEmail1" class="required"><?php echo lang('Varification not mandetory (please check to skip)'); ?></label>
<input type="checkbox" name="ins_agreement_doc_Verified" class="form-group" id="ins_agreement_doc_Verified" value="Verified" <?php echo ($pdata->insurance_auth_stat == '1')?'checked' : ''; ?>>
</div>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12 form-group mt-1">
<button type="submit" name="submit" value="insAgreement" id="insAgreementBtn" class="btn btn-info <?php echo ($pdata->patient_auth_stat != '1')?'disabled' : ''; ?>" <?php echo ($pdata->insurance_auth_stat != '1')?'disabled' : ''; ?>><?php echo lang('submit'); ?></button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- insurance authotization -->
<div class="tab-pane <?php echo $tabPane7; ?>" id="tab35" aria-labelledby="base-tab35" style="padding: 20px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 5px;">
<!-- activation frame -->
<div class="row">
<div class="col-12">
<!-- <div class="card">
<hr class="mt-0 mb-0" />
</div> -->
<div class="card-body">
<div class="row">
<div class=" col-md-12">
<label for="check_acElgb" class="required"><?php echo lang('Activate referral'); ?></label>
<input type="checkbox" name="activation" class="form-group" id="check_acElgb" value="<?=$pid?>">
</div>
</div>
<div class="row">
<div class=" col-md-12" id="msgActivationCtra">
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<a href="activateReferral?pid=<?php echo $_GET['pid']; ?>&activate=true" id="activatePatient" value="services" class="btn btn-info disabled pull-left"><?php echo lang('Activate'); ?></a>
</div>
</div>
</div>
</div>
</div>
<!-- activation frame -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div use="insuranceDocuploadContaner" style="display: none;">
<div class="eachinsuranceDocupload" action="<?php echo base_url(); ?>referral/documentsSave" enctype="multipart/form-data" use="insuranceDocuploadForm">
<div class="row">
<div class="form-group col-md-6">
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Document (gif/jpg/png/jpeg/pdf)'); ?></label>
<input type="file" class="form-control" name="<?php echo "insDoc" ; ?>[]">
</div>
<div class="form-group col-md-4">
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Remarks'); ?></label>
<input type="text" class="form-control" name="<?php echo "insDoc" ; ?>_remarks[]">
</div>
<div class="form-group col-md-2">
<img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="lessinsAgreementDocument(this);" class="img-thumbnail" style="height:30px; margin-top: 20px; cursor: pointer;" >
<img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="insAgreementDocument(null);" class="img-thumbnail" style="height:30px;margin-top: 20px; cursor: pointer;">
</div>
</div>
</div>
</div>
<div use="agreementDocuploadContaner" style="display: none;">
<div class="eachagreementDocupload" action="<?php echo base_url(); ?>referral/documentsSave" enctype="multipart/form-data" use="agreementDocuploadForm">
<div class="row">
<div class="form-group col-md-6">
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Document (gif/jpg/png/jpeg/pdf)'); ?></label>
<input type="file" class="form-control" name="<?php echo "pagreeDoc" ; ?>[]" >
</div>
<div class="form-group col-md-4">
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Remarks'); ?></label>
<input type="text" class="form-control" name="<?php echo "pagreeDoc" ; ?>_remarks[]" >
</div>
<div class="form-group col-md-2">
<img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="lessPatientAgreementDocument(this);" class="img-thumbnail" style="height:30px; margin-top: 20px; cursor: pointer;" >
<img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="patientAgreementDocument(null);" class="img-thumbnail" style="height:30px;margin-top: 20px; cursor: pointer;">
</div>
</div>
</div>
</div>
<div use="otherUploadFormContainer" style="display: none;">
<div class="eachTrachDoc" action="<?php echo base_url(); ?>referral/documentsSave" enctype="multipart/form-data" use="otherUploadForm">
<div class="row">
<!-- <input type="hidden" name="id" id="patient_id" value="<?php echo $_GET['pid']; ?>">
<input type="hidden" name="doc_type" value="<?php echo "TRACH" ; ?>">
<input type="hidden" name="doc_id" value=""> -->
<div class="form-group col-md-6">
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Other Documents (gif/jpg/png/jpeg/pdf)'); ?></label>
<input type="file" class="form-control" name="<?php echo "otherDoc" ; ?>[]" >
</div>
<div class="form-group col-md-4">
<label for="exampleInputEmail1" class="required-field"><?php echo lang('Remarks'); ?></label>
<input type="text" class="form-control" name="<?php echo "otherDoc" ; ?>_remarks[]" >
</div>
<div class="form-group col-md-2">
<img src="<?php echo base_url(); ?>uploads/minus.png" use="minusbutt" onclick="less_other_documents(this);" class="img-thumbnail" style="height:30px; margin-top: 20px;cursor: pointer;" >
<img src="<?php echo base_url(); ?>uploads/plus.png" use="plusbutt" onclick="add_other_documents(null);" class="img-thumbnail" style="height:30px;margin-top: 20px;cursor: pointer;" >
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
$("#payer_type_1").change(function(){
$ptype = $(this).val();
$("#pmodeRow").show();
$(".paymodesSh").hide();
$(".pmodes").hide();
$(".paymodes").attr('checked', false);
if ($ptype == '1') {
$("#CreditDebit").show();
$("#etf").show();
$("#monthlyInvoice").show();
}
else if ($ptype == '2' || $ptype == '3' || $ptype == '4') {
$("#InsuranceInformation").show();
$("#insInfoSection").show();
$("#InsuranceInformationradio").attr('checked', true);
setRequiredFields($("#insCommonInfoSection"));
}
if ($ptype == '5') {
$("#etf").show();
$("#monthlyInvoice").show();
}
});
var payerType = "<?php echo $idata->payerType; ?>";
var paymode = "<?php echo $idata->paymentModes; ?>";
if(payerType!='' && paymode != '')
{
$('#payer_type_1').val(payerType).trigger('change');
// $("input[name=payerType][value='" + payerType + "']").attr('selected', 'selected').trigger('change');
$("input[name=paymentModes][value='" + paymode + "']").attr('checked', 'checked').trigger('click');
if (paymode == 'Insurance Information')
{
var insType = "<?php echo $idata->insurance_type; ?>";
$('#insurance_type').val(insType).trigger('change');
}
}
$("#donothave").click(function(){
if($('#donothave').prop('checked'))
{
$("#refEmailId"). prop('disabled', true);
}else
{
$("#refEmailId"). prop('disabled', false);
}
});
$(".paymodes").click(function(){
var paymodes = $(this).val();
$(".paymodesSh").hide();
if(paymodes == 'Insurance Information')
{
$("#insInfoSection").show();
setRequiredFields($("#insInfoSection"));
}
if(paymodes == 'Credit or Debit Card')
{
$("#CreditDebitPayOpt").show();
setRequiredFields($("#CreditDebitPayOpt"));
}
if(paymodes == 'EFT')
{
$("#ETFPayOpt").show();
setRequiredFields($("#ETFPayOpt"));
}
if(paymodes == 'Monthly Invoice')
{
$("#monthlyInvoicePayOpt").show();
setRequiredFields($("#monthlyInvoicePayOpt"));
}
});
function setRequiredFields(targetspan)
{
$("#insInfoSection").find("input, select, textarea").removeAttr("required");
$("#CreditDebitPayOpt").find("input, select, textarea").removeAttr("required");
$("#ETFPayOpt").find("input, select, textarea").removeAttr("required");
$("#monthlyInvoicePayOpt").find("input, select, textarea").removeAttr("required");
$.each($(targetspan).find("input, select, textarea"), function(){
if($(this).attr("notRequired")=="TRUE")
{
// do nothinh
}
else
{
$(this).attr("required","required");
}
});
}
$('#pnalguage').select2();
$('#type_access').select2();
})
</script>
<script type="text/javascript">
// --insurance Docs---------------------------------------------------
insAgreementDocument(null);
function insAgreementDocument(data){
var appenddata = $("div[use=insuranceDocuploadContaner]").find("div[use=insuranceDocuploadForm]").clone();
if(data!=null)
{
$.each($(appenddata).find("input"),function(){
var val = data[$(this).attr("name")];
if($(this).attr("type") != 'file')
{
$(this).val(val);
}else{
$(this).removeAttr('required');
$(this).parent().closest('div').find('label').removeClass('required-field');
}
});
if(data.OTR!='')
{
var img_data='<a target="_blank" href="'+data.OTR+'">'
+'<img src="uploads/attachment.png" class="img-thumbnail" style="height: 30px;">'
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 50px;">'
+'</a>';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}else{
var img_data='<img src="uploads/attachment.png" class="img-thumbnail" style="height: 30px;">';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}
}
$('#insVerifiedDocument').append(appenddata);
$('#insVerifiedDocument').find("img[use=plusbutt]").hide();
$('#insVerifiedDocument').find("img[use=plusbutt]").last().show();
$('#insVerifiedDocument').find("img[use=minusbutt]").last().show();
if($('#insVerifiedDocument').find("img[use=minusbutt]").length<=1)
{
$('#insVerifiedDocument').find("img[use=minusbutt]").first().hide();
}
}
function lessinsAgreementDocument(obj){
console.log(obj);
//alert()
var form = $(obj).parent().closest(".eachinsuranceDocupload");
// ajax
$(form).remove();
$('#insVerifiedDocument').find("img[use=plusbutt]").hide();
$('#insVerifiedDocument').find("img[use=plusbutt]").last().show();
$('#insVerifiedDocument').find("img[use=minusbutt]").last().show();
if($('#insVerifiedDocument').find("img[use=minusbutt]").length<=1)
{
$('#insVerifiedDocument').find("img[use=minusbutt]").first().hide();
}
}
// --agreement Docs---------------------------------------------------
patientAgreementDocument(null);
function patientAgreementDocument(data){
var appenddata = $("div[use=agreementDocuploadContaner]").find("div[use=agreementDocuploadForm]").clone();
if(data!=null)
{
$.each($(appenddata).find("input"),function(){
var val = data[$(this).attr("name")];
if($(this).attr("type") != 'file')
{
$(this).val(val);
}else{
$(this).removeAttr('required');
$(this).parent().closest('div').find('label').removeClass('required-field');
}
});
if(data.OTR!='')
{
var img_data='<a target="_blank" href="'+data.OTR+'">'
+'<img src="uploads/attachment.png" class="img-thumbnail" style="height: 30px;">'
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 50px;">'
+'</a>';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}else{
var img_data='<img src="uploads/attachment.png" class="img-thumbnail" style="height: 30px;">';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}
}
$('#agreementVerifiedDocument').append(appenddata);
$('#agreementVerifiedDocument').find("img[use=plusbutt]").hide();
$('#agreementVerifiedDocument').find("img[use=plusbutt]").last().show();
$('#agreementVerifiedDocument').find("img[use=minusbutt]").last().show();
if($('#agreementVerifiedDocument').find("img[use=minusbutt]").length<=1)
{
$('#agreementVerifiedDocument').find("img[use=minusbutt]").first().hide();
}
}
function lessPatientAgreementDocument(obj){
console.log(obj);
//alert()
var form = $(obj).parent().closest(".eachagreementDocupload");
// ajax
$(form).remove();
$('#agreementVerifiedDocument').find("img[use=plusbutt]").hide();
$('#agreementVerifiedDocument').find("img[use=plusbutt]").last().show();
$('#agreementVerifiedDocument').find("img[use=minusbutt]").last().show();
if($('#agreementVerifiedDocument').find("img[use=minusbutt]").length<=1)
{
$('#agreementVerifiedDocument').find("img[use=minusbutt]").first().hide();
}
}
// --trach Docs---------------------------------------------------
add_other_documents(null);
function add_other_documents(data){
var appenddata = $("div[use=otherUploadFormContainer]").find("div[use=otherUploadForm]").clone();
if(data!=null)
{
$.each($(appenddata).find("input"),function(){
var val = data[$(this).attr("name")];
if($(this).attr("type") != 'file')
{
$(this).val(val);
}else{
$(this).removeAttr('required');
$(this).parent().closest('div').find('label').removeClass('required-field');
}
});
if(data.OTR!='')
{
var img_data='<a target="_blank" href="'+data.OTR+'">'
+'<img src="uploads/attachment.png" class="img-thumbnail" style="height: 30px;">'
//+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 50px;">'
+'</a>';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}else{
var img_data='<img src="uploads/attachment.png" class="img-thumbnail" style="height: 30px;">';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}
}
$(appenddata).on("submit",function(e){
e.preventDefault();
submit_upload_form(e,this);
});
$('#mdorder_Trach').append(appenddata);
$('#mdorder_Trach').find("img[use=plusbutt]").hide();
$('#mdorder_Trach').find("img[use=plusbutt]").last().show();
$('#mdorder_Trach').find("img[use=minusbutt]").last().show();
if($('#mdorder_Trach').find("img[use=minusbutt]").length<=1)
{
$('#mdorder_Trach').find("img[use=minusbutt]").first().hide();
}
}
function less_other_documents(obj){
console.log(obj);
//alert()
var form = $(obj).parent().closest(".eachTrachDoc");
// ajax
$(form).remove();
$('#mdorder_Trach').find("img[use=plusbutt]").hide();
$('#mdorder_Trach').find("img[use=plusbutt]").last().show();
$('#mdorder_Trach').find("img[use=minusbutt]").last().show();
if($('#mdorder_Trach').find("img[use=minusbutt]").length<=1)
{
$('#mdorder_Trach').find("img[use=minusbutt]").first().hide();
}
}
</script>
<script type="text/javascript">
function secDigActive(_this){
var val = $(_this).val();
if (val=='Secondary') {
$("#secondaryDiagonosis").show();
}
else{
$("#secondaryDiagonosis").hide();
}
}
$("#advanceDirectiveIfyes").change(function(){
var val = $(this).val();
if(val == 'file-upload'){
$("#advUploadFIle").show();
}
else{
$("#advUploadFIle").hide();
}
});
</script>
<script type="text/javascript">
$(function(){
$("#RefertoVendorDocument").click(function(){
if($('#RefertoVendorDocument').prop('checked')){
$("#insurance_type"). prop('disabled', true);
$("#insurance_plan"). prop('disabled', true);
}else{
$("#insurance_type"). prop('disabled', false);
$("#insurance_plan"). prop('disabled', false);
}
});
$('#insurance_type').change(function(){
var insType = $(this).val();
if(insType == 'Madicaid')
{
document.getElementById("medicaidInfoSection").style.display = "block";
document.getElementById("pvtInsInfoSection").style.display = "none";
}
if(insType == 'Private')
{
document.getElementById("medicaidInfoSection").style.display = "none";
document.getElementById("pvtInsInfoSection").style.display = "block";
}
})
$("#check_acElgb").click(function(){
var pid = $(this).val();
if($('#check_acElgb').prop('checked')){
$.ajax('referral/activatePatientCriterial', {
type: 'POST', // http method
data: { pid: pid, <?php echo $this->security->get_csrf_token_name(); ?>:'<?php echo $this->security->get_csrf_hash(); ?>' }, // data to submit
async: false,
success: function (data, status, xhr) {
var resp = JSON.parse(data);
// alert(data);
if (resp.status == '0') {
$("#msgActivationCtra").html(resp.msg);
$("#activatePatient").addClass('disabled');
}
if (resp.status == '1') {
$("#msgActivationCtra").html(resp.msg);
$("#activatePatient").removeClass('disabled');
}
},
error: function (jqXhr, textStatus, errorMessage) {
alert("error duc");
}
});
}
else {
$("#activatePatient").removeClass('disabled');
$("#activatePatient").addClass('disabled');
}
});
});
function secDigActive(_this){
var val = $(_this).val();
if (val=='Secondary') {
$("#secondaryDiagonosis").show();
}
else{
$("#secondaryDiagonosis").hide();
}
}
$("#advanceDirectiveIfyes").change(function(){
var val = $(this).val();
if(val == 'file-upload'){
$("#advUploadFIle").show();
}
else{
$("#advUploadFIle").hide();
}
});
$(function(){
$("#level_service").change(function(){
var valu = $("#level_service option:selected"). attr("attr_name")
// var valu = $(this).("option:selected").attr("attr_name");
// var valu = $(this).val();
if(valu != 'RN' && valu != 'LPN')
$("#rnlnp").hide();
else
$("#rnlnp").show();
});
});
</script>
<script type="text/javascript"> /* future date dob not accept */
$(document).ready(function () {
// alert("dateSec");
var todaysDate = new Date(); // Gets today's date
// Max date attribute is in "YYYY-MM-DD". Need to format today's date accordingly
var year = todaysDate.getFullYear(); // YYYY
var month = ("0" + (todaysDate.getMonth() + 1)).slice(-2); // MM
var day = ("0" + todaysDate.getDate()).slice(-2); // DD
var maxDate = (year +"-"+ month +"-"+ day); // Results in "YYYY-MM-DD" for today's date
$('#ptdob').attr('max',maxDate);
});
$(".onlyNumber").keypress(function(evt){
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
})
</script>
<script type="text/javascript">
function USformatPhoneNumber(phoneNumberString,_this) {
var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
var match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/)
if (match) {
var intlCode = (match[1] ? '+1 ' : '')
var fres = [intlCode, '(', match[2], ') ', match[3], '-', match[4]].join('')
_this.value = fres;
}
return null
}
</script>
<script type="text/javascript">
function load_progress(){
$.ajax({
url:'<?php echo base_url(); ?>referral/load_progress?id=<?php echo $_GET['pid']; ?>',
type :'GET',
success:function(data){
console.log(data);
if(data>99){ data=100; }
$('#progress_lbl').html(data);
$('#progress_bar').html(data+'%');
$('#progress_bar').attr('aria-valuenow',data);
$('#progress_bar').attr('style','width: '+data+'%;');
}
});
}
$( document ).ready(function() {
setInterval(function(){
load_progress();
}, 1000);
$('.nav-item').click(function(event){
if ($(this).hasClass('disabled')) {
return false;
}else{
$(".nav-item").removeClass("active");
$(this).addClass("active");
}
});
// $('.nav-item').click(function(event){
// $(".nav-item").removeClass("active");
// $(this).addClass("active");
// });
$("#patient_agreement_Document_Verified").click(function(){
if($('#patient_agreement_Document_Verified').prop('checked')){
$("#patientAgreementBtn").removeClass("disabled");
$("#patientAgreementBtn"). prop('disabled', false);
}
else{
$("#patientAgreementBtn").addClass("disabled");
$("#patientAgreementBtn"). prop('disabled', true);
}
});
$("#ins_agreement_doc_Verified").click(function(){
if($('#ins_agreement_doc_Verified').prop('checked')){
$("#insAgreementBtn").removeClass("disabled");
$('#insAgreementBtn').prop('disabled',false);
}
else{
$("#insAgreementBtn").addClass("disabled");
$('#insAgreementBtn').prop('disabled',true);
}
})
$("#phymdNPI").blur(function(){
var npiCode = $(this).val();
$.ajax({
url:'<?=base_url()?>referral/getNpiData?code='+npiCode,
type :'GET',
dataType: "json",
beforeSend: function() {
$("#npiValid").hide();
$("#npiinValid").hide();
$("#npiNoValidating").show();
$("#npivalidateTab").show();
},
success:function(data){
console.log(data);
$('#phymdfName').val(data.fname);
if(data.license)
{
$("#npivalidate").val('valid');
$("#npiValid").show();
$("#npiinValid").hide();
$("#npiNoValidating").hide();
}
else
{
$("#npivalidate").val('invalid');
$("#npiValid").hide();
$("#npiinValid").show();
$("#npiNoValidating").hide();
}
}
});
})
});
</script>
<script type="text/javascript">
function check_parmanent_address(_this)
{
var idPostfix = $(_this).val();
var address1=$('#address'+idPostfix).val();
var zipcode1=$('#zipcode'+idPostfix).val();
$.ajax({
url:"referral/checkaddress",
type:"GET",
data:{address:address1,zipcode:zipcode1},
dataType: "json",
beforeSend: function() {
$("#check_parmanent_address_btn"+idPostfix).hide();
$("#check_parmanent_address_loader"+idPostfix).show();
},
success:function(data){
console.log(data);
if(data.address_info.status_code=="200"){
$('#state'+idPostfix).val(data.address_info.address.state);
$('#county'+idPostfix).val(data.address_info.address.county);
$('#city'+idPostfix).val(data.address_info.address.city);
$('#lang'+idPostfix).val(data.geo_info.latlong.Latitude);
$('#long'+idPostfix).val(data.geo_info.latlong.Longitude);
$('#contact_info_submit').prop('disabled',false);
}else{
Swal.fire({
position: 'center',
icon: 'error',
title: 'Address not found',
showConfirmButton: true,
});
$('#contact_info_submit').prop('disabled',true);
}
$("#check_parmanent_address_btn"+idPostfix).show();
$("#check_parmanent_address_loader"+idPostfix).hide();
}
});
}
</script>
<?php if(isset($_SESSION['ref_added'])){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'success',
title: 'Referal data added',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<?php if(isset($_SESSION['ref_updated'])){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'success',
title: 'Referal data Updated',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<?php if(isset($_SESSION['doc_deleted'])){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'success',
title: 'Document Successfuly deleted',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<?php if(isset($_SESSION['doc_deleted_fails'])){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'error',
title: 'Unable to delete the document',
showConfirmButton: false,
timer: 3500
})
</script>
<?php } ?>
<script type="text/javascript">
function validateForm1(){
var x = document.forms["newGenInfo"]["addrZipcode1"].value;
if (x != "") {
var y = document.forms["newGenInfo"]["state1"].value;
if (y == "") {
document.forms["newGenInfo"]["addrZipcode1"].focus();
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please check the address',
showConfirmButton: true,
});
return false;
}
}
var x = document.forms["newGenInfo"]["altZipcode"].value;
if (x != "") {
var y = document.forms["newGenInfo"]["altState"].value;
if (y == "") {
document.forms["newGenInfo"]["altZipcode"].focus();
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please check the alternate address',
showConfirmButton: true,
});
return false;
}
}
}
function validateForm4()
{
var x = document.forms["patientAgreementFrom"]["addrZipcode3"].value;
if (x != "") {
var y = document.forms["patientAgreementFrom"]["addrState3"].value;
if (y == "") {
document.forms["patientAgreementFrom"]["addrZipcode3"].focus();
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please check the emergency contact address',
showConfirmButton: true,
});
return false;
}
}
}
function validateForm3()
{
var y = $("#npivalidate").val();
if (y == 'invalid' || y == "") {
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please enter a valid NPI number',
showConfirmButton: true,
});
return false;
}
}
</script>
<!-- physical md info -->
<!-- <hr class="my-2">
<h4 class="font-weight-bold">Physican and MD information</h4>
<hr class="my-2"> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('First Name'); ?></label>
<input type="text" class="form-control" name="phymdfName" id="phymdfName" value="<?php echo $idata->PhysicanName; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="phymdlName" id="phymdlName" value="<?php echo $idata->PhysicanAddress; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Address'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="mdaddress" id="mdaddress1" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('city'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="mdcity" id="mdcity1" value="<?php echo $pdata->add_zip_code; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('state'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="mdstate" id="mdstate1" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="mdCountry" id="mdCountry1" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('County code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="mdContryCode" id="mdContryCode1" value="<?php echo $pdata->add_zip_code; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Postal Code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="mdpostalCode" id="mdpostalCode1" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Telephone'); ?></label>
<input type="text" onkeypress="return isNumberKey(event)" onkeyup="formatPhoneNumber(this.value,this)" class="form-control" name="phymdTelephone" id="phymdTelephone" value="<?php echo $idata->PhysicanTelephone; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('FAX'); ?></label>
<input type="text" class="form-control" name="phymdFAX" id="phymdFAX" value="<?php echo $idata->PhysicanFax; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Email'); ?></label>
<input type="text" class="form-control" name="phymdEmail" id="phymdEmail" value="<?php echo $idata->PhysicanEmail; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Affiliation'); ?></label>
<input type="text" class="form-control" name="phymdAffiliation" id="phymdAffiliation" value="<?php echo $idata->PhysicanAffiliation; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('NPI'); ?></label>
<input type="text" class="form-control" name="phymdNPI" id="phymdNPI" value="<?php echo $idata->PhysicanNPI; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Lisence'); ?></label>
<input type="text" class="form-control" name="phymdLisence" id="phymdLisence" value="<?php echo $idata->PhysicanLisence; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="phymdPrimary" id="phymdPrimary">
<label class="form-check-label" for="phymdPrimary">Primary</label>
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Note'); ?></label>
<input type="text" class="form-control" name="phymdnote" id="phymdnote" value="<?php echo $idata->PhysicanNote; ?>">
</div>
</div>
</div> -->
<!-- physical md info -->
<!-- diagonosis and secondary diagnosis -->
<!-- <hr class="my-2">
<h4 class="font-weight-bold">Diaganosis</h4>
<hr class="my-2"> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="firstName3"><?php echo lang('Write a ICD Name To Search'); ?></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="">ICD</span>
</div>
<input type="text" class="form-control" name="diagICD" id="diagICD" placeholder="Search ICD Here">
<select class="form-control" name="diagICDopt" id="diagICDopt"></select>
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('date'); ?></label>
<input type="date" class="form-control" name="diagDate" id="diagDate">
</div>
</div>
</div> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('Description'); ?></label>
<div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="Vent Dependent" id="diagDesc1">
<label class="form-check-label" for="diagDesc1">Vent Dependent</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="Wheelchair Bound" id="diagDesc2">
<label class="form-check-label" for="diagDesc2">Wheelchair Bound</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="Total Care" id="diagDesc3">
<label class="form-check-label" for="diagDesc3">Total Care</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="Hoyer Lift" id="diagDesc3">
<label class="form-check-label" for="diagDesc3">Hoyer Lift</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="Tracheostmy" id="diagDesc3">
<label class="form-check-label" for="diagDesc3">Tracheostmy</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="Colostomy" id="diagDesc3">
<label class="form-check-label" for="diagDesc3">Colostomy</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="PICC" id="diagDesc3">
<label class="form-check-label" for="diagDesc3">PICC</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagDesc[]" value="PIV" id="diagDesc3">
<label class="form-check-label" for="diagDesc3">PIV</label>
</div>
</div>
</div>
</div>
</div> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Historical date Diaganosis'); ?></label>
<input type="date" class="form-control" name="diagHistData" id="diagHistData" placeholder="" value="<?php echo $idata->diagonosisData; ?>">
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="diagRefchkbocx" id="diagRefchkbocx">
<label class="form-check-label" for="diagRefchkbocx">Referral</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="diagAsschkbox" id="diagAsschkbox">
<label class="form-check-label" for="diagAsschkbox">Assessment</label>
</div>
</div>
</div>
</div> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="diagPrimarychkbox" onclick="secDigActive(this)" value="Primary">
<label class="form-check-label" for="diagPrimarychkbox">Primary</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="diagPrimarychkbox" onclick="secDigActive(this)" value="Secondary">
<label class="form-check-label" for="diagPrimarychkbox">Secondary</label>
</div>
</div>
</div>
</div> -->
<!-- <div id="secondaryDiagonosis" style="display: none">
<hr class="my-2">
<h4 class="font-weight-bold">Secondary Diaganosis</h4>
<hr class="my-2">
<div class="form-group">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="firstName3"><?php echo lang('Write a ICD Name To Search'); ?></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="">ICD</span>
</div>
<input type="text" class="form-control" name="SecdiagICD" id="SecdiagICD" placeholder="Search ICD Here">
<select class="form-control" name="SecdiagICDopt" id="SecdiagICDopt"></select>
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('date'); ?></label>
<input type="date" class="form-control" name="diagSecDate" id="diagDate">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('Description'); ?></label>
<div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="Vent Dependent" id="diagSecdDesc1">
<label class="form-check-label" for="diagSecdDesc1">Vent Dependent</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="Wheelchair Bound" id="diagSecdDesc2">
<label class="form-check-label" for="diagSecdDesc2">Wheelchair Bound</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="Total Care" id="diagSecdDesc3">
<label class="form-check-label" for="diagSecdDesc3">Total Care</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="Hoyer Lift" id="diagSecdDesc3">
<label class="form-check-label" for="diagSecdDesc3">Hoyer Lift</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="Tracheostmy" id="diagSecdDesc3">
<label class="form-check-label" for="diagSecdDesc3">Tracheostmy</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="Colostomy" id="diagSecdDesc3">
<label class="form-check-label" for="diagSecdDesc3">Colostomy</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="PICC" id="diagSecdDesc3">
<label class="form-check-label" for="diagSecdDesc3">PICC</label>
</div>
<div class="form-check form-check-inline">
<input type="checkbox" class="form-check-input" name="diagSecdDesc[]" value="PIV" id="diagSecdDesc3">
<label class="form-check-label" for="diagSecdDesc3">PIV</label>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Historical date Diaganosis'); ?></label>
<input type="date" class="form-control" name="diagSecdHistData" id="diagSecdHistData" placeholder="">
</div>
<div class="col-lg-6">
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="diagSecdRefchkbocx" id="diagSecdRefchkbocx">
<label class="form-check-label" for="diagSecdRefchkbocx">Referral</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="diagSecdAsschkbox" id="diagSecdAsschkbox">
<label class="form-check-label" for="diagSecdAsschkbox">Assessment</label>
</div>
</div>
</div>
</div>
</div> -->
<!-- <hr class="my-2">
<h4 class="font-weight-bold">CLINICAL INFORMATION</h4>
<hr class="my-2"> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="firstName3"><?php echo lang('Start of Care'); ?></label>
<input type="date" class="form-control" name="mdAddrApartment1" id="mdAddrApartment1" value="<?php echo $pdata->add_Apartment; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Allergies'); ?></label>
<select class="form-control required" name="level_service" id="level_service" >
<option value="" selected>Choose...</option>
<?php foreach ($lvlService as $value) { ?>
<option <?php echo ($pdata->level_service == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>" attr_name="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div> -->
<!-- <div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="phymdPrimary">Allergic Reaction</label>
<textarea class="form-control" name="phymdnote" id="phymdnote" value="<?php echo $idata->PhysicanNote; ?>"></textarea>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Notes'); ?></label>
<textarea class="form-control" name="phymdnote" id="phymdnote" value="<?php echo $idata->PhysicanNote; ?>"></textarea>
</div>
</div>
</div> -->
<!-- container border for HHA PCA FROM -->
<!-- <span id="HHAPCAFROM" style="display: none;">
<hr class="my-1">
<h4 class="font-weight-bold">HOME HEALTH CERTIFICATION AND PLAN OF CARE</h4>
<hr class="my-1">
<div class="form-group container border">
<div class="row justify-content-md-center">
<div class="col col-lg-2 border-right">
<label for="exampleInputEmail1"><?php echo lang('1. Patients HI Claim No.'); ?></label>
<input type="text" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
<div class="col col-lg-2 border-right">
<label for="exampleInputEmail1"><?php echo lang('2. Start Of Care Date'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
<div class="col-md-auto border-right">
<label for="exampleInputEmail1"><?php echo lang('3. Certification Period'); ?></label>
<div class="row justify-content-md-center">
<div class="col-sm">
<label for="exampleInputEmail1"><?php echo lang('From:'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
<div class="col-sm">
<label for="exampleInputEmail1"><?php echo lang('To:'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
</div>
</div>
<div class="col col-lg-2">
<label for="exampleInputEmail1"><?php echo lang('4. Certification Period'); ?></label>
<input type="text" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">6. Patients Name and Address</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="lname" value="<?php echo $pdata->last_name; ?>" value="<?php echo $pdata->last_name; ?>" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<input type="hidden" name="lang1" id="lang1">
<input type="hidden" name="long1" id="long1">
<input type="text" class="form-control" name="address" id="address3" value="<?php echo $pdata->add_house_Number_and_Street_Name; ?>" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment" id="exampleInputEmail1" value="<?php echo $pdata->add_Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity" id="city3" value="<?php echo $pdata->add_city; ?>" readonly>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState" id="state3" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode" id="zipcode3" value="<?php echo $pdata->add_zip_code; ?>" >
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty" id="county3" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader3" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn3" value="3" onclick="check_parmanent_address(this);"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">7. Providers Name and Address</h4>
<hr class="my-1">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="lname" value="<?php echo $pdata->last_name; ?>" value="<?php echo $pdata->last_name; ?>" >
</div>
</div>
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<input type="hidden" name="lang1" id="emg_lang1">
<input type="hidden" name="long1" id="emg_long1">
<input type="text" class="form-control" name="address" id="address4" value="<?php echo $pdata->add_house_Number_and_Street_Name; ?>" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment" id="exampleInputEmail1" value="<?php echo $pdata->add_Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity" id="city4" value="<?php echo $pdata->add_city; ?>" readonly>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState" id="state4" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode" id="zipcode4" value="<?php echo $pdata->add_zip_code; ?>" >
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty" id="county4" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader4" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn4" value="4" onclick="check_parmanent_address(this);"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Telephone'); ?></label>
<input type="text" class="form-control" name="emgTelephone" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Other Number'); ?></label>
<input type="text" class="form-control" onkeyup="USformatPhoneNumber(this.value,this)" onkeypress="return isNumberKey(event)" onkeyup="formatPhoneNumber(this.value,this)" name="emgOtrNumber" id="exampleInputEmail1" value="<?php echo $idata->emgContactOteNo; ?>">
</div>
</div>
</div>
<hr class="my-1">
<div class="row ">
<div class="col-lg-8 border-right">
<label for="exampleInputEmail1" class="required"><?php echo lang('8. Dob'); ?></label>
<input type="date" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1" class="required"><?php echo lang('9. SEX'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">
M
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Female" value="Female" <?php echo ($pdata->gender == 'Female')?'checked':'' ; ?>>
<label class="form-check-label" for="Female">
F
</label>
</div>
</div>
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">Medication</h4>
<hr class="my-1">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-4">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Name'); ?></label>
<select class="form-control" name="medication_Name" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Frequency'); ?></label>
<select class="form-control" name="medication_Frequency" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Route'); ?></label>
<select class="form-control" name="medication_Route" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-4 border-right">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('11. ICD'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4 border-right">
<label for="exampleInputEmail1"><?php echo lang('Principal Diagnosis'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Date'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-4 border-right">
<div class="form-group ">
<label for="exampleInputEmail1"><?php echo lang('12. ICD'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4 border-right">
<label for="exampleInputEmail1"><?php echo lang('Surgical Procedure'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1 border"><?php echo lang('Date'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
</div>
</div>
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-4 border-right">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('13. ICD'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4 border-right">
<label for="exampleInputEmail1"><?php echo lang('Other Pertinent Diagnoses'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Date'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6 border-right">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('14. DME and Supplies'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('15. Safety Measures'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6 border-right">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('16. Nutritional Req.'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('17. Allergies'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('18.A. Functional Limitations'); ?></label>
<div class="row">
<div class="col-md-4">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Amputation</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Bowel/Bladder (Incontinance)</label>
</div>
<div class="form-check">
3: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">
Contracture
</label>
</div>
<div class="form-check">
4: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">
Hearing
</label>
</div>
</div>
</div>
<div class="col-lg-4">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Paralysis</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Endurance</label>
</div>
<div class="form-check">
3: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Ambulation</label>
</div>
<div class="form-check">
4: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Speech</label>
</div>
</div>
</div>
<div class="col-lg-4">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Legally Blind</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Dyspnea With Minimal Exertion</label>
</div>
<div class="form-check">
3: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Other (Specify)</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('18.B. Activities Permitted'); ?></label>
<div class="row">
<div class="col-lg-4">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Complete Bedrest</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Bedrest BRP</label>
</div>
<div class="form-check">
3: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Up As Tolerated</label>
</div>
<div class="form-check">
4: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Transfer Bed/Chair</label>
</div>
<div class="form-check">
5: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Exercises Prescribed</label>
</div>
</div>
</div>
<div class="col-lg-4">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Partial Weight Bearing</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Independent At Home</label>
</div>
<div class="form-check">
3: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Crutches</label>
</div>
<div class="form-check">
4: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Cane</label>
</div>
</div>
</div>
<div class="col-lg-4">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Wheelchair</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Walker</label>
</div>
<div class="form-check">
3: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">No Restrictions</label>
</div>
<div class="form-check">
4: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Other (Specify)</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('19. Mental Status'); ?></label>
<div class="row">
<div class="col-lg-3">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Oriented</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Comatose</label>
</div>
</div>
</div>
<div class="col-lg-3">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Forgetful</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Depressed</label>
</div>
</div>
</div>
<div class="col-lg-3">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Disoriented</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Lethargic</label>
</div>
</div>
</div>
<div class="col-lg-3">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Agitated</label>
</div>
<div class="form-check">
2: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Other</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('20. Prognosis'); ?></label>
<div class="row">
<div class="col-lg-2">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Poor</label>
</div>
</div>
</div>
<div class="col-lg-2">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Guarded</label>
</div>
</div>
</div>
<div class="col-lg-2">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Fair</label>
</div>
</div>
</div>
<div class="col-lg-2">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Good</label>
</div>
</div>
</div>
<div class="col-lg-2">
<div>
<div class="form-check">
1: <input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Excellent</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">21. Orders for Discipline and Treatments</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Amount'); ?></label>
<input type="text" class="form-control" name="emgTelephone" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Frequency'); ?></label>
<input type="text" class="form-control" name="emgOtrNumber" id="exampleInputEmail1" value="<?php echo $idata->emgContactOteNo; ?>">
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Duration'); ?></label>
<input type="text" class="form-control" name="emgOtrNumber" id="exampleInputEmail1" value="<?php echo $idata->emgContactOteNo; ?>">
</div>
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">22. Goals/Rehabilitation Potential/Discharge Plans</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('Plans'); ?></label>
<textarea class="form-control" name="Plans" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>"></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-8 border-right">
<label for="exampleInputEmail1"><?php echo lang('23. Nurses Signature and Date of Verbal SOC Where Applicable:'); ?></label>
<div class="row">
<div class="col-lg-6">
<input type="text" class="form-control" name="emgTelephone" id="exampleInputEmail1" placeholder="Signature" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
<div class="col-lg-6">
<input type="date" class="form-control" name="emgTelephone" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
</div>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('25. Date of HHA Received Signed POT'); ?></label>
<input type="date" class="form-control" name="emgOtrNumber" id="exampleInputEmail1" value="<?php echo $idata->emgContactOteNo; ?>">
</div>
</div>
</div>
<hr class="my-1">
<h4 class="font-weight-bold">24. Physicians Name and Address</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="lname" value="<?php echo $pdata->last_name; ?>" value="<?php echo $pdata->last_name; ?>" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<input type="hidden" name="lang1" id="lang1">
<input type="hidden" name="long1" id="long1">
<input type="text" class="form-control" name="address" id="address1" value="<?php echo $pdata->add_house_Number_and_Street_Name; ?>" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment" id="exampleInputEmail1" value="<?php echo $pdata->add_Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity" id="city1" value="<?php echo $pdata->add_city; ?>" readonly>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState" id="state1" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode" id="zipcode1" value="<?php echo $pdata->add_zip_code; ?>" >
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty" id="county1" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn" onclick="check_parmanent_address();"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<div class="form-group border-top">
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('26. I certify/recertify that this patient is confined to his/her home and needs
intermittent skilled nursing care, physical therapy and/or speech therapy or
continues to need occupational therapy. The patient is under my care, and I have
authorized services on this plan of care and will periodically review the plan.'); ?></label>
<div class="form-check">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Agree</label>
</div>
</div>
</div>
</div>
</div>
<hr class="my-1">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('27. Attending Physicians Signature and Date Signed'); ?></label>
<div class="row">
<div class="col-lg-6">
<input type="text" class="form-control" name="emgTelephone" id="exampleInputEmail1" placeholder="Signature" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
<div class="col-lg-6">
<input type="date" class="form-control" name="emgTelephone" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>">
</div>
</div>
</div>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('28. Anyone who misrepresents, falsifies, or conceals essential information
required for payment of Federal funds may be subject to fine, imprisonment,
or civil penalty under applicable Federal laws.'); ?></label>
<div class="form-check">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Agree</label>
</div>
</div>
</div>
</div>
</div>
</div>
</span> -->
<!-- container border for HHA PCA FROM -->
<!-- container border for RN LPN FROM -->
<!-- <span id="HHAPCAFROM" style="display: none;">
<hr class="my-1">
<h4 class="font-weight-bold">Prescribe Order</h4>
<hr class="my-1">
<div class="form-group container border">
<hr class="my-1">
<h4 class="font-weight-bold">6. Patients Name and Address</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="lname" value="<?php echo $pdata->last_name; ?>" value="<?php echo $pdata->last_name; ?>" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<input type="hidden" name="lang1" id="lang1">
<input type="hidden" name="long1" id="long1">
<input type="text" class="form-control" name="address" id="address1" value="<?php echo $pdata->add_house_Number_and_Street_Name; ?>" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment" id="exampleInputEmail1" value="<?php echo $pdata->add_Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity" id="city1" value="<?php echo $pdata->add_city; ?>" readonly>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState" id="state1" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode" id="zipcode1" value="<?php echo $pdata->add_zip_code; ?>" >
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty" id="county1" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn" onclick="check_parmanent_address();"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<hr class="my-1">
<div class="row ">
<div class="col-lg-8 border-right">
<label for="exampleInputEmail1" class="required"><?php echo lang('8. Dob'); ?></label>
<input type="date" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1" class="required"><?php echo lang('9. SEX'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">
M
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Female" value="Female" <?php echo ($pdata->gender == 'Female')?'checked':'' ; ?>>
<label class="form-check-label" for="Female">
F
</label>
</div>
</div>
</div>
</div>
<div class="container bg-light">
<hr class="my-1">
<h4 class="font-weight-bold">Name/Dose/Frequency</h4>
<hr class="my-1">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-4">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Name'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Dose'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Frequency'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label for="exampleInputEmail1"><?php echo lang('Notes'); ?></label>
<textarea class="form-control" name="Plans" id="exampleInputEmail1" value="<?php echo $idata->emgContactTelephone; ?>"></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-4">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Method of Admin'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-4 border-right">
<label for="exampleInputEmail1"><?php echo lang('Rate Flow'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-4">
<label for="exampleInputEmail1"><?php echo lang('Diluent'); ?></label>
<input type="date" class="form-control" name="correspondingRequirment" value="<?php echo $pdata->correspondingRequirment; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<div class="form-group ">
<label for="exampleInputEmail1"><?php echo lang('Route'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
<div class="col-lg-6 border-right">
<label for="exampleInputEmail1"><?php echo lang('Duration of Infusion'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<div class="form-group ">
<label for="exampleInputEmail1"><?php echo lang('Start Date'); ?></label>
<input type="date" class="form-control" name="type_access[]" id="inputGroupSelect01">
</div>
</div>
<div class="col-lg-6 border-right">
<label for="exampleInputEmail1"><?php echo lang('End Date'); ?></label>
<input type="date" class="form-control" name="type_access[]" id="inputGroupSelect01">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<div class="form-group ">
<label for="exampleInputEmail1"><?php echo lang('Dispence'); ?></label>
<input type="text" class="form-control" name="type_access[]" id="inputGroupSelect01">
</div>
</div>
<div class="col-lg-6 border-right">
<label for="exampleInputEmail1"><?php echo lang('Refill'); ?></label>
<input type="text" class="form-control" name="type_access[]" id="inputGroupSelect01">
</div>
</div>
</div>
</div>
<div class="container bg-light">
<div class="form-group border-bottom">
<div class="row mt-2 mb-2">
<div class="col-lg-12">
<div class="pull-right">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">
N/A
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Female" value="Female" <?php echo ($pdata->gender == 'Female')?'checked':'' ; ?>>
<label class="form-check-label" for="Female">
Culture Not Done
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Female" value="Female" <?php echo ($pdata->gender == 'Female')?'checked':'' ; ?>>
<label class="form-check-label" for="Female">
Culture Pending
</label>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Lab Orders'); ?></label>
<select class="form-control" name="Time" id="inputGroupSelect01">
<option value="">Choose...</option>
</select>
</div>
<div class="col-lg-6">
<div class="pull-right">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Female" value="Female" <?php echo ($pdata->gender == 'Female')?'checked':'' ; ?>>
<label class="form-check-label" for="Female">
To Be Drawn
</label>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Fax Result To'); ?></label>
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Coram At'); ?></label>
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Access Device:'); ?></label>
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Heral Line'); ?></label>
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-3 bg-dark text-white">
Flush Volume M/S
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">0.9% Saline</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Herapin 10 units/ml</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">Herapin 100 units/ml</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-light">
Before Dose
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-light">
Between Dose
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-light">
After Dose
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-light">
After Lab Draw
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" name="Time" id="inputGroupSelect01">
</div>
</div>
<hr class="my-1">
<div class="row">
<div class="col-lg-3 bg-primary text-white">
Administration Supplies
</div>
<div class="col-lg-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">A4221-maintenance of infusion catheter per week</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-dark text-white">
As Required
</div>
<div class="col-lg-2">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">YES</label>
</div>
</div>
<div class="col-lg-2">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">NO</label>
</div>
</div>
<div class="col-lg-4">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">A4211 Self Administrated Injection</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-dark text-white">
</div>
<div class="col-lg-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">A4223-infusion not using external infusion pump</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-dark text-white">
</div>
<div class="col-lg-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">K0522-using external infusion pump</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 bg-dark text-white">
</div>
<div class="col-lg-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
<label class="form-check-label" for="Male">A4222-Maintenane of infusion pump per cassetes or bag</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container bg-light">
<div class="form-group border-bottom border-top">
<div class="row">
<div class="col-lg-1 bg-dark text-white align-middle">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?>>
</div>
</div>
<div class="col-lg-11">
<label class="form-check-label" for="Male">I, The ordering prescribe for this medication, have no financtial relationship with WeCuro Inc that would prohibit the provision of this therapy. i hereby certify taht the above infusion and services are medically necesery and are authorized by me. The patient is under my care and is in need of the services listed.</label>
</div>
</div>
</div>
</div>
</div>
</span> -->
<!-- container border for RN LPN FROM -->
<!-- container border for RN LPN FROM 2nd part -->
<!-- <span id="HHAPCAFROM" style="display: none;">
<hr class="my-1">
<h4 class="font-weight-bold">Acute Infusion Reaction prescription and Treatment Guideline.</h4>
<hr class="my-1">
<div class="form-group container border">
<hr class="my-1">
<h4 class="font-weight-bold">Prescriber Name and Address</h4>
<hr class="my-1">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="lname" value="<?php echo $pdata->last_name; ?>" value="<?php echo $pdata->last_name; ?>" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Telephone'); ?></label>
<input type="text" class="form-control" name="fname" value="<?php echo $pdata->first_name; ?>" value="<?php echo $pdata->first_name; ?>" >
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1" class="required"><?php echo lang('Email'); ?></label>
<input type="text" class="form-control" name="lname" value="<?php echo $pdata->last_name; ?>" value="<?php echo $pdata->last_name; ?>" >
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name'); ?>
<span class="danger">*</span>
</label>
<input type="hidden" name="lang1" id="lang1">
<input type="hidden" name="long1" id="long1">
<input type="text" class="form-control" name="address" id="address1" value="<?php echo $pdata->add_house_Number_and_Street_Name; ?>" >
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)'); ?>
</label>
<input type="text" class="form-control" name="AddrApartment" id="exampleInputEmail1" value="<?php echo $pdata->add_Apartment; ?>">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCity" id="city1" value="<?php echo $pdata->add_city; ?>" readonly>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('State'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrState" id="state1" value="<?php echo $pdata->add_state; ?>" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrZipcode" id="zipcode1" value="<?php echo $pdata->add_zip_code; ?>" >
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?>
<span class="danger">*</span>
</label>
<input type="text" class="form-control" name="addrCounty" id="county1" value="<?php echo $pdata->add_county; ?>" readonly>
</div>
</div>
<div class="col-md-1 mt-2">
<div class="form-group">
<img src="<?php echo base_url(); ?>uploads/ajax-loader.gif" id="check_parmanent_address_loader" Style="display:none;">
<button type="button" class="btn btn-info pull-right" id="check_parmanent_address_btn" onclick="check_parmanent_address();"><?php echo lang('Check'); ?></button>
</div>
</div>
</div>
<div class="container bg-light">
<hr class="my-1">
<h4 class="font-weight-bold">ICD-10</h4>
<hr class="my-1">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Description'); ?></label>
<input type="text" class="form-control" name="type_access[]" id="inputGroupSelect01">
</div>
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Code'); ?></label>
<input type="text" class="form-control" name="type_access[]" id="inputGroupSelect01">
</div>
</div>
</div>
</div>
<div class="container bg-light">
<hr class="my-1">
<h4 class="font-weight-bold">NURSING PROCEDURE: STOP ANY INFUSION OR MEDICATION ADMINISTRARTION IMMEDIATELY</h4>
<hr class="my-1">
<div class="row">
<div class="col-lg-1 bg-dark text-white">
1:
</div>
<div class="col-lg-11">
<div class="form-check form-check-inline">
<label class="form-check-label" for="Male">If modarate no sever symptomps occure, activate EMS system and initiate BCLS if indicated</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-1 bg-primary text-white">
2:
</div>
<div class="col-lg-11">
<div class="form-check form-check-inline">
<label class="form-check-label" for="Male">If applicable, have caregiver call 911</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-1 bg-dark text-white">
3:
</div>
<div class="col-lg-11">
<div class="form-check form-check-inline">
<label class="form-check-label" for="Male">Notify the physician at phone</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-1 bg-primary text-white">
4:
</div>
<div class="col-lg-8">
<div class="form-check form-check-inline">
<label class="form-check-label" for="Male">Administer Medication Below as needed for acute infusion reaction to</label>
</div>
</div>
<div class="col-lg-3">
Gamunex-C 10%
</div>
</div>
<div class="row">
<hr class="my-1">
<div class="col-lg-12 text-center font-weight-bold">
ANAPHYLICS TREATMENT
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Drug or Treatment
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Epinephine mg/ml AMP (1:1000) or auto infusion</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Drug or Treatment</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Drug or Treatment</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Severity
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Moderate to Severe</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Mild</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Moderate</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Under 15Kg
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">0.01mg/kg max 0.1mg</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">1.25mg/kg</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">1mg/kg</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
15-30 kg
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">0.15 mg</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">1.25mg/kg</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Range 125-50mg Dose</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Over 30 kg
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">0.3 mg</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">25mg</label>
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">50mg</label>
</div>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">25mg</label>
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">50mg</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Quantity
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">1</label>
</div>
</div>
<div class="col-lg-3">
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">1</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Route
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">SO</label>
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">IM</label>
</div>
</div>
<div class="col-lg-3">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">PO</label>
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Slow IV</label>
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Slow IM</label>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="form-group border-bottom">
<div class="row">
<div class="col-lg-3 bg-dark text-white align-middle">
Note
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Repeat in 3-5 mins PRN</label>
</div>
</div>
<div class="col-lg-3">
</div>
<div class="col-lg-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" name="gender" id="Male" value="Male" <?php echo ($pdata->gender == 'Male')?'checked':'' ; ?> >
<label class="form-check-label" for="Male">Repeat in 3-5 mins PRN</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span> -->
<!-- container border for RN LPN FROM 2nd part -->
<!-- <div id="rnlnp" style="display: <?php echo($pdata->level_service== $rnId || $pdata->level_service== $lnpId)?'block' :'none' ; ?>">
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Primary Care Physician/MD Info'); ?></label>
<input type="text" class="form-control" name="primaryCarePhyMdInfo" value="<?php echo $pdata->primaryCarePhyMdInfo; ?>">
</div>
<div class="col-lg-6">
<label for="exampleInputEmail1"><?php echo lang('Diagnosis'); ?></label>
<input type="text" class="form-control" name="diagnosis" value="<?php echo $pdata->diagnosis; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('New order'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->new_order == 'YES')?'checked':'' ; ?> type="radio" name="new_order" id="radio" value="YES" checked>
<label class="form-check-label" for="YES">
YES
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->new_order == 'NO')?'checked':'' ; ?> type="radio" name="new_order" id="radio" value="NO">
<label class="form-check-label" for="NO">
NO
</label>
</div>
</div>
</div>
</div>
<?php $dbData = explode(',', $pdata->service_activity);
// var_dump($dbData);
?>
<div class="col-md-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Service Activity needed'); ?></label>
<select class="form-control" name="service_activity[]" id="inputGroupSelect01" multiple>
<option value="">Choose...</option>
<?php foreach ($serviceActivity as $value) { ?>
<option <?php echo (in_array($value->id, $dbData))? 'selected' : '' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<?php $dbData = explode(',', $pdata->therapy_type); ?>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Therapy type'); ?></label>
<select class="form-control" name="therapy_type[]" id="inputGroupSelect01" multiple>
<option value="">Choose...</option>
<?php foreach ($therapyType as $value) { ?>
<option <?php echo (in_array($value->id, $dbData))? 'selected' : '' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
<?php $dbData = explode(',', $pdata->type_access);
// var_dump($dbData);
?>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Type Of access'); ?></label>
<select class="form-control" name="type_access[]" id="inputGroupSelect01" multiple>
<option value="">Choose...</option>
<?php foreach ($accessType as $value) { ?>
<option <?php echo (in_array($value->id, $dbData))? 'selected' : '' ; ?> value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Patient seen by MD'); ?></label>
<input type="date" class="form-control" name="patient_seen_by_MD" value="<?php echo $pdata->patient_seen_by_MD; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Current Lab Work'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" <?php echo ($pdata->new_order == 'YES')?'checked':'' ; ?> name="current_lab_work" id="radio" value="YES">
<label class="form-check-label" for="YES">
YES
</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" <?php echo ($pdata->new_order == 'NO')?'checked':'' ; ?> name="current_lab_work" id="radio" value="NO">
<label class="form-check-label" for="NO">
NO
</label>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Lab Order'); ?></label>
<input type="text" class="form-control" name="lab_order" value="<?php echo $pdata->lab_order; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Additional Lab Orders'); ?></label>
<input type="text" class="form-control" name="additional_lab_order" value="<?php echo $pdata->additional_lab_order; ?>" placeholder="">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Lab Frequency'); ?></label>
<select class="form-control" name="lab_frequency" id="inputGroupSelect01">
<option <?php echo ($pdata->lab_frequency == 'Weekly')?'selected':'' ; ?> value="Weekly">Weekly</option>
<option <?php echo ($pdata->lab_frequency == 'Every 2 weeks')?'selected':'' ; ?> value="Every 2 weeks">Every 2 weeks</option>
<option <?php echo ($pdata->lab_frequency == 'Every other week')?'selected':'' ; ?> value="Every other week">Every other week</option>
<option <?php echo ($pdata->lab_frequency == 'Every 6 months')?'selected':'' ; ?> value="Every 6 months">Every 6 months</option>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Other Lab Frequency'); ?></label>
<input type="text" class="form-control" name="other_lab_frequency" value="<?php echo $pdata->other_lab_frequency; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Tube'); ?></label>
<select class="form-control" name="tube_type" id="inputGroupSelect01">
<option value="" selected>Choose...</option>
<?php foreach ($tubes as $value) { ?>
<option <?php echo ($pdata->tube_type == $value->name)?'selected':'' ; ?> value="<?php echo $value->name; ?>"><?php echo $value->name; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Formula'); ?></label>
<input type="text" class="form-control" name="formula"
value="<?php echo $pdata->formula; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Schedule'); ?></label>
<input type="text" class="form-control" name="schedule" value="<?php echo $pdata->schedule; ?>">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Flush With (Water)'); ?></label>
<select class="form-control" name="flush_with" id="inputGroupSelect01">
<option value="" selected>Choose...</option>
<?php for($i = 10; $i<=240; $i++) { ?>
<option <?php echo ($pdata->flush_with == $i)?'selected':'' ; ?> value="<?=$i?>"><?php echo $i; ?> ML</option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Daily Intake Requirment'); ?></label>
<input type="text" class="form-control" name="daily_intake_requirment" value="<?php echo $pdata->daily_intake_requirment; ?>">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Flush Frequency'); ?></label>
<div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'Before Feed')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox1" value="Before Feed">
<label class="form-check-label" for="inlineCheckbox1">Before Feed</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'After Feed')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox2" value="After Feed">
<label class="form-check-label" for="inlineCheckbox2">After Feed</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'Before Medication')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox2" value="Before Medication">
<label class="form-check-label" for="inlineCheckbox2">Before Medication</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" <?php echo ($pdata->flush_frequency == 'After Madication')?'checked':'' ; ?> name="flush_frequency" type="radio" id="inlineCheckbox2" value="After Madication">
<label class="form-check-label" for="inlineCheckbox2">After Madication</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fluide Restrictions'); ?></label>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="fluid_restriction" id="fluid_restriction_yes" value="YES" <?php echo ($pdata->fluid_restriction == 'YES')?'checked':'' ; ?>>
<label class="form-check-label" for="fluid_restriction_yes">YES</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="fluid_restriction" id="fluid_restriction_no" value="NO" <?php echo ($pdata->fluid_restriction == 'NO')?'checked':'' ; ?>>
<label class="form-check-label" for="fluid_restriction_no">NO</label>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fluide Restriction Amount'); ?></label>
<input type="text" class="form-control" name="fluide_restric_amount"
value="<?php echo $pdata->fluide_restric_amount ; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1"><?php echo lang('Fluide Restriction Frequency'); ?></label>
<div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" name="fluide_restric_frequency" type="radio" id="inlineCheckbox3" value="Per day" <?php echo ($pdata->fluide_restric_frequency == 'Per day')?'checked':'' ; ?>>
<label class="form-check-label" for="inlineCheckbox2">Per day</label>
</div>
<div class="form-check form-check form-check-inline">
<input class="form-check-input" name="fluide_restric_frequency" type="radio" id="inlineCheckbox4" value="Per Hour" <?php echo ($pdata->fluide_restric_frequency == 'Per Hour')?'checked':'' ; ?>>
<label class="form-check-label" for="inlineCheckbox2">Per Hour</label>
</div>
</div>
</div>
</div>
</div>
</div> -->