Highway to PSR2
[openemr.git] / contrib / forms / ped_fever / save.php
blob6f4781a6570b36dbe1d0f8737b3ff8c65e9da29c
1 <?php
2 //
4 include_once("../../globals.php");
5 include_once("$srcdir/api.inc");
6 include_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` = {$_SESSION["pid"]},
22 `groupname`='".$_SESSION["authProvider"]."',
23 `user`='".$_SESSION["authUser"]."',
24 `authorized`=$userauthorized,
25 `activity`=1,
26 `date` = NOW(),
28 `measured`='".$_POST["measured"]."',
29 `duration`='".$_POST["duration"]."',
30 `taking_medication`='".$_POST["severity"]."',
31 `responds_to_tylenol`='".$_POST["responds_to_tylenol"]."',
32 `responds_to_moltrin`='".$_POST["responds_to_moltrin"]."',
33 `pain`='".$_POST["pain"]."',
34 `lethargy`='".$_POST["lethargy"]."',
35 `vomiting`='".$_POST["vomiting"]."',
36 `oral_hydration_capable`='".$_POST["oral_hydration_capable"]."',
37 `urine_output_last_6_hours`='".$_POST["urine_output_last_6_hours"]."',
38 `pain_with_urination`='".$_POST["pain_with_urination"]."',
39 `cough_or_breathing_difficulty`='".$_POST["cough_or_breathing_difficulty"]."',
40 `able_to_sleep`='".$_POST["able_to_sleep"]."',
41 `nasal_discharge`='".$_POST["nasal_discharge"]."',
42 `previous_hospitalization`='".$_POST["previous_hospitalization"]."',
43 `siblings_affected`='".$_POST["siblings_affected"]."',
44 `immunization_up_to_date`='".$_POST["immunization_up_to_date"]."',
45 `notes`='".$_POST["notes"]."'
46 WHERE id=$id");
49 $_SESSION["encounter"] = $encounter;
51 formHeader("Redirecting....");
52 formJump();
53 formFooter();