added appointments-encounters report
[openemr.git] / contrib / forms / ped_fever / save.php
blob189917c133352512adec314c5ac0d68e89f00868
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] = mysql_escape_string($var);
10 echo "$var\n";
13 if ($encounter == "") $encounter = date("Ymd");
15 if ($_GET["mode"] == "new"){
16 $newid = formSubmit("form_ped_fever", $_POST, $_GET["id"], $userauthorized);
17 addForm($encounter, "Pediatric Fever Evaluation", $newid, "ped_fever", $pid, $userauthorized);
18 } elseif ($_GET["mode"] == "update") {
19 sqlInsert("update form_ped_fever set `pid` = {$_SESSION["pid"]},
20 `groupname`='".$_SESSION["authProvider"]."',
21 `user`='".$_SESSION["authUser"]."',
22 `authorized`=$userauthorized,
23 `activity`=1,
24 `date` = NOW(),
26 `measured`='".$_POST["measured"]."',
27 `duration`='".$_POST["duration"]."',
28 `taking_medication`='".$_POST["severity"]."',
29 `responds_to_tylenol`='".$_POST["responds_to_tylenol"]."',
30 `responds_to_moltrin`='".$_POST["responds_to_moltrin"]."',
31 `pain`='".$_POST["pain"]."',
32 `lethargy`='".$_POST["lethargy"]."',
33 `vomiting`='".$_POST["vomiting"]."',
34 `oral_hydration_capable`='".$_POST["oral_hydration_capable"]."',
35 `urine_output_last_6_hours`='".$_POST["urine_output_last_6_hours"]."',
36 `pain_with_urination`='".$_POST["pain_with_urination"]."',
37 `cough_or_breathing_difficulty`='".$_POST["cough_or_breathing_difficulty"]."',
38 `able_to_sleep`='".$_POST["able_to_sleep"]."',
39 `nasal_discharge`='".$_POST["nasal_discharge"]."',
40 `previous_hospitalization`='".$_POST["previous_hospitalization"]."',
41 `siblings_affected`='".$_POST["siblings_affected"]."',
42 `immunization_up_to_date`='".$_POST["immunization_up_to_date"]."',
43 `notes`='".$_POST["notes"]."'
44 WHERE id=$id");
47 $_SESSION["encounter"] = $encounter;
49 formHeader("Redirecting....");
50 formJump();
51 formFooter();