From 9d80c58e0377c7389a5e445e1d65d24eda0cc3eb Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Thu, 3 Jun 2021 02:00:07 +0530 Subject: [PATCH] Added CBG graph --- www/res/calc.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/res/calc.js b/www/res/calc.js index 58eaa6e..a13e177 100644 --- a/www/res/calc.js +++ b/www/res/calc.js @@ -10,10 +10,10 @@ function entrySort(i, j){ } } var io=[]; -var clinical={pr:[], rr:[], temperature:[], spo2:[], sbp:[], dbp:[]}; +var clinical={pr:[], rr:[], temperature:[], spo2:[], sbp:[], dbp:[], cbg:[]}; var reports={}; var treatment={}; -var clinDict={pr: "Pulse Rate", rr: "Respiratory Rate", temperature: "Temperature", spo2: "SpO2", sbp: "Systolic BP", dbp: "Diastolic BP"} +var clinDict={pr: "Pulse Rate", rr: "Respiratory Rate", temperature: "Temperature", spo2: "SpO2", sbp: "Systolic BP", dbp: "Diastolic BP", cbg: "CBG"} var reportsDict={}; $(document).ready(function(){ var ctx1=$("#clinChart")[0].getContext("2d"); @@ -59,6 +59,9 @@ $(document).ready(function(){ if(entry.bp){ clinical.dbp.push([stamp, entry.bp.split("/")[1]]); } + if(entry.cbg){ + clinical.cbg.push([stamp, entry.cbg]); + } }); // INTAKE-OUTPUT approxIn=0; @@ -113,6 +116,9 @@ $(document).ready(function(){ if(entry.bp){ clinical.dbp.push([stamp, entry.bp.split("/")[1]]); } + if(entry.cbg){ + clinical.cbg.push([stamp, entry.cbg]); + } }); Object.keys(clinical).forEach(function(i){ clinical[i].sort(entrySort); -- 2.39.5