From 4b01436f7c0c38b017166a085efbc642802c35cc Mon Sep 17 00:00:00 2001
From: Rod Roark
Date: Mon, 22 Nov 2010 15:49:24 -0800
Subject: [PATCH] Fixes for switching encounters
This fixes a couple of bugs where switching to a new encounter fails
to properly record that fact into the left_nav frame, with the
result that subsequent encounter switches will not cause frames having
information from the old encounter to be refreshed.
Also a button was added to the payment receipt display to allow
switching to the current day's emcounter.
---
interface/forms/newpatient/save.php | 10 ++++---
interface/patient_file/front_payment.php | 43 ++++++++++++++++++++++++---
interface/patient_file/history/encounters.php | 2 +-
3 files changed, 46 insertions(+), 9 deletions(-)
diff --git a/interface/forms/newpatient/save.php b/interface/forms/newpatient/save.php
index a8f9ef4b3..49edfcea0 100644
--- a/interface/forms/newpatient/save.php
+++ b/interface/forms/newpatient/save.php
@@ -31,7 +31,7 @@ $mode = $_POST['mode'];
$referral_source = $_POST['form_referral_source'];
if ($GLOBALS['concurrent_layout'])
- $normalurl = "$rootdir/patient_file/encounter/encounter_top.php";
+ $normalurl = "patient_file/encounter/encounter_top.php";
else
$normalurl = "$rootdir/patient_file/encounter/patient_encounter.php";
@@ -113,7 +113,7 @@ if ($mode == 'new' && $GLOBALS['default_new_encounter_form'] == 'football_injury
"lists.title NOT LIKE '%Illness%'");
if (mysql_num_rows($lres)) {
- $nexturl = "$rootdir/patient_file/encounter/load_form.php?formname=" .
+ $nexturl = "patient_file/encounter/load_form.php?formname=" .
$GLOBALS['default_new_encounter_form'];
while ($lrow = sqlFetchArray($lres)) {
$frow = sqlQuery("SELECT count(*) AS count " .
@@ -153,12 +153,14 @@ $result4 = sqlStatement("SELECT fe.encounter,fe.date,openemr_postcalendar_catego
?>
top.window.parent.left_nav.setPatientEncounter(EncounterIdArray,EncounterDateArray,CalendarCategoryArray);
+ top.restoreSession();
parent.left_nav.setEncounter();
parent.left_nav.setRadio(window.name, 'enc');
-
- top.restoreSession();
+ parent.left_nav.loadFrame('enc2', window.name, '');
+
window.location="";
+
@@ -356,6 +382,15 @@ if ($_POST['form_save'] || $_REQUEST['receipt']) {