primarycare-binder 1.1.98 → 1.1.101
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 +258 -124
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -18345,6 +18345,17 @@ var organizAtionauthActions = {
|
|
|
18345
18345
|
};
|
|
18346
18346
|
var OrganizationAuthApiSlice$1 = OrganizationAuthApiSlice.reducer;
|
|
18347
18347
|
|
|
18348
|
+
var registerQuery = {
|
|
18349
|
+
statusRead: function statusRead() {
|
|
18350
|
+
return {
|
|
18351
|
+
db_name: dbName,
|
|
18352
|
+
entity: "CodingMaster",
|
|
18353
|
+
filter: "lower(CodingMaster.display)==lower('Checked-in') && CodingMaster.activestatus==true",
|
|
18354
|
+
return_fields: "CodingMaster._id"
|
|
18355
|
+
};
|
|
18356
|
+
}
|
|
18357
|
+
};
|
|
18358
|
+
|
|
18348
18359
|
var _extraReducers$q;
|
|
18349
18360
|
var ORGANIZATION_REGISTER_PATIENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/upsert_document", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
18350
18361
|
var payload,
|
|
@@ -19369,6 +19380,45 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
|
|
|
19369
19380
|
}
|
|
19370
19381
|
}, _callee17, null, [[2, 11]]);
|
|
19371
19382
|
})));
|
|
19383
|
+
var GET_ENCOUNTER_STATUS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
|
|
19384
|
+
var payload,
|
|
19385
|
+
_ref36,
|
|
19386
|
+
rejectWithValue,
|
|
19387
|
+
data,
|
|
19388
|
+
_args18 = arguments;
|
|
19389
|
+
|
|
19390
|
+
return regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
19391
|
+
while (1) {
|
|
19392
|
+
switch (_context18.prev = _context18.next) {
|
|
19393
|
+
case 0:
|
|
19394
|
+
payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
|
|
19395
|
+
_ref36 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
|
|
19396
|
+
_context18.prev = 2;
|
|
19397
|
+
_context18.next = 5;
|
|
19398
|
+
return fetchData$3({
|
|
19399
|
+
body: JSON.stringify(registerQuery.statusRead())
|
|
19400
|
+
}, __readDocumentUrl__);
|
|
19401
|
+
|
|
19402
|
+
case 5:
|
|
19403
|
+
data = _context18.sent;
|
|
19404
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19405
|
+
data: data.result
|
|
19406
|
+
}));
|
|
19407
|
+
|
|
19408
|
+
case 9:
|
|
19409
|
+
_context18.prev = 9;
|
|
19410
|
+
_context18.t0 = _context18["catch"](2);
|
|
19411
|
+
return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19412
|
+
message: _context18.t0.message
|
|
19413
|
+
})));
|
|
19414
|
+
|
|
19415
|
+
case 12:
|
|
19416
|
+
case "end":
|
|
19417
|
+
return _context18.stop();
|
|
19418
|
+
}
|
|
19419
|
+
}
|
|
19420
|
+
}, _callee18, null, [[2, 9]]);
|
|
19421
|
+
})));
|
|
19372
19422
|
var OrganizationRegisterPatientApiSlice = createSlice({
|
|
19373
19423
|
name: "OrganizationRegisterPatientApiSlice",
|
|
19374
19424
|
initialState: {
|
|
@@ -19388,7 +19438,8 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
19388
19438
|
getappointment: _objectSpread2({}, defaultState.Info),
|
|
19389
19439
|
getpatientname: _objectSpread2({}, defaultState.Info),
|
|
19390
19440
|
getpatientid: _objectSpread2({}, defaultState.Info),
|
|
19391
|
-
getEncounterHeader: _objectSpread2({}, defaultState.Info)
|
|
19441
|
+
getEncounterHeader: _objectSpread2({}, defaultState.Info),
|
|
19442
|
+
getEncounterStatus: _objectSpread2({}, defaultState.Info)
|
|
19392
19443
|
},
|
|
19393
19444
|
extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q, GET_PATIENT_NAME.fulfilled, function (state, action) {
|
|
19394
19445
|
var _action$payload;
|
|
@@ -19560,6 +19611,16 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
19560
19611
|
var _action$payload34;
|
|
19561
19612
|
|
|
19562
19613
|
state.getEncounterHeader = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
|
|
19614
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_STATUS.fulfilled, function (state, action) {
|
|
19615
|
+
var _action$payload35;
|
|
19616
|
+
|
|
19617
|
+
state.getEncounterStatus = (_action$payload35 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload35 !== void 0 ? _action$payload35 : {};
|
|
19618
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_STATUS.pending, function (state, action) {
|
|
19619
|
+
state.getEncounterStatus.loading = true;
|
|
19620
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_STATUS.rejected, function (state, action) {
|
|
19621
|
+
var _action$payload36;
|
|
19622
|
+
|
|
19623
|
+
state.getEncounterStatus = (_action$payload36 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload36 !== void 0 ? _action$payload36 : {};
|
|
19563
19624
|
}), _extraReducers$q)
|
|
19564
19625
|
});
|
|
19565
19626
|
var oraganizationRegisterPatientActions = {
|
|
@@ -19579,7 +19640,8 @@ var oraganizationRegisterPatientActions = {
|
|
|
19579
19640
|
GET_PATIENT_NAME: GET_PATIENT_NAME,
|
|
19580
19641
|
GET_PATIENT_TYPEID: GET_PATIENT_TYPEID,
|
|
19581
19642
|
GET_PRACTITIONERS: GET_PRACTITIONERS,
|
|
19582
|
-
GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER
|
|
19643
|
+
GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER,
|
|
19644
|
+
GET_ENCOUNTER_STATUS: GET_ENCOUNTER_STATUS
|
|
19583
19645
|
};
|
|
19584
19646
|
var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
|
|
19585
19647
|
|
|
@@ -20087,7 +20149,8 @@ var visitQuery = {
|
|
|
20087
20149
|
entity: "Practitioner,Encounter",
|
|
20088
20150
|
filter: {
|
|
20089
20151
|
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
20090
|
-
Encounter:
|
|
20152
|
+
// Encounter: `Encounter.activestatus == true && Encounter.Organization_id == ${orgId} && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=${startDate} && Encounter.encounterdate<=${endDate} && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length`,
|
|
20153
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && (first(document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].coding) ANY IN Encounter.practitioner_details[*].speciality || DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality) AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length")
|
|
20091
20154
|
},
|
|
20092
20155
|
return_fields: "{CheckedIn:length}"
|
|
20093
20156
|
},
|
|
@@ -20115,7 +20178,8 @@ var visitQuery = {
|
|
|
20115
20178
|
entity: "Practitioner,Encounter",
|
|
20116
20179
|
filter: {
|
|
20117
20180
|
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
20118
|
-
Encounter:
|
|
20181
|
+
// Encounter: `Encounter.activestatus == true && Encounter.Organization_id == ${orgId} && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=${startDate} && Encounter.encounterdate<=${endDate} && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged' collect with count into length`,
|
|
20182
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && (first(document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].coding) ANY IN Encounter.practitioner_details[*].speciality || DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality) AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged' collect with count into length")
|
|
20119
20183
|
},
|
|
20120
20184
|
return_fields: "{TriagedCount:length}"
|
|
20121
20185
|
},
|
|
@@ -20143,7 +20207,8 @@ var visitQuery = {
|
|
|
20143
20207
|
entity: "Practitioner,Encounter",
|
|
20144
20208
|
filter: {
|
|
20145
20209
|
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
20146
|
-
Encounter:
|
|
20210
|
+
// Encounter: `Encounter.activestatus == true && Encounter.Organization_id == ${orgId} && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>= ${startDate} && Encounter.encounterdate<= ${endDate} && Encounter.encounterdate<=${endDate} && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length`,
|
|
20211
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && (first(document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].coding) ANY IN Encounter.practitioner_details[*].speciality || DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality) AND Encounter.encounterdate>= 1655404200 && Encounter.encounterdate<= ").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length")
|
|
20147
20212
|
},
|
|
20148
20213
|
return_fields: "{CompletedCount:length}"
|
|
20149
20214
|
},
|
|
@@ -24990,7 +25055,7 @@ var radOrderActions = _objectSpread2({}, actionInfo$3);
|
|
|
24990
25055
|
var radOrderSlice$1 = radOrderSlice.reducer;
|
|
24991
25056
|
|
|
24992
25057
|
var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
24993
|
-
var _payload$patientid, _payload$encountertyp, _payload$encounterid, _payload$
|
|
25058
|
+
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
25059
|
|
|
24995
25060
|
var filter = {};
|
|
24996
25061
|
|
|
@@ -25014,7 +25079,7 @@ var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
|
25014
25079
|
"patient_Id": (_payload$patientid = payload.patientid) !== null && _payload$patientid !== void 0 ? _payload$patientid : "",
|
|
25015
25080
|
"encountertype": (_payload$encountertyp = payload.encountertype) !== null && _payload$encountertyp !== void 0 ? _payload$encountertyp : "",
|
|
25016
25081
|
"encounter_Id": (_payload$encounterid = payload.encounterid) !== null && _payload$encounterid !== void 0 ? _payload$encounterid : "",
|
|
25017
|
-
"prescripionType":
|
|
25082
|
+
//"prescripionType": payload.prescripionType ?? "",
|
|
25018
25083
|
"prescriptionId": (_payload$prescription = payload.prescriptionId) !== null && _payload$prescription !== void 0 ? _payload$prescription : "",
|
|
25019
25084
|
"PrescriptionDate": (_payload$Prescription = payload.PrescriptionDate) !== null && _payload$Prescription !== void 0 ? _payload$Prescription : 0,
|
|
25020
25085
|
"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 +27475,9 @@ var queries$7 = {
|
|
|
27410
27475
|
medicationOrder: function medicationOrder(orgId) {
|
|
27411
27476
|
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
27477
|
},
|
|
27478
|
+
medicationOrder_: function medicationOrder_(orgId) {
|
|
27479
|
+
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 }");
|
|
27480
|
+
},
|
|
27413
27481
|
organization: function organization(ids) {
|
|
27414
27482
|
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
27483
|
},
|
|
@@ -28027,11 +28095,64 @@ var FETCHPERFORMINGLOCATIONMED = createAsyncThunk("validateRulesSlice/PFMedData"
|
|
|
28027
28095
|
}
|
|
28028
28096
|
}, _callee4, null, [[2, 25]]);
|
|
28029
28097
|
})));
|
|
28030
|
-
var
|
|
28098
|
+
var FETCHPERFORMINGLOCATIONMED_ = createAsyncThunk("validateRulesSlice/PFMedData_", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
28031
28099
|
var payload,
|
|
28032
28100
|
_ref8,
|
|
28033
28101
|
rejectWithValue,
|
|
28034
28102
|
orgId,
|
|
28103
|
+
data,
|
|
28104
|
+
arr,
|
|
28105
|
+
_args5 = arguments;
|
|
28106
|
+
|
|
28107
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
28108
|
+
while (1) {
|
|
28109
|
+
switch (_context5.prev = _context5.next) {
|
|
28110
|
+
case 0:
|
|
28111
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
28112
|
+
_ref8 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
28113
|
+
_context5.prev = 2;
|
|
28114
|
+
orgId = payload.orgId;
|
|
28115
|
+
_context5.next = 6;
|
|
28116
|
+
return fetchData$3({
|
|
28117
|
+
body: queries$7.medicationOrder_(orgId)
|
|
28118
|
+
}, __readDocumentUrl__);
|
|
28119
|
+
|
|
28120
|
+
case 6:
|
|
28121
|
+
data = _context5.sent;
|
|
28122
|
+
arr = [];
|
|
28123
|
+
data.result.map(function (val) {
|
|
28124
|
+
var _val$shortdesc4, _val$_id6, _val$_id7;
|
|
28125
|
+
|
|
28126
|
+
arr.push({
|
|
28127
|
+
label: (_val$shortdesc4 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc4 !== void 0 ? _val$shortdesc4 : "",
|
|
28128
|
+
value: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
28129
|
+
id: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : ""
|
|
28130
|
+
});
|
|
28131
|
+
});
|
|
28132
|
+
debugger;
|
|
28133
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28134
|
+
data: arr
|
|
28135
|
+
}));
|
|
28136
|
+
|
|
28137
|
+
case 13:
|
|
28138
|
+
_context5.prev = 13;
|
|
28139
|
+
_context5.t0 = _context5["catch"](2);
|
|
28140
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28141
|
+
message: _context5.t0.message
|
|
28142
|
+
})));
|
|
28143
|
+
|
|
28144
|
+
case 16:
|
|
28145
|
+
case "end":
|
|
28146
|
+
return _context5.stop();
|
|
28147
|
+
}
|
|
28148
|
+
}
|
|
28149
|
+
}, _callee5, null, [[2, 13]]);
|
|
28150
|
+
})));
|
|
28151
|
+
var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
28152
|
+
var payload,
|
|
28153
|
+
_ref10,
|
|
28154
|
+
rejectWithValue,
|
|
28155
|
+
orgId,
|
|
28035
28156
|
rulePayload,
|
|
28036
28157
|
pracId,
|
|
28037
28158
|
patId,
|
|
@@ -28043,37 +28164,37 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28043
28164
|
ruleResponse,
|
|
28044
28165
|
resType,
|
|
28045
28166
|
resText,
|
|
28046
|
-
|
|
28167
|
+
_args8 = arguments;
|
|
28047
28168
|
|
|
28048
|
-
return regeneratorRuntime.wrap(function
|
|
28169
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
28049
28170
|
while (1) {
|
|
28050
|
-
switch (
|
|
28171
|
+
switch (_context8.prev = _context8.next) {
|
|
28051
28172
|
case 0:
|
|
28052
|
-
payload =
|
|
28053
|
-
|
|
28054
|
-
|
|
28173
|
+
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
28174
|
+
_ref10 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
28175
|
+
_context8.prev = 2;
|
|
28055
28176
|
orgId = payload.orgId, rulePayload = payload.rulePayload, pracId = payload.pracId, patId = payload.patId;
|
|
28056
|
-
|
|
28177
|
+
_context8.next = 6;
|
|
28057
28178
|
return fetchData$3({
|
|
28058
28179
|
body: queries$7.patientData(patId)
|
|
28059
28180
|
}, __readDocumentUrl__);
|
|
28060
28181
|
|
|
28061
28182
|
case 6:
|
|
28062
|
-
patientData =
|
|
28063
|
-
|
|
28183
|
+
patientData = _context8.sent;
|
|
28184
|
+
_context8.next = 9;
|
|
28064
28185
|
return fetchData$3({
|
|
28065
28186
|
body: queries$7.PractitionerData(pracId)
|
|
28066
28187
|
}, __readDocumentUrl__);
|
|
28067
28188
|
|
|
28068
28189
|
case 9:
|
|
28069
|
-
PractitionerData =
|
|
28070
|
-
|
|
28190
|
+
PractitionerData = _context8.sent;
|
|
28191
|
+
_context8.next = 12;
|
|
28071
28192
|
return fetchData$3({
|
|
28072
28193
|
body: queries$7.alertOrderRule(orgId)
|
|
28073
28194
|
}, __readDocumentUrl__);
|
|
28074
28195
|
|
|
28075
28196
|
case 12:
|
|
28076
|
-
alertOrderRule =
|
|
28197
|
+
alertOrderRule = _context8.sent;
|
|
28077
28198
|
arr = [];
|
|
28078
28199
|
alertOrderRule.result.map(function (val) {
|
|
28079
28200
|
arr.push({
|
|
@@ -28087,13 +28208,13 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28087
28208
|
});
|
|
28088
28209
|
});
|
|
28089
28210
|
ruleParamJson = generateJSON$4(rulePayload);
|
|
28090
|
-
|
|
28211
|
+
_context8.next = 18;
|
|
28091
28212
|
return es6Promise.Promise.all(arr.map( /*#__PURE__*/function () {
|
|
28092
|
-
var
|
|
28213
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(val) {
|
|
28093
28214
|
var order_catalog_criteria, patient_criteria, pract_criteria;
|
|
28094
|
-
return regeneratorRuntime.wrap(function
|
|
28215
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
28095
28216
|
while (1) {
|
|
28096
|
-
switch (
|
|
28217
|
+
switch (_context7.prev = _context7.next) {
|
|
28097
28218
|
case 0:
|
|
28098
28219
|
order_catalog_criteria = val.order_catalog_criteria.map(function (val) {
|
|
28099
28220
|
return val.rule.value;
|
|
@@ -28104,24 +28225,24 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28104
28225
|
pract_criteria = val.pract_criteria.map(function (val) {
|
|
28105
28226
|
return val.rule.value;
|
|
28106
28227
|
});
|
|
28107
|
-
return
|
|
28108
|
-
var
|
|
28228
|
+
return _context7.abrupt("return", new es6Promise.Promise( /*#__PURE__*/function () {
|
|
28229
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(resolve, reject) {
|
|
28109
28230
|
var oC, patC, prcC;
|
|
28110
|
-
return regeneratorRuntime.wrap(function
|
|
28231
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
28111
28232
|
while (1) {
|
|
28112
|
-
switch (
|
|
28233
|
+
switch (_context6.prev = _context6.next) {
|
|
28113
28234
|
case 0:
|
|
28114
28235
|
if (!(order_catalog_criteria.length == 0)) {
|
|
28115
|
-
|
|
28236
|
+
_context6.next = 4;
|
|
28116
28237
|
break;
|
|
28117
28238
|
}
|
|
28118
28239
|
|
|
28119
|
-
|
|
28120
|
-
|
|
28240
|
+
_context6.t0 = null;
|
|
28241
|
+
_context6.next = 7;
|
|
28121
28242
|
break;
|
|
28122
28243
|
|
|
28123
28244
|
case 4:
|
|
28124
|
-
|
|
28245
|
+
_context6.next = 6;
|
|
28125
28246
|
return fetchData$3({
|
|
28126
28247
|
body: JSON.stringify({
|
|
28127
28248
|
"ruleId": order_catalog_criteria,
|
|
@@ -28133,22 +28254,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28133
28254
|
}, __ruleBuilderUrl__);
|
|
28134
28255
|
|
|
28135
28256
|
case 6:
|
|
28136
|
-
|
|
28257
|
+
_context6.t0 = _context6.sent;
|
|
28137
28258
|
|
|
28138
28259
|
case 7:
|
|
28139
|
-
oC =
|
|
28260
|
+
oC = _context6.t0;
|
|
28140
28261
|
|
|
28141
28262
|
if (!(patient_criteria.length == 0)) {
|
|
28142
|
-
|
|
28263
|
+
_context6.next = 12;
|
|
28143
28264
|
break;
|
|
28144
28265
|
}
|
|
28145
28266
|
|
|
28146
|
-
|
|
28147
|
-
|
|
28267
|
+
_context6.t1 = null;
|
|
28268
|
+
_context6.next = 15;
|
|
28148
28269
|
break;
|
|
28149
28270
|
|
|
28150
28271
|
case 12:
|
|
28151
|
-
|
|
28272
|
+
_context6.next = 14;
|
|
28152
28273
|
return fetchData$3({
|
|
28153
28274
|
body: JSON.stringify({
|
|
28154
28275
|
"ruleId": patient_criteria,
|
|
@@ -28160,22 +28281,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28160
28281
|
}, __ruleBuilderUrl__);
|
|
28161
28282
|
|
|
28162
28283
|
case 14:
|
|
28163
|
-
|
|
28284
|
+
_context6.t1 = _context6.sent;
|
|
28164
28285
|
|
|
28165
28286
|
case 15:
|
|
28166
|
-
patC =
|
|
28287
|
+
patC = _context6.t1;
|
|
28167
28288
|
|
|
28168
28289
|
if (!(pract_criteria.length == 0)) {
|
|
28169
|
-
|
|
28290
|
+
_context6.next = 20;
|
|
28170
28291
|
break;
|
|
28171
28292
|
}
|
|
28172
28293
|
|
|
28173
|
-
|
|
28174
|
-
|
|
28294
|
+
_context6.t2 = null;
|
|
28295
|
+
_context6.next = 23;
|
|
28175
28296
|
break;
|
|
28176
28297
|
|
|
28177
28298
|
case 20:
|
|
28178
|
-
|
|
28299
|
+
_context6.next = 22;
|
|
28179
28300
|
return fetchData$3({
|
|
28180
28301
|
body: JSON.stringify({
|
|
28181
28302
|
"ruleId": pract_criteria,
|
|
@@ -28187,10 +28308,10 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28187
28308
|
}, __ruleBuilderUrl__);
|
|
28188
28309
|
|
|
28189
28310
|
case 22:
|
|
28190
|
-
|
|
28311
|
+
_context6.t2 = _context6.sent;
|
|
28191
28312
|
|
|
28192
28313
|
case 23:
|
|
28193
|
-
prcC =
|
|
28314
|
+
prcC = _context6.t2;
|
|
28194
28315
|
resolve({
|
|
28195
28316
|
oC: oC,
|
|
28196
28317
|
patC: patC,
|
|
@@ -28199,32 +28320,32 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28199
28320
|
|
|
28200
28321
|
case 25:
|
|
28201
28322
|
case "end":
|
|
28202
|
-
return
|
|
28323
|
+
return _context6.stop();
|
|
28203
28324
|
}
|
|
28204
28325
|
}
|
|
28205
|
-
},
|
|
28326
|
+
}, _callee6);
|
|
28206
28327
|
}));
|
|
28207
28328
|
|
|
28208
28329
|
return function (_x4, _x5) {
|
|
28209
|
-
return
|
|
28330
|
+
return _ref12.apply(this, arguments);
|
|
28210
28331
|
};
|
|
28211
28332
|
}()));
|
|
28212
28333
|
|
|
28213
28334
|
case 4:
|
|
28214
28335
|
case "end":
|
|
28215
|
-
return
|
|
28336
|
+
return _context7.stop();
|
|
28216
28337
|
}
|
|
28217
28338
|
}
|
|
28218
|
-
},
|
|
28339
|
+
}, _callee7);
|
|
28219
28340
|
}));
|
|
28220
28341
|
|
|
28221
28342
|
return function (_x3) {
|
|
28222
|
-
return
|
|
28343
|
+
return _ref11.apply(this, arguments);
|
|
28223
28344
|
};
|
|
28224
28345
|
}()));
|
|
28225
28346
|
|
|
28226
28347
|
case 18:
|
|
28227
|
-
ruleResponse =
|
|
28348
|
+
ruleResponse = _context8.sent;
|
|
28228
28349
|
resType = null;
|
|
28229
28350
|
resText = null;
|
|
28230
28351
|
ruleResponse.map(function (val) {
|
|
@@ -28243,7 +28364,7 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28243
28364
|
resText = val.oC.returnData.alert_test_message;
|
|
28244
28365
|
}
|
|
28245
28366
|
});
|
|
28246
|
-
return
|
|
28367
|
+
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28247
28368
|
data: {
|
|
28248
28369
|
type: resType ? alertType[resType] : resType,
|
|
28249
28370
|
alertText: resText
|
|
@@ -28251,22 +28372,22 @@ var GETALERTWITHLABORDER = createAsyncThunk("validateRulesSlice/alertLabOrder",
|
|
|
28251
28372
|
}));
|
|
28252
28373
|
|
|
28253
28374
|
case 25:
|
|
28254
|
-
|
|
28255
|
-
|
|
28256
|
-
return
|
|
28257
|
-
message:
|
|
28375
|
+
_context8.prev = 25;
|
|
28376
|
+
_context8.t0 = _context8["catch"](2);
|
|
28377
|
+
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28378
|
+
message: _context8.t0.message
|
|
28258
28379
|
})));
|
|
28259
28380
|
|
|
28260
28381
|
case 28:
|
|
28261
28382
|
case "end":
|
|
28262
|
-
return
|
|
28383
|
+
return _context8.stop();
|
|
28263
28384
|
}
|
|
28264
28385
|
}
|
|
28265
|
-
},
|
|
28386
|
+
}, _callee8, null, [[2, 25]]);
|
|
28266
28387
|
})));
|
|
28267
|
-
var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
28388
|
+
var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
28268
28389
|
var payload,
|
|
28269
|
-
|
|
28390
|
+
_ref14,
|
|
28270
28391
|
rejectWithValue,
|
|
28271
28392
|
orgId,
|
|
28272
28393
|
rulePayload,
|
|
@@ -28280,37 +28401,37 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28280
28401
|
ruleResponse,
|
|
28281
28402
|
resType,
|
|
28282
28403
|
resText,
|
|
28283
|
-
|
|
28404
|
+
_args11 = arguments;
|
|
28284
28405
|
|
|
28285
|
-
return regeneratorRuntime.wrap(function
|
|
28406
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
28286
28407
|
while (1) {
|
|
28287
|
-
switch (
|
|
28408
|
+
switch (_context11.prev = _context11.next) {
|
|
28288
28409
|
case 0:
|
|
28289
|
-
payload =
|
|
28290
|
-
|
|
28291
|
-
|
|
28410
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
28411
|
+
_ref14 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
|
|
28412
|
+
_context11.prev = 2;
|
|
28292
28413
|
orgId = payload.orgId, rulePayload = payload.rulePayload, pracId = payload.pracId, patId = payload.patId;
|
|
28293
|
-
|
|
28414
|
+
_context11.next = 6;
|
|
28294
28415
|
return fetchData$3({
|
|
28295
28416
|
body: queries$7.patientData(patId)
|
|
28296
28417
|
}, __readDocumentUrl__);
|
|
28297
28418
|
|
|
28298
28419
|
case 6:
|
|
28299
|
-
patientData =
|
|
28300
|
-
|
|
28420
|
+
patientData = _context11.sent;
|
|
28421
|
+
_context11.next = 9;
|
|
28301
28422
|
return fetchData$3({
|
|
28302
28423
|
body: queries$7.PractitionerData(pracId)
|
|
28303
28424
|
}, __readDocumentUrl__);
|
|
28304
28425
|
|
|
28305
28426
|
case 9:
|
|
28306
|
-
PractitionerData =
|
|
28307
|
-
|
|
28427
|
+
PractitionerData = _context11.sent;
|
|
28428
|
+
_context11.next = 12;
|
|
28308
28429
|
return fetchData$3({
|
|
28309
28430
|
body: queries$7.alertMedicationRule(orgId)
|
|
28310
28431
|
}, __readDocumentUrl__);
|
|
28311
28432
|
|
|
28312
28433
|
case 12:
|
|
28313
|
-
alertOrderRule =
|
|
28434
|
+
alertOrderRule = _context11.sent;
|
|
28314
28435
|
arr = [];
|
|
28315
28436
|
alertOrderRule.result.map(function (val) {
|
|
28316
28437
|
arr.push({
|
|
@@ -28324,13 +28445,13 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28324
28445
|
});
|
|
28325
28446
|
});
|
|
28326
28447
|
ruleParamJson = generateJsonMed(rulePayload);
|
|
28327
|
-
|
|
28448
|
+
_context11.next = 18;
|
|
28328
28449
|
return es6Promise.Promise.all(arr.map( /*#__PURE__*/function () {
|
|
28329
|
-
var
|
|
28450
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(val) {
|
|
28330
28451
|
var order_catalog_criteria, patient_criteria, pract_criteria;
|
|
28331
|
-
return regeneratorRuntime.wrap(function
|
|
28452
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
28332
28453
|
while (1) {
|
|
28333
|
-
switch (
|
|
28454
|
+
switch (_context10.prev = _context10.next) {
|
|
28334
28455
|
case 0:
|
|
28335
28456
|
order_catalog_criteria = val.order_catalog_criteria.map(function (val) {
|
|
28336
28457
|
return val.rule.value;
|
|
@@ -28341,24 +28462,24 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28341
28462
|
pract_criteria = val.pract_criteria.map(function (val) {
|
|
28342
28463
|
return val.rule.value;
|
|
28343
28464
|
});
|
|
28344
|
-
return
|
|
28345
|
-
var
|
|
28465
|
+
return _context10.abrupt("return", new es6Promise.Promise( /*#__PURE__*/function () {
|
|
28466
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(resolve, reject) {
|
|
28346
28467
|
var oC, patC, prcC;
|
|
28347
|
-
return regeneratorRuntime.wrap(function
|
|
28468
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
28348
28469
|
while (1) {
|
|
28349
|
-
switch (
|
|
28470
|
+
switch (_context9.prev = _context9.next) {
|
|
28350
28471
|
case 0:
|
|
28351
28472
|
if (!(order_catalog_criteria.length == 0)) {
|
|
28352
|
-
|
|
28473
|
+
_context9.next = 4;
|
|
28353
28474
|
break;
|
|
28354
28475
|
}
|
|
28355
28476
|
|
|
28356
|
-
|
|
28357
|
-
|
|
28477
|
+
_context9.t0 = null;
|
|
28478
|
+
_context9.next = 7;
|
|
28358
28479
|
break;
|
|
28359
28480
|
|
|
28360
28481
|
case 4:
|
|
28361
|
-
|
|
28482
|
+
_context9.next = 6;
|
|
28362
28483
|
return fetchData$3({
|
|
28363
28484
|
body: JSON.stringify({
|
|
28364
28485
|
"ruleId": order_catalog_criteria,
|
|
@@ -28370,22 +28491,22 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28370
28491
|
}, __ruleBuilderUrl__);
|
|
28371
28492
|
|
|
28372
28493
|
case 6:
|
|
28373
|
-
|
|
28494
|
+
_context9.t0 = _context9.sent;
|
|
28374
28495
|
|
|
28375
28496
|
case 7:
|
|
28376
|
-
oC =
|
|
28497
|
+
oC = _context9.t0;
|
|
28377
28498
|
|
|
28378
28499
|
if (!(patient_criteria.length == 0)) {
|
|
28379
|
-
|
|
28500
|
+
_context9.next = 12;
|
|
28380
28501
|
break;
|
|
28381
28502
|
}
|
|
28382
28503
|
|
|
28383
|
-
|
|
28384
|
-
|
|
28504
|
+
_context9.t1 = null;
|
|
28505
|
+
_context9.next = 15;
|
|
28385
28506
|
break;
|
|
28386
28507
|
|
|
28387
28508
|
case 12:
|
|
28388
|
-
|
|
28509
|
+
_context9.next = 14;
|
|
28389
28510
|
return fetchData$3({
|
|
28390
28511
|
body: JSON.stringify({
|
|
28391
28512
|
"ruleId": patient_criteria,
|
|
@@ -28397,22 +28518,22 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28397
28518
|
}, __ruleBuilderUrl__);
|
|
28398
28519
|
|
|
28399
28520
|
case 14:
|
|
28400
|
-
|
|
28521
|
+
_context9.t1 = _context9.sent;
|
|
28401
28522
|
|
|
28402
28523
|
case 15:
|
|
28403
|
-
patC =
|
|
28524
|
+
patC = _context9.t1;
|
|
28404
28525
|
|
|
28405
28526
|
if (!(pract_criteria.length == 0)) {
|
|
28406
|
-
|
|
28527
|
+
_context9.next = 20;
|
|
28407
28528
|
break;
|
|
28408
28529
|
}
|
|
28409
28530
|
|
|
28410
|
-
|
|
28411
|
-
|
|
28531
|
+
_context9.t2 = null;
|
|
28532
|
+
_context9.next = 23;
|
|
28412
28533
|
break;
|
|
28413
28534
|
|
|
28414
28535
|
case 20:
|
|
28415
|
-
|
|
28536
|
+
_context9.next = 22;
|
|
28416
28537
|
return fetchData$3({
|
|
28417
28538
|
body: JSON.stringify({
|
|
28418
28539
|
"ruleId": pract_criteria,
|
|
@@ -28424,10 +28545,10 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28424
28545
|
}, __ruleBuilderUrl__);
|
|
28425
28546
|
|
|
28426
28547
|
case 22:
|
|
28427
|
-
|
|
28548
|
+
_context9.t2 = _context9.sent;
|
|
28428
28549
|
|
|
28429
28550
|
case 23:
|
|
28430
|
-
prcC =
|
|
28551
|
+
prcC = _context9.t2;
|
|
28431
28552
|
resolve({
|
|
28432
28553
|
oC: oC,
|
|
28433
28554
|
patC: patC,
|
|
@@ -28436,32 +28557,32 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28436
28557
|
|
|
28437
28558
|
case 25:
|
|
28438
28559
|
case "end":
|
|
28439
|
-
return
|
|
28560
|
+
return _context9.stop();
|
|
28440
28561
|
}
|
|
28441
28562
|
}
|
|
28442
|
-
},
|
|
28563
|
+
}, _callee9);
|
|
28443
28564
|
}));
|
|
28444
28565
|
|
|
28445
28566
|
return function (_x7, _x8) {
|
|
28446
|
-
return
|
|
28567
|
+
return _ref16.apply(this, arguments);
|
|
28447
28568
|
};
|
|
28448
28569
|
}()));
|
|
28449
28570
|
|
|
28450
28571
|
case 4:
|
|
28451
28572
|
case "end":
|
|
28452
|
-
return
|
|
28573
|
+
return _context10.stop();
|
|
28453
28574
|
}
|
|
28454
28575
|
}
|
|
28455
|
-
},
|
|
28576
|
+
}, _callee10);
|
|
28456
28577
|
}));
|
|
28457
28578
|
|
|
28458
28579
|
return function (_x6) {
|
|
28459
|
-
return
|
|
28580
|
+
return _ref15.apply(this, arguments);
|
|
28460
28581
|
};
|
|
28461
28582
|
}()));
|
|
28462
28583
|
|
|
28463
28584
|
case 18:
|
|
28464
|
-
ruleResponse =
|
|
28585
|
+
ruleResponse = _context11.sent;
|
|
28465
28586
|
resType = null;
|
|
28466
28587
|
resText = null;
|
|
28467
28588
|
ruleResponse.map(function (val) {
|
|
@@ -28480,7 +28601,7 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28480
28601
|
resText = val.oC.returnData.alert_test_message;
|
|
28481
28602
|
}
|
|
28482
28603
|
});
|
|
28483
|
-
return
|
|
28604
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28484
28605
|
data: {
|
|
28485
28606
|
type: resType ? alertType[resType] : resType,
|
|
28486
28607
|
alertText: resText
|
|
@@ -28488,24 +28609,25 @@ var GETALERTWITHMEDI = createAsyncThunk("validateRulesSlice/alertMedication", /*
|
|
|
28488
28609
|
}));
|
|
28489
28610
|
|
|
28490
28611
|
case 25:
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
return
|
|
28494
|
-
message:
|
|
28612
|
+
_context11.prev = 25;
|
|
28613
|
+
_context11.t0 = _context11["catch"](2);
|
|
28614
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28615
|
+
message: _context11.t0.message
|
|
28495
28616
|
})));
|
|
28496
28617
|
|
|
28497
28618
|
case 28:
|
|
28498
28619
|
case "end":
|
|
28499
|
-
return
|
|
28620
|
+
return _context11.stop();
|
|
28500
28621
|
}
|
|
28501
28622
|
}
|
|
28502
|
-
},
|
|
28623
|
+
}, _callee11, null, [[2, 25]]);
|
|
28503
28624
|
})));
|
|
28504
28625
|
var validateRulesSlice = createSlice({
|
|
28505
28626
|
name: "validateRulesSlice",
|
|
28506
28627
|
initialState: {
|
|
28507
28628
|
PFData: _objectSpread2({}, defaultState.Info),
|
|
28508
28629
|
PFMedData: _objectSpread2({}, defaultState.Info),
|
|
28630
|
+
PFMedData_: _objectSpread2({}, defaultState.Info),
|
|
28509
28631
|
alertLabOrder: _objectSpread2({}, defaultState.Info),
|
|
28510
28632
|
alertMedication: _objectSpread2({}, defaultState.Info)
|
|
28511
28633
|
},
|
|
@@ -28529,33 +28651,44 @@ var validateRulesSlice = createSlice({
|
|
|
28529
28651
|
var _action$payload4;
|
|
28530
28652
|
|
|
28531
28653
|
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,
|
|
28654
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.fulfilled, function (state, action) {
|
|
28533
28655
|
var _action$payload5;
|
|
28534
28656
|
|
|
28535
|
-
state.
|
|
28657
|
+
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 : {};
|
|
28658
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.pending, function (state, action) {
|
|
28659
|
+
state.PFMedData_.loading = true, state.PFMedData_.error = false, state.PFMedData_.loading = true;
|
|
28660
|
+
}), _defineProperty(_extraReducers$j, FETCHPERFORMINGLOCATIONMED_.rejected, function (state, action) {
|
|
28661
|
+
var _action$payload6;
|
|
28662
|
+
|
|
28663
|
+
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 : {};
|
|
28664
|
+
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.fulfilled, function (state, action) {
|
|
28665
|
+
var _action$payload7;
|
|
28666
|
+
|
|
28667
|
+
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
28668
|
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.pending, function (state, action) {
|
|
28537
28669
|
state.alertLabOrder.loading = true, state.alertLabOrder.error = false, state.alertLabOrder.loading = true;
|
|
28538
28670
|
}), _defineProperty(_extraReducers$j, GETALERTWITHLABORDER.rejected, function (state, action) {
|
|
28539
|
-
var _action$
|
|
28671
|
+
var _action$payload8;
|
|
28540
28672
|
|
|
28541
|
-
state.alertLabOrder.loading = false, state.alertLabOrder.error = true, state.alertLabOrder = (_action$
|
|
28673
|
+
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
28674
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.fulfilled, function (state, action) {
|
|
28543
|
-
var _action$
|
|
28675
|
+
var _action$payload9;
|
|
28544
28676
|
|
|
28545
|
-
state.alertMedication.loading = false, state.alertMedication.error = false, state.alertMedication = (_action$
|
|
28677
|
+
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
28678
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.pending, function (state, action) {
|
|
28547
28679
|
state.alertMedication.loading = true, state.alertMedication.error = false, state.alertMedication.loading = true;
|
|
28548
28680
|
}), _defineProperty(_extraReducers$j, GETALERTWITHMEDI.rejected, function (state, action) {
|
|
28549
|
-
var _action$
|
|
28681
|
+
var _action$payload10;
|
|
28550
28682
|
|
|
28551
|
-
state.alertMedication.loading = false, state.alertMedication.error = true, state.alertMedication = (_action$
|
|
28683
|
+
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
28684
|
}), _extraReducers$j)
|
|
28553
28685
|
});
|
|
28554
28686
|
var validateRulesActions = {
|
|
28555
28687
|
FETCHPERFORMINGLOCATION: FETCHPERFORMINGLOCATION,
|
|
28556
28688
|
FETCHPERFORMINGLOCATIONMED: FETCHPERFORMINGLOCATIONMED,
|
|
28557
28689
|
GETALERTWITHLABORDER: GETALERTWITHLABORDER,
|
|
28558
|
-
GETALERTWITHMEDI: GETALERTWITHMEDI
|
|
28690
|
+
GETALERTWITHMEDI: GETALERTWITHMEDI,
|
|
28691
|
+
FETCHPERFORMINGLOCATIONMED_: FETCHPERFORMINGLOCATIONMED_
|
|
28559
28692
|
};
|
|
28560
28693
|
var validateRulesSlice$1 = validateRulesSlice.reducer;
|
|
28561
28694
|
|
|
@@ -40300,7 +40433,8 @@ var query$4 = {
|
|
|
40300
40433
|
entity: "Practitioner,Encounter",
|
|
40301
40434
|
filter: {
|
|
40302
40435
|
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40303
|
-
Encounter:
|
|
40436
|
+
// Encounter: `Encounter.activestatus == true && Encounter.Organization_id == ${data?.orgIDInt} && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=${data?.startDate} && Encounter.encounterdate<=${data?.endDate} && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'`,
|
|
40437
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIDInt, " && (first(document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].coding) ANY IN Encounter.practitioner_details[*].speciality || DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality) AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'")
|
|
40304
40438
|
},
|
|
40305
40439
|
return_fields: "merge(Encounter,{status:document(Encounter.status),patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40306
40440
|
};
|