Added qgit package installation to developer appliance and cvs demo scripts.
[openemr.git] / contrib / forms / mh_therapy_progress / save.php
blob0cb9b0171eac60e819edbe119049fa9080cf497e
1 <?php
3 include_once("../../globals.php");
4 include_once("$srcdir/api.inc");
5 include_once("$srcdir/forms.inc");
6 foreach ($_POST as $k => $var) {
7 $_POST[$k] = mysql_escape_string($var);
8 echo "$var\n";
10 if ($encounter == "")
11 $encounter = date("Ymd");
12 if ($_GET["mode"] == "new"){
13 $newid = formSubmit("form_mh_therapy_progress", $_POST, $_GET["id"], $userauthorized);
15 addForm($encounter, "Therapy Progress Note", $newid, "mh_therapy_progress", $pid, $userauthorized);
16 }elseif ($_GET["mode"] == "update") {
17 sqlInsert("update form_mh_therapy_progress set pid = {$_SESSION["pid"]},groupname='".$_SESSION["authProvider"]."',user='".$_SESSION["authUser"]."',authorized=$userauthorized,activity=1, date = NOW(),
18 time_in ='".$_POST["time_in"]."',
19 time_out ='".$_POST["time_out"]."',
20 meeting_scheduled ='".$_POST["meeting_scheduled"]."',
21 meeting_emergency='".$_POST["meeting_emergency"]."',
22 others_present='".$_POST["others_present"]."',
23 meeting_lasted='".$_POST["meeting_lasted"]."',
24 number_of_units='".$_POST["number_of_units"]."',
25 icd9='".$_POST["icd9"]."',
26 client_ontime='".$_POST["client_ontime"]."',
27 client_late='".$_POST["client_late"]."',
28 was_late_by='".$_POST["was_late_by"]."',
29 did_not_show='".$_POST["did_not_show"]."',
30 cancelled='".$_POST["cancelled"]."',
31 next_meeting='".$_POST["next_meeting"]."',
32 location_office='".$_POST["location_office"]."',
33 location_detention='".$_POST["location_detention"]."',
34 location_home='".$_POST["location_home"]."',
35 location_school='".$_POST["location_school"]."',
36 location_hosp='".$_POST["location_hosp"]."',
37 location_other='".$_POST["location_other"]."',
38 location_other_block='".$_POST["location_other_block"]."',
39 location_facility_code='".$_POST["location_facility_code"]."',
40 treatment_individual_therapy='".$_POST["treatment_individual_therapy"]."',
41 treatment_family='".$_POST["treatment_family"]."',
42 treatment_group='".$_POST["treatment_group"]."',
43 treatment_couple='".$_POST["treatment_couple"]."',
44 treatment_assessment='".$_POST["treatment_assessment"]."',
45 treatment_service_code='".$_POST["treatment_service_code"]."',
46 paysource_medicaid ='".$_POST["paysource_medicaid"]."',
47 paysource_dfs ='".$_POST["paysource_dfs"]."',
48 paysource_private ='".$_POST["paysource_private"]."',
49 paysource_other ='".$_POST["paysource_other"]."',
50 paysource_other_block ='".$_POST["paysource_other_block"]."',
51 paysource_county ='".$_POST["paysource_county"]."',
52 topics_of_discussion ='".$_POST["topics_of_discussion"]."',
53 progress_towards_goals='".$_POST["progress_towards_goals"]."',
54 medications ='".$_POST["medications"]."',
55 functioning_since_session ='".$_POST["functioning_since_session"]."',
56 mood_normal ='".$_POST["mood_normal"]."',
57 mood_anxious ='".$_POST["mood_anxious"]."',
58 mood_depressed ='".$_POST["mood_depressed"]."',
59 mood_angry ='".$_POST["mood_angry"]."',
60 mood_euphoric ='".$_POST["mood_euphoric"]."',
61 affect_normal ='".$_POST["affect_normal"]."',
62 affect_intense ='".$_POST["affect_intense"]."',
63 affect_blunted ='".$_POST["affect_blunted"]."',
64 affect_inappropriate ='".$_POST["affect_inappropriate"]."',
65 affect_labile ='".$_POST["affect_labile"]."',
66 mentalstatus_normal ='".$_POST["mentalstatus_normal"]."',
67 mentalstatus_lessened_awareness ='".$_POST["mentalstatus_lessened_awareness"]."',
68 mentalstatus_memory_deficiencies ='".$_POST["mentalstatus_memory_deficiencies"]."',
69 mentalstatus_disorientated ='".$_POST["mentalstatus_disorientated"]."',
70 mentalstatus_disorganized ='".$_POST["mentalstatus_disorganized"]."',
71 mentalstatus_vigilant ='".$_POST["mentalstatus_vigilant"]."',
72 mentalstatus_delusional ='".$_POST["mentalstatus_delusional"]."',
73 mentalstatus_hallucinating ='".$_POST["mentalstatus_hallucinating"]."',
74 mentalstatus_other ='".$_POST["mentalstatus_other"]."',
75 mentalstatus_other_block ='".$_POST["mentalstatus_other_block"]."',
76 suicide_violance_risk_none ='".$_POST["suicide_violance_risk_none"]."',
77 suicide_violance_risk_ideation_only ='".$_POST["suicide_violance_risk_ideation_only"]."',
78 suicide_violance_risk_threat ='".$_POST["suicide_violance_risk_threat"]."',
79 suicide_violance_risk_gesture ='".$_POST["suicide_violance_risk_gesture"]."',
80 suicide_violance_risk_rehearsal='".$_POST["suicide_violance_risk_rehearsal"]."',
81 suicide_violance_risk_attempt='".$_POST["suicide_violance_risk_attempt"]."',
82 sleep_quality_normal='".$_POST["sleep_quality_normal"]."',
83 sleep_quality_restless='".$_POST["sleep_quality_restless"]."',
84 sleep_quality_insomnia='".$_POST["sleep_quality_insomnia"]."',
85 sleep_quality_nightmares='".$_POST["sleep_quality_nightmares"]."',
86 sleep_quality_oversleeps='".$_POST["sleep_quality_oversleeps"]."',
87 participation_level_active='".$_POST["participation_level_active"]."',
88 participation_level_variable='".$_POST["participation_level_variable"]."',
89 participation_level_only_responsive='".$_POST["participation_level_only_responsive"]."',
90 participation_level_minimal='".$_POST["participation_level_minimal"]."',
91 participation_level_none='".$_POST["participation_level_none"]."',
92 participation_level_resistant='".$_POST["participation_level_resistant"]."',
93 treatment_compliance_full='".$_POST["treatment_compliance_full"]."',
94 treatment_compliance_partial='".$_POST["treatment_compliance_partial"]."',
95 treatment_compliance_low='".$_POST["treatment_compliance_low"]."',
96 response_to_treatment_as_expected='".$_POST["response_to_treatment_as_expected"]."',
97 response_to_treatment_better='".$_POST["response_to_treatment_better"]."',
98 response_to_treatment_much='".$_POST["response_to_treatment_much"]."',
99 response_to_treatment_poorer='".$_POST["response_to_treatment_poorer"]."',
100 response_to_treatment_very_poor='".$_POST["response_to_treatment_very_poor"]."',
101 gaf='".$_POST["gaf"]."',
102 other_observations ='".$_POST["other_observations"]."',
103 diagnosis_changes_none='".$_POST["diagnosis_changes_none"]."',
104 diagnosis_changes='".$_POST["diagnosis_changes"]."',
105 followups_next='".$_POST["followups_next"]."',
106 followups_next_date='".$_POST["followups_next_date"]."',
107 followups_next_week='".$_POST["followups_next_week"]."',
108 followups_next_month='".$_POST["followups_next_month"]."',
109 followups_next_2_months='".$_POST["followups_next_2_months"]."',
110 followups_next_3_months='".$_POST["followups_next_3_months"]."',
111 followups_next_as_needed='".$_POST["followups_next_as_needed"]."',
112 followups_referral='".$_POST["followups_referral"]."',
113 followups_referral_to='".$_POST["followups_referral_to"]."',
114 followups_referral_for='".$_POST["followups_referral_for"]."',
115 followups_call='".$_POST["followups_call"]."',
116 followups_call_to='".$_POST["followups_call_to"]."',
117 followups_call_for='".$_POST["followups_call_for"]."' where id=$id");
119 $_SESSION["encounter"] = $encounter;
120 formHeader("Redirecting....");
121 formJump();
122 formFooter();