2763 lines
150 KiB
PHP
Executable File

<!--sidebar end-->
<!--main content start-->
<style type="text/css">
div.patient-view-card-container{margin-top:5px;}
.patient-view-card-icons{font-size:40px;}
.patient-view-card{transition: 0.4s;padding: 10px 0;box-shadow:;border:1px solid rgba(0,0,0,0.1);}
.patient-view-card:hover{box-shadow:5px 10px 10px rgba(0, 0, 0, 0.1);transition:0.4s;}
.fa-pencil{cursor:pointer;color:#2e9cf1;}
.fix-height-body{height: 550px;overflow: auto;}
.fstfdt6tsrt + :where(.col-sm-8,.col-sm-4){padding-top: 11px;}
.marg_top5{margin-top:5px}
@media (min-width: 576px){.width-larger{max-width: 1000px !important;}}
</style>
<div class="app-content content">
<div class="content-wrapper">
<div class="content-body">
<!-- block examples section start -->
<section id="block-examples">
<div class="row patient-view-card-container">
<div class="col-md-12 col-sm-12">
<div class="card patient-view-card bg-gradient-y-info">
<div class="card-header">
<h3>
<span class="font-weight-bold text-white">Basic Info</span>
</h3>
</div>
<div class="card-body">
<div class="row mb-0">
<div class="col-md-6 col-sm-12">
<div class="card py-1 mb-0" style="height: 13rem;">
<div class="card-header pb-0">
<h3>
<span class="float-right mx-2">
<i class="fa fa-pencil" id="card_1_edit" aria-hidden="true" data-toggle="modal" data-target="#updateModal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<div class="row mb-0" >
<div class="col-md-4 col-sm-4">
<div class="card py-1 mb-0">
<div class="card-body center">
<label><b>Patient Id</b> <h5 class="text-center"><?php echo $datas->patient_id;?></h5></label>
</div>
</div>
</div>
<div class="col-md-8 col-sm-8">
<div class="card mb-0">
<div class="card-body">
<h6 class="text-capitalize">
<b>Name :</b> <span><?=$datas->first_name.' '.$datas->last_name?></span>
</h6>
<h6 class="">
<b>Birth :</b> <span><?=$datas->dob?></span>
</h6>
<h6 class="">
<b>Email :</b> <span> <?=$datas->patient_email?></span>
</h6>
<h6 class="text-capitalize">
<b>Soc Sec No :</b> <span id="sosec_no"><?=$datas->soc_sec_no?></span>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-12">
<div class="card py-1 mb-0" style="height: 13rem;">
<div class="card-header pb-0">
<h3>
<span class="float-right mx-2">
<i class="fa fa-pencil" id="card_2_edit" aria-hidden="true" data-toggle="modal" data-target="#updateModal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<h6 class="text-capitalize">
<b>Gender :</b> <span><?=$datas->gender?></span>
</h6>
<h6 class="">
<b>Marital :</b> <span><?=$datas->marital_stat?></span>
</h6>
<h6 class="">
<b>Weight :</b> <span><?=$datas->weight?> lbs</span>
</h6>
<?php $HtFI = explode(',', $datas->height);$Htf = $HtFI[0];$Hti = $HtFI[1];?>
<h6 class="">
<b>Height :</b> <span><?=$Htf;?> feet <?=$Hti;?> inch</span>
</h6>
</div>
</div>
</div>
<div class="col-md-3 col-sm-12">
<div class="card py-1 mb-0" style="height: 13rem;">
<div class="card-header pb-0">
<h3>
<span class="float-right mx-2">
<i class="fa fa-pencil" id="card_3_edit" aria-hidden="true" data-toggle="modal" data-target="#updateModal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<?php $pAdata = json_decode($datas->address); ?>
<h6 class="">
<b>Address :</b>
<span class="text-capitalize">
<?=$pAdata->address, $pAdata->Apartment.", ".$pAdata->City.", ".$pAdata->County.", ".$pAdata->State.", ".$pAdata->Zipcode?>
</span>
</h6>
<h6 class="">
<b>Direction :</b>
<span class="text-capitalize">
<?php if($datas->direction){echo $datas->direction;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row patient-view-card-container">
<div class="col-md-12 col-sm-12">
<div class="card patient-view-card bg-gradient-y-info">
<div class="card-header">
<h3>
<span class="font-weight-bold text-white">Patient Info</span>
<span class="float-right mx-2">
<i class="fa fa-pencil text-white" id="card_4_edit" aria-hidden="true" data-toggle="modal" data-target="#updateModal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<div class="row mb-0" >
<div class="col-md-6 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h6 class="">
<b>Designate First Name :</b>
<span class="text-capitalize">
<?php if($datas->designate_first_name){echo $datas->designate_first_name;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Designate Last Name :</b>
<span class="text-capitalize">
<?php if($datas->designate_last_name){echo $datas->designate_last_name;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Designate Telephone :</b>
<span>
<?php if($datas->designate_telephone){echo $datas->designate_telephone;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Designate Cell :</b>
<span>
<?php if($datas->designate_cell){echo $datas->designate_cell;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h6 class="text-capitalize">
<b>Level of Care :</b>
<span>
<?php if($datas->level_of_care){echo $datas->level_of_care;}else{echo "NA";}?>
</span>
</h6>
<h6 class="text-capitalize">
<!-- <b>Referal Source :</b> <span><?=$datas->referral_source?></span> -->
<b>Referal Source :</b>
<span>
<?php if($datas->reference_information){echo $datas->reference_information;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>EVV Verification :</b>
<span>
<?php if($datas->evv_verification){echo $datas->evv_verification;}else{echo "NA";}?>
</span>
</h6>
<!-- <h6 class="">
<b>Coordinator :</b> <span><?=$datas->coordinator?></span>
</h6> -->
<h6 class="">
<b>Primary Nurse :</b>
<span>
<?php if($datas->primary_nurse){echo $datas->primary_nurse;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Intake Nurse :</b>
<span><?=$datas->intake_nurse?></span>
<span>
<?php if($datas->intake_nurse){echo $datas->intake_nurse;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row patient-view-card-container">
<div class="col-md-12 col-sm-12">
<div class="card patient-view-card bg-gradient-y-info">
<div class="card-header">
<h3>
<span class="font-weight-bold text-white">Care Info</span>
<span class="float-right mx-2">
<i class="fa fa-pencil text-white" id="card_5_edit" aria-hidden="true" data-toggle="modal" data-target="#updateModal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<div class="row mb-0" >
<div class="col-md-6 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h6 class="text-capitalize">
<b>Level of Service Need :</b>
<span>
<?php
if($datas->level_of_service){
if($datas->level_of_service==4){
echo "RN";
}if($datas->level_of_service==5){
echo "LPN";
}if($datas->level_of_service==6){
echo "HHA";
}if($datas->level_of_service==7){
echo "PCA";
}
}else{
echo "NA";
}
?>
</span>
</h6>
<h6 class="">
<b>New Order :</b>
<span>
<?php if($datas->new_order){echo $datas->new_order;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Service Activity Needed :</b>
<span>
<?php
if($datas->serviceName){
echo $datas->serviceName;
}
else{
echo "NA";
}
?>
</span>
</h6>
<!-- <h6 class="">
<b>Therapy Type :</b> <span><?=$datas->therapy_type?></span>
</h6> -->
<h6 class="">
<b>Type Of Access :</b>
<span>
<?php
if($datas->type_access){
// echo $datas->type_access;
echo $datas->type_of_accesss;
}else{
echo "NA";
}
?>
</span>
</h6>
<h6 class="">
<b>Patient Seen By Md :</b>
<span>
<?php if($datas->patient_seen_by_MD){echo $datas->patient_seen_by_MD;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Current Lab Work :</b>
<span>
<?php if($datas->current_lab_work){echo $datas->current_lab_work;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Lab Order :</b>
<span>
<?php if($datas->lab_order){echo $datas->lab_order;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h6 class="text-capitalize">
<b>Additional Lab Order :</b>
<span>
<?php if($datas->other_lab_frequency){echo $datas->other_lab_frequency;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Lab Frequency :</b>
<span>
<?php if($datas->lab_frequency){echo $datas->lab_frequency;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Other Lab Frequency :</b>
<span>
<?php if($datas->other_lab_frequency){echo $datas->other_lab_frequency;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Tube :</b>
<span>
<?php if($datas->tube_type){echo $datas->tube_type;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Formula :</b>
<span>
<?php if($datas->formula){echo $datas->formula;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Schedule :</b>
<span>
<?php if($datas->schedule){echo $datas->schedule;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Flush With :</b>
<span>
<?php if($datas->flush_with){echo $datas->flush_with;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Daily Intake Requirment :</b>
<span>
<?php if($datas->daily_intake_requirment){echo $datas->daily_intake_requirment;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Flush Frequency :</b>
<span>
<?php if($datas->flush_frequency){echo $datas->flush_frequency;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Flush Restrictions :</b>
<span>
<?php if($datas->referral_source){echo $datas->referral_source;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Flush Restriction Amount :</b>
<span>
<?php if($datas->fluide_restric_amount){echo $datas->fluide_restric_amount;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row patient-view-card-container">
<div class="col-md-12 col-sm-12">
<div class="card patient-view-card bg-gradient-y-info">
<div class="card-header">
<h3>
<span class="font-weight-bold text-white">Insurance Info</span>
<span class="float-right mx-2">
<i class="fa fa-pencil text-white" id="card_6_edit" aria-hidden="true" data-toggle="modal" data-target="#updateModal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<div class="row mb-0" >
<div class="col-md-4 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h4 class="text-info font-weight-bold">Basic</h4>
<h6 class="text-capitalize">
<b>Insurance Type :</b>
<span>
<?php if($dataIns->insurance_type){echo $dataIns->insurance_type;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Insurance Plan :</b>
<span>
<?php if($dataIns->insurance_plan){echo $dataIns->insurance_plan;}else{echo "NA";}?>
</span>
</h6>
<?php
if($dataIns->insurance_type == 'Madicaid')
{
?>
<h6 class="">
<b>Medicaid Id :</b>
<span>
<?php if($dataIns->medicaid_id){echo $dataIns->medicaid_id;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Medicaid Pedriatic :</b>
<span>
<?php if($dataIns->medicaid_pedriatic){echo $dataIns->medicaid_pedriatic;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Medicaid Adult :</b>
<span>
<?php if($dataIns->medicaid_adult){echo $dataIns->medicaid_adult;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Type :</b>
<span>
<?php if($dataIns->primaryOrSecondary){echo $dataIns->primaryOrSecondary;}else{echo "NA";}?>
</span>
</h6>
<?php
}
else
{
?>
<h6 class="">
<b>Policy NO :</b>
<span>
<?php if($dataIns->Pvt_Ins_PlanId_Policy_no){echo $dataIns->Pvt_Ins_PlanId_Policy_no;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Claim No :</b>
<span>
<?php if($dataIns->claim_no){echo $dataIns->claim_no;}else{echo "NA";}?>
</span>
</h6>
<?php
}
?>
<hr>
<h4 class="text-info font-weight-bold">Emergency Contact</h4>
<h6 class="">
<b>Name :</b>
<span class="text-capitalize">
<?php if($dataIns->emgContactFirstName && $dataIns->emgContactLastName)
{echo $dataIns->emgContactFirstName." ".$dataIns->emgContactLastName;}else{echo "NA";}
?>
</span>
</h6>
<h6 class="">
<b>Relationship to the Patient :</b>
<span class="text-capitalize">
<?php
foreach($relationList as $relation)
{
if($relation->id==$dataIns->emgContactRelation){
echo $relation->name;
}
}
?>
</span>
</h6>
<?php $emgConAdd=json_decode($dataIns->emgContactAddress);?>
<h6 class="">
<b>Address :</b>
<span>
<ul>
<li><span class="text-info">House/Street</span> : <?=$emgConAdd->address;?></li>
<li><span class="text-info">Apartment</span> : <?=$emgConAdd->Apartment;?></li>
<li><span class="text-info">City</span> : <?=$emgConAdd->City;?></li>
<li><span class="text-info">State</span> : <?=$emgConAdd->State;?></li>
<li><span class="text-info">Zipcode</span> : <?=$emgConAdd->Zipcode;?></li>
<li><span class="text-info">County</span>: <?=$emgConAdd->County;?></li>
</ul>
</span>
</h6>
<h6 class="">
<b>Telephone :</b>
<span>
<?php if($dataIns->emgContactTelephone){echo $dataIns->emgContactTelephone;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Cellphone :</b>
<span>
<?php if($dataIns->emgContactCellNo){echo $dataIns->emgContactCellNo;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Other Number :</b>
<span>
<?php if($dataIns->emgContactOteNo){echo $dataIns->emgContactOteNo;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Email :</b>
<span>
<?php if($dataIns->emgContactEmail){echo $dataIns->emgContactEmail;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Lives with Patient :</b>
<span>
<?php if($dataIns->emgContactLiveswithPatient){echo $dataIns->emgContactLiveswithPatient;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Home access :</b>
<span>
<?php if($dataIns->emgContactAccessToHome){echo $dataIns->emgContactAccessToHome;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h4 class="text-info font-weight-bold">Emergency Preparedness</h4>
<h6 class="text-capitalize">
<b>Evacutaion zone :</b>
<span>
<?php if($dataIns->EmgPrepdEvacZone){echo $dataIns->EmgPrepdEvacZone;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Mobility Status :</b>
<span>
<?php if($dataIns->EmgPrepdMobilityStat){echo $dataIns->EmgPrepdMobilityStat;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Evacuation Location :</b>
<span>
<?php if($dataIns->EmgPrepdLocation){echo $dataIns->EmgPrepdLocation;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Electrical Equipment Dependency :</b>
<span>
<?php if($dataIns->EmgPrepdEleDependency){echo $dataIns->EmgPrepdEleDependency;}else{echo "NA";}?>
</span>
</h6>
<hr>
<h4 class="text-info font-weight-bold">Diaganosis</h4>
<h6 class="">
<b>ICD :</b>
<span>
<?php if($dataIns->diagonosisICD){echo $dataIns->diagonosisICD;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Date :</b>
<span>
<?php if($dataIns->diagonosisHistoricalDate){echo $dataIns->diagonosisHistoricalDate;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Historical data Diaganosis :</b>
<span>
<?php if($dataIns->diagonosisData){echo $dataIns->diagonosisData;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Type :</b>
<span>
<?php if($dataIns->diagonosisPrimary){echo $dataIns->diagonosisPrimary;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<h4 class="text-info font-weight-bold">Clinical Information</h4>
<h6 class="text-capitalize">
<b>Start Of Care :</b>
<span>
<?php if($dataIns->ClinicalStartOfCare){echo $dataIns->ClinicalStartOfCare;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Allergies :</b>
<span>
<?php if($dataIns->ClinicalAllergies){echo $dataIns->ClinicalAllergies;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Allergic Reaction :</b>
<span>
<?php if($dataIns->ClinicalAllergiesReaction){echo $dataIns->ClinicalAllergiesReaction;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Notes :</b>
<span>
<?php if($dataIns->ClinicalNotes){echo $dataIns->ClinicalNotes;}else{echo "NA";}?>
</span>
</h6>
<hr>
<h4 class="text-info font-weight-bold">Physican and MD information</h4>
<h6 class="">
<b>Name :</b>
<span>
<?php if($dataIns->PhysicanName){echo $dataIns->PhysicanName;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Address :</b>
<span>
<?php if($dataIns->PhysicanAddress){echo $dataIns->PhysicanAddress;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Telephone :</b>
<span>
<?php if($dataIns->PhysicanTelephone){echo $dataIns->PhysicanTelephone;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Email :</b>
<span><?=$dataIns->PhysicanEmail?></span>
<span>
<?php if($dataIns->PhysicanEmail){echo $dataIns->PhysicanEmail;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Affiliation :</b>
<span>
<?php if($dataIns->PhysicanAffiliation){echo $dataIns->PhysicanAffiliation;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>FAX :</b>
<span>
<?php if($dataIns->PhysicanFax){echo $dataIns->PhysicanFax;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>NPI :</b>
<span>
<?php if($dataIns->PhysicanNPI){echo $$dataIns->PhysicanNPI;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Lisence :</b>
<span>
<?php if($dataIns->PhysicanLisence){echo $dataIns->PhysicanLisence;}else{echo "NA";}?>
</span>
</h6>
<h6 class="">
<b>Note :</b>
<span>
<?php if($dataIns->PhysicanNote){echo $dataIns->PhysicanNote;}else{echo "NA";}?>
</span>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Annual in home card -->
<div class="row patient-view-card-container">
<div class="col-md-12 col-sm-12">
<div class="card patient-view-card bg-gradient-y-info">
<div class="card-header">
<h3>
<span class="font-weight-bold text-white">Annual In-Home Performance Evaluation</span>
<span class="float-right mx-2">
<i class="fa fa-pencil text-white" id="card_annual_home_edit" aria-hidden="true" data-toggle="modal" data-target="#annual_in_home_Modal" data-whatever="@mdo"></i>
</span>
</h3>
</div>
<div class="card-body">
<div class="row mb-0" >
<div class="col-md-5 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<!-- <h4 class="text-info font-weight-bold">Emergency Contact</h4> -->
<h6 class="">
<b>Name :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['name'])?$annual_in_home_performance['name']:''?>
</span>
</h6>
<h6 class="">
<b>Title :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['name_title'])?$annual_in_home_performance['name_title']:''?>
</span>
</h6>
<h6 class="">
<b>Date of Hire :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['date_of_hire'])?$annual_in_home_performance['date_of_hire']:''?>
</span>
</h6>
<h6 class="">
<b>Date of Visit :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['date_of_visit'])?$annual_in_home_performance['date_of_visit']:''?>
</span>
</h6>
<h6 class="">
<b>Time of Visit :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['time_of_visit'])?$annual_in_home_performance['time_of_visit']:''?>
</span>
</h6>
<h6 class="">
<b>Treatments/Procedures Observed :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['treatments_procedures_observed'])?$annual_in_home_performance['treatments_procedures_observed']:''?>
</span>
</h6>
<h6 class="">
<b>Comments/Recommendations :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['comments_recommendations'])?$annual_in_home_performance['comments_recommendations']:''?>
</span>
</h6>
<h6 class="">
<b>Name of Supervisor :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['name_of_supervisor'])?$annual_in_home_performance['name_of_supervisor']:''?>
</span>
</h6><h6 class="">
<b>Supervisor Title :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['supervisor_title'])?$annual_in_home_performance['supervisor_title']:''?>
</span>
</h6>
</div>
</div>
</div>
<div class="col-md-7 col-sm-12">
<div class="card py-1 mb-0">
<div class="card-body">
<!-- <h4 class="text-info font-weight-bold">Emergency Contact</h4> -->
<h6 class="">
<b>Demonstrates respect for patients rights, privacy and confidentiality :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_respect_for_patients_rights_privacy_and_confidentiality'])?$annual_in_home_performance['demonstrates_respect_for_patients_rights_privacy_and_confidentiality']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_respect_for_patients_rights_privacy_and_confidentiality_comments'])?$annual_in_home_performance['demonstrates_respect_for_patients_rights_privacy_and_confidentiality_comments']:''?>
</span>
</h6>
<h6 class="">
<b>Demonstrates excellent rapport with patient and family members :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_excellent_rapport_with_patient_and_family_members'])?$annual_in_home_performance['demonstrates_excellent_rapport_with_patient_and_family_members']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_excellent_rapport_with_patient_and_family_members_comments'])?$annual_in_home_performance['demonstrates_excellent_rapport_with_patient_and_family_members_comments']:''?>
</span>
</h6>
<h6 class="">
<b>Provides services as instructed in the Plan of Care :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['provides_services_as_instructed_in_the_plan_of_care'])?$annual_in_home_performance['provides_services_as_instructed_in_the_plan_of_care']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['provides_services_as_instructed_in_the_plan_of_care_comments'])?$annual_in_home_performance['provides_services_as_instructed_in_the_plan_of_care_comments']:''?>
</span>
</h6>
<h6 class="">
<b>Demonstrates knowledge of infection control such as Standard/Universal Precautions :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_knowledge_of_infection_control_such_as_standard_universal_precautions'])?$annual_in_home_performance['demonstrates_knowledge_of_infection_control_such_as_standard_universal_precautions']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_knowledge_of_infection_control_such_as_standard_universal_precautions_comments'])?$annual_in_home_performance['demonstrates_knowledge_of_infection_control_such_as_standard_universal_precautions_comments']:''?>
</span>
</h6>
<h6 class="">
<b>Demonstrates competency in providing care :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_competency_in_providing_care'])?$annual_in_home_performance['demonstrates_competency_in_providing_care']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['demonstrates_competency_in_providing_care_comments'])?$annual_in_home_performance['demonstrates_competency_in_providing_care_comments']:''?>
</span>
</h6>
<h6 class="">
<b>Documentation is clear timely and accurate :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['documentation_is_clear_timely_and_accurate'])?$annual_in_home_performance['documentation_is_clear_timely_and_accurate']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['documentation_is_clear_timely_and_accurate_comments'])?$annual_in_home_performance['documentation_is_clear_timely_and_accurate_comments']:''?>
</span>
</h6>
<h6 class="">
<b>Wearing agency photo ID :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['wearing_agency_photo_id'])?$annual_in_home_performance['wearing_agency_photo_id']:''?>
</span>
</h6>
<h6 class="">
<b>Comments :</b>
<span class="text-capitalize">
<?=isset($annual_in_home_performance['wearing_agency_photo_id_comments'])?$annual_in_home_performance['wearing_agency_photo_id_comments']:''?>
</span>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Annual in home card -->
<div class="row patient-view-card-container">
<div class="col-md-12 col-sm-12">
<div class="card patient-view-card p-0">
<div class="card-header bg-gradient-y-info py-1">
<h3>
<span class="font-weight-bold text-white">Assessment History</span>
<span class="float-right mx-2">
<a class="badge badge-pill badge-warning" href="<?php echo base_url()?>PatientSchedule/Schedule?id=<?php echo $datas->main_id;?>">
<i class="fa fa-calendar" aria-hidden="true"></i>
Schedule
</a>
<a class="badge badge-pill badge-success" href="<?php echo base_url()?>patient_discharge/addDischarge/<?php echo $datas->main_id;?>">
<i class="fa fa-medkit" aria-hidden="true"></i>
Discharge
</a>
</span>
</h3>
</div>
<div class="card-body">
<table class="table table-striped table-bordered dom-jQuery-events" id="editable-sample" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sl.no</th>
<th>Assessment type</th>
<th>Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
if(empty($asmData)){ ?>
<tr>
<td><?php echo "No Data Available";?></td>
</tr>
<?php }
foreach ($asmData as $value)
{
?>
<tr>
<td><?=$i?></td>
<td class="align-middle border-top-0">
<i class="la la-circle text-danger"></i>
<?php
if($value->assessment_type == 'initial_assessment')
{
?>
Initial Assessment
<?php
}
else
{
?>
Report
<?php
}
?>
</td>
<td class="align-middle border-top-0"><?php echo $value->report_entry_date;?></td>
<td class="align-middle border-top-0" style="width:25%;">
<div class="action">
<a class="btn btn-info btn-xs btn_width edit_btn me-1" title="View Report" href="<?php echo base_url(); ?>assessment/view?id=<?=$value->patient_id?>&scheduleId=<?=$value->schedule_id?>"><i class="fa fa-eye"> </i></a>
<!-- <a href="#"><i class="ft-edit text-success"></i></a> -->
<!-- <a href="#"><i class="ft-trash-2 text-warning"></i></a> -->
<button
type="button"
class="btn btn-info btn-xs btn_width edit_btn"
title="Regenarate pdf"
onclick="generateNursingAssessmentPdf(<?=$value->patient_id?>,<?=$value->schedule_id?>)"
>
<i class="fa fa-file-pdf-o"></i> Genarate Pdf
</button>
<button
type="button"
class="btn btn-info btn-xs btn_width edit_btn"
title="View Pdf"
onclick="viewNursingAssessmentPdf(<?=$value->patient_id?>,<?=$value->schedule_id?>, 'nursing_assessment')"
>
<i class="fa fa-file-text"></i> View Pdf
</button>
</div>
</td>
</tr>
<?php
$i++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<!-- block examples section ending here -->
</div>
</section>
</div>
</div>
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"><?php echo lang("Update View");?></h5>
<div class="bg-lg m-auto">
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
</div>
<div class="modal-body">
<div id="card_1">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<div class="form-group">
<label for="first_name" class="col-form-label"><?php echo lang("First Name");?></label>
<input type="text" class="form-control" id="first_name" name="fname" value="<?php echo $datas->first_name;?>">
</div>
<div class="form-group">
<label for="last_name" class="col-form-label"><?php echo lang("Last Name");?></label>
<input type="text" class="form-control" id="last_name" name="lname" value="<?php echo $datas->last_name;?>">
</div>
<div class="form-group">
<label for="pt_dob" class="col-form-label"><?php echo lang("Birth");?></label>
<input type="date" class="form-control" id="pt_dob" name="dob" value="<?php echo $datas->dob;?>">
</div>
<div class="form-group">
<label for="pt_email" class="col-form-label"><?php echo lang("Email");?></label>
<input type="email" class="form-control" id="pt_email" name="email" value="<?php echo $datas->patient_email;?>" readonly>
</div>
<div class="form-group">
<label for="socsec_outer" class="col-form-label"><?php echo lang("Social Security Number");?></label>
<input type="hidden" id="socsec" name="socsec" value="<?php echo $datas->soc_sec_no; ?>">
<input type="text" class="form-control onlyNumber" id="socsec_outer" onblur="socialSecurity(this.value,this)" onkeyup="socialSecurity(this.value,this)" value="<?php echo $datas->soc_sec_no; ?>" minlength="4" maxlength="9">
</div>
<div class="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</form>
</div>
<div id="card_2">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<div class="form-group">
<label for="gender" class="col-form-label"><?php echo lang("Gender");?></label>
<div class="center-y">
<input type="radio" id="male" name="gender" value="Male" <?php echo ($datas->gender=='Male')?'checked':'';?> required>&ensp;
<label for="male">Male</label>&emsp;
<input type="radio" id="female" name="gender" value="Female" <?php echo ($datas->gender=='Female')?'checked':'';?> required>&ensp;
<label for="female">Female</label>&emsp;
<input type="radio" id="others" name="gender" value="Others" <?php echo ($datas->gender=='Others')?'checked':'';?> required>&ensp;
<label for="others">Others</label>
</div>
</div>
<div class="form-group">
<label for="pt_marital_stat" class="col-form-label"><?php echo lang('Marital Status');?></label>
<select class="form-control" id="pt_marital_stat" name="merital_stat">
<option selected disabled>Choose...</option>
<option <?php echo ($datas->marital_stat == 'Married')?'selected':'';?> value="Married">Married</option>
<option <?php echo ($datas->marital_stat == 'Unmarried')?'selected':'';?> value="Unmarried">Unmarried</option>
</select>
</div>
<div class="form-group">
<label for="pt_weight" class="col-form-label"><?php echo lang("Weight (in pound)");?></label>
<input type="text" class="form-control onlyNumber" id="pt_weight" name="weight" value="<?php echo $datas->weight;?>">
</div>
<div class="form-group">
<label for="pt_dob" class="col-form-label"><?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="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</form>
</div>
<div id="card_3">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<div class="form-group">
<label for="address1" class="col-form-label"><?php echo lang("Address");?></label>
<?php $pAdata = json_decode($datas->address); ?>
<div class="row">
<div class="col-md-12">
<label for="firstName3">
<h3><?php echo lang('Address'); ?></h3>
</label>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name');?></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;?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('Apartment # (if applicable)');?></label>
<input type="text" class="form-control" name="AddrApartment1" id="AddrApartment1" value="<?php echo $pAdata->Apartment; ?>">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('City'); ?></label>
<input type="text" class="form-control" name="addrCity1" id="city1" value="<?php echo $pAdata->City;?>" required="" readonly>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('State');?></label>
<input type="text" class="form-control" name="addrState1" id="state1" value="<?php echo $pAdata->State; ?>" readonly>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('County');?></label>
<input type="text" class="form-control" name="addrCounty1" id="county1" value="<?php echo $pAdata->County; ?>" readonly>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip Code');?></label>
<input type="text" class="form-control" name="addrZipcode1" id="zipcode1" value="<?php echo $pAdata->Zipcode; ?>" minlenght="5" maxlength="5">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 mt-2">
<div class="form-group m-auto">
<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>
</div>
<div class="form-group">
<label for="pt_direction" class="col-form-label"><?php echo lang("Direction");?></label>
<textarea class="form-control" id="pt_direction" name="direction"><?php echo $datas->direction; ?></textarea>
</div>
<div class="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</form>
</div>
<div id="card_4">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<div class="form-group">
<label for="first_name" class="col-form-label"><b><?php echo lang("Level of Care");?></b></label>
<select class="form-control" name="level_care" id="inputGroupSelect01">
<option >Choose...</option>
<option <?php echo ($datas->level_of_care == '1')?'selected':'' ; ?> value="1">1 High</option>
<option <?php echo ($datas->level_of_care == '2')?'selected':'' ; ?> value="2">2</option>
<option <?php echo ($datas->level_of_care == '3')?'selected':'' ; ?> value="3">3</option>
<option <?php echo ($datas->level_of_care == '4')?'selected':'' ; ?> value="4">4</option>
<option <?php echo ($datas->level_of_care == '5')?'selected':'' ; ?> value="5">5 Low</option>
</select>
</div>
<div class="form-group">
<label for="first_name" class="col-form-label"><b><?php echo lang("Referal Source");?></b></label>
<div>
<select class="form-control required" id="ref_info" name="pt_refrance_type" required="">
<option value="Reffered by Patient">Referred by Patient</option>
<option value="Reffered by Vendor">Referred by Vendor</option>
</select>
</div>
<div id="ref_by_ptn" style="display:none;">
<select class="form-control required" id="ref_pt_id" name="pt_refrance_value">
<option value="" selected>Choose...</option>
<?php
foreach ($patientList as $value)
{
?>
<option <?php echo ($datas->reference_id == $value->id)?'selected':'' ; ?> value="<?php echo $value->id; ?>">
<?php echo $value->first_name." ".$value->last_name; ?>
</option>
<?php
}
?>
</select>
</div>
</div>
<div class="form-group">
<label for="last_name" class="col-form-label"><b><?php echo lang("Designate Other");?></b></label>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label><?php echo lang('First name'); ?></label>
<input type="text" class="form-control" name="dg_fname" value='<?php echo $datas->designate_first_name; ?>'>
</div>
<div class="col-lg-6">
<label><?php echo lang('Last name'); ?></label>
<input type="text" class="form-control" name="dg_lname" value='<?php echo $datas->designate_last_name; ?>' placeholder="">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label><?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 $datas->designate_telephone; ?>'>
</div>
<div class="col-lg-6">
<label><?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 $datas->designate_cell; ?>'>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-12">
<label><?php echo lang('Email'); ?></label>
<input type="email" class="form-control" name="dg_email" value='<?php echo $datas->designate_email; ?>'>
</div>
</div>
</div>
</div>
<div class="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</form>
</div>
<div id="card_5">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<div class="form-group">
<label for="first_name" class="col-form-label"><?php echo lang("Level of Service needed");?></label>
<select class="form-control required" name="level_service" id="level_service" required="">
<option value="" selected>Choose...</option>
<?php
foreach($lvlService as $value)
{
?>
<option <?php echo ($datas->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 class="form-group">
<label for="last_name" class="col-form-label">
<?php echo lang("Service Activity/Therapy Needed");?>
</label>
<!-- <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 $serviceDatas)
{
?>
<?php $saTypeVal = ($datas->service_type_required=='Service')? $datas->service_ids : $pdata->therapy_ids ; ?>
<option <?php echo ($datas->service_type_required.'~'.$saTypeVal == $serviceDatas['value'])?'selected':'' ; ?> value="<?=$serviceDatas['value']?>"><?=$serviceDatas['name']?></option>
<?php
}
?>
</select> -->
<select class="form-control required" name="service_activity" id="service_activity" required="">
<option>Choose Any One</option>
<?php
foreach($type_of_service_need as $s_head){
?>
<optgroup label="<?=$s_head->service_head_name?>" value="<?=$s_head->id?>">
<?php
foreach($s_head->data as $ques){
?>
<option value="<?=$ques->id?>" <?php if($ques->id==$datas->service_ids){echo "selected";}?>>
<?=$ques->service_name?>
</option>
<?php
}
?>
</optgroup>
<?php
}
?>
</select>
</div>
<div class="form-group">
<label for="pt_dob" class="col-form-label"><?php echo lang("Type Of Access");?></label>
<?php $dbData = explode(',', $datas->type_access);?>
<select class="form-control select3" name="type_access[]" id="inputGroupSelect01" 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 class="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</form>
</div>
<div id="card_6">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<div class="form-group">
<label for="first_name" class="col-form-label"><h3><?php echo lang("Emergency Contact");?></h3></label>
<div class="form-group">
<div class="row">
<div class="col-lg-6">
<label><?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><?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-12">
<label><?php echo lang('Relationship to the Patient'); ?></label>);
<select class="form-control" name="emgRelationtoPt" >
<option value="" disabled="">Choose...</option>
<?php
foreach($relationList as $relation)
{
?>
<option <?php if($relation->id==$dataIns->emgContactRelation){echo "selected";}?> value="<?php echo $relation->id;?>">
<?php echo $relation->name; ?>
</option>
<?php
}
?>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<?php $iAdata = json_decode($idata->emgContactAddress);?>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('House Number and Street Name');?></label>
<input type="text" class="form-control" name="address3" id="address3" value="<?php echo $iAdata->address;?>" >
</div>
</div>
<div class="col-md-6">
<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>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('City');?></label>
<input type="text" class="form-control" name="addrCity3" id="city3" value="<?php echo $iAdata->City; ?>" readonly>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('State');?></label>
<input type="text" class="form-control" name="addrState3" id="state3" value="<?php echo $iAdata->State; ?>" readonly>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('County'); ?></label>
<input type="text" class="form-control" name="addrCounty3" id="county3" value="<?php echo $iAdata->County; ?>" readonly>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="firstName3"><?php echo lang('Zip code'); ?></label>
<input type="text" class="form-control" name="addrZipcode3" id="zipcode3" value="<?php echo $iAdata->Zipcode; ?>" minlenght="5" maxlength="5">
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12 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><?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><?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-12">
<label><?php echo lang('Email'); ?></label>
<input type="text" class="form-control" name="emgEmail" id="exampleInputEmail1" value="<?php echo $idata->emgContactEmail; ?>">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-lg-5">
<label><?php echo lang('Lives with Patient');?></label>
</div>
<div class="col-lg-7">
<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 class="form-group">
<div class="row">
<div class="col-lg-12">
<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>
<div class="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Annual in home modal -->
<div class="modal fade" id="annual_in_home_Modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog width-larger" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Annual In-Home Performance Evaluation</h5>
<div class="bg-lg m-auto">
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
</div>
<div class="modal-body fix-height-body">
<div id="card_1">
<form role="form" action="<?php echo base_url()?>referral/editReferal" method="post" enctype="multipart/form-data" name="newGenInfo">
<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="<?=$datas->main_id?>">
<input type="hidden" name="tabPgs" value="10">
<input type="hidden" name="fromType" value="addRef">
<input type="hidden" name="reqFrom" value="viewPage">
<input type="hidden" name="nameForm" value="annual_in_home_performance_evaluation">
<?php viewDynamincForm('annual-in-home-aide-supervision'); ?>
<div class="form-group mt-2 center-y">
<button type="submit" class="btn btn-primary" name="submit" id="submitBtn" class="btn btn-info">
<?php echo lang('Update'); ?>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Annual in home modal -->
<!-- patient info updation from modal box's cards -->
<script type="text/javascript">
$('#updateModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var recipient = button.data('whatever');
var modal = $(this);
modal.find('.modal-title').text('New message to ' + recipient);
modal.find('.modal-body input').val(recipient);
});
$(document).ready(function(){
$("#card_1_edit").click(function(){
$("#card_1").show();
$("#card_1").siblings().hide();
});
$("#card_2_edit").click(function(){
$("#card_2").show();
$("#card_2").siblings().hide();
});
$("#card_3_edit").click(function(){
$("#card_3").show();
$("#card_3").siblings().hide();
});
$("#card_4_edit").click(function(){
$("#card_4").show();
$("#card_4").siblings().hide();
});
$("#card_5_edit").click(function(){
$("#card_5").show();
$("#card_5").siblings().hide();
});
$("#card_6_edit").click(function(){
$("#card_6").show();
$("#card_6").siblings().hide();
});
});
</script>
<!-- patient info updation from modal box's cards -->
<script type="text/javascript">
$(document).ready(function(){
var soc=$("#socsec").val();
var len=soc.length;
var xxx_soc_no="";
if(len==9){
for(i=0;i<len;i++){
var n=soc.charAt(i);
if(i<5){
xxx_soc_no+="X";
if(i==2 || i==4){
xxx_soc_no+="-";
}
}
if(i>=5){
xxx_soc_no+=n;
}
}
}
$("#socsec_outer").val(xxx_soc_no);
$("#sosec_no").html(xxx_soc_no);
});
</script>
<!-- ============================================================ -->
<script type="text/javascript">
$(function(){
$("#ref_info").change(function(){
var selVal = $(this).val();
if(selVal == 'Reffered by Patient'){
$("#ref_pt_id").attr("required", "true");
$("#ref_vnd_id").removeAttr('required');
$("#ref_by_ptn").show();
$("#ref_by_vendor").hide();
}
else if(selVal == 'Reffered by Vendor'){
$("#ref_vnd_id").attr("required", "true");
$("#ref_pt_id").removeAttr('required');
$("#ref_by_ptn").hide();
$("#ref_by_vendor").show();
}
else{
$("#ref_vnd_id").removeAttr('required');
$("#ref_pt_id").removeAttr('required');
$("#ref_by_ptn").hide();
$("#ref_by_vendor").hide();
}
});
var refInfo = "<?php echo $datas->reference_information; ?>";
// $("#id_100 select").val("val2");
$('#ref_info').val(refInfo).trigger('change');
});
</script>
<!-- ===================================================== -->
<script type="text/javascript">
$( document ).ready(function() {
setInterval(function(){
load_progress();
}, 1000);
});
function load_progress(){
$.ajax({
url:'<?=base_url()?>referral/load_progress?id=<?=$_GET['id']?>',
type :'GET',
success:function(data){
//console.log(data);
if(data>99){ data=100; }
if(data==''){ data=0; }
$('#progress_lbl').html(data);
$('#progress_bar').html(data+'%');
$('#progress_bar').attr('aria-valuenow',data);
$('#progress_bar').attr('style','width: '+data+'%;');
}
});
}
// --agreement Docs---------------------------------------------------
patientAgreementDocument(null);
function patientAgreementDocument(data){
var appenddata = $("div[use=agreementDocuploadContaner]").find("div[use=agreementDocuploadForm]").clone();
// need to review
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: 50px;">'
//+'<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: 50px;">';
$(appenddata).find("span[use=uploadContainer]").append(img_data);
}
}
// need to review end
$('#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();
}
}
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: 50px;">'
//+'<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: 50px;">';
$(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();
}
}
function submit_upload_form(e,formObject){
e.preventDefault();
//console.log('>>>>>>>>>>');
var formObj = $(formObject);
// alert($(formObject).attr("action"));
console.log(formObj);
var from_data=new FormData(formObject);
$.ajax({
url: $(formObject).attr("action"),
type : 'POST',
data : from_data,
dataType: "text",
contentType: false,
cache: false,
processData:false,
beforeSend : function(){
//$("#preview").fadeOut();
$("#err").fadeOut();
},
success : function(data){
console.log(data);
// if(data.upload=='success'){
// Swal.fire({
// position: 'center',
// icon: 'success',
// title: data.msg,
// showConfirmButton: false,
// timer: 3500
// });
// $(formObj).find("span[use=uploadContainer]").empty();
// var insert = '<a target="_blank" href="'+data.file_url+'">'
// +'<img src="uploads/attachment.png" class="img-thumbnail" style="height: 50px;">'
// //+'<img src="uploads/uploaded.png" class="img-thumbnail" style="height: 75px;">'
// +'</a>';
// $(formObj).find("span[use=uploadContainer]").append(insert);
// }
},
error : function(err){
alert("error");
}
});
}
</script>
<!-- new added on 29-09-2021 -->
<script type="text/javascript">
$("#refEmailId").blur(function(){
//alert('1');
var email=this.value;
$("#emailcheckTab").show();
$("#emailChecking").show();
$("#emailAvailable").hide();
$("#emailNA").hide();
$("#submitBtn").prop('disabled', true); // this submitBtn id is added to the submit button of basic info form
$.ajax({
url:'<?php echo base_url();?>patientDashboard/checkEmail?pid=<?php echo $pid?>',
type:'GET',
data:{email:email},
beforeSend: function(){
$("#emailcheckTab").show();
$("#emailChecking").show();
$("#emailAvailable").hide();
$("#emailNA").hide();
},
success:function(data){
// alert(data);
if(data){
$("#emailAvailable").show();
$("#emailNA").hide();
$("#submitBtn").prop('disabled', false);
}else{
$("#emailAvailable").hide();
$("#emailNA").show();
}
$("#emailcheckTab").show();
$("#emailChecking").hide();
}
});
});
</script>
<!-- new added ending here -->
<!-- new added on 04-10-2021 -->
<!-- <script type="text/javascript">
$("#telId").blur(function(){
//alert('1');
var telephone=this.value;
$("#telcheckTab").show();
$("#telChecking").show();
$("#telAvailable").hide();
$("#telNA").hide();
$("#submitBtn").prop('disabled', true); // this submitBtn id is added to the submit button of basic info form
$.ajax({
url:'<?php echo base_url();?>patientDashboard/checkTel?pid=<?php echo $pid?>',
type:'GET',
data:{tel:telephone},
beforeSend: function(){
$("#telcheckTab").show();
$("#telChecking").show();
$("#telAvailable").hide();
$("#telNA").hide();
},
success:function(data){
// alert(data);
if(data){
$("#telAvailable").show();
$("#telNA").hide();
$("#submitBtn").prop('disabled', false);
}else{
$("#telAvailable").hide();
$("#telNA").show();
}
$("#telcheckTab").show();
$("#telChecking").hide();
}
});
});
</script> -->
<!-- new added ending here -->
<script type="text/javascript">
$(function(){
$("#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(){
$("#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();
}
});
$("#donothave").click(function(){
if($('#donothave').prop('checked')){
$("#refEmailId"). prop('disabled', true);
}else{
$("#refEmailId"). prop('disabled', false);
}
});
})
$(function(){
$(".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"));
}
});
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');
$('#pvtInsInfoSection').show();
}
}
});
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");
}
});
}
</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
// Now to set the max date value for the calendar to be today's date
$('#ptdob').attr('max', maxDate);
$("#referalRecDate").attr('max', maxDate);
});
</script>
<script type="text/javascript">
function validateForm() {
var fldval = $("#slotEditname").val();
if (fldval == "") {
$("#msg_rm").html("<div class='alert alert-danger' role='alert'> Please enter a value</div>");
return false;
}
var fldval = $("#slotEditname").val();
var currId = $('#nameId').val();
var msgs = '';
$.ajax('master_icd/duplicateCheck', {
type: 'GET', // http method
data: { val: fldval, currId: currId }, // data to submit
async: false,
success: function(data, status, xhr) {
// $('p').append('status: ' + status + ', data: ' + data);
// alert(data);
msgs = data;
},
error: function(jqXhr, textStatus, errorMessage) {
// $('p').append('Error' + errorMessage);
alert("error duc");
}
});
if (msgs == 'exist') {
$("#msg_rm").html("<div class='alert alert-danger' role='alert'> Value already exist in the list</div>");
return false;
} else {
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">
$(document).ready(function(){
// Initialize Select2
$('#ref_pt_id').select2();
// Set option selected onchange
$('#user_selected').change(function()
{
var value = $(this).val();
// Set selected
$('#ref_pt_id').val(value);
$('#ref_pt_id').select2().trigger('change');
});
});
</script>
<script type="text/javascript">
$( document ).ready(function() {
$("#diagICD").blur(function(){
var icdCode = $(this).val();
$.ajax({
url:'<?=base_url()?>referral/getIcdList?code='+icdCode,
type :'GET',
success:function(data){
$('#diagICDopt').find('option').remove().end()
$('#diagICDopt').append(data);
}
});
})
})
$( document ).ready(function() {
$("#SecdiagICD").blur(function(){
var icdCode = $(this).val();
$.ajax({
url:'<?=base_url()?>referral/getIcdList?code='+icdCode,
type :'GET',
success:function(data){
$('#SecdiagICDopt').find('option').remove().end()
$('#SecdiagICDopt').append(data);
}
});
})
})
</script>
<script>
$( document ).ready(function() {
$(".onlyNumber").keypress(function(evt){
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
})
$('.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");
// });
});
</script>
<script type="text/javascript">
$(function(){
$("#patient_agreement_Document_Verified").click(function(){
if($('#patient_agreement_Document_Verified').prop('checked')){
$("#patientAgreementBtn").removeClass("disabled");
$("#patientAgreementBtn"). prop('disabled', false);
if($("#imageval").val()){
$("#docsm").prop('required',false);
}else{
$("#docsm").prop('required',true);
}
}
else{
$("#patientAgreementBtn").addClass("disabled");
$("#patientAgreementBtn"). prop('disabled', true);
}
});
$("#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) {
// msgs = data;
var resp = JSON.parse(data);
if (resp.status == '0') {
$("#msgActivation").html(resp.msg);
$("#activatePatient").addClass('disabled');
}
if (resp.status == '1') {
$("#msgActivation").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();
});
$('#selectlp').select2();
$('.select3').select2();
});
</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>
<?php if(isset($_SESSION['ref_added'])){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'success',
title: 'Referral data added',
showConfirmButton: false,
timer: 3500
})
</script>
<?php unset($_SESSION['ref_added']);} ?>
<!-- new added on 29-09-2021 -->
<?php if(isset($_SESSION['feedback_error'])){ ?>
<script>
Swal.fire({
position: 'center',
icon: 'error',
title: '<?php echo $_SESSION['feedback_error'];?>',
showConfirmButton: false,
timer: 3500
})
</script>
<?php unset($_SESSION['feedback_error']);} ?>
<!-- new added ending here -->
<?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>
$(function(){
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 check_parmanent_address(_this)
{
var idPostfix = $(_this).val();
var address1=$('#address'+idPostfix).val();
var zipcode1=$('#zipcode'+idPostfix).val();
if(zipcode1 == "")
{
Swal.fire({
position: 'center',
icon: 'error',
title: 'Please enter zip code',
showConfirmButton: true,
});
return 0;
}
$.ajax({
url:"<?php echo base_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.state!=''){
$('#state'+idPostfix).val(data.state);
$('#county'+idPostfix).val(data.county);
$('#city'+idPostfix).val(data.city);
$('#lang'+idPostfix).val(data.lat);
$('#long'+idPostfix).val(data.long);
$('#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>
<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 validateForm5()
{
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;
}
}
$(function(){
$(".select2-container--default").css("width", "100%");
})
$(function(){
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10){
dd='0'+dd
}
if(mm<10){
mm='0'+mm
}
today = yyyy+'-'+mm+'-'+dd;
$(".not_future").attr("max", today);
})
function socialSecurity(phoneNumberString,_this) {
//var cleaned = ('' + phoneNumberString).replace(/\D/g, '')
var cleaned =phoneNumberString;
if(cleaned.length > 11){
cleaned = cleaned.substr(0, 11);
}
if(phoneNumberString.length < 11){
var x = document.getElementById("socsec").value;
document.getElementById("socsec_outer").value = x;
}
var match = cleaned.match(/^(1|)?(\d{3})(\d{2})(\d{4})$/);
if (cleaned.length == 9 && match) {
document.getElementById("socsec").value = phoneNumberString;
//var fres = [match[2], '-', match[3], '-', match[4]].join('');
$("#actual_ssn").val([match[2], '-', match[3], '-', match[4]].join(''));
var fres = ['XXX', '-', 'XX', '-', match[4]].join('');
_this.value = fres;
}else{
_this.value = cleaned
}
return null
}
</script>
<!-- nursing assessement pdf creation -->
<script type="text/javascript">
if(typeof swalAlert==="undefined"){
function swalAlert(icon,msg){
Swal.fire({
position: 'center',
icon: icon,
title: msg,
showConfirmButton: false,
timer: 1500
});
}
}
async function generateNursingAssessmentPdf(patient_id,schedule_id){
try{
var pages=[
'intake_sheet',
'nursing_assessment_page_one',
'nursing_assessment_page_two',
'nursing_assessment_page_three',
'nursing_assessment_page_four',
'emergency_preparedness_plan',
'home_health_certification_poc',
'medication_profile',
'privacy_act_statement',
'care_plan_for_home_attendants',
'covid_19_liability_release',
'covid_19_screening',
'home_safety_assessment',
'annual_in_home_aide'
];
var info={
'basic_data':{
'ajax_total_request':pages.length,
'ajax_proccessed_request':0,
'temporary_files':{}
},
'request_data':{
'patient_id':patient_id,
'schedule_id':schedule_id
}
}
for(var i=0;i<pages.length;i++){
info.request_data.page_name=pages[i];
await createHtmlToPdf0001101(info,pages);
}
}
catch(error){
console.error("Error occured in function generateNursingAssessmentPdf();");
}
}
async function createHtmlToPdf0001101(request,pages){
try{
var url="<?=base_url()?>cproforms/hms_create_individual_nursing_assessment_pdf";
$.ajax({
type: 'POST',
url: url,
data: {
<?=$this->security->get_csrf_token_name()?>:'<?=$this->security->get_csrf_hash()?>',
body: request.request_data
},
beforeSend: function(){
// console.log("creating pdfs...");
callLoader_hgy67vg(true,"Generating PDF Files");
},
success: function(response) {
var response2=response.split("###~~~###~~~###");
var data=$.parseJSON(response2[0]);
if(data.status==200){
var page_name=data.data.page_name;
var pdf_file=data.data.pdf_file;
request.basic_data.temporary_files[pages.indexOf(page_name)]=pdf_file;
request.basic_data.ajax_proccessed_request++;
callLoader_hgy67vg(true,"Created "+request.basic_data.ajax_proccessed_request+"/"+request.basic_data.ajax_total_request+" PDF Files");
if(request.basic_data.ajax_proccessed_request===request.basic_data.ajax_total_request){
mergePdfs0001101(request);
}
}
},
error: function(){
callLoader_hgy67vg(false);
console.error("something bad happened while calling ajax-cproforms/hms_create_individual_nursing_assessment_pdf");
},
complete: function(){
// console.log("completed creating pdfs...");
// callLoader_hgy67vg(false);
}
});
}
catch(error){
console.error("Error occured in function createHtmlToPdf0001101();");
}
}
async function mergePdfs0001101(request){
try{
request.request_data.files=request.basic_data.temporary_files;
var url="<?=base_url()?>cproforms/hms_create_nursing_assessment_pdf";
$.ajax({
type: 'POST',
url: url,
data: {
<?=$this->security->get_csrf_token_name()?>:'<?=$this->security->get_csrf_hash()?>',
body: request.request_data
},
beforeSend: function(){
// console.log("creating pdf...");
callLoader_hgy67vg(true,"Almost done, Merging PDF Files");
},
success: function(response) {
var data=$.parseJSON(response);
callLoader_hgy67vg(false);
if(data.status=200){
// console.log('PDF created successfuly',': ',data.data.pdf_file);
swalAlert('success','PDF Created Successfully');
window.open(data.data.pdf_file,"_blank");
}
},
error: function(){
callLoader_hgy67vg(false);
console.error("something bad happened while calling ajax-cproforms/hms_create_nursing_assessment_pdf");
},
complete: function(){
// console.log("completed creating pdf...");
// callLoader_hgy67vg(false);
}
});
}
catch(error){
console.error("Error occured in function mergePdfs0001101();");
}
}
function viewNursingAssessmentPdf(patient_id,schedule_id, view_for){
var request={
'patient_id':patient_id,
'schedule_id':schedule_id
}
if(view_for == 'nursing_assessment'){
var url="<?=base_url()?>cproforms/hms_get_nursing_assessment_pdf";
}else{
var url="<?=base_url()?>cproforms/hms_get_agreement_pdf";
}
$.ajax({
type: 'GET',
url: url,
data: {
body: request
},
beforeSend: function(){
},
success: function(response) {
var data=$.parseJSON(response);
if(data.status==200){
window.open(data.data.pdf_file,'_blank');
}
},
error: function(){
console.error("something bad happened while calling ajax-cproforms/hms_get_nursing_assessment_pdf");
},
complete: function(){
// console.log("completed creating pdfs...");
// callLoader_hgy67vg(false);
}
});
}
</script>
<!-- nursing assessement pdf creation -->