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);
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 = ?,
30 taking_medication = ?,
31 responds_to_tylenol = ?,
32 responds_to_moltrin = ?,
36 oral_hydration_capable = ?,
37 urine_output_last_6_hours = ?,
38 pain_with_urination = ?,
39 cough_or_breathing_difficulty = ?,
42 previous_hospitalization = ?,
43 siblings_affected = ?,
44 immunization_up_to_date = ?,
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....");