3 require_once("../../globals.php");
4 require_once("$srcdir/api.inc.php");
5 require_once("$srcdir/forms.inc.php");
7 if ($encounter == "") {
8 $encounter = date("Ymd");
11 if ($_GET["mode"] == "new") {
12 $newid = formSubmit("form_individual_treatment_plan", $_POST, $_GET["id"], $userauthorized);
14 addForm($encounter, "Individual Treatment Plan", $newid, "individual_treatment_plan", $pid, $userauthorized);
15 } elseif ($_GET["mode"] == "update") {
16 sqlStatement("update form_individual_treatment_plan set pid = ?, groupname= ?, user = ?, authorized = ?, activity=1, date = NOW(),
21 diagnosis_description = ?,
22 presenting_problem = ?,
26 short_term_goals_1 = ?,
28 short_term_goals_2 = ?,
30 short_term_goals_3 = ?,
33 discharge_criteria = ?,
34 individual_family_therapy = ?,
38 action_steps_by_supports = ?,
39 other_supports_name_1 = ?,
40 other_supports_name_2 = ?,
41 other_supports_contact_1 = ?,
42 other_supports_contact_2 = ?,
46 referrals_2 = ? where id=?", array($_SESSION["pid"], $_SESSION["authProvider"], $_SESSION["authUser"], $userauthorized, $_POST["date_of_referal"], $_POST["dcn"], $_POST["icd9"], $_POST["prognosis"],$_POST["diagnosis_description"],
47 $_POST["presenting_problem"], $_POST["frequency"], $_POST["duration"], $_POST["scope"], $_POST["short_term_goals_1"], $_POST["time_frame_1"], $_POST["short_term_goals_2"], $_POST["time_frame_2"],
48 $_POST["short_term_goals_3"], $_POST["time_frame_3"], $_POST["long_term_goals"], $_POST["discharge_criteria"], $_POST["individual_family_therapy"], $_POST["substance_abuse"], $_POST["group_therapy"],
49 $_POST["parenting"], $_POST["action_steps_by_supports"], $_POST["other_supports_name_1"], $_POST["other_supports_name_2"], $_POST["other_supports_contact_1"], $_POST["other_supports_contact_2"],$_POST["medications_1"],
50 $_POST["medications_2"], $_POST["referrals_1"], $_POST["referrals_2"], $id));
53 formHeader("Redirecting....");