From 846301aaa798839025cfb3cf3d58dbfda1e4e5ba Mon Sep 17 00:00:00 2001 From: stephen waite Date: Wed, 14 Feb 2024 08:24:53 -0500 Subject: [PATCH] bug: fix bug (#7229) * bug: fix bug * no need to int cast * move text() outside of function --- .../procedure_tools/labcorp/ereq_form.php | 258 +++++++++--------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/interface/procedure_tools/labcorp/ereq_form.php b/interface/procedure_tools/labcorp/ereq_form.php index b877aedc6d3..cac9438a24d 100644 --- a/interface/procedure_tools/labcorp/ereq_form.php +++ b/interface/procedure_tools/labcorp/ereq_form.php @@ -64,8 +64,8 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= "

Account #: $account


"; - $pdfContent .= '

Req/Control #: ' . $form_id . '

'; + $pdfContent .= "

Account #: " . text($account) . "


"; + $pdfContent .= '

Req/Control #: ' . text($form_id) . '

'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; @@ -74,11 +74,11 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $collection_time = date("H:i", strtotime($procedure['date_collected'])); $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; @@ -100,21 +100,21 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; @@ -132,22 +132,22 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $page = getPatientAgeYMD($patient['DOB']); $ageformat = explode(' ', $page['ageinYMD']); $pdfContent .= '
Collection Date:' . $collection_date . '' . text($collection_date) . '
Collection Time:' . $collection_time . '' . text($collection_time) . '
Courtesy Copy:
'; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Account Name:' . $facility['name'] . '
Address 1:' . $facility['street'] . '
Account Name:' . text($facility['name']) . '
Address 1:' . text($facility['street']) . '
Address 2: 
City, State Zip:' . $facility['city'] . ', ' . $facility['state'] . ' ' . $facility['postal_code'] . '
Phone:' . $facility['phone'] . '
City, State Zip:' . text($facility['city']) . ', ' . text($facility['state']) . ' ' . text($facility['postal_code']) . '
Phone:' . text($facility['phone']) . '
'; $pdfContent .= '
'; $pdfContent .= ''; $provider = sqlQuery("SELECT concat(lname,', ', fname) as name, npi, upin, id FROM users WHERE id=?", [$procedure['provider_id']]); - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Ordering Physician:' . $provider['name'] . '
Ordering Physician:' . text($provider['name']) . '
Physician Degree: 
NPI:' . $provider['npi'] . '
UPIN:' . $provider['upin'] . '
Physician ID:' . $provider['id'] . '
NPI:' . text($provider['npi']) . '
UPIN:' . text($provider['upin']) . '
Physician ID:' . text($provider['id']) . '
'; $pdfContent .= '
'; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Patient Name:' . $patient['lname'] . ', ' . $patient['fname'] . '
Gender:' . $patient['sex'] . '
Patient Name:' . text($patient['lname']) . ', ' . text($patient['fname']) . '
Gender:' . text($patient['sex']) . '
Date of Birth:' . date("m/d/Y", strtotime($patient['DOB'])) . '
Age:' . str_replace('y', '', $ageformat[0]) . '/' . str_replace('m', '', $ageformat[1]) . '/' . str_replace('d', '', $ageformat[2]) . '
Patient Address:' . $patient['street'] . '
City, State Zip:' . $patient['city'] . ', ' . $patient['state'] . ' ' . $patient['postal_code'] . '
Age:' . str_replace('y', '', text($ageformat[0])) . '/' . text(str_replace('m', '', $ageformat[1])) . '/' . text(str_replace('d', '', $ageformat[2])) . '
Patient Address:' . text($patient['street']) . '
City, State Zip:' . text($patient['city']) . ', ' . text($patient['state']) . ' ' . text($patient['postal_code']) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Patient SSN:' . $patient['ss'] . '
Patient ID:' . $patient['pubpid'] . '
Phone:' . $patient['phone_home'] . '
Patient SSN:' . text($patient['ss']) . '
Patient ID:' . text($patient['pubpid']) . '
Phone:' . text($patient['phone_home']) . '
  
Alt Control #: 
Alt Patient ID:' . $patient['pid'] . '
Alt Patient ID:' . text($patient['pid']) . '
'; $pdfContent .= ''; $pdfContent .= ''; @@ -170,7 +170,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= 'ORDER CODE'; - $pdfContent .= 'TESTS ORDERED (TOTAL: ' . $proc_order . ')'; + $pdfContent .= 'TESTS ORDERED (TOTAL: ' . text($proc_order) . ')'; $pdfContent .= 'ORDER CODE'; $pdfContent .= 'TESTS ORDERED'; $pdfContent .= ''; @@ -179,7 +179,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; for ($i = 0; $i < $procedure_left; $i++) { $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $temp_diag = explode(";", $all_procedures[$i]['diagnoses']); $all_diagnoses[] = $temp_diag; $pdfContent .= ''; @@ -190,7 +190,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= '
' . $all_procedures[$i]['procedure_code'] . '' . text($all_procedures[$i]['procedure_code']) . '
'; for ($i = 0; $i < $procedure_left; $i++) { $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; } $pdfContent .= '
' . $all_procedures[$i]['procedure_name'] . '' . text($all_procedures[$i]['procedure_name']) . '
'; @@ -199,7 +199,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; for ($i = $procedure_left; $i < $proc_order; $i++) { $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $temp_diag = explode(";", $all_procedures[$i]['diagnoses']); $all_diagnoses[] = $temp_diag; $pdfContent .= ''; @@ -210,7 +210,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= '
' . $all_procedures[$i]['procedure_code'] . '' . text($all_procedures[$i]['procedure_code']) . '
'; for ($i = $procedure_left; $i < $proc_order; $i++) { $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; } $pdfContent .= '
' . $all_procedures[$i]['procedure_name'] . '' . text($all_procedures[$i]['procedure_name']) . '
'; @@ -239,7 +239,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) if ($aoe_data['question_code']) { if (stripos($all_procedures[$i]['procedure_name'], 'PAP') !== false) { if ($aoe_data['answer']) { - $aoe_pap .= '' . $aoe_data['question_text'] . ':' . $aoe_data['answer'] . ''; + $aoe_pap .= '' . text($aoe_data['question_text']) . ':' . text($aoe_data['answer']) . ''; $pap_proc = 'AOE Test: ' . $all_procedures[$i]['procedure_code']; } continue; @@ -289,7 +289,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; if (!empty($pap_proc)) { - $pdfContent .= "$pap_proc"; + $pdfContent .= "text($pap_proc)"; } else { $pdfContent .= 'Clinical Information:'; } @@ -301,7 +301,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) if ($pap_proc && $aoe_pap) { $pdfContent .= $aoe_pap; } else { - $pdfContent .= '' . $procedure['clinical_hx'] . ' '; + $pdfContent .= '' . text($procedure['clinical_hx']) . ' '; } $pdfContent .= ''; $pdfContent .= ''; @@ -309,10 +309,10 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $fasting = $procedure['specimen_fasting'] === 'YES' ? "YES" : "NO"; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Fasting:' . $fasting . '
Height (in):' . $vitals['height'] . '
Weight (lbs oz):' . $vitals['weight'] . '
Urine Total Volume (mls):' . $vitals['urine_total_volume'] . '
Fasting:' . text($fasting) . '
Height (in):' . text($vitals['height']) . '
Weight (lbs oz):' . text($vitals['weight']) . '
Urine Total Volume (mls):' . text($vitals['urine_total_volume']) . '
'; $pdfContent .= ''; $pdfContent .= ''; @@ -325,7 +325,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) if (!empty($allspecs)) { $specs = implode(',', $allspecs); } - $pdfContent .= 'Source:' . $specs . ''; + $pdfContent .= 'Source:' . text($specs) . ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; @@ -344,15 +344,15 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Race:' . $race[$patient['race']] . '
Hispanic:' . $hispanic . '
Blood Lead Type:' . implode(',', $allbltype) . '
Race:' . text($race[$patient['race']]) . '
Hispanic:' . text($hispanic) . '
Blood Lead Type:' . text(implode(',', $allbltype)) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Blood Lead Purpose:' . implode(',', $allblpurpose) . '
Blood Lead County:' . $patient['county'] . '
Blood Lead Purpose:' . text(implode(',', $allblpurpose)) . '
Blood Lead County:' . text($patient['county']) . '
'; $pdfContent .= ''; $pdfContent .= ''; @@ -365,25 +365,25 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= 'Diagnosis Codes:List all applicable Diagnosis codes. Must be at Highest Level Specificity.'; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[0]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[1]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[2]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[3]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[4]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[5]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[6]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[7]) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[0])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[1])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[2])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[3])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[4])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[5])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[6])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[7])) . ''; $pdfContent .= ''; if (!empty($all_diagnoses[8])) { $pdfContent .= ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[8]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[9]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[10]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[11]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[12]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[13]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[14]) . ''; - $pdfContent .= '' . str_replace('ICD10:', '', $all_diagnoses[15]) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[8])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[9])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[10])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[11])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[12])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[13])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[14])) . ''; + $pdfContent .= '' . text(str_replace('ICD10:', '', $all_diagnoses[15])) . ''; $pdfContent .= ''; } @@ -402,7 +402,7 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) } $pdfContent .= ''; $pdfContent .= 'Bill Type:'; - $pdfContent .= '' . $billtype . ''; + $pdfContent .= '' . text($billtype) . ''; $pdfContent .= 'LCA Ins Code:'; $pdfContent .= ' '; $pdfContent .= ''; @@ -415,53 +415,53 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; @@ -469,53 +469,53 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
' . $patient['lname'] . ', ' . $patient['fname'] . '
' . text($patient['lname']) . ', ' . text($patient['fname']) . '
' . $patient['dob'] . '' . $collection_date . '' . text($patient['dob']) . '' . text($collection_date) . '
' . $account . '' . $form_id . '' . text($account) . '' . text($form_id) . '
'; $pdfContent .= ''; @@ -538,15 +538,15 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
Account Number:' . $account . '' . text($account) . '
Req/Control#' . $form_id . '' . text($form_id) . '
Collection Date:' . $collection_date . '' . text($collection_date) . '
'; $pdfContent .= ''; @@ -554,15 +554,15 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= '
Patient Name:' . $patient['lname'] . ', ' . $patient['fname'] . '' . text($patient['lname']) . ', ' . text($patient['fname']) . '
Patient ID:' . $patient['pubpid'] . '' . text($patient['pubpid']) . '
Alt Pat ID:' . $patient['pid'] . '' . text($patient['pid']) . '
'; $pdfContent .= ''; @@ -578,11 +578,11 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
RP Name:' . $primary['subscriber_lname'] . ', ' . $primary['subscriber_fname'] . '
RP Address:' . $primary['subscriber_street'] . '
RP City, State Zip:' . $primary['subscriber_city'] . ', ' . $primary['subscriber_state'] . ' ' . $primary['subscriber_postal_code'] . '
RP Phone:' . $primary['subscriber_phone'] . '
RP Relation to Pt:' . $primary['subscriber_relationship'] . '
RP Name:' . text($primary['subscriber_lname']) . ', ' . text($primary['subscriber_fname']) . '
RP Address:' . text($primary['subscriber_street']) . '
RP City, State Zip:' . text($primary['subscriber_city']) . ', ' . text($primary['subscriber_state']) . ' ' . text($primary['subscriber_postal_code']) . '
RP Phone:' . text($primary['subscriber_phone']) . '
RP Relation to Pt:' . text($primary['subscriber_relationship']) . '
'; $pdfContent .= ''; $pdfContent .= ''; @@ -612,18 +612,18 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; $paddress = sqlQuery("SELECT * FROM addresses WHERE foreign_id=?", [$primary['id']]); - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= ''; if (!empty($primary['name'])) { $pprovider_id = $provider['id']; } - $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
LCA Ins Code: 
Ins Co Name:' . $primary['name'] . '
Ins Co Name:' . text($primary['name']) . '
Ins Address 1:' . $paddress['line1'] . '
Ins Address 2:' . $paddress['line2'] . '
Ins City, State Zip:' . $paddress['city'] . ', ' . $paddress['state'] . ' ' . $paddress['zip'] . '
Policy Number:' . $primary['policy_number'] . '
Group #:' . $primary['group_number'] . '
Ins Address 1:' . text($paddress['line1']) . '
Ins Address 2:' . text($paddress['line2']) . '
Ins City, State Zip:' . text($paddress['city']) . ', ' . text($paddress['state']) . ' ' . text($paddress['zip']) . '
Policy Number:' . text($primary['policy_number']) . '
Group #:' . text($primary['group_number']) . '
Emp/Group Name: 
Provider #:' . $pprovider_id . '
Provider #:' . text($pprovider_id) . '
'; $pdfContent .= ''; $pdfContent .= ''; @@ -631,17 +631,17 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $secondary = sqlQuery("SELECT i.*, ic.name, ic.id FROM insurance_data i join insurance_companies ic ON i.provider=ic.id WHERE i.pid=? and i.type='secondary' ORDER BY i.date DESC LIMIT 1", [$pid]); $pdfContent .= 'LCA Ins Code: '; $saddress = sqlQuery("SELECT * FROM addresses WHERE foreign_id=?", [$secondary['id']]); - $pdfContent .= 'Ins Co Name:' . $secondary['name'] . ''; - $pdfContent .= 'Ins Address 1:' . $saddress['line1'] . ''; - $pdfContent .= 'Ins Address 2:' . $saddress['line2'] . ''; - $pdfContent .= 'Ins City, State Zip:' . $saddress['city'] . ', ' . $saddress['state'] . ' ' . $saddress['zip'] . ''; - $pdfContent .= 'Policy Number:' . $secondary['policy_number'] . ''; - $pdfContent .= 'Group #:' . $secondary['group_number'] . ''; + $pdfContent .= 'Ins Co Name:' . text($secondary['name']) . ''; + $pdfContent .= 'Ins Address 1:' . text($saddress['line1']) . ''; + $pdfContent .= 'Ins Address 2:' . text($saddress['line2']) . ''; + $pdfContent .= 'Ins City, State Zip:' . text($saddress['city']) . ', ' . text($saddress['state']) . ' ' . text($saddress['zip']) . ''; + $pdfContent .= 'Policy Number:' . text($secondary['policy_number']) . ''; + $pdfContent .= 'Group #:' . text($secondary['group_number']) . ''; $pdfContent .= 'Emp/Group Name: '; if (!empty($secondary['name'])) { $sprovider_id = $provider['id']; } - $pdfContent .= 'Provider #:' . $sprovider_id . ''; + $pdfContent .= 'Provider #:' . text($sprovider_id) . ''; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; @@ -652,18 +652,18 @@ function ereqForm($pid, $encounter, $form_id, $reqStr = null, $doDoc = true) $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Insured Name:' . $primary['subscriber_lname'] . ', ' . $primary['subscriber_fname'] . '
Insured Address:' . $primary['subscriber_street'] . '
 ' . $primary['subscriber_city'] . ', ' . $primary['subscriber_state'] . ' ' . $primary['subscriber_postal_code'] . '
Insured Relation to Pt:' . $primary['subscriber_relationship'] . '
Insured Name:' . text($primary['subscriber_lname']) . ', ' . text($primary['subscriber_fname']) . '
Insured Address:' . text($primary['subscriber_street']) . '
 ' . text($primary['subscriber_city']) . ', ' . text($primary['subscriber_state']) . ' ' . text($primary['subscriber_postal_code']) . '
Insured Relation to Pt:' . text($primary['subscriber_relationship']) . '
'; $pdfContent .= ''; $pdfContent .= ''; $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; - $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; + $pdfContent .= ''; $pdfContent .= '
Insured Name:' . $secondary['subscriber_lname'] . ', ' . $secondary['subscriber_fname'] . '
Insured Address:' . $secondary['subscriber_street'] . '
 ' . $secondary['subscriber_city'] . ', ' . $secondary['subscriber_state'] . ' ' . $secondary['subscriber_postal_code'] . '
Insured Relation to Pt:' . $secondary['subscriber_relationship'] . '
Insured Name:' . text($secondary['subscriber_lname']) . ', ' . text($secondary['subscriber_fname']) . '
Insured Address:' . text($secondary['subscriber_street']) . '
 ' . text($secondary['subscriber_city']) . ', ' . text($secondary['subscriber_state']) . ' ' . text($secondary['subscriber_postal_code']) . '
Insured Relation to Pt:' . text($secondary['subscriber_relationship']) . '
'; $pdfContent .= ''; $pdfContent .= '';