@openmrs/ngx-formentry 3.0.1-pre.91 → 3.0.1-pre.94
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 +13 -1
- package/bundles/openmrs-ngx-formentry.umd.js.map +1 -1
- package/esm2015/form-entry/helpers/js-expression-helper.js +14 -2
- package/fesm2015/openmrs-ngx-formentry.js +13 -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
|
@@ -2086,6 +2086,17 @@
|
|
|
2086
2086
|
return array.indexOf(members) !== -1;
|
|
2087
2087
|
}
|
|
2088
2088
|
};
|
|
2089
|
+
/*
|
|
2090
|
+
TODO make it possible to bootstrap expressions without control relations to make alternateControl optional as at the moment it required
|
|
2091
|
+
if no other expression on the control as a relationship to another control*/
|
|
2092
|
+
JsExpressionHelper.prototype.extractObsValue = function (rawEncounter, uuid, alternateControl) {
|
|
2093
|
+
var findObs = function (obs, uuid) {
|
|
2094
|
+
var result;
|
|
2095
|
+
obs === null || obs === void 0 ? void 0 : obs.some(function (o) { var _a; return result = ((_a = o === null || o === void 0 ? void 0 : o.concept) === null || _a === void 0 ? void 0 : _a.uuid) === uuid ? o : findObs(o.children || [], uuid); });
|
|
2096
|
+
return result;
|
|
2097
|
+
};
|
|
2098
|
+
return findObs(rawEncounter.obs, uuid).value || alternateControl;
|
|
2099
|
+
};
|
|
2089
2100
|
Object.defineProperty(JsExpressionHelper.prototype, "helperFunctions", {
|
|
2090
2101
|
get: function () {
|
|
2091
2102
|
var helper = this;
|
|
@@ -2098,7 +2109,8 @@
|
|
|
2098
2109
|
calcSouthEastAsiaNonLabCVDRisk: helper.calcSouthEastAsiaNonLabCVDRisk,
|
|
2099
2110
|
isEmpty: helper.isEmpty,
|
|
2100
2111
|
arrayContains: helper.arrayContains,
|
|
2101
|
-
extractRepeatingGroupValues: helper.extractRepeatingGroupValues
|
|
2112
|
+
extractRepeatingGroupValues: helper.extractRepeatingGroupValues,
|
|
2113
|
+
extractObsValue: helper.extractObsValue
|
|
2102
2114
|
};
|
|
2103
2115
|
},
|
|
2104
2116
|
enumerable: false,
|