From 3099786ced7fa12217e26133abea24e1d596c1ad Mon Sep 17 00:00:00 2001 From: Jerry Padgett Date: Mon, 3 Jun 2019 07:55:37 -0400 Subject: [PATCH] 270 Bug fixes (#2466) * eligibility batch fixes - now reports recurring appts - service date options - 271 batch upload fix - add appt date to 270 report - styled 270 report table * - weno validate fix - fix not authorized provider not display in encounter summary. * - fix for issue #2452 - add x12_dtp03 to database --- interface/patient_file/encounter/forms.php | 2 +- interface/reports/edi_270.php | 112 ++++++++++++++++++----------- interface/reports/edi_271.php | 20 ++++-- interface/weno/validate.php | 8 +-- library/classes/X12Partner.class.php | 21 ++++++ library/edi.inc | 93 ++++++++++++------------ library/patient.inc | 4 +- sql/5_0_1-to-5_0_2_upgrade.sql | 14 +++- sql/database.sql | 7 +- templates/x12_partners/general_edit.html | 12 +++- 10 files changed, 185 insertions(+), 108 deletions(-) diff --git a/interface/patient_file/encounter/forms.php b/interface/patient_file/encounter/forms.php index 7bc061a29..169cb082b 100644 --- a/interface/patient_file/encounter/forms.php +++ b/interface/patient_file/encounter/forms.php @@ -689,7 +689,7 @@ if ($StringEcho) { $dateres = getEncounterDateByEncounter($encounter); $encounter_date = date("Y-m-d", strtotime($dateres["date"])); $providerIDres = getProviderIdOfEncounter($encounter); -$providerNameRes = getProviderName($providerIDres); +$providerNameRes = getProviderName($providerIDres, false); ?>
diff --git a/interface/reports/edi_270.php b/interface/reports/edi_270.php index 402f8c0de..b50d6e278 100644 --- a/interface/reports/edi_270.php +++ b/interface/reports/edi_270.php @@ -26,6 +26,7 @@ require_once("$srcdir/patient.inc"); require_once "$srcdir/options.inc.php"; require_once("$srcdir/calendar.inc"); require_once("$srcdir/edi.inc"); +require_once("$srcdir/appointments.inc.php"); use OpenEMR\Core\Header; @@ -52,18 +53,19 @@ $exclude_policy = $_POST['removedrows'] ? $_POST['removedrows'] : ''; $x12_partner = $_POST['form_x12'] ? $_POST['form_x12'] : ''; $X12info = getX12Partner($x12_partner); +// grab appointments, sort by date and make unique to first upcoming appt by pid. +$appts = fetchAppointments($from_date, $to_date); +$appts = sortAppointments($appts); +$appts = unique_by_key($appts, 'pid'); +$ids = []; +foreach ($appts as $eid) { + $ids[] = $eid['pc_eid']; +} //Set up the sql variable binding array (this prevents sql-injection attacks) $sqlBindArray = array(); -$where = "e.pc_pid IS NOT NULL AND e.pc_eventDate >= ?"; -array_push($sqlBindArray, $from_date); - -//$where .="and e.pc_eventDate = (select max(pc_eventDate) from openemr_postcalendar_events where pc_aid = d.id)"; - -if ($to_date) { - $where .= " AND e.pc_eventDate <= ?"; - array_push($sqlBindArray, $to_date); -} +$ids = count($ids) > 0 ? implode(',', $ids) : "'0'"; +$where = "e.pc_eid in($ids) "; if ($form_facility != "") { $where .= " AND f.id = ? "; @@ -81,40 +83,39 @@ if ($exclude_policy != "") { $exclude_policy = implode(",", $arrayExplode); $where .= " AND i.policy_number NOT IN ($exclude_policy)"; } - $where .= " AND (i.policy_number is NOT NULL AND i.policy_number != '')"; $where .= " GROUP BY p.pid ORDER BY c.name"; - $query = sprintf("SELECT DATE_FORMAT(e.pc_eventDate, '%%Y%%m%%d') as pc_eventDate, - e.pc_facility, - p.lname, - p.fname, - p.mname, - DATE_FORMAT(p.dob, '%%Y%%m%%d') as dob, - p.ss, - p.sex, - p.pid, - p.pubpid, - i.subscriber_ss, - i.policy_number, - i.provider as payer_id, - i.subscriber_relationship, - i.subscriber_lname, - i.subscriber_fname, - i.subscriber_mname, - DATE_FORMAT(i.subscriber_dob, '%%Y%%m%%d') as subscriber_dob, - i.policy_number, - i.subscriber_sex, - DATE_FORMAT(i.date,'%%Y%%m%%d') as date, - d.lname as provider_lname, - d.fname as provider_fname, - d.npi as provider_npi, - d.upin as provider_pin, - f.federal_ein as federal_ein, - f.facility_npi as facility_npi, - f.name as facility_name, - c.cms_id as cms_id, - c.eligibility_id as eligibility_id, - c.name as payer_name + $query = sprintf("SELECT e.pc_facility, + e.pc_eid, + p.lname, + p.fname, + p.mname, + DATE_FORMAT(p.dob, '%%Y%%m%%d') as dob, + p.ss, + p.sex, + p.pid, + p.pubpid, + i.subscriber_ss, + i.policy_number, + i.provider as payer_id, + i.subscriber_relationship, + i.subscriber_lname, + i.subscriber_fname, + i.subscriber_mname, + DATE_FORMAT(i.subscriber_dob, '%%Y%%m%%d') as subscriber_dob, + i.policy_number, + i.subscriber_sex, + DATE_FORMAT(i.date,'%%Y%%m%%d') as date, + d.lname as provider_lname, + d.fname as provider_fname, + d.npi as provider_npi, + d.upin as provider_pin, + f.federal_ein as federal_ein, + f.facility_npi as facility_npi, + f.name as facility_name, + c.cms_id as cms_id, + c.eligibility_id as eligibility_id, + c.name as payer_name FROM openemr_postcalendar_events AS e LEFT JOIN users AS d on (e.pc_aid is not null and e.pc_aid = d.id) LEFT JOIN facility AS f on (f.id = e.pc_facility) @@ -124,8 +125,16 @@ if ($exclude_policy != "") { WHERE %s ", $where); // Run the query - $res = sqlStatement($query, $sqlBindArray); - + $rslt = sqlStatement($query, $sqlBindArray); + $res = []; + while ($row = sqlFetchArray($rslt)) { + foreach ($appts as $tmp) { + if ((int)$tmp['pc_eid'] === (int)$row['pc_eid']) { + $row['pc_eventDate'] = date("Ymd", strtotime($tmp['pc_eventDate'])); + } + } + $res[] = $row; + } // Get the facilities information $facilities = getUserFacilities($_SESSION['authId']); @@ -172,6 +181,23 @@ if ($exclude_policy != "") { print_elig($res, $X12info, $segTer, $compEleSep); exit; } + +// unique multidimensional array by key + function unique_by_key($source, $key) + { + $i = 0; + $rtn_array = array(); + $key_array = array(); + + foreach ($source as $val) { + if (!in_array($val[$key], $key_array)) { + $key_array[$i] = $val[$key]; + $rtn_array[$i] = $val; + } + $i++; + } + return $rtn_array; + } ?> diff --git a/interface/reports/edi_271.php b/interface/reports/edi_271.php index 7796710a8..320acb35e 100644 --- a/interface/reports/edi_271.php +++ b/interface/reports/edi_271.php @@ -29,7 +29,7 @@ if (!empty($_POST)) { } // File location (URL or server path) -$target = $GLOBALS['edi_271_file_path']; +$target = $GLOBALS['edi_271_file_path']; $batch_log = ''; if (isset($_FILES) && !empty($_FILES)) { @@ -38,14 +38,22 @@ if (isset($_FILES) && !empty($_FILES)) { if ($_FILES['uploaded']['size'] > 350000) { $message .= xlt('Your file is too large')."
"; } - if ($_FILES['uploaded']['type']!="text/plain") { + if ($_FILES['uploaded']['type'] != "text/plain") { $message .= xlt('You may only upload .txt files')."
"; } if (!isset($message)) { - $file_location = move_uploaded_file($_FILES['uploaded']['tmp_name'], $target); - $message = xlt('The following EDI file has been uploaded') . ': "' . text(basename($_FILES['uploaded']['name'])) . '"'; - $Response271 = file($_FILES['uploaded']['tmp_name']); - $batch_log = parseEdi271($Response271); + $file_moved = move_uploaded_file($_FILES['uploaded']['tmp_name'], $target); + if ($file_moved) { + $message = xlt('The following EDI file has been uploaded') . ': "' . text(basename($_FILES['uploaded']['name'])) . '"'; + $Response271 = file($target); + if ($Response271) { + $batch_log = parseEdi271($Response271); + } else { + $message = xlt('The following EDI file upload failed to open') . ': "' . text(basename($_FILES['uploaded']['name'])) . '"'; + } + } else { + $message = xlt('The following EDI file failed save to archive') . ': "' . text(basename($_FILES['uploaded']['name'])) . '"'; + } } else { $message .= xlt('Sorry, there was a problem uploading your file') . "

"; } diff --git a/interface/weno/validate.php b/interface/weno/validate.php index 965c45678..e9b1c0f06 100644 --- a/interface/weno/validate.php +++ b/interface/weno/validate.php @@ -66,13 +66,13 @@ if (empty($pharmacy['name'])) { exit; } $ncpdpLength = strlen($pharmacy['ncpdp']); -if (empty($pharmacy['ncpdp']) || $ncpdpLength < 10) { - print xlt("Pharmacy missing NCPDP ID or less than 10 digits"). "
"; +if (empty($pharmacy['ncpdp']) || $ncpdpLength < 7) { + print xlt("Pharmacy missing NCPDP ID or less than 7 digits"). "
"; exit; } $npiLength = strlen($pharmacy['npi']); -if (empty($pharmacy['npi'] || $npiLength < 7)) { - print xlt("Pharmacy missing NPI or less than 7 digits"). "
"; +if (empty($pharmacy['npi'] || $npiLength < 10)) { + print xlt("Pharmacy missing NPI or less than 10 digits"). "
"; exit; } //validate NPI exist diff --git a/library/classes/X12Partner.class.php b/library/classes/X12Partner.class.php index 9750a3e71..b463cabfa 100644 --- a/library/classes/X12Partner.class.php +++ b/library/classes/X12Partner.class.php @@ -22,6 +22,7 @@ class X12Partner extends ORDataObject var $x12_isa14; // Acknowledgment Requested. 0 = No, 1 = Yes. var $x12_isa15; // Usage Indicator. T = testing, P = production. var $x12_gs02; // Application Sender's Code. Default to ISA06. + var $x12_dtp03; // 270 2100C DTP03 service date for eligibility. var $x12_per06; // The submitter's EDI Access Number, if any. var $x12_version; var $processing_format; @@ -45,6 +46,7 @@ class X12Partner extends ORDataObject $this->x12_isa05 = "ZZ"; $this->x12_isa07 = "ZZ"; $this->x12_isa14 = "0"; + $this->x12_dtp03 = "A"; if ($id != "") { $this->populate(); } @@ -216,6 +218,16 @@ class X12Partner extends ORDataObject $this->x12_gs02 = $string; } + function get_x12_dtp03() + { + return $this->x12_dtp03; + } + + function set_x12_dtp03($string) + { + $this->x12_dtp03 = $string; + } + function get_x12_per06() { return $this->x12_per06; @@ -296,4 +308,13 @@ class X12Partner extends ORDataObject '004010X098A1' => '004010X098A1', ); } + + function get_x12_dtp03_type_array() + { + return array( + 'C' => 'Current Date', + 'A' => 'Appointment Date', + 'E' => 'Subscriber Effective Date', + ); + } } diff --git a/library/edi.inc b/library/edi.inc index 543727bcd..e787c29e9 100644 --- a/library/edi.inc +++ b/library/edi.inc @@ -132,8 +132,8 @@ function create_HL($row, $nHlCounter, $X12info, $segTer, $compEleSep) // NM1 Segment - EDI-270 format function create_NM1($row, $nm1Cast, $X12info, $segTer, $compEleSep) { - $NM1 = array(); - $NM1[0] = "NM1"; // Subscriber Name Segment ID + $NM1 = array(); + $NM1[0] = "NM1"; // Subscriber Name Segment ID if ($nm1Cast == 'PR') { $NM1[1] = "PR"; // Entity ID Code - Payer [PR Payer] $NM1[2] = "2"; // Entity Type - Non-Person @@ -233,9 +233,19 @@ function create_DTP($row, $qual, $X12info, $segTer, $compEleSep) $DTP[1] = $qual; // Qualifier - Date of Service $DTP[2] = "D8"; // Date Format Qualifier - (D8 means CCYYMMDD) if ($qual == '102') { - $DTP[3] = $row['date']; // Date + $DTP[3] = $row['date']; // Ins effective Date } else { - $DTP[3] = !empty($row['pc_eventDate']) && $row['pc_eventDate'] > '20010101' ? $row['pc_eventDate'] : date("Ymd"); // Date of Service + switch ($X12info['x12_dtp03']) { + case 'A': + $dtp_date = !empty($row['pc_eventDate']) && $row['pc_eventDate'] > '20010101' ? $row['pc_eventDate'] : date("Ymd"); + break; + case 'E': + $dtp_date = !empty($row['date']) && $row['date'] > '20010101' ? $row['date'] : date("Ymd"); + break; + default: + $dtp_date = date("Ymd"); + } + $DTP[3] = $dtp_date; // Date of Service } $DTP['Created'] = implode('*', $DTP); // Data Element Separator $DTP['Created'] = $DTP['Created'] . $segTer; @@ -310,7 +320,7 @@ function print_elig($res, $X12info, $segTer, $compEleSep) $rowCount = 0; $trcNo = 1234501; $refiden = 5432101; - while ($row = sqlFetchArray($res)) { + foreach ($res as $row) { if ($nHlCounter == 1) { // create ISA $PATEDI = create_ISA($row, $X12info, $segTer, $compEleSep); @@ -327,7 +337,7 @@ function print_elig($res, $X12info, $segTer, $compEleSep) $PATEDI .= create_HL($row, 2, $X12info, $segTer, $compEleSep); $PATEDI .= create_NM1($row, '1P', $X12info, $segTer, $compEleSep); // 5010 no longer uses FA $nHlCounter = $nHlCounter + 2; - $segmentcount = 6; // segement counts - start from ST + $segmentcount = 6; // segment counts - start from ST } // For Subscriber Segment $PATEDI .= create_HL($row, $nHlCounter, $X12info, $segTer, $compEleSep); @@ -342,7 +352,7 @@ function print_elig($res, $X12info, $segTer, $compEleSep) $rowCount = $rowCount + 1; $trcNo = $trcNo + 1; $refiden = $refiden + 1; - if ($rowCount == sqlNumRows($res)) { + if ($rowCount == count($res)) { $segmentcount = $segmentcount + 1; $PATEDI .= create_SE($row, $segmentcount, $X12info, $segTer, $compEleSep); $PATEDI .= create_GE($row, $X12info, $segTer, $compEleSep); @@ -412,9 +422,9 @@ function requestEligibleTransaction($pid = 0, $eFlag = false) function requestRealTimeEligible($res, $X12info, $segTer, $compEleSep, $eFlag = false) { $rowCount = 0; - $totalCount = sqlNumRows($res); + $totalCount = count($res); $down_accum = $log = $error_accum = ''; - while ($row = sqlFetchArray($res)) { + foreach ($res as $row) { if (!$X12info) { $X12info = getX12Partner($row['partner']); } @@ -487,30 +497,24 @@ function show_elig($res, $X12info, $segTer, $compEleSep) $i=0; echo "
- +
- - - - - - - - - + + + + + + + + + + - - "; + "; - while ($row = sqlFetchArray($res)) { + foreach ($res as $row) { $i= $i+1; - - if ($i%2 == 0) { - $background = '#FFF'; - } else { - $background = '#FFF'; - } - + // what the heck is below for... looks abandoned. $elig = array(); $elig[0] = $row['facility_name']; // Inquiring Provider Name calendadr $elig[1] = $row['facility_npi']; // Inquiring Provider NPI @@ -532,27 +536,28 @@ function show_elig($res, $X12info, $segTer, $compEleSep) $elig[17] = "30"; // Service Type $elig[18] = $row['pubpid']; // Patient Account Number pubpid - echo " - - - - - - - - - + + + + + + + + + + "; - unset($elig); + unset($elig); // see .. } if ($i==0) { echo " "; } @@ -608,8 +613,8 @@ function show_eligibility_information($pid, $flag = false) } $showString .= "\n
\n"; $showString .= !empty($benefit['benefit_type']) ? "" . xlt('Benefit Type') . ": " . text($benefit['benefit_type']) . "
\n" : ''; - $showString .= !empty($benefit['start_date']) ? "" . xlt('Start Date') . ": " . text(date("d/m/Y", strtotime($benefit['start_date']))) . "
\n" : ''; - $showString .= !empty($benefit['end_date']) ? "" . xlt('End Date') . ": " . text(date("d/m/Y", strtotime($benefit['end_date']))) . "
\n" : ''; + $showString .= !empty($benefit['start_date']) ? "" . xlt('Start Date') . ": " . text(date("m/d/Y", strtotime($benefit['start_date']))) . "
\n" : ''; + $showString .= !empty($benefit['end_date']) ? "" . xlt('End Date') . ": " . text(date("m/d/Y", strtotime($benefit['end_date']))) . "
\n" : ''; $showString .= !empty($benefit['coverage_level']) ? "" . xlt('Coverage Level') . ": " .text($benefit['coverage_level']) . "
\n" : ''; $showString .= !empty($benefit['coverage_type']) ? "" . xlt('Coverage Type') . ": " . text($benefit['coverage_type']) . "
\n" : ''; $showString .= !empty($benefit['plan_type']) ? "" . xlt('Plan Type') . ": " . text($benefit['plan_type']) . "
\n" : ''; diff --git a/library/patient.inc b/library/patient.inc index a4946372a..b6bc2ac6b 100644 --- a/library/patient.inc +++ b/library/patient.inc @@ -386,9 +386,9 @@ function getCalendarProviderInfo($providerID = "%", $providers_only = true) return $returnval; } -function getProviderName($providerID) +function getProviderName($providerID, $provider_only = 'any') { - $pi = getProviderInfo($providerID, 'any'); + $pi = getProviderInfo($providerID, $provider_only); if (strlen($pi[0]["lname"]) > 0) { if (strlen($pi[0]["suffix"]) > 0) { $pi[0]["lname"] .= ", ".$pi[0]["suffix"]; diff --git a/sql/5_0_1-to-5_0_2_upgrade.sql b/sql/5_0_1-to-5_0_2_upgrade.sql index a65dccf8b..188f0fa21 100644 --- a/sql/5_0_1-to-5_0_2_upgrade.sql +++ b/sql/5_0_1-to-5_0_2_upgrade.sql @@ -607,7 +607,7 @@ INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_re #EndIf #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2018-10-01 load_filename 2019-ICD-10-PCS-Order-File.zip INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2018-10-01', '2019-ICD-10-PCS-Order-File.zip', 'eb545fe61ada9efad0ad97a669f8671f'); -#Endif +#EndIf #IfNotTable login_mfa_registrations CREATE TABLE `login_mfa_registrations` ( @@ -853,14 +853,22 @@ DROP TABLE `eligibility_response`; ALTER TABLE `x12_partners` CHANGE `processing_format` `processing_format` ENUM('standard','medi-cal','cms','proxymed','oa-eligibility','avality-eligibility') DEFAULT NULL; #EndIf -#IfMissingColumn eligibility_id insurance_companies +#IfMissingColumn insurance_companies eligibility_id ALTER TABLE `insurance_companies` ADD `eligibility_id` VARCHAR(32) DEFAULT NULL; #EndIf -#IfMissingColumn x12_default_eligibility_id insurance_companies +#IfMissingColumn insurance_companies x12_default_eligibility_id ALTER TABLE `insurance_companies` ADD `x12_default_eligibility_id` INT(11) DEFAULT NULL; #EndIf #IfMissingColumn users_secure login_fail_counter ALTER TABLE `users_secure` ADD `login_fail_counter` INT(11) DEFAULT '0'; #EndIf + +#IfMissingColumn x12_partners x12_dtp03 +ALTER TABLE `x12_partners` ADD `x12_dtp03` CHAR(1) DEFAULT 'A'; +#EndIf + +#IfMissingColumn procedure_order order_diagnosis +ALTER TABLE `procedure_order` ADD `order_diagnosis` VARCHAR(255) DEFAULT ''; +#EndIf diff --git a/sql/database.sql b/sql/database.sql index 0611756e1..b65d87258 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -7249,7 +7249,7 @@ CREATE TABLE `x12_partners` ( `x12_isa15` char(1) NOT NULL DEFAULT 'P', `x12_gs02` varchar(15) NOT NULL DEFAULT '', `x12_per06` varchar(80) NOT NULL DEFAULT '', - `x12_gs03` varchar(15) NOT NULL DEFAULT '', + `x12_dtp03` char(1) NOT NULL DEFAULT 'A', PRIMARY KEY (`id`) ) ENGINE=InnoDB; @@ -7569,8 +7569,9 @@ CREATE TABLE `procedure_order` ( `specimen_volume` varchar(30) NOT NULL DEFAULT '' COMMENT 'from a text input field', `date_transmitted` datetime DEFAULT NULL COMMENT 'time of order transmission, null if unsent', `clinical_hx` varchar(255) NOT NULL DEFAULT '' COMMENT 'clinical history text that may be relevant to the order', - `external_id` VARCHAR(20) DEFAULT NULL, - `history_order` enum('0','1') DEFAULT '0' COMMENT 'references order is added for history purpose only.', + `external_id` varchar(20) DEFAULT NULL, + `history_order` enum('0','1') DEFAULT '0' COMMENT 'references order is added for history purpose only.', + `order_diagnosis` varchar(255) DEFAULT '' COMMENT 'primary order diagnosis', PRIMARY KEY (`procedure_order_id`), KEY datepid (date_ordered, patient_id), KEY `patient_id` (`patient_id`) diff --git a/templates/x12_partners/general_edit.html b/templates/x12_partners/general_edit.html index 06546030c..31c2f574c 100644 --- a/templates/x12_partners/general_edit.html +++ b/templates/x12_partners/general_edit.html @@ -1,5 +1,5 @@ {** - * Pharmacy edit + * X12 Partner edit * * @package OpenEMR * @link http://www.open-emr.org @@ -95,6 +95,14 @@
+ +
+ +
+
+
@@ -111,7 +119,7 @@
- {html_options options=$partner->get_processing_format_array() selected=$partner->get_processing_format()}
-- 2.11.4.GIT
". htmlspecialchars(xl('Facility Name'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('Facility NPI'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('Insurance Comp'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('Policy No'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('Patient Name'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('DOB'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('Gender'), ENT_NOQUOTES) ." ". htmlspecialchars(xl('SSN'), ENT_NOQUOTES) ."   ". text(xl('Facility Name')) ."". text(xl('Facility NPI')) ."". text(xl('Insurance Comp')) ."". text(xl('Appt Date')) ."". text(xl('Policy No')) ."". text(xl('Patient Name')) ."". text(xl('DOB')) ."". text(xl('Gender')) ."". text(xl('SSN')) ."  
". htmlspecialchars($row['facility_name'], ENT_NOQUOTES) ."". htmlspecialchars($row['facility_npi'], ENT_NOQUOTES) ."". htmlspecialchars($row['payer_name'], ENT_NOQUOTES) ."". htmlspecialchars($row['policy_number'], ENT_NOQUOTES) ."". htmlspecialchars($row['subscriber_lname']." ".$row['subscriber_fname'], ENT_NOQUOTES) ."". htmlspecialchars($row['subscriber_dob'], ENT_NOQUOTES) ."". htmlspecialchars($row['subscriber_sex'], ENT_NOQUOTES) ."". htmlspecialchars($row['subscriber_ss'], ENT_NOQUOTES) ." - + echo "
". text($row['facility_name']) ."". text($row['facility_npi']) ."". text($row['payer_name']) ."". text(date("m/d/Y", strtotime($row['pc_eventDate']))) ."". text($row['policy_number']) ."". text($row['subscriber_lname']." ". $row['subscriber_fname']) ."". text($row['subscriber_dob']) ."". text($row['subscriber_sex']) ."". text($row['subscriber_ss']) ." +
-
". htmlspecialchars(xl('No records found'), ENT_NOQUOTES) . "
+
". text(xl('No records found')) . "