primarycare-binder 1.1.5 → 1.1.9
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 +663 -257
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -11654,8 +11654,6 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11654
11654
|
//NURSE - completed_nurse
|
|
11655
11655
|
//DOCTOR - completed
|
|
11656
11656
|
|
|
11657
|
-
debugger;
|
|
11658
|
-
|
|
11659
11657
|
if (status === "completed_assemble") {
|
|
11660
11658
|
encounterStatus = "checked-in";
|
|
11661
11659
|
} else if (status === "inprogress_nurse") {
|
|
@@ -11671,11 +11669,11 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11671
11669
|
}
|
|
11672
11670
|
|
|
11673
11671
|
if (!encounterStatus) {
|
|
11674
|
-
_context14.next =
|
|
11672
|
+
_context14.next = 20;
|
|
11675
11673
|
break;
|
|
11676
11674
|
}
|
|
11677
11675
|
|
|
11678
|
-
_context14.next =
|
|
11676
|
+
_context14.next = 8;
|
|
11679
11677
|
return fetchData$3({
|
|
11680
11678
|
body: JSON.stringify({
|
|
11681
11679
|
db_name: dbName,
|
|
@@ -11685,11 +11683,10 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11685
11683
|
})
|
|
11686
11684
|
}, __readDocumentUrl__);
|
|
11687
11685
|
|
|
11688
|
-
case
|
|
11686
|
+
case 8:
|
|
11689
11687
|
encounterCode = _context14.sent;
|
|
11690
|
-
debugger;
|
|
11691
11688
|
encounterStatus = (_encounterCode$result = encounterCode === null || encounterCode === void 0 ? void 0 : (_encounterCode$result2 = encounterCode.result) === null || _encounterCode$result2 === void 0 ? void 0 : (_encounterCode$result3 = _encounterCode$result2[0]) === null || _encounterCode$result3 === void 0 ? void 0 : _encounterCode$result3._id) !== null && _encounterCode$result !== void 0 ? _encounterCode$result : "";
|
|
11692
|
-
_context14.next =
|
|
11689
|
+
_context14.next = 12;
|
|
11693
11690
|
return fetchData$3({
|
|
11694
11691
|
body: JSON.stringify({
|
|
11695
11692
|
db_name: dbName,
|
|
@@ -11699,12 +11696,12 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11699
11696
|
})
|
|
11700
11697
|
}, __readDocumentUrl__);
|
|
11701
11698
|
|
|
11702
|
-
case
|
|
11699
|
+
case 12:
|
|
11703
11700
|
encounterInfo = _context14.sent;
|
|
11704
11701
|
_ref30 = (encounterInfo === null || encounterInfo === void 0 ? void 0 : (_encounterInfo$result = encounterInfo.result) === null || _encounterInfo$result === void 0 ? void 0 : _encounterInfo$result[0]) || {}, _id = _ref30._id, _key = _ref30._key, statushistory = _ref30.statushistory;
|
|
11705
11702
|
|
|
11706
11703
|
if (!(_id && _key && statushistory && Array.isArray(statushistory))) {
|
|
11707
|
-
_context14.next =
|
|
11704
|
+
_context14.next = 20;
|
|
11708
11705
|
break;
|
|
11709
11706
|
}
|
|
11710
11707
|
|
|
@@ -11741,12 +11738,12 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11741
11738
|
status: encounterStatus
|
|
11742
11739
|
}
|
|
11743
11740
|
}];
|
|
11744
|
-
_context14.next =
|
|
11741
|
+
_context14.next = 20;
|
|
11745
11742
|
return fetchData$3({
|
|
11746
11743
|
body: JSON.stringify(updateData)
|
|
11747
11744
|
}, __uspsertUrl__);
|
|
11748
11745
|
|
|
11749
|
-
case
|
|
11746
|
+
case 20:
|
|
11750
11747
|
// const appData = await fetchData({
|
|
11751
11748
|
// body: JSON.stringify(appBody),
|
|
11752
11749
|
// });
|
|
@@ -11757,7 +11754,6 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11757
11754
|
}
|
|
11758
11755
|
|
|
11759
11756
|
appInfo["comment"] = status;
|
|
11760
|
-
debugger;
|
|
11761
11757
|
body = [{
|
|
11762
11758
|
db_name: dbName,
|
|
11763
11759
|
entity: "Appointment",
|
|
@@ -11768,30 +11764,30 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11768
11764
|
id: appointmentId
|
|
11769
11765
|
}
|
|
11770
11766
|
}];
|
|
11771
|
-
_context14.next =
|
|
11767
|
+
_context14.next = 26;
|
|
11772
11768
|
return fetchData$3({
|
|
11773
11769
|
body: JSON.stringify(body)
|
|
11774
11770
|
}, __uspsertUrl__);
|
|
11775
11771
|
|
|
11776
|
-
case
|
|
11772
|
+
case 26:
|
|
11777
11773
|
data = _context14.sent;
|
|
11778
11774
|
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
11779
11775
|
data: data
|
|
11780
11776
|
}));
|
|
11781
11777
|
|
|
11782
|
-
case
|
|
11783
|
-
_context14.prev =
|
|
11778
|
+
case 30:
|
|
11779
|
+
_context14.prev = 30;
|
|
11784
11780
|
_context14.t0 = _context14["catch"](2);
|
|
11785
11781
|
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
11786
11782
|
message: _context14.t0.message
|
|
11787
11783
|
})));
|
|
11788
11784
|
|
|
11789
|
-
case
|
|
11785
|
+
case 33:
|
|
11790
11786
|
case "end":
|
|
11791
11787
|
return _context14.stop();
|
|
11792
11788
|
}
|
|
11793
11789
|
}
|
|
11794
|
-
}, _callee14, null, [[2,
|
|
11790
|
+
}, _callee14, null, [[2, 30]]);
|
|
11795
11791
|
})));
|
|
11796
11792
|
var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApoointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
11797
11793
|
var payload,
|
|
@@ -18137,7 +18133,7 @@ var dashboardQuery = {
|
|
|
18137
18133
|
entity: "Practitioner,Encounter",
|
|
18138
18134
|
filter: {
|
|
18139
18135
|
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' and Practitioner.id==".concat(loginId, " AND DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orgID, "'"),
|
|
18140
|
-
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].
|
|
18136
|
+
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length")
|
|
18141
18137
|
},
|
|
18142
18138
|
return_fields: "{Finished:length}"
|
|
18143
18139
|
} // 3: {},
|
|
@@ -18488,7 +18484,7 @@ var visitQuery = {
|
|
|
18488
18484
|
entity: "Practitioner,Encounter",
|
|
18489
18485
|
filter: {
|
|
18490
18486
|
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
18491
|
-
Encounter: "Encounter.activestatus == true && Encounter.Organization_id ==".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>= ").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].
|
|
18487
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id ==".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>= ").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length")
|
|
18492
18488
|
},
|
|
18493
18489
|
return_fields: "{CompletedCount:length}"
|
|
18494
18490
|
},
|
|
@@ -18497,14 +18493,14 @@ var visitQuery = {
|
|
|
18497
18493
|
entity: "Practitioner,Encounter",
|
|
18498
18494
|
filter: {
|
|
18499
18495
|
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, "'"),
|
|
18500
|
-
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>= ").concat(startDate, " && Encounter.encounterdate<= ").concat(endDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].
|
|
18496
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>= ").concat(startDate, " && Encounter.encounterdate<= ").concat(endDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length")
|
|
18501
18497
|
},
|
|
18502
18498
|
return_fields: "{CompletedCount:length}"
|
|
18503
18499
|
},
|
|
18504
18500
|
3: {
|
|
18505
18501
|
db_name: dbName,
|
|
18506
18502
|
entity: "Encounter",
|
|
18507
|
-
filter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].
|
|
18503
|
+
filter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length"),
|
|
18508
18504
|
return_fields: "{CompletedCount:length}"
|
|
18509
18505
|
}
|
|
18510
18506
|
};
|
|
@@ -18559,7 +18555,7 @@ var highPriorityPatientQuery = {
|
|
|
18559
18555
|
1: {
|
|
18560
18556
|
db_name: "primarycare",
|
|
18561
18557
|
entity: "Encounter",
|
|
18562
|
-
filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'
|
|
18558
|
+
filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'"),
|
|
18563
18559
|
return_fields: "MERGE(Encounter,{patient_id:(FOR pat IN Patient FILTER pat.id==Encounter.patient_id RETURN MERGE(pat,{name:(FOR hn IN TO_ARRAY(pat.name) RETURN DOCUMENT(hn)),photo:(FOR ph IN TO_ARRAY(pat.photo) RETURN DOCUMENT(ph))})),priority:DOCUMENT(Encounter.priority),priorityreason:DOCUMENT(Encounter.priorityreason)},{appointmentId:(for app in Appointment filter app.id in Encounter.appointmentId return app)},{reasonReference:document(Encounter.reasonReference)})"
|
|
18564
18560
|
},
|
|
18565
18561
|
2: {
|
|
@@ -18704,24 +18700,23 @@ var TODAY_SCHEDULE = createAsyncThunk("dashboardApiSlice/today_schedul", /*#__PU
|
|
|
18704
18700
|
});
|
|
18705
18701
|
}
|
|
18706
18702
|
|
|
18707
|
-
debugger;
|
|
18708
18703
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
18709
18704
|
data: arr
|
|
18710
18705
|
}));
|
|
18711
18706
|
|
|
18712
|
-
case
|
|
18713
|
-
_context2.prev =
|
|
18707
|
+
case 12:
|
|
18708
|
+
_context2.prev = 12;
|
|
18714
18709
|
_context2.t0 = _context2["catch"](2);
|
|
18715
18710
|
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18716
18711
|
message: _context2.t0.message
|
|
18717
18712
|
})));
|
|
18718
18713
|
|
|
18719
|
-
case
|
|
18714
|
+
case 15:
|
|
18720
18715
|
case "end":
|
|
18721
18716
|
return _context2.stop();
|
|
18722
18717
|
}
|
|
18723
18718
|
}
|
|
18724
|
-
}, _callee2, null, [[2,
|
|
18719
|
+
}, _callee2, null, [[2, 12]]);
|
|
18725
18720
|
})));
|
|
18726
18721
|
var PATIENT_WAITING_TIME = createAsyncThunk("dashboardApiSlice/patientWaitingTime", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
18727
18722
|
var payload,
|
|
@@ -18761,25 +18756,24 @@ var PATIENT_WAITING_TIME = createAsyncThunk("dashboardApiSlice/patientWaitingTim
|
|
|
18761
18756
|
|
|
18762
18757
|
case 6:
|
|
18763
18758
|
data = _context3.sent;
|
|
18764
|
-
debugger;
|
|
18765
18759
|
arr = [(_data$0$LessThan15$0$ = data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$LessThan = _data$.LessThan15) === null || _data$$LessThan === void 0 ? void 0 : (_data$$LessThan$ = _data$$LessThan[0]) === null || _data$$LessThan$ === void 0 ? void 0 : _data$$LessThan$.LessThan15) !== null && _data$0$LessThan15$0$ !== void 0 ? _data$0$LessThan15$0$ : 0, (_data$0$MoreThan15$0$ = data === null || data === void 0 ? void 0 : (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$MoreThan = _data$2.MoreThan15) === null || _data$2$MoreThan === void 0 ? void 0 : (_data$2$MoreThan$ = _data$2$MoreThan[0]) === null || _data$2$MoreThan$ === void 0 ? void 0 : _data$2$MoreThan$.MoreThan15) !== null && _data$0$MoreThan15$0$ !== void 0 ? _data$0$MoreThan15$0$ : 0, (_data$0$GreaterThan = data === null || data === void 0 ? void 0 : (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : (_data$3$GreaterThan = _data$3.GreaterThan30) === null || _data$3$GreaterThan === void 0 ? void 0 : (_data$3$GreaterThan$ = _data$3$GreaterThan[0]) === null || _data$3$GreaterThan$ === void 0 ? void 0 : _data$3$GreaterThan$.GreaterThan30) !== null && _data$0$GreaterThan !== void 0 ? _data$0$GreaterThan : 0];
|
|
18766
18760
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
18767
18761
|
data: arr
|
|
18768
18762
|
}));
|
|
18769
18763
|
|
|
18770
|
-
case
|
|
18771
|
-
_context3.prev =
|
|
18764
|
+
case 11:
|
|
18765
|
+
_context3.prev = 11;
|
|
18772
18766
|
_context3.t0 = _context3["catch"](2);
|
|
18773
18767
|
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18774
18768
|
message: _context3.t0.message
|
|
18775
18769
|
})));
|
|
18776
18770
|
|
|
18777
|
-
case
|
|
18771
|
+
case 14:
|
|
18778
18772
|
case "end":
|
|
18779
18773
|
return _context3.stop();
|
|
18780
18774
|
}
|
|
18781
18775
|
}
|
|
18782
|
-
}, _callee3, null, [[2,
|
|
18776
|
+
}, _callee3, null, [[2, 11]]);
|
|
18783
18777
|
})));
|
|
18784
18778
|
var PATIENTSTATUSASSESSMENTPENDING = createAsyncThunk("dashboardApiSlice/patientStatusAssessmentPendin", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
18785
18779
|
var payload,
|
|
@@ -19051,34 +19045,32 @@ var TODAY_VISIT = createAsyncThunk("dashboardApiSlice/today_visit", /*#__PURE__*
|
|
|
19051
19045
|
_ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
|
|
19052
19046
|
_context9.prev = 2;
|
|
19053
19047
|
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgIdInt = payload.orgIdInt;
|
|
19054
|
-
|
|
19055
|
-
_context9.next = 7;
|
|
19048
|
+
_context9.next = 6;
|
|
19056
19049
|
return fetchData$3({
|
|
19057
19050
|
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId)[roleId])
|
|
19058
19051
|
}, __readDocumentUrl__);
|
|
19059
19052
|
|
|
19060
|
-
case
|
|
19053
|
+
case 6:
|
|
19061
19054
|
data = _context9.sent;
|
|
19062
|
-
debugger;
|
|
19063
19055
|
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19064
19056
|
data: {
|
|
19065
19057
|
count: (_data$result$0$Checke2 = data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : (_data$result2$ = _data$result2[0]) === null || _data$result2$ === void 0 ? void 0 : _data$result2$.CheckedIn) !== null && _data$result$0$Checke2 !== void 0 ? _data$result$0$Checke2 : 0
|
|
19066
19058
|
}
|
|
19067
19059
|
}));
|
|
19068
19060
|
|
|
19069
|
-
case
|
|
19070
|
-
_context9.prev =
|
|
19061
|
+
case 10:
|
|
19062
|
+
_context9.prev = 10;
|
|
19071
19063
|
_context9.t0 = _context9["catch"](2);
|
|
19072
19064
|
return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19073
19065
|
message: _context9.t0.message
|
|
19074
19066
|
})));
|
|
19075
19067
|
|
|
19076
|
-
case
|
|
19068
|
+
case 13:
|
|
19077
19069
|
case "end":
|
|
19078
19070
|
return _context9.stop();
|
|
19079
19071
|
}
|
|
19080
19072
|
}
|
|
19081
|
-
}, _callee9, null, [[2,
|
|
19073
|
+
}, _callee9, null, [[2, 10]]);
|
|
19082
19074
|
})));
|
|
19083
19075
|
var OTHER_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
19084
19076
|
var payload,
|
|
@@ -24595,10 +24587,10 @@ var queries$7 = {
|
|
|
24595
24587
|
// "return_fields": "CA_AllergyIntolerance"
|
|
24596
24588
|
// }
|
|
24597
24589
|
return {
|
|
24598
|
-
db_name:
|
|
24590
|
+
db_name: dbName,
|
|
24599
24591
|
entity: "CA_AllergyIntolerance",
|
|
24600
24592
|
filter: "CA_AllergyIntolerance.encounter_id=='".concat(encounter_id, "'"),
|
|
24601
|
-
return_fields: " MERGE(CA_AllergyIntolerance,{statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))},{practitioner_id:(for prac in Practitioner filter prac._id == CA_AllergyIntolerance.practitioner_id return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for us in CodeableConceptMaster filter us._id == nam.use return merge(us,{coding:document(us.coding)}))},{prefix:(for pre in CodeableConceptMaster filter pre._id == nam.prefix return merge(pre,{coding:document(pre.coding)}))},{suffix:(for suf in CodeableConceptMaster filter suf._id == nam.suffix return merge(suf,{coding:document(suf.coding)}))}))}))})"
|
|
24593
|
+
return_fields: " MERGE(CA_AllergyIntolerance,{statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))},{practitioner_id:(for prac in Practitioner filter prac._id == CA_AllergyIntolerance.practitioner_id return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for us in CodeableConceptMaster filter us._id == nam.use return merge(us,{coding:document(us.coding)}))},{prefix:(for pre in CodeableConceptMaster filter pre._id == nam.prefix return merge(pre,{coding:document(pre.coding)}))},{suffix:(for suf in CodeableConceptMaster filter suf._id == nam.suffix return merge(suf,{coding:document(suf.coding)}))}))}))},{code:keep(document(CA_AllergyIntolerance.code),'_id','longdesc','id','code','_key')})"
|
|
24602
24594
|
};
|
|
24603
24595
|
},
|
|
24604
24596
|
reactionMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ALREACTIONCODE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
@@ -24620,7 +24612,7 @@ var queries$7 = {
|
|
|
24620
24612
|
filter: {
|
|
24621
24613
|
CA_AllergyIntolerance: "CA_AllergyIntolerance.patient_id=='".concat(patientId, "'")
|
|
24622
24614
|
},
|
|
24623
|
-
return_fields: " MERGE(CA_AllergyIntolerance, {practitioner_id: (FOR hn IN TO_ARRAY(DOCUMENT(CA_AllergyIntolerance.practitioner_id).name) RETURN MERGE(DOCUMENT(CA_AllergyIntolerance.practitioner_id), {name:DOCUMENT(hn)})) }, {statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))})"
|
|
24615
|
+
return_fields: " MERGE(CA_AllergyIntolerance, {practitioner_id: (FOR hn IN TO_ARRAY(DOCUMENT(CA_AllergyIntolerance.practitioner_id).name) RETURN MERGE(DOCUMENT(CA_AllergyIntolerance.practitioner_id), {name:DOCUMENT(hn)})) }, {statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))},{code:keep(document(CA_AllergyIntolerance.code),'_id','longdesc','id','code','_key')})"
|
|
24624
24616
|
};
|
|
24625
24617
|
}
|
|
24626
24618
|
};
|
|
@@ -24794,7 +24786,7 @@ var generateJSON$3 = function generateJSON(data) {
|
|
|
24794
24786
|
|
|
24795
24787
|
var generateResJson$4 = function generateResJson(dataList, state) {
|
|
24796
24788
|
var list = dataList.map(function (data) {
|
|
24797
|
-
var _data$code, _data$category, _data$category2, _data$clinicalstatus, _data$lastoccurrence, _data$lastoccurrence$, _data$lastoccurrence2, _data$lastoccurrence3, _data$lastoccurrence4, _data$lastoccurrence5, _data$lastoccurrence6, _data$lastoccurrence7, _data$lastoccurrence8, _data$lastoccurrence9, _data$lastoccurrence10, _data$lastoccurrence11, _data$lastoccurrence12, _data$lastoccurrence13, _data$lastoccurrence14, _data$lastoccurrence15, _data$lastoccurrence16, _data$lastoccurrence17, _data$lastoccurrence18, _data$lastoccurrence19, _data$lastoccurrence20, _data$lastoccurrence21, _data$note, _data$onset, _data$onset$, _data$onset2, _data$onset2$, _data$onset3, _data$onset3$, _data$onset4, _data$onset4$, _data$onset5, _data$onset5$, _data$onset6, _data$onset6$, _data$onset7, _data$onset7$, _data$onset8, _data$onset8$, _data$onset9, _data$onset9$, _data$onset10, _data$onset10$, _data$onset11, _data$onset11$, _data$relationName, _data$criticality, _data$type, _data$verificationsta, _data$reaction, _data$createddate;
|
|
24789
|
+
var _data$code, _data$code2, _data$category, _data$category2, _data$clinicalstatus, _data$lastoccurrence, _data$lastoccurrence$, _data$lastoccurrence2, _data$lastoccurrence3, _data$lastoccurrence4, _data$lastoccurrence5, _data$lastoccurrence6, _data$lastoccurrence7, _data$lastoccurrence8, _data$lastoccurrence9, _data$lastoccurrence10, _data$lastoccurrence11, _data$lastoccurrence12, _data$lastoccurrence13, _data$lastoccurrence14, _data$lastoccurrence15, _data$lastoccurrence16, _data$lastoccurrence17, _data$lastoccurrence18, _data$lastoccurrence19, _data$lastoccurrence20, _data$lastoccurrence21, _data$note, _data$onset, _data$onset$, _data$onset2, _data$onset2$, _data$onset3, _data$onset3$, _data$onset4, _data$onset4$, _data$onset5, _data$onset5$, _data$onset6, _data$onset6$, _data$onset7, _data$onset7$, _data$onset8, _data$onset8$, _data$onset9, _data$onset9$, _data$onset10, _data$onset10$, _data$onset11, _data$onset11$, _data$relationName, _data$criticality, _data$type, _data$verificationsta, _data$reaction, _data$createddate;
|
|
24798
24790
|
|
|
24799
24791
|
// let clicnicalstatushistory = val?.clicnicalstatushistory?.map(val => {
|
|
24800
24792
|
// return {
|
|
@@ -24804,7 +24796,10 @@ var generateResJson$4 = function generateResJson(dataList, state) {
|
|
|
24804
24796
|
// }
|
|
24805
24797
|
// })
|
|
24806
24798
|
return {
|
|
24807
|
-
"allergenCode":
|
|
24799
|
+
"allergenCode": {
|
|
24800
|
+
label: data === null || data === void 0 ? void 0 : (_data$code = data.code) === null || _data$code === void 0 ? void 0 : _data$code.longdesc,
|
|
24801
|
+
value: data === null || data === void 0 ? void 0 : (_data$code2 = data.code) === null || _data$code2 === void 0 ? void 0 : _data$code2._id
|
|
24802
|
+
},
|
|
24808
24803
|
"asserted": (_data$category = data === null || data === void 0 ? void 0 : data.category) !== null && _data$category !== void 0 ? _data$category : null,
|
|
24809
24804
|
"category": (_data$category2 = data === null || data === void 0 ? void 0 : data.category) !== null && _data$category2 !== void 0 ? _data$category2 : null,
|
|
24810
24805
|
"clinicalStatus": (_data$clinicalstatus = data === null || data === void 0 ? void 0 : data.clinicalstatus) !== null && _data$clinicalstatus !== void 0 ? _data$clinicalstatus : null,
|
|
@@ -25987,7 +25982,7 @@ var queries$6 = {
|
|
|
25987
25982
|
db_name: "primarycare",
|
|
25988
25983
|
entity: "CA_OrderLine",
|
|
25989
25984
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
25990
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})" // db_name: `${dbName}`,
|
|
25985
|
+
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})" // db_name: `${dbName}`,
|
|
25991
25986
|
// entity: "CA_OrderLine",
|
|
25992
25987
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=="${order_id}" && CA_OrderLine.activestatus==true`,
|
|
25993
25988
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true`,
|
|
@@ -26064,7 +26059,7 @@ var queries$6 = {
|
|
|
26064
26059
|
|
|
26065
26060
|
var generateResJson$3 = function generateResJson(dataList, arr) {
|
|
26066
26061
|
var list = dataList.map(function (val) {
|
|
26067
|
-
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$
|
|
26062
|
+
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$Requestor11, _val$Requestor11$, _val$Requestor11$$pra, _val$Requestor11$$pra2, _val$Requestor11$$pra3, _val$specimenRelated$, _val$specimenRelated$2, _val$specimenRelated$3, _val$specimenRelated$4, _val$specimenRelated$5, _val$specimenRelated$6, _val$specimenRelated$7, _val$specimenRelated$8, _val$specimenRelated$9, _val$specimenRelated$10, _val$specimenRelated$11, _val$patientInstructi, _val$patientInstructi2, _val$patientInstructi3, _val$patientInstructi4, _val$patientInstructi5, _val$patientInstructi6, _val$patientInstructi7, _val$patientInstructi8, _val$preparatoryInstr, _val$preparatoryInstr2, _val$preparatoryInstr3, _val$preparatoryInstr4, _val$preparatoryInstr5, _val$preparatoryInstr6, _val$preparatoryInstr7, _val$preparatoryInstr8, _val$departmentalInst, _val$departmentalInst2, _val$departmentalInst3, _val$departmentalInst4, _val$departmentalInst5, _val$departmentalInst6, _val$departmentalInst7, _val$departmentalInst8, _val$attribute, _val$attribute$, _val$attribute2, _val$attribute2$, _val$attribute$0$bedS, _val$attribute3, _val$attribute3$, _val$attribute$0$cont, _val$attribute4, _val$attribute4$, _val$createddate, _val$changeStatus, _val$changeStatus2, _val$changeStatus3, _val$statushistory, _val$statusreason, _val$accessionNum;
|
|
26068
26063
|
|
|
26069
26064
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis = val.diagnosis) === null || _val$diagnosis === void 0 ? void 0 : _val$diagnosis.map(function (v) {
|
|
26070
26065
|
return {
|
|
@@ -26157,7 +26152,8 @@ var generateResJson$3 = function generateResJson(dataList, arr) {
|
|
|
26157
26152
|
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor8 = val.Requestor) === null || _val$Requestor8 === void 0 ? void 0 : (_val$Requestor8$ = _val$Requestor8[0]) === null || _val$Requestor8$ === void 0 ? void 0 : (_val$Requestor8$$prac = _val$Requestor8$.practId) === null || _val$Requestor8$$prac === void 0 ? void 0 : (_val$Requestor8$$prac2 = _val$Requestor8$$prac[0]) === null || _val$Requestor8$$prac2 === void 0 ? void 0 : (_val$Requestor8$$prac3 = _val$Requestor8$$prac2.name) === null || _val$Requestor8$$prac3 === void 0 ? void 0 : _val$Requestor8$$prac3[0],
|
|
26158
26153
|
orderBy: {
|
|
26159
26154
|
value: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.id,
|
|
26160
|
-
|
|
26155
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.practitioner_id,
|
|
26156
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
|
|
26161
26157
|
}
|
|
26162
26158
|
},
|
|
26163
26159
|
indication: {
|
|
@@ -26239,7 +26235,7 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
|
|
|
26239
26235
|
return el != null;
|
|
26240
26236
|
});
|
|
26241
26237
|
var list = dataList.map(function (val) {
|
|
26242
|
-
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$
|
|
26238
|
+
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$Requestor12, _val$Requestor12$, _val$Requestor12$$org, _val$Requestor13, _val$Requestor13$, _val$Requestor13$$org, _val$Requestor14, _val$Requestor14$, _val$Requestor14$$org, _val$Requestor$0$prac3, _val$Requestor15, _val$Requestor15$, _val$Requestor15$$pra, _val$Requestor$0$prac4, _val$Requestor16, _val$Requestor16$, _val$Requestor16$$pra, _val$Requestor17, _val$Requestor17$, _val$Requestor17$$pra, _val$Requestor18, _val$Requestor18$, _val$Requestor18$$pra, _val$Requestor19, _val$Requestor19$, _val$Requestor19$$pra, _val$Requestor19$$pra2, _val$Requestor19$$pra3, _val$Requestor20, _val$Requestor20$, _val$Requestor20$$pra, _val$Requestor20$$pra2, _val$Requestor21, _val$Requestor21$, _val$Requestor21$$pra, _val$Requestor21$$pra2, _val$Requestor22, _val$Requestor22$, _val$Requestor22$$pra, _val$Requestor22$$pra2, _val$Requestor22$$pra3, _val$specimenRelated, _val$specimenRelated$12, _val$specimenRelated2, _val$specimenRelated3, _val$specimenRelated4, _val$specimenRelated5, _val$specimenRelated6, _val$specimenRelated7, _val$specimenRelated8, _val$specimenRelated9, _val$specimenRelated10, _val$specimenRelated11, _val$specimenRelated12, _val$specimenRelated13, _val$specimenRelated14, _val$specimenRelated15, _val$specimenRelated16, _val$specimenRelated17, _val$specimenRelated18, _val$specimenRelated19, _val$specimenRelated20, _val$specimenRelated21, _val$specimenRelated22, _val$patientInstructi9, _val$patientInstructi10, _val$patientInstructi11, _val$patientInstructi12, _val$patientInstructi13, _val$patientInstructi14, _val$patientInstructi15, _val$patientInstructi16, _val$preparatoryInstr9, _val$preparatoryInstr10, _val$preparatoryInstr11, _val$preparatoryInstr12, _val$preparatoryInstr13, _val$preparatoryInstr14, _val$preparatoryInstr15, _val$preparatoryInstr16, _val$departmentalInst9, _val$departmentalInst10, _val$departmentalInst11, _val$departmentalInst12, _val$departmentalInst13, _val$departmentalInst14, _val$departmentalInst15, _val$departmentalInst16, _val$attribute5, _val$attribute5$, _val$attribute6, _val$attribute6$, _val$attribute$0$bedS2, _val$attribute7, _val$attribute7$, _val$attribute$0$cont2, _val$attribute8, _val$attribute8$, _val$createddate2, _val$changeStatus4, _val$changeStatus5, _val$changeStatus6, _val$statushistory2, _val$statusreason2, _val$accessionNum2;
|
|
26243
26239
|
|
|
26244
26240
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis2 = val.diagnosis) === null || _val$diagnosis2 === void 0 ? void 0 : _val$diagnosis2.map(function (v) {
|
|
26245
26241
|
return {
|
|
@@ -26318,20 +26314,21 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
|
|
|
26318
26314
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
26319
26315
|
requestorDetails: {
|
|
26320
26316
|
organization: {
|
|
26321
|
-
label: val === null || val === void 0 ? void 0 : (_val$
|
|
26322
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
26323
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
26317
|
+
label: val === null || val === void 0 ? void 0 : (_val$Requestor12 = val.Requestor) === null || _val$Requestor12 === void 0 ? void 0 : (_val$Requestor12$ = _val$Requestor12[0]) === null || _val$Requestor12$ === void 0 ? void 0 : (_val$Requestor12$$org = _val$Requestor12$.organization) === null || _val$Requestor12$$org === void 0 ? void 0 : _val$Requestor12$$org._id,
|
|
26318
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor13 = val.Requestor) === null || _val$Requestor13 === void 0 ? void 0 : (_val$Requestor13$ = _val$Requestor13[0]) === null || _val$Requestor13$ === void 0 ? void 0 : (_val$Requestor13$$org = _val$Requestor13$.organization) === null || _val$Requestor13$$org === void 0 ? void 0 : _val$Requestor13$$org.name,
|
|
26319
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor14 = val.Requestor) === null || _val$Requestor14 === void 0 ? void 0 : (_val$Requestor14$ = _val$Requestor14[0]) === null || _val$Requestor14$ === void 0 ? void 0 : (_val$Requestor14$$org = _val$Requestor14$.organization) === null || _val$Requestor14$$org === void 0 ? void 0 : _val$Requestor14$$org.id
|
|
26324
26320
|
},
|
|
26325
26321
|
practitionerRole: {
|
|
26326
|
-
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$
|
|
26327
|
-
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$
|
|
26328
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
26329
|
-
_id: val === null || val === void 0 ? void 0 : (_val$
|
|
26322
|
+
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$Requestor15 = val.Requestor) === null || _val$Requestor15 === void 0 ? void 0 : (_val$Requestor15$ = _val$Requestor15[0]) === null || _val$Requestor15$ === void 0 ? void 0 : (_val$Requestor15$$pra = _val$Requestor15$.practRole) === null || _val$Requestor15$$pra === void 0 ? void 0 : _val$Requestor15$$pra.display) !== null && _val$Requestor$0$prac3 !== void 0 ? _val$Requestor$0$prac3 : "",
|
|
26323
|
+
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$Requestor16 = val.Requestor) === null || _val$Requestor16 === void 0 ? void 0 : (_val$Requestor16$ = _val$Requestor16[0]) === null || _val$Requestor16$ === void 0 ? void 0 : (_val$Requestor16$$pra = _val$Requestor16$.practRole) === null || _val$Requestor16$$pra === void 0 ? void 0 : _val$Requestor16$$pra.display) !== null && _val$Requestor$0$prac4 !== void 0 ? _val$Requestor$0$prac4 : "",
|
|
26324
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor17 = val.Requestor) === null || _val$Requestor17 === void 0 ? void 0 : (_val$Requestor17$ = _val$Requestor17[0]) === null || _val$Requestor17$ === void 0 ? void 0 : (_val$Requestor17$$pra = _val$Requestor17$.practRole) === null || _val$Requestor17$$pra === void 0 ? void 0 : _val$Requestor17$$pra.id,
|
|
26325
|
+
_id: val === null || val === void 0 ? void 0 : (_val$Requestor18 = val.Requestor) === null || _val$Requestor18 === void 0 ? void 0 : (_val$Requestor18$ = _val$Requestor18[0]) === null || _val$Requestor18$ === void 0 ? void 0 : (_val$Requestor18$$pra = _val$Requestor18$.practRole) === null || _val$Requestor18$$pra === void 0 ? void 0 : _val$Requestor18$$pra._id
|
|
26330
26326
|
},
|
|
26331
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
26327
|
+
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor19 = val.Requestor) === null || _val$Requestor19 === void 0 ? void 0 : (_val$Requestor19$ = _val$Requestor19[0]) === null || _val$Requestor19$ === void 0 ? void 0 : (_val$Requestor19$$pra = _val$Requestor19$.practId) === null || _val$Requestor19$$pra === void 0 ? void 0 : (_val$Requestor19$$pra2 = _val$Requestor19$$pra[0]) === null || _val$Requestor19$$pra2 === void 0 ? void 0 : (_val$Requestor19$$pra3 = _val$Requestor19$$pra2.name) === null || _val$Requestor19$$pra3 === void 0 ? void 0 : _val$Requestor19$$pra3[0],
|
|
26332
26328
|
orderBy: {
|
|
26333
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
26334
|
-
|
|
26329
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.id,
|
|
26330
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.practitioner_id,
|
|
26331
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
|
|
26335
26332
|
}
|
|
26336
26333
|
},
|
|
26337
26334
|
indication: {
|
|
@@ -27725,12 +27722,13 @@ var LABORDER_ORGANIZATION = createAsyncThunk("LabOrderApiSlice/laborder_orgnniza
|
|
|
27725
27722
|
data3 = _context23.sent;
|
|
27726
27723
|
arr3 = [];
|
|
27727
27724
|
data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : _data3$result.map(function (val) {
|
|
27728
|
-
var _val$shortdesc, _val$shortdesc2, _val$_id6;
|
|
27725
|
+
var _val$shortdesc, _val$shortdesc2, _val$_id6, _val$locationID;
|
|
27729
27726
|
|
|
27730
27727
|
arr3.push({
|
|
27731
27728
|
label: (_val$shortdesc = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc !== void 0 ? _val$shortdesc : "",
|
|
27732
27729
|
value: (_val$shortdesc2 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc2 !== void 0 ? _val$shortdesc2 : "",
|
|
27733
|
-
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : ""
|
|
27730
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
27731
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
27734
27732
|
});
|
|
27735
27733
|
});
|
|
27736
27734
|
_context23.next = 26;
|
|
@@ -27802,7 +27800,7 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
|
|
|
27802
27800
|
data2 = _context24.sent;
|
|
27803
27801
|
arr2 = [];
|
|
27804
27802
|
data2 === null || data2 === void 0 ? void 0 : (_data2$result2 = data2.result) === null || _data2$result2 === void 0 ? void 0 : _data2$result2.map(function (val) {
|
|
27805
|
-
var _val$name2, _val$_id7;
|
|
27803
|
+
var _val$name2, _val$_id7, _val$practitioner_id;
|
|
27806
27804
|
|
|
27807
27805
|
// if (
|
|
27808
27806
|
// val.name[0]?.prefix[0]?.coding.display +
|
|
@@ -27811,7 +27809,8 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
|
|
|
27811
27809
|
// ) {
|
|
27812
27810
|
arr2.push({
|
|
27813
27811
|
label: makeName((val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : _val$name2[0]) || {}),
|
|
27814
|
-
value: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : ""
|
|
27812
|
+
value: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : "",
|
|
27813
|
+
practitioner_id: (_val$practitioner_id = val === null || val === void 0 ? void 0 : val.practitioner_id) !== null && _val$practitioner_id !== void 0 ? _val$practitioner_id : ""
|
|
27815
27814
|
}); // }
|
|
27816
27815
|
});
|
|
27817
27816
|
return _context24.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
@@ -28577,7 +28576,7 @@ var LabOrderApiSlice$1 = LabOrderApiSlice.reducer;
|
|
|
28577
28576
|
|
|
28578
28577
|
var queries$5 = {
|
|
28579
28578
|
drugType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugType\",\n \"return_fields\": \"DrugType\"\n }"),
|
|
28580
|
-
drugMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})\"\n }"),
|
|
28579
|
+
drugMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"limit\":{\n \"count\":100,\n \"offset\":0\n \n },\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})\"\n }"),
|
|
28581
28580
|
getMedications: function getMedications(id) {
|
|
28582
28581
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"filter\": \"PH_OrderLine.patient_Id=='").concat(id, "'\",\n \"entity\": \"PH_OrderLine\",\n \"return_fields\": \"MERGE(PH_OrderLine, { patient_Id:(FOR pname IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).name) RETURN MERGE(DOCUMENT(PH_OrderLine.patient_Id), { name:DOCUMENT(pname), telecom:(FOR ptel IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).telecom) RETURN DOCUMENT(ptel)), martialStatus:(FOR mstatus IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).martialStatus) RETURN DOCUMENT(mstatus)) } ) ) ,org_Id:MERGE(DOCUMENT(PH_OrderLine.org_Id), { telecom:(FOR otel IN TO_ARRAY(DOCUMENT(PH_OrderLine.org_Id).telecom) RETURN DOCUMENT(otel) ), address:(FOR oadd IN TO_ARRAY(DOCUMENT(PH_OrderLine.org_Id).address) RETURN DOCUMENT(oadd) ) }) ,encounter_Id:DOCUMENT(PH_OrderLine.encounter_Id) ,dosageDurationUOM:DOCUMENT(PH_OrderLine.dosageDurationUOM) ,dosageFreqCode:DOCUMENT(PH_OrderLine.dosageFreqCode) ,dosageUOM:DOCUMENT(PH_OrderLine.dosageUOM) ,drugCode:DOCUMENT(PH_OrderLine.drugCode) ,drugType:DOCUMENT(PH_OrderLine.drugType) , createdby:(FOR hn IN TO_ARRAY(DOCUMENT(PH_OrderLine.createdby).name) RETURN MERGE(DOCUMENT(PH_OrderLine.createdby),{name:DOCUMENT(hn)})) , updatedby:(FOR hn IN TO_ARRAY(DOCUMENT(PH_OrderLine.updatedby).name) RETURN MERGE(DOCUMENT(PH_OrderLine.updatedby),{name:DOCUMENT(hn)})) , statushistory:(FOR sth IN TO_ARRAY(PH_OrderLine.statushistory) RETURN MERGE(sth,{PersonID:(FOR hn IN TO_ARRAY(DOCUMENT(sth.PersonID).name) RETURN MERGE(DOCUMENT(sth.PersonID),{name:DOCUMENT(hn)}))})) } )\"\n }");
|
|
28583
28582
|
},
|
|
@@ -28648,6 +28647,25 @@ var queries$5 = {
|
|
|
28648
28647
|
// }
|
|
28649
28648
|
// ]
|
|
28650
28649
|
|
|
28650
|
+
var codeQuery = {
|
|
28651
|
+
AllergyCodes: function AllergyCodes(list) {
|
|
28652
|
+
return {
|
|
28653
|
+
db_name: dbName,
|
|
28654
|
+
entity: "CA_AllergyIntolerance",
|
|
28655
|
+
filter: "CA_AllergyIntolerance.encounter_id=='".concat(list, "' && CA_AllergyIntolerance.activestatus==true"),
|
|
28656
|
+
"return_fields": "{code:document(CA_AllergyIntolerance.code)}"
|
|
28657
|
+
};
|
|
28658
|
+
},
|
|
28659
|
+
DrugCodes: function DrugCodes(list) {
|
|
28660
|
+
return {
|
|
28661
|
+
db_name: dbName,
|
|
28662
|
+
entity: "CA_Diagnosis",
|
|
28663
|
+
filter: "CA_Diagnosis.encounter_id=='".concat(list, "' && CA_Diagnosis.activestatus==true"),
|
|
28664
|
+
return_fields: "{diagcode:document(CA_Diagnosis.diagcode)}"
|
|
28665
|
+
};
|
|
28666
|
+
}
|
|
28667
|
+
};
|
|
28668
|
+
|
|
28651
28669
|
var _extraReducers$g;
|
|
28652
28670
|
var DRUGTYPE_MASTER = createAsyncThunk("MedicationMastersSlice/drugType_masters", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
28653
28671
|
var payload,
|
|
@@ -28723,7 +28741,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28723
28741
|
data = _context2.sent;
|
|
28724
28742
|
arr = [];
|
|
28725
28743
|
data.result.map(function (val) {
|
|
28726
|
-
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4;
|
|
28744
|
+
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid;
|
|
28727
28745
|
|
|
28728
28746
|
var json = {
|
|
28729
28747
|
value: val === null || val === void 0 ? void 0 : val._id,
|
|
@@ -28735,7 +28753,8 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28735
28753
|
drugType: val === null || val === void 0 ? void 0 : (_val$DrugType = val.DrugType) === null || _val$DrugType === void 0 ? void 0 : _val$DrugType.drugtype,
|
|
28736
28754
|
drugTypeLong: val === null || val === void 0 ? void 0 : (_val$DrugType2 = val.DrugType) === null || _val$DrugType2 === void 0 ? void 0 : _val$DrugType2.longdesc,
|
|
28737
28755
|
drugTypeShort: val === null || val === void 0 ? void 0 : (_val$DrugType3 = val.DrugType) === null || _val$DrugType3 === void 0 ? void 0 : _val$DrugType3.shortdesc,
|
|
28738
|
-
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id
|
|
28756
|
+
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id,
|
|
28757
|
+
drugroutegenid: (_val$drugroutegenid = val === null || val === void 0 ? void 0 : val.drugroutegenid) !== null && _val$drugroutegenid !== void 0 ? _val$drugroutegenid : "" // formValue
|
|
28739
28758
|
|
|
28740
28759
|
};
|
|
28741
28760
|
arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
|
|
@@ -30591,18 +30610,13 @@ var MedicationMastersActions = {
|
|
|
30591
30610
|
var MedicationMastersSlice$1 = MedicationMastersSlice.reducer;
|
|
30592
30611
|
|
|
30593
30612
|
var _extraReducers$f;
|
|
30594
|
-
var
|
|
30613
|
+
var ALERT_CODES = createAsyncThunk("medicationsSlice/alert_codes", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
30595
30614
|
var payload,
|
|
30596
30615
|
_ref2,
|
|
30597
30616
|
rejectWithValue,
|
|
30598
|
-
_data$Result,
|
|
30599
|
-
_data$Result$,
|
|
30600
|
-
_data$Result$$propert,
|
|
30601
|
-
_data$Result$$propert2,
|
|
30602
30617
|
list,
|
|
30603
|
-
orgData,
|
|
30604
|
-
body,
|
|
30605
30618
|
data,
|
|
30619
|
+
code,
|
|
30606
30620
|
_args = arguments;
|
|
30607
30621
|
|
|
30608
30622
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -30612,44 +30626,143 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
|
|
|
30612
30626
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
30613
30627
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
30614
30628
|
_context.prev = 2;
|
|
30615
|
-
list = payload;
|
|
30629
|
+
list = payload.list;
|
|
30616
30630
|
_context.next = 6;
|
|
30631
|
+
return fetchData$3({
|
|
30632
|
+
body: JSON.stringify(codeQuery.AllergyCodes(list))
|
|
30633
|
+
}, __readDocumentUrl__);
|
|
30634
|
+
|
|
30635
|
+
case 6:
|
|
30636
|
+
data = _context.sent;
|
|
30637
|
+
code = data.result.map(function (val) {
|
|
30638
|
+
return {
|
|
30639
|
+
codes: val.code.code
|
|
30640
|
+
};
|
|
30641
|
+
});
|
|
30642
|
+
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
30643
|
+
data: code
|
|
30644
|
+
}));
|
|
30645
|
+
|
|
30646
|
+
case 11:
|
|
30647
|
+
_context.prev = 11;
|
|
30648
|
+
_context.t0 = _context["catch"](2);
|
|
30649
|
+
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30650
|
+
message: _context.t0.message
|
|
30651
|
+
})));
|
|
30652
|
+
|
|
30653
|
+
case 14:
|
|
30654
|
+
case "end":
|
|
30655
|
+
return _context.stop();
|
|
30656
|
+
}
|
|
30657
|
+
}
|
|
30658
|
+
}, _callee, null, [[2, 11]]);
|
|
30659
|
+
})));
|
|
30660
|
+
var DRUG_CODES = createAsyncThunk("medicationsSlice/drug_codes", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
30661
|
+
var payload,
|
|
30662
|
+
_ref4,
|
|
30663
|
+
rejectWithValue,
|
|
30664
|
+
list,
|
|
30665
|
+
data,
|
|
30666
|
+
code,
|
|
30667
|
+
_args2 = arguments;
|
|
30668
|
+
|
|
30669
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
30670
|
+
while (1) {
|
|
30671
|
+
switch (_context2.prev = _context2.next) {
|
|
30672
|
+
case 0:
|
|
30673
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
30674
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
30675
|
+
_context2.prev = 2;
|
|
30676
|
+
list = payload.list;
|
|
30677
|
+
_context2.next = 6;
|
|
30678
|
+
return fetchData$3({
|
|
30679
|
+
body: JSON.stringify(codeQuery.DrugCodes(list))
|
|
30680
|
+
}, __readDocumentUrl__);
|
|
30681
|
+
|
|
30682
|
+
case 6:
|
|
30683
|
+
data = _context2.sent;
|
|
30684
|
+
code = data.result.map(function (val) {
|
|
30685
|
+
return {
|
|
30686
|
+
codes: val.diagcode.icdcode
|
|
30687
|
+
};
|
|
30688
|
+
});
|
|
30689
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
30690
|
+
data: code
|
|
30691
|
+
}));
|
|
30692
|
+
|
|
30693
|
+
case 11:
|
|
30694
|
+
_context2.prev = 11;
|
|
30695
|
+
_context2.t0 = _context2["catch"](2);
|
|
30696
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30697
|
+
message: _context2.t0.message
|
|
30698
|
+
})));
|
|
30699
|
+
|
|
30700
|
+
case 14:
|
|
30701
|
+
case "end":
|
|
30702
|
+
return _context2.stop();
|
|
30703
|
+
}
|
|
30704
|
+
}
|
|
30705
|
+
}, _callee2, null, [[2, 11]]);
|
|
30706
|
+
})));
|
|
30707
|
+
var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
30708
|
+
var payload,
|
|
30709
|
+
_ref6,
|
|
30710
|
+
rejectWithValue,
|
|
30711
|
+
_data$Result,
|
|
30712
|
+
_data$Result$,
|
|
30713
|
+
_data$Result$$propert,
|
|
30714
|
+
_data$Result$$propert2,
|
|
30715
|
+
list,
|
|
30716
|
+
orgData,
|
|
30717
|
+
body,
|
|
30718
|
+
data,
|
|
30719
|
+
_args3 = arguments;
|
|
30720
|
+
|
|
30721
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
30722
|
+
while (1) {
|
|
30723
|
+
switch (_context3.prev = _context3.next) {
|
|
30724
|
+
case 0:
|
|
30725
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
30726
|
+
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
30727
|
+
_context3.prev = 2;
|
|
30728
|
+
list = payload;
|
|
30729
|
+
_context3.next = 6;
|
|
30617
30730
|
return fetchData$3({
|
|
30618
30731
|
body: queries$5.getOrganizationId(payload.orgId)
|
|
30619
30732
|
}, __readDocumentUrl__);
|
|
30620
30733
|
|
|
30621
30734
|
case 6:
|
|
30622
|
-
orgData =
|
|
30735
|
+
orgData = _context3.sent;
|
|
30623
30736
|
body = generateJSON$4(list, orgData.result[0]);
|
|
30624
|
-
|
|
30737
|
+
_context3.next = 10;
|
|
30625
30738
|
return fetchData$3({
|
|
30626
30739
|
body: JSON.stringify(body)
|
|
30627
30740
|
}, __uspsertUrl__);
|
|
30628
30741
|
|
|
30629
30742
|
case 10:
|
|
30630
|
-
data =
|
|
30631
|
-
return
|
|
30743
|
+
data = _context3.sent;
|
|
30744
|
+
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30632
30745
|
data: data === null || data === void 0 ? void 0 : (_data$Result = data.Result) === null || _data$Result === void 0 ? void 0 : (_data$Result$ = _data$Result[0]) === null || _data$Result$ === void 0 ? void 0 : (_data$Result$$propert = _data$Result$.properties) === null || _data$Result$$propert === void 0 ? void 0 : (_data$Result$$propert2 = _data$Result$$propert.doc) === null || _data$Result$$propert2 === void 0 ? void 0 : _data$Result$$propert2._id
|
|
30633
30746
|
}));
|
|
30634
30747
|
|
|
30635
30748
|
case 14:
|
|
30636
|
-
|
|
30637
|
-
|
|
30638
|
-
console.log(
|
|
30639
|
-
return
|
|
30640
|
-
message:
|
|
30749
|
+
_context3.prev = 14;
|
|
30750
|
+
_context3.t0 = _context3["catch"](2);
|
|
30751
|
+
console.log(_context3.t0);
|
|
30752
|
+
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30753
|
+
message: _context3.t0.message
|
|
30641
30754
|
})));
|
|
30642
30755
|
|
|
30643
30756
|
case 18:
|
|
30644
30757
|
case "end":
|
|
30645
|
-
return
|
|
30758
|
+
return _context3.stop();
|
|
30646
30759
|
}
|
|
30647
30760
|
}
|
|
30648
|
-
},
|
|
30761
|
+
}, _callee3, null, [[2, 14]]);
|
|
30649
30762
|
})));
|
|
30650
|
-
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30763
|
+
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
30651
30764
|
var payload,
|
|
30652
|
-
|
|
30765
|
+
_ref8,
|
|
30653
30766
|
rejectWithValue,
|
|
30654
30767
|
_list$status,
|
|
30655
30768
|
_data$Result2,
|
|
@@ -30659,15 +30772,15 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
30659
30772
|
list,
|
|
30660
30773
|
body,
|
|
30661
30774
|
data,
|
|
30662
|
-
|
|
30775
|
+
_args4 = arguments;
|
|
30663
30776
|
|
|
30664
|
-
return regeneratorRuntime.wrap(function
|
|
30777
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
30665
30778
|
while (1) {
|
|
30666
|
-
switch (
|
|
30779
|
+
switch (_context4.prev = _context4.next) {
|
|
30667
30780
|
case 0:
|
|
30668
|
-
payload =
|
|
30669
|
-
|
|
30670
|
-
|
|
30781
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
30782
|
+
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
30783
|
+
_context4.prev = 2;
|
|
30671
30784
|
list = payload; // const states = getState();
|
|
30672
30785
|
|
|
30673
30786
|
body = [{
|
|
@@ -30691,76 +30804,76 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
30691
30804
|
// ))
|
|
30692
30805
|
// }
|
|
30693
30806
|
|
|
30694
|
-
|
|
30807
|
+
_context4.next = 7;
|
|
30695
30808
|
return fetchData$3({
|
|
30696
30809
|
body: JSON.stringify(body)
|
|
30697
30810
|
}, __update__);
|
|
30698
30811
|
|
|
30699
30812
|
case 7:
|
|
30700
|
-
data =
|
|
30701
|
-
return
|
|
30813
|
+
data = _context4.sent;
|
|
30814
|
+
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30702
30815
|
data: data === null || data === void 0 ? void 0 : (_data$Result2 = data.Result) === null || _data$Result2 === void 0 ? void 0 : (_data$Result2$ = _data$Result2[0]) === null || _data$Result2$ === void 0 ? void 0 : (_data$Result2$$proper = _data$Result2$.properties) === null || _data$Result2$$proper === void 0 ? void 0 : (_data$Result2$$proper2 = _data$Result2$$proper.doc) === null || _data$Result2$$proper2 === void 0 ? void 0 : _data$Result2$$proper2._id
|
|
30703
30816
|
}));
|
|
30704
30817
|
|
|
30705
30818
|
case 11:
|
|
30706
|
-
|
|
30707
|
-
|
|
30708
|
-
console.log(
|
|
30709
|
-
return
|
|
30710
|
-
message:
|
|
30819
|
+
_context4.prev = 11;
|
|
30820
|
+
_context4.t0 = _context4["catch"](2);
|
|
30821
|
+
console.log(_context4.t0);
|
|
30822
|
+
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30823
|
+
message: _context4.t0.message
|
|
30711
30824
|
})));
|
|
30712
30825
|
|
|
30713
30826
|
case 15:
|
|
30714
30827
|
case "end":
|
|
30715
|
-
return
|
|
30828
|
+
return _context4.stop();
|
|
30716
30829
|
}
|
|
30717
30830
|
}
|
|
30718
|
-
},
|
|
30831
|
+
}, _callee4, null, [[2, 11]]);
|
|
30719
30832
|
})));
|
|
30720
|
-
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30833
|
+
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
30721
30834
|
var payload,
|
|
30722
|
-
|
|
30835
|
+
_ref10,
|
|
30723
30836
|
rejectWithValue,
|
|
30724
30837
|
id,
|
|
30725
30838
|
data,
|
|
30726
|
-
|
|
30839
|
+
_args5 = arguments;
|
|
30727
30840
|
|
|
30728
|
-
return regeneratorRuntime.wrap(function
|
|
30841
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
30729
30842
|
while (1) {
|
|
30730
|
-
switch (
|
|
30843
|
+
switch (_context5.prev = _context5.next) {
|
|
30731
30844
|
case 0:
|
|
30732
|
-
payload =
|
|
30733
|
-
|
|
30734
|
-
|
|
30845
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
30846
|
+
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
30847
|
+
_context5.prev = 2;
|
|
30735
30848
|
id = payload.id;
|
|
30736
|
-
|
|
30849
|
+
_context5.next = 6;
|
|
30737
30850
|
return fetchData$3({
|
|
30738
30851
|
body: queries$5.getMedications(id)
|
|
30739
30852
|
}, __readDocumentUrl__);
|
|
30740
30853
|
|
|
30741
30854
|
case 6:
|
|
30742
|
-
data =
|
|
30743
|
-
return
|
|
30855
|
+
data = _context5.sent;
|
|
30856
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30744
30857
|
data: data === null || data === void 0 ? void 0 : data.result
|
|
30745
30858
|
}));
|
|
30746
30859
|
|
|
30747
30860
|
case 10:
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
return
|
|
30751
|
-
message:
|
|
30861
|
+
_context5.prev = 10;
|
|
30862
|
+
_context5.t0 = _context5["catch"](2);
|
|
30863
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30864
|
+
message: _context5.t0.message
|
|
30752
30865
|
})));
|
|
30753
30866
|
|
|
30754
30867
|
case 13:
|
|
30755
30868
|
case "end":
|
|
30756
|
-
return
|
|
30869
|
+
return _context5.stop();
|
|
30757
30870
|
}
|
|
30758
30871
|
}
|
|
30759
|
-
},
|
|
30872
|
+
}, _callee5, null, [[2, 10]]);
|
|
30760
30873
|
})));
|
|
30761
|
-
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30874
|
+
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
30762
30875
|
var payload,
|
|
30763
|
-
|
|
30876
|
+
_ref12,
|
|
30764
30877
|
rejectWithValue,
|
|
30765
30878
|
getState,
|
|
30766
30879
|
personId,
|
|
@@ -30773,15 +30886,15 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
30773
30886
|
arr,
|
|
30774
30887
|
data,
|
|
30775
30888
|
PH_PresWorkflowStatusTrx,
|
|
30776
|
-
|
|
30889
|
+
_args6 = arguments;
|
|
30777
30890
|
|
|
30778
|
-
return regeneratorRuntime.wrap(function
|
|
30891
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
30779
30892
|
while (1) {
|
|
30780
|
-
switch (
|
|
30893
|
+
switch (_context6.prev = _context6.next) {
|
|
30781
30894
|
case 0:
|
|
30782
|
-
payload =
|
|
30783
|
-
|
|
30784
|
-
|
|
30895
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
30896
|
+
_ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue, getState = _ref12.getState;
|
|
30897
|
+
_context6.prev = 2;
|
|
30785
30898
|
personId = payload.personId;
|
|
30786
30899
|
states = getState();
|
|
30787
30900
|
flowStatus = states.MedicationMastersSlice.workflow_status_masters.data.filter(function (val) {
|
|
@@ -30818,39 +30931,39 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
30818
30931
|
}
|
|
30819
30932
|
};
|
|
30820
30933
|
});
|
|
30821
|
-
|
|
30934
|
+
_context6.next = 13;
|
|
30822
30935
|
return fetchData$3({
|
|
30823
30936
|
body: JSON.stringify(arr)
|
|
30824
30937
|
}, __update__);
|
|
30825
30938
|
|
|
30826
30939
|
case 13:
|
|
30827
|
-
data =
|
|
30828
|
-
|
|
30940
|
+
data = _context6.sent;
|
|
30941
|
+
_context6.next = 16;
|
|
30829
30942
|
return fetchData$3({
|
|
30830
30943
|
body: JSON.stringify(flowStatusList)
|
|
30831
30944
|
}, __uspsertUrl__);
|
|
30832
30945
|
|
|
30833
30946
|
case 16:
|
|
30834
|
-
PH_PresWorkflowStatusTrx =
|
|
30835
|
-
return
|
|
30947
|
+
PH_PresWorkflowStatusTrx = _context6.sent;
|
|
30948
|
+
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30836
30949
|
data: data,
|
|
30837
30950
|
PH_PresWorkflowStatusTrx: PH_PresWorkflowStatusTrx
|
|
30838
30951
|
}));
|
|
30839
30952
|
|
|
30840
30953
|
case 20:
|
|
30841
|
-
|
|
30842
|
-
|
|
30843
|
-
console.log(
|
|
30844
|
-
return
|
|
30845
|
-
message:
|
|
30954
|
+
_context6.prev = 20;
|
|
30955
|
+
_context6.t0 = _context6["catch"](2);
|
|
30956
|
+
console.log(_context6.t0);
|
|
30957
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30958
|
+
message: _context6.t0.message
|
|
30846
30959
|
})));
|
|
30847
30960
|
|
|
30848
30961
|
case 24:
|
|
30849
30962
|
case "end":
|
|
30850
|
-
return
|
|
30963
|
+
return _context6.stop();
|
|
30851
30964
|
}
|
|
30852
30965
|
}
|
|
30853
|
-
},
|
|
30966
|
+
}, _callee6, null, [[2, 20]]);
|
|
30854
30967
|
})));
|
|
30855
30968
|
var medicationsSlice = createSlice({
|
|
30856
30969
|
name: "medicationsSlice",
|
|
@@ -30858,55 +30971,79 @@ var medicationsSlice = createSlice({
|
|
|
30858
30971
|
save_medication: _objectSpread2({}, defaultState.Info),
|
|
30859
30972
|
update_medication: _objectSpread2({}, defaultState.Info),
|
|
30860
30973
|
update_workflow_status: _objectSpread2({}, defaultState.Info),
|
|
30861
|
-
medication_list: _objectSpread2({}, defaultState.List)
|
|
30974
|
+
medication_list: _objectSpread2({}, defaultState.List),
|
|
30975
|
+
alert_codes: _objectSpread2({}, defaultState.list),
|
|
30976
|
+
drug_codes: _objectSpread2({}, defaultState.list)
|
|
30862
30977
|
},
|
|
30863
|
-
extraReducers: (_extraReducers$f = {}, _defineProperty(_extraReducers$f,
|
|
30978
|
+
extraReducers: (_extraReducers$f = {}, _defineProperty(_extraReducers$f, ALERT_CODES.fulfilled, function (state, action) {
|
|
30864
30979
|
var _action$payload;
|
|
30865
30980
|
|
|
30866
|
-
state.
|
|
30981
|
+
state.alert_codes.loading = false, state.alert_codes.error = false, state.alert_codes = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
30982
|
+
}), _defineProperty(_extraReducers$f, ALERT_CODES.pending, function (state, action) {
|
|
30983
|
+
state.alert_codes.error = false, state.alert_codes.loading = true;
|
|
30984
|
+
}), _defineProperty(_extraReducers$f, ALERT_CODES.rejected, function (state, action) {
|
|
30985
|
+
var _action$payload2;
|
|
30986
|
+
|
|
30987
|
+
state.alert_codes.loading = false, state.alert_codes.error = true, state.alert_codes = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
30988
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.fulfilled, function (state, action) {
|
|
30989
|
+
var _action$payload3;
|
|
30990
|
+
|
|
30991
|
+
state.drug_codes.loading = false, state.drug_codes.error = false, state.drug_codes = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
30992
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.pending, function (state, action) {
|
|
30993
|
+
state.drug_codes.error = false, state.drug_codes.loading = true;
|
|
30994
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.rejected, function (state, action) {
|
|
30995
|
+
var _action$payload4;
|
|
30996
|
+
|
|
30997
|
+
state.drug_codes.loading = false, state.drug_codes.error = true, state.drug_codes = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
30998
|
+
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.fulfilled, function (state, action) {
|
|
30999
|
+
var _action$payload5;
|
|
31000
|
+
|
|
31001
|
+
state.save_medication.loading = false, state.save_medication.error = false, state.save_medication = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
30867
31002
|
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.pending, function (state, action) {
|
|
30868
31003
|
state.save_medication.error = false, state.save_medication.loading = true;
|
|
30869
31004
|
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.rejected, function (state, action) {
|
|
30870
|
-
var _action$
|
|
31005
|
+
var _action$payload6;
|
|
30871
31006
|
|
|
30872
|
-
state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$
|
|
31007
|
+
state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
30873
31008
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.fulfilled, function (state, action) {
|
|
30874
|
-
var _action$
|
|
31009
|
+
var _action$payload7;
|
|
30875
31010
|
|
|
30876
|
-
state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$
|
|
31011
|
+
state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
|
|
30877
31012
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.pending, function (state, action) {
|
|
30878
31013
|
state.update_medication.error = false, state.update_medication.loading = true;
|
|
30879
31014
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.rejected, function (state, action) {
|
|
30880
|
-
var _action$
|
|
31015
|
+
var _action$payload8;
|
|
30881
31016
|
|
|
30882
|
-
state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$
|
|
31017
|
+
state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
30883
31018
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.fulfilled, function (state, action) {
|
|
30884
|
-
var _action$
|
|
31019
|
+
var _action$payload9;
|
|
30885
31020
|
|
|
30886
|
-
state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$
|
|
31021
|
+
state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
30887
31022
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.pending, function (state, action) {
|
|
30888
31023
|
state.medication_list.error = false, state.medication_list.loading = true;
|
|
30889
31024
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.rejected, function (state, action) {
|
|
30890
|
-
var _action$
|
|
31025
|
+
var _action$payload10;
|
|
30891
31026
|
|
|
30892
|
-
state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$
|
|
31027
|
+
state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
30893
31028
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.fulfilled, function (state, action) {
|
|
30894
|
-
var _action$
|
|
31029
|
+
var _action$payload11;
|
|
30895
31030
|
|
|
30896
|
-
state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$
|
|
31031
|
+
state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
|
|
30897
31032
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.pending, function (state, action) {
|
|
30898
31033
|
state.update_workflow_status.error = false, state.update_workflow_status.loading = true;
|
|
30899
31034
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.rejected, function (state, action) {
|
|
30900
|
-
var _action$
|
|
31035
|
+
var _action$payload12;
|
|
30901
31036
|
|
|
30902
|
-
state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$
|
|
31037
|
+
state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
|
|
30903
31038
|
}), _extraReducers$f)
|
|
30904
31039
|
});
|
|
30905
31040
|
var medicationsActions = {
|
|
30906
31041
|
SAVE_MEDICATIONS: SAVE_MEDICATIONS,
|
|
30907
31042
|
GET_MEDICATIONS: GET_MEDICATIONS,
|
|
30908
31043
|
UPDATE_MEDICATIONS: UPDATE_MEDICATIONS,
|
|
30909
|
-
UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS
|
|
31044
|
+
UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS,
|
|
31045
|
+
ALERT_CODES: ALERT_CODES,
|
|
31046
|
+
DRUG_CODES: DRUG_CODES
|
|
30910
31047
|
};
|
|
30911
31048
|
var medicationsSlice$1 = medicationsSlice.reducer;
|
|
30912
31049
|
|
|
@@ -30941,7 +31078,7 @@ var queries$4 = {
|
|
|
30941
31078
|
db_name: "primarycare",
|
|
30942
31079
|
entity: "CA_OrderLine",
|
|
30943
31080
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='TREAT' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
30944
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
31081
|
+
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
30945
31082
|
};
|
|
30946
31083
|
},
|
|
30947
31084
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -31221,7 +31358,7 @@ var generateJSON$1 = function generateJSON(dataList) {
|
|
|
31221
31358
|
|
|
31222
31359
|
var generateResJson$2 = function generateResJson(dataList, arr) {
|
|
31223
31360
|
var list = dataList.map(function (val) {
|
|
31224
|
-
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$
|
|
31361
|
+
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$Requestor11, _val$Requestor11$, _val$Requestor11$$pra, _val$Requestor11$$pra2, _val$Requestor11$$pra3, _val$patientInstructi, _val$patientInstructi2, _val$patientInstructi3, _val$patientInstructi4, _val$patientInstructi5, _val$patientInstructi6, _val$patientInstructi7, _val$patientInstructi8, _val$preparatoryInstr, _val$preparatoryInstr2, _val$preparatoryInstr3, _val$preparatoryInstr4, _val$preparatoryInstr5, _val$preparatoryInstr6, _val$preparatoryInstr7, _val$preparatoryInstr8, _val$departmentalInst, _val$departmentalInst2, _val$departmentalInst3, _val$departmentalInst4, _val$departmentalInst5, _val$departmentalInst6, _val$departmentalInst7, _val$departmentalInst8, _val$attribute, _val$attribute$, _val$attribute2, _val$attribute2$, _val$attribute$0$bedS, _val$attribute3, _val$attribute3$, _val$attribute$0$cont, _val$attribute4, _val$attribute4$, _val$createddate, _val$changeStatus, _val$changeStatus2, _val$changeStatus3, _val$statushistory, _val$statusreason, _val$accessionNum;
|
|
31225
31362
|
|
|
31226
31363
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis = val.diagnosis) === null || _val$diagnosis === void 0 ? void 0 : _val$diagnosis.map(function (v) {
|
|
31227
31364
|
return {
|
|
@@ -31317,8 +31454,9 @@ var generateResJson$2 = function generateResJson(dataList, arr) {
|
|
|
31317
31454
|
},
|
|
31318
31455
|
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor8 = val.Requestor) === null || _val$Requestor8 === void 0 ? void 0 : (_val$Requestor8$ = _val$Requestor8[0]) === null || _val$Requestor8$ === void 0 ? void 0 : (_val$Requestor8$$prac = _val$Requestor8$.practId) === null || _val$Requestor8$$prac === void 0 ? void 0 : (_val$Requestor8$$prac2 = _val$Requestor8$$prac[0]) === null || _val$Requestor8$$prac2 === void 0 ? void 0 : (_val$Requestor8$$prac3 = _val$Requestor8$$prac2.name) === null || _val$Requestor8$$prac3 === void 0 ? void 0 : _val$Requestor8$$prac3[0],
|
|
31319
31456
|
orderBy: {
|
|
31320
|
-
|
|
31321
|
-
|
|
31457
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.practitioner_id,
|
|
31458
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.id,
|
|
31459
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
|
|
31322
31460
|
}
|
|
31323
31461
|
},
|
|
31324
31462
|
indication: {
|
|
@@ -31374,7 +31512,7 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
|
|
|
31374
31512
|
return el != null;
|
|
31375
31513
|
});
|
|
31376
31514
|
var list = dataList.map(function (val) {
|
|
31377
|
-
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$
|
|
31515
|
+
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$Requestor12, _val$Requestor12$, _val$Requestor12$$org, _val$Requestor13, _val$Requestor13$, _val$Requestor13$$org, _val$Requestor14, _val$Requestor14$, _val$Requestor14$$org, _val$Requestor$0$prac3, _val$Requestor15, _val$Requestor15$, _val$Requestor15$$pra, _val$Requestor$0$prac4, _val$Requestor16, _val$Requestor16$, _val$Requestor16$$pra, _val$Requestor17, _val$Requestor17$, _val$Requestor17$$pra, _val$Requestor18, _val$Requestor18$, _val$Requestor18$$pra, _val$Requestor19, _val$Requestor19$, _val$Requestor19$$pra, _val$Requestor19$$pra2, _val$Requestor19$$pra3, _val$Requestor20, _val$Requestor20$, _val$Requestor20$$pra, _val$Requestor20$$pra2, _val$Requestor21, _val$Requestor21$, _val$Requestor21$$pra, _val$Requestor21$$pra2, _val$Requestor22, _val$Requestor22$, _val$Requestor22$$pra, _val$Requestor22$$pra2, _val$Requestor22$$pra3, _val$patientInstructi9, _val$patientInstructi10, _val$patientInstructi11, _val$patientInstructi12, _val$patientInstructi13, _val$patientInstructi14, _val$patientInstructi15, _val$patientInstructi16, _val$preparatoryInstr9, _val$preparatoryInstr10, _val$preparatoryInstr11, _val$preparatoryInstr12, _val$preparatoryInstr13, _val$preparatoryInstr14, _val$preparatoryInstr15, _val$preparatoryInstr16, _val$departmentalInst9, _val$departmentalInst10, _val$departmentalInst11, _val$departmentalInst12, _val$departmentalInst13, _val$departmentalInst14, _val$departmentalInst15, _val$departmentalInst16, _val$attribute5, _val$attribute5$, _val$attribute6, _val$attribute6$, _val$attribute$0$bedS2, _val$attribute7, _val$attribute7$, _val$attribute$0$cont2, _val$attribute8, _val$attribute8$, _val$createddate2, _val$changeStatus4, _val$changeStatus5, _val$changeStatus6, _val$statushistory2, _val$statusreason2, _val$accessionNum2;
|
|
31378
31516
|
|
|
31379
31517
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis2 = val.diagnosis) === null || _val$diagnosis2 === void 0 ? void 0 : _val$diagnosis2.map(function (v) {
|
|
31380
31518
|
return {
|
|
@@ -31453,20 +31591,21 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
|
|
|
31453
31591
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
31454
31592
|
requestorDetails: {
|
|
31455
31593
|
organization: {
|
|
31456
|
-
label: val === null || val === void 0 ? void 0 : (_val$
|
|
31457
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
31458
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
31594
|
+
label: val === null || val === void 0 ? void 0 : (_val$Requestor12 = val.Requestor) === null || _val$Requestor12 === void 0 ? void 0 : (_val$Requestor12$ = _val$Requestor12[0]) === null || _val$Requestor12$ === void 0 ? void 0 : (_val$Requestor12$$org = _val$Requestor12$.organization) === null || _val$Requestor12$$org === void 0 ? void 0 : _val$Requestor12$$org._id,
|
|
31595
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor13 = val.Requestor) === null || _val$Requestor13 === void 0 ? void 0 : (_val$Requestor13$ = _val$Requestor13[0]) === null || _val$Requestor13$ === void 0 ? void 0 : (_val$Requestor13$$org = _val$Requestor13$.organization) === null || _val$Requestor13$$org === void 0 ? void 0 : _val$Requestor13$$org.name,
|
|
31596
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor14 = val.Requestor) === null || _val$Requestor14 === void 0 ? void 0 : (_val$Requestor14$ = _val$Requestor14[0]) === null || _val$Requestor14$ === void 0 ? void 0 : (_val$Requestor14$$org = _val$Requestor14$.organization) === null || _val$Requestor14$$org === void 0 ? void 0 : _val$Requestor14$$org.id
|
|
31459
31597
|
},
|
|
31460
31598
|
practitionerRole: {
|
|
31461
|
-
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$
|
|
31462
|
-
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$
|
|
31463
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
31464
|
-
_id: val === null || val === void 0 ? void 0 : (_val$
|
|
31599
|
+
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$Requestor15 = val.Requestor) === null || _val$Requestor15 === void 0 ? void 0 : (_val$Requestor15$ = _val$Requestor15[0]) === null || _val$Requestor15$ === void 0 ? void 0 : (_val$Requestor15$$pra = _val$Requestor15$.practRole) === null || _val$Requestor15$$pra === void 0 ? void 0 : _val$Requestor15$$pra.display) !== null && _val$Requestor$0$prac3 !== void 0 ? _val$Requestor$0$prac3 : "",
|
|
31600
|
+
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$Requestor16 = val.Requestor) === null || _val$Requestor16 === void 0 ? void 0 : (_val$Requestor16$ = _val$Requestor16[0]) === null || _val$Requestor16$ === void 0 ? void 0 : (_val$Requestor16$$pra = _val$Requestor16$.practRole) === null || _val$Requestor16$$pra === void 0 ? void 0 : _val$Requestor16$$pra.display) !== null && _val$Requestor$0$prac4 !== void 0 ? _val$Requestor$0$prac4 : "",
|
|
31601
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor17 = val.Requestor) === null || _val$Requestor17 === void 0 ? void 0 : (_val$Requestor17$ = _val$Requestor17[0]) === null || _val$Requestor17$ === void 0 ? void 0 : (_val$Requestor17$$pra = _val$Requestor17$.practRole) === null || _val$Requestor17$$pra === void 0 ? void 0 : _val$Requestor17$$pra.id,
|
|
31602
|
+
_id: val === null || val === void 0 ? void 0 : (_val$Requestor18 = val.Requestor) === null || _val$Requestor18 === void 0 ? void 0 : (_val$Requestor18$ = _val$Requestor18[0]) === null || _val$Requestor18$ === void 0 ? void 0 : (_val$Requestor18$$pra = _val$Requestor18$.practRole) === null || _val$Requestor18$$pra === void 0 ? void 0 : _val$Requestor18$$pra._id
|
|
31465
31603
|
},
|
|
31466
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
31604
|
+
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor19 = val.Requestor) === null || _val$Requestor19 === void 0 ? void 0 : (_val$Requestor19$ = _val$Requestor19[0]) === null || _val$Requestor19$ === void 0 ? void 0 : (_val$Requestor19$$pra = _val$Requestor19$.practId) === null || _val$Requestor19$$pra === void 0 ? void 0 : (_val$Requestor19$$pra2 = _val$Requestor19$$pra[0]) === null || _val$Requestor19$$pra2 === void 0 ? void 0 : (_val$Requestor19$$pra3 = _val$Requestor19$$pra2.name) === null || _val$Requestor19$$pra3 === void 0 ? void 0 : _val$Requestor19$$pra3[0],
|
|
31467
31605
|
orderBy: {
|
|
31468
|
-
|
|
31469
|
-
|
|
31606
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.practitioner_id,
|
|
31607
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.id,
|
|
31608
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
|
|
31470
31609
|
}
|
|
31471
31610
|
},
|
|
31472
31611
|
indication: {
|
|
@@ -32304,12 +32443,13 @@ var TREATMENT_ORGANIZATION = createAsyncThunk("TreatmentSlice/getorderorganizati
|
|
|
32304
32443
|
data3 = _context14.sent;
|
|
32305
32444
|
arr3 = [];
|
|
32306
32445
|
data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : _data3$result.map(function (val) {
|
|
32307
|
-
var _val$shortdesc4, _val$shortdesc5, _val$_id6;
|
|
32446
|
+
var _val$shortdesc4, _val$shortdesc5, _val$_id6, _val$locationID;
|
|
32308
32447
|
|
|
32309
32448
|
arr3.push({
|
|
32310
32449
|
label: (_val$shortdesc4 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc4 !== void 0 ? _val$shortdesc4 : "",
|
|
32311
32450
|
value: (_val$shortdesc5 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc5 !== void 0 ? _val$shortdesc5 : "",
|
|
32312
|
-
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : ""
|
|
32451
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
32452
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
32313
32453
|
});
|
|
32314
32454
|
});
|
|
32315
32455
|
_context14.next = 26;
|
|
@@ -32853,7 +32993,7 @@ var queries$3 = (_queries = {
|
|
|
32853
32993
|
db_name: "primarycare",
|
|
32854
32994
|
entity: "CA_OrderLine",
|
|
32855
32995
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='RAD' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
32856
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
32996
|
+
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
32857
32997
|
};
|
|
32858
32998
|
},
|
|
32859
32999
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -33135,7 +33275,7 @@ var generateJSON = function generateJSON(dataList) {
|
|
|
33135
33275
|
|
|
33136
33276
|
var generateResJson$1 = function generateResJson(dataList, arr) {
|
|
33137
33277
|
var list = dataList.map(function (val) {
|
|
33138
|
-
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$
|
|
33278
|
+
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$Requestor11, _val$Requestor11$, _val$Requestor11$$pra, _val$Requestor11$$pra2, _val$Requestor11$$pra3, _val$patientInstructi, _val$patientInstructi2, _val$patientInstructi3, _val$patientInstructi4, _val$patientInstructi5, _val$patientInstructi6, _val$patientInstructi7, _val$patientInstructi8, _val$preparatoryInstr, _val$preparatoryInstr2, _val$preparatoryInstr3, _val$preparatoryInstr4, _val$preparatoryInstr5, _val$preparatoryInstr6, _val$preparatoryInstr7, _val$preparatoryInstr8, _val$departmentalInst, _val$departmentalInst2, _val$departmentalInst3, _val$departmentalInst4, _val$departmentalInst5, _val$departmentalInst6, _val$departmentalInst7, _val$departmentalInst8, _val$attribute, _val$attribute$, _val$attribute2, _val$attribute2$, _val$attribute$0$bedS, _val$attribute3, _val$attribute3$, _val$attribute$0$cont, _val$attribute4, _val$attribute4$, _val$createddate, _val$changeStatus, _val$changeStatus2, _val$changeStatus3, _val$statushistory, _val$statusreason, _val$accessionNum;
|
|
33139
33279
|
|
|
33140
33280
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis = val.diagnosis) === null || _val$diagnosis === void 0 ? void 0 : _val$diagnosis.map(function (v) {
|
|
33141
33281
|
return {
|
|
@@ -33231,8 +33371,9 @@ var generateResJson$1 = function generateResJson(dataList, arr) {
|
|
|
33231
33371
|
},
|
|
33232
33372
|
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor8 = val.Requestor) === null || _val$Requestor8 === void 0 ? void 0 : (_val$Requestor8$ = _val$Requestor8[0]) === null || _val$Requestor8$ === void 0 ? void 0 : (_val$Requestor8$$prac = _val$Requestor8$.practId) === null || _val$Requestor8$$prac === void 0 ? void 0 : (_val$Requestor8$$prac2 = _val$Requestor8$$prac[0]) === null || _val$Requestor8$$prac2 === void 0 ? void 0 : (_val$Requestor8$$prac3 = _val$Requestor8$$prac2.name) === null || _val$Requestor8$$prac3 === void 0 ? void 0 : _val$Requestor8$$prac3[0],
|
|
33233
33373
|
orderBy: {
|
|
33234
|
-
|
|
33235
|
-
|
|
33374
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.practitioner_id,
|
|
33375
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.id,
|
|
33376
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
|
|
33236
33377
|
}
|
|
33237
33378
|
},
|
|
33238
33379
|
indication: {
|
|
@@ -33288,7 +33429,7 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
33288
33429
|
return el != null;
|
|
33289
33430
|
});
|
|
33290
33431
|
var list = dataList.map(function (val) {
|
|
33291
|
-
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$
|
|
33432
|
+
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$Requestor12, _val$Requestor12$, _val$Requestor12$$org, _val$Requestor13, _val$Requestor13$, _val$Requestor13$$org, _val$Requestor14, _val$Requestor14$, _val$Requestor14$$org, _val$Requestor$0$prac3, _val$Requestor15, _val$Requestor15$, _val$Requestor15$$pra, _val$Requestor$0$prac4, _val$Requestor16, _val$Requestor16$, _val$Requestor16$$pra, _val$Requestor17, _val$Requestor17$, _val$Requestor17$$pra, _val$Requestor18, _val$Requestor18$, _val$Requestor18$$pra, _val$Requestor19, _val$Requestor19$, _val$Requestor19$$pra, _val$Requestor19$$pra2, _val$Requestor19$$pra3, _val$Requestor20, _val$Requestor20$, _val$Requestor20$$pra, _val$Requestor20$$pra2, _val$Requestor21, _val$Requestor21$, _val$Requestor21$$pra, _val$Requestor21$$pra2, _val$Requestor22, _val$Requestor22$, _val$Requestor22$$pra, _val$Requestor22$$pra2, _val$Requestor22$$pra3, _val$patientInstructi9, _val$patientInstructi10, _val$patientInstructi11, _val$patientInstructi12, _val$patientInstructi13, _val$patientInstructi14, _val$patientInstructi15, _val$patientInstructi16, _val$preparatoryInstr9, _val$preparatoryInstr10, _val$preparatoryInstr11, _val$preparatoryInstr12, _val$preparatoryInstr13, _val$preparatoryInstr14, _val$preparatoryInstr15, _val$preparatoryInstr16, _val$departmentalInst9, _val$departmentalInst10, _val$departmentalInst11, _val$departmentalInst12, _val$departmentalInst13, _val$departmentalInst14, _val$departmentalInst15, _val$departmentalInst16, _val$attribute5, _val$attribute5$, _val$attribute6, _val$attribute6$, _val$attribute$0$bedS2, _val$attribute7, _val$attribute7$, _val$attribute$0$cont2, _val$attribute8, _val$attribute8$, _val$createddate2, _val$changeStatus4, _val$changeStatus5, _val$changeStatus6, _val$statushistory2, _val$statusreason2, _val$accessionNum2;
|
|
33292
33433
|
|
|
33293
33434
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis2 = val.diagnosis) === null || _val$diagnosis2 === void 0 ? void 0 : _val$diagnosis2.map(function (v) {
|
|
33294
33435
|
return {
|
|
@@ -33371,20 +33512,21 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
33371
33512
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
33372
33513
|
requestorDetails: {
|
|
33373
33514
|
organization: {
|
|
33374
|
-
label: val === null || val === void 0 ? void 0 : (_val$
|
|
33375
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
33376
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
33515
|
+
label: val === null || val === void 0 ? void 0 : (_val$Requestor12 = val.Requestor) === null || _val$Requestor12 === void 0 ? void 0 : (_val$Requestor12$ = _val$Requestor12[0]) === null || _val$Requestor12$ === void 0 ? void 0 : (_val$Requestor12$$org = _val$Requestor12$.organization) === null || _val$Requestor12$$org === void 0 ? void 0 : _val$Requestor12$$org._id,
|
|
33516
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor13 = val.Requestor) === null || _val$Requestor13 === void 0 ? void 0 : (_val$Requestor13$ = _val$Requestor13[0]) === null || _val$Requestor13$ === void 0 ? void 0 : (_val$Requestor13$$org = _val$Requestor13$.organization) === null || _val$Requestor13$$org === void 0 ? void 0 : _val$Requestor13$$org.name,
|
|
33517
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor14 = val.Requestor) === null || _val$Requestor14 === void 0 ? void 0 : (_val$Requestor14$ = _val$Requestor14[0]) === null || _val$Requestor14$ === void 0 ? void 0 : (_val$Requestor14$$org = _val$Requestor14$.organization) === null || _val$Requestor14$$org === void 0 ? void 0 : _val$Requestor14$$org.id
|
|
33377
33518
|
},
|
|
33378
33519
|
practitionerRole: {
|
|
33379
|
-
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$
|
|
33380
|
-
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$
|
|
33381
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
33382
|
-
_id: val === null || val === void 0 ? void 0 : (_val$
|
|
33520
|
+
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$Requestor15 = val.Requestor) === null || _val$Requestor15 === void 0 ? void 0 : (_val$Requestor15$ = _val$Requestor15[0]) === null || _val$Requestor15$ === void 0 ? void 0 : (_val$Requestor15$$pra = _val$Requestor15$.practRole) === null || _val$Requestor15$$pra === void 0 ? void 0 : _val$Requestor15$$pra.display) !== null && _val$Requestor$0$prac3 !== void 0 ? _val$Requestor$0$prac3 : "",
|
|
33521
|
+
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$Requestor16 = val.Requestor) === null || _val$Requestor16 === void 0 ? void 0 : (_val$Requestor16$ = _val$Requestor16[0]) === null || _val$Requestor16$ === void 0 ? void 0 : (_val$Requestor16$$pra = _val$Requestor16$.practRole) === null || _val$Requestor16$$pra === void 0 ? void 0 : _val$Requestor16$$pra.display) !== null && _val$Requestor$0$prac4 !== void 0 ? _val$Requestor$0$prac4 : "",
|
|
33522
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor17 = val.Requestor) === null || _val$Requestor17 === void 0 ? void 0 : (_val$Requestor17$ = _val$Requestor17[0]) === null || _val$Requestor17$ === void 0 ? void 0 : (_val$Requestor17$$pra = _val$Requestor17$.practRole) === null || _val$Requestor17$$pra === void 0 ? void 0 : _val$Requestor17$$pra.id,
|
|
33523
|
+
_id: val === null || val === void 0 ? void 0 : (_val$Requestor18 = val.Requestor) === null || _val$Requestor18 === void 0 ? void 0 : (_val$Requestor18$ = _val$Requestor18[0]) === null || _val$Requestor18$ === void 0 ? void 0 : (_val$Requestor18$$pra = _val$Requestor18$.practRole) === null || _val$Requestor18$$pra === void 0 ? void 0 : _val$Requestor18$$pra._id
|
|
33383
33524
|
},
|
|
33384
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
33525
|
+
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor19 = val.Requestor) === null || _val$Requestor19 === void 0 ? void 0 : (_val$Requestor19$ = _val$Requestor19[0]) === null || _val$Requestor19$ === void 0 ? void 0 : (_val$Requestor19$$pra = _val$Requestor19$.practId) === null || _val$Requestor19$$pra === void 0 ? void 0 : (_val$Requestor19$$pra2 = _val$Requestor19$$pra[0]) === null || _val$Requestor19$$pra2 === void 0 ? void 0 : (_val$Requestor19$$pra3 = _val$Requestor19$$pra2.name) === null || _val$Requestor19$$pra3 === void 0 ? void 0 : _val$Requestor19$$pra3[0],
|
|
33385
33526
|
orderBy: {
|
|
33386
|
-
|
|
33387
|
-
|
|
33527
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.practitioner_id,
|
|
33528
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.id,
|
|
33529
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
|
|
33388
33530
|
}
|
|
33389
33531
|
},
|
|
33390
33532
|
indication: {
|
|
@@ -34284,12 +34426,13 @@ var RAD_ORGANIZATION = createAsyncThunk("RadiologySlice/getorderorganization", /
|
|
|
34284
34426
|
data3 = _context15.sent;
|
|
34285
34427
|
arr3 = [];
|
|
34286
34428
|
data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : _data3$result.map(function (val) {
|
|
34287
|
-
var _val$shortdesc5, _val$shortdesc6, _val$_id6;
|
|
34429
|
+
var _val$shortdesc5, _val$shortdesc6, _val$_id6, _val$locationID;
|
|
34288
34430
|
|
|
34289
34431
|
arr3.push({
|
|
34290
34432
|
label: (_val$shortdesc5 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc5 !== void 0 ? _val$shortdesc5 : "",
|
|
34291
34433
|
value: (_val$shortdesc6 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc6 !== void 0 ? _val$shortdesc6 : "",
|
|
34292
|
-
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : ""
|
|
34434
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
34435
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
34293
34436
|
});
|
|
34294
34437
|
});
|
|
34295
34438
|
_context15.next = 26;
|
|
@@ -36681,43 +36824,45 @@ var queries$1 = {
|
|
|
36681
36824
|
},
|
|
36682
36825
|
getChartTime: function getChartTime(_ref) {
|
|
36683
36826
|
var id = _ref.id,
|
|
36684
|
-
|
|
36685
|
-
end = _ref.end,
|
|
36827
|
+
date = _ref.date,
|
|
36686
36828
|
type = _ref.type;
|
|
36687
36829
|
|
|
36688
36830
|
if (type === "Specialty") {
|
|
36689
36831
|
return {
|
|
36690
36832
|
db_name: dbName,
|
|
36691
|
-
|
|
36833
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36692
36834
|
filter: {
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36835
|
+
speciality: id,
|
|
36836
|
+
orgid: "",
|
|
36837
|
+
practid: "",
|
|
36838
|
+
date: date
|
|
36839
|
+
}
|
|
36697
36840
|
};
|
|
36698
36841
|
}
|
|
36699
36842
|
|
|
36700
36843
|
if (type === "Clinic") {
|
|
36701
36844
|
return {
|
|
36702
36845
|
db_name: dbName,
|
|
36703
|
-
|
|
36846
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36704
36847
|
filter: {
|
|
36705
|
-
|
|
36706
|
-
|
|
36707
|
-
|
|
36708
|
-
|
|
36848
|
+
speciality: "",
|
|
36849
|
+
orgid: id,
|
|
36850
|
+
practid: "",
|
|
36851
|
+
date: date
|
|
36852
|
+
}
|
|
36709
36853
|
};
|
|
36710
36854
|
}
|
|
36711
36855
|
|
|
36712
36856
|
if (type === "Practitioner") {
|
|
36713
36857
|
return {
|
|
36714
36858
|
db_name: dbName,
|
|
36715
|
-
|
|
36859
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36716
36860
|
filter: {
|
|
36717
|
-
|
|
36718
|
-
|
|
36719
|
-
|
|
36720
|
-
|
|
36861
|
+
speciality: "",
|
|
36862
|
+
orgid: "",
|
|
36863
|
+
practid: id,
|
|
36864
|
+
date: date
|
|
36865
|
+
}
|
|
36721
36866
|
};
|
|
36722
36867
|
}
|
|
36723
36868
|
}
|
|
@@ -36742,7 +36887,7 @@ var config$1 = [{
|
|
|
36742
36887
|
return {
|
|
36743
36888
|
_id: _id,
|
|
36744
36889
|
id: id,
|
|
36745
|
-
value:
|
|
36890
|
+
value: _id,
|
|
36746
36891
|
label: makeName((name === null || name === void 0 ? void 0 : name[0]) || {}),
|
|
36747
36892
|
_key: _key
|
|
36748
36893
|
};
|
|
@@ -36814,18 +36959,20 @@ var config$1 = [{
|
|
|
36814
36959
|
sliceName: "updateWaitingTimeChart",
|
|
36815
36960
|
queryName: "getChartTime",
|
|
36816
36961
|
type: "List",
|
|
36817
|
-
url:
|
|
36818
|
-
makeReturnData: function makeReturnData(data) {
|
|
36962
|
+
url: __baseUrl__,
|
|
36963
|
+
makeReturnData: function makeReturnData(data, payload) {
|
|
36964
|
+
var _payload$date;
|
|
36965
|
+
|
|
36819
36966
|
var arrivalCheckin = [];
|
|
36820
36967
|
var checkinTriage = [];
|
|
36821
36968
|
var triageConsultation = [];
|
|
36822
36969
|
var overall = [];
|
|
36823
36970
|
|
|
36824
|
-
if (Array.isArray(data
|
|
36825
|
-
data.
|
|
36826
|
-
checkinTriage.push(
|
|
36827
|
-
triageConsultation.push(
|
|
36828
|
-
overall.push(
|
|
36971
|
+
if (Array.isArray(data)) {
|
|
36972
|
+
data.forEach(function (d) {
|
|
36973
|
+
checkinTriage.push(d.diffbetweenchekintotriage);
|
|
36974
|
+
triageConsultation.push(d.diffbetweentriagedtofinished);
|
|
36975
|
+
overall.push(d.Overallwaitingtime);
|
|
36829
36976
|
});
|
|
36830
36977
|
}
|
|
36831
36978
|
|
|
@@ -36859,7 +37006,9 @@ var config$1 = [{
|
|
|
36859
37006
|
period: "Mins"
|
|
36860
37007
|
}];
|
|
36861
37008
|
return {
|
|
36862
|
-
labels:
|
|
37009
|
+
labels: (_payload$date = payload.date) === null || _payload$date === void 0 ? void 0 : _payload$date.map(function (v) {
|
|
37010
|
+
return moment.unix(v.start).format("hh A");
|
|
37011
|
+
}),
|
|
36863
37012
|
datasets: datasets
|
|
36864
37013
|
};
|
|
36865
37014
|
}
|
|
@@ -36921,7 +37070,7 @@ config$1.forEach(function (c) {
|
|
|
36921
37070
|
|
|
36922
37071
|
case 8:
|
|
36923
37072
|
data = _context.sent;
|
|
36924
|
-
returnData = c.makeReturnData ? c.makeReturnData(data) : data;
|
|
37073
|
+
returnData = c.makeReturnData ? c.makeReturnData(data, payload) : data;
|
|
36925
37074
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState[c.type]), {}, {
|
|
36926
37075
|
data: returnData
|
|
36927
37076
|
}));
|
|
@@ -38607,50 +38756,179 @@ var appointmentStatsApiActions = {
|
|
|
38607
38756
|
var dashboardComponentApiSlice = appointmentStatsApiSlice.reducer;
|
|
38608
38757
|
|
|
38609
38758
|
var alertInteractionsQuery = {
|
|
38610
|
-
alertInteractions: function alertInteractions() {
|
|
38759
|
+
alertInteractions: function alertInteractions(alertList) {
|
|
38760
|
+
var _alertList$creatinine, _alertList$creatinine2, _alertList$drugCodes, _alertList$diseaseCod, _alertList$allergyCod;
|
|
38761
|
+
|
|
38611
38762
|
return {
|
|
38612
|
-
"Patient": {
|
|
38613
|
-
|
|
38614
|
-
|
|
38615
|
-
|
|
38616
|
-
|
|
38617
|
-
|
|
38618
|
-
|
|
38619
|
-
|
|
38763
|
+
// "Patient": {
|
|
38764
|
+
// "Age": 25,
|
|
38765
|
+
// "PatientName": "Fraklin Stephen",
|
|
38766
|
+
// "Weight": 5450,
|
|
38767
|
+
// "Height": 50,
|
|
38768
|
+
// "CreatinineClearance": {
|
|
38769
|
+
// "Value": 67,
|
|
38770
|
+
// "UOM": "MG/DAY"
|
|
38771
|
+
// },
|
|
38772
|
+
// "GestationalBirthAge": 22
|
|
38773
|
+
// },
|
|
38774
|
+
// "DrugCodes": [
|
|
38775
|
+
// 1049997,
|
|
38776
|
+
// 1052518,
|
|
38777
|
+
// 1052594,
|
|
38778
|
+
// 1052598,
|
|
38779
|
+
// 1050231,
|
|
38780
|
+
// 1048580,
|
|
38781
|
+
// 1066660,
|
|
38782
|
+
// 1049125,
|
|
38783
|
+
// 1050215,
|
|
38784
|
+
// 1048649,
|
|
38785
|
+
// 1054917,
|
|
38786
|
+
// 1051477
|
|
38787
|
+
// ],
|
|
38788
|
+
// "DiseaseCodes": [
|
|
38789
|
+
// "346",
|
|
38790
|
+
// "G43.909",
|
|
38791
|
+
// "D64.3",
|
|
38792
|
+
// "1052614"
|
|
38793
|
+
// ],
|
|
38794
|
+
// "AllergyCodes": [
|
|
38795
|
+
// 83,
|
|
38796
|
+
// 281,
|
|
38797
|
+
// 306,
|
|
38798
|
+
// 476,
|
|
38799
|
+
// 543,
|
|
38800
|
+
// 568,
|
|
38801
|
+
// 571,
|
|
38802
|
+
// 572,
|
|
38803
|
+
// 590,
|
|
38804
|
+
// 592,
|
|
38805
|
+
// 593,
|
|
38806
|
+
// 2715,
|
|
38807
|
+
// 2755,
|
|
38808
|
+
// 900028,
|
|
38809
|
+
// 1088
|
|
38810
|
+
// ],
|
|
38811
|
+
// "Doses": [
|
|
38812
|
+
// {
|
|
38813
|
+
// "DrugName": "Amoxlin 450 mg",
|
|
38814
|
+
// "GCNSEQNO": 8997,
|
|
38815
|
+
// "ICDCode": "A181",
|
|
38816
|
+
// "DoseTypeIndicator": "02",
|
|
38817
|
+
// "Route": "064",
|
|
38818
|
+
// "Dose": {
|
|
38819
|
+
// "Value": 0.125,
|
|
38820
|
+
// "UOM": "G/DAY"
|
|
38821
|
+
// },
|
|
38822
|
+
// "Frequency": {
|
|
38823
|
+
// "Code": "QD"
|
|
38824
|
+
// },
|
|
38825
|
+
// "Duration": {
|
|
38826
|
+
// "Value": 1
|
|
38827
|
+
// }
|
|
38828
|
+
// },
|
|
38829
|
+
// {
|
|
38830
|
+
// "DrugName": "sghd",
|
|
38831
|
+
// "GCNSEQNO": 8997,
|
|
38832
|
+
// "ICDCode": "sdf",
|
|
38833
|
+
// "DoseTypeIndicator": "02",
|
|
38834
|
+
// "Route": "sd",
|
|
38835
|
+
// "Dose": {
|
|
38836
|
+
// "Value": 0.125,
|
|
38837
|
+
// "UOM": "G/DAY"
|
|
38838
|
+
// },
|
|
38839
|
+
// "Frequency": {
|
|
38840
|
+
// "Code": "QD"
|
|
38841
|
+
// },
|
|
38842
|
+
// "Duration": {
|
|
38843
|
+
// "Value": 1
|
|
38844
|
+
// }
|
|
38845
|
+
// }
|
|
38846
|
+
// ]
|
|
38847
|
+
Patient: {
|
|
38848
|
+
Age: alertList === null || alertList === void 0 ? void 0 : alertList.age,
|
|
38849
|
+
PatientName: alertList === null || alertList === void 0 ? void 0 : alertList.patientName,
|
|
38850
|
+
Weight: alertList === null || alertList === void 0 ? void 0 : alertList.weight,
|
|
38851
|
+
Height: alertList === null || alertList === void 0 ? void 0 : alertList.height,
|
|
38852
|
+
CreatinineClearance: {
|
|
38853
|
+
Value: alertList === null || alertList === void 0 ? void 0 : (_alertList$creatinine = alertList.creatinineClearance) === null || _alertList$creatinine === void 0 ? void 0 : _alertList$creatinine.Value,
|
|
38854
|
+
UOM: alertList === null || alertList === void 0 ? void 0 : (_alertList$creatinine2 = alertList.creatinineClearance) === null || _alertList$creatinine2 === void 0 ? void 0 : _alertList$creatinine2.UOM
|
|
38620
38855
|
},
|
|
38621
|
-
|
|
38856
|
+
GestationalBirthAge: alertList === null || alertList === void 0 ? void 0 : alertList.age
|
|
38622
38857
|
},
|
|
38623
|
-
|
|
38624
|
-
|
|
38625
|
-
|
|
38626
|
-
|
|
38627
|
-
|
|
38628
|
-
|
|
38629
|
-
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38634
|
-
|
|
38858
|
+
DrugCodes: (_alertList$drugCodes = alertList === null || alertList === void 0 ? void 0 : alertList.drugCodes) !== null && _alertList$drugCodes !== void 0 ? _alertList$drugCodes : [],
|
|
38859
|
+
DiseaseCodes: (_alertList$diseaseCod = alertList === null || alertList === void 0 ? void 0 : alertList.diseaseCodes) !== null && _alertList$diseaseCod !== void 0 ? _alertList$diseaseCod : [],
|
|
38860
|
+
AllergyCodes: (_alertList$allergyCod = alertList === null || alertList === void 0 ? void 0 : alertList.allergyCodes) !== null && _alertList$allergyCod !== void 0 ? _alertList$allergyCod : [],
|
|
38861
|
+
Doses: [{
|
|
38862
|
+
DrugName: "Amoxlin 450 mg",
|
|
38863
|
+
GCNSEQNO: 8997,
|
|
38864
|
+
ICDCode: "A181",
|
|
38865
|
+
DoseTypeIndicator: "02",
|
|
38866
|
+
Route: "064",
|
|
38867
|
+
Dose: {
|
|
38868
|
+
Value: 0.125,
|
|
38869
|
+
UOM: "G/DAY"
|
|
38635
38870
|
},
|
|
38636
|
-
|
|
38637
|
-
|
|
38871
|
+
Frequency: {
|
|
38872
|
+
Code: "QD"
|
|
38638
38873
|
},
|
|
38639
|
-
|
|
38640
|
-
|
|
38874
|
+
Duration: {
|
|
38875
|
+
Value: 1
|
|
38641
38876
|
}
|
|
38642
38877
|
}]
|
|
38643
38878
|
};
|
|
38644
38879
|
}
|
|
38645
38880
|
};
|
|
38881
|
+
var alertIntractionUpsert = {
|
|
38882
|
+
UpsertAlertInterations: function UpsertAlertInterations(data) {
|
|
38883
|
+
var _data$presType, _data$alerts, _data$alerts$, _data$addForm, _data$addForm$reason, _data$addForm2, _data$addForm3, _data$addForm3$reason;
|
|
38884
|
+
|
|
38885
|
+
return [{
|
|
38886
|
+
db_name: dbName,
|
|
38887
|
+
entity: "PH_OrderLineAlertLogs",
|
|
38888
|
+
is_metadata: true,
|
|
38889
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
38890
|
+
doc: {
|
|
38891
|
+
id: 0,
|
|
38892
|
+
orgEntityType: data === null || data === void 0 ? void 0 : data.orgEntityType,
|
|
38893
|
+
org_Id: data === null || data === void 0 ? void 0 : data.orgId,
|
|
38894
|
+
patient_Id: data === null || data === void 0 ? void 0 : data.patientid,
|
|
38895
|
+
encountertype: data === null || data === void 0 ? void 0 : data.encountertype,
|
|
38896
|
+
encounter_Id: data === null || data === void 0 ? void 0 : data.encounterid,
|
|
38897
|
+
presType: data === null || data === void 0 ? void 0 : (_data$presType = data.presType) === null || _data$presType === void 0 ? void 0 : _data$presType.Value,
|
|
38898
|
+
rxId: "",
|
|
38899
|
+
rxDate: data === null || data === void 0 ? void 0 : data.rxDate,
|
|
38900
|
+
interactionMessage: [{
|
|
38901
|
+
seqNo: 1,
|
|
38902
|
+
reactionCode: data === null || data === void 0 ? void 0 : data.alertReasonCode,
|
|
38903
|
+
alertMessage: data === null || data === void 0 ? void 0 : (_data$alerts = data.alerts) === null || _data$alerts === void 0 ? void 0 : (_data$alerts$ = _data$alerts[0]) === null || _data$alerts$ === void 0 ? void 0 : _data$alerts$.Message,
|
|
38904
|
+
overrideReasonCode: data === null || data === void 0 ? void 0 : (_data$addForm = data.addForm) === null || _data$addForm === void 0 ? void 0 : (_data$addForm$reason = _data$addForm.reason) === null || _data$addForm$reason === void 0 ? void 0 : _data$addForm$reason.label,
|
|
38905
|
+
overrideNotes: data === null || data === void 0 ? void 0 : (_data$addForm2 = data.addForm) === null || _data$addForm2 === void 0 ? void 0 : _data$addForm2.Others,
|
|
38906
|
+
overrideById: data === null || data === void 0 ? void 0 : (_data$addForm3 = data.addForm) === null || _data$addForm3 === void 0 ? void 0 : (_data$addForm3$reason = _data$addForm3.reason) === null || _data$addForm3$reason === void 0 ? void 0 : _data$addForm3$reason.label
|
|
38907
|
+
}]
|
|
38908
|
+
}
|
|
38909
|
+
}];
|
|
38910
|
+
}
|
|
38911
|
+
};
|
|
38912
|
+
var reasonTypeCode = {
|
|
38913
|
+
reasonTypeCodeRead: function reasonTypeCodeRead(display) {
|
|
38914
|
+
return {
|
|
38915
|
+
db_name: dbName,
|
|
38916
|
+
entity: "CodingMaster",
|
|
38917
|
+
filter: "CodingMaster.Type=='REACTIONTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true and lower(CodingMaster.display)==lower('".concat(display, "')"),
|
|
38918
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')"
|
|
38919
|
+
};
|
|
38920
|
+
}
|
|
38921
|
+
};
|
|
38646
38922
|
|
|
38647
38923
|
var _extraReducers$5;
|
|
38648
38924
|
var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntractions", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
38649
38925
|
var payload,
|
|
38650
38926
|
_ref2,
|
|
38651
38927
|
rejectWithValue,
|
|
38928
|
+
alertList,
|
|
38652
38929
|
queriesjson,
|
|
38653
38930
|
res,
|
|
38931
|
+
alertInteratcion,
|
|
38654
38932
|
_args = arguments;
|
|
38655
38933
|
|
|
38656
38934
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -38660,10 +38938,8 @@ var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntraction
|
|
|
38660
38938
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
38661
38939
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
38662
38940
|
_context.prev = 2;
|
|
38663
|
-
|
|
38664
|
-
|
|
38665
|
-
|
|
38666
|
-
queriesjson = alertInteractionsQuery.alertInteractions();
|
|
38941
|
+
alertList = payload.alertList;
|
|
38942
|
+
queriesjson = alertInteractionsQuery.alertInteractions(alertList);
|
|
38667
38943
|
_context.next = 7;
|
|
38668
38944
|
return fetchData$3({
|
|
38669
38945
|
body: JSON.stringify(queriesjson)
|
|
@@ -38671,28 +38947,136 @@ var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntraction
|
|
|
38671
38947
|
|
|
38672
38948
|
case 7:
|
|
38673
38949
|
res = _context.sent;
|
|
38950
|
+
alertInteratcion = res.result.find(function (val) {
|
|
38951
|
+
var keys = Object.keys(val);
|
|
38952
|
+
|
|
38953
|
+
if (keys.includes("Drug-AllergyIngredient-Interaction")) {
|
|
38954
|
+
return true;
|
|
38955
|
+
}
|
|
38956
|
+
|
|
38957
|
+
return false;
|
|
38958
|
+
});
|
|
38674
38959
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
38675
|
-
data:
|
|
38960
|
+
data: alertInteratcion
|
|
38676
38961
|
}));
|
|
38677
38962
|
|
|
38678
|
-
case
|
|
38679
|
-
_context.prev =
|
|
38963
|
+
case 12:
|
|
38964
|
+
_context.prev = 12;
|
|
38680
38965
|
_context.t0 = _context["catch"](2);
|
|
38681
38966
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
38682
38967
|
message: _context.t0.message
|
|
38683
38968
|
})));
|
|
38684
38969
|
|
|
38685
|
-
case
|
|
38970
|
+
case 15:
|
|
38686
38971
|
case "end":
|
|
38687
38972
|
return _context.stop();
|
|
38688
38973
|
}
|
|
38689
38974
|
}
|
|
38690
|
-
}, _callee, null, [[2,
|
|
38975
|
+
}, _callee, null, [[2, 12]]);
|
|
38976
|
+
})));
|
|
38977
|
+
var ALERT_INTERACTIONS_UPERT = createAsyncThunk("alertIntractionsSlice/alertInteraction_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
38978
|
+
var payload,
|
|
38979
|
+
_ref4,
|
|
38980
|
+
rejectWithValue,
|
|
38981
|
+
list,
|
|
38982
|
+
queriesjson,
|
|
38983
|
+
res,
|
|
38984
|
+
_args2 = arguments;
|
|
38985
|
+
|
|
38986
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
38987
|
+
while (1) {
|
|
38988
|
+
switch (_context2.prev = _context2.next) {
|
|
38989
|
+
case 0:
|
|
38990
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
38991
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
38992
|
+
_context2.prev = 2;
|
|
38993
|
+
list = payload.list;
|
|
38994
|
+
queriesjson = alertIntractionUpsert.UpsertAlertInterations(list);
|
|
38995
|
+
_context2.next = 7;
|
|
38996
|
+
return fetchData$3({
|
|
38997
|
+
body: JSON.stringify(queriesjson)
|
|
38998
|
+
}, __uspsertUrl__);
|
|
38999
|
+
|
|
39000
|
+
case 7:
|
|
39001
|
+
res = _context2.sent;
|
|
39002
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
39003
|
+
data: res
|
|
39004
|
+
}));
|
|
39005
|
+
|
|
39006
|
+
case 11:
|
|
39007
|
+
_context2.prev = 11;
|
|
39008
|
+
_context2.t0 = _context2["catch"](2);
|
|
39009
|
+
debugger;
|
|
39010
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39011
|
+
message: _context2.t0.message
|
|
39012
|
+
})));
|
|
39013
|
+
|
|
39014
|
+
case 15:
|
|
39015
|
+
case "end":
|
|
39016
|
+
return _context2.stop();
|
|
39017
|
+
}
|
|
39018
|
+
}
|
|
39019
|
+
}, _callee2, null, [[2, 11]]);
|
|
39020
|
+
})));
|
|
39021
|
+
var REASON_TYPE_CODE_READ = createAsyncThunk("alertIntractionsSlice/reason_type_code", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
39022
|
+
var payload,
|
|
39023
|
+
_ref6,
|
|
39024
|
+
rejectWithValue,
|
|
39025
|
+
list,
|
|
39026
|
+
display,
|
|
39027
|
+
queriesjson,
|
|
39028
|
+
res,
|
|
39029
|
+
_args3 = arguments;
|
|
39030
|
+
|
|
39031
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
39032
|
+
while (1) {
|
|
39033
|
+
switch (_context3.prev = _context3.next) {
|
|
39034
|
+
case 0:
|
|
39035
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
39036
|
+
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
39037
|
+
_context3.prev = 2;
|
|
39038
|
+
list = payload.list;
|
|
39039
|
+
|
|
39040
|
+
if (list === "Drug-AllergyIngredient-Interaction") {
|
|
39041
|
+
display = "Drug-to-Allergy Interaction";
|
|
39042
|
+
} else if (list === "Drug-Drug-Interaction") {
|
|
39043
|
+
display = "Drug-to-Drug Interaction";
|
|
39044
|
+
} else if (list === "Drug-Disease-Interaction") {
|
|
39045
|
+
display = "Drug-to-Disease Interaction";
|
|
39046
|
+
}
|
|
39047
|
+
|
|
39048
|
+
queriesjson = reasonTypeCode.reasonTypeCodeRead(display);
|
|
39049
|
+
_context3.next = 8;
|
|
39050
|
+
return fetchData$3({
|
|
39051
|
+
body: JSON.stringify(queriesjson)
|
|
39052
|
+
}, __readDocumentUrl__);
|
|
39053
|
+
|
|
39054
|
+
case 8:
|
|
39055
|
+
res = _context3.sent;
|
|
39056
|
+
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
39057
|
+
data: res
|
|
39058
|
+
}));
|
|
39059
|
+
|
|
39060
|
+
case 12:
|
|
39061
|
+
_context3.prev = 12;
|
|
39062
|
+
_context3.t0 = _context3["catch"](2);
|
|
39063
|
+
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39064
|
+
message: _context3.t0.message
|
|
39065
|
+
})));
|
|
39066
|
+
|
|
39067
|
+
case 15:
|
|
39068
|
+
case "end":
|
|
39069
|
+
return _context3.stop();
|
|
39070
|
+
}
|
|
39071
|
+
}
|
|
39072
|
+
}, _callee3, null, [[2, 12]]);
|
|
38691
39073
|
})));
|
|
38692
39074
|
var alertIntractionsSlice = createSlice({
|
|
38693
39075
|
name: "alertIntractionsSlice",
|
|
38694
39076
|
initialState: {
|
|
38695
|
-
alert_interactions: _objectSpread2({}, defaultState.Info)
|
|
39077
|
+
alert_interactions: _objectSpread2({}, defaultState.Info),
|
|
39078
|
+
alertInteraction_upsert: _objectSpread2({}, defaultState.Info),
|
|
39079
|
+
reason_type_code: _objectSpread2({}, defaultState.Info)
|
|
38696
39080
|
},
|
|
38697
39081
|
extraReducers: (_extraReducers$5 = {}, _defineProperty(_extraReducers$5, ALERT_INTERACTIONS.fulfilled, function (state, action) {
|
|
38698
39082
|
var _action$payload;
|
|
@@ -38704,10 +39088,32 @@ var alertIntractionsSlice = createSlice({
|
|
|
38704
39088
|
var _action$payload2;
|
|
38705
39089
|
|
|
38706
39090
|
state.alert_interactions.loading = false, state.alert_interactions.error = true, state.alert_interactions = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
39091
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.fulfilled, function (state, action) {
|
|
39092
|
+
var _action$payload3;
|
|
39093
|
+
|
|
39094
|
+
state.alertInteraction_upsert.loading = false, state.alertInteraction_upsert.error = false, state.alertInteraction_upsert = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
39095
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.pending, function (state, action) {
|
|
39096
|
+
state.alertInteraction_upsert.error = false, state.alertInteraction_upsert.loading = true;
|
|
39097
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.rejected, function (state, action) {
|
|
39098
|
+
var _action$payload4;
|
|
39099
|
+
|
|
39100
|
+
state.alertInteraction_upsert.loading = false, state.alertInteraction_upsert.error = true, state.alertInteraction_upsert = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
39101
|
+
}), _defineProperty(_extraReducers$5, REASON_TYPE_CODE_READ.fulfilled, function (state, action) {
|
|
39102
|
+
var _action$payload5;
|
|
39103
|
+
|
|
39104
|
+
state.reason_type_code.loading = false, state.reason_type_code.error = false, state.reason_type_code = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
39105
|
+
}), _defineProperty(_extraReducers$5, REASON_TYPE_CODE_READ.pending, function (state, action) {
|
|
39106
|
+
state.reason_type_code.error = false, state.reason_type_code.loading = true;
|
|
39107
|
+
}), _defineProperty(_extraReducers$5, REASON_TYPE_CODE_READ.rejected, function (state, action) {
|
|
39108
|
+
var _action$payload6;
|
|
39109
|
+
|
|
39110
|
+
state.reason_type_code.loading = false, state.reason_type_code.error = true, state.reason_type_code = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
38707
39111
|
}), _extraReducers$5)
|
|
38708
39112
|
});
|
|
38709
39113
|
var alertIntractionActions = {
|
|
38710
|
-
ALERT_INTERACTIONS: ALERT_INTERACTIONS
|
|
39114
|
+
ALERT_INTERACTIONS: ALERT_INTERACTIONS,
|
|
39115
|
+
ALERT_INTERACTIONS_UPERT: ALERT_INTERACTIONS_UPERT,
|
|
39116
|
+
REASON_TYPE_CODE_READ: REASON_TYPE_CODE_READ
|
|
38711
39117
|
};
|
|
38712
39118
|
var alertIntractionsSlice$1 = alertIntractionsSlice.reducer;
|
|
38713
39119
|
|