primarycare-binder 1.1.98 → 1.1.99
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/dist/index.cjs.js +186 -118
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -24990,7 +24990,7 @@ var radOrderActions = _objectSpread2({}, actionInfo$3);
|
|
|
24990
24990
|
var radOrderSlice$1 = radOrderSlice.reducer;
|
|
24991
24991
|
|
|
24992
24992
|
var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
24993
|
-
var _payload$patientid, _payload$encountertyp, _payload$encounterid, _payload$
|
|
24993
|
+
var _payload$patientid, _payload$encountertyp, _payload$encounterid, _payload$prescription, _payload$Prescription, _payload$name$drugTyp, _payload$name, _payload$presNature$v, _payload$presNature, _payload$presMode$val, _payload$presMode, _payload$priority$val, _payload$priority, _payload$status, _payload$statusreason, _payload$intent, _payload$orderPrivile, _payload$privilegeAle, _payload$workFlowStat, _payload$name$value, _payload$name2, _payload$formCode, _payload$routeCode$va, _payload$routeCode, _payload$dosageTypeIn, _payload$unitValue$va, _payload$unitValue, _payload$drug_categor, _payload$drug_categor2, _payload$dispensing_p, _payload$dispensing_p2, _payload$IVDosageDura, _payload$IVDosageDura2, _payload$unitsTypes$v, _payload$unitsTypes, _payload$ivInfusionRa, _payload$ivInfusionRa2, _payload$doseOption$v, _payload$doseOption, _payload$occurStartDa, _payload$occurEndDate, _payload$totPresQtyUO, _payload$totPresQtyUO2, _payload$totDispQty, _payload$totDispQtyUO, _payload$totBilledQty, _payload$totBilledQty2, _payload$totReturnedQ, _payload$PRNYN, _payload$prnComment, _payload$direction, _payload$diagnosis, _payload$reasonCode, _payload$indication$v, _payload$indication, _payload$patientInstr, _payload$patientInstr2, _payload$patientInstr3, _payload$notes, _payload$parentPresId, _payload$presGroupRef, _payload$noofRefillsA, _payload$initialDispe, _payload$refillDispen, _payload$maxRefillDis, _payload$pendingRefil, _payload$prescription2, _payload$substitution, _payload$substitution2, _payload$substituteRe, _payload$broughtFromH, _payload$IVIngredient, _payload$createdby, _payload$updatedby, _payload$statushistor, _payload$statusperiod;
|
|
24994
24994
|
|
|
24995
24995
|
var filter = {};
|
|
24996
24996
|
|
|
@@ -25014,7 +25014,7 @@ var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
|
25014
25014
|
"patient_Id": (_payload$patientid = payload.patientid) !== null && _payload$patientid !== void 0 ? _payload$patientid : "",
|
|
25015
25015
|
"encountertype": (_payload$encountertyp = payload.encountertype) !== null && _payload$encountertyp !== void 0 ? _payload$encountertyp : "",
|
|
25016
25016
|
"encounter_Id": (_payload$encounterid = payload.encounterid) !== null && _payload$encounterid !== void 0 ? _payload$encounterid : "",
|
|
25017
|
-
"prescripionType":
|
|
25017
|
+
//"prescripionType": payload.prescripionType ?? "",
|
|
25018
25018
|
"prescriptionId": (_payload$prescription = payload.prescriptionId) !== null && _payload$prescription !== void 0 ? _payload$prescription : "",
|
|
25019
25019
|
"PrescriptionDate": (_payload$Prescription = payload.PrescriptionDate) !== null && _payload$Prescription !== void 0 ? _payload$Prescription : 0,
|
|
25020
25020
|
"drugType": (_payload$name$drugTyp = payload === null || payload === void 0 ? void 0 : (_payload$name = payload.name) === null || _payload$name === void 0 ? void 0 : _payload$name.drugTypeId) !== null && _payload$name$drugTyp !== void 0 ? _payload$name$drugTyp : "",
|
|
@@ -27410,6 +27410,9 @@ var queries$7 = {
|
|
|
27410
27410
|
medicationOrder: function medicationOrder(orgId) {
|
|
27411
27411
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CA_PerformingLocationforOrdLocn\",\n \"filter\": \"CA_PerformingLocationforOrdLocn.activestatus==true && CA_PerformingLocationforOrdLocn.ordering_org == '").concat(orgId, "' && CA_PerformingLocationforOrdLocn.service_applicability == 'CodingMaster/10291' && length(CA_PerformingLocationforOrdLocn.order_criteria) > 0\",\n \"return_fields\": \"CA_PerformingLocationforOrdLocn\"\n }");
|
|
27412
27412
|
},
|
|
27413
|
+
medicationOrder_: function medicationOrder_(orgId) {
|
|
27414
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"LocationMaster\",\n \"filter\": \"(document(document(LocationMaster.locationType).coding)[*].code any =='LT006' || document(LocationMaster.locationType).code=='LT006') && LocationMaster.status=='Active' && LocationMaster.managingOrgID=='").concat(orgId, "' && LocationMaster.activestatus==true \",\n \"return_fields\": \" merge(keep(LocationMaster,'_key','_id','shortdesc','longdesc','status','id','managingOrgID','locationType'),{managingOrgID:document(LocationMaster.managingOrgID).name})\"\n }");
|
|
27415
|
+
},
|
|
27413
27416
|
organization: function organization(ids) {
|
|
27414
27417
|
return "{\n\t\t\t\"db_name\": \"".concat(dbName, "\",\n\t\t\t\"entity\": \"Organization\",\n \"filter\": \"Organization._id in ").concat("".concat(JSON.stringify(ids)).replace(/"/g, "'"), "\",\n\t\t\t\"return_fields\":\n\t\t\t\t\"{_id:Organization._id,_key:Organization._key,name:Organization.name,orgId:Organization.id}\"\n\t\t}");
|
|
27415
27418
|
},
|
|
@@ -28027,11 +28030,64 @@ var FETCHPERFORMINGLOCATIONMED = createAsyncThunk("validateRulesSlice/PFMedData"
|
|
|
28027
28030
|
}
|
|
28028
28031
|
}, _callee4, null, [[2, 25]]);
|
|
28029
28032
|
})));
|
|
28030
|
-
var
|
|
28033
|
+
var FETCHPERFORMINGLOCATIONMED_ = createAsyncThunk("validateRulesSlice/PFMedData_", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
28031
28034
|
var payload,
|
|
28032
28035
|
_ref8,
|
|
28033
28036
|
rejectWithValue,
|
|
28034
28037
|
orgId,
|
|
28038
|
+
data,
|
|
28039
|
+
arr,
|
|
28040
|
+
_args5 = arguments;
|
|
28041
|
+
|
|
28042
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
28043
|
+
while (1) {
|
|
28044
|
+
switch (_context5.prev = _context5.next) {
|
|
28045
|
+
case 0:
|
|
28046
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
28047
|
+
_ref8 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
28048
|
+
_context5.prev = 2;
|
|
28049
|
+
orgId = payload.orgId;
|
|
28050
|
+
_context5.next = 6;
|
|
28051
|
+
return fetchData$3({
|
|
28052
|
+
body: queries$7.medicationOrder_(orgId)
|
|
28053
|
+
}, __readDocumentUrl__);
|
|
28054
|
+
|
|
28055
|
+
case 6:
|
|
28056
|
+
data = _context5.sent;
|
|
28057
|
+
arr = [];
|
|
28058
|
+
data.result.map(function (val) {
|
|
28059
|
+
var _val$shortdesc4, _val$_id6, _val$_id7;
|
|
28060
|
+
|
|
28061
|
+
arr.push({
|
|
28062
|
+
label: (_val$shortdesc4 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc4 !== void 0 ? _val$shortdesc4 : "",
|
|
28063
|
+
value: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
28064
|
+
id: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : ""
|
|
28065
|
+
});
|
|
28066
|
+
});
|
|
28067
|
+
debugger;
|
|
28068
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28069
|
+
data: arr
|
|
28070
|
+
}));
|
|
28071
|
+
|
|
28072
|
+
case 13:
|
|
28073
|
+
_context5.prev = 13;
|
|
28074
|
+
_context5.t0 = _context5["catch"](2);
|
|
28075
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28076
|
+
message: _context5.t0.message
|
|
28077
|
+
})));
|
|
28078
|
+
|
|
28079
|
+
case 16:
|
|
28080
|
+
case "end":
|
|
28081
|
+
return _context5.stop();
|
|
28082
|
+
}
|
|
28083
|
+
}
|
|
28084
|
+
}, _callee5, null, [[2, 13]]);
|
|
28085
|
+
})));
|
|
28086
|
+
var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
28087
|
+
var payload,
|
|
28088
|
+
_ref10,
|
|
28089
|
+
rejectWithValue,
|
|
28090
|
+
orgId,
|
|
28035
28091
|
rulePayload,
|
|
28036
28092
|
pracId,
|
|
28037
28093
|
patId,
|
|
@@ -28043,37 +28099,37 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28043
28099
|
ruleResponse,
|
|
28044
28100
|
resType,
|
|
28045
28101
|
resText,
|
|
28046
|
-
|
|
28102
|
+
_args8 = arguments;
|
|
28047
28103
|
|
|
28048
|
-
return regeneratorRuntime.wrap(function
|
|
28104
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
28049
28105
|
while (1) {
|
|
28050
|
-
switch (
|
|
28106
|
+
switch (_context8.prev = _context8.next) {
|
|
28051
28107
|
case 0:
|
|
28052
|
-
payload =
|
|
28053
|
-
|
|
28054
|
-
|
|
28108
|
+
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
28109
|
+
_ref10 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
28110
|
+
_context8.prev = 2;
|
|
28055
28111
|
orgId = payload.orgId, rulePayload = payload.rulePayload, pracId = payload.pracId, patId = payload.patId;
|
|
28056
|
-
|
|
28112
|
+
_context8.next = 6;
|
|
28057
28113
|
return fetchData$3({
|
|
28058
28114
|
body: queries$7.patientData(patId)
|
|
28059
28115
|
}, __readDocumentUrl__);
|
|
28060
28116
|
|
|
28061
28117
|
case 6:
|
|
28062
|
-
patientData =
|
|
28063
|
-
|
|
28118
|
+
patientData = _context8.sent;
|
|
28119
|
+
_context8.next = 9;
|
|
28064
28120
|
return fetchData$3({
|
|
28065
28121
|
body: queries$7.PractitionerData(pracId)
|
|
28066
28122
|
}, __readDocumentUrl__);
|
|
28067
28123
|
|
|
28068
28124
|
case 9:
|
|
28069
|
-
PractitionerData =
|
|
28070
|
-
|
|
28125
|
+
PractitionerData = _context8.sent;
|
|
28126
|
+
_context8.next = 12;
|
|
28071
28127
|
return fetchData$3({
|
|
28072
28128
|
body: queries$7.alertOrderRule(orgId)
|
|
28073
28129
|
}, __readDocumentUrl__);
|
|
28074
28130
|
|
|
28075
28131
|
case 12:
|
|
28076
|
-
alertOrderRule =
|
|
28132
|
+
alertOrderRule = _context8.sent;
|
|
28077
28133
|
arr = [];
|
|
28078
28134
|
alertOrderRule.result.map(function (val) {
|
|
28079
28135
|
arr.push({
|
|
@@ -28087,13 +28143,13 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28087
28143
|
});
|
|
28088
28144
|
});
|
|
28089
28145
|
ruleParamJson = generateJSON$4(rulePayload);
|
|
28090
|
-
|
|
28146
|
+
_context8.next = 18;
|
|
28091
28147
|
return es6Promise.Promise.all(arr.map( /*#__PURE__*/function () {
|
|
28092
|
-
var
|
|
28148
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(val) {
|
|
28093
28149
|
var order_catalog_criteria, patient_criteria, pract_criteria;
|
|
28094
|
-
return regeneratorRuntime.wrap(function
|
|
28150
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
28095
28151
|
while (1) {
|
|
28096
|
-
switch (
|
|
28152
|
+
switch (_context7.prev = _context7.next) {
|
|
28097
28153
|
case 0:
|
|
28098
28154
|
order_catalog_criteria = val.order_catalog_criteria.map(function (val) {
|
|
28099
28155
|
return val.rule.value;
|
|
@@ -28104,24 +28160,24 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28104
28160
|
pract_criteria = val.pract_criteria.map(function (val) {
|
|
28105
28161
|
return val.rule.value;
|
|
28106
28162
|
});
|
|
28107
|
-
return
|
|
28108
|
-
var
|
|
28163
|
+
return _context7.abrupt("return", new es6Promise.Promise( /*#__PURE__*/function () {
|
|
28164
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(resolve, reject) {
|
|
28109
28165
|
var oC, patC, prcC;
|
|
28110
|
-
return regeneratorRuntime.wrap(function
|
|
28166
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
28111
28167
|
while (1) {
|
|
28112
|
-
switch (
|
|
28168
|
+
switch (_context6.prev = _context6.next) {
|
|
28113
28169
|
case 0:
|
|
28114
28170
|
if (!(order_catalog_criteria.length == 0)) {
|
|
28115
|
-
|
|
28171
|
+
_context6.next = 4;
|
|
28116
28172
|
break;
|
|
28117
28173
|
}
|
|
28118
28174
|
|
|
28119
|
-
|
|
28120
|
-
|
|
28175
|
+
_context6.t0 = null;
|
|
28176
|
+
_context6.next = 7;
|
|
28121
28177
|
break;
|
|
28122
28178
|
|
|
28123
28179
|
case 4:
|
|
28124
|
-
|
|
28180
|
+
_context6.next = 6;
|
|
28125
28181
|
return fetchData$3({
|
|
28126
28182
|
body: JSON.stringify({
|
|
28127
28183
|
"ruleId": order_catalog_criteria,
|
|
@@ -28133,22 +28189,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28133
28189
|
}, __ruleBuilderUrl__);
|
|
28134
28190
|
|
|
28135
28191
|
case 6:
|
|
28136
|
-
|
|
28192
|
+
_context6.t0 = _context6.sent;
|
|
28137
28193
|
|
|
28138
28194
|
case 7:
|
|
28139
|
-
oC =
|
|
28195
|
+
oC = _context6.t0;
|
|
28140
28196
|
|
|
28141
28197
|
if (!(patient_criteria.length == 0)) {
|
|
28142
|
-
|
|
28198
|
+
_context6.next = 12;
|
|
28143
28199
|
break;
|
|
28144
28200
|
}
|
|
28145
28201
|
|
|
28146
|
-
|
|
28147
|
-
|
|
28202
|
+
_context6.t1 = null;
|
|
28203
|
+
_context6.next = 15;
|
|
28148
28204
|
break;
|
|
28149
28205
|
|
|
28150
28206
|
case 12:
|
|
28151
|
-
|
|
28207
|
+
_context6.next = 14;
|
|
28152
28208
|
return fetchData$3({
|
|
28153
28209
|
body: JSON.stringify({
|
|
28154
28210
|
"ruleId": patient_criteria,
|
|
@@ -28160,22 +28216,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28160
28216
|
}, __ruleBuilderUrl__);
|
|
28161
28217
|
|
|
28162
28218
|
case 14:
|
|
28163
|
-
|
|
28219
|
+
_context6.t1 = _context6.sent;
|
|
28164
28220
|
|
|
28165
28221
|
case 15:
|
|
28166
|
-
patC =
|
|
28222
|
+
patC = _context6.t1;
|
|
28167
28223
|
|
|
28168
28224
|
if (!(pract_criteria.length == 0)) {
|
|
28169
|
-
|
|
28225
|
+
_context6.next = 20;
|
|
28170
28226
|
break;
|
|
28171
28227
|
}
|
|
28172
28228
|
|
|
28173
|
-
|
|
28174
|
-
|
|
28229
|
+
_context6.t2 = null;
|
|
28230
|
+
_context6.next = 23;
|
|
28175
28231
|
break;
|
|
28176
28232
|
|
|
28177
28233
|
case 20:
|
|
28178
|
-
|
|
28234
|
+
_context6.next = 22;
|
|
28179
28235
|
return fetchData$3({
|
|
28180
28236
|
body: JSON.stringify({
|
|
28181
28237
|
"ruleId": pract_criteria,
|
|
@@ -28187,10 +28243,10 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28187
28243
|
}, __ruleBuilderUrl__);
|
|
28188
28244
|
|
|
28189
28245
|
case 22:
|
|
28190
|
-
|
|
28246
|
+
_context6.t2 = _context6.sent;
|
|
28191
28247
|
|
|
28192
28248
|
case 23:
|
|
28193
|
-
prcC =
|
|
28249
|
+
prcC = _context6.t2;
|
|
28194
28250
|
resolve({
|
|
28195
28251
|
oC: oC,
|
|
28196
28252
|
patC: patC,
|
|
@@ -28199,32 +28255,32 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28199
28255
|
|
|
28200
28256
|
case 25:
|
|
28201
28257
|
case "end":
|
|
28202
|
-
return
|
|
28258
|
+
return _context6.stop();
|
|
28203
28259
|
}
|
|
28204
28260
|
}
|
|
28205
|
-
},
|
|
28261
|
+
}, _callee6);
|
|
28206
28262
|
}));
|
|
28207
28263
|
|
|
28208
28264
|
return function (_x4, _x5) {
|
|
28209
|
-
return
|
|
28265
|
+
return _ref12.apply(this, arguments);
|
|
28210
28266
|
};
|
|
28211
28267
|
}()));
|
|
28212
28268
|
|
|
28213
28269
|
case 4:
|
|
28214
28270
|
case "end":
|
|
28215
|
-
return
|
|
28271
|
+
return _context7.stop();
|
|
28216
28272
|
}
|
|
28217
28273
|
}
|
|
28218
|
-
},
|
|
28274
|
+
}, _callee7);
|
|
28219
28275
|
}));
|
|
28220
28276
|
|
|
28221
28277
|
return function (_x3) {
|
|
28222
|
-
return
|
|
28278
|
+
return _ref11.apply(this, arguments);
|
|
28223
28279
|
};
|
|
28224
28280
|
}()));
|
|
28225
28281
|
|
|
28226
28282
|
case 18:
|
|
28227
|
-
ruleResponse =
|
|
28283
|
+
ruleResponse = _context8.sent;
|
|
28228
28284
|
resType = null;
|
|
28229
28285
|
resText = null;
|
|
28230
28286
|
ruleResponse.map(function (val) {
|
|
@@ -28243,7 +28299,7 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28243
28299
|
resText = val.oC.returnData.alert_test_message;
|
|
28244
28300
|
}
|
|
28245
28301
|
});
|
|
28246
|
-
return
|
|
28302
|
+
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28247
28303
|
data: {
|
|
28248
28304
|
type: resType ? alertType[resType] : resType,
|
|
28249
28305
|
alertText: resText
|
|
@@ -28251,22 +28307,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28251
28307
|
}));
|
|
28252
28308
|
|
|
28253
28309
|
case 25:
|
|
28254
|
-
|
|
28255
|
-
|
|
28256
|
-
return
|
|
28257
|
-
message:
|
|
28310
|
+
_context8.prev = 25;
|
|
28311
|
+
_context8.t0 = _context8["catch"](2);
|
|
28312
|
+
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28313
|
+
message: _context8.t0.message
|
|
28258
28314
|
})));
|
|
28259
28315
|
|
|
28260
28316
|
case 28:
|
|
28261
28317
|
case "end":
|
|
28262
|
-
return
|
|
28318
|
+
return _context8.stop();
|
|
28263
28319
|
}
|
|
28264
28320
|
}
|
|
28265
|
-
},
|
|
28321
|
+
}, _callee8, null, [[2, 25]]);
|
|
28266
28322
|
})));
|
|
28267
|
-
var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
28323
|
+
var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
28268
28324
|
var payload,
|
|
28269
|
-
|
|
28325
|
+
_ref14,
|
|
28270
28326
|
rejectWithValue,
|
|
28271
28327
|
orgId,
|
|
28272
28328
|
rulePayload,
|
|
@@ -28280,37 +28336,37 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28280
28336
|
ruleResponse,
|
|
28281
28337
|
resType,
|
|
28282
28338
|
resText,
|
|
28283
|
-
|
|
28339
|
+
_args11 = arguments;
|
|
28284
28340
|
|
|
28285
|
-
return regeneratorRuntime.wrap(function
|
|
28341
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
28286
28342
|
while (1) {
|
|
28287
|
-
switch (
|
|
28343
|
+
switch (_context11.prev = _context11.next) {
|
|
28288
28344
|
case 0:
|
|
28289
|
-
payload =
|
|
28290
|
-
|
|
28291
|
-
|
|
28345
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
28346
|
+
_ref14 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
|
|
28347
|
+
_context11.prev = 2;
|
|
28292
28348
|
orgId = payload.orgId, rulePayload = payload.rulePayload, pracId = payload.pracId, patId = payload.patId;
|
|
28293
|
-
|
|
28349
|
+
_context11.next = 6;
|
|
28294
28350
|
return fetchData$3({
|
|
28295
28351
|
body: queries$7.patientData(patId)
|
|
28296
28352
|
}, __readDocumentUrl__);
|
|
28297
28353
|
|
|
28298
28354
|
case 6:
|
|
28299
|
-
patientData =
|
|
28300
|
-
|
|
28355
|
+
patientData = _context11.sent;
|
|
28356
|
+
_context11.next = 9;
|
|
28301
28357
|
return fetchData$3({
|
|
28302
28358
|
body: queries$7.PractitionerData(pracId)
|
|
28303
28359
|
}, __readDocumentUrl__);
|
|
28304
28360
|
|
|
28305
28361
|
case 9:
|
|
28306
|
-
PractitionerData =
|
|
28307
|
-
|
|
28362
|
+
PractitionerData = _context11.sent;
|
|
28363
|
+
_context11.next = 12;
|
|
28308
28364
|
return fetchData$3({
|
|
28309
28365
|
body: queries$7.alertMedicationRule(orgId)
|
|
28310
28366
|
}, __readDocumentUrl__);
|
|
28311
28367
|
|
|
28312
28368
|
case 12:
|
|
28313
|
-
alertOrderRule =
|
|
28369
|
+
alertOrderRule = _context11.sent;
|
|
28314
28370
|
arr = [];
|
|
28315
28371
|
alertOrderRule.result.map(function (val) {
|
|
28316
28372
|
arr.push({
|
|
@@ -28324,13 +28380,13 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28324
28380
|
});
|
|
28325
28381
|
});
|
|
28326
28382
|
ruleParamJson = generateJsonMed(rulePayload);
|
|
28327
|
-
|
|
28383
|
+
_context11.next = 18;
|
|
28328
28384
|
return es6Promise.Promise.all(arr.map( /*#__PURE__*/function () {
|
|
28329
|
-
var
|
|
28385
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(val) {
|
|
28330
28386
|
var order_catalog_criteria, patient_criteria, pract_criteria;
|
|
28331
|
-
return regeneratorRuntime.wrap(function
|
|
28387
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
28332
28388
|
while (1) {
|
|
28333
|
-
switch (
|
|
28389
|
+
switch (_context10.prev = _context10.next) {
|
|
28334
28390
|
case 0:
|
|
28335
28391
|
order_catalog_criteria = val.order_catalog_criteria.map(function (val) {
|
|
28336
28392
|
return val.rule.value;
|
|
@@ -28341,24 +28397,24 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28341
28397
|
pract_criteria = val.pract_criteria.map(function (val) {
|
|
28342
28398
|
return val.rule.value;
|
|
28343
28399
|
});
|
|
28344
|
-
return
|
|
28345
|
-
var
|
|
28400
|
+
return _context10.abrupt("return", new es6Promise.Promise( /*#__PURE__*/function () {
|
|
28401
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(resolve, reject) {
|
|
28346
28402
|
var oC, patC, prcC;
|
|
28347
|
-
return regeneratorRuntime.wrap(function
|
|
28403
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
28348
28404
|
while (1) {
|
|
28349
|
-
switch (
|
|
28405
|
+
switch (_context9.prev = _context9.next) {
|
|
28350
28406
|
case 0:
|
|
28351
28407
|
if (!(order_catalog_criteria.length == 0)) {
|
|
28352
|
-
|
|
28408
|
+
_context9.next = 4;
|
|
28353
28409
|
break;
|
|
28354
28410
|
}
|
|
28355
28411
|
|
|
28356
|
-
|
|
28357
|
-
|
|
28412
|
+
_context9.t0 = null;
|
|
28413
|
+
_context9.next = 7;
|
|
28358
28414
|
break;
|
|
28359
28415
|
|
|
28360
28416
|
case 4:
|
|
28361
|
-
|
|
28417
|
+
_context9.next = 6;
|
|
28362
28418
|
return fetchData$3({
|
|
28363
28419
|
body: JSON.stringify({
|
|
28364
28420
|
"ruleId": order_catalog_criteria,
|
|
@@ -28370,22 +28426,22 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28370
28426
|
}, __ruleBuilderUrl__);
|
|
28371
28427
|
|
|
28372
28428
|
case 6:
|
|
28373
|
-
|
|
28429
|
+
_context9.t0 = _context9.sent;
|
|
28374
28430
|
|
|
28375
28431
|
case 7:
|
|
28376
|
-
oC =
|
|
28432
|
+
oC = _context9.t0;
|
|
28377
28433
|
|
|
28378
28434
|
if (!(patient_criteria.length == 0)) {
|
|
28379
|
-
|
|
28435
|
+
_context9.next = 12;
|
|
28380
28436
|
break;
|
|
28381
28437
|
}
|
|
28382
28438
|
|
|
28383
|
-
|
|
28384
|
-
|
|
28439
|
+
_context9.t1 = null;
|
|
28440
|
+
_context9.next = 15;
|
|
28385
28441
|
break;
|
|
28386
28442
|
|
|
28387
28443
|
case 12:
|
|
28388
|
-
|
|
28444
|
+
_context9.next = 14;
|
|
28389
28445
|
return fetchData$3({
|
|
28390
28446
|
body: JSON.stringify({
|
|
28391
28447
|
"ruleId": patient_criteria,
|
|
@@ -28397,22 +28453,22 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28397
28453
|
}, __ruleBuilderUrl__);
|
|
28398
28454
|
|
|
28399
28455
|
case 14:
|
|
28400
|
-
|
|
28456
|
+
_context9.t1 = _context9.sent;
|
|
28401
28457
|
|
|
28402
28458
|
case 15:
|
|
28403
|
-
patC =
|
|
28459
|
+
patC = _context9.t1;
|
|
28404
28460
|
|
|
28405
28461
|
if (!(pract_criteria.length == 0)) {
|
|
28406
|
-
|
|
28462
|
+
_context9.next = 20;
|
|
28407
28463
|
break;
|
|
28408
28464
|
}
|
|
28409
28465
|
|
|
28410
|
-
|
|
28411
|
-
|
|
28466
|
+
_context9.t2 = null;
|
|
28467
|
+
_context9.next = 23;
|
|
28412
28468
|
break;
|
|
28413
28469
|
|
|
28414
28470
|
case 20:
|
|
28415
|
-
|
|
28471
|
+
_context9.next = 22;
|
|
28416
28472
|
return fetchData$3({
|
|
28417
28473
|
body: JSON.stringify({
|
|
28418
28474
|
"ruleId": pract_criteria,
|
|
@@ -28424,10 +28480,10 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28424
28480
|
}, __ruleBuilderUrl__);
|
|
28425
28481
|
|
|
28426
28482
|
case 22:
|
|
28427
|
-
|
|
28483
|
+
_context9.t2 = _context9.sent;
|
|
28428
28484
|
|
|
28429
28485
|
case 23:
|
|
28430
|
-
prcC =
|
|
28486
|
+
prcC = _context9.t2;
|
|
28431
28487
|
resolve({
|
|
28432
28488
|
oC: oC,
|
|
28433
28489
|
patC: patC,
|
|
@@ -28436,32 +28492,32 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28436
28492
|
|
|
28437
28493
|
case 25:
|
|
28438
28494
|
case "end":
|
|
28439
|
-
return
|
|
28495
|
+
return _context9.stop();
|
|
28440
28496
|
}
|
|
28441
28497
|
}
|
|
28442
|
-
},
|
|
28498
|
+
}, _callee9);
|
|
28443
28499
|
}));
|
|
28444
28500
|
|
|
28445
28501
|
return function (_x7, _x8) {
|
|
28446
|
-
return
|
|
28502
|
+
return _ref16.apply(this, arguments);
|
|
28447
28503
|
};
|
|
28448
28504
|
}()));
|
|
28449
28505
|
|
|
28450
28506
|
case 4:
|
|
28451
28507
|
case "end":
|
|
28452
|
-
return
|
|
28508
|
+
return _context10.stop();
|
|
28453
28509
|
}
|
|
28454
28510
|
}
|
|
28455
|
-
},
|
|
28511
|
+
}, _callee10);
|
|
28456
28512
|
}));
|
|
28457
28513
|
|
|
28458
28514
|
return function (_x6) {
|
|
28459
|
-
return
|
|
28515
|
+
return _ref15.apply(this, arguments);
|
|
28460
28516
|
};
|
|
28461
28517
|
}()));
|
|
28462
28518
|
|
|
28463
28519
|
case 18:
|
|
28464
|
-
ruleResponse =
|
|
28520
|
+
ruleResponse = _context11.sent;
|
|
28465
28521
|
resType = null;
|
|
28466
28522
|
resText = null;
|
|
28467
28523
|
ruleResponse.map(function (val) {
|
|
@@ -28480,7 +28536,7 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28480
28536
|
resText = val.oC.returnData.alert_test_message;
|
|
28481
28537
|
}
|
|
28482
28538
|
});
|
|
28483
|
-
return
|
|
28539
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28484
28540
|
data: {
|
|
28485
28541
|
type: resType ? alertType[resType] : resType,
|
|
28486
28542
|
alertText: resText
|
|
@@ -28488,24 +28544,25 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28488
28544
|
}));
|
|
28489
28545
|
|
|
28490
28546
|
case 25:
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
return
|
|
28494
|
-
message:
|
|
28547
|
+
_context11.prev = 25;
|
|
28548
|
+
_context11.t0 = _context11["catch"](2);
|
|
28549
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28550
|
+
message: _context11.t0.message
|
|
28495
28551
|
})));
|
|
28496
28552
|
|
|
28497
28553
|
case 28:
|
|
28498
28554
|
case "end":
|
|
28499
|
-
return
|
|
28555
|
+
return _context11.stop();
|
|
28500
28556
|
}
|
|
28501
28557
|
}
|
|
28502
|
-
},
|
|
28558
|
+
}, _callee11, null, [[2, 25]]);
|
|
28503
28559
|
})));
|
|
28504
28560
|
var validateRulesSlice = createSlice({
|
|
28505
28561
|
name: "validateRulesSlice",
|
|
28506
28562
|
initialState: {
|
|
28507
28563
|
PFData: _objectSpread2({}, defaultState.Info),
|
|
28508
28564
|
PFMedData: _objectSpread2({}, defaultState.Info),
|
|
28565
|
+
PFMedData_: _objectSpread2({}, defaultState.Info),
|
|
28509
28566
|
alertLabOrder: _objectSpread2({}, defaultState.Info),
|
|
28510
28567
|
alertMedication: _objectSpread2({}, defaultState.Info)
|
|
28511
28568
|
},
|
|
@@ -28529,33 +28586,44 @@ var validateRulesSlice = createSlice({
|
|
|
28529
28586
|
var _action$payload4;
|
|
28530
28587
|
|
|
28531
28588
|
state.PFMedData.loading = false, state.PFMedData.error = true, state.PFMedData = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
28532
|
-
}), _defineProperty(_extraReducers$j,
|
|
28589
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.fulfilled, function (state, action) {
|
|
28533
28590
|
var _action$payload5;
|
|
28534
28591
|
|
|
28535
|
-
state.
|
|
28592
|
+
state.PFMedData_.loading = false, state.PFMedData_.error = false, state.PFMedData_ = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
28593
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.pending, function (state, action) {
|
|
28594
|
+
state.PFMedData_.loading = true, state.PFMedData_.error = false, state.PFMedData_.loading = true;
|
|
28595
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.rejected, function (state, action) {
|
|
28596
|
+
var _action$payload6;
|
|
28597
|
+
|
|
28598
|
+
state.PFMedData_.loading = false, state.PFMedData_.error = true, state.PFMedData_ = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
28599
|
+
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.fulfilled, function (state, action) {
|
|
28600
|
+
var _action$payload7;
|
|
28601
|
+
|
|
28602
|
+
state.alertLabOrder.loading = false, state.alertLabOrder.error = false, state.alertLabOrder = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
|
|
28536
28603
|
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.pending, function (state, action) {
|
|
28537
28604
|
state.alertLabOrder.loading = true, state.alertLabOrder.error = false, state.alertLabOrder.loading = true;
|
|
28538
28605
|
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.rejected, function (state, action) {
|
|
28539
|
-
var _action$
|
|
28606
|
+
var _action$payload8;
|
|
28540
28607
|
|
|
28541
|
-
state.alertLabOrder.loading = false, state.alertLabOrder.error = true, state.alertLabOrder = (_action$
|
|
28608
|
+
state.alertLabOrder.loading = false, state.alertLabOrder.error = true, state.alertLabOrder = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
28542
28609
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.fulfilled, function (state, action) {
|
|
28543
|
-
var _action$
|
|
28610
|
+
var _action$payload9;
|
|
28544
28611
|
|
|
28545
|
-
state.alertMedication.loading = false, state.alertMedication.error = false, state.alertMedication = (_action$
|
|
28612
|
+
state.alertMedication.loading = false, state.alertMedication.error = false, state.alertMedication = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
28546
28613
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.pending, function (state, action) {
|
|
28547
28614
|
state.alertMedication.loading = true, state.alertMedication.error = false, state.alertMedication.loading = true;
|
|
28548
28615
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.rejected, function (state, action) {
|
|
28549
|
-
var _action$
|
|
28616
|
+
var _action$payload10;
|
|
28550
28617
|
|
|
28551
|
-
state.alertMedication.loading = false, state.alertMedication.error = true, state.alertMedication = (_action$
|
|
28618
|
+
state.alertMedication.loading = false, state.alertMedication.error = true, state.alertMedication = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
28552
28619
|
}), _extraReducers$j)
|
|
28553
28620
|
});
|
|
28554
28621
|
var validateRulesActions = {
|
|
28555
28622
|
FETCHPERFORMINGLOCATION: FETCHPERFORMINGLOCATION,
|
|
28556
28623
|
FETCHPERFORMINGLOCATIONMED: FETCHPERFORMINGLOCATIONMED,
|
|
28557
28624
|
GETALERTWITHLABORDER: GETALERTWITHLABORDER,
|
|
28558
|
-
GETALERTWITHMEDI: GETALERTWITHMEDI
|
|
28625
|
+
GETALERTWITHMEDI: GETALERTWITHMEDI,
|
|
28626
|
+
FETCHPERFORMINGLOCATIONMED_: FETCHPERFORMINGLOCATIONMED_
|
|
28559
28627
|
};
|
|
28560
28628
|
var validateRulesSlice$1 = validateRulesSlice.reducer;
|
|
28561
28629
|
|