primarycare-binder 1.1.96 → 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 +198 -122
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19592,12 +19592,20 @@ var dashboardQuery = {
|
|
|
19592
19592
|
// filter: `Appointment.activestatus==true && Appointment.orgid=='${orgID}' && Appointment.start>=${startDate} && Appointment.end<=${endDate} && lower(Appointment.appointmentType)!='cancelled' && document(Appointment.resourcecode).id ==${loginId} collect with count into length`,
|
|
19593
19593
|
// return_fields: "{Count:length}",
|
|
19594
19594
|
// },
|
|
19595
|
+
// 1: {
|
|
19596
|
+
// "db_name": dbName,
|
|
19597
|
+
// "entity": "Appointment,Encounter",
|
|
19598
|
+
// "filter": {
|
|
19599
|
+
// "Appointment": `Appointment.start >= ${startDate} && Appointment.end <= ${endDate} && Appointment.orgid == '${orgID}' && Appointment.activestatus == true`,
|
|
19600
|
+
// "Encounter": `Appointment.id in Encounter.appointmentId && first((Encounter.participant)[*].Practitioner_id) == ${loginId} && Encounter.activestatus == true collect with count into length`
|
|
19601
|
+
// },
|
|
19602
|
+
// "return_fields": "{Count:length}"
|
|
19603
|
+
// },
|
|
19595
19604
|
1: {
|
|
19596
19605
|
"db_name": dbName,
|
|
19597
|
-
"entity": "Appointment
|
|
19606
|
+
"entity": "Appointment",
|
|
19598
19607
|
"filter": {
|
|
19599
|
-
"Appointment": "Appointment.start
|
|
19600
|
-
"Encounter": "Appointment.id in Encounter.appointmentId && first((Encounter.participant)[*].Practitioner_id) == ".concat(loginId, " && Encounter.activestatus == true collect with count into length")
|
|
19608
|
+
"Appointment": "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orgID, "' collect with count into length")
|
|
19601
19609
|
},
|
|
19602
19610
|
"return_fields": "{Count:length}"
|
|
19603
19611
|
},
|
|
@@ -24982,7 +24990,7 @@ var radOrderActions = _objectSpread2({}, actionInfo$3);
|
|
|
24982
24990
|
var radOrderSlice$1 = radOrderSlice.reducer;
|
|
24983
24991
|
|
|
24984
24992
|
var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
24985
|
-
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;
|
|
24986
24994
|
|
|
24987
24995
|
var filter = {};
|
|
24988
24996
|
|
|
@@ -25006,7 +25014,7 @@ var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
|
25006
25014
|
"patient_Id": (_payload$patientid = payload.patientid) !== null && _payload$patientid !== void 0 ? _payload$patientid : "",
|
|
25007
25015
|
"encountertype": (_payload$encountertyp = payload.encountertype) !== null && _payload$encountertyp !== void 0 ? _payload$encountertyp : "",
|
|
25008
25016
|
"encounter_Id": (_payload$encounterid = payload.encounterid) !== null && _payload$encounterid !== void 0 ? _payload$encounterid : "",
|
|
25009
|
-
"prescripionType":
|
|
25017
|
+
//"prescripionType": payload.prescripionType ?? "",
|
|
25010
25018
|
"prescriptionId": (_payload$prescription = payload.prescriptionId) !== null && _payload$prescription !== void 0 ? _payload$prescription : "",
|
|
25011
25019
|
"PrescriptionDate": (_payload$Prescription = payload.PrescriptionDate) !== null && _payload$Prescription !== void 0 ? _payload$Prescription : 0,
|
|
25012
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 : "",
|
|
@@ -26203,7 +26211,7 @@ var queries$8 = {
|
|
|
26203
26211
|
}
|
|
26204
26212
|
};
|
|
26205
26213
|
},
|
|
26206
|
-
relationship: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='RELATIONSHIP'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
26214
|
+
relationship: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='RELATIONSHIP' and CodeableConceptMaster.status==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
26207
26215
|
typeMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ALTYPE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
26208
26216
|
Severity: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='CCSEVERITY'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
26209
26217
|
Verification: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='CCVERIFICTIONSTATUS'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
@@ -27402,6 +27410,9 @@ var queries$7 = {
|
|
|
27402
27410
|
medicationOrder: function medicationOrder(orgId) {
|
|
27403
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 }");
|
|
27404
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
|
+
},
|
|
27405
27416
|
organization: function organization(ids) {
|
|
27406
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}");
|
|
27407
27418
|
},
|
|
@@ -28019,11 +28030,64 @@ var FETCHPERFORMINGLOCATIONMED = createAsyncThunk("validateRulesSlice/PFMedData"
|
|
|
28019
28030
|
}
|
|
28020
28031
|
}, _callee4, null, [[2, 25]]);
|
|
28021
28032
|
})));
|
|
28022
|
-
var
|
|
28033
|
+
var FETCHPERFORMINGLOCATIONMED_ = createAsyncThunk("validateRulesSlice/PFMedData_", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
28023
28034
|
var payload,
|
|
28024
28035
|
_ref8,
|
|
28025
28036
|
rejectWithValue,
|
|
28026
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,
|
|
28027
28091
|
rulePayload,
|
|
28028
28092
|
pracId,
|
|
28029
28093
|
patId,
|
|
@@ -28035,37 +28099,37 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28035
28099
|
ruleResponse,
|
|
28036
28100
|
resType,
|
|
28037
28101
|
resText,
|
|
28038
|
-
|
|
28102
|
+
_args8 = arguments;
|
|
28039
28103
|
|
|
28040
|
-
return regeneratorRuntime.wrap(function
|
|
28104
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
28041
28105
|
while (1) {
|
|
28042
|
-
switch (
|
|
28106
|
+
switch (_context8.prev = _context8.next) {
|
|
28043
28107
|
case 0:
|
|
28044
|
-
payload =
|
|
28045
|
-
|
|
28046
|
-
|
|
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;
|
|
28047
28111
|
orgId = payload.orgId, rulePayload = payload.rulePayload, pracId = payload.pracId, patId = payload.patId;
|
|
28048
|
-
|
|
28112
|
+
_context8.next = 6;
|
|
28049
28113
|
return fetchData$3({
|
|
28050
28114
|
body: queries$7.patientData(patId)
|
|
28051
28115
|
}, __readDocumentUrl__);
|
|
28052
28116
|
|
|
28053
28117
|
case 6:
|
|
28054
|
-
patientData =
|
|
28055
|
-
|
|
28118
|
+
patientData = _context8.sent;
|
|
28119
|
+
_context8.next = 9;
|
|
28056
28120
|
return fetchData$3({
|
|
28057
28121
|
body: queries$7.PractitionerData(pracId)
|
|
28058
28122
|
}, __readDocumentUrl__);
|
|
28059
28123
|
|
|
28060
28124
|
case 9:
|
|
28061
|
-
PractitionerData =
|
|
28062
|
-
|
|
28125
|
+
PractitionerData = _context8.sent;
|
|
28126
|
+
_context8.next = 12;
|
|
28063
28127
|
return fetchData$3({
|
|
28064
28128
|
body: queries$7.alertOrderRule(orgId)
|
|
28065
28129
|
}, __readDocumentUrl__);
|
|
28066
28130
|
|
|
28067
28131
|
case 12:
|
|
28068
|
-
alertOrderRule =
|
|
28132
|
+
alertOrderRule = _context8.sent;
|
|
28069
28133
|
arr = [];
|
|
28070
28134
|
alertOrderRule.result.map(function (val) {
|
|
28071
28135
|
arr.push({
|
|
@@ -28079,13 +28143,13 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28079
28143
|
});
|
|
28080
28144
|
});
|
|
28081
28145
|
ruleParamJson = generateJSON$4(rulePayload);
|
|
28082
|
-
|
|
28146
|
+
_context8.next = 18;
|
|
28083
28147
|
return es6Promise.Promise.all(arr.map( /*#__PURE__*/function () {
|
|
28084
|
-
var
|
|
28148
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(val) {
|
|
28085
28149
|
var order_catalog_criteria, patient_criteria, pract_criteria;
|
|
28086
|
-
return regeneratorRuntime.wrap(function
|
|
28150
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
28087
28151
|
while (1) {
|
|
28088
|
-
switch (
|
|
28152
|
+
switch (_context7.prev = _context7.next) {
|
|
28089
28153
|
case 0:
|
|
28090
28154
|
order_catalog_criteria = val.order_catalog_criteria.map(function (val) {
|
|
28091
28155
|
return val.rule.value;
|
|
@@ -28096,24 +28160,24 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28096
28160
|
pract_criteria = val.pract_criteria.map(function (val) {
|
|
28097
28161
|
return val.rule.value;
|
|
28098
28162
|
});
|
|
28099
|
-
return
|
|
28100
|
-
var
|
|
28163
|
+
return _context7.abrupt("return", new es6Promise.Promise( /*#__PURE__*/function () {
|
|
28164
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(resolve, reject) {
|
|
28101
28165
|
var oC, patC, prcC;
|
|
28102
|
-
return regeneratorRuntime.wrap(function
|
|
28166
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
28103
28167
|
while (1) {
|
|
28104
|
-
switch (
|
|
28168
|
+
switch (_context6.prev = _context6.next) {
|
|
28105
28169
|
case 0:
|
|
28106
28170
|
if (!(order_catalog_criteria.length == 0)) {
|
|
28107
|
-
|
|
28171
|
+
_context6.next = 4;
|
|
28108
28172
|
break;
|
|
28109
28173
|
}
|
|
28110
28174
|
|
|
28111
|
-
|
|
28112
|
-
|
|
28175
|
+
_context6.t0 = null;
|
|
28176
|
+
_context6.next = 7;
|
|
28113
28177
|
break;
|
|
28114
28178
|
|
|
28115
28179
|
case 4:
|
|
28116
|
-
|
|
28180
|
+
_context6.next = 6;
|
|
28117
28181
|
return fetchData$3({
|
|
28118
28182
|
body: JSON.stringify({
|
|
28119
28183
|
"ruleId": order_catalog_criteria,
|
|
@@ -28125,22 +28189,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28125
28189
|
}, __ruleBuilderUrl__);
|
|
28126
28190
|
|
|
28127
28191
|
case 6:
|
|
28128
|
-
|
|
28192
|
+
_context6.t0 = _context6.sent;
|
|
28129
28193
|
|
|
28130
28194
|
case 7:
|
|
28131
|
-
oC =
|
|
28195
|
+
oC = _context6.t0;
|
|
28132
28196
|
|
|
28133
28197
|
if (!(patient_criteria.length == 0)) {
|
|
28134
|
-
|
|
28198
|
+
_context6.next = 12;
|
|
28135
28199
|
break;
|
|
28136
28200
|
}
|
|
28137
28201
|
|
|
28138
|
-
|
|
28139
|
-
|
|
28202
|
+
_context6.t1 = null;
|
|
28203
|
+
_context6.next = 15;
|
|
28140
28204
|
break;
|
|
28141
28205
|
|
|
28142
28206
|
case 12:
|
|
28143
|
-
|
|
28207
|
+
_context6.next = 14;
|
|
28144
28208
|
return fetchData$3({
|
|
28145
28209
|
body: JSON.stringify({
|
|
28146
28210
|
"ruleId": patient_criteria,
|
|
@@ -28152,22 +28216,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28152
28216
|
}, __ruleBuilderUrl__);
|
|
28153
28217
|
|
|
28154
28218
|
case 14:
|
|
28155
|
-
|
|
28219
|
+
_context6.t1 = _context6.sent;
|
|
28156
28220
|
|
|
28157
28221
|
case 15:
|
|
28158
|
-
patC =
|
|
28222
|
+
patC = _context6.t1;
|
|
28159
28223
|
|
|
28160
28224
|
if (!(pract_criteria.length == 0)) {
|
|
28161
|
-
|
|
28225
|
+
_context6.next = 20;
|
|
28162
28226
|
break;
|
|
28163
28227
|
}
|
|
28164
28228
|
|
|
28165
|
-
|
|
28166
|
-
|
|
28229
|
+
_context6.t2 = null;
|
|
28230
|
+
_context6.next = 23;
|
|
28167
28231
|
break;
|
|
28168
28232
|
|
|
28169
28233
|
case 20:
|
|
28170
|
-
|
|
28234
|
+
_context6.next = 22;
|
|
28171
28235
|
return fetchData$3({
|
|
28172
28236
|
body: JSON.stringify({
|
|
28173
28237
|
"ruleId": pract_criteria,
|
|
@@ -28179,10 +28243,10 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28179
28243
|
}, __ruleBuilderUrl__);
|
|
28180
28244
|
|
|
28181
28245
|
case 22:
|
|
28182
|
-
|
|
28246
|
+
_context6.t2 = _context6.sent;
|
|
28183
28247
|
|
|
28184
28248
|
case 23:
|
|
28185
|
-
prcC =
|
|
28249
|
+
prcC = _context6.t2;
|
|
28186
28250
|
resolve({
|
|
28187
28251
|
oC: oC,
|
|
28188
28252
|
patC: patC,
|
|
@@ -28191,32 +28255,32 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28191
28255
|
|
|
28192
28256
|
case 25:
|
|
28193
28257
|
case "end":
|
|
28194
|
-
return
|
|
28258
|
+
return _context6.stop();
|
|
28195
28259
|
}
|
|
28196
28260
|
}
|
|
28197
|
-
},
|
|
28261
|
+
}, _callee6);
|
|
28198
28262
|
}));
|
|
28199
28263
|
|
|
28200
28264
|
return function (_x4, _x5) {
|
|
28201
|
-
return
|
|
28265
|
+
return _ref12.apply(this, arguments);
|
|
28202
28266
|
};
|
|
28203
28267
|
}()));
|
|
28204
28268
|
|
|
28205
28269
|
case 4:
|
|
28206
28270
|
case "end":
|
|
28207
|
-
return
|
|
28271
|
+
return _context7.stop();
|
|
28208
28272
|
}
|
|
28209
28273
|
}
|
|
28210
|
-
},
|
|
28274
|
+
}, _callee7);
|
|
28211
28275
|
}));
|
|
28212
28276
|
|
|
28213
28277
|
return function (_x3) {
|
|
28214
|
-
return
|
|
28278
|
+
return _ref11.apply(this, arguments);
|
|
28215
28279
|
};
|
|
28216
28280
|
}()));
|
|
28217
28281
|
|
|
28218
28282
|
case 18:
|
|
28219
|
-
ruleResponse =
|
|
28283
|
+
ruleResponse = _context8.sent;
|
|
28220
28284
|
resType = null;
|
|
28221
28285
|
resText = null;
|
|
28222
28286
|
ruleResponse.map(function (val) {
|
|
@@ -28235,7 +28299,7 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28235
28299
|
resText = val.oC.returnData.alert_test_message;
|
|
28236
28300
|
}
|
|
28237
28301
|
});
|
|
28238
|
-
return
|
|
28302
|
+
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28239
28303
|
data: {
|
|
28240
28304
|
type: resType ? alertType[resType] : resType,
|
|
28241
28305
|
alertText: resText
|
|
@@ -28243,22 +28307,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28243
28307
|
}));
|
|
28244
28308
|
|
|
28245
28309
|
case 25:
|
|
28246
|
-
|
|
28247
|
-
|
|
28248
|
-
return
|
|
28249
|
-
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
|
|
28250
28314
|
})));
|
|
28251
28315
|
|
|
28252
28316
|
case 28:
|
|
28253
28317
|
case "end":
|
|
28254
|
-
return
|
|
28318
|
+
return _context8.stop();
|
|
28255
28319
|
}
|
|
28256
28320
|
}
|
|
28257
|
-
},
|
|
28321
|
+
}, _callee8, null, [[2, 25]]);
|
|
28258
28322
|
})));
|
|
28259
|
-
var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
28323
|
+
var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
28260
28324
|
var payload,
|
|
28261
|
-
|
|
28325
|
+
_ref14,
|
|
28262
28326
|
rejectWithValue,
|
|
28263
28327
|
orgId,
|
|
28264
28328
|
rulePayload,
|
|
@@ -28272,37 +28336,37 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28272
28336
|
ruleResponse,
|
|
28273
28337
|
resType,
|
|
28274
28338
|
resText,
|
|
28275
|
-
|
|
28339
|
+
_args11 = arguments;
|
|
28276
28340
|
|
|
28277
|
-
return regeneratorRuntime.wrap(function
|
|
28341
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
28278
28342
|
while (1) {
|
|
28279
|
-
switch (
|
|
28343
|
+
switch (_context11.prev = _context11.next) {
|
|
28280
28344
|
case 0:
|
|
28281
|
-
payload =
|
|
28282
|
-
|
|
28283
|
-
|
|
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;
|
|
28284
28348
|
orgId = payload.orgId, rulePayload = payload.rulePayload, pracId = payload.pracId, patId = payload.patId;
|
|
28285
|
-
|
|
28349
|
+
_context11.next = 6;
|
|
28286
28350
|
return fetchData$3({
|
|
28287
28351
|
body: queries$7.patientData(patId)
|
|
28288
28352
|
}, __readDocumentUrl__);
|
|
28289
28353
|
|
|
28290
28354
|
case 6:
|
|
28291
|
-
patientData =
|
|
28292
|
-
|
|
28355
|
+
patientData = _context11.sent;
|
|
28356
|
+
_context11.next = 9;
|
|
28293
28357
|
return fetchData$3({
|
|
28294
28358
|
body: queries$7.PractitionerData(pracId)
|
|
28295
28359
|
}, __readDocumentUrl__);
|
|
28296
28360
|
|
|
28297
28361
|
case 9:
|
|
28298
|
-
PractitionerData =
|
|
28299
|
-
|
|
28362
|
+
PractitionerData = _context11.sent;
|
|
28363
|
+
_context11.next = 12;
|
|
28300
28364
|
return fetchData$3({
|
|
28301
28365
|
body: queries$7.alertMedicationRule(orgId)
|
|
28302
28366
|
}, __readDocumentUrl__);
|
|
28303
28367
|
|
|
28304
28368
|
case 12:
|
|
28305
|
-
alertOrderRule =
|
|
28369
|
+
alertOrderRule = _context11.sent;
|
|
28306
28370
|
arr = [];
|
|
28307
28371
|
alertOrderRule.result.map(function (val) {
|
|
28308
28372
|
arr.push({
|
|
@@ -28316,13 +28380,13 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28316
28380
|
});
|
|
28317
28381
|
});
|
|
28318
28382
|
ruleParamJson = generateJsonMed(rulePayload);
|
|
28319
|
-
|
|
28383
|
+
_context11.next = 18;
|
|
28320
28384
|
return es6Promise.Promise.all(arr.map( /*#__PURE__*/function () {
|
|
28321
|
-
var
|
|
28385
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(val) {
|
|
28322
28386
|
var order_catalog_criteria, patient_criteria, pract_criteria;
|
|
28323
|
-
return regeneratorRuntime.wrap(function
|
|
28387
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
28324
28388
|
while (1) {
|
|
28325
|
-
switch (
|
|
28389
|
+
switch (_context10.prev = _context10.next) {
|
|
28326
28390
|
case 0:
|
|
28327
28391
|
order_catalog_criteria = val.order_catalog_criteria.map(function (val) {
|
|
28328
28392
|
return val.rule.value;
|
|
@@ -28333,24 +28397,24 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28333
28397
|
pract_criteria = val.pract_criteria.map(function (val) {
|
|
28334
28398
|
return val.rule.value;
|
|
28335
28399
|
});
|
|
28336
|
-
return
|
|
28337
|
-
var
|
|
28400
|
+
return _context10.abrupt("return", new es6Promise.Promise( /*#__PURE__*/function () {
|
|
28401
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(resolve, reject) {
|
|
28338
28402
|
var oC, patC, prcC;
|
|
28339
|
-
return regeneratorRuntime.wrap(function
|
|
28403
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
28340
28404
|
while (1) {
|
|
28341
|
-
switch (
|
|
28405
|
+
switch (_context9.prev = _context9.next) {
|
|
28342
28406
|
case 0:
|
|
28343
28407
|
if (!(order_catalog_criteria.length == 0)) {
|
|
28344
|
-
|
|
28408
|
+
_context9.next = 4;
|
|
28345
28409
|
break;
|
|
28346
28410
|
}
|
|
28347
28411
|
|
|
28348
|
-
|
|
28349
|
-
|
|
28412
|
+
_context9.t0 = null;
|
|
28413
|
+
_context9.next = 7;
|
|
28350
28414
|
break;
|
|
28351
28415
|
|
|
28352
28416
|
case 4:
|
|
28353
|
-
|
|
28417
|
+
_context9.next = 6;
|
|
28354
28418
|
return fetchData$3({
|
|
28355
28419
|
body: JSON.stringify({
|
|
28356
28420
|
"ruleId": order_catalog_criteria,
|
|
@@ -28362,22 +28426,22 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28362
28426
|
}, __ruleBuilderUrl__);
|
|
28363
28427
|
|
|
28364
28428
|
case 6:
|
|
28365
|
-
|
|
28429
|
+
_context9.t0 = _context9.sent;
|
|
28366
28430
|
|
|
28367
28431
|
case 7:
|
|
28368
|
-
oC =
|
|
28432
|
+
oC = _context9.t0;
|
|
28369
28433
|
|
|
28370
28434
|
if (!(patient_criteria.length == 0)) {
|
|
28371
|
-
|
|
28435
|
+
_context9.next = 12;
|
|
28372
28436
|
break;
|
|
28373
28437
|
}
|
|
28374
28438
|
|
|
28375
|
-
|
|
28376
|
-
|
|
28439
|
+
_context9.t1 = null;
|
|
28440
|
+
_context9.next = 15;
|
|
28377
28441
|
break;
|
|
28378
28442
|
|
|
28379
28443
|
case 12:
|
|
28380
|
-
|
|
28444
|
+
_context9.next = 14;
|
|
28381
28445
|
return fetchData$3({
|
|
28382
28446
|
body: JSON.stringify({
|
|
28383
28447
|
"ruleId": patient_criteria,
|
|
@@ -28389,22 +28453,22 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28389
28453
|
}, __ruleBuilderUrl__);
|
|
28390
28454
|
|
|
28391
28455
|
case 14:
|
|
28392
|
-
|
|
28456
|
+
_context9.t1 = _context9.sent;
|
|
28393
28457
|
|
|
28394
28458
|
case 15:
|
|
28395
|
-
patC =
|
|
28459
|
+
patC = _context9.t1;
|
|
28396
28460
|
|
|
28397
28461
|
if (!(pract_criteria.length == 0)) {
|
|
28398
|
-
|
|
28462
|
+
_context9.next = 20;
|
|
28399
28463
|
break;
|
|
28400
28464
|
}
|
|
28401
28465
|
|
|
28402
|
-
|
|
28403
|
-
|
|
28466
|
+
_context9.t2 = null;
|
|
28467
|
+
_context9.next = 23;
|
|
28404
28468
|
break;
|
|
28405
28469
|
|
|
28406
28470
|
case 20:
|
|
28407
|
-
|
|
28471
|
+
_context9.next = 22;
|
|
28408
28472
|
return fetchData$3({
|
|
28409
28473
|
body: JSON.stringify({
|
|
28410
28474
|
"ruleId": pract_criteria,
|
|
@@ -28416,10 +28480,10 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28416
28480
|
}, __ruleBuilderUrl__);
|
|
28417
28481
|
|
|
28418
28482
|
case 22:
|
|
28419
|
-
|
|
28483
|
+
_context9.t2 = _context9.sent;
|
|
28420
28484
|
|
|
28421
28485
|
case 23:
|
|
28422
|
-
prcC =
|
|
28486
|
+
prcC = _context9.t2;
|
|
28423
28487
|
resolve({
|
|
28424
28488
|
oC: oC,
|
|
28425
28489
|
patC: patC,
|
|
@@ -28428,32 +28492,32 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28428
28492
|
|
|
28429
28493
|
case 25:
|
|
28430
28494
|
case "end":
|
|
28431
|
-
return
|
|
28495
|
+
return _context9.stop();
|
|
28432
28496
|
}
|
|
28433
28497
|
}
|
|
28434
|
-
},
|
|
28498
|
+
}, _callee9);
|
|
28435
28499
|
}));
|
|
28436
28500
|
|
|
28437
28501
|
return function (_x7, _x8) {
|
|
28438
|
-
return
|
|
28502
|
+
return _ref16.apply(this, arguments);
|
|
28439
28503
|
};
|
|
28440
28504
|
}()));
|
|
28441
28505
|
|
|
28442
28506
|
case 4:
|
|
28443
28507
|
case "end":
|
|
28444
|
-
return
|
|
28508
|
+
return _context10.stop();
|
|
28445
28509
|
}
|
|
28446
28510
|
}
|
|
28447
|
-
},
|
|
28511
|
+
}, _callee10);
|
|
28448
28512
|
}));
|
|
28449
28513
|
|
|
28450
28514
|
return function (_x6) {
|
|
28451
|
-
return
|
|
28515
|
+
return _ref15.apply(this, arguments);
|
|
28452
28516
|
};
|
|
28453
28517
|
}()));
|
|
28454
28518
|
|
|
28455
28519
|
case 18:
|
|
28456
|
-
ruleResponse =
|
|
28520
|
+
ruleResponse = _context11.sent;
|
|
28457
28521
|
resType = null;
|
|
28458
28522
|
resText = null;
|
|
28459
28523
|
ruleResponse.map(function (val) {
|
|
@@ -28472,7 +28536,7 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28472
28536
|
resText = val.oC.returnData.alert_test_message;
|
|
28473
28537
|
}
|
|
28474
28538
|
});
|
|
28475
|
-
return
|
|
28539
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28476
28540
|
data: {
|
|
28477
28541
|
type: resType ? alertType[resType] : resType,
|
|
28478
28542
|
alertText: resText
|
|
@@ -28480,24 +28544,25 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28480
28544
|
}));
|
|
28481
28545
|
|
|
28482
28546
|
case 25:
|
|
28483
|
-
|
|
28484
|
-
|
|
28485
|
-
return
|
|
28486
|
-
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
|
|
28487
28551
|
})));
|
|
28488
28552
|
|
|
28489
28553
|
case 28:
|
|
28490
28554
|
case "end":
|
|
28491
|
-
return
|
|
28555
|
+
return _context11.stop();
|
|
28492
28556
|
}
|
|
28493
28557
|
}
|
|
28494
|
-
},
|
|
28558
|
+
}, _callee11, null, [[2, 25]]);
|
|
28495
28559
|
})));
|
|
28496
28560
|
var validateRulesSlice = createSlice({
|
|
28497
28561
|
name: "validateRulesSlice",
|
|
28498
28562
|
initialState: {
|
|
28499
28563
|
PFData: _objectSpread2({}, defaultState.Info),
|
|
28500
28564
|
PFMedData: _objectSpread2({}, defaultState.Info),
|
|
28565
|
+
PFMedData_: _objectSpread2({}, defaultState.Info),
|
|
28501
28566
|
alertLabOrder: _objectSpread2({}, defaultState.Info),
|
|
28502
28567
|
alertMedication: _objectSpread2({}, defaultState.Info)
|
|
28503
28568
|
},
|
|
@@ -28521,33 +28586,44 @@ var validateRulesSlice = createSlice({
|
|
|
28521
28586
|
var _action$payload4;
|
|
28522
28587
|
|
|
28523
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 : {};
|
|
28524
|
-
}), _defineProperty(_extraReducers$j,
|
|
28589
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.fulfilled, function (state, action) {
|
|
28525
28590
|
var _action$payload5;
|
|
28526
28591
|
|
|
28527
|
-
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 : {};
|
|
28528
28603
|
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.pending, function (state, action) {
|
|
28529
28604
|
state.alertLabOrder.loading = true, state.alertLabOrder.error = false, state.alertLabOrder.loading = true;
|
|
28530
28605
|
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.rejected, function (state, action) {
|
|
28531
|
-
var _action$
|
|
28606
|
+
var _action$payload8;
|
|
28532
28607
|
|
|
28533
|
-
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 : {};
|
|
28534
28609
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.fulfilled, function (state, action) {
|
|
28535
|
-
var _action$
|
|
28610
|
+
var _action$payload9;
|
|
28536
28611
|
|
|
28537
|
-
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 : {};
|
|
28538
28613
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.pending, function (state, action) {
|
|
28539
28614
|
state.alertMedication.loading = true, state.alertMedication.error = false, state.alertMedication.loading = true;
|
|
28540
28615
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.rejected, function (state, action) {
|
|
28541
|
-
var _action$
|
|
28616
|
+
var _action$payload10;
|
|
28542
28617
|
|
|
28543
|
-
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 : {};
|
|
28544
28619
|
}), _extraReducers$j)
|
|
28545
28620
|
});
|
|
28546
28621
|
var validateRulesActions = {
|
|
28547
28622
|
FETCHPERFORMINGLOCATION: FETCHPERFORMINGLOCATION,
|
|
28548
28623
|
FETCHPERFORMINGLOCATIONMED: FETCHPERFORMINGLOCATIONMED,
|
|
28549
28624
|
GETALERTWITHLABORDER: GETALERTWITHLABORDER,
|
|
28550
|
-
GETALERTWITHMEDI: GETALERTWITHMEDI
|
|
28625
|
+
GETALERTWITHMEDI: GETALERTWITHMEDI,
|
|
28626
|
+
FETCHPERFORMINGLOCATIONMED_: FETCHPERFORMINGLOCATIONMED_
|
|
28551
28627
|
};
|
|
28552
28628
|
var validateRulesSlice$1 = validateRulesSlice.reducer;
|
|
28553
28629
|
|