@openmrs/ngx-formentry 3.0.1-pre.105 → 3.0.1-pre.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2007,6 +2007,10 @@
2007
2007
  return height && weight && refSectionObject ? formattedSDValue : null;
2008
2008
  };
2009
2009
  JsExpressionHelper.prototype.calcSouthEastAsiaNonLabCVDRisk = function (sex, smoker, age, sbp, bmi) {
2010
+ var hasValidValues = (typeof sex === "string" && typeof smoker === "boolean" && typeof age === "number" && typeof sbp === "number" && typeof bmi === "number");
2011
+ if (!hasValidValues) {
2012
+ return null;
2013
+ }
2010
2014
  // Bin functions
2011
2015
  var getAgeBin = function (age) { return Math.floor((Math.min(Math.max(40, age), 74) - 40) / 5); };
2012
2016
  var getSbpBin = function (sbp) { return Math.max(0, Math.floor((Math.min(sbp, 180) - 120) / 20) + 1); };