From: Agnibho Mondal Date: Fri, 11 Jun 2021 12:29:10 +0000 (+0530) Subject: Added reporting time X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=a42ffc12f7913e0550819f38b70e237ef6089b62;p=simpleipd.git Added reporting time --- diff --git a/lib/functions.php b/lib/functions.php index 5ab12ac..5ce0dc0 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -159,9 +159,25 @@ function viewData($data, $edit=null){ else{ $date=""; } + if(!empty($data->rdate)){ + if(!empty($data->rtime)){ + $rdate=date("M d, Y h:i a", strtotime($data->rdate." ".$data->rtime)); + } + else{ + $rdate=$data->rdate; + } + } + else{ + $rdate=""; + } $view=$view."".$description."".$date.""; $view=$view.""; $view=$view.""; + if(!empty($rdate)){ + $view=$view."Reported".$rdate.""; + $view=$view.""; + $view=$view.""; + } foreach($data as $field=>$value){ $warn=""; if(!empty($schema->properties->$field->range)){ @@ -170,7 +186,7 @@ function viewData($data, $edit=null){ else{ $warn=""; } - if(!empty($value) && $field!="form" && $field!="date" && $field!="time"){ + if(!empty($value) && $field!="form" && $field!="date" && $field!="time" && $field!="rdate" && $field!="rtime"){ if(!empty($schema->properties->$field)){ $view=$view."".$schema->properties->$field->description."".$value.""; if(!empty($schema->properties->$field->range)){ diff --git a/www/forms/report-abg.schema.json b/www/forms/report-abg.schema.json index 6eb9731..b100d10 100644 --- a/www/forms/report-abg.schema.json +++ b/www/forms/report-abg.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-cd4.schema.json b/www/forms/report-cd4.schema.json index bf7e314..f8a62bd 100644 --- a/www/forms/report-cd4.schema.json +++ b/www/forms/report-cd4.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-ch.schema.json b/www/forms/report-ch.schema.json index 98ab96a..c8e908e 100644 --- a/www/forms/report-ch.schema.json +++ b/www/forms/report-ch.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-chik.schema.json b/www/forms/report-chik.schema.json index b930f37..0a65a7e 100644 --- a/www/forms/report-chik.schema.json +++ b/www/forms/report-chik.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-coagulation.schema.json b/www/forms/report-coagulation.schema.json index 3764a93..f951587 100644 --- a/www/forms/report-coagulation.schema.json +++ b/www/forms/report-coagulation.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-covid.schema.json b/www/forms/report-covid.schema.json index fba7104..3ad493c 100644 --- a/www/forms/report-covid.schema.json +++ b/www/forms/report-covid.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-crag.schema.json b/www/forms/report-crag.schema.json index de68169..4b5abd2 100644 --- a/www/forms/report-crag.schema.json +++ b/www/forms/report-crag.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-crp.schema.json b/www/forms/report-crp.schema.json index d1e975d..3bcbea1 100644 --- a/www/forms/report-crp.schema.json +++ b/www/forms/report-crp.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-cs.schema.json b/www/forms/report-cs.schema.json index 735539d..26129c3 100644 --- a/www/forms/report-cs.schema.json +++ b/www/forms/report-cs.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-dd.schema.json b/www/forms/report-dd.schema.json index d37ac67..04e1de0 100644 --- a/www/forms/report-dd.schema.json +++ b/www/forms/report-dd.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-ddimer.schema.json b/www/forms/report-ddimer.schema.json index 792393c..5d03358 100644 --- a/www/forms/report-ddimer.schema.json +++ b/www/forms/report-ddimer.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-dengue.schema.json b/www/forms/report-dengue.schema.json index 619569e..5ccdb5e 100644 --- a/www/forms/report-dengue.schema.json +++ b/www/forms/report-dengue.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-elctrolyte.schema.json b/www/forms/report-elctrolyte.schema.json index 4e2af12..a06ee1e 100644 --- a/www/forms/report-elctrolyte.schema.json +++ b/www/forms/report-elctrolyte.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-fluid.schema.json b/www/forms/report-fluid.schema.json index d296c22..3071c22 100644 --- a/www/forms/report-fluid.schema.json +++ b/www/forms/report-fluid.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-glycemic.schema.json b/www/forms/report-glycemic.schema.json index ec86bde..b7254e2 100644 --- a/www/forms/report-glycemic.schema.json +++ b/www/forms/report-glycemic.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-hepatitis.schema.json b/www/forms/report-hepatitis.schema.json index 56278b1..bc29b23 100644 --- a/www/forms/report-hepatitis.schema.json +++ b/www/forms/report-hepatitis.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-ictc.schema.json b/www/forms/report-ictc.schema.json index 6695407..1bae07e 100644 --- a/www/forms/report-ictc.schema.json +++ b/www/forms/report-ictc.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-je.schema.json b/www/forms/report-je.schema.json index 8466753..78f9346 100644 --- a/www/forms/report-je.schema.json +++ b/www/forms/report-je.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-ldh.schema.json b/www/forms/report-ldh.schema.json index c295cf4..aea19dc 100644 --- a/www/forms/report-ldh.schema.json +++ b/www/forms/report-ldh.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-lepto.schema.json b/www/forms/report-lepto.schema.json index f7c0b7e..695ecbc 100644 --- a/www/forms/report-lepto.schema.json +++ b/www/forms/report-lepto.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-lft.schema.json b/www/forms/report-lft.schema.json index 79bcb47..b7a8ea5 100644 --- a/www/forms/report-lft.schema.json +++ b/www/forms/report-lft.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-lipid.schema.json b/www/forms/report-lipid.schema.json index 31535f9..56f1672 100644 --- a/www/forms/report-lipid.schema.json +++ b/www/forms/report-lipid.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-malaria.schema.json b/www/forms/report-malaria.schema.json index c5dd9dd..9ab7a39 100644 --- a/www/forms/report-malaria.schema.json +++ b/www/forms/report-malaria.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-other.schema.json b/www/forms/report-other.schema.json index b642a0b..009d77c 100644 --- a/www/forms/report-other.schema.json +++ b/www/forms/report-other.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-pancreatitis.schema.json b/www/forms/report-pancreatitis.schema.json index 65942fc..4d845c7 100644 --- a/www/forms/report-pancreatitis.schema.json +++ b/www/forms/report-pancreatitis.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-pct.schema.json b/www/forms/report-pct.schema.json index 4127f26..3ffdc78 100644 --- a/www/forms/report-pct.schema.json +++ b/www/forms/report-pct.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-pvl.schema.json b/www/forms/report-pvl.schema.json index 2af8e52..fe66722 100644 --- a/www/forms/report-pvl.schema.json +++ b/www/forms/report-pvl.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-rft.schema.json b/www/forms/report-rft.schema.json index 8c2e35b..356e20f 100644 --- a/www/forms/report-rft.schema.json +++ b/www/forms/report-rft.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-scrub.schema.json b/www/forms/report-scrub.schema.json index daba841..1759508 100644 --- a/www/forms/report-scrub.schema.json +++ b/www/forms/report-scrub.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-serology.schema.json b/www/forms/report-serology.schema.json index 52ca12b..47afe44 100644 --- a/www/forms/report-serology.schema.json +++ b/www/forms/report-serology.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-sputum-me.schema.json b/www/forms/report-sputum-me.schema.json index 462a746..e5b78d0 100644 --- a/www/forms/report-sputum-me.schema.json +++ b/www/forms/report-sputum-me.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-stool-ova.schema.json b/www/forms/report-stool-ova.schema.json index 35ef4dc..ba1b681 100644 --- a/www/forms/report-stool-ova.schema.json +++ b/www/forms/report-stool-ova.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-stool-re.schema.json b/www/forms/report-stool-re.schema.json index c773452..c8402f2 100644 --- a/www/forms/report-stool-re.schema.json +++ b/www/forms/report-stool-re.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-thyroid.schema.json b/www/forms/report-thyroid.schema.json index 4a3bd29..e6eaef4 100644 --- a/www/forms/report-thyroid.schema.json +++ b/www/forms/report-thyroid.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-ua.schema.json b/www/forms/report-ua.schema.json index a81252c..40a2c35 100644 --- a/www/forms/report-ua.schema.json +++ b/www/forms/report-ua.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-urine-re.schema.json b/www/forms/report-urine-re.schema.json index e5a76ce..1b6219c 100644 --- a/www/forms/report-urine-re.schema.json +++ b/www/forms/report-urine-re.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" }, diff --git a/www/forms/report-vdrl.schema.json b/www/forms/report-vdrl.schema.json index ea057ca..2809b75 100644 --- a/www/forms/report-vdrl.schema.json +++ b/www/forms/report-vdrl.schema.json @@ -6,12 +6,22 @@ "properties": { "date": { - "description": "Date", + "description": "Sample Date", "type": "string", "format": "date" }, "time": { - "description": "Time", + "description": "Sample Time", + "type": "string", + "format": "time" + }, + "rdate": { + "description": "Report Date", + "type": "string", + "format": "date" + }, + "rtime": { + "description": "Report Time", "type": "string", "format": "time" },