@openmrs/ngx-formentry 3.1.2-pre.203 → 3.1.2-pre.207
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.
- package/bundles/openmrs-ngx-formentry.umd.js +15 -1
- package/bundles/openmrs-ngx-formentry.umd.js.map +1 -1
- package/esm2015/form-entry/helpers/js-expression-helper.js +16 -2
- package/fesm2015/openmrs-ngx-formentry.js +15 -1
- package/fesm2015/openmrs-ngx-formentry.js.map +1 -1
- package/form-entry/helpers/js-expression-helper.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2124,6 +2124,19 @@
|
|
|
2124
2124
|
}
|
|
2125
2125
|
return false;
|
|
2126
2126
|
};
|
|
2127
|
+
JsExpressionHelper.prototype.calcGravida = function (parityTerm, parityAbortion) {
|
|
2128
|
+
var gravida = 0;
|
|
2129
|
+
if (Number.isInteger(parityTerm)) {
|
|
2130
|
+
gravida += parityTerm + 1;
|
|
2131
|
+
}
|
|
2132
|
+
if (Number.isInteger(parityAbortion)) {
|
|
2133
|
+
gravida += parityAbortion + 1;
|
|
2134
|
+
}
|
|
2135
|
+
if (Number.isInteger(parityTerm) && Number.isInteger(parityAbortion)) {
|
|
2136
|
+
gravida = parityTerm + parityAbortion + 1;
|
|
2137
|
+
}
|
|
2138
|
+
return gravida;
|
|
2139
|
+
};
|
|
2127
2140
|
Object.defineProperty(JsExpressionHelper.prototype, "helperFunctions", {
|
|
2128
2141
|
get: function () {
|
|
2129
2142
|
var helper = this;
|
|
@@ -2138,7 +2151,8 @@
|
|
|
2138
2151
|
arrayContains: helper.arrayContains,
|
|
2139
2152
|
extractRepeatingGroupValues: helper.extractRepeatingGroupValues,
|
|
2140
2153
|
getObsFromControlOrEncounter: helper.getObsFromControlOrEncounter,
|
|
2141
|
-
doesNotMatchExpression: helper.doesNotMatchExpression
|
|
2154
|
+
doesNotMatchExpression: helper.doesNotMatchExpression,
|
|
2155
|
+
calcGravida: helper.calcGravida
|
|
2142
2156
|
};
|
|
2143
2157
|
},
|
|
2144
2158
|
enumerable: false,
|