minor changes to prior commit
[openemr.git] / contrib / forms / ped_fever / save.php
blob06804a3155bbf5b5798b0af06bce71aaafa2bdc7
1 <?php
2 //
4 require_once("../../globals.php");
5 require_once("$srcdir/api.inc");
6 require_once("$srcdir/forms.inc");
8 foreach ($_POST as $k => $var) {
9 $_POST[$k] = add_escape_custom($var);
10 echo "$var\n";
13 if ($encounter == "") {
14 $encounter = date("Ymd");
17 if ($_GET["mode"] == "new") {
18 $newid = formSubmit("form_ped_fever", $_POST, $_GET["id"], $userauthorized);
19 addForm($encounter, "Pediatric Fever Evaluation", $newid, "ped_fever", $pid, $userauthorized);
20 } elseif ($_GET["mode"] == "update") {
21 sqlInsert("update form_ped_fever set pid = ?,
22 groupname = ?,
23 user = ?
24 authorized =,
25 activity =1,
26 date = NOW(),
28 measured = ?,
29 duration = ?,
30 taking_medication = ?,
31 responds_to_tylenol = ?,
32 responds_to_moltrin = ?,
33 pain = ?,
34 lethargy = ?,
35 vomiting = ?,
36 oral_hydration_capable = ?,
37 urine_output_last_6_hours = ?,
38 pain_with_urination = ?,
39 cough_or_breathing_difficulty = ?,
40 able_to_sleep = ?,
41 nasal_discharge = ?
42 previous_hospitalization = ?,
43 siblings_affected = ?,
44 immunization_up_to_date = ?,
45 notes = ?,
46 WHERE id = ?", array($_SESSION["pid"], $_SESSION["authProvider"], $_SESSION["authUser"], $userauthorized, $_POST["measured"], $_POST["duration"], $_POST["severity"], $_POST["responds_to_tylenol"],
47 $_POST["responds_to_moltrin"], $_POST["pain"], $_POST["lethargy"], $_POST["vomiting"], $_POST["oral_hydration_capable"], $_POST["urine_output_last_6_hours"],
48 $_POST["pain_with_urination"], $_POST["cough_or_breathing_difficulty"], $_POST["able_to_sleep"], $_POST["nasal_discharge"], $_POST["previous_hospitalization"],
49 $_POST["siblings_affected"], $_POST["immunization_up_to_date"], $_POST["notes"], $id ));
52 $_SESSION["encounter"] = $encounter;
54 formHeader("Redirecting....");
55 formJump();
56 formFooter();