From 5c76fc082a1ab48f2e3ac1ed7f7d29c102e76237 Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Thu, 3 Jun 2021 10:55:05 +0530 Subject: [PATCH] Added onset --- www/forms/history.schema.json | 5 +++++ www/view.php | 9 +++++++++ 2 files changed, 14 insertions(+) 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

-- 2.39.5