From: Agnibho Mondal Date: Thu, 3 Jun 2021 05:25:05 +0000 (+0530) Subject: Added onset X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=5c76fc082a1ab48f2e3ac1ed7f7d29c102e76237;p=simpleipd.git Added onset --- diff --git a/www/forms/history.schema.json b/www/forms/history.schema.json index 5985145..9f72f00 100644 --- a/www/forms/history.schema.json +++ b/www/forms/history.schema.json @@ -20,6 +20,11 @@ "type": "string", "format": "textarea" }, + "onset": { + "description": "Onset of illness", + "type": "string", + "format": "date" + }, "history": { "description": "History", "type": "string", diff --git a/www/view.php b/www/view.php index 7a35daa..ed9ad62 100644 --- a/www/view.php +++ b/www/view.php @@ -30,6 +30,13 @@ if(isSet($_GET["pid"])){ } $info=viewData($db->getAdmissionData($pid)->fetchArray()["data"]); $history=viewData($db->getHistory($pid)->fetchArray()["history"]); + $onset=json_decode($db->getHistory($pid)->fetchArray()["history"])->onset; + if($onset){ + $diff="Day of illness: ".date_diff(new DateTime(), new DateTime($onset))->format("%a").""; + } + else{ + $diff=""; + } $physicianArray=$db->getAllData($pid, "physician"); while($c=$physicianArray->fetchArray()){ array_push($physician, viewData($c["data"], "physician.php?pid=".$pid."&id=".$c["rowid"])); @@ -129,6 +136,7 @@ if(isSet($_GET["pid"])){ +
DiagnosisgetDiagnosis($pid)->fetchArray()["diagnosis"];?>
SummarygetSummary($pid)->fetchArray()["summary"];?>
@@ -157,6 +165,7 @@ if(isSet($_GET["pid"])){
+

Edit