editReport($_POST, $pid, $_GET["id"], $_POST["form"]); } else{ $db->addReport($_POST, $pid, $_POST["form"]); } if(!empty($_GET["req"])){ $db->omitRequisition($_GET["req"]); } if(!empty($_GET["src"]) && $_GET["src"]=="index"){ header("Location: index.php"); exit(); } else{ header("Location: view.php?pid=".$_GET["pid"]); exit(); } } if(isSet($_GET["id"])){ $data=$db->getData($pid, $_GET["id"], "reports"); $data=json_decode($data->fetchArray()["data"]); } $abx=json_decode(file_get_contents(CONFIG_WWW."autocomplete/vitek.json")); if($_GET["form"]=="report-as-grampos"){ $list=$abx->gram_positive; } elseif($_GET["form"]=="report-as-gramneg"){ $list=$abx->gram_negative; } elseif($_GET["form"]=="report-as-fungal"){ $list=$abx->fungal; } $form="
"; $form=$form."Sample Date | |||
Report Date | |||
Sample | |||
Lab ID | |||
Organism | |||
Antibiotic | MIC | Interpretation | "; foreach($list as $k=>$v){ if(!empty($data)){ $mic="value='".$data->$k->mic."'"; $interpretation="value='".$data->$k->interpretation."'"; } else{ $mic=""; $interpretation=""; } $form=$form."|
---|---|---|---|