From d3d4dbc3ce544a0942da1909cc64fd7fc237c16b Mon Sep 17 00:00:00 2001 From: tmccormi Date: Fri, 2 Mar 2012 16:25:52 -0800 Subject: [PATCH] Catg from Appt passes to New Encounter when autocreate is on --- interface/main/calendar/add_edit_event.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/interface/main/calendar/add_edit_event.php b/interface/main/calendar/add_edit_event.php index 41a4fb284..2e73e96a9 100644 --- a/interface/main/calendar/add_edit_event.php +++ b/interface/main/calendar/add_edit_event.php @@ -161,27 +161,29 @@ function DOBandEncounter() $username = $tmprow['username']; $facility = $tmprow['facility']; // $facility_id = $tmprow['facility_id']; - // use the session facility if it is set, otherwise the one from the provider. $facility_id = $_SESSION['pc_facility'] ? $_SESSION['pc_facility'] : $tmprow['facility_id']; $conn = $GLOBALS['adodb']['db']; $encounter = $conn->GenID("sequences"); + addForm($encounter, "New Patient Encounter", sqlInsert("INSERT INTO form_encounter SET " . "date = '$event_date', " . "onset_date = '$event_date', " . "reason = '" . formData("form_comments") . "', " . "facility = '$facility', " . - // "facility_id = '$facility_id', " . "facility_id = '" . (int)$_POST['facility'] . "', " . "billing_facility = '" . (int)$_POST['billing_facility'] . "', " . "provider_id = '" . (int)$_POST['form_provider'] . "', " . "pid = '" . $_POST['form_pid'] . "', " . - "encounter = '$encounter'" + "encounter = '$encounter', " . + "pc_catid = '" . $_POST['form_category'] . "'" ), "newpatient", $_POST['form_pid'], "1", "NOW()", $username ); - $info_msg .= "New encounter $encounter was created. "; - } + $info_msg .= xl("New encounter created with id"); + $info_msg .= " $encounter"; + } + } } //================================================================================================================ -- 2.11.4.GIT