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.""; if(!empty($data)){ $date="value='".$data->date."'"; $sample="value='".$data->sample."'"; $labid="value='".$data->labid."'"; $organism="value='".$data->organism."'"; } elseif(!empty($_GET["time"]) || !empty($_GET["sample"])){ if(!empty($_GET["time"])){ $date="value='".date("Y-m-d", $_GET["time"])."'"; } if(!empty($_GET["sample"])){ $sample="value='".$_GET["sample"]."'"; } $labid=""; $organism=""; } else{ $date=""; $sample=""; $labid=""; $organism=""; } $form=$form.""; $form=$form.""; $form=$form.""; $form=$form.""; $form=$form.""; $form=$form.""; foreach($list as $k=>$v){ if(!empty($data)){ $mic="value='".$data->$k->mic."'"; $interpretation="value='".$data->$k->interpretation."'"; } else{ $mic=""; $interpretation=""; } $form=$form.""; } if(!empty($data)){ $name="value='".$data->other->name."'"; $mic="value='".$data->other->mic."'"; $interpretation="value='".$data->other->interpretation."'"; } else{ $name=""; $mic=""; $interpretation=""; } $form=$form.""; if(!empty($data)){ $note=$data->note; } else{ $note=""; } $form=$form.""; $form=$form.""; $form=$form."
Sample Date
Report Date
Sample
Lab ID
Organism
AntibioticMICInterpretation
"; } ?> Antibiogram