From 15f508451979bb0c60405c155a7e6411ffb12cfe Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Fri, 27 Jan 2006 00:03:28 +0000 Subject: [PATCH] new form from Jim Proctor --- contrib/forms/individual_treatment_plan/info.txt | 1 + contrib/forms/individual_treatment_plan/new.php | 115 +++++++++++++++++ contrib/forms/individual_treatment_plan/report.php | 29 +++++ contrib/forms/individual_treatment_plan/save.php | 53 ++++++++ contrib/forms/individual_treatment_plan/table.sql | 40 ++++++ contrib/forms/individual_treatment_plan/view.php | 137 +++++++++++++++++++++ 6 files changed, 375 insertions(+) create mode 100644 contrib/forms/individual_treatment_plan/info.txt create mode 100644 contrib/forms/individual_treatment_plan/new.php create mode 100644 contrib/forms/individual_treatment_plan/report.php create mode 100644 contrib/forms/individual_treatment_plan/save.php create mode 100644 contrib/forms/individual_treatment_plan/table.sql create mode 100644 contrib/forms/individual_treatment_plan/view.php diff --git a/contrib/forms/individual_treatment_plan/info.txt b/contrib/forms/individual_treatment_plan/info.txt new file mode 100644 index 000000000..de250c464 --- /dev/null +++ b/contrib/forms/individual_treatment_plan/info.txt @@ -0,0 +1 @@ +MH Individual Treatment Plan \ No newline at end of file diff --git a/contrib/forms/individual_treatment_plan/new.php b/contrib/forms/individual_treatment_plan/new.php new file mode 100644 index 000000000..9c66fcf4b --- /dev/null +++ b/contrib/forms/individual_treatment_plan/new.php @@ -0,0 +1,115 @@ + + + + + + topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> +
+
+
Individual Treatment Plan


+
[Save] + +" class="link_submit">[Don't Save]
+
+ + + +Date of Referral:  + +Date of Plan: 

+ + +Client Name:  + +DCN: + +

+ +ICD/9/CM Code:  + +Prognosis: 

+ +Diagnosis Description:
+

+ +Presenting Problem Description and Psychosocial Information:
+

+ +Frequency:  + +Duration:  + +Scope: 

+ +Short Term Goals: + +Time Frame:
+ + +
+ + + +
+ + + +

+ +Long Term Goals:
+

+ +Discharge Criteria:
+

+ +Recommendations:
+ Individual and / or Family Therapy + + Substance Abuse
+ + Group Therapy - psychoeducational group + + Parenting

+ +Action Steps by supports - family:
+

+ +Other supports - agencies +Name: + +Contact Information
+ + +
+ + + +

+ +Medications + +Referrals
+ + + +
+ + + +

+ + +

+
[Save] + +" class="link_submit">[Don't Save]
+
+
+ diff --git a/contrib/forms/individual_treatment_plan/report.php b/contrib/forms/individual_treatment_plan/report.php new file mode 100644 index 000000000..61c27aa04 --- /dev/null +++ b/contrib/forms/individual_treatment_plan/report.php @@ -0,0 +1,29 @@ +"; +foreach($data as $key => $value) { +if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") { + continue; +} +if ($value == "on") { +$value = "yes"; +} +$key=ucwords(str_replace("_"," ",$key)); +print "$key: $value"; +$count++; +if ($count == $cols) { +$count = 0; +print "\n"; +} +} +} +print ""; +} +?> diff --git a/contrib/forms/individual_treatment_plan/save.php b/contrib/forms/individual_treatment_plan/save.php new file mode 100644 index 000000000..4a80a3176 --- /dev/null +++ b/contrib/forms/individual_treatment_plan/save.php @@ -0,0 +1,53 @@ + $var) { +$_POST[$k] = mysql_escape_string($var); +echo "$var\n"; +} +if ($encounter == "") +$encounter = date("Ymd"); +if ($_GET["mode"] == "new"){ +$newid = formSubmit("form_individual_treatment_plan", $_POST, $_GET["id"], $userauthorized); + +addForm($encounter, "Individual Treatment Plan", $newid, "individual_treatment_plan", $pid, $userauthorized); +}elseif ($_GET["mode"] == "update") { +sqlInsert("update form_individual_treatment_plan set pid = {$_SESSION["pid"]},groupname='".$_SESSION["authProvider"]."',user='".$_SESSION["authUser"]."',authorized=$userauthorized,activity=1, date = NOW(), +date_of_referal ='".$_POST["date_of_referal"]."', +dcn ='".$_POST["dcn"]."', +icd9 ='".$_POST["icd9"]."', +prognosis ='".$_POST["prognosis"]."', +diagnosis_description ='".$_POST["diagnosis_description"]."', +presenting_problem ='".$_POST["presenting_problem"]."', +frequency ='".$_POST["frequency"]."', +duration ='".$_POST["duration"]."', +scope ='".$_POST["scope"]."', +short_term_goals_1 ='".$_POST["short_term_goals_1"]."', +time_frame_1 ='".$_POST["time_frame_1"]."', +short_term_goals_2 ='".$_POST["short_term_goals_2"]."', +time_frame_2 ='".$_POST["time_frame_2"]."', +short_term_goals_3 ='".$_POST["short_term_goals_3"]."', +time_frame_3 ='".$_POST["time_frame_3"]."', +long_term_goals ='".$_POST["long_term_goals"]."', +discharge_criteria ='".$_POST["discharge_criteria"]."', +individual_family_therapy ='".$_POST["individual_family_therapy"]."', +substance_abuse ='".$_POST["substance_abuse"]."', +group_therapy ='".$_POST["group_therapy"]."', +parenting ='".$_POST["parenting"]."', +action_steps_by_supports ='".$_POST["action_steps_by_supports"]."', +other_supports_name_1 ='".$_POST["other_supports_name_1"]."', +other_supports_name_2 ='".$_POST["other_supports_name_2"]."', +other_supports_contact_1 ='".$_POST["other_supports_contact_1"]."', +other_supports_contact_2 ='".$_POST["other_supports_contact_2"]."', +medications_1 ='".$_POST["medications_1"]."', +medications_2 ='".$_POST["medications_2"]."', +referrals_1 ='".$_POST["referrals_1"]."', +referrals_2 ='".$_POST["referrals_2"]."' where id=$id"); +} +$_SESSION["encounter"] = $encounter; +formHeader("Redirecting...."); +formJump(); +formFooter(); +?> diff --git a/contrib/forms/individual_treatment_plan/table.sql b/contrib/forms/individual_treatment_plan/table.sql new file mode 100644 index 000000000..9fcf54021 --- /dev/null +++ b/contrib/forms/individual_treatment_plan/table.sql @@ -0,0 +1,40 @@ +CREATE TABLE IF NOT EXISTS form_individual_treatment_plan ( +id bigint(20) NOT NULL auto_increment, +date datetime default NULL, +pid bigint(20) default NULL, +user varchar(255) default NULL, +groupname varchar(255) default NULL, +authorized tinyint(4) default NULL, +activity tinyint(4) default NULL, +date_of_referal date default NULL, +dcn varchar(20) default NULL, +icd9 varchar(5) default NULL, +prognosis varchar(20) default NULL, +diagnosis_description longtext, +presenting_problem longtext, +frequency varchar(10) default NULL, +duration varchar(10) default NULL, +scope varchar(10) default NULL, +short_term_goals_1 varchar(40) default NULL, +time_frame_1 varchar(15) default NULL, +short_term_goals_2 varchar(40) default NULL, +time_frame_2 varchar(15) default NULL, +short_term_goals_3 varchar(40) default NULL, +time_frame_3 varchar(15) default NULL, +long_term_goals longtext, +discharge_criteria longtext, +individual_family_therapy varchar(3) NOT NULL default 'N/A', +substance_abuse varchar(3) NOT NULL default 'N/A', +group_therapy varchar(3) NOT NULL default 'N/A', +parenting varchar(3) NOT NULL default 'N/A', +action_steps_by_supports longtext, +other_supports_name_1 varchar(35) default NULL, +other_supports_name_2 varchar(35) default NULL, +other_supports_contact_1 varchar(35) default NULL, +other_supports_contact_2 varchar(35) default NULL, +medications_1 varchar(40) default NULL, +medications_2 varchar(40) default NULL, +referrals_1 varchar(40) default NULL, +referrals_2 varchar(40) default NULL, +PRIMARY KEY (id) +) TYPE=MyISAM; diff --git a/contrib/forms/individual_treatment_plan/view.php b/contrib/forms/individual_treatment_plan/view.php new file mode 100644 index 000000000..ef9e73024 --- /dev/null +++ b/contrib/forms/individual_treatment_plan/view.php @@ -0,0 +1,137 @@ + + + + + + topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> + +
" name="my_form"> +
Individual Treatment Plan


+
+[Save] +" class="link" target=Main>[Don't Save Changes]
+

+ + + + + + + + + +Date of Referral: "> + +Date of Plan: 

+ + +Client Name:  + +DCN: + +">

+ +ICD/9/CM Code: "> + +Prognosis: ">

+ +Diagnosis Description:
+

+ +Presenting Problem Description and Psychosocial Information:
+

+ +Frequency: "> + +Duration: "> + +Scope: ">

+ +Short Term Goals: + +Time Frame:
+"> + +">
+ +"> + +">
+ +"> + +">

+ +Long Term Goals:
+

+ +Discharge Criteria:
+

+ +Recommendations:
+Individual and / or Family Therapy + +Substance Abuse
+ +Group Therapy - psychoeducational group + +Parenting

+ +Action Steps by supports - family:
+

+ +Other supports - agencies +Name: + +Contact Information
+"> + +">
+ +"> + +">

+ +Medications + +Referrals
+ +"> + +">
+ +"> + +">

+ + + + + + + + + + + + + + +
+[Save] +
+" class="link" target=Main>[Don't Save Changes] +
+ -- 2.11.4.GIT