From: Agnibho Mondal Date: Sun, 6 Jun 2021 19:08:45 +0000 (+0530) Subject: Added reference ranges X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=190843916b41848727e5fcdab1c063607548c948;p=simpleipd.git Added reference ranges --- diff --git a/lib/functions.php b/lib/functions.php index 770d3f0..72dc34a 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1,7 +1,10 @@ $arr[1]){ + if(!empty($arr[0]) && $val<$arr[0]){ + return "text-danger"; + } + elseif(!empty($arr[1]) && $val>$arr[1]){ return "text-danger"; } else{ @@ -14,13 +17,13 @@ function resolveRange($arr, $val=false){ $part[1]=$arr[0]; } else{ - $part[1]="<"; + $part[0]="<"; } if(!empty($arr[1])){ $part[3]=$arr[1]; } else{ - $part[1]=">"; + $part[0]=">"; } if(!empty($arr[0]) && !empty($arr[1])){ $part[2]="-"; diff --git a/www/forms/report-ch.schema.json b/www/forms/report-ch.schema.json index a1a2c4a..98ab96a 100644 --- a/www/forms/report-ch.schema.json +++ b/www/forms/report-ch.schema.json @@ -20,28 +20,33 @@ "type": "string" }, "hb": { - "description": "Hemoglobin", - "type": "number" + "description": "Hemoglobin (g/dL)", + "type": "number", + "range": [10,null] }, "mcv": { - "description": "MCV", - "type": "number" + "description": "MCV (fl)", + "type": "number", + "range": [80,100] }, "mch": { - "description": "MCH", - "type": "number" + "description": "MCH (pg)", + "type": "number", + "range": [27,31] }, "mchc": { - "description": "MCHC", - "type": "number" + "description": "MCHC (g/dL)", + "type": "number", + "range": [32,36] }, "rbc": { - "description": "RBC", + "description": "RBC (×106)", "type": "number" }, "wbc": { - "description": "WBC", - "type": "number" + "description": "WBC (×103)", + "type": "number", + "range": [4,8] }, "n": { "description": "Neutrophil", @@ -64,8 +69,9 @@ "type": "number" }, "plt": { - "description": "Platelet", - "type": "number" + "description": "Platelet (×103)", + "type": "number", + "range": [100,null] } }, "required": ["date"] diff --git a/www/forms/report-crp.schema.json b/www/forms/report-crp.schema.json index 6b030bd..f4f1ba0 100644 --- a/www/forms/report-crp.schema.json +++ b/www/forms/report-crp.schema.json @@ -20,8 +20,9 @@ "type": "string" }, "ldh": { - "description": "CRP", - "type": "number" + "description": "CRP (mg/L)", + "type": "number", + "range": [null,5] } }, "required": ["date"] diff --git a/www/forms/report-ddimer.schema.json b/www/forms/report-ddimer.schema.json index 79b7c57..792393c 100644 --- a/www/forms/report-ddimer.schema.json +++ b/www/forms/report-ddimer.schema.json @@ -20,8 +20,9 @@ "type": "string" }, "ddimer": { - "description": "D-Dimer", - "type": "number" + "description": "D-Dimer (µg/ml)", + "type": "number", + "range": [null,2] } }, "required": ["date"] diff --git a/www/forms/report-glycemic.schema.json b/www/forms/report-glycemic.schema.json index 87debd9..245468c 100644 --- a/www/forms/report-glycemic.schema.json +++ b/www/forms/report-glycemic.schema.json @@ -20,16 +20,19 @@ "type": "string" }, "fbs": { - "description": "FBS", - "type": "number" + "description": "FBS (mg/dL)", + "type": "number", + "range": [79,110] }, "ppbs": { - "description": "PPBS", - "type": "number" + "description": "PPBS (mg/dL)", + "type": "number", + "range": [null,160] }, "hba1c": { "description": "HbA1C", - "type": "number" + "type": "number", + "range": [null,6] } }, "required": ["date"] diff --git a/www/forms/report-ldh.schema.json b/www/forms/report-ldh.schema.json index 1f11b32..68a6eae 100644 --- a/www/forms/report-ldh.schema.json +++ b/www/forms/report-ldh.schema.json @@ -20,8 +20,9 @@ "type": "string" }, "ldh": { - "description": "LDH", - "type": "number" + "description": "LDH (U/L)", + "type": "number", + "range": [null,150] } }, "required": ["date"] diff --git a/www/forms/report-lft.schema.json b/www/forms/report-lft.schema.json index 0ea6c6c..2a3d64f 100644 --- a/www/forms/report-lft.schema.json +++ b/www/forms/report-lft.schema.json @@ -20,31 +20,35 @@ "type": "string" }, "tbr": { - "description": "Total Bilirubin", - "type": "number" + "description": "Total Bilirubin (mg/dL)", + "type": "number", + "range": [null,1] }, "cbr": { - "description": "Conjugated Bilirubin", + "description": "Conjugated Bilirubin (mg/dL)", "type": "number" }, "alb": { - "description": "Albumin", - "type": "number" + "description": "Albumin (g/dL)", + "type": "number", + "range": [3.5,null] }, "glob": { - "description": "Globulin", + "description": "Globulin (g/dL)", "type": "number" }, "sgot": { - "description": "SGOT", - "type": "number" + "description": "SGOT (IU/L)", + "type": "number", + "range": [null,35] }, "sgpt": { - "description": "SGPT", - "type": "number" + "description": "SGPT (IU/L)", + "type": "number", + "range": [null,35] }, "alp": { - "description": "Alkaline Phosphatase", + "description": "Alkaline Phosphatase (IU/L)", "type": "number" } }, diff --git a/www/forms/report-lipid.schema.json b/www/forms/report-lipid.schema.json index 43dffaf..93052f4 100644 --- a/www/forms/report-lipid.schema.json +++ b/www/forms/report-lipid.schema.json @@ -20,20 +20,24 @@ "type": "string" }, "ldl": { - "description": "LDL", - "type": "number" + "description": "LDL (mg/dL)", + "type": "number", + "range": [null,130] }, "hdl": { - "description": "HDL", - "type": "number" + "description": "HDL (mg/dL)", + "type": "number", + "range": [40,null] }, "tgl": { - "description": "Triglyceride", - "type": "number" + "description": "Triglyceride (mg/dL)", + "type": "number", + "range": [null,150] }, "chol": { - "description": "Cholesterol", - "type": "number" + "description": "Cholesterol (mg/dL)", + "type": "number", + "range": [null,130] } }, "required": ["date"] diff --git a/www/forms/report-rft.schema.json b/www/forms/report-rft.schema.json index f5d5a93..b7ed843 100644 --- a/www/forms/report-rft.schema.json +++ b/www/forms/report-rft.schema.json @@ -20,24 +20,29 @@ "type": "string" }, "urea": { - "description": "Urea", - "type": "number" + "description": "Urea (mg/dL)", + "type": "number", + "range": [null,40] }, "creat": { - "description": "Creatinine", - "type": "number" + "description": "Creatinine (mg/dL)", + "type": "number", + "range": [null,1] }, "na": { - "description": "Sodium", - "type": "number" + "description": "Sodium (mEq/L)", + "type": "number", + "range": [134,146] }, "k": { - "description": "Potassium", - "type": "number" + "description": "Potassium (mEq/L)", + "type": "number", + "range": [3.5,5] }, "cl": { - "description": "Chloride", - "type": "number" + "description": "Chloride (mEq/L)", + "type": "number", + "range": [98,107] } }, "required": ["date"] diff --git a/www/forms/report-urine-re.schema.json b/www/forms/report-urine-re.schema.json index 58243dc..e5a76ce 100644 --- a/www/forms/report-urine-re.schema.json +++ b/www/forms/report-urine-re.schema.json @@ -41,7 +41,8 @@ }, "rbc": { "description": "RBC cells", - "type": "string" + "type": "string", + "range": [null,3] }, "epitheial": { "description": "Epithelial Cells", @@ -49,7 +50,8 @@ }, "pus": { "description": "Pus cells", - "type": "string" + "type": "string", + "range": [null,5] }, "cast": { "description": "Cast",