From: Agnibho Mondal Date: Wed, 19 May 2021 15:40:24 +0000 (+0530) Subject: Bugfixes X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=ecf32dd27745776c3743908e28b65ac2d84b8aea;p=simpleipd.git Bugfixes --- diff --git a/lib/functions.php b/lib/functions.php index 2ee182a..e9a78a9 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -136,6 +136,7 @@ function viewAntibiogram($data, $edit){ $view=""; $view=$view.""; $view=$view.""; + $view=$view.""; $view=$view.""; foreach($data as $k=>$v){ if(is_object($v)){ diff --git a/lib/log.php b/lib/log.php index dc339f1..9552416 100644 --- a/lib/log.php +++ b/lib/log.php @@ -4,9 +4,10 @@ class LG extends SQLite3 { $this->open(CONFIG_LOG); } function log($pid, $action, $data){ - $stmt=$this->prepare("INSERT INTO log (pid, user, action, time, data) VALUES (:pid, :user, :action, :time, :data)"); + $stmt=$this->prepare("INSERT INTO log (pid, user, ip, action, time, data) VALUES (:pid, :user, :ip, :action, :time, :data)"); $stmt->bindValue(":pid", $pid); $stmt->bindValue(":user", $_SESSION["user"]); + $stmt->bindValue(":ip", $_SERVER["REMOTE_ADDR"]); $stmt->bindValue(":action", $action); $stmt->bindValue(":time", time()); $stmt->bindValue(":data", $data); diff --git a/log.schema.sql b/log.schema.sql index 1a6a775..d2f1daf 100644 --- a/log.schema.sql +++ b/log.schema.sql @@ -1,6 +1,7 @@ CREATE TABLE log( pid int, user text, +ip text, action text, time int, data text diff --git a/www/antibiogram.php b/www/antibiogram.php index 418acd0..deaeaff 100644 --- a/www/antibiogram.php +++ b/www/antibiogram.php @@ -42,20 +42,24 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){ $form=""; $form=$form."
Vitek Report".$data->date."
Sample".$data->sample."
Organism".$data->organism."
AntibioticMICInterpretation
"; if(!empty($data)){ + var_dump($data->organism); $date="value='".$data->date."'"; - $sample="value'".$data->sample."'"; + $sample="value='".$data->sample."'"; + $organism="value='".$data->organism."'"; } elseif(!empty($_GET["sample"])){ $date=""; $sample="value='".$_GET["sample"]."'"; + $organism=""; } else{ $date=""; $sample=""; + $organism=""; } $form=$form.""; $form=$form.""; - $form=$form.""; + $form=$form.""; $form=$form.""; foreach($list as $k=>$v){ if(!empty($data)){ @@ -66,7 +70,7 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){ $mic=""; $interpretation=""; } - $form=$form.""; + $form=$form.""; } if(!empty($data)){ $name="value='".$data->other->name."'"; diff --git a/www/autocomplete/vitek.json b/www/autocomplete/vitek.json index c61eb8a..8ebe303 100644 --- a/www/autocomplete/vitek.json +++ b/www/autocomplete/vitek.json @@ -1,5 +1,5 @@ { - "gram_positive": { + "gram_negative": { "ampicillin": "Ampicillin", "amoxicillin_clavulinc_acid": "Amoxicillin/Clavulinic Acid", "piperacillin_tazobactum": "Piperacillin/tazobactum", @@ -20,7 +20,7 @@ "colistin": "Colistin", "trimethoprim_sulphamethoxazole": "Trimethoprim/Sulfamethoxazole" }, - "gram_negative": { + "gram_positive": { "cefoxitin_screen": "Cefoxitin Screen", "benzylpenicillin": "Benzylpenicillin", "oxacillin": "Oxacillin", diff --git a/www/index.php b/www/index.php index 1cda66f..9238ff9 100644 --- a/www/index.php +++ b/www/index.php @@ -12,10 +12,10 @@ while($arr=$reqs->fetchArray()){ $pid=$arr["pid"]; if(!empty($arr["form"])){ if($arr["form"]=="report-cs"){ - $test="".$arr["test"].""; + $test="".$arr["test"].""; } else{ - $test="".$arr["test"].""; + $test="".$arr["test"].""; } } else{ diff --git a/www/laboratory.php b/www/laboratory.php index 3f8b55d..a3e5d58 100644 --- a/www/laboratory.php +++ b/www/laboratory.php @@ -5,7 +5,12 @@ if(isSet($_GET["pid"])){ foreach(glob("forms/report*.json") as $file){ $pid=$_GET["pid"]; $form=json_decode(file_get_contents($file)); - $list=$list."
  • ".$form->description."
  • "; + if($form->title=="culture_sensitivity"){ + $list=$list."
  • ".$form->description."
  • "; + } + else{ + $list=$list."
  • ".$form->description."
  • "; + } } } ?> @@ -22,9 +27,6 @@ if(isSet($_GET["pid"])){

    List of Tests

    diff --git a/www/requisition.php b/www/requisition.php index 3c9f7a8..6cc10d4 100644 --- a/www/requisition.php +++ b/www/requisition.php @@ -25,7 +25,6 @@ if(isSet($_GET["pid"])){ foreach($inv->tests as $t){ $testList=$testList.""; } - $testList=$testList.""; $roomList=""; foreach($inv->rooms as $r){ $roomList=$roomList.""; diff --git a/www/res/script.js b/www/res/script.js index 0e7abad..bb0ce4d 100644 --- a/www/res/script.js +++ b/www/res/script.js @@ -21,11 +21,12 @@ $(document).ready(function(){ $(this).val(moment().format("hh:mm")); } }); + $("[data-toggle='popover']").popover({"placement": "top", "trigger": "focus"}); if($("[name='drug']").length){ $(this).prop("autocomplete","off"); $.get("autocomplete/drugs.json", function(data){ $("[name='drug']").each(function(){ - $(this).autocomplete({source:data, highlightClass:'text-danger',treshold:2}); + $(this).autocomplete({source:data, highlightClass:'text-danger',treshold:1}); }); }); }; @@ -33,7 +34,7 @@ $(document).ready(function(){ $(this).prop("autocomplete","off"); $.get("autocomplete/route.json", function(data){ $("[name='route']").each(function(){ - $(this).autocomplete({source:data, highlightClass:'text-danger',treshold:1}); + $(this).autocomplete({source:data, highlightClass:'text-danger',treshold:0}); }); }); }; @@ -41,7 +42,7 @@ $(document).ready(function(){ $(this).prop("autocomplete","off"); $.get("autocomplete/frequency.json", function(data){ $("[name='frequency']").each(function(){ - $(this).autocomplete({source:data, highlightClass:'text-danger',treshold:1}); + $(this).autocomplete({source:data, highlightClass:'text-danger',treshold:0}); }); }); }; @@ -49,7 +50,7 @@ $(document).ready(function(){ $(this).prop("autocomplete","off"); $.get("autocomplete/investigation.json", function(data){ $("[name='sample']").each(function(){ - $(this).autocomplete({source:data.sample, highlightClass:'text-danger',treshold:1}); + $(this).autocomplete({source:data.sample, highlightClass:'text-danger',treshold:0}); }); }); }; diff --git a/www/vitek.php b/www/vitek.php index 641e234..61d23fe 100644 --- a/www/vitek.php +++ b/www/vitek.php @@ -1,12 +1,18 @@

    Type of Organism

    Date
    Sample
    Organism
    Organism
    AntibioticMICInterpretation