From 8554a2ac662324c97b7709bb3c96294461fdc099 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Tue, 14 Aug 2018 19:16:51 -0700 Subject: [PATCH] form fix (#1800) --- contrib/forms/assessment_intake/new.php | 46 ++--- contrib/forms/assessment_intake/report.php | 6 +- contrib/forms/assessment_intake/save.php | 302 ++++++++++++++--------------- contrib/forms/assessment_intake/view.php | 150 +++++++------- 4 files changed, 250 insertions(+), 254 deletions(-) rewrite contrib/forms/assessment_intake/save.php (93%) diff --git a/contrib/forms/assessment_intake/new.php b/contrib/forms/assessment_intake/new.php index 723203510..c2c7d1a91 100644 --- a/contrib/forms/assessment_intake/new.php +++ b/contrib/forms/assessment_intake/new.php @@ -1,6 +1,6 @@ @@ -17,23 +17,23 @@ formHeader("Form: assessment_intake"); onclick="top.restoreSession()">[Don't Save]
- -Name:  +Name:  Date: 

-SSN:  +SSN: 

-Address: 

-Telephone Number:  -Date of Birth: 

+Address: 

+Telephone Number:  +Date of Birth: 



Purpose:  New client evaluation Readmission -Consultation

+Consultation



Why is Assessment being requested (Goals and treatment expectations of the individual requesting services):

@@ -127,7 +127,7 @@ $result = SqlFetchArray($res); ?>  Intent without means  Intent with means
-
+
Compliance with treatment:
 Not Assessed  Full compliance @@ -139,7 +139,7 @@ $result = SqlFetchArray($res); ?>  Variable  Little or no compliance
-
+
Substance Abuse:
 Not Assessed  None/normal use:
@@ -151,7 +151,7 @@ $result = SqlFetchArray($res); ?>  Unstable remission of abuse  Abuse
-
+
Current physical or sexual abuse:
 Not Assessed  Yes @@ -192,10 +192,10 @@ $result = SqlFetchArray($res); ?>  others  both

- + Risk to community (criminal):

- + Assessment Recommendations:

Outpatient Psychotherapy: @@ -229,7 +229,7 @@ $result = SqlFetchArray($res); ?>
Support services needed:

- +  Parenting skills/child management  Communication skills @@ -240,7 +240,7 @@ $result = SqlFetchArray($res); ?>  Other


- + Legal Services:  Offender program @@ -248,7 +248,7 @@ $result = SqlFetchArray($res); ?>  Sex Offender Groups  Substance abuse
- +  Victum empathy group  Referral to advocate @@ -256,12 +256,12 @@ $result = SqlFetchArray($res); ?>
 Other: - +
Other:


- + Referrals for Continuing Services

Psychiatric Evaluation Psychotropic Medications:
@@ -269,19 +269,19 @@ $result = SqlFetchArray($res); ?> Medical Care:


- + Educational/vocational services:


- + Other:


Current use of resources/services from other community agencies:


- + Documents to be obtainded (Release of Information Required):


- + Other needed resources and services:


diff --git a/contrib/forms/assessment_intake/report.php b/contrib/forms/assessment_intake/report.php index 07df72f2a..72207237a 100644 --- a/contrib/forms/assessment_intake/report.php +++ b/contrib/forms/assessment_intake/report.php @@ -1,7 +1,7 @@ $key: $value"; + print "" . text($key) . ": " . text($value) . ""; $count++; if ($count == $cols) { $count = 0; diff --git a/contrib/forms/assessment_intake/save.php b/contrib/forms/assessment_intake/save.php dissimilarity index 93% index 1632a8db8..671c732f2 100644 --- a/contrib/forms/assessment_intake/save.php +++ b/contrib/forms/assessment_intake/save.php @@ -1,153 +1,149 @@ - $var) { - $_POST[$k] = add_escape_custom($var); - echo "$var\n"; -} - -if ($encounter == "") { - $encounter = date("Ymd"); -} - -if ($_GET["mode"] == "new") { - $newid = formSubmit("form_assessment_intake", $_POST, $_GET["id"], $userauthorized); - print 'formSubmitt'; /*debugging */ - addForm($encounter, "Assessment and Intake", $newid, "assessment_intake", $pid, $userauthorized); -} elseif ($_GET["mode"] == "update") { - sqlInsert("update form_assessment_intake set pid = {$_SESSION["pid"]},groupname='".$_SESSION["authProvider"]."',user='".$_SESSION["authUser"]."',authorized=$userauthorized,activity=1, date = NOW(), -dcn='".$_POST["dcn"]."', -location='".$_POST["location"]."', -time_in='".$_POST["time_in"]."', -time_out='".$_POST["time_out"]."', -referral_source='".$_POST["referral_source"]."', -new_client_eval='".$_POST["new_client_eval"]."', -readmission='".$_POST["readmission"]."', -consultation='".$_POST["consultation"]."', -copy_sent_to='".$_POST["copy_sent_to"]."', -reason_why='".$_POST["reason_why"]."', -behavior_led_to='".$_POST["behavior_led_to"]."', -school_work='".$_POST["school_work"]."', -personal_relationships='".$_POST["personal_relationships"]."', -fatherc='".$_POST["fatherc"]."', -motherc='".$_POST["motherc"]."', -father_involved='".$_POST["father_involved"]."', -mother_involved='".$_POST["mother_involved"]."', -number_children='".$_POST["number_children"]."', -siblings='".$_POST["siblings"]."', -other_relationships='".$_POST["other_relationships"]."', -social_relationships='".$_POST["social_relationships"]."', -current_symptoms='".$_POST["current_symptoms"]."', -personal_strengths='".$_POST["personal_strengths"]."', -spiritual='".$_POST["spiritual"]."', -legal='".$_POST["legal"]."', -prior_history='".$_POST["prior_history"]."', -number_admitt='".$_POST["number_admitt"]."', -type_admitt='".$_POST["type_admitt"]."', -substance_use='".$_POST["substance_use"]."', -substance_abuse='".$_POST["substance_abuse"]."', -axis1='".$_POST["axis1"]."', -axis2='".$_POST["axis2"]."', -axis3='".$_POST["axis3"]."', -allergies='".$_POST["allergies"]."', -ax4_prob_support_group='".$_POST["ax4_prob_support_group"]."', -ax4_prob_soc_env='".$_POST["ax4_prob_soc_env"]."', -ax4_educational_prob='".$_POST["ax4_educational_prob"]."', -ax4_occ_prob='".$_POST["ax4_occ_prob"]."', -ax4_housing='".$_POST["ax4_housing"]."', -ax4_economic='".$_POST["ax4_economic"]."', -ax4_access_hc='".$_POST["ax4_access_hc"]."', -ax4_legal='".$_POST["ax4_legal"]."', -ax4_other_cb='".$_POST["ax4_other_cb"]."', -ax4_other='".$_POST["ax4_other"]."', -ax5_current='".$_POST["ax5_current"]."', -ax5_past='".$_POST["ax5_past"]."', -risk_suicide_na='".$_POST["risk_suicide_na"]."', -risk_suicide_nk='".$_POST["risk_suicide_nk"]."', -risk_suicide_io='".$_POST["risk_suicide_io"]."', -risk_suicide_plan='".$_POST["risk_suicide_plan"]."', -risk_suicide_iwom='".$_POST["risk_suicide_iwom"]."', -risk_suicide_iwm='".$_POST["risk_suicide_iwm"]."', -risk_homocide_na='".$_POST["risk_homocide_na"]."', -risk_homocide_nk='".$_POST["risk_homocide_nk"]."', -risk_homocide_io='".$_POST["risk_homocide_io"]."', -risk_homocide_plan='".$_POST["risk_homocide_plan"]."', -risk_homocide_iwom='".$_POST["risk_homocide_iwom"]."', -risk_homocide_iwm='".$_POST["risk_homocide_iwm"]."', -risk_compliance_na='".$_POST["risk_compliance_na"]."', -risk_compliance_fc='".$_POST["risk_compliance_fc"]."', -risk_compliance_mc='".$_POST["risk_compliance_mc"]."', -risk_compliance_moc='".$_POST["risk_compliance_moc"]."', -risk_compliance_var='".$_POST["risk_compliance_var"]."', -risk_compliance_no='".$_POST["risk_compliance_no"]."', -risk_substance_na ='".$_POST["risk_substance_na"]."', -risk_substance_none='".$_POST["risk_substance_none"]."', -risk_normal_use='".$_POST["risk_normal_use"]."', -risk_substance_ou='".$_POST["risk_substance_ou"]."', -risk_substance_dp='".$_POST["risk_substance_dp"]."', -risk_substance_ur='".$_POST["risk_substance_ur"]."', -risk_substance_ab='".$_POST["risk_substance_ab"]."', -risk_sexual_na='".$_POST["risk_sexual_na"]."', -risk_sexual_y='".$_POST["risk_sexual_y"]."', -risk_sexual_n='".$_POST["risk_sexual_n"]."', -risk_sexual_ry='".$_POST["risk_sexual_ry"]."', -risk_sexual_rn='".$_POST["risk_sexual_rn"]."', -risk_sexual_cv='".$_POST["risk_sexual_cv"]."', -risk_sexual_cp='".$_POST["risk_sexual_cp"]."', -risk_sexual_b='".$_POST["risk_sexual_b"]."', -risk_sexual_nf='".$_POST["risk_sexual_nf"]."', -risk_neglect_na='".$_POST["risk_neglect_na"]."', -risk_neglect_y='".$_POST["risk_neglect_y"]."', -risk_neglect_n='".$_POST["risk_neglect_n"]."', -risk_neglect_ry='".$_POST["risk_neglect_ry"]."', -risk_neglect_rn='".$_POST["risk_neglect_rn"]."', -risk_neglect_cv='".$_POST["risk_neglect_cv"]."', -risk_neglect_cp='".$_POST["risk_neglect_cp"]."', -risk_neglect_cb='".$_POST["risk_neglect_cb"]."', -risk_neglect_cn='".$_POST["risk_neglect_cn"]."', -risk_exists_c='".$_POST["risk_exists_c"]."', -risk_exists_cn='".$_POST["risk_exists_cn"]."', -risk_exists_s='".$_POST["risk_exists_s"]."', -risk_exists_o='".$_POST["risk_exists_o"]."', -risk_exists_b='".$_POST["risk_exists_b"]."', -risk_community='".$_POST["risk_community"]."', -recommendations_psy_i='".$_POST["recommendations_psy_i"]."', -recommendations_psy_f='".$_POST["recommendations_psy_f"]."', -recommendations_psy_m='".$_POST["recommendations_psy_m"]."', -recommendations_psy_o='".$_POST["recommendations_psy_o"]."', -recommendations_psy_notes='".$_POST["recommendations_psy_notes"]."', -refer_date='".$_POST["refer_date"]."', -parent ='".$_POST["parent"]."', -supervision_level='".$_POST["supervision_level"]."', -supervision_type='".$_POST["supervision_type"]."', -supervision_res='".$_POST["supervision_res"]."', -supervision_services='".$_POST["supervision_services"]."', -support_ps='".$_POST["support_ps"]."', -support_cs='".$_POST["support_cs"]."', -support_sm='".$_POST["support_sm"]."', -support_a='".$_POST["support_a"]."', -support_o='".$_POST["support_o"]."', -support_ol='".$_POST["support_ol"]."', -legal_op='".$_POST["legal_op"]."', -legal_so='".$_POST["legal_so"]."', -legal_sa='".$_POST["legal_sa"]."', -legal_ve='".$_POST["legal_ve"]."', -legal_ad='".$_POST["legal_ad"]."', -legal_adl='".$_POST["legal_adl"]."', -legal_o='".$_POST["legal_o"]."', -legal_ol='".$_POST["legal_ol"]."', -referrals_pepm='".$_POST["referrals_pepm"]."', -referrals_mc='".$_POST["referrals_mc"]."', -referrals_vt='".$_POST["referrals_vt"]."', -referrals_o='".$_POST["referrals_o"]."', -referrals_cu='".$_POST["referrals_cu"]."', -referrals_docs='".$_POST["referrals_docs"]."', -referrals_or='".$_POST["referrals_or"]."' where id=$id"); -} - -$_SESSION["encounter"] = $encounter; -formHeader("Redirecting...."); -formJump(); -formFooter(); + @@ -26,12 +26,12 @@ include_once("../../globals.php"); topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> -
" name="my_form"> +" name="my_form">
Assessment and Intake


[Save] @@ -40,20 +40,20 @@ $obj = formFetch("form_assessment_intake", $_GET["id"]); onclick="top.restoreSession()">[Don't Save Changes]

- -Name:  +Name:  Date: 

-SSN:  -DCN: "> -

-Address: 

-Telephone Number:  -Date of Birth: 

- - -

+SSN:  +DCN: "> +

+Address: 

+Telephone Number:  +Date of Birth: 

+ + +

Purpose:  >New client evaluation @@ -62,54 +62,54 @@ $result = SqlFetchArray($res); ?> };?> >Readmission >Consultation

-

+};?> >Consultation

+

Why is Assessment being requested (Goals and treatment expectations of the individual requesting services):
-
+
Behavior that led to Assessment:
-

+

Areas of Functioning:

School/Work:
-

+

Personal Relationships (Intimate):  -

+

Family Relationships:    Father involved/present/absent (Describe relationship)
-
+
Mother involved/present/absent (Describe relationship)
-

-Number of children: ">
Names, ages, quality of relationship(s):
-

+

+Number of children: ">
Names, ages, quality of relationship(s):
+

Other family relationships:
-

+

Social Relationships (Peers/Friends):
-

+

Psychological/Personal Functioning (Current symptons):
-

+

Personal resources and strengths (including the availability & use of family and peers):
-

-Spiritual: ">  -Legal: ">

+

+Spiritual: ">  +Legal: ">

Prior Mental Health History/Treatment:
-

-Number of admissions: ">  -Types of admissions: ">

+

+Number of admissions: ">  +Types of admissions: ">

Alcohol and substance use for the past 30 days:
-

+

Substance abuse history (Include duration, patterns, and consequences of use):
-

+

Diagnoses

Axis I:
-

+

Axis II:
-

+

Axis III:
-

-Allergies/Adverse reactions to medications: ">

+

+Allergies/Adverse reactions to medications: ">

Axis IV Psychosocial and environmental problems in the last year:
Other (specify):
-

+

Axis V Global Assessment of Functioning (GAF) Scale (100 down to 0):
-Currently"> +Currently"> -Past Year">

+Past Year">

Assessment of Currently Known Risk Factors:

Suicide:
Intent with means
-
+
Compliance with treatment:
Not Assessed @@ -226,7 +226,7 @@ $result = SqlFetchArray($res); ?> Little or no compliance
-
+
Substance Abuse:
Not Assessed @@ -234,7 +234,7 @@ $result = SqlFetchArray($res); ?> None/normal use:
-
+
Overuse @@ -250,7 +250,7 @@ $result = SqlFetchArray($res); ?> Abuse
-
+
Current physical or sexual abuse:
Not Assessed @@ -337,10 +337,10 @@ $result = SqlFetchArray($res); ?> both

- + Risk to community (criminal):
-
- +
+ Assessment Recommendations:

Outpatient Psychotherapy: @@ -360,29 +360,29 @@ $result = SqlFetchArray($res); ?> Other
-
+
Date report sent to referral source: - "> + "> Parent/Guardian: - "> + ">
Level of supervision needed:
-
+
Type of program:
-
+
Residential or long-term placement recommended: -
+
Support services needed:
-
- +
+ Parenting skills/child management @@ -402,8 +402,8 @@ $result = SqlFetchArray($res); ?> Other
-

- +

+ Legal Services: Substance abuse
- + Victum empathy group @@ -426,39 +426,39 @@ $result = SqlFetchArray($res); ?> echo "checked"; };?>> Referral to advocate - "> + ">
Other: - +
Other:
-

- +

+ Referrals for Continuing Services

Psychiatric Evaluation Psychotropic Medications:
-

+

Medical Care:
-

- +

+ Educational/vocational services:
-

- +

+ Other:
-

+

Current use of resources/services from other community agencies:
-

- +

+ Documents to be obtainded (Release of Information Required):
-

- +

+ Other needed resources and services:
-

+

-- 2.11.4.GIT