From b3c8d486bdf83dd25d8db7b0d608837d78130d47 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Fri, 9 Sep 2005 18:54:14 +0000 Subject: [PATCH] simplified adding/removing issue types and added dental as a type --- interface/forms/newpatient/new.php | 5 ++ interface/forms/newpatient/view.php | 5 ++ interface/main/main_navigation.php | 12 ++++- interface/patient_file/history/encounters.php | 31 +++--------- interface/patient_file/report/patient_report.php | 6 +++ interface/patient_file/summary/add_edit_issue.php | 19 +++---- interface/patient_file/summary/stats.php | 62 ++++++----------------- interface/patient_file/summary/stats_full.php | 5 ++ library/lists.inc | 9 ++++ 9 files changed, 67 insertions(+), 87 deletions(-) diff --git a/interface/forms/newpatient/new.php b/interface/forms/newpatient/new.php index ffb22e8ca..51eeb67fa 100644 --- a/interface/forms/newpatient/new.php +++ b/interface/forms/newpatient/new.php @@ -1,6 +1,7 @@ $tcode: "; echo $irow['begdate'] . " " . htmlspecialchars(substr($irow['title'], 0, 40)) . "\n"; } diff --git a/interface/forms/newpatient/view.php b/interface/forms/newpatient/view.php index 082799db2..0dae27061 100644 --- a/interface/forms/newpatient/view.php +++ b/interface/forms/newpatient/view.php @@ -1,6 +1,7 @@ - Navigation @@ -43,7 +42,7 @@ include_once("../../library/acl.inc"); Change Password  + Password  + + + Roster  + + + Calendar  + +  Home  +  Logout   diff --git a/interface/patient_file/history/encounters.php b/interface/patient_file/history/encounters.php index fb0fb222f..f93240102 100644 --- a/interface/patient_file/history/encounters.php +++ b/interface/patient_file/history/encounters.php @@ -4,6 +4,7 @@ include_once("$srcdir/billing.inc"); include_once("$srcdir/pnotes.inc"); include_once("$srcdir/patient.inc"); + include_once("$srcdir/lists.inc"); include_once("$srcdir/acl.inc"); //maximum number of encounter entries to display on this page: @@ -57,14 +58,6 @@ if ($result = getEncounters($pid)) { break; } -/**** - $subresult = getFormByEncounter($pid, $iter{"encounter"}, "*", "New Patient Encounter"); - $raw_encounter_date = date( "Y-m-d" ,strtotime($subresult[0]{"date"})); - $encounter_date = date( "D F jS" ,strtotime($subresult[0]{"date"})); - print ""; - print "" . $encounter_date . ""; -****/ - $reason_string = ""; if ($result4 = sqlQuery("select * from form_encounter where encounter='" . $iter{"encounter"} . "' and pid='$pid'")) @@ -102,10 +95,15 @@ if ($result = getEncounters($pid)) { for ($i = 0; $irow = sqlFetchArray($ires); ++$i) { if ($i > 0) echo "
"; $tcode = $irow['type']; + + /**** if ($tcode == 'medical_problem' || $tcode == 'problem') $tcode = 'P'; else if ($tcode == 'allergy') $tcode = 'A'; else if ($tcode == 'medication') $tcode = 'M'; else if ($tcode == 'surgery') $tcode = 'S'; + ****/ + if ($ISSUE_TYPES[$tcode]) $tcode = $ISSUE_TYPES[$tcode][2]; + echo "$tcode: " . $irow['title']; } } else { @@ -114,23 +112,6 @@ if ($result = getEncounters($pid)) { echo "\n"; -/**** - /////////// - $comments = ""; - if ($subresult3 = getPnotesByDate(date( "Y-m-d" ,strtotime($subresult[0]{"date"})), "all", "*", $pid, 5, 0)){ - //this is where we print out short headers for comments enterred into the patient file on the same date - - - foreach ($subresult3 as $iter3) { - $comments .= stripslashes(strterm($iter3{"body"},100)) . "
"; - - } - $comments = substr($comments,0,strlen($comments)-4); - } - - print "" . $comments . ""; -****/ - //this is where we print out the text of the billing that occurred on this encounter $thisauth = $auth_coding_a; if (!$thisauth && $auth_coding) { diff --git a/interface/patient_file/report/patient_report.php b/interface/patient_file/report/patient_report.php index 7a76c81ef..1a19422dd 100644 --- a/interface/patient_file/report/patient_report.php +++ b/interface/patient_file/report/patient_report.php @@ -1,5 +1,6 @@ @@ -84,6 +85,8 @@ while ($prow = sqlFetchArray($pres)) { if ($lasttype != $prow['type']) { $lasttype = $prow['type']; + + /**** $disptype = $lasttype; switch ($lasttype) { case "allergy" : $disptype = "Allergies" ; break; @@ -92,6 +95,9 @@ case "medication" : $disptype = "Medications" ; break; case "surgery" : $disptype = "Surgeries" ; break; } + ****/ + $disptype = $ISSUE_TYPES[$lasttype][0]; + echo " \n"; echo " $disptype\n"; echo " \n"; diff --git a/interface/patient_file/summary/add_edit_issue.php b/interface/patient_file/summary/add_edit_issue.php index 962a1fb3b..f8e4082e9 100644 --- a/interface/patient_file/summary/add_edit_issue.php +++ b/interface/patient_file/summary/add_edit_issue.php @@ -22,13 +22,6 @@ if ($tmp['squad'] && ! acl_check('squads', $tmp['squad'])) die("Not authorized for this squad!"); - $arrtype = array( - 'medical_problem' => 'Problem', - 'allergy' => 'Allergy', - 'medication' => 'Medication', - 'surgery' => 'Surgery' - ); - $arroccur = array( 0 => 'Unknown or N/A', 1 => 'First', @@ -72,7 +65,7 @@ td { font-size:10pt; } if (is_file("../../../custom/clickoptions.txt")) $clickoptions = file("../../../custom/clickoptions.txt"); $i = 0; - foreach ($arrtype as $key => $value) { + foreach ($ISSUE_TYPES as $key => $value) { echo " aopts[$i] = new Array();\n"; foreach($clickoptions as $line) { $line = trim($line); @@ -116,7 +109,7 @@ td { font-size:10pt; } $i = 0; $text_type = "unknown"; - foreach ($arrtype as $key => $value) { + foreach ($ISSUE_TYPES as $key => $value) { if ($i++ == $_POST['form_type']) $text_type = $key; } @@ -156,7 +149,7 @@ td { font-size:10pt; } "'" . $$_SESSION['authProvider'] . "' )"); } - $tmp_title = substr($arrtype[$text_type], 0, 1) . ": $form_begin " . + $tmp_title = $ISSUE_TYPES[$text_type][2] . ": $form_begin " . substr($_POST['form_title'], 0, 40); // Close this window and redisplay the updated list of issues. @@ -175,7 +168,7 @@ td { font-size:10pt; } if ($issue) { $irow = sqlQuery("SELECT * FROM lists WHERE id = $issue"); - foreach ($arrtype as $key => $value) { + foreach ($ISSUE_TYPES as $key => $value) { if ($key == $irow['type']) break; ++$type_index; } @@ -206,10 +199,10 @@ td { font-size:10pt; } $value \n"; + echo " />" . $value[1] . " \n"; ++$index; } ?> diff --git a/interface/patient_file/summary/stats.php b/interface/patient_file/summary/stats.php index 35ce78a64..229f7cf9d 100644 --- a/interface/patient_file/summary/stats.php +++ b/interface/patient_file/summary/stats.php @@ -34,57 +34,25 @@ } ?> - - - - +
-Medical Problems
-" . $iter{"title"} . "
\n"; - } -} -?> -
- - - -\n"; + echo " \n"; + echo " \n"; + } ?> - - - - -\n"; echo " \n"; echo " \n"; diff --git a/library/lists.inc b/library/lists.inc index 2f2374c7d..f9e73cc01 100644 --- a/library/lists.inc +++ b/library/lists.inc @@ -1,6 +1,15 @@ array('Medical Problems', 'Problem' , 'P'), + 'allergy' => array('Allergies' , 'Allergy' , 'A'), + 'medication' => array('Medications' , 'Medication', 'M'), + 'surgery' => array('Surgeries' , 'Surgery' , 'S'), + 'dental' => array('Dental Issues' , 'Dental' , 'D') +); + function getListById ($id, $cols = "*") { return sqlQuery("select $cols from lists where id='$id' order by date DESC limit 0,1"); -- 2.11.4.GIT
-Medications
" . $iter{"title"} . "
\n"; - } -} -?> -
-Allergies
-" . $iter{"title"} . "
\n"; - } -} - + foreach ($ISSUE_TYPES as $key => $arr) { + echo "
\n"; + echo " " . + $arr[0] . "$tmore
\n"; + if ($result = getListByType($pid, $key, "id,title,comments", 1, "all", 0)) { + foreach ($result as $iter) { + echo "" . + $iter['title'] . "
\n"; + } + } + echo "
-Surgeries
-" . $iter{"title"} . ": ".strterm($iter{"comments"},20)."
\n"; - } -} -?> -
Immunizations
diff --git a/interface/patient_file/summary/stats_full.php b/interface/patient_file/summary/stats_full.php index e47f07a76..c57ea2c61 100644 --- a/interface/patient_file/summary/stats_full.php +++ b/interface/patient_file/summary/stats_full.php @@ -103,6 +103,8 @@ function newEncounter() { if ($lasttype != $row['type']) { $encount = 0; $lasttype = $row['type']; + + /**** $disptype = $lasttype; switch ($lasttype) { case "allergy" : $disptype = "Allergies" ; break; @@ -111,6 +113,9 @@ function newEncounter() { case "medication" : $disptype = "Medications" ; break; case "surgery" : $disptype = "Surgeries" ; break; } + ****/ + $disptype = $ISSUE_TYPES[$lasttype][0]; + echo "
$disptype