From 72db31d144f97939e83e23fd3a6d9a1c710a3de5 Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Sun, 10 Mar 2013 20:43:58 -0700 Subject: [PATCH] Fixed multiple bugs in linking patient notes to documents. --- interface/patient_file/summary/pnotes_full.php | 41 ++++++++++++---------- interface/patient_file/summary/pnotes_full_add.php | 19 +++++----- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/interface/patient_file/summary/pnotes_full.php b/interface/patient_file/summary/pnotes_full.php index cfa3726ea..b952d3062 100644 --- a/interface/patient_file/summary/pnotes_full.php +++ b/interface/patient_file/summary/pnotes_full.php @@ -111,15 +111,17 @@ if (isset($mode)) { } elseif ($mode == "new") { $note = $_POST['note']; - if ($noteid) { updatePnote($noteid, $note, $_POST['form_note_type'], $_POST['assigned_to']); - $noteid = ''; } else { - addPnote($pid, $note, $userauthorized, '1', $_POST['form_note_type'], - $_POST['assigned_to']); + $noteid = addPnote($pid, $note, $userauthorized, '1', + $_POST['form_note_type'], $_POST['assigned_to']); } + if ($docid) { + setGpRelation(1, $docid, 6, $noteid); + } + $noteid = ''; } elseif ($mode == "delete") { if ($noteid) { @@ -202,16 +204,24 @@ function show_div(name){
+get_url_file(); +} +?>
- +
 
- + class="css_button" onclick="top.restoreSession()"> @@ -222,30 +232,22 @@ function show_div(name){ - + | - + | - +
- get_url_file(); - } - ?> @@ -319,7 +321,7 @@ if ($billing_note) { | - + @@ -462,7 +464,8 @@ if ($result_count == $N) { - + diff --git a/interface/patient_file/summary/pnotes_full_add.php b/interface/patient_file/summary/pnotes_full_add.php index d503e7af8..e6ba8866a 100644 --- a/interface/patient_file/summary/pnotes_full_add.php +++ b/interface/patient_file/summary/pnotes_full_add.php @@ -147,9 +147,18 @@ document.forms[0].submit(); +get_url_file(); +} +?> +
- +
@@ -164,14 +173,6 @@ document.forms[0].submit();
-get_url_file(); -} -?> -- 2.11.4.GIT