From b861c064c11619863e2d90d5543c0c8276553c69 Mon Sep 17 00:00:00 2001 From: bradymiller Date: Sun, 28 Apr 2013 01:47:23 -0700 Subject: [PATCH] Issue Type list gui improvements --- interface/super/edit_list.php | 33 +++++++++++++++++++-------------- library/lists.inc | 16 +++++++++++++++- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/interface/super/edit_list.php b/interface/super/edit_list.php index 7d7876a85..71be0fce6 100644 --- a/interface/super/edit_list.php +++ b/interface/super/edit_list.php @@ -429,6 +429,20 @@ function ctGenCbox($opt_line_no, $data_array, $name, $title='') { return $s; } +function ctSelector($opt_line_no, $data_array, $name, $option_array, $title='') { + $value = isset($data_array[$name]) ? $data_array[$name] : ''; + $s = " "; + $s .= ""; + $s .= "\n"; + return $s; +} + // Write a form line as above but for the special case of Code Types. // function writeCTLine($ct_array) { @@ -475,17 +489,8 @@ function writeCTLine($ct_array) { xl('Is this a Clinical Term code type?')); echo ctGenCBox($opt_line_no, $ct_array, 'ct_problem', xl('Is this a Medical Problem code type?')); - // Show the external code types selector - $value_ct_external = isset($ct_array['ct_external']) ? $ct_array['ct_external'] : ''; - echo " "; - echo ""; - echo "\n"; + echo ctSelector($opt_line_no, $ct_array, 'ct_external', + $cd_external_options, xl('Is this using external sql tables? If it is, then choose the format.')); echo " \n"; } @@ -493,11 +498,11 @@ function writeCTLine($ct_array) { * Special case of Issue Types */ function writeITLine($it_array) { - global $opt_line_no; + global $opt_line_no,$ISSUE_TYPE_CATEGORIES,$ISSUE_TYPE_STYLES; ++$opt_line_no; $bgcolor = "#" . (($opt_line_no & 1) ? "ddddff" : "ffdddd"); echo " \n"; - echo ctGenCell($opt_line_no, $it_array, 'category' , 20, 20, xl('OpenEMR Application Category (Default vs Sports Teams vs IPPF)')); + echo ctSelector($opt_line_no, $it_array, 'category', $ISSUE_TYPE_CATEGORIES, xl('OpenEMR Application Category')); echo ctGenCBox($opt_line_no, $it_array, 'active', xl('Is this active?')); echo ctGenCell($opt_line_no, $it_array, 'ordering' , 10, 10, xl('Order')); echo ctGenCell($opt_line_no, $it_array, 'type' , 20, 75, xl('Issue Type')); @@ -516,7 +521,7 @@ function writeITLine($it_array) { if ($GLOBALS['translate_lists'] && $_SESSION['language_choice'] > 1) { echo " " . xlt($it_array['abbreviation']) . "\n"; } - echo ctGenCell($opt_line_no, $it_array, 'style', 6, 6, xl('0 - Normal; 1 - Simplified: only title, start date, comments and an Active checkbox;no diagnosis, occurrence, end date, referred-by or sports fields.; 2 - Football Injury;')); + echo ctSelector($opt_line_no, $it_array, 'style', $ISSUE_TYPE_STYLES, xl('Standard; Simplified: only title, start date, comments and an Active checkbox;no diagnosis, occurrence, end date, referred-by or sports fields. ; Football Injury')); echo ctGenCBox($opt_line_no, $it_array, 'force_show', xl('Show this category on the patient summary screen even if no issues have been entered for this category.')); echo " \n"; } diff --git a/library/lists.inc b/library/lists.inc index c454735b7..f3d9aeed4 100644 --- a/library/lists.inc +++ b/library/lists.inc @@ -10,7 +10,7 @@ * 0 - The plural title. * 1 - The singular title. * 2 - The abbreviated title (one letter abbreviation). - * 3 - Style (integer from 0 to 5). Normal behavior is 0; not sure what others do; will document this later. + * 3 - Style ('0 - Normal; 1 - Simplified: only title, start date, comments and an Active checkbox;no diagnosis, occurrence, end date, referred-by or sports fields.; 2 - Football Injury; 3 and 4 are IPPF specific) * 4 - Force show this issue category in the patient summary screen even if empty (setting to 1 will force it to show and setting it to 0 will turn this off). * * @@ -38,6 +38,20 @@ * @link http://www.open-emr.org */ +$ISSUE_TYPE_CATEGORIES = array( + 'default' => xl('Default'), // Normal OpenEMR use + 'athletic_team' => xl('Athletic Team'), // For Sports Team use + 'ippf_specific' => xl('IPPF') // For IPPF use +); + +$ISSUE_TYPE_STYLES = array( + 0 => xl('Standard'), // Standard + 1 => xl('Simplified'), // Simplified: only title, start date, comments and an Active checkbox;no diagnosis, occurrence, end date, referred-by or sports fields. + 2 => xl('Football Injury'), // Football Injury + 3 => xl('IPPF Abortion'), // IPPF specific (abortions issues) + 4 => xl('IPPF Contraception') // IPPF specific (contraceptions issues) +); + /** * Will return the current issue type category that is being used. * @return string The current issue type category that is being used. -- 2.11.4.GIT