primarycare-binder 1.1.3 → 1.1.7
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 +128 -153
- 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") {
|
|
@@ -11664,18 +11662,18 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11664
11662
|
} else if (status === "completed_nurse") {
|
|
11665
11663
|
encounterStatus = "Triaged";
|
|
11666
11664
|
} else if (status === "doctor_inprogress") {
|
|
11667
|
-
encounterStatus = "
|
|
11665
|
+
encounterStatus = "In-Progress";
|
|
11668
11666
|
status = "completed_nurse";
|
|
11669
11667
|
} else if (status === "completed") {
|
|
11670
11668
|
encounterStatus = "consultation over";
|
|
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,10 +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
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 : "";
|
|
11691
|
-
_context14.next =
|
|
11689
|
+
_context14.next = 12;
|
|
11692
11690
|
return fetchData$3({
|
|
11693
11691
|
body: JSON.stringify({
|
|
11694
11692
|
db_name: dbName,
|
|
@@ -11698,12 +11696,12 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11698
11696
|
})
|
|
11699
11697
|
}, __readDocumentUrl__);
|
|
11700
11698
|
|
|
11701
|
-
case
|
|
11699
|
+
case 12:
|
|
11702
11700
|
encounterInfo = _context14.sent;
|
|
11703
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;
|
|
11704
11702
|
|
|
11705
11703
|
if (!(_id && _key && statushistory && Array.isArray(statushistory))) {
|
|
11706
|
-
_context14.next =
|
|
11704
|
+
_context14.next = 20;
|
|
11707
11705
|
break;
|
|
11708
11706
|
}
|
|
11709
11707
|
|
|
@@ -11740,12 +11738,12 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11740
11738
|
status: encounterStatus
|
|
11741
11739
|
}
|
|
11742
11740
|
}];
|
|
11743
|
-
_context14.next =
|
|
11741
|
+
_context14.next = 20;
|
|
11744
11742
|
return fetchData$3({
|
|
11745
11743
|
body: JSON.stringify(updateData)
|
|
11746
11744
|
}, __uspsertUrl__);
|
|
11747
11745
|
|
|
11748
|
-
case
|
|
11746
|
+
case 20:
|
|
11749
11747
|
// const appData = await fetchData({
|
|
11750
11748
|
// body: JSON.stringify(appBody),
|
|
11751
11749
|
// });
|
|
@@ -11756,7 +11754,6 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11756
11754
|
}
|
|
11757
11755
|
|
|
11758
11756
|
appInfo["comment"] = status;
|
|
11759
|
-
debugger;
|
|
11760
11757
|
body = [{
|
|
11761
11758
|
db_name: dbName,
|
|
11762
11759
|
entity: "Appointment",
|
|
@@ -11767,30 +11764,30 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
11767
11764
|
id: appointmentId
|
|
11768
11765
|
}
|
|
11769
11766
|
}];
|
|
11770
|
-
_context14.next =
|
|
11767
|
+
_context14.next = 26;
|
|
11771
11768
|
return fetchData$3({
|
|
11772
11769
|
body: JSON.stringify(body)
|
|
11773
11770
|
}, __uspsertUrl__);
|
|
11774
11771
|
|
|
11775
|
-
case
|
|
11772
|
+
case 26:
|
|
11776
11773
|
data = _context14.sent;
|
|
11777
11774
|
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
11778
11775
|
data: data
|
|
11779
11776
|
}));
|
|
11780
11777
|
|
|
11781
|
-
case
|
|
11782
|
-
_context14.prev =
|
|
11778
|
+
case 30:
|
|
11779
|
+
_context14.prev = 30;
|
|
11783
11780
|
_context14.t0 = _context14["catch"](2);
|
|
11784
11781
|
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
11785
11782
|
message: _context14.t0.message
|
|
11786
11783
|
})));
|
|
11787
11784
|
|
|
11788
|
-
case
|
|
11785
|
+
case 33:
|
|
11789
11786
|
case "end":
|
|
11790
11787
|
return _context14.stop();
|
|
11791
11788
|
}
|
|
11792
11789
|
}
|
|
11793
|
-
}, _callee14, null, [[2,
|
|
11790
|
+
}, _callee14, null, [[2, 30]]);
|
|
11794
11791
|
})));
|
|
11795
11792
|
var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApoointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
11796
11793
|
var payload,
|
|
@@ -18017,15 +18014,15 @@ var dashboardQuery = {
|
|
|
18017
18014
|
1: {
|
|
18018
18015
|
db_name: "primarycare",
|
|
18019
18016
|
entity: "Appointment",
|
|
18020
|
-
filter: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && lower(Appointment.appointmentType)!='cancelled' && Appointment.
|
|
18017
|
+
filter: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(Appointment.resourcecode).id ==").concat(loginId, " collect with count into length"),
|
|
18021
18018
|
return_fields: "{Count:length}"
|
|
18022
18019
|
},
|
|
18023
18020
|
2: {
|
|
18024
18021
|
db_name: "primarycare",
|
|
18025
18022
|
entity: "Practitioner,Appointment",
|
|
18026
18023
|
filter: {
|
|
18027
|
-
Practitioner: "Practitioner.activestatus==true &&
|
|
18028
|
-
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && lower(Appointment.appointmentType)!='cancelled' && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Appointment.SpecialtyID collect with count into length")
|
|
18024
|
+
Practitioner: "Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orgID, "'"),
|
|
18025
|
+
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID collect with count into length")
|
|
18029
18026
|
},
|
|
18030
18027
|
return_fields: "{Count:length}"
|
|
18031
18028
|
},
|
|
@@ -18056,7 +18053,6 @@ var dashboardQuery = {
|
|
|
18056
18053
|
};
|
|
18057
18054
|
},
|
|
18058
18055
|
todayVisit: function todayVisit(orgID, startDate, endDate, loginId) {
|
|
18059
|
-
debugger;
|
|
18060
18056
|
return {
|
|
18061
18057
|
1: {
|
|
18062
18058
|
db_name: dbName,
|
|
@@ -18071,8 +18067,8 @@ var dashboardQuery = {
|
|
|
18071
18067
|
db_name: dbName,
|
|
18072
18068
|
entity: "Practitioner,Encounter",
|
|
18073
18069
|
filter: {
|
|
18074
|
-
Practitioner: "Practitioner.activestatus==true &&
|
|
18075
|
-
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, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length")
|
|
18070
|
+
Practitioner: "Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orgID, "'"),
|
|
18071
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == '".concat(orgID, "' && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length")
|
|
18076
18072
|
},
|
|
18077
18073
|
return_fields: "{CheckedIn:length}"
|
|
18078
18074
|
},
|
|
@@ -18091,8 +18087,8 @@ var dashboardQuery = {
|
|
|
18091
18087
|
db_name: dbName,
|
|
18092
18088
|
entity: "Practitioner,Encounter",
|
|
18093
18089
|
filter: {
|
|
18094
|
-
Practitioner: "Practitioner.
|
|
18095
|
-
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && Encounter.status=='
|
|
18090
|
+
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, "'"),
|
|
18091
|
+
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.status).code=='ENCSTATUS008' collect with count into length")
|
|
18096
18092
|
},
|
|
18097
18093
|
return_fields: "{CheckedIn:length}"
|
|
18098
18094
|
} // 3: {},
|
|
@@ -18106,8 +18102,8 @@ var dashboardQuery = {
|
|
|
18106
18102
|
db_name: dbName,
|
|
18107
18103
|
entity: "Practitioner,Encounter",
|
|
18108
18104
|
filter: {
|
|
18109
|
-
Practitioner: "
|
|
18110
|
-
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " &&
|
|
18105
|
+
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, "'"),
|
|
18106
|
+
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)[*].display ANY =='Triaged' collect with count into length")
|
|
18111
18107
|
},
|
|
18112
18108
|
return_fields: "{Triage:length}"
|
|
18113
18109
|
} // 3: {},
|
|
@@ -18121,8 +18117,8 @@ var dashboardQuery = {
|
|
|
18121
18117
|
db_name: dbName,
|
|
18122
18118
|
entity: "Practitioner,Encounter",
|
|
18123
18119
|
filter: {
|
|
18124
|
-
Practitioner: "Practitioner.
|
|
18125
|
-
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && Encounter.status=='
|
|
18120
|
+
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, "'"),
|
|
18121
|
+
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.status).code=='ENCSTATUS005' collect with count into length")
|
|
18126
18122
|
},
|
|
18127
18123
|
return_fields: "{InProgress:length}"
|
|
18128
18124
|
} // 3: {},
|
|
@@ -18136,47 +18132,19 @@ var dashboardQuery = {
|
|
|
18136
18132
|
db_name: dbName,
|
|
18137
18133
|
entity: "Practitioner,Encounter",
|
|
18138
18134
|
filter: {
|
|
18139
|
-
Practitioner: "
|
|
18140
|
-
Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " &&
|
|
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, "'"),
|
|
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: {},
|
|
18144
18140
|
|
|
18145
18141
|
};
|
|
18146
18142
|
},
|
|
18147
|
-
// checkingAppointment: (orgID, startDate, endDate, loginId) => {
|
|
18148
|
-
// return {
|
|
18149
|
-
// 1: {
|
|
18150
|
-
// db_name: dbName,
|
|
18151
|
-
// entity: "Practitioner,PractitionerRole,Appointment,Encounter",
|
|
18152
|
-
// filter: {
|
|
18153
|
-
// Practitioner: `Practitioner.id == ${loginId}`,
|
|
18154
|
-
// PractitionerRole: `PractitionerRole.id == Practitioner.PractitionerRoleID && PractitionerRole.OrgID[*] ANY == ${orgID}`,
|
|
18155
|
-
// Appointment: `Appointment.start >= ${startDate} && Appointment.end <= ${endDate} && Appointment.SpecialtyID[*] ANY == PractitionerRole.SpecialtyID[0]`,
|
|
18156
|
-
// Encounter:
|
|
18157
|
-
// "Encounter.appointmentId[*] ANY == Appointment.id COLLECT WITH COUNT INTO length",
|
|
18158
|
-
// },
|
|
18159
|
-
// return_fields: "{'checkedInCount' : length}",
|
|
18160
|
-
// },
|
|
18161
|
-
// 2: {
|
|
18162
|
-
// db_name: dbName,
|
|
18163
|
-
// entity: "Practitioner,PractitionerRole,Appointment,Encounter",
|
|
18164
|
-
// filter: `Practitioner.id == ${loginId} && PractitionerRole.id == Practitioner.PractitionerRoleID && PractitionerRole.OrgID[*] ANY == ${orgID} && Appointment.start >= ${startDate} && Appointment.end <= ${endDate} && Appointment.SpecialtyID[*] ANY == PractitionerRole.SpecialtyID[0] && Encounter.appointmentId[*] ANY == Appointment.id COLLECT WITH COUNT INTO length`,
|
|
18165
|
-
// return_fields: "{'checkedInCount' : length}",
|
|
18166
|
-
// },
|
|
18167
|
-
// 3: {
|
|
18168
|
-
// db_name: dbName,
|
|
18169
|
-
// entity: "Practitioner,PractitionerRole,Appointment,Encounter",
|
|
18170
|
-
// filter: `Practitioner.id == ${loginId} && PractitionerRole._id == Practitioner.PractitionerRole && PractitionerRole.OrgID[*] ANY == ${orgID} && Appointment.start >= ${startDate} && Appointment.end <= ${endDate} && Appointment.SpecialtyID[*] ANY == PractitionerRole.SpecialtyID[0] && Encounter.appointmentId[*] ANY == Appointment.id COLLECT WITH COUNT INTO length`,
|
|
18171
|
-
// return_fields: "{'checkedInCount' : length}",
|
|
18172
|
-
// },
|
|
18173
|
-
// };
|
|
18174
|
-
// },
|
|
18175
18143
|
patientWaitingTimeQuery: function patientWaitingTimeQuery(orgID, loginId) {
|
|
18176
18144
|
return {
|
|
18177
18145
|
1: {
|
|
18178
18146
|
db_name: dbName,
|
|
18179
|
-
queryid: "
|
|
18147
|
+
queryid: "21fd3638-914e-41a8-b6e5-36459565595a",
|
|
18180
18148
|
filter: {
|
|
18181
18149
|
practid: loginId,
|
|
18182
18150
|
orgid: "".concat(orgID)
|
|
@@ -18199,7 +18167,7 @@ var dashboardQuery = {
|
|
|
18199
18167
|
db_name: "primarycare",
|
|
18200
18168
|
entity: "Appointment,Encounter",
|
|
18201
18169
|
filter: {
|
|
18202
|
-
Appointment: "Appointment.activestatus==true && Appointment.start>= ".concat(startDate, " && Appointment.end<=").concat(endDate, " && Appointment.
|
|
18170
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>= ".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orgID, "' "),
|
|
18203
18171
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit') collect with count into length"
|
|
18204
18172
|
},
|
|
18205
18173
|
return_fields: "{FirstVisitCount:length}"
|
|
@@ -18208,8 +18176,8 @@ var dashboardQuery = {
|
|
|
18208
18176
|
db_name: "primarycare",
|
|
18209
18177
|
entity: "Practitioner,Appointment,Encounter",
|
|
18210
18178
|
filter: {
|
|
18211
|
-
Practitioner: "
|
|
18212
|
-
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Appointment.SpecialtyID"),
|
|
18179
|
+
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, "'"),
|
|
18180
|
+
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
|
|
18213
18181
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit') collect with count into length"
|
|
18214
18182
|
},
|
|
18215
18183
|
return_fields: "{FirstVisitCount:length}"
|
|
@@ -18231,7 +18199,7 @@ var dashboardQuery = {
|
|
|
18231
18199
|
db_name: "primarycare",
|
|
18232
18200
|
entity: "Appointment,Encounter",
|
|
18233
18201
|
filter: {
|
|
18234
|
-
Appointment: "Appointment.activestatus==true && Appointment.start>= ".concat(startDate, " && Appointment.end<=").concat(endDate, " && Appointment.
|
|
18202
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>= ".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orgID, "' "),
|
|
18235
18203
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits') collect with count into length"
|
|
18236
18204
|
},
|
|
18237
18205
|
return_fields: "{OtherVisitsCount:length}"
|
|
@@ -18240,8 +18208,8 @@ var dashboardQuery = {
|
|
|
18240
18208
|
db_name: "primarycare",
|
|
18241
18209
|
entity: "Practitioner,Appointment,Encounter",
|
|
18242
18210
|
filter: {
|
|
18243
|
-
Practitioner: "
|
|
18244
|
-
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Appointment.SpecialtyID"),
|
|
18211
|
+
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, "'"),
|
|
18212
|
+
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
|
|
18245
18213
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits') collect with count into length"
|
|
18246
18214
|
},
|
|
18247
18215
|
return_fields: "{OtherVisitsCount:length}"
|
|
@@ -18263,7 +18231,7 @@ var dashboardQuery = {
|
|
|
18263
18231
|
db_name: "primarycare",
|
|
18264
18232
|
entity: "Appointment,Encounter",
|
|
18265
18233
|
filter: {
|
|
18266
|
-
Appointment: "Appointment.activestatus==true && Appointment.start>= ".concat(startDate, " && Appointment.end<=").concat(endDate, " && Appointment.
|
|
18234
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>= ".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orgID, "' "),
|
|
18267
18235
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin') collect with count into length"
|
|
18268
18236
|
},
|
|
18269
18237
|
return_fields: "{WalkinCount:length}"
|
|
@@ -18272,8 +18240,8 @@ var dashboardQuery = {
|
|
|
18272
18240
|
db_name: "primarycare",
|
|
18273
18241
|
entity: "Practitioner,Appointment,Encounter",
|
|
18274
18242
|
filter: {
|
|
18275
|
-
Practitioner: "
|
|
18276
|
-
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Appointment.SpecialtyID"),
|
|
18243
|
+
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, "'"),
|
|
18244
|
+
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
|
|
18277
18245
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin') collect with count into length"
|
|
18278
18246
|
},
|
|
18279
18247
|
return_fields: "{WalkinCount:length}"
|
|
@@ -18295,7 +18263,7 @@ var dashboardQuery = {
|
|
|
18295
18263
|
db_name: "primarycare",
|
|
18296
18264
|
entity: "Appointment,Encounter",
|
|
18297
18265
|
filter: {
|
|
18298
|
-
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && Appointment.
|
|
18266
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orgID, "' "),
|
|
18299
18267
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient') collect with count into length"
|
|
18300
18268
|
},
|
|
18301
18269
|
return_fields: "{NewPatientCount:length}"
|
|
@@ -18304,8 +18272,8 @@ var dashboardQuery = {
|
|
|
18304
18272
|
db_name: "primarycare",
|
|
18305
18273
|
entity: "Practitioner,Appointment,Encounter",
|
|
18306
18274
|
filter: {
|
|
18307
|
-
Practitioner: "
|
|
18308
|
-
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Appointment.SpecialtyID"),
|
|
18275
|
+
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, "'"),
|
|
18276
|
+
Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(orgID, "' && Appointment.start>=").concat(startDate, " && Appointment.end<=").concat(endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
|
|
18309
18277
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient') collect with count into length"
|
|
18310
18278
|
},
|
|
18311
18279
|
return_fields: "{NewPatientCount:length}"
|
|
@@ -18453,14 +18421,13 @@ var dashboardQuery = {
|
|
|
18453
18421
|
}
|
|
18454
18422
|
};
|
|
18455
18423
|
var visitQuery = {
|
|
18456
|
-
checkedIn: function checkedIn(startDate, endDate, orgId, loginId) {
|
|
18457
|
-
debugger;
|
|
18424
|
+
checkedIn: function checkedIn(startDate, endDate, orgId, loginId, orGId) {
|
|
18458
18425
|
return {
|
|
18459
18426
|
1: {
|
|
18460
18427
|
db_name: dbName,
|
|
18461
18428
|
entity: "Practitioner,Encounter",
|
|
18462
18429
|
filter: {
|
|
18463
|
-
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(
|
|
18430
|
+
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
18464
18431
|
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length")
|
|
18465
18432
|
},
|
|
18466
18433
|
return_fields: "{CheckedIn:length}"
|
|
@@ -18469,8 +18436,8 @@ var visitQuery = {
|
|
|
18469
18436
|
db_name: dbName,
|
|
18470
18437
|
entity: "Practitioner,Encounter",
|
|
18471
18438
|
filter: {
|
|
18472
|
-
Practitioner: "
|
|
18473
|
-
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " &&
|
|
18439
|
+
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, "'"),
|
|
18440
|
+
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, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length")
|
|
18474
18441
|
},
|
|
18475
18442
|
return_fields: "{CheckedIn:length}"
|
|
18476
18443
|
},
|
|
@@ -18482,13 +18449,13 @@ var visitQuery = {
|
|
|
18482
18449
|
}
|
|
18483
18450
|
};
|
|
18484
18451
|
},
|
|
18485
|
-
traigeDone: function traigeDone(startDate, endDate, orgId, loginId) {
|
|
18452
|
+
traigeDone: function traigeDone(startDate, endDate, orgId, loginId, orGId) {
|
|
18486
18453
|
return {
|
|
18487
18454
|
1: {
|
|
18488
18455
|
db_name: dbName,
|
|
18489
18456
|
entity: "Practitioner,Encounter",
|
|
18490
18457
|
filter: {
|
|
18491
|
-
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(
|
|
18458
|
+
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
18492
18459
|
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)[*].display ANY =='Triaged' collect with count into length")
|
|
18493
18460
|
},
|
|
18494
18461
|
return_fields: "{TriagedCount:length}"
|
|
@@ -18497,7 +18464,7 @@ var visitQuery = {
|
|
|
18497
18464
|
db_name: dbName,
|
|
18498
18465
|
entity: "Practitioner,Encounter",
|
|
18499
18466
|
filter: {
|
|
18500
|
-
Practitioner: "
|
|
18467
|
+
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, "'"),
|
|
18501
18468
|
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, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged' collect with count into length")
|
|
18502
18469
|
},
|
|
18503
18470
|
return_fields: "{TriagedCount:length}"
|
|
@@ -18510,14 +18477,14 @@ var visitQuery = {
|
|
|
18510
18477
|
}
|
|
18511
18478
|
};
|
|
18512
18479
|
},
|
|
18513
|
-
visitCompleted: function visitCompleted(startDate, endDate, orgId, loginId) {
|
|
18480
|
+
visitCompleted: function visitCompleted(startDate, endDate, orgId, loginId, orGId) {
|
|
18514
18481
|
return {
|
|
18515
18482
|
1: {
|
|
18516
18483
|
db_name: "primarycare",
|
|
18517
18484
|
entity: "Practitioner,Encounter",
|
|
18518
18485
|
filter: {
|
|
18519
|
-
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(
|
|
18520
|
-
Encounter: "Encounter.activestatus == true && Encounter.Organization_id ==".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>= ").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " &&
|
|
18486
|
+
Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
|
|
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")
|
|
18521
18488
|
},
|
|
18522
18489
|
return_fields: "{CompletedCount:length}"
|
|
18523
18490
|
},
|
|
@@ -18525,15 +18492,15 @@ var visitQuery = {
|
|
|
18525
18492
|
db_name: dbName,
|
|
18526
18493
|
entity: "Practitioner,Encounter",
|
|
18527
18494
|
filter: {
|
|
18528
|
-
Practitioner: "
|
|
18529
|
-
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, " &&
|
|
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, "'"),
|
|
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")
|
|
18530
18497
|
},
|
|
18531
18498
|
return_fields: "{CompletedCount:length}"
|
|
18532
18499
|
},
|
|
18533
18500
|
3: {
|
|
18534
18501
|
db_name: dbName,
|
|
18535
18502
|
entity: "Encounter",
|
|
18536
|
-
filter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " &&
|
|
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"),
|
|
18537
18504
|
return_fields: "{CompletedCount:length}"
|
|
18538
18505
|
}
|
|
18539
18506
|
};
|
|
@@ -18588,14 +18555,14 @@ var highPriorityPatientQuery = {
|
|
|
18588
18555
|
1: {
|
|
18589
18556
|
db_name: "primarycare",
|
|
18590
18557
|
entity: "Encounter",
|
|
18591
|
-
filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'
|
|
18592
|
-
return_fields: "
|
|
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'"),
|
|
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)})"
|
|
18593
18560
|
},
|
|
18594
18561
|
2: {
|
|
18595
18562
|
db_name: "primarycare",
|
|
18596
18563
|
entity: "Practitioner,Encounter",
|
|
18597
18564
|
filter: {
|
|
18598
|
-
Practitioner: "
|
|
18565
|
+
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' and Practitioner.id==".concat(practionerId, " AND DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(org_id, "'"),
|
|
18599
18566
|
Encounter: "Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND DOCUMENT(Encounter.priority).display=='High' AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress')) ")
|
|
18600
18567
|
},
|
|
18601
18568
|
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)})"
|
|
@@ -18645,7 +18612,7 @@ var APPOINTMENTS = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_
|
|
|
18645
18612
|
data = _context.sent;
|
|
18646
18613
|
_context.next = 9;
|
|
18647
18614
|
return fetchData$3({
|
|
18648
|
-
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orGId, loginId)[roleId])
|
|
18615
|
+
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orGId, loginId, orgId)[roleId])
|
|
18649
18616
|
}, __readDocumentUrl__);
|
|
18650
18617
|
|
|
18651
18618
|
case 9:
|
|
@@ -18720,11 +18687,11 @@ var TODAY_SCHEDULE = createAsyncThunk("dashboardApiSlice/today_schedul", /*#__PU
|
|
|
18720
18687
|
var _val$slot;
|
|
18721
18688
|
|
|
18722
18689
|
(_val$slot = val.slot) === null || _val$slot === void 0 ? void 0 : _val$slot.map(function (task) {
|
|
18723
|
-
var _task$Appointment$0$
|
|
18690
|
+
var _task$Appointment$0$c, _task$Appointment, _task$Appointment$, _task$start, _task$end, _task$Type;
|
|
18724
18691
|
|
|
18725
18692
|
return arr.push({
|
|
18726
|
-
title: (_task$Appointment$0$
|
|
18727
|
-
status: (
|
|
18693
|
+
title: (_task$Appointment$0$c = task === null || task === void 0 ? void 0 : (_task$Appointment = task.Appointment) === null || _task$Appointment === void 0 ? void 0 : (_task$Appointment$ = _task$Appointment[0]) === null || _task$Appointment$ === void 0 ? void 0 : _task$Appointment$.consultationMode) !== null && _task$Appointment$0$c !== void 0 ? _task$Appointment$0$c : "",
|
|
18694
|
+
status: (task === null || task === void 0 ? void 0 : task.Appointment.length) > 0 ? false : true,
|
|
18728
18695
|
timefrom: (_task$start = task === null || task === void 0 ? void 0 : task.start) !== null && _task$start !== void 0 ? _task$start : "",
|
|
18729
18696
|
timeto: (_task$end = task === null || task === void 0 ? void 0 : task.end) !== null && _task$end !== void 0 ? _task$end : "",
|
|
18730
18697
|
type: (_task$Type = task === null || task === void 0 ? void 0 : task.Type) !== null && _task$Type !== void 0 ? _task$Type : ""
|
|
@@ -19078,34 +19045,32 @@ var TODAY_VISIT = createAsyncThunk("dashboardApiSlice/today_visit", /*#__PURE__*
|
|
|
19078
19045
|
_ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
|
|
19079
19046
|
_context9.prev = 2;
|
|
19080
19047
|
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgIdInt = payload.orgIdInt;
|
|
19081
|
-
|
|
19082
|
-
_context9.next = 7;
|
|
19048
|
+
_context9.next = 6;
|
|
19083
19049
|
return fetchData$3({
|
|
19084
19050
|
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId)[roleId])
|
|
19085
19051
|
}, __readDocumentUrl__);
|
|
19086
19052
|
|
|
19087
|
-
case
|
|
19053
|
+
case 6:
|
|
19088
19054
|
data = _context9.sent;
|
|
19089
|
-
debugger;
|
|
19090
19055
|
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19091
19056
|
data: {
|
|
19092
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
|
|
19093
19058
|
}
|
|
19094
19059
|
}));
|
|
19095
19060
|
|
|
19096
|
-
case
|
|
19097
|
-
_context9.prev =
|
|
19061
|
+
case 10:
|
|
19062
|
+
_context9.prev = 10;
|
|
19098
19063
|
_context9.t0 = _context9["catch"](2);
|
|
19099
19064
|
return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19100
19065
|
message: _context9.t0.message
|
|
19101
19066
|
})));
|
|
19102
19067
|
|
|
19103
|
-
case
|
|
19068
|
+
case 13:
|
|
19104
19069
|
case "end":
|
|
19105
19070
|
return _context9.stop();
|
|
19106
19071
|
}
|
|
19107
19072
|
}
|
|
19108
|
-
}, _callee9, null, [[2,
|
|
19073
|
+
}, _callee9, null, [[2, 10]]);
|
|
19109
19074
|
})));
|
|
19110
19075
|
var OTHER_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
19111
19076
|
var payload,
|
|
@@ -20636,6 +20601,7 @@ var VISIT_CHECKEDIN = createAsyncThunk("visitStatsApiSlice/visitCheckedin", /*#_
|
|
|
20636
20601
|
endDate,
|
|
20637
20602
|
roleId,
|
|
20638
20603
|
loginId,
|
|
20604
|
+
org_id,
|
|
20639
20605
|
data,
|
|
20640
20606
|
_args = arguments;
|
|
20641
20607
|
|
|
@@ -20646,10 +20612,10 @@ var VISIT_CHECKEDIN = createAsyncThunk("visitStatsApiSlice/visitCheckedin", /*#_
|
|
|
20646
20612
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
20647
20613
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
20648
20614
|
_context.prev = 2;
|
|
20649
|
-
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
|
|
20615
|
+
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, org_id = payload.org_id;
|
|
20650
20616
|
_context.next = 6;
|
|
20651
20617
|
return fetchData$3({
|
|
20652
|
-
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgId, loginId)[roleId])
|
|
20618
|
+
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgId, loginId, org_id)[roleId])
|
|
20653
20619
|
}, __readDocumentUrl__);
|
|
20654
20620
|
|
|
20655
20621
|
case 6:
|
|
@@ -20844,6 +20810,7 @@ var GET_VISIT_STATS = createAsyncThunk("visitStatsApiSlice/visitStatsCount", /*#
|
|
|
20844
20810
|
endDate,
|
|
20845
20811
|
loginId,
|
|
20846
20812
|
roleId,
|
|
20813
|
+
org_id,
|
|
20847
20814
|
data,
|
|
20848
20815
|
data1,
|
|
20849
20816
|
data2,
|
|
@@ -20857,31 +20824,31 @@ var GET_VISIT_STATS = createAsyncThunk("visitStatsApiSlice/visitStatsCount", /*#
|
|
|
20857
20824
|
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
20858
20825
|
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
20859
20826
|
_context5.prev = 2;
|
|
20860
|
-
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, loginId = payload.loginId, roleId = payload.roleId;
|
|
20827
|
+
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, loginId = payload.loginId, roleId = payload.roleId, org_id = payload.org_id;
|
|
20861
20828
|
_context5.next = 6;
|
|
20862
20829
|
return fetchData$3({
|
|
20863
|
-
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgId, loginId)[roleId])
|
|
20830
|
+
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgId, loginId, org_id)[roleId])
|
|
20864
20831
|
}, __readDocumentUrl__);
|
|
20865
20832
|
|
|
20866
20833
|
case 6:
|
|
20867
20834
|
data = _context5.sent;
|
|
20868
20835
|
_context5.next = 9;
|
|
20869
20836
|
return fetchData$3({
|
|
20870
|
-
body: JSON.stringify(visitQuery.traigeDone(startDate, endDate, orgId, loginId)[roleId])
|
|
20837
|
+
body: JSON.stringify(visitQuery.traigeDone(startDate, endDate, orgId, loginId, org_id)[roleId])
|
|
20871
20838
|
}, __readDocumentUrl__);
|
|
20872
20839
|
|
|
20873
20840
|
case 9:
|
|
20874
20841
|
data1 = _context5.sent;
|
|
20875
20842
|
_context5.next = 12;
|
|
20876
20843
|
return fetchData$3({
|
|
20877
|
-
body: JSON.stringify(visitQuery.visitCompleted(startDate, endDate, orgId, loginId)[roleId])
|
|
20844
|
+
body: JSON.stringify(visitQuery.visitCompleted(startDate, endDate, orgId, loginId, org_id)[roleId])
|
|
20878
20845
|
}, __readDocumentUrl__);
|
|
20879
20846
|
|
|
20880
20847
|
case 12:
|
|
20881
20848
|
data2 = _context5.sent;
|
|
20882
20849
|
_context5.next = 15;
|
|
20883
20850
|
return fetchData$3({
|
|
20884
|
-
body: JSON.stringify(visitQuery.noShows(startDate, endDate, orgId, loginId)[roleId])
|
|
20851
|
+
body: JSON.stringify(visitQuery.noShows(startDate, endDate, orgId, loginId, org_id)[roleId])
|
|
20885
20852
|
}, __readDocumentUrl__);
|
|
20886
20853
|
|
|
20887
20854
|
case 15:
|
|
@@ -26012,7 +25979,7 @@ var queries$6 = {
|
|
|
26012
25979
|
db_name: "primarycare",
|
|
26013
25980
|
entity: "CA_OrderLine",
|
|
26014
25981
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
26015
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN DOCUMENT(doc._from)),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}`,
|
|
25982
|
+
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}`,
|
|
26016
25983
|
// entity: "CA_OrderLine",
|
|
26017
25984
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=="${order_id}" && CA_OrderLine.activestatus==true`,
|
|
26018
25985
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true`,
|
|
@@ -28748,7 +28715,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28748
28715
|
data = _context2.sent;
|
|
28749
28716
|
arr = [];
|
|
28750
28717
|
data.result.map(function (val) {
|
|
28751
|
-
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2;
|
|
28718
|
+
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4;
|
|
28752
28719
|
|
|
28753
28720
|
var json = {
|
|
28754
28721
|
value: val === null || val === void 0 ? void 0 : val._id,
|
|
@@ -28758,7 +28725,9 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28758
28725
|
StrengthValues: val === null || val === void 0 ? void 0 : (_val$StrengthValuesPo = val.StrengthValuesPossible) === null || _val$StrengthValuesPo === void 0 ? void 0 : (_val$StrengthValuesPo2 = _val$StrengthValuesPo[0]) === null || _val$StrengthValuesPo2 === void 0 ? void 0 : _val$StrengthValuesPo2.StrengthValue,
|
|
28759
28726
|
StrengthUOM: val === null || val === void 0 ? void 0 : (_val$StrengthValuesPo3 = val.StrengthValuesPossible) === null || _val$StrengthValuesPo3 === void 0 ? void 0 : (_val$StrengthValuesPo4 = _val$StrengthValuesPo3[0]) === null || _val$StrengthValuesPo4 === void 0 ? void 0 : _val$StrengthValuesPo4.StrengthUOM,
|
|
28760
28727
|
drugType: val === null || val === void 0 ? void 0 : (_val$DrugType = val.DrugType) === null || _val$DrugType === void 0 ? void 0 : _val$DrugType.drugtype,
|
|
28761
|
-
|
|
28728
|
+
drugTypeLong: val === null || val === void 0 ? void 0 : (_val$DrugType2 = val.DrugType) === null || _val$DrugType2 === void 0 ? void 0 : _val$DrugType2.longdesc,
|
|
28729
|
+
drugTypeShort: val === null || val === void 0 ? void 0 : (_val$DrugType3 = val.DrugType) === null || _val$DrugType3 === void 0 ? void 0 : _val$DrugType3.shortdesc,
|
|
28730
|
+
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id // formValue
|
|
28762
28731
|
|
|
28763
28732
|
};
|
|
28764
28733
|
arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
|
|
@@ -30964,7 +30933,7 @@ var queries$4 = {
|
|
|
30964
30933
|
db_name: "primarycare",
|
|
30965
30934
|
entity: "CA_OrderLine",
|
|
30966
30935
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='TREAT' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
30967
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN DOCUMENT(doc._from)),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
|
|
30936
|
+
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)}))})"
|
|
30968
30937
|
};
|
|
30969
30938
|
},
|
|
30970
30939
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -32876,7 +32845,7 @@ var queries$3 = (_queries = {
|
|
|
32876
32845
|
db_name: "primarycare",
|
|
32877
32846
|
entity: "CA_OrderLine",
|
|
32878
32847
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='RAD' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
32879
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN DOCUMENT(doc._from)),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
|
|
32848
|
+
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)}))})"
|
|
32880
32849
|
};
|
|
32881
32850
|
},
|
|
32882
32851
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -36704,43 +36673,45 @@ var queries$1 = {
|
|
|
36704
36673
|
},
|
|
36705
36674
|
getChartTime: function getChartTime(_ref) {
|
|
36706
36675
|
var id = _ref.id,
|
|
36707
|
-
|
|
36708
|
-
end = _ref.end,
|
|
36676
|
+
date = _ref.date,
|
|
36709
36677
|
type = _ref.type;
|
|
36710
36678
|
|
|
36711
36679
|
if (type === "Specialty") {
|
|
36712
36680
|
return {
|
|
36713
36681
|
db_name: dbName,
|
|
36714
|
-
|
|
36682
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36715
36683
|
filter: {
|
|
36716
|
-
|
|
36717
|
-
|
|
36718
|
-
|
|
36719
|
-
|
|
36684
|
+
speciality: id,
|
|
36685
|
+
orgid: "",
|
|
36686
|
+
practid: "",
|
|
36687
|
+
date: date
|
|
36688
|
+
}
|
|
36720
36689
|
};
|
|
36721
36690
|
}
|
|
36722
36691
|
|
|
36723
36692
|
if (type === "Clinic") {
|
|
36724
36693
|
return {
|
|
36725
36694
|
db_name: dbName,
|
|
36726
|
-
|
|
36695
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36727
36696
|
filter: {
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
|
|
36697
|
+
speciality: "",
|
|
36698
|
+
orgid: id,
|
|
36699
|
+
practid: "",
|
|
36700
|
+
date: date
|
|
36701
|
+
}
|
|
36732
36702
|
};
|
|
36733
36703
|
}
|
|
36734
36704
|
|
|
36735
36705
|
if (type === "Practitioner") {
|
|
36736
36706
|
return {
|
|
36737
36707
|
db_name: dbName,
|
|
36738
|
-
|
|
36708
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36739
36709
|
filter: {
|
|
36740
|
-
|
|
36741
|
-
|
|
36742
|
-
|
|
36743
|
-
|
|
36710
|
+
speciality: "",
|
|
36711
|
+
orgid: "",
|
|
36712
|
+
practid: id,
|
|
36713
|
+
date: date
|
|
36714
|
+
}
|
|
36744
36715
|
};
|
|
36745
36716
|
}
|
|
36746
36717
|
}
|
|
@@ -36765,7 +36736,7 @@ var config$1 = [{
|
|
|
36765
36736
|
return {
|
|
36766
36737
|
_id: _id,
|
|
36767
36738
|
id: id,
|
|
36768
|
-
value:
|
|
36739
|
+
value: _id,
|
|
36769
36740
|
label: makeName((name === null || name === void 0 ? void 0 : name[0]) || {}),
|
|
36770
36741
|
_key: _key
|
|
36771
36742
|
};
|
|
@@ -36837,18 +36808,20 @@ var config$1 = [{
|
|
|
36837
36808
|
sliceName: "updateWaitingTimeChart",
|
|
36838
36809
|
queryName: "getChartTime",
|
|
36839
36810
|
type: "List",
|
|
36840
|
-
url:
|
|
36841
|
-
makeReturnData: function makeReturnData(data) {
|
|
36811
|
+
url: __baseUrl__,
|
|
36812
|
+
makeReturnData: function makeReturnData(data, payload) {
|
|
36813
|
+
var _payload$date;
|
|
36814
|
+
|
|
36842
36815
|
var arrivalCheckin = [];
|
|
36843
36816
|
var checkinTriage = [];
|
|
36844
36817
|
var triageConsultation = [];
|
|
36845
36818
|
var overall = [];
|
|
36846
36819
|
|
|
36847
|
-
if (Array.isArray(data
|
|
36848
|
-
data.
|
|
36849
|
-
checkinTriage.push(
|
|
36850
|
-
triageConsultation.push(
|
|
36851
|
-
overall.push(
|
|
36820
|
+
if (Array.isArray(data)) {
|
|
36821
|
+
data.forEach(function (d) {
|
|
36822
|
+
checkinTriage.push(d.diffbetweenchekintotriage);
|
|
36823
|
+
triageConsultation.push(d.diffbetweentriagedtofinished);
|
|
36824
|
+
overall.push(d.Overallwaitingtime);
|
|
36852
36825
|
});
|
|
36853
36826
|
}
|
|
36854
36827
|
|
|
@@ -36882,7 +36855,9 @@ var config$1 = [{
|
|
|
36882
36855
|
period: "Mins"
|
|
36883
36856
|
}];
|
|
36884
36857
|
return {
|
|
36885
|
-
labels:
|
|
36858
|
+
labels: (_payload$date = payload.date) === null || _payload$date === void 0 ? void 0 : _payload$date.map(function (v) {
|
|
36859
|
+
return moment.unix(v.start).format("hh A");
|
|
36860
|
+
}),
|
|
36886
36861
|
datasets: datasets
|
|
36887
36862
|
};
|
|
36888
36863
|
}
|
|
@@ -36944,7 +36919,7 @@ config$1.forEach(function (c) {
|
|
|
36944
36919
|
|
|
36945
36920
|
case 8:
|
|
36946
36921
|
data = _context.sent;
|
|
36947
|
-
returnData = c.makeReturnData ? c.makeReturnData(data) : data;
|
|
36922
|
+
returnData = c.makeReturnData ? c.makeReturnData(data, payload) : data;
|
|
36948
36923
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState[c.type]), {}, {
|
|
36949
36924
|
data: returnData
|
|
36950
36925
|
}));
|
|
@@ -37278,41 +37253,41 @@ var query$4 = {
|
|
|
37278
37253
|
},
|
|
37279
37254
|
// NURSE
|
|
37280
37255
|
getAppointmentsNurse: function getAppointmentsNurse(data) {
|
|
37281
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true &&
|
|
37256
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\"\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37282
37257
|
},
|
|
37283
37258
|
getFirstVisitsNurse: function getFirstVisitsNurse(data) {
|
|
37284
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true &&
|
|
37259
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37285
37260
|
},
|
|
37286
37261
|
getNewPatientsNurse: function getNewPatientsNurse(data) {
|
|
37287
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n
|
|
37262
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37288
37263
|
},
|
|
37289
37264
|
getOtherVisitsNurse: function getOtherVisitsNurse(data) {
|
|
37290
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true &&
|
|
37265
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37291
37266
|
},
|
|
37292
37267
|
getTodayVisitsNurse: function getTodayVisitsNurse(data) {
|
|
37293
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true &&
|
|
37268
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37294
37269
|
},
|
|
37295
37270
|
getWalkInsNurse: function getWalkInsNurse(data) {
|
|
37296
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true &&
|
|
37271
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37297
37272
|
},
|
|
37298
37273
|
//Doctor
|
|
37299
37274
|
getAppointmentsDoctor: function getAppointmentsDoctor(data) {
|
|
37300
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appointmentType)!='cancelled' && Appointment.
|
|
37275
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37301
37276
|
},
|
|
37302
37277
|
getFirstVisitsDoctor: function getFirstVisitsDoctor(data) {
|
|
37303
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.
|
|
37278
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37304
37279
|
},
|
|
37305
37280
|
getNewPatientsDoctor: function getNewPatientsDoctor(data) {
|
|
37306
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.
|
|
37281
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37307
37282
|
},
|
|
37308
37283
|
getOtherVisitsDoctor: function getOtherVisitsDoctor(data) {
|
|
37309
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.
|
|
37284
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37310
37285
|
},
|
|
37311
37286
|
getTodayVisitsDoctor: function getTodayVisitsDoctor(data) {
|
|
37312
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.
|
|
37287
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, "\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37313
37288
|
},
|
|
37314
37289
|
getWalkInsDoctor: function getWalkInsDoctor(data) {
|
|
37315
|
-
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.
|
|
37290
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
|
|
37316
37291
|
}
|
|
37317
37292
|
};
|
|
37318
37293
|
|