From cae13030174fc75b5e509f070854ccb6b7f8d151 Mon Sep 17 00:00:00 2001 From: bradymiller Date: Fri, 15 Oct 2010 06:16:19 +0000 Subject: [PATCH] Billing screen encounter pull down bug fix. Contributed by zhhealthcare. --- interface/billing/billing_report.php | 43 ++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/interface/billing/billing_report.php b/interface/billing/billing_report.php index ccadf142e..741ae064f 100644 --- a/interface/billing/billing_report.php +++ b/interface/billing/billing_report.php @@ -172,10 +172,11 @@ function toencounter(pid, pubpid, pname, enc, datestr, dobstr) { } -function topatient(pid) { +function topatient(pid, pubpid, pname, enc, datestr, dobstr) { top.restoreSession(); var othername = (window.name == 'RTop') ? 'RBot' : 'RTop'; + parent.left_nav.setPatient(pname,pid,pubpid,'',dobstr); parent.frames[othername].location.href = '../patient_file/summary/demographics_full.php?pid=' + pid; @@ -183,6 +184,9 @@ function topatient(pid) { } +EncounterDateArray=new Array; +CalendarCategoryArray=new Array; +EncounterIdArray=new Array; @@ -543,6 +547,30 @@ if ($ret = getBillsBetween($from_date, $lhtml .= " $ptname" . " (" . $iter['enc_pid'] . "-" . $iter['enc_encounter'] . ")"; + + //Encounter details are stored to javacript as array. + $result4 = sqlStatement("SELECT fe.encounter,fe.date,openemr_postcalendar_categories.pc_catname FROM form_encounter AS fe ". + " left join openemr_postcalendar_categories on fe.pc_catid=openemr_postcalendar_categories.pc_catid WHERE fe.pid = '".$iter['enc_pid']."' order by fe.date desc"); + if(sqlNumRows($result4)>0) + ?> + + [" . + xl('DOB') . ": " . oeFormatShortDate($name['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAge($name['DOB_YMD']) . "'); + top.window.parent.left_nav.setPatientEncounter(EncounterIdArray[" . $iter['enc_pid'] . "],EncounterDateArray[" . $iter['enc_pid'] . + "], CalendarCategoryArray[" . $iter['enc_pid'] . "])\">[" . xl('To Enctr') . " " . oeFormatShortDate($raw_encounter_date) . "]"; - + // Changed "To xxx" buttons to allow room for encounter date display 2/17/09 JCH $lhtml .= "   [" . xl('To Dems') . "]"; + ",'" . addslashes($name['pubpid']) . + "','" . addslashes($ptname) . "'," . $iter['enc_encounter'] . + ",'" . oeFormatShortDate($raw_encounter_date) . "',' " . + xl('DOB') . ": " . oeFormatShortDate($name['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAge($name['DOB_YMD']) . "'); + top.window.parent.left_nav.setPatientEncounter(EncounterIdArray[" . $iter['enc_pid'] . "],EncounterDateArray[" . $iter['enc_pid'] . + "], CalendarCategoryArray[" . $iter['enc_pid'] . "])\">[" . xl('To Dems') . "]"; if ($iter['id']) { -- 2.11.4.GIT