From e9489f42fb955b9f686306d225610532a42d3254 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Wed, 20 Dec 2006 06:48:10 +0000 Subject: [PATCH] a couple of simplification and hipaa options for demographics and prescriptions from mtfc --- controllers/C_Prescription.class.php | 1 + interface/globals.php | 6 + interface/patient_file/summary/demographics.php | 130 ++++++++++++++------- .../patient_file/summary/demographics_full.php | 71 +++++++---- .../patient_file/summary/demographics_save.php | 4 +- library/patient.inc | 6 +- library/report.inc | 4 +- sql/2_8_1-to-2_8_2_upgrade.sql | 7 ++ sql/database.sql | 4 +- templates/prescription/general_edit.html | 7 ++ 10 files changed, 174 insertions(+), 66 deletions(-) diff --git a/controllers/C_Prescription.class.php b/controllers/C_Prescription.class.php index dbd02c27f..62b171c5c 100644 --- a/controllers/C_Prescription.class.php +++ b/controllers/C_Prescription.class.php @@ -18,6 +18,7 @@ class C_Prescription extends Controller { $this->assign("TOP_ACTION", $GLOBALS['webroot']."/controller.php?" . "prescription" . "&"); $this->assign("STYLE", $GLOBALS['style']); $this->assign("WEIGHT_LOSS_CLINIC", $GLOBALS['weight_loss_clinic']); + $this->assign("SIMPLIFIED_PRESCRIPTIONS", $GLOBALS['simplified_prescriptions']); $this->pconfig = $GLOBALS['oer_config']['prescriptions']; if ($GLOBALS['inhouse_pharmacy']) { diff --git a/interface/globals.php b/interface/globals.php index 86f17beb7..c5d1563d3 100644 --- a/interface/globals.php +++ b/interface/globals.php @@ -172,6 +172,9 @@ $GLOBALS['inhouse_pharmacy'] = false; // True to omit insurance and some other things from the demographics form: $GLOBALS['simplified_demographics'] = false; +// True to omit form, route and interval which then become part of dosage: +$GLOBALS['simplified_prescriptions'] = false; + // You may put text here as the default complaint in the New Patient form: $GLOBALS['default_chief_complaint'] = ''; @@ -183,6 +186,9 @@ $GLOBALS['default_new_encounter_form'] = ''; // status is set to "@" (arrived), then make this true. $GLOBALS['auto_create_new_encounters'] = true; +// If you don't want employer information and country in patient demographics. +$GLOBALS['omit_employers'] = false; + // If you want Hylafax support then uncomment and customize the following // statements, and also customize custom/faxcover.txt: // diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index d537a0f38..e396eaf12 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -7,6 +7,20 @@ include_once("$srcdir/pid.inc"); setpid($_GET['set_pid']); } + +function print_as_money($money) { + preg_match("/(\d*)\.?(\d*)/",$money,$moneymatches); + $tmp = wordwrap(strrev($moneymatches[1]),3,",",1); + $ccheck = strrev($tmp); + if ($ccheck[0] == ",") { + $tmp = substr($ccheck,1,strlen($ccheck)-1); + } + if ($moneymatches[2] != "") { + return "$ " . strrev($tmp) . "." . $moneymatches[2]; + } else { + return "$ " . strrev($tmp); + } +} ?> @@ -150,40 +164,88 @@ echo $result{"postal_code"}?> - + - Patient $opt_out Mailed Information "; ?> - Patient $opt_out Voice Messages "; ?> - + + + Patient $opt_out Notice Information "; + ?> + + +   + + + Leave a message with : " . + $result{"fname"} . " " . $result{"mname"} . " " . + $result{"lname"} . ""; + } + else { + echo "Leave a message with : " . + $result{"hipaa_message"} . ""; + } + ?> + + + +   - + + + + + + + + + + + + + + + + + + +
Listed Family Members: 
      
      
+ + + + + -:
-: +:
+: - + : - +

@@ -193,7 +255,7 @@ echo $result{"postal_code"}?>
- - + - -:
-:
-:
-:
- + +:
+:
+:
+:
+ - - -:
-:
-:
-.:
- + +:
+:
+:
+.:
+ @@ -270,6 +317,9 @@ if ($moneymatches[2] != "") { + + + - - + + - + @@ -352,30 +357,45 @@ function set_insurance(ins_id, ins_name) { - + + + + + + + @@ -640,7 +664,10 @@ function set_insurance(ins_id, ins_name) { : subscriber_city value=""> : subscriber_state value="">
: subscriber_postal_code value=""> - : subscriber_country value="">
+ :
diff --git a/interface/patient_file/summary/demographics_save.php b/interface/patient_file/summary/demographics_save.php index 32ac1931c..581ed311a 100644 --- a/interface/patient_file/summary/demographics_save.php +++ b/interface/patient_file/summary/demographics_save.php @@ -79,7 +79,9 @@ newPatientData( $_POST["hipaa_voice"], $_POST["squad"], $_POST["pharmacy_id"], - $_POST["drivers_license"] + $_POST["drivers_license"], + $_POST["hipaa_notice"], + $_POST["hipaa_message"] ); newEmployerData( diff --git a/library/patient.inc b/library/patient.inc index bde27ccbc..29663cfea 100644 --- a/library/patient.inc +++ b/library/patient.inc @@ -344,7 +344,9 @@ function newPatientData( $db_id="", $hipaa_voice = "", $squad = 0, $pharmacy_id = 0, - $drivers_license = "" + $drivers_license = "", + $hipaa_notice = "", + $hipaa_message = "" ) { $DOB = fixDate($DOB); @@ -406,6 +408,8 @@ function newPatientData( $db_id="", pharmacy_id = '$pharmacy_id', hipaa_mail = '$hipaa_mail', hipaa_voice = '$hipaa_voice', + hipaa_notice = '$hipaa_notice', + hipaa_message = '$hipaa_message', squad = '$squad', fitness='$fitness', referral_source='$referral_source', diff --git a/library/report.inc b/library/report.inc index fe38ea5d6..ecea85dea 100644 --- a/library/report.inc +++ b/library/report.inc @@ -19,7 +19,9 @@ phone_biz => "Business Phone: ", phone_contact => "Contact Phone: ", contact_relationship => "Contact Person", hipaa_mail => "Allows Mail: ", -hipaa_voice => "Allows Voice msgs: " +hipaa_voice => "Allows Voice msgs: ", +hipaa_notice => "Notice Received: ", +hipaa_message => "Leave Message With: " ); diff --git a/sql/2_8_1-to-2_8_2_upgrade.sql b/sql/2_8_1-to-2_8_2_upgrade.sql index c141292ce..b8253d2f0 100644 --- a/sql/2_8_1-to-2_8_2_upgrade.sql +++ b/sql/2_8_1-to-2_8_2_upgrade.sql @@ -397,3 +397,10 @@ ALTER TABLE users ADD city2 varchar(30) NOT NULL DEFAULT '', ADD state2 varchar(30) NOT NULL DEFAULT '', ADD zip2 varchar(20) NOT NULL DEFAULT ''; + +ALTER TABLE patient_data + ADD `hipaa_notice` VARCHAR(3) DEFAULT 'NO' NOT NULL, + ADD `hipaa_message` VARCHAR(20); + +ALTER TABLE prescriptions + MODIFY `dosage` varchar(100) DEFAULT NULL; diff --git a/sql/database.sql b/sql/database.sql index fda3bd6f0..5022a2c95 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -27317,6 +27317,8 @@ CREATE TABLE `patient_data` ( `genericval2` varchar(255) NOT NULL default '', `hipaa_mail` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL, `hipaa_voice` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL, + `hipaa_notice` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL, + `hipaa_message` VARCHAR( 20 ) DEFAULT NULL, `squad` varchar(32) NOT NULL DEFAULT '', `fitness` int(11) NOT NULL DEFAULT 0, `referral_source` varchar(30) NOT NULL DEFAULT '', @@ -27583,7 +27585,7 @@ CREATE TABLE `prescriptions` ( `drug` varchar(150) default NULL, `drug_id` int(11) NOT NULL DEFAULT 0, `form` int(3) default NULL, - `dosage` varchar(10) default NULL, + `dosage` varchar(100) default NULL, `quantity` int(11) default NULL, `size` float unsigned default NULL, `unit` int(11) default NULL, diff --git a/templates/prescription/general_edit.html b/templates/prescription/general_edit.html index 4dc2f6a42..7f3191fc7 100644 --- a/templates/prescription/general_edit.html +++ b/templates/prescription/general_edit.html @@ -128,10 +128,17 @@ textarea { -- 2.11.4.GIT
: ">" + > + : +
:
: - +NO\n"; + $opt_sel = ($result['hipaa_notice'] == 'YES' || ($GLOBALS['weight_loss_clinic'] && !$result['hipaa_notice'])) + ? ' selected' : ''; + echo " YES\n"; +?> :
: + +
[]

@@ -385,7 +405,7 @@ function set_insurance(ins_id, ins_name) { - +
> - + + > - + + > - + + > +
"> @@ -576,15 +596,18 @@ function set_insurance(ins_id, ins_name) {
: group_number value="">

(,
):
subscriber_employer value="">
: subscriber_employer_street value="">
@@ -602,6 +625,7 @@ function set_insurance(ins_id, ins_name) {
Take +{if $SIMPLIFIED_PRESCRIPTIONS && !$prescription->form && !$prescription->route && !$prescription->interval} + + + + +{else} in +{/if}