From 5e4746ec2301a085f99aee14344ae872889023ac Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Mon, 17 May 2021 12:38:27 +0530 Subject: [PATCH] Updated input field formats --- forms/admission.schema.json | 12 +++++++++++- forms/history.schema.json | 9 ++++++--- forms/nursing.schema.json | 6 +++++- forms/report-other.schema.json | 3 ++- lib/functions.php | 12 +++++++++--- report.php | 2 +- 6 files changed, 34 insertions(+), 10 deletions(-) diff --git a/forms/admission.schema.json b/forms/admission.schema.json index 24a5bc0..f2d76f5 100644 --- a/forms/admission.schema.json +++ b/forms/admission.schema.json @@ -35,6 +35,15 @@ "type": "string", "format": "date" }, + "time": { + "description": "Time of Admission", + "type": "string", + "format": "time" + }, + "vp": { + "description": "Visiting Physician", + "type": "string" + }, "ward": { "description": "Ward", "type": "string" @@ -49,7 +58,8 @@ }, "summary": { "description": "Summary", - "type": "string" + "type": "string", + "format": "textarea" } }, "required": ["pid", "name", "age", "sex", "date"] diff --git a/forms/history.schema.json b/forms/history.schema.json index 1349c66..5985145 100644 --- a/forms/history.schema.json +++ b/forms/history.schema.json @@ -17,11 +17,13 @@ }, "cc": { "description": "Chief complaint", - "type": "string" + "type": "string", + "format": "textarea" }, "history": { "description": "History", - "type": "string" + "type": "string", + "format": "textarea" }, "comorb": { "description": "Comorbidities", @@ -29,7 +31,8 @@ }, "oe": { "description": "General Examination", - "type": "string" + "type": "string", + "format": "textarea" }, "bp": { "description": "Blood Pressure", diff --git a/forms/nursing.schema.json b/forms/nursing.schema.json index 03ddc37..83ea585 100644 --- a/forms/nursing.schema.json +++ b/forms/nursing.schema.json @@ -21,10 +21,14 @@ }, "intake": { "description": "Intake", - "type": "string" + "type": "integer" }, "output": { "description": "Output", + "type": "integer" + }, + "bw": { + "description": "Body Weight", "type": "string" }, "bp": { diff --git a/forms/report-other.schema.json b/forms/report-other.schema.json index 57749cb..c790698 100644 --- a/forms/report-other.schema.json +++ b/forms/report-other.schema.json @@ -17,7 +17,8 @@ }, "report": { "description": "Report", - "type": "string" + "type": "string", + "format": "textarea" } }, "required": ["date"] diff --git a/lib/functions.php b/lib/functions.php index 3b8f715..51c3cb3 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -50,16 +50,19 @@ function schema2form($file, $pid=null, $id=null, $cat=null, $data=null){ } $form=$form.""; } + elseif(isSet($prop->format) && $prop->format=="textarea"){ + $form=$form.""; + } elseif($field=="pid"){ - $form=$form.""; + $form=$form.""; } else{ - $form=$form.""; + $form=$form.""; } $form=$form.""; } - $form=$form."
"; + $form=$form."
"; $form=$form.""; $form=$form.""; return $form; @@ -91,6 +94,9 @@ function viewData($data, $edit=null){ if(!empty($schema->properties->$field)){ $view=$view."".$schema->properties->$field->description."".$value.""; } + elseif($field=="extra-note"){ + $view=$view."Extra Notes".$value.""; + } else{ $view=$view."".$field."".$value.""; } diff --git a/report.php b/report.php index 004019c..571edab 100644 --- a/report.php +++ b/report.php @@ -41,7 +41,7 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){

Add New Report

-

">Upload PDF instead

+ Upload PDF instead

";}?>
-- 2.39.5