From: Agnibho Mondal Date: Fri, 11 Jun 2021 09:10:25 +0000 (+0530) Subject: Minor X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=d46ba5600b08e748ebd61d093baa32f75d3fa5a0;p=simpleipd.git Minor --- diff --git a/www/forms/physician.schema.json b/www/forms/physician.schema.json index 0730e1b..40c8049 100644 --- a/www/forms/physician.schema.json +++ b/www/forms/physician.schema.json @@ -79,6 +79,10 @@ "mv_pplateau": { "description": "MV P-Plateau", "type": "integer" + }, + "bw": { + "description": "Body Weight (kg)", + "type": "string" } }, "required": ["date","time"] diff --git a/www/res/calc.js b/www/res/calc.js index d009b5f..f3a9720 100644 --- a/www/res/calc.js +++ b/www/res/calc.js @@ -132,6 +132,9 @@ $(document).ready(function(){ if(entry.cbg){ clinical.cbg.push([stamp, entry.cbg]); } + if(entry.bw){ + clinical.bw.push([stamp, entry.bw]); + } }); Object.keys(clinical).forEach(function(i){ clinical[i].sort(entrySort); @@ -164,9 +167,14 @@ $(document).ready(function(){ obj[key]=reports[key]; return obj; },{}); - crclVal=crcl(reports["creat-report-rft"].slice(-1)[0][1], clinical.bw.slice(-1)[0][1], $("#info-age").text(), $("#info-sex").text()); + try{ + crclVal=crcl(reports["creat-report-rft"].slice(-1)[0][1], clinical.bw.slice(-1)[0][1], $("#info-age").text(), $("#info-sex").text()); + } + catch(e){ + crclVal=null; + } if(crclVal){ - $("#crcl").text("Creatinine Clearance: "+crclVal.toFixed(1)); + $("#crcl").text("Creatinine Clearance: "+crclVal.toFixed(1)+" mL/min"); } Object.keys(reports).forEach(function(i){ reports[i].sort(entrySort);