]> Softwares of Agnibho - simpleipd.git/commitdiff
Added CBG graph
authorAgnibho Mondal <mondal@agnibho.com>
Wed, 2 Jun 2021 20:30:07 +0000 (02:00 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Wed, 2 Jun 2021 20:30:07 +0000 (02:00 +0530)
www/res/calc.js

index 58eaa6eec9bf55534c7863f1374f898d58e7fe0b..a13e17716f5a55bdc22be64ab5216ab35afe7d65 100644 (file)
@@ -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);