From 51aafbc75412d24cfedc209c5456f87be4207a51 Mon Sep 17 00:00:00 2001 From: Kevin McCormick Date: Fri, 12 Oct 2012 16:49:34 -0500 Subject: [PATCH] edihistory -- documentation/comment/log edits --- library/edihistory/csv_record_include.php | 3 ++- library/edihistory/ibr_batch_read.php | 4 ++-- library/edihistory/ibr_ebr_read.php | 23 ++++++++++------------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/library/edihistory/csv_record_include.php b/library/edihistory/csv_record_include.php index 66c1c93a3..19fbe6908 100644 --- a/library/edihistory/csv_record_include.php +++ b/library/edihistory/csv_record_include.php @@ -610,7 +610,8 @@ function csv_processed_files_list ($type) { csv_edihist_log ("csv_list_processed_files: failed to access $csv_file" ); return false; } - // + // consider array_shift($processed_files) to drop the header row (too slow) + // consider array_unique($processed_files) becasue files may be listed several times return $processed_files; } // end function diff --git a/library/edihistory/ibr_batch_read.php b/library/edihistory/ibr_batch_read.php index 1f1021b1a..7d1076bd8 100644 --- a/library/edihistory/ibr_batch_read.php +++ b/library/edihistory/ibr_batch_read.php @@ -590,7 +590,7 @@ function ibr_batch_get_st_info ($st_num, $batchname='', $pidenctr='') { // if (!$stnum) { // error - st number not supplied - csv_edihist_log("ibr_batch_find_claim_enctr: ST number not supplied"); + csv_edihist_log("ibr_batch_get_st_info: ST number not supplied"); return FALSE; } if (strlen($stnum) == 13) { @@ -616,7 +616,7 @@ function ibr_batch_get_st_info ($st_num, $batchname='', $pidenctr='') { $batch_name = basename($fp); } else { // unable to get the file, quit here - csv_edihist_log("ibr_batch_find_claim_enctr: could not read batch file"); + csv_edihist_log("ibr_batch_get_st_info: could not read batch file"); return FALSE; } diff --git a/library/edihistory/ibr_ebr_read.php b/library/edihistory/ibr_ebr_read.php index 8a883f176..03ba44b0c 100644 --- a/library/edihistory/ibr_ebr_read.php +++ b/library/edihistory/ibr_ebr_read.php @@ -663,7 +663,7 @@ function ibr_ebr_values($file_path) { // foreach($ar_ebr as $ln) { // - if (strval($ln[0]) == '1') { + if (strval($ln[0]) === '1') { //['ibr']['file'] = array('Date', 'FileName', 'clrhsid', 'claim_ct', 'reject_ct', 'Batch'); $b++; $c = -1; @@ -860,7 +860,7 @@ function ibr_ibr_values($file_path) { // foreach($ar_ibr as $ln) { // - if (strval($ln[0]) == '1') { + if (strval($ln[0]) === '1') { //['ibr']['file'] = array('Date', 'FileName', 'clrhsid', 'claim_ct', 'reject_ct', 'Batch'); $b++; $c = -1; @@ -942,8 +942,7 @@ function ibr_ibr_values($file_path) { */ function ibr_ebr_html ($ar_data, $err_only=false) { // create an html string for a table to display in a web page - //$ar_hd = $ar_data['head']; - //$ar_cd = $ar_data['claims']; + // $idx = 0; $idf = 0; $has3 = false; @@ -1005,11 +1004,8 @@ function ibr_ebr_html ($ar_data, $err_only=false) { {$ar_hd['f_name']} Text {$ar_hd['batch']} {$ar_hd['clm_ct']} - {$ar_hd['clm_rej']} -  " .PHP_EOL; + {$ar_hd['clm_rej']}".PHP_EOL; $str_html .= "" .PHP_EOL; - //{$ar_hd['ft_name']} - // now the individual claims details //['pt_name'] ['svcdate']['clm01']['status']['batch']['filename']['payer'] ['providerid']['bht03']['payerid'] if ($ar_cd) { @@ -1141,7 +1137,7 @@ function ibr_ebr_process_new_files($files_ar=NULL, $extension='ibr', $html_out=T // if ( count($f_new) == 0 ) { if($html_out) { - $html_str .= "

ibr_ebr_process_new: no new $extension files
"; + $html_str .= "

IBR/EBR files: no new $extension files
"; return $html_str; } else { return false; @@ -1161,12 +1157,12 @@ function ibr_ebr_process_new_files($files_ar=NULL, $extension='ibr', $html_out=T $fibrcount = count($f_list); // // initialize variables - $ar_htm = array(); $data_ar = array(); $wf = array(); $wc = array(); $chrf = 0; $chrc = 0; + $idx = 0; // // sort ascending so latest files are last to be output $is_sort = asort($f_list); // returns true on success @@ -1198,7 +1194,9 @@ function ibr_ebr_process_new_files($files_ar=NULL, $extension='ibr', $html_out=T // array for csv $wc[] = ibr_ebr_csv_claims($cl); } - //$data_ar[] = $dm; + $data_ar[$idx]['file'] = $dm['file']; + $data_ar[$idx]['claims'] = $dm['claims']; + $idx++; } } } @@ -1207,8 +1205,7 @@ function ibr_ebr_process_new_files($files_ar=NULL, $extension='ibr', $html_out=T $chrc += csv_write_record($wc, $extension, "claim"); // if ($html_out) { - //$html_str .= ibr_ebr_html ($data_ar, $err_only); - $html_str .= ibr_ebr_html ($data_vals, $err_only); + $html_str .= ibr_ebr_html ($data_ar, $err_only); } else { $html_str .= "IBR/EBR files: processed $fibrcount $extension files
".PHP_EOL; } -- 2.11.4.GIT