primarycare-binder 1.1.11 → 1.1.15
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 +1098 -568
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8016,7 +8016,7 @@ var query_ids = {
|
|
|
8016
8016
|
"db_name": dbName,
|
|
8017
8017
|
"entity": "Schedule",
|
|
8018
8018
|
"filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
|
|
8019
|
-
"return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment().unix(), " AND slt.activestatus==true sort slt._id asc RETURN slt)})")
|
|
8019
|
+
"return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment().unix(), " AND slt.activestatus==true sort slt._id asc RETURN merge(slt, {DayType: Document(slt.DayType)}))})")
|
|
8020
8020
|
};
|
|
8021
8021
|
} // query: ({ start, end, id }) => ({
|
|
8022
8022
|
// "db_name": dbName,
|
|
@@ -8084,7 +8084,7 @@ var queries$a = {
|
|
|
8084
8084
|
Encounter: "Encounter.appointmentId == [".concat(appointmentId, "]"),
|
|
8085
8085
|
Patient: "Patient.id == Encounter.patient_id"
|
|
8086
8086
|
},
|
|
8087
|
-
|
|
8087
|
+
return_fields: "merge(Encounter,{statusexpand:document(Encounter.status),patient_id:(for p in Patient.identifier return merge(Patient,{identifier:document(p),name:document(Patient.name),telecom:document(Patient.telecom),photo:document(Patient.photo),martialStatus:document(Patient.maritalstatus)}))})"
|
|
8088
8088
|
};
|
|
8089
8089
|
},
|
|
8090
8090
|
visitmodify: {
|
|
@@ -9534,6 +9534,141 @@ var getImgUrl = function getImgUrl(fileId) {
|
|
|
9534
9534
|
return fileId ? "".concat(__imgdownloadBaseUrl__).concat(fileId) : "";
|
|
9535
9535
|
};
|
|
9536
9536
|
|
|
9537
|
+
var deg2rad = function deg2rad(deg) {
|
|
9538
|
+
return deg * (Math.PI / 180);
|
|
9539
|
+
};
|
|
9540
|
+
|
|
9541
|
+
var getDisctanceFromLatLonInKm = function getDisctanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
|
|
9542
|
+
var R = 6371; // Radius of the earth in km
|
|
9543
|
+
|
|
9544
|
+
var dLat = deg2rad(lat2 - lat1); // deg2rad below
|
|
9545
|
+
|
|
9546
|
+
var dLon = deg2rad(lon2 - lon1);
|
|
9547
|
+
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
|
9548
|
+
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
|
9549
|
+
var d = R * c; // Distance in km
|
|
9550
|
+
|
|
9551
|
+
return parseFloat(d).toFixed(2);
|
|
9552
|
+
};
|
|
9553
|
+
|
|
9554
|
+
var getLocation = function getLocation() {
|
|
9555
|
+
return new es6Promise.Promise(function (resolve, reject) {
|
|
9556
|
+
navigator.geolocation.getCurrentPosition(function (position) {
|
|
9557
|
+
var lat = position.coords.latitude;
|
|
9558
|
+
var _long = position.coords.longitude;
|
|
9559
|
+
resolve([false, {
|
|
9560
|
+
lat: lat,
|
|
9561
|
+
"long": _long
|
|
9562
|
+
}]);
|
|
9563
|
+
}, function (error) {
|
|
9564
|
+
resolve([true, error]);
|
|
9565
|
+
});
|
|
9566
|
+
});
|
|
9567
|
+
};
|
|
9568
|
+
|
|
9569
|
+
var getCurrentPosition = /*#__PURE__*/function () {
|
|
9570
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
9571
|
+
var permission, lat, _long2, _yield$getLocation, _yield$getLocation2, err, currLocation;
|
|
9572
|
+
|
|
9573
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
9574
|
+
while (1) {
|
|
9575
|
+
switch (_context2.prev = _context2.next) {
|
|
9576
|
+
case 0:
|
|
9577
|
+
_context2.next = 2;
|
|
9578
|
+
return navigator.permissions.query({
|
|
9579
|
+
name: 'geolocation'
|
|
9580
|
+
})["catch"](function (err) {
|
|
9581
|
+
return {
|
|
9582
|
+
state: 'denied'
|
|
9583
|
+
};
|
|
9584
|
+
});
|
|
9585
|
+
|
|
9586
|
+
case 2:
|
|
9587
|
+
permission = _context2.sent;
|
|
9588
|
+
|
|
9589
|
+
if (!(permission.state !== 'denied')) {
|
|
9590
|
+
_context2.next = 11;
|
|
9591
|
+
break;
|
|
9592
|
+
}
|
|
9593
|
+
|
|
9594
|
+
_context2.next = 6;
|
|
9595
|
+
return getLocation();
|
|
9596
|
+
|
|
9597
|
+
case 6:
|
|
9598
|
+
_yield$getLocation = _context2.sent;
|
|
9599
|
+
_yield$getLocation2 = _slicedToArray(_yield$getLocation, 2);
|
|
9600
|
+
err = _yield$getLocation2[0];
|
|
9601
|
+
currLocation = _yield$getLocation2[1];
|
|
9602
|
+
|
|
9603
|
+
if (!err) {
|
|
9604
|
+
lat = currLocation.lat;
|
|
9605
|
+
_long2 = currLocation["long"];
|
|
9606
|
+
}
|
|
9607
|
+
|
|
9608
|
+
case 11:
|
|
9609
|
+
return _context2.abrupt("return", {
|
|
9610
|
+
lat: lat,
|
|
9611
|
+
"long": _long2
|
|
9612
|
+
});
|
|
9613
|
+
|
|
9614
|
+
case 12:
|
|
9615
|
+
case "end":
|
|
9616
|
+
return _context2.stop();
|
|
9617
|
+
}
|
|
9618
|
+
}
|
|
9619
|
+
}, _callee2);
|
|
9620
|
+
}));
|
|
9621
|
+
|
|
9622
|
+
return function getCurrentPosition() {
|
|
9623
|
+
return _ref4.apply(this, arguments);
|
|
9624
|
+
};
|
|
9625
|
+
}();
|
|
9626
|
+
|
|
9627
|
+
var getLatLong = /*#__PURE__*/function () {
|
|
9628
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(city) {
|
|
9629
|
+
var _resp$results, _resp$results$, _resp$results$$geomet, _resp$results$$geomet2, _resp$results2, _resp$results2$, _resp$results2$$geome, _resp$results2$$geome2;
|
|
9630
|
+
|
|
9631
|
+
var url, data, resp, lat, _long3, _resp$results3, _resp$results3$, _resp$results3$$geome, _resp$results3$$geome2, _resp$results4, _resp$results4$, _resp$results4$$geome, _resp$results4$$geome2;
|
|
9632
|
+
|
|
9633
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
9634
|
+
while (1) {
|
|
9635
|
+
switch (_context3.prev = _context3.next) {
|
|
9636
|
+
case 0:
|
|
9637
|
+
url = "https://maps.googleapis.com/maps/api/geocode/json?address=".concat(city, "&key=AIzaSyBqeACJgp12OLU6EkHeUtFgya2naH1LhrU");
|
|
9638
|
+
_context3.next = 3;
|
|
9639
|
+
return fetch(url);
|
|
9640
|
+
|
|
9641
|
+
case 3:
|
|
9642
|
+
data = _context3.sent;
|
|
9643
|
+
_context3.next = 6;
|
|
9644
|
+
return data.json();
|
|
9645
|
+
|
|
9646
|
+
case 6:
|
|
9647
|
+
resp = _context3.sent;
|
|
9648
|
+
|
|
9649
|
+
if ((resp === null || resp === void 0 ? void 0 : (_resp$results = resp.results) === null || _resp$results === void 0 ? void 0 : (_resp$results$ = _resp$results[0]) === null || _resp$results$ === void 0 ? void 0 : (_resp$results$$geomet = _resp$results$.geometry) === null || _resp$results$$geomet === void 0 ? void 0 : (_resp$results$$geomet2 = _resp$results$$geomet.location) === null || _resp$results$$geomet2 === void 0 ? void 0 : _resp$results$$geomet2.lat) && (resp === null || resp === void 0 ? void 0 : (_resp$results2 = resp.results) === null || _resp$results2 === void 0 ? void 0 : (_resp$results2$ = _resp$results2[0]) === null || _resp$results2$ === void 0 ? void 0 : (_resp$results2$$geome = _resp$results2$.geometry) === null || _resp$results2$$geome === void 0 ? void 0 : (_resp$results2$$geome2 = _resp$results2$$geome.location) === null || _resp$results2$$geome2 === void 0 ? void 0 : _resp$results2$$geome2.lng)) {
|
|
9650
|
+
lat = resp === null || resp === void 0 ? void 0 : (_resp$results3 = resp.results) === null || _resp$results3 === void 0 ? void 0 : (_resp$results3$ = _resp$results3[0]) === null || _resp$results3$ === void 0 ? void 0 : (_resp$results3$$geome = _resp$results3$.geometry) === null || _resp$results3$$geome === void 0 ? void 0 : (_resp$results3$$geome2 = _resp$results3$$geome.location) === null || _resp$results3$$geome2 === void 0 ? void 0 : _resp$results3$$geome2.lat;
|
|
9651
|
+
_long3 = resp === null || resp === void 0 ? void 0 : (_resp$results4 = resp.results) === null || _resp$results4 === void 0 ? void 0 : (_resp$results4$ = _resp$results4[0]) === null || _resp$results4$ === void 0 ? void 0 : (_resp$results4$$geome = _resp$results4$.geometry) === null || _resp$results4$$geome === void 0 ? void 0 : (_resp$results4$$geome2 = _resp$results4$$geome.location) === null || _resp$results4$$geome2 === void 0 ? void 0 : _resp$results4$$geome2.lng;
|
|
9652
|
+
}
|
|
9653
|
+
|
|
9654
|
+
return _context3.abrupt("return", {
|
|
9655
|
+
lat: lat,
|
|
9656
|
+
"long": _long3
|
|
9657
|
+
});
|
|
9658
|
+
|
|
9659
|
+
case 9:
|
|
9660
|
+
case "end":
|
|
9661
|
+
return _context3.stop();
|
|
9662
|
+
}
|
|
9663
|
+
}
|
|
9664
|
+
}, _callee3);
|
|
9665
|
+
}));
|
|
9666
|
+
|
|
9667
|
+
return function getLatLong(_x2) {
|
|
9668
|
+
return _ref5.apply(this, arguments);
|
|
9669
|
+
};
|
|
9670
|
+
}();
|
|
9671
|
+
|
|
9537
9672
|
var _extraReducers$C;
|
|
9538
9673
|
var __options$8 = {
|
|
9539
9674
|
method: "POST",
|
|
@@ -10636,7 +10771,7 @@ var APPOINTMENT_UPDATE = createAsyncThunk("appointmentReducer/updateAppointment"
|
|
|
10636
10771
|
break;
|
|
10637
10772
|
}
|
|
10638
10773
|
|
|
10639
|
-
throw new Error(data.error && (typeof data.error === "string" ? data.error : data.message));
|
|
10774
|
+
throw new Error(data.error && (typeof data.error === "string" ? data.error : data.message || data.errorMessage));
|
|
10640
10775
|
|
|
10641
10776
|
case 9:
|
|
10642
10777
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -13521,9 +13656,10 @@ var practitionerReducer$1 = practitionerReducer.reducer;
|
|
|
13521
13656
|
|
|
13522
13657
|
var _extraReducers$x;
|
|
13523
13658
|
|
|
13524
|
-
|
|
13659
|
+
|
|
13660
|
+
var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
13525
13661
|
var payload,
|
|
13526
|
-
|
|
13662
|
+
_ref3,
|
|
13527
13663
|
rejectWithValue,
|
|
13528
13664
|
date,
|
|
13529
13665
|
startTime,
|
|
@@ -13538,15 +13674,16 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13538
13674
|
data,
|
|
13539
13675
|
returnData,
|
|
13540
13676
|
allLangs,
|
|
13541
|
-
|
|
13677
|
+
allCities,
|
|
13678
|
+
_args2 = arguments;
|
|
13542
13679
|
|
|
13543
|
-
return regeneratorRuntime.wrap(function
|
|
13680
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13544
13681
|
while (1) {
|
|
13545
|
-
switch (
|
|
13682
|
+
switch (_context2.prev = _context2.next) {
|
|
13546
13683
|
case 0:
|
|
13547
|
-
payload =
|
|
13548
|
-
|
|
13549
|
-
|
|
13684
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
13685
|
+
_ref3 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref3.rejectWithValue;
|
|
13686
|
+
_context2.prev = 2;
|
|
13550
13687
|
date = new Date();
|
|
13551
13688
|
|
|
13552
13689
|
if (payload.date) {
|
|
@@ -13597,15 +13734,16 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13597
13734
|
// }
|
|
13598
13735
|
|
|
13599
13736
|
|
|
13600
|
-
|
|
13737
|
+
_context2.next = 12;
|
|
13601
13738
|
return fetchData$3({
|
|
13602
13739
|
body: JSON.stringify(body)
|
|
13603
13740
|
});
|
|
13604
13741
|
|
|
13605
13742
|
case 12:
|
|
13606
|
-
data =
|
|
13743
|
+
data = _context2.sent;
|
|
13607
13744
|
returnData = [];
|
|
13608
13745
|
allLangs = new Set();
|
|
13746
|
+
allCities = new Set();
|
|
13609
13747
|
|
|
13610
13748
|
if (Array.isArray(data) && Array.isArray(data[0])) {
|
|
13611
13749
|
data[0].forEach(function (record) {
|
|
@@ -13617,7 +13755,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13617
13755
|
restData = _objectWithoutProperties(record, ["OrgType", "id", "_id", "displayresource"]);
|
|
13618
13756
|
|
|
13619
13757
|
if (displayresource) {
|
|
13620
|
-
var _OrgType$some, _restData$
|
|
13758
|
+
var _OrgType$some, _restData$address, _restData$address$, _restData$hospital2, _restData$hospital2$a, _restData$hospital2$a2, _restData$locationID, _restData$hospital3, _OrgType$, _restData$hospital4, _restData$hospital4$O, _restData$hospital5;
|
|
13621
13759
|
|
|
13622
13760
|
var resourceInfo = {
|
|
13623
13761
|
resourcetype: "",
|
|
@@ -13669,6 +13807,8 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13669
13807
|
// isClinic,
|
|
13670
13808
|
// );
|
|
13671
13809
|
|
|
13810
|
+
var city = (restData === null || restData === void 0 ? void 0 : (_restData$address = restData.address) === null || _restData$address === void 0 ? void 0 : (_restData$address$ = _restData$address[0]) === null || _restData$address$ === void 0 ? void 0 : _restData$address$.city) || (restData === null || restData === void 0 ? void 0 : (_restData$hospital2 = restData.hospital) === null || _restData$hospital2 === void 0 ? void 0 : (_restData$hospital2$a = _restData$hospital2.address) === null || _restData$hospital2$a === void 0 ? void 0 : (_restData$hospital2$a2 = _restData$hospital2$a[0]) === null || _restData$hospital2$a2 === void 0 ? void 0 : _restData$hospital2$a2.city) || "";
|
|
13811
|
+
allCities.add(city);
|
|
13672
13812
|
var info = {
|
|
13673
13813
|
clinicId: (restData === null || restData === void 0 ? void 0 : (_restData$locationID = restData.locationID) === null || _restData$locationID === void 0 ? void 0 : _restData$locationID.id) || 0,
|
|
13674
13814
|
id: id,
|
|
@@ -13683,6 +13823,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13683
13823
|
hospitalName: "",
|
|
13684
13824
|
hospitalLocation: "",
|
|
13685
13825
|
kms: "0 Kms",
|
|
13826
|
+
city: city,
|
|
13686
13827
|
weekCalendar: payload.date && payload.date * 1000 || Date.now(),
|
|
13687
13828
|
isAllSession: isClinic,
|
|
13688
13829
|
allSession: allSession,
|
|
@@ -13696,15 +13837,15 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13696
13837
|
resourceInfo: resourceInfo,
|
|
13697
13838
|
specialities: [],
|
|
13698
13839
|
healthCareId: healthCareId,
|
|
13699
|
-
orgId: isClinic ? id : restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13700
|
-
orgType: isClinic ? OrgType === null || OrgType === void 0 ? void 0 : (_OrgType$ = OrgType[0]) === null || _OrgType$ === void 0 ? void 0 : _OrgType$._id : restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13701
|
-
org_Id: isClinic ? _id : restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13840
|
+
orgId: isClinic ? id : restData === null || restData === void 0 ? void 0 : (_restData$hospital3 = restData.hospital) === null || _restData$hospital3 === void 0 ? void 0 : _restData$hospital3.id,
|
|
13841
|
+
orgType: isClinic ? OrgType === null || OrgType === void 0 ? void 0 : (_OrgType$ = OrgType[0]) === null || _OrgType$ === void 0 ? void 0 : _OrgType$._id : restData === null || restData === void 0 ? void 0 : (_restData$hospital4 = restData.hospital) === null || _restData$hospital4 === void 0 ? void 0 : (_restData$hospital4$O = _restData$hospital4.OrgType) === null || _restData$hospital4$O === void 0 ? void 0 : _restData$hospital4$O[0],
|
|
13842
|
+
org_Id: isClinic ? _id : restData === null || restData === void 0 ? void 0 : (_restData$hospital5 = restData.hospital) === null || _restData$hospital5 === void 0 ? void 0 : _restData$hospital5._id,
|
|
13702
13843
|
_id: isClinic ? _id : restData === null || restData === void 0 ? void 0 : restData._id,
|
|
13703
13844
|
_key: restData === null || restData === void 0 ? void 0 : restData._key
|
|
13704
13845
|
};
|
|
13705
13846
|
|
|
13706
13847
|
if (isClinic) {
|
|
13707
|
-
var _restData$clinics5, _restData$clinics5$, _s$Type, _restData$locationID2, _restData$
|
|
13848
|
+
var _restData$clinics5, _restData$clinics5$, _s$Type, _restData$locationID2, _restData$address2, _restData$address2$, _restData$address3, _restData$address3$, _restData$Practitione, _restData$address4, _restData$address4$, _restData$locationID3, _restData$locationID4, _restData$locationID5;
|
|
13708
13849
|
|
|
13709
13850
|
var s = restData === null || restData === void 0 ? void 0 : (_restData$clinics5 = restData.clinics) === null || _restData$clinics5 === void 0 ? void 0 : (_restData$clinics5$ = _restData$clinics5[0]) === null || _restData$clinics5$ === void 0 ? void 0 : _restData$clinics5$.Specialties;
|
|
13710
13851
|
|
|
@@ -13725,8 +13866,8 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13725
13866
|
|
|
13726
13867
|
info["name"] = (restData === null || restData === void 0 ? void 0 : (_restData$locationID2 = restData.locationID) === null || _restData$locationID2 === void 0 ? void 0 : _restData$locationID2.shortdesc) || "";
|
|
13727
13868
|
info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : restData.name) || "";
|
|
13728
|
-
info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13729
|
-
info["title"] = (restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13869
|
+
info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address2 = restData.address) === null || _restData$address2 === void 0 ? void 0 : (_restData$address2$ = _restData$address2[0]) === null || _restData$address2$ === void 0 ? void 0 : _restData$address2$.line) || "";
|
|
13870
|
+
info["title"] = (restData === null || restData === void 0 ? void 0 : (_restData$address3 = restData.address) === null || _restData$address3 === void 0 ? void 0 : (_restData$address3$ = _restData$address3[0]) === null || _restData$address3$ === void 0 ? void 0 : _restData$address3$.line) || "";
|
|
13730
13871
|
info["gender"] = null;
|
|
13731
13872
|
info["memberIncludes"] = restData === null || restData === void 0 ? void 0 : restData.member_count;
|
|
13732
13873
|
info["memberIncludesImg"] = restData === null || restData === void 0 ? void 0 : (_restData$Practitione = restData.Practitioner) === null || _restData$Practitione === void 0 ? void 0 : _restData$Practitione.map(function (p) {
|
|
@@ -13738,11 +13879,11 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13738
13879
|
|
|
13739
13880
|
return "";
|
|
13740
13881
|
});
|
|
13741
|
-
info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13882
|
+
info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address4 = restData.address) === null || _restData$address4 === void 0 ? void 0 : (_restData$address4$ = _restData$address4[0]) === null || _restData$address4$ === void 0 ? void 0 : _restData$address4$.distance) ? "".concat(restData.address[0].distance) : "0";
|
|
13742
13883
|
info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
|
|
13743
13884
|
info["img"] = getImgUrl(restData === null || restData === void 0 ? void 0 : (_restData$locationID3 = restData.locationID) === null || _restData$locationID3 === void 0 ? void 0 : (_restData$locationID4 = _restData$locationID3.photo) === null || _restData$locationID4 === void 0 ? void 0 : (_restData$locationID5 = _restData$locationID4[0]) === null || _restData$locationID5 === void 0 ? void 0 : _restData$locationID5.fileid);
|
|
13744
13885
|
} else {
|
|
13745
|
-
var _restData$gender, _restData$gender$codi, _restData$gender$codi2, _restData$Specialties, _restData$communicati, _restData$
|
|
13886
|
+
var _restData$gender, _restData$gender$codi, _restData$gender$codi2, _restData$Specialties, _restData$communicati, _restData$hospital6, _restData$qualificati, _restData$qualificati2, _restData$qualificati3, _restData$hospital7, _restData$address5, _restData$address5$, _restData$name, _restData$photo, _restData$photo$, _restData$address6, _restData$address6$;
|
|
13746
13887
|
|
|
13747
13888
|
var gender = (restData === null || restData === void 0 ? void 0 : (_restData$gender = restData.gender) === null || _restData$gender === void 0 ? void 0 : (_restData$gender$codi = _restData$gender.coding) === null || _restData$gender$codi === void 0 ? void 0 : (_restData$gender$codi2 = _restData$gender$codi[0]) === null || _restData$gender$codi2 === void 0 ? void 0 : _restData$gender$codi2.display) || "";
|
|
13748
13889
|
var designation = "";
|
|
@@ -13782,17 +13923,17 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13782
13923
|
});
|
|
13783
13924
|
info["title"] = "".concat(gender).concat(gender && " | ").concat(designation);
|
|
13784
13925
|
info["gender"] = gender;
|
|
13785
|
-
info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13926
|
+
info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : _restData$hospital6.id;
|
|
13786
13927
|
info["subtext"] = (restData === null || restData === void 0 ? void 0 : (_restData$qualificati = restData.qualification) === null || _restData$qualificati === void 0 ? void 0 : (_restData$qualificati2 = _restData$qualificati.map) === null || _restData$qualificati2 === void 0 ? void 0 : (_restData$qualificati3 = _restData$qualificati2.call(_restData$qualificati, function (q) {
|
|
13787
13928
|
return (q === null || q === void 0 ? void 0 : q.name) || "";
|
|
13788
13929
|
})) === null || _restData$qualificati3 === void 0 ? void 0 : _restData$qualificati3.join(", ")) || "MBBS";
|
|
13789
13930
|
info["language"] = languages.size > 0 ? _toConsumableArray(languages) : [];
|
|
13790
|
-
info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13791
|
-
info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13931
|
+
info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital7 = restData.hospital) === null || _restData$hospital7 === void 0 ? void 0 : _restData$hospital7.name) || "";
|
|
13932
|
+
info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address5 = restData.address) === null || _restData$address5 === void 0 ? void 0 : (_restData$address5$ = _restData$address5[0]) === null || _restData$address5$ === void 0 ? void 0 : _restData$address5$.line) || "";
|
|
13792
13933
|
var nameObj = (restData === null || restData === void 0 ? void 0 : (_restData$name = restData.name) === null || _restData$name === void 0 ? void 0 : _restData$name[0]) || {};
|
|
13793
13934
|
info["name"] = makeName(nameObj);
|
|
13794
13935
|
info["img"] = getImgUrl(restData === null || restData === void 0 ? void 0 : (_restData$photo = restData.photo) === null || _restData$photo === void 0 ? void 0 : (_restData$photo$ = _restData$photo[0]) === null || _restData$photo$ === void 0 ? void 0 : _restData$photo$.fileid);
|
|
13795
|
-
info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$
|
|
13936
|
+
info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address6 = restData.address) === null || _restData$address6 === void 0 ? void 0 : (_restData$address6$ = _restData$address6[0]) === null || _restData$address6$ === void 0 ? void 0 : _restData$address6$.distance) ? "".concat(restData.address[0].distance) : "0";
|
|
13796
13937
|
info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
|
|
13797
13938
|
}
|
|
13798
13939
|
|
|
@@ -13800,27 +13941,39 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13800
13941
|
}
|
|
13801
13942
|
}
|
|
13802
13943
|
});
|
|
13803
|
-
}
|
|
13944
|
+
} // const {
|
|
13945
|
+
// lat: myLat,
|
|
13946
|
+
// long: myLong,
|
|
13947
|
+
// } = getCurrentPosition();
|
|
13948
|
+
// const locationInfo = {};
|
|
13949
|
+
// if (myLat && myLong) {
|
|
13950
|
+
// const promArr = [...allCities].map(city => getLocationInfo({lat: myLat, long: myLong}, city, locationInfo));
|
|
13951
|
+
// await Promise.all(promArr);
|
|
13952
|
+
// returnData.forEach(d => {
|
|
13953
|
+
// d.kms = locationInfo[d.city] || "0 Kms";
|
|
13954
|
+
// })
|
|
13955
|
+
// }
|
|
13804
13956
|
|
|
13805
|
-
|
|
13957
|
+
|
|
13958
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
13806
13959
|
data: returnData,
|
|
13807
13960
|
allLangs: _toConsumableArray(allLangs)
|
|
13808
13961
|
}));
|
|
13809
13962
|
|
|
13810
|
-
case
|
|
13811
|
-
|
|
13812
|
-
|
|
13813
|
-
console.log(
|
|
13814
|
-
return
|
|
13815
|
-
message:
|
|
13963
|
+
case 20:
|
|
13964
|
+
_context2.prev = 20;
|
|
13965
|
+
_context2.t0 = _context2["catch"](2);
|
|
13966
|
+
console.log(_context2.t0);
|
|
13967
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
13968
|
+
message: _context2.t0.message
|
|
13816
13969
|
})));
|
|
13817
13970
|
|
|
13818
|
-
case
|
|
13971
|
+
case 24:
|
|
13819
13972
|
case "end":
|
|
13820
|
-
return
|
|
13973
|
+
return _context2.stop();
|
|
13821
13974
|
}
|
|
13822
13975
|
}
|
|
13823
|
-
},
|
|
13976
|
+
}, _callee2, null, [[2, 20]]);
|
|
13824
13977
|
}))); // end
|
|
13825
13978
|
// FUZZY SEARCH CREATE INITIALSTATE
|
|
13826
13979
|
|
|
@@ -14105,6 +14258,9 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
|
|
|
14105
14258
|
location,
|
|
14106
14259
|
body,
|
|
14107
14260
|
data,
|
|
14261
|
+
_yield$getCurrentPosi,
|
|
14262
|
+
lat,
|
|
14263
|
+
_long,
|
|
14108
14264
|
returnData,
|
|
14109
14265
|
_args4 = arguments;
|
|
14110
14266
|
|
|
@@ -14115,7 +14271,7 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
|
|
|
14115
14271
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
14116
14272
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
14117
14273
|
_context4.prev = 2;
|
|
14118
|
-
_payload$city2 = payload.city, city = _payload$city2 === void 0 ? "" : _payload$city2, _payload$location = payload.location, location = _payload$location === void 0 ?
|
|
14274
|
+
_payload$city2 = payload.city, city = _payload$city2 === void 0 ? "" : _payload$city2, _payload$location = payload.location, location = _payload$location === void 0 ? {} : _payload$location;
|
|
14119
14275
|
body = {
|
|
14120
14276
|
db_name: dbName,
|
|
14121
14277
|
queryid: query_ids["searhcApiSlice/getHospitals"],
|
|
@@ -14133,6 +14289,13 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
|
|
|
14133
14289
|
|
|
14134
14290
|
case 7:
|
|
14135
14291
|
data = _context4.sent;
|
|
14292
|
+
_context4.next = 10;
|
|
14293
|
+
return getCurrentPosition();
|
|
14294
|
+
|
|
14295
|
+
case 10:
|
|
14296
|
+
_yield$getCurrentPosi = _context4.sent;
|
|
14297
|
+
lat = _yield$getCurrentPosi.lat;
|
|
14298
|
+
_long = _yield$getCurrentPosi["long"];
|
|
14136
14299
|
returnData = [];
|
|
14137
14300
|
|
|
14138
14301
|
if (Array.isArray(data)) {
|
|
@@ -14140,11 +14303,18 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
|
|
|
14140
14303
|
if (hospInfo.id && hospInfo.name) {
|
|
14141
14304
|
var _hospInfo$address, _hospInfo$address2;
|
|
14142
14305
|
|
|
14306
|
+
var distance = "";
|
|
14307
|
+
|
|
14308
|
+
if (lat && _long) {
|
|
14309
|
+
distance = getDisctanceFromLatLonInKm(lat, _long, location.latitude, location.longitude) + " KM";
|
|
14310
|
+
}
|
|
14311
|
+
|
|
14143
14312
|
returnData.push({
|
|
14144
14313
|
value: hospInfo.id,
|
|
14145
14314
|
label: hospInfo.name,
|
|
14146
14315
|
lat: hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address = hospInfo.address) === null || _hospInfo$address === void 0 ? void 0 : _hospInfo$address.latitude,
|
|
14147
|
-
"long": hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address2 = hospInfo.address) === null || _hospInfo$address2 === void 0 ? void 0 : _hospInfo$address2.longitude
|
|
14316
|
+
"long": hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address2 = hospInfo.address) === null || _hospInfo$address2 === void 0 ? void 0 : _hospInfo$address2.longitude,
|
|
14317
|
+
distance: distance
|
|
14148
14318
|
});
|
|
14149
14319
|
}
|
|
14150
14320
|
});
|
|
@@ -14154,19 +14324,19 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
|
|
|
14154
14324
|
data: returnData
|
|
14155
14325
|
}));
|
|
14156
14326
|
|
|
14157
|
-
case
|
|
14158
|
-
_context4.prev =
|
|
14327
|
+
case 18:
|
|
14328
|
+
_context4.prev = 18;
|
|
14159
14329
|
_context4.t0 = _context4["catch"](2);
|
|
14160
14330
|
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
14161
14331
|
message: _context4.t0.message
|
|
14162
14332
|
})));
|
|
14163
14333
|
|
|
14164
|
-
case
|
|
14334
|
+
case 21:
|
|
14165
14335
|
case "end":
|
|
14166
14336
|
return _context4.stop();
|
|
14167
14337
|
}
|
|
14168
14338
|
}
|
|
14169
|
-
}, _callee4, null, [[2,
|
|
14339
|
+
}, _callee4, null, [[2, 18]]);
|
|
14170
14340
|
})));
|
|
14171
14341
|
var GET_SYMPTOMS = createAsyncThunk("searhcApiSlice/getSymptoms", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
14172
14342
|
var payload,
|
|
@@ -14552,26 +14722,82 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
|
|
|
14552
14722
|
}
|
|
14553
14723
|
}, _callee10, null, [[2, 12]]);
|
|
14554
14724
|
})));
|
|
14555
|
-
|
|
14725
|
+
|
|
14726
|
+
var getLocationInfo = /*#__PURE__*/function () {
|
|
14727
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
14728
|
+
var _hospInfo$address3, _hospInfo$address3$, _hospInfo$address3$$c;
|
|
14729
|
+
|
|
14730
|
+
var hospInfo,
|
|
14731
|
+
obj,
|
|
14732
|
+
city,
|
|
14733
|
+
info,
|
|
14734
|
+
_args11 = arguments;
|
|
14735
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
14736
|
+
while (1) {
|
|
14737
|
+
switch (_context11.prev = _context11.next) {
|
|
14738
|
+
case 0:
|
|
14739
|
+
hospInfo = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
14740
|
+
obj = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
|
|
14741
|
+
city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address3 = hospInfo.address) === null || _hospInfo$address3 === void 0 ? void 0 : (_hospInfo$address3$ = _hospInfo$address3[0]) === null || _hospInfo$address3$ === void 0 ? void 0 : (_hospInfo$address3$$c = _hospInfo$address3$.city) === null || _hospInfo$address3$$c === void 0 ? void 0 : _hospInfo$address3$$c.geogLevelName;
|
|
14742
|
+
|
|
14743
|
+
if (obj[city]) {
|
|
14744
|
+
_context11.next = 8;
|
|
14745
|
+
break;
|
|
14746
|
+
}
|
|
14747
|
+
|
|
14748
|
+
_context11.next = 6;
|
|
14749
|
+
return getLatLong(city);
|
|
14750
|
+
|
|
14751
|
+
case 6:
|
|
14752
|
+
info = _context11.sent;
|
|
14753
|
+
obj[city] = info;
|
|
14754
|
+
|
|
14755
|
+
case 8:
|
|
14756
|
+
case "end":
|
|
14757
|
+
return _context11.stop();
|
|
14758
|
+
}
|
|
14759
|
+
}
|
|
14760
|
+
}, _callee11);
|
|
14761
|
+
}));
|
|
14762
|
+
|
|
14763
|
+
return function getLocationInfo() {
|
|
14764
|
+
return _ref21.apply(this, arguments);
|
|
14765
|
+
};
|
|
14766
|
+
}();
|
|
14767
|
+
|
|
14768
|
+
var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
14556
14769
|
var payload,
|
|
14557
|
-
|
|
14770
|
+
_ref23,
|
|
14558
14771
|
rejectWithValue,
|
|
14559
14772
|
_payload$practitioner,
|
|
14560
14773
|
practitionerId,
|
|
14774
|
+
_yield$getCurrentPosi2,
|
|
14775
|
+
myLat,
|
|
14776
|
+
myLong,
|
|
14561
14777
|
body,
|
|
14562
14778
|
data,
|
|
14563
14779
|
returnData,
|
|
14564
14780
|
_data$result,
|
|
14565
|
-
|
|
14781
|
+
_data$result2,
|
|
14782
|
+
cityMap,
|
|
14783
|
+
promArr,
|
|
14784
|
+
_args12 = arguments;
|
|
14566
14785
|
|
|
14567
|
-
return regeneratorRuntime.wrap(function
|
|
14786
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
14568
14787
|
while (1) {
|
|
14569
|
-
switch (
|
|
14788
|
+
switch (_context12.prev = _context12.next) {
|
|
14570
14789
|
case 0:
|
|
14571
|
-
payload =
|
|
14572
|
-
|
|
14573
|
-
|
|
14790
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
14791
|
+
_ref23 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
|
|
14792
|
+
_context12.prev = 2;
|
|
14574
14793
|
_payload$practitioner = payload.practitionerId, practitionerId = _payload$practitioner === void 0 ? "" : _payload$practitioner;
|
|
14794
|
+
_context12.next = 6;
|
|
14795
|
+
return getCurrentPosition();
|
|
14796
|
+
|
|
14797
|
+
case 6:
|
|
14798
|
+
_yield$getCurrentPosi2 = _context12.sent;
|
|
14799
|
+
myLat = _yield$getCurrentPosi2.lat;
|
|
14800
|
+
myLong = _yield$getCurrentPosi2["long"];
|
|
14575
14801
|
body = {
|
|
14576
14802
|
db_name: dbName,
|
|
14577
14803
|
entity: "Practitioner,Organization",
|
|
@@ -14579,45 +14805,72 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
|
|
|
14579
14805
|
Practitioner: "Practitioner.id==".concat(practitionerId),
|
|
14580
14806
|
Organization: "document(Practitioner.practitioner_role)[*].OrgID any == Organization._id"
|
|
14581
14807
|
},
|
|
14582
|
-
return_fields: "{OrganizationName:Organization.name, OrgID:Organization.id}"
|
|
14808
|
+
return_fields: "{address: (let add = Document(Organization.address[0]) return merge(add, { city: Document(add.city) })), OrganizationName:Organization.name, OrgID:Organization.id}"
|
|
14583
14809
|
};
|
|
14584
|
-
|
|
14810
|
+
_context12.next = 12;
|
|
14585
14811
|
return fetchData$3({
|
|
14586
14812
|
body: JSON.stringify(body)
|
|
14587
14813
|
}, __readDocumentUrl__);
|
|
14588
14814
|
|
|
14589
|
-
case
|
|
14590
|
-
data =
|
|
14815
|
+
case 12:
|
|
14816
|
+
data = _context12.sent;
|
|
14591
14817
|
returnData = [];
|
|
14592
14818
|
|
|
14593
|
-
if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
|
|
14594
|
-
|
|
14595
|
-
|
|
14596
|
-
value: hospInfo.OrgID,
|
|
14597
|
-
label: hospInfo.OrganizationName,
|
|
14598
|
-
lat: 0,
|
|
14599
|
-
"long": 0
|
|
14600
|
-
});
|
|
14601
|
-
});
|
|
14819
|
+
if (!Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
|
|
14820
|
+
_context12.next = 20;
|
|
14821
|
+
break;
|
|
14602
14822
|
}
|
|
14603
14823
|
|
|
14604
|
-
|
|
14824
|
+
cityMap = {};
|
|
14825
|
+
promArr = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (hospInfo) {
|
|
14826
|
+
return getLocationInfo(hospInfo, cityMap);
|
|
14827
|
+
});
|
|
14828
|
+
_context12.next = 19;
|
|
14829
|
+
return es6Promise.Promise.all(promArr);
|
|
14830
|
+
|
|
14831
|
+
case 19:
|
|
14832
|
+
data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2.forEach(function (hospInfo) {
|
|
14833
|
+
var _hospInfo$address4, _hospInfo$address4$, _hospInfo$address4$$c;
|
|
14834
|
+
|
|
14835
|
+
var city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address4 = hospInfo.address) === null || _hospInfo$address4 === void 0 ? void 0 : (_hospInfo$address4$ = _hospInfo$address4[0]) === null || _hospInfo$address4$ === void 0 ? void 0 : (_hospInfo$address4$$c = _hospInfo$address4$.city) === null || _hospInfo$address4$$c === void 0 ? void 0 : _hospInfo$address4$$c.geogLevelName;
|
|
14836
|
+
|
|
14837
|
+
var _ref24 = cityMap[city] || {},
|
|
14838
|
+
lat = _ref24.lat,
|
|
14839
|
+
_long2 = _ref24["long"];
|
|
14840
|
+
|
|
14841
|
+
var distance = "";
|
|
14842
|
+
|
|
14843
|
+
if (myLat && myLong && lat && _long2) {
|
|
14844
|
+
distance = getDisctanceFromLatLonInKm(lat, _long2, myLat, myLong) + " KM";
|
|
14845
|
+
}
|
|
14846
|
+
|
|
14847
|
+
returnData.push({
|
|
14848
|
+
value: hospInfo.OrgID,
|
|
14849
|
+
label: hospInfo.OrganizationName,
|
|
14850
|
+
lat: 0,
|
|
14851
|
+
"long": 0,
|
|
14852
|
+
distance: distance
|
|
14853
|
+
});
|
|
14854
|
+
});
|
|
14855
|
+
|
|
14856
|
+
case 20:
|
|
14857
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
14605
14858
|
data: returnData
|
|
14606
14859
|
}));
|
|
14607
14860
|
|
|
14608
|
-
case
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
return
|
|
14612
|
-
message:
|
|
14861
|
+
case 23:
|
|
14862
|
+
_context12.prev = 23;
|
|
14863
|
+
_context12.t0 = _context12["catch"](2);
|
|
14864
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
14865
|
+
message: _context12.t0.message
|
|
14613
14866
|
})));
|
|
14614
14867
|
|
|
14615
|
-
case
|
|
14868
|
+
case 26:
|
|
14616
14869
|
case "end":
|
|
14617
|
-
return
|
|
14870
|
+
return _context12.stop();
|
|
14618
14871
|
}
|
|
14619
14872
|
}
|
|
14620
|
-
},
|
|
14873
|
+
}, _callee12, null, [[2, 23]]);
|
|
14621
14874
|
})));
|
|
14622
14875
|
var searhcApiSlice = createSlice({
|
|
14623
14876
|
name: "searhcApiSlice",
|
|
@@ -18302,7 +18555,7 @@ var dashboardQuery = {
|
|
|
18302
18555
|
entity: "Appointment,Encounter",
|
|
18303
18556
|
filter: {
|
|
18304
18557
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
|
|
18305
|
-
Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id
|
|
18558
|
+
Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
|
|
18306
18559
|
},
|
|
18307
18560
|
return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
|
|
18308
18561
|
},
|
|
@@ -18311,7 +18564,7 @@ var dashboardQuery = {
|
|
|
18311
18564
|
entity: "Appointment,Encounter",
|
|
18312
18565
|
filter: {
|
|
18313
18566
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
|
|
18314
|
-
Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id
|
|
18567
|
+
Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
|
|
18315
18568
|
},
|
|
18316
18569
|
return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
|
|
18317
18570
|
}
|
|
@@ -18323,13 +18576,13 @@ var dashboardQuery = {
|
|
|
18323
18576
|
db_name: dbName,
|
|
18324
18577
|
entity: "Practitioner",
|
|
18325
18578
|
filter: "Practitioner.activestatus==true && document(Practitioner.practitioner_role)[*].role any =='".concat(role, "'&& Practitioner.practitioner_type=='").concat(type, "'"),
|
|
18326
|
-
return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:
|
|
18579
|
+
return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:(for pracrr in PractitionerRole filter pracrr._id in Practitioner.practitioner_role return merge(pracrr,{role:(for cod in CodeableConceptMaster filter cod._id==pracrr.role return document(cod.coding))}))},{photo:document(Practitioner.photo), assignedpatient:LENGTH(FOR Encounter IN Encounter FILTER Encounter.activestatus==true && Encounter.encounterdate>=".concat(start, " && Encounter.encounterdate<=").concat(end, " && Encounter.participant[*].Practitioner_id any == document(Practitioner._id).id return Encounter)})")
|
|
18327
18580
|
},
|
|
18328
18581
|
reassign: {
|
|
18329
18582
|
db_name: dbName,
|
|
18330
18583
|
entity: "Practitioner",
|
|
18331
18584
|
filter: "Practitioner.activestatus==true && document(Practitioner.practitioner_role)[*].role any =='".concat(role, "'&& Practitioner.practitioner_type=='").concat(type, "'"),
|
|
18332
|
-
return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:
|
|
18585
|
+
return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:(for pracrr in PractitionerRole filter pracrr._id in Practitioner.practitioner_role return merge(pracrr,{role:(for cod in CodeableConceptMaster filter cod._id==pracrr.role return document(cod.coding))}))},{photo:document(Practitioner.photo), assignedpatient:LENGTH(FOR Encounter IN Encounter FILTER Encounter.activestatus==true && Encounter.encounterdate>=".concat(start, " && Encounter.encounterdate<=").concat(end, " && Encounter.participant[*].Practitioner_id any == document(Practitioner._id).id return Encounter)})")
|
|
18333
18586
|
}
|
|
18334
18587
|
};
|
|
18335
18588
|
},
|
|
@@ -18431,10 +18684,10 @@ var visitQuery = {
|
|
|
18431
18684
|
return {
|
|
18432
18685
|
1: {
|
|
18433
18686
|
db_name: dbName,
|
|
18434
|
-
entity: "
|
|
18687
|
+
entity: "Appointment,Encounter",
|
|
18435
18688
|
filter: {
|
|
18436
|
-
|
|
18437
|
-
Encounter: "
|
|
18689
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orGId, "' "),
|
|
18690
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length"
|
|
18438
18691
|
},
|
|
18439
18692
|
return_fields: "{CheckedIn:length}"
|
|
18440
18693
|
},
|
|
@@ -18459,10 +18712,10 @@ var visitQuery = {
|
|
|
18459
18712
|
return {
|
|
18460
18713
|
1: {
|
|
18461
18714
|
db_name: dbName,
|
|
18462
|
-
entity: "
|
|
18715
|
+
entity: "Appointment,Encounter",
|
|
18463
18716
|
filter: {
|
|
18464
|
-
|
|
18465
|
-
Encounter: "
|
|
18717
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orGId, "' "),
|
|
18718
|
+
Encounter: "Appointment.id in Encounter.appointmentId && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Triaged' collect with count into length"
|
|
18466
18719
|
},
|
|
18467
18720
|
return_fields: "{TriagedCount:length}"
|
|
18468
18721
|
},
|
|
@@ -18487,10 +18740,10 @@ var visitQuery = {
|
|
|
18487
18740
|
return {
|
|
18488
18741
|
1: {
|
|
18489
18742
|
db_name: "primarycare",
|
|
18490
|
-
entity: "
|
|
18743
|
+
entity: "Appointment,Encounter",
|
|
18491
18744
|
filter: {
|
|
18492
|
-
|
|
18493
|
-
Encounter: "
|
|
18745
|
+
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orGId, "' "),
|
|
18746
|
+
Encounter: "Appointment.id in Encounter.appointmentId && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length"
|
|
18494
18747
|
},
|
|
18495
18748
|
return_fields: "{CompletedCount:length}"
|
|
18496
18749
|
},
|
|
@@ -18561,7 +18814,7 @@ var highPriorityPatientQuery = {
|
|
|
18561
18814
|
1: {
|
|
18562
18815
|
db_name: "primarycare",
|
|
18563
18816
|
entity: "Encounter",
|
|
18564
|
-
filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'"),
|
|
18817
|
+
filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high' AND (lower(DOCUMENT(Encounter.status).display)==lower('Triaged') or lower(DOCUMENT(Encounter.status).display)==lower('In-progress'))"),
|
|
18565
18818
|
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)})"
|
|
18566
18819
|
},
|
|
18567
18820
|
2: {
|
|
@@ -18698,12 +18951,15 @@ var TODAY_SCHEDULE = createAsyncThunk("dashboardApiSlice/today_schedul", /*#__PU
|
|
|
18698
18951
|
return arr.push({
|
|
18699
18952
|
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 : "",
|
|
18700
18953
|
status: (task === null || task === void 0 ? void 0 : task.Appointment.length) > 0 ? false : true,
|
|
18701
|
-
timefrom: (_task$start = task === null || task === void 0 ? void 0 : task.start) !== null && _task$start !== void 0 ? _task$start :
|
|
18702
|
-
timeto: (_task$end = task === null || task === void 0 ? void 0 : task.end) !== null && _task$end !== void 0 ? _task$end :
|
|
18954
|
+
timefrom: (_task$start = task === null || task === void 0 ? void 0 : task.start) !== null && _task$start !== void 0 ? _task$start : 0,
|
|
18955
|
+
timeto: (_task$end = task === null || task === void 0 ? void 0 : task.end) !== null && _task$end !== void 0 ? _task$end : 0,
|
|
18703
18956
|
type: (_task$Type = task === null || task === void 0 ? void 0 : task.Type) !== null && _task$Type !== void 0 ? _task$Type : ""
|
|
18704
18957
|
});
|
|
18705
18958
|
});
|
|
18706
18959
|
});
|
|
18960
|
+
arr.sort(function (a, b) {
|
|
18961
|
+
return Number(a.timefrom) - Number(b.timefrom);
|
|
18962
|
+
});
|
|
18707
18963
|
}
|
|
18708
18964
|
|
|
18709
18965
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -19053,7 +19309,7 @@ var TODAY_VISIT = createAsyncThunk("dashboardApiSlice/today_visit", /*#__PURE__*
|
|
|
19053
19309
|
orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgIdInt = payload.orgIdInt;
|
|
19054
19310
|
_context9.next = 6;
|
|
19055
19311
|
return fetchData$3({
|
|
19056
|
-
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId)[roleId])
|
|
19312
|
+
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
|
|
19057
19313
|
}, __readDocumentUrl__);
|
|
19058
19314
|
|
|
19059
19315
|
case 6:
|
|
@@ -20602,12 +20858,12 @@ var VISIT_CHECKEDIN = createAsyncThunk("visitStatsApiSlice/visitCheckedin", /*#_
|
|
|
20602
20858
|
rejectWithValue,
|
|
20603
20859
|
_data$result$0$Checke,
|
|
20604
20860
|
_data$result$,
|
|
20605
|
-
|
|
20861
|
+
orgIdInt,
|
|
20606
20862
|
startDate,
|
|
20607
20863
|
endDate,
|
|
20608
20864
|
roleId,
|
|
20609
20865
|
loginId,
|
|
20610
|
-
|
|
20866
|
+
orgId,
|
|
20611
20867
|
data,
|
|
20612
20868
|
_args = arguments;
|
|
20613
20869
|
|
|
@@ -20618,10 +20874,10 @@ var VISIT_CHECKEDIN = createAsyncThunk("visitStatsApiSlice/visitCheckedin", /*#_
|
|
|
20618
20874
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
20619
20875
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
20620
20876
|
_context.prev = 2;
|
|
20621
|
-
|
|
20877
|
+
orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
|
|
20622
20878
|
_context.next = 6;
|
|
20623
20879
|
return fetchData$3({
|
|
20624
|
-
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate,
|
|
20880
|
+
body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
|
|
20625
20881
|
}, __readDocumentUrl__);
|
|
20626
20882
|
|
|
20627
20883
|
case 6:
|
|
@@ -20650,14 +20906,14 @@ var VISIT_TRAIGE_DONE = createAsyncThunk("visitStatsApiSlice/visitTraigeCount",
|
|
|
20650
20906
|
var payload,
|
|
20651
20907
|
_ref4,
|
|
20652
20908
|
rejectWithValue,
|
|
20653
|
-
_data$0$
|
|
20654
|
-
_data
|
|
20655
|
-
|
|
20656
|
-
orgId,
|
|
20909
|
+
_data$result$0$Triage,
|
|
20910
|
+
_data$result$2,
|
|
20911
|
+
orgIdInt,
|
|
20657
20912
|
startDate,
|
|
20658
20913
|
endDate,
|
|
20659
20914
|
roleId,
|
|
20660
20915
|
loginId,
|
|
20916
|
+
orgId,
|
|
20661
20917
|
data,
|
|
20662
20918
|
_args2 = arguments;
|
|
20663
20919
|
|
|
@@ -20668,17 +20924,17 @@ var VISIT_TRAIGE_DONE = createAsyncThunk("visitStatsApiSlice/visitTraigeCount",
|
|
|
20668
20924
|
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
20669
20925
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
20670
20926
|
_context2.prev = 2;
|
|
20671
|
-
|
|
20927
|
+
orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
|
|
20672
20928
|
_context2.next = 6;
|
|
20673
20929
|
return fetchData$3({
|
|
20674
|
-
body: JSON.stringify(visitQuery.traigeDone(
|
|
20930
|
+
body: JSON.stringify(visitQuery.traigeDone(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
|
|
20675
20931
|
}, __readDocumentUrl__);
|
|
20676
20932
|
|
|
20677
20933
|
case 6:
|
|
20678
20934
|
data = _context2.sent;
|
|
20679
20935
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20680
20936
|
data: {
|
|
20681
|
-
count: (_data$0$
|
|
20937
|
+
count: (_data$result$0$Triage = data === null || data === void 0 ? void 0 : (_data$result$2 = data.result[0]) === null || _data$result$2 === void 0 ? void 0 : _data$result$2.TriagedCount) !== null && _data$result$0$Triage !== void 0 ? _data$result$0$Triage : 0
|
|
20682
20938
|
}
|
|
20683
20939
|
}));
|
|
20684
20940
|
|
|
@@ -20700,14 +20956,14 @@ var VISIT_COMPLETED = createAsyncThunk("visitStatsApiSlice/visitCompletedCount",
|
|
|
20700
20956
|
var payload,
|
|
20701
20957
|
_ref6,
|
|
20702
20958
|
rejectWithValue,
|
|
20703
|
-
_data$0$
|
|
20704
|
-
_data$
|
|
20705
|
-
|
|
20706
|
-
orgId,
|
|
20959
|
+
_data$result$0$Comple,
|
|
20960
|
+
_data$result$3,
|
|
20961
|
+
orgIdInt,
|
|
20707
20962
|
startDate,
|
|
20708
20963
|
endDate,
|
|
20709
20964
|
roleId,
|
|
20710
20965
|
loginId,
|
|
20966
|
+
orgId,
|
|
20711
20967
|
data,
|
|
20712
20968
|
_args3 = arguments;
|
|
20713
20969
|
|
|
@@ -20718,17 +20974,17 @@ var VISIT_COMPLETED = createAsyncThunk("visitStatsApiSlice/visitCompletedCount",
|
|
|
20718
20974
|
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
20719
20975
|
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
20720
20976
|
_context3.prev = 2;
|
|
20721
|
-
|
|
20977
|
+
orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
|
|
20722
20978
|
_context3.next = 6;
|
|
20723
20979
|
return fetchData$3({
|
|
20724
|
-
body: JSON.stringify(visitQuery.visitCompleted(
|
|
20980
|
+
body: JSON.stringify(visitQuery.visitCompleted(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
|
|
20725
20981
|
}, __readDocumentUrl__);
|
|
20726
20982
|
|
|
20727
20983
|
case 6:
|
|
20728
20984
|
data = _context3.sent;
|
|
20729
20985
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20730
20986
|
data: {
|
|
20731
|
-
count: (_data$0$
|
|
20987
|
+
count: (_data$result$0$Comple = data === null || data === void 0 ? void 0 : (_data$result$3 = data.result[0]) === null || _data$result$3 === void 0 ? void 0 : _data$result$3.CompletedCount) !== null && _data$result$0$Comple !== void 0 ? _data$result$0$Comple : 0
|
|
20732
20988
|
}
|
|
20733
20989
|
}));
|
|
20734
20990
|
|
|
@@ -20750,14 +21006,14 @@ var VISIT_NO_SHOWS = createAsyncThunk("visitStatsApiSlice/visitNoShowCount", /*#
|
|
|
20750
21006
|
var payload,
|
|
20751
21007
|
_ref8,
|
|
20752
21008
|
rejectWithValue,
|
|
20753
|
-
_data$0$
|
|
20754
|
-
_data$
|
|
20755
|
-
|
|
20756
|
-
orgId,
|
|
21009
|
+
_data$result$0$NoShow,
|
|
21010
|
+
_data$result$4,
|
|
21011
|
+
orgIdInt,
|
|
20757
21012
|
startDate,
|
|
20758
21013
|
endDate,
|
|
20759
21014
|
roleId,
|
|
20760
21015
|
loginId,
|
|
21016
|
+
orgId,
|
|
20761
21017
|
data,
|
|
20762
21018
|
_args4 = arguments;
|
|
20763
21019
|
|
|
@@ -20768,17 +21024,17 @@ var VISIT_NO_SHOWS = createAsyncThunk("visitStatsApiSlice/visitNoShowCount", /*#
|
|
|
20768
21024
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
20769
21025
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
20770
21026
|
_context4.prev = 2;
|
|
20771
|
-
|
|
21027
|
+
orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
|
|
20772
21028
|
_context4.next = 6;
|
|
20773
21029
|
return fetchData$3({
|
|
20774
|
-
body: JSON.stringify(visitQuery.noShows(
|
|
21030
|
+
body: JSON.stringify(visitQuery.noShows(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
|
|
20775
21031
|
}, __readDocumentUrl__);
|
|
20776
21032
|
|
|
20777
21033
|
case 6:
|
|
20778
21034
|
data = _context4.sent;
|
|
20779
21035
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20780
21036
|
data: {
|
|
20781
|
-
count: (_data$0$
|
|
21037
|
+
count: (_data$result$0$NoShow = data === null || data === void 0 ? void 0 : (_data$result$4 = data.result[0]) === null || _data$result$4 === void 0 ? void 0 : _data$result$4.NoShowCount) !== null && _data$result$0$NoShow !== void 0 ? _data$result$0$NoShow : 0
|
|
20782
21038
|
}
|
|
20783
21039
|
}));
|
|
20784
21040
|
|
|
@@ -20801,7 +21057,7 @@ var GET_VISIT_STATS = createAsyncThunk("visitStatsApiSlice/visitStatsCount", /*#
|
|
|
20801
21057
|
_ref10,
|
|
20802
21058
|
rejectWithValue,
|
|
20803
21059
|
_data$result$0$Checke2,
|
|
20804
|
-
_data$result$
|
|
21060
|
+
_data$result$5,
|
|
20805
21061
|
_data1$result$0$Triag,
|
|
20806
21062
|
_data1$result,
|
|
20807
21063
|
_data1$result$,
|
|
@@ -20861,7 +21117,7 @@ var GET_VISIT_STATS = createAsyncThunk("visitStatsApiSlice/visitStatsCount", /*#
|
|
|
20861
21117
|
data3 = _context5.sent;
|
|
20862
21118
|
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20863
21119
|
data: {
|
|
20864
|
-
checkedIn: (_data$result$0$Checke2 = data === null || data === void 0 ? void 0 : (_data$result$
|
|
21120
|
+
checkedIn: (_data$result$0$Checke2 = data === null || data === void 0 ? void 0 : (_data$result$5 = data.result[0]) === null || _data$result$5 === void 0 ? void 0 : _data$result$5.CheckedIn) !== null && _data$result$0$Checke2 !== void 0 ? _data$result$0$Checke2 : 0,
|
|
20865
21121
|
traigeDone: (_data1$result$0$Triag = data1 === null || data1 === void 0 ? void 0 : (_data1$result = data1.result) === null || _data1$result === void 0 ? void 0 : (_data1$result$ = _data1$result[0]) === null || _data1$result$ === void 0 ? void 0 : _data1$result$.TriagedCount) !== null && _data1$result$0$Triag !== void 0 ? _data1$result$0$Triag : 0,
|
|
20866
21122
|
visitCompleted: (_data2$result$0$Compl = data2 === null || data2 === void 0 ? void 0 : (_data2$result = data2.result) === null || _data2$result === void 0 ? void 0 : (_data2$result$ = _data2$result[0]) === null || _data2$result$ === void 0 ? void 0 : _data2$result$.CompletedCount) !== null && _data2$result$0$Compl !== void 0 ? _data2$result$0$Compl : 0,
|
|
20867
21123
|
noShow: (_data3$result$0$NoSho = data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : (_data3$result$ = _data3$result[0]) === null || _data3$result$ === void 0 ? void 0 : _data3$result$.NoShowCount) !== null && _data3$result$0$NoSho !== void 0 ? _data3$result$0$NoSho : 0
|
|
@@ -37361,9 +37617,12 @@ var query$4 = {
|
|
|
37361
37617
|
getAppointments: function getAppointments(data) {
|
|
37362
37618
|
return {
|
|
37363
37619
|
db_name: dbName,
|
|
37364
|
-
entity: "Appointment",
|
|
37365
|
-
filter:
|
|
37366
|
-
|
|
37620
|
+
entity: "Appointment,Encounter",
|
|
37621
|
+
filter: {
|
|
37622
|
+
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, " && lower(Appointment.appointmentType)!='cancelled' && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37623
|
+
Encounter: "Appointment.id in Encounter.appointmentId"
|
|
37624
|
+
},
|
|
37625
|
+
return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37367
37626
|
};
|
|
37368
37627
|
},
|
|
37369
37628
|
getFirstVisits: function getFirstVisits(data) {
|
|
@@ -37371,10 +37630,10 @@ var query$4 = {
|
|
|
37371
37630
|
db_name: dbName,
|
|
37372
37631
|
entity: "Appointment,Encounter",
|
|
37373
37632
|
filter: {
|
|
37374
|
-
|
|
37375
|
-
|
|
37633
|
+
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.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37634
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
|
|
37376
37635
|
},
|
|
37377
|
-
|
|
37636
|
+
return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37378
37637
|
};
|
|
37379
37638
|
},
|
|
37380
37639
|
getOtherVisits: function getOtherVisits(data) {
|
|
@@ -37382,10 +37641,10 @@ var query$4 = {
|
|
|
37382
37641
|
db_name: dbName,
|
|
37383
37642
|
entity: "Appointment,Encounter",
|
|
37384
37643
|
filter: {
|
|
37385
|
-
|
|
37386
|
-
|
|
37644
|
+
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.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37645
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
|
|
37387
37646
|
},
|
|
37388
|
-
|
|
37647
|
+
return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37389
37648
|
};
|
|
37390
37649
|
},
|
|
37391
37650
|
getWalkIns: function getWalkIns(data) {
|
|
@@ -37393,10 +37652,10 @@ var query$4 = {
|
|
|
37393
37652
|
db_name: dbName,
|
|
37394
37653
|
entity: "Appointment,Encounter",
|
|
37395
37654
|
filter: {
|
|
37396
|
-
|
|
37397
|
-
|
|
37655
|
+
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.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37656
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
|
|
37398
37657
|
},
|
|
37399
|
-
|
|
37658
|
+
return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37400
37659
|
};
|
|
37401
37660
|
},
|
|
37402
37661
|
getNewPatients: function getNewPatients(data) {
|
|
@@ -37404,10 +37663,10 @@ var query$4 = {
|
|
|
37404
37663
|
db_name: dbName,
|
|
37405
37664
|
entity: "Appointment,Encounter",
|
|
37406
37665
|
filter: {
|
|
37407
|
-
|
|
37408
|
-
|
|
37666
|
+
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.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37667
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
|
|
37409
37668
|
},
|
|
37410
|
-
|
|
37669
|
+
return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37411
37670
|
};
|
|
37412
37671
|
},
|
|
37413
37672
|
getTodayVisits: function getTodayVisits(data) {
|
|
@@ -37418,46 +37677,147 @@ var query$4 = {
|
|
|
37418
37677
|
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.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37419
37678
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' "
|
|
37420
37679
|
},
|
|
37421
|
-
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)})),
|
|
37680
|
+
return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37422
37681
|
};
|
|
37423
37682
|
},
|
|
37424
37683
|
// NURSE
|
|
37425
37684
|
getAppointmentsNurse: function getAppointmentsNurse(data) {
|
|
37426
|
-
return
|
|
37685
|
+
return {
|
|
37686
|
+
db_name: dbName,
|
|
37687
|
+
entity: "Practitioner,Appointment,Encounter",
|
|
37688
|
+
filter: {
|
|
37689
|
+
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, "'"),
|
|
37690
|
+
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"),
|
|
37691
|
+
Encounter: "Appointment.id in Encounter.appointmentId"
|
|
37692
|
+
},
|
|
37693
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
|
|
37694
|
+
};
|
|
37427
37695
|
},
|
|
37428
37696
|
getFirstVisitsNurse: function getFirstVisitsNurse(data) {
|
|
37429
|
-
return
|
|
37697
|
+
return {
|
|
37698
|
+
db_name: dbName,
|
|
37699
|
+
entity: "Practitioner,Appointment,Encounter",
|
|
37700
|
+
filter: {
|
|
37701
|
+
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, "'"),
|
|
37702
|
+
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"),
|
|
37703
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
|
|
37704
|
+
},
|
|
37705
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
|
|
37706
|
+
};
|
|
37430
37707
|
},
|
|
37431
37708
|
getNewPatientsNurse: function getNewPatientsNurse(data) {
|
|
37432
|
-
return
|
|
37709
|
+
return {
|
|
37710
|
+
db_name: dbName,
|
|
37711
|
+
entity: "Practitioner,Appointment,Encounter",
|
|
37712
|
+
filter: {
|
|
37713
|
+
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, "'"),
|
|
37714
|
+
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"),
|
|
37715
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
|
|
37716
|
+
},
|
|
37717
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
|
|
37718
|
+
};
|
|
37433
37719
|
},
|
|
37434
37720
|
getOtherVisitsNurse: function getOtherVisitsNurse(data) {
|
|
37435
|
-
return
|
|
37721
|
+
return {
|
|
37722
|
+
db_name: dbName,
|
|
37723
|
+
entity: "Practitioner,Appointment,Encounter",
|
|
37724
|
+
filter: {
|
|
37725
|
+
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, "'"),
|
|
37726
|
+
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"),
|
|
37727
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
|
|
37728
|
+
},
|
|
37729
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
|
|
37730
|
+
};
|
|
37436
37731
|
},
|
|
37437
37732
|
getTodayVisitsNurse: function getTodayVisitsNurse(data) {
|
|
37438
|
-
return
|
|
37733
|
+
return {
|
|
37734
|
+
db_name: dbName,
|
|
37735
|
+
entity: "Practitioner,Encounter",
|
|
37736
|
+
filter: {
|
|
37737
|
+
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37738
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIDInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'")
|
|
37739
|
+
},
|
|
37740
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37741
|
+
};
|
|
37439
37742
|
},
|
|
37440
37743
|
getWalkInsNurse: function getWalkInsNurse(data) {
|
|
37441
|
-
return
|
|
37744
|
+
return {
|
|
37745
|
+
db_name: dbName,
|
|
37746
|
+
entity: "Practitioner,Appointment,Encounter",
|
|
37747
|
+
filter: {
|
|
37748
|
+
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
37749
|
+
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"),
|
|
37750
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
|
|
37751
|
+
},
|
|
37752
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
|
|
37753
|
+
};
|
|
37442
37754
|
},
|
|
37443
37755
|
//Doctor
|
|
37444
37756
|
getAppointmentsDoctor: function getAppointmentsDoctor(data) {
|
|
37445
|
-
return
|
|
37757
|
+
return {
|
|
37758
|
+
db_name: dbName,
|
|
37759
|
+
entity: "Appointment,Encounter",
|
|
37760
|
+
filter: {
|
|
37761
|
+
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, " && 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, "'"),
|
|
37762
|
+
Encounter: "Appointment.id in Encounter.appointmentId"
|
|
37763
|
+
},
|
|
37764
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37765
|
+
};
|
|
37446
37766
|
},
|
|
37447
37767
|
getFirstVisitsDoctor: function getFirstVisitsDoctor(data) {
|
|
37448
|
-
return
|
|
37768
|
+
return {
|
|
37769
|
+
db_name: dbName,
|
|
37770
|
+
entity: "Appointment,Encounter",
|
|
37771
|
+
filter: {
|
|
37772
|
+
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, "'"),
|
|
37773
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
|
|
37774
|
+
},
|
|
37775
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37776
|
+
};
|
|
37449
37777
|
},
|
|
37450
37778
|
getNewPatientsDoctor: function getNewPatientsDoctor(data) {
|
|
37451
|
-
return
|
|
37779
|
+
return {
|
|
37780
|
+
db_name: dbName,
|
|
37781
|
+
entity: "Appointment,Encounter",
|
|
37782
|
+
filter: {
|
|
37783
|
+
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, "'"),
|
|
37784
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
|
|
37785
|
+
},
|
|
37786
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37787
|
+
};
|
|
37452
37788
|
},
|
|
37453
37789
|
getOtherVisitsDoctor: function getOtherVisitsDoctor(data) {
|
|
37454
|
-
return
|
|
37790
|
+
return {
|
|
37791
|
+
db_name: dbName,
|
|
37792
|
+
entity: "Appointment,Encounter",
|
|
37793
|
+
filter: {
|
|
37794
|
+
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, "'"),
|
|
37795
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
|
|
37796
|
+
},
|
|
37797
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37798
|
+
};
|
|
37455
37799
|
},
|
|
37456
37800
|
getTodayVisitsDoctor: function getTodayVisitsDoctor(data) {
|
|
37457
|
-
return
|
|
37801
|
+
return {
|
|
37802
|
+
db_name: dbName,
|
|
37803
|
+
entity: "Appointment,Encounter",
|
|
37804
|
+
filter: {
|
|
37805
|
+
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, "' "),
|
|
37806
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
|
|
37807
|
+
},
|
|
37808
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37809
|
+
};
|
|
37458
37810
|
},
|
|
37459
37811
|
getWalkInsDoctor: function getWalkInsDoctor(data) {
|
|
37460
|
-
return
|
|
37812
|
+
return {
|
|
37813
|
+
db_name: dbName,
|
|
37814
|
+
entity: "Appointment,Encounter",
|
|
37815
|
+
filter: {
|
|
37816
|
+
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, "'"),
|
|
37817
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
|
|
37818
|
+
},
|
|
37819
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
37820
|
+
};
|
|
37461
37821
|
}
|
|
37462
37822
|
};
|
|
37463
37823
|
|
|
@@ -37487,20 +37847,24 @@ var GET_APPOINTMENTS = createAsyncThunk("appointmentStatsApiSlice/getAppointment
|
|
|
37487
37847
|
case 5:
|
|
37488
37848
|
data = _context.sent;
|
|
37489
37849
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (_) {
|
|
37490
|
-
var _$
|
|
37850
|
+
var _$Appointment, _$Appointment$PersonI, _$Appointment$PersonI2, _$Appointment$PersonI3, _$Appointment$PersonI4, _$Appointment2, _$Appointment2$Person, _$Appointment2$Person2, _$Appointment2$Person3, _$Appointment2$Person4, _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Appointment3, _$Appointment4, _$Appointment5, _$Appointment6, _$Appointment7, _$Appointment7$Specia, _$Encounter3, _$Encounter3$practiti, _$Encounter3$practiti2, _$Appointment8, _$Appointment8$Person, _$Appointment8$Person2, _$Encounter4, _$Encounter4$patient_, _$Encounter4$patient_2, _$Encounter4$patient_3, _$Encounter4$patient_4, _$Encounter5, _$Encounter6, _$Encounter6$status;
|
|
37491
37851
|
|
|
37492
37852
|
return {
|
|
37493
|
-
|
|
37494
|
-
|
|
37495
|
-
|
|
37496
|
-
|
|
37497
|
-
|
|
37498
|
-
|
|
37499
|
-
|
|
37500
|
-
|
|
37501
|
-
|
|
37502
|
-
"
|
|
37503
|
-
|
|
37853
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment = _.Appointment) === null || _$Appointment === void 0 ? void 0 : (_$Appointment$PersonI = _$Appointment.PersonID) === null || _$Appointment$PersonI === void 0 ? void 0 : (_$Appointment$PersonI2 = _$Appointment$PersonI[0]) === null || _$Appointment$PersonI2 === void 0 ? void 0 : (_$Appointment$PersonI3 = _$Appointment$PersonI2.photo) === null || _$Appointment$PersonI3 === void 0 ? void 0 : (_$Appointment$PersonI4 = _$Appointment$PersonI3[0]) === null || _$Appointment$PersonI4 === void 0 ? void 0 : _$Appointment$PersonI4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment2 = _.Appointment) === null || _$Appointment2 === void 0 ? void 0 : (_$Appointment2$Person = _$Appointment2.PersonID) === null || _$Appointment2$Person === void 0 ? void 0 : (_$Appointment2$Person2 = _$Appointment2$Person[0]) === null || _$Appointment2$Person2 === void 0 ? void 0 : (_$Appointment2$Person3 = _$Appointment2$Person2.photo) === null || _$Appointment2$Person3 === void 0 ? void 0 : (_$Appointment2$Person4 = _$Appointment2$Person3[0]) === null || _$Appointment2$Person4 === void 0 ? void 0 : _$Appointment2$Person4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
37854
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter = _.Encounter) === null || _$Encounter === void 0 ? void 0 : (_$Encounter$patient_i = _$Encounter.patient_id) === null || _$Encounter$patient_i === void 0 ? void 0 : (_$Encounter$patient_i2 = _$Encounter$patient_i[0]) === null || _$Encounter$patient_i2 === void 0 ? void 0 : (_$Encounter$patient_i3 = _$Encounter$patient_i2.name) === null || _$Encounter$patient_i3 === void 0 ? void 0 : _$Encounter$patient_i3[0]) || {}),
|
|
37855
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter2 = _.Encounter) === null || _$Encounter2 === void 0 ? void 0 : (_$Encounter2$patient_ = _$Encounter2.patient_id) === null || _$Encounter2$patient_ === void 0 ? void 0 : (_$Encounter2$patient_2 = _$Encounter2$patient_[0]) === null || _$Encounter2$patient_2 === void 0 ? void 0 : _$Encounter2$patient_2.MRN,
|
|
37856
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment3 = _.Appointment) === null || _$Appointment3 === void 0 ? void 0 : _$Appointment3.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment4 = _.Appointment) === null || _$Appointment4 === void 0 ? void 0 : _$Appointment4.start).format("DD MMM,YYYY") : "",
|
|
37857
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment5 = _.Appointment) === null || _$Appointment5 === void 0 ? void 0 : _$Appointment5.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment6 = _.Appointment) === null || _$Appointment6 === void 0 ? void 0 : _$Appointment6.start).format("hh:mm A") : "",
|
|
37858
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment7 = _.Appointment) === null || _$Appointment7 === void 0 ? void 0 : (_$Appointment7$Specia = _$Appointment7.SpecialtyID) === null || _$Appointment7$Specia === void 0 ? void 0 : _$Appointment7$Specia.map(function (spl) {
|
|
37859
|
+
var _spl$coding, _spl$coding$;
|
|
37860
|
+
|
|
37861
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding = spl.coding) === null || _spl$coding === void 0 ? void 0 : (_spl$coding$ = _spl$coding[0]) === null || _spl$coding$ === void 0 ? void 0 : _spl$coding$.display;
|
|
37862
|
+
}).join(", "),
|
|
37863
|
+
clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter3 = _.Encounter) === null || _$Encounter3 === void 0 ? void 0 : (_$Encounter3$practiti = _$Encounter3.practitioner_details) === null || _$Encounter3$practiti === void 0 ? void 0 : (_$Encounter3$practiti2 = _$Encounter3$practiti[0]) === null || _$Encounter3$practiti2 === void 0 ? void 0 : _$Encounter3$practiti2.clinic,
|
|
37864
|
+
dob: _ === null || _ === void 0 ? void 0 : (_$Appointment8 = _.Appointment) === null || _$Appointment8 === void 0 ? void 0 : (_$Appointment8$Person = _$Appointment8.PersonID) === null || _$Appointment8$Person === void 0 ? void 0 : (_$Appointment8$Person2 = _$Appointment8$Person[0]) === null || _$Appointment8$Person2 === void 0 ? void 0 : _$Appointment8$Person2.birthDay,
|
|
37865
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter4 = _.Encounter) === null || _$Encounter4 === void 0 ? void 0 : (_$Encounter4$patient_ = _$Encounter4.patient_id) === null || _$Encounter4$patient_ === void 0 ? void 0 : (_$Encounter4$patient_2 = _$Encounter4$patient_[0]) === null || _$Encounter4$patient_2 === void 0 ? void 0 : (_$Encounter4$patient_3 = _$Encounter4$patient_2.telecom) === null || _$Encounter4$patient_3 === void 0 ? void 0 : (_$Encounter4$patient_4 = _$Encounter4$patient_3[0]) === null || _$Encounter4$patient_4 === void 0 ? void 0 : _$Encounter4$patient_4.value),
|
|
37866
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter5 = _.Encounter) === null || _$Encounter5 === void 0 ? void 0 : _$Encounter5.visit_type,
|
|
37867
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter6 = _.Encounter) === null || _$Encounter6 === void 0 ? void 0 : (_$Encounter6$status = _$Encounter6.status) === null || _$Encounter6$status === void 0 ? void 0 : _$Encounter6$status.display,
|
|
37504
37868
|
"Register Visit": true,
|
|
37505
37869
|
"Modify Appointment": true,
|
|
37506
37870
|
"Cancel Appointment": true,
|
|
@@ -37549,20 +37913,24 @@ var GET_FIRST_VISITS = createAsyncThunk("appointmentStatsApiSlice/getFirstVisits
|
|
|
37549
37913
|
case 5:
|
|
37550
37914
|
data = _context2.sent;
|
|
37551
37915
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2.map(function (_) {
|
|
37552
|
-
var _$
|
|
37916
|
+
var _$Appointment9, _$Appointment9$Person, _$Appointment9$Person2, _$Appointment9$Person3, _$Appointment9$Person4, _$Appointment10, _$Appointment10$Perso, _$Appointment10$Perso2, _$Appointment10$Perso3, _$Appointment10$Perso4, _$Encounter7, _$Encounter7$patient_, _$Encounter7$patient_2, _$Encounter7$patient_3, _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Appointment11, _$Appointment12, _$Appointment13, _$Appointment14, _$Appointment15, _$Appointment15$Speci, _$Encounter9, _$Encounter9$practiti, _$Encounter9$practiti2, _$Appointment16, _$Appointment16$Perso, _$Appointment16$Perso2, _$Encounter10, _$Encounter10$patient, _$Encounter10$patient2, _$Encounter10$patient3, _$Encounter10$patient4, _$Encounter11, _$Encounter12, _$Encounter12$status;
|
|
37553
37917
|
|
|
37554
37918
|
return {
|
|
37555
|
-
img: "https://
|
|
37556
|
-
name: _ === null || _ === void 0 ? void 0 : (_$
|
|
37557
|
-
mrn:
|
|
37558
|
-
date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
|
|
37559
|
-
time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
|
|
37560
|
-
speciality:
|
|
37561
|
-
|
|
37562
|
-
|
|
37563
|
-
|
|
37564
|
-
|
|
37565
|
-
|
|
37919
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment9 = _.Appointment) === null || _$Appointment9 === void 0 ? void 0 : (_$Appointment9$Person = _$Appointment9.PersonID) === null || _$Appointment9$Person === void 0 ? void 0 : (_$Appointment9$Person2 = _$Appointment9$Person[0]) === null || _$Appointment9$Person2 === void 0 ? void 0 : (_$Appointment9$Person3 = _$Appointment9$Person2.photo) === null || _$Appointment9$Person3 === void 0 ? void 0 : (_$Appointment9$Person4 = _$Appointment9$Person3[0]) === null || _$Appointment9$Person4 === void 0 ? void 0 : _$Appointment9$Person4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment10 = _.Appointment) === null || _$Appointment10 === void 0 ? void 0 : (_$Appointment10$Perso = _$Appointment10.PersonID) === null || _$Appointment10$Perso === void 0 ? void 0 : (_$Appointment10$Perso2 = _$Appointment10$Perso[0]) === null || _$Appointment10$Perso2 === void 0 ? void 0 : (_$Appointment10$Perso3 = _$Appointment10$Perso2.photo) === null || _$Appointment10$Perso3 === void 0 ? void 0 : (_$Appointment10$Perso4 = _$Appointment10$Perso3[0]) === null || _$Appointment10$Perso4 === void 0 ? void 0 : _$Appointment10$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
37920
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter7 = _.Encounter) === null || _$Encounter7 === void 0 ? void 0 : (_$Encounter7$patient_ = _$Encounter7.patient_id) === null || _$Encounter7$patient_ === void 0 ? void 0 : (_$Encounter7$patient_2 = _$Encounter7$patient_[0]) === null || _$Encounter7$patient_2 === void 0 ? void 0 : (_$Encounter7$patient_3 = _$Encounter7$patient_2.name) === null || _$Encounter7$patient_3 === void 0 ? void 0 : _$Encounter7$patient_3[0]) || {}),
|
|
37921
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter8 = _.Encounter) === null || _$Encounter8 === void 0 ? void 0 : (_$Encounter8$patient_ = _$Encounter8.patient_id) === null || _$Encounter8$patient_ === void 0 ? void 0 : (_$Encounter8$patient_2 = _$Encounter8$patient_[0]) === null || _$Encounter8$patient_2 === void 0 ? void 0 : _$Encounter8$patient_2.MRN,
|
|
37922
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment11 = _.Appointment) === null || _$Appointment11 === void 0 ? void 0 : _$Appointment11.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment12 = _.Appointment) === null || _$Appointment12 === void 0 ? void 0 : _$Appointment12.start).format("DD MMM,YYYY") : "",
|
|
37923
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment13 = _.Appointment) === null || _$Appointment13 === void 0 ? void 0 : _$Appointment13.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment14 = _.Appointment) === null || _$Appointment14 === void 0 ? void 0 : _$Appointment14.start).format("hh:mm A") : "",
|
|
37924
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment15 = _.Appointment) === null || _$Appointment15 === void 0 ? void 0 : (_$Appointment15$Speci = _$Appointment15.SpecialtyID) === null || _$Appointment15$Speci === void 0 ? void 0 : _$Appointment15$Speci.map(function (spl) {
|
|
37925
|
+
var _spl$coding2, _spl$coding2$;
|
|
37926
|
+
|
|
37927
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding2 = spl.coding) === null || _spl$coding2 === void 0 ? void 0 : (_spl$coding2$ = _spl$coding2[0]) === null || _spl$coding2$ === void 0 ? void 0 : _spl$coding2$.display;
|
|
37928
|
+
}).join(", "),
|
|
37929
|
+
clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$practiti = _$Encounter9.practitioner_details) === null || _$Encounter9$practiti === void 0 ? void 0 : (_$Encounter9$practiti2 = _$Encounter9$practiti[0]) === null || _$Encounter9$practiti2 === void 0 ? void 0 : _$Encounter9$practiti2.clinic,
|
|
37930
|
+
dob: _ === null || _ === void 0 ? void 0 : (_$Appointment16 = _.Appointment) === null || _$Appointment16 === void 0 ? void 0 : (_$Appointment16$Perso = _$Appointment16.PersonID) === null || _$Appointment16$Perso === void 0 ? void 0 : (_$Appointment16$Perso2 = _$Appointment16$Perso[0]) === null || _$Appointment16$Perso2 === void 0 ? void 0 : _$Appointment16$Perso2.birthDay,
|
|
37931
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter10 = _.Encounter) === null || _$Encounter10 === void 0 ? void 0 : (_$Encounter10$patient = _$Encounter10.patient_id) === null || _$Encounter10$patient === void 0 ? void 0 : (_$Encounter10$patient2 = _$Encounter10$patient[0]) === null || _$Encounter10$patient2 === void 0 ? void 0 : (_$Encounter10$patient3 = _$Encounter10$patient2.telecom) === null || _$Encounter10$patient3 === void 0 ? void 0 : (_$Encounter10$patient4 = _$Encounter10$patient3[0]) === null || _$Encounter10$patient4 === void 0 ? void 0 : _$Encounter10$patient4.value),
|
|
37932
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter11 = _.Encounter) === null || _$Encounter11 === void 0 ? void 0 : _$Encounter11.visit_type,
|
|
37933
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter12 = _.Encounter) === null || _$Encounter12 === void 0 ? void 0 : (_$Encounter12$status = _$Encounter12.status) === null || _$Encounter12$status === void 0 ? void 0 : _$Encounter12$status.display,
|
|
37566
37934
|
"Register Visit": true,
|
|
37567
37935
|
"Modify Appointment": true,
|
|
37568
37936
|
"Cancel Appointment": true,
|
|
@@ -37611,20 +37979,24 @@ var GET_OTHER_VISITS = createAsyncThunk("appointmentStatsApiSlice/getOtherVisits
|
|
|
37611
37979
|
case 5:
|
|
37612
37980
|
data = _context3.sent;
|
|
37613
37981
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : _data$result3.map(function (_) {
|
|
37614
|
-
var _$
|
|
37982
|
+
var _$Appointment17, _$Appointment17$Perso, _$Appointment17$Perso2, _$Appointment17$Perso3, _$Appointment17$Perso4, _$Appointment18, _$Appointment18$Perso, _$Appointment18$Perso2, _$Appointment18$Perso3, _$Appointment18$Perso4, _$Encounter13, _$Encounter13$patient, _$Encounter13$patient2, _$Encounter13$patient3, _$Encounter14, _$Encounter14$patient, _$Encounter14$patient2, _$Appointment19, _$Appointment20, _$Appointment21, _$Appointment22, _$Appointment23, _$Appointment23$Speci, _$Encounter15, _$Encounter15$practit, _$Encounter15$practit2, _$Appointment24, _$Appointment24$Perso, _$Appointment24$Perso2, _$Encounter16, _$Encounter16$patient, _$Encounter16$patient2, _$Encounter16$patient3, _$Encounter16$patient4, _$Encounter17, _$Encounter18, _$Encounter18$status;
|
|
37615
37983
|
|
|
37616
37984
|
return {
|
|
37617
|
-
img: "https://
|
|
37618
|
-
name: _ === null || _ === void 0 ? void 0 : (_$
|
|
37619
|
-
mrn:
|
|
37620
|
-
date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
|
|
37621
|
-
time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
|
|
37622
|
-
speciality:
|
|
37623
|
-
|
|
37624
|
-
|
|
37625
|
-
|
|
37626
|
-
|
|
37627
|
-
|
|
37985
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment17 = _.Appointment) === null || _$Appointment17 === void 0 ? void 0 : (_$Appointment17$Perso = _$Appointment17.PersonID) === null || _$Appointment17$Perso === void 0 ? void 0 : (_$Appointment17$Perso2 = _$Appointment17$Perso[0]) === null || _$Appointment17$Perso2 === void 0 ? void 0 : (_$Appointment17$Perso3 = _$Appointment17$Perso2.photo) === null || _$Appointment17$Perso3 === void 0 ? void 0 : (_$Appointment17$Perso4 = _$Appointment17$Perso3[0]) === null || _$Appointment17$Perso4 === void 0 ? void 0 : _$Appointment17$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment18 = _.Appointment) === null || _$Appointment18 === void 0 ? void 0 : (_$Appointment18$Perso = _$Appointment18.PersonID) === null || _$Appointment18$Perso === void 0 ? void 0 : (_$Appointment18$Perso2 = _$Appointment18$Perso[0]) === null || _$Appointment18$Perso2 === void 0 ? void 0 : (_$Appointment18$Perso3 = _$Appointment18$Perso2.photo) === null || _$Appointment18$Perso3 === void 0 ? void 0 : (_$Appointment18$Perso4 = _$Appointment18$Perso3[0]) === null || _$Appointment18$Perso4 === void 0 ? void 0 : _$Appointment18$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
37986
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter13 = _.Encounter) === null || _$Encounter13 === void 0 ? void 0 : (_$Encounter13$patient = _$Encounter13.patient_id) === null || _$Encounter13$patient === void 0 ? void 0 : (_$Encounter13$patient2 = _$Encounter13$patient[0]) === null || _$Encounter13$patient2 === void 0 ? void 0 : (_$Encounter13$patient3 = _$Encounter13$patient2.name) === null || _$Encounter13$patient3 === void 0 ? void 0 : _$Encounter13$patient3[0]) || {}),
|
|
37987
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter14 = _.Encounter) === null || _$Encounter14 === void 0 ? void 0 : (_$Encounter14$patient = _$Encounter14.patient_id) === null || _$Encounter14$patient === void 0 ? void 0 : (_$Encounter14$patient2 = _$Encounter14$patient[0]) === null || _$Encounter14$patient2 === void 0 ? void 0 : _$Encounter14$patient2.MRN,
|
|
37988
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment19 = _.Appointment) === null || _$Appointment19 === void 0 ? void 0 : _$Appointment19.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment20 = _.Appointment) === null || _$Appointment20 === void 0 ? void 0 : _$Appointment20.start).format("DD MMM,YYYY") : "",
|
|
37989
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment21 = _.Appointment) === null || _$Appointment21 === void 0 ? void 0 : _$Appointment21.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment22 = _.Appointment) === null || _$Appointment22 === void 0 ? void 0 : _$Appointment22.start).format("hh:mm A") : "",
|
|
37990
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment23 = _.Appointment) === null || _$Appointment23 === void 0 ? void 0 : (_$Appointment23$Speci = _$Appointment23.SpecialtyID) === null || _$Appointment23$Speci === void 0 ? void 0 : _$Appointment23$Speci.map(function (spl) {
|
|
37991
|
+
var _spl$coding3, _spl$coding3$;
|
|
37992
|
+
|
|
37993
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding3 = spl.coding) === null || _spl$coding3 === void 0 ? void 0 : (_spl$coding3$ = _spl$coding3[0]) === null || _spl$coding3$ === void 0 ? void 0 : _spl$coding3$.display;
|
|
37994
|
+
}).join(", "),
|
|
37995
|
+
clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter15 = _.Encounter) === null || _$Encounter15 === void 0 ? void 0 : (_$Encounter15$practit = _$Encounter15.practitioner_details) === null || _$Encounter15$practit === void 0 ? void 0 : (_$Encounter15$practit2 = _$Encounter15$practit[0]) === null || _$Encounter15$practit2 === void 0 ? void 0 : _$Encounter15$practit2.clinic,
|
|
37996
|
+
dob: _ === null || _ === void 0 ? void 0 : (_$Appointment24 = _.Appointment) === null || _$Appointment24 === void 0 ? void 0 : (_$Appointment24$Perso = _$Appointment24.PersonID) === null || _$Appointment24$Perso === void 0 ? void 0 : (_$Appointment24$Perso2 = _$Appointment24$Perso[0]) === null || _$Appointment24$Perso2 === void 0 ? void 0 : _$Appointment24$Perso2.birthDay,
|
|
37997
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter16 = _.Encounter) === null || _$Encounter16 === void 0 ? void 0 : (_$Encounter16$patient = _$Encounter16.patient_id) === null || _$Encounter16$patient === void 0 ? void 0 : (_$Encounter16$patient2 = _$Encounter16$patient[0]) === null || _$Encounter16$patient2 === void 0 ? void 0 : (_$Encounter16$patient3 = _$Encounter16$patient2.telecom) === null || _$Encounter16$patient3 === void 0 ? void 0 : (_$Encounter16$patient4 = _$Encounter16$patient3[0]) === null || _$Encounter16$patient4 === void 0 ? void 0 : _$Encounter16$patient4.value),
|
|
37998
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter17 = _.Encounter) === null || _$Encounter17 === void 0 ? void 0 : _$Encounter17.visit_type,
|
|
37999
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter18 = _.Encounter) === null || _$Encounter18 === void 0 ? void 0 : (_$Encounter18$status = _$Encounter18.status) === null || _$Encounter18$status === void 0 ? void 0 : _$Encounter18$status.display,
|
|
37628
38000
|
"Register Visit": true,
|
|
37629
38001
|
"Modify Appointment": true,
|
|
37630
38002
|
"Cancel Appointment": true,
|
|
@@ -37673,20 +38045,24 @@ var GET_WALK_INS = createAsyncThunk("appointmentStatsApiSlice/getWalkIns", /*#__
|
|
|
37673
38045
|
case 5:
|
|
37674
38046
|
data = _context4.sent;
|
|
37675
38047
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : _data$result4.map(function (_) {
|
|
37676
|
-
var _$
|
|
38048
|
+
var _$Appointment25, _$Appointment25$Perso, _$Appointment25$Perso2, _$Appointment25$Perso3, _$Appointment25$Perso4, _$Appointment26, _$Appointment26$Perso, _$Appointment26$Perso2, _$Appointment26$Perso3, _$Appointment26$Perso4, _$Encounter19, _$Encounter19$patient, _$Encounter19$patient2, _$Encounter19$patient3, _$Encounter20, _$Encounter20$patient, _$Encounter20$patient2, _$Appointment27, _$Appointment28, _$Appointment29, _$Appointment30, _$Appointment31, _$Appointment31$Speci, _$Encounter21, _$Encounter21$practit, _$Encounter21$practit2, _$Appointment32, _$Appointment32$Perso, _$Appointment32$Perso2, _$Encounter22, _$Encounter22$patient, _$Encounter22$patient2, _$Encounter22$patient3, _$Encounter22$patient4, _$Encounter23, _$Encounter24, _$Encounter24$status;
|
|
37677
38049
|
|
|
37678
38050
|
return {
|
|
37679
|
-
|
|
37680
|
-
|
|
37681
|
-
|
|
37682
|
-
|
|
37683
|
-
|
|
37684
|
-
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
|
|
37688
|
-
"
|
|
37689
|
-
|
|
38051
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment25 = _.Appointment) === null || _$Appointment25 === void 0 ? void 0 : (_$Appointment25$Perso = _$Appointment25.PersonID) === null || _$Appointment25$Perso === void 0 ? void 0 : (_$Appointment25$Perso2 = _$Appointment25$Perso[0]) === null || _$Appointment25$Perso2 === void 0 ? void 0 : (_$Appointment25$Perso3 = _$Appointment25$Perso2.photo) === null || _$Appointment25$Perso3 === void 0 ? void 0 : (_$Appointment25$Perso4 = _$Appointment25$Perso3[0]) === null || _$Appointment25$Perso4 === void 0 ? void 0 : _$Appointment25$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment26 = _.Appointment) === null || _$Appointment26 === void 0 ? void 0 : (_$Appointment26$Perso = _$Appointment26.PersonID) === null || _$Appointment26$Perso === void 0 ? void 0 : (_$Appointment26$Perso2 = _$Appointment26$Perso[0]) === null || _$Appointment26$Perso2 === void 0 ? void 0 : (_$Appointment26$Perso3 = _$Appointment26$Perso2.photo) === null || _$Appointment26$Perso3 === void 0 ? void 0 : (_$Appointment26$Perso4 = _$Appointment26$Perso3[0]) === null || _$Appointment26$Perso4 === void 0 ? void 0 : _$Appointment26$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38052
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter19 = _.Encounter) === null || _$Encounter19 === void 0 ? void 0 : (_$Encounter19$patient = _$Encounter19.patient_id) === null || _$Encounter19$patient === void 0 ? void 0 : (_$Encounter19$patient2 = _$Encounter19$patient[0]) === null || _$Encounter19$patient2 === void 0 ? void 0 : (_$Encounter19$patient3 = _$Encounter19$patient2.name) === null || _$Encounter19$patient3 === void 0 ? void 0 : _$Encounter19$patient3[0]) || {}),
|
|
38053
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter20 = _.Encounter) === null || _$Encounter20 === void 0 ? void 0 : (_$Encounter20$patient = _$Encounter20.patient_id) === null || _$Encounter20$patient === void 0 ? void 0 : (_$Encounter20$patient2 = _$Encounter20$patient[0]) === null || _$Encounter20$patient2 === void 0 ? void 0 : _$Encounter20$patient2.MRN,
|
|
38054
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment27 = _.Appointment) === null || _$Appointment27 === void 0 ? void 0 : _$Appointment27.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment28 = _.Appointment) === null || _$Appointment28 === void 0 ? void 0 : _$Appointment28.start).format("DD MMM,YYYY") : "",
|
|
38055
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment29 = _.Appointment) === null || _$Appointment29 === void 0 ? void 0 : _$Appointment29.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment30 = _.Appointment) === null || _$Appointment30 === void 0 ? void 0 : _$Appointment30.start).format("hh:mm A") : "",
|
|
38056
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment31 = _.Appointment) === null || _$Appointment31 === void 0 ? void 0 : (_$Appointment31$Speci = _$Appointment31.SpecialtyID) === null || _$Appointment31$Speci === void 0 ? void 0 : _$Appointment31$Speci.map(function (spl) {
|
|
38057
|
+
var _spl$coding4, _spl$coding4$;
|
|
38058
|
+
|
|
38059
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding4 = spl.coding) === null || _spl$coding4 === void 0 ? void 0 : (_spl$coding4$ = _spl$coding4[0]) === null || _spl$coding4$ === void 0 ? void 0 : _spl$coding4$.display;
|
|
38060
|
+
}).join(", "),
|
|
38061
|
+
clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter21 = _.Encounter) === null || _$Encounter21 === void 0 ? void 0 : (_$Encounter21$practit = _$Encounter21.practitioner_details) === null || _$Encounter21$practit === void 0 ? void 0 : (_$Encounter21$practit2 = _$Encounter21$practit[0]) === null || _$Encounter21$practit2 === void 0 ? void 0 : _$Encounter21$practit2.clinic,
|
|
38062
|
+
dob: _ === null || _ === void 0 ? void 0 : (_$Appointment32 = _.Appointment) === null || _$Appointment32 === void 0 ? void 0 : (_$Appointment32$Perso = _$Appointment32.PersonID) === null || _$Appointment32$Perso === void 0 ? void 0 : (_$Appointment32$Perso2 = _$Appointment32$Perso[0]) === null || _$Appointment32$Perso2 === void 0 ? void 0 : _$Appointment32$Perso2.birthDay,
|
|
38063
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter22 = _.Encounter) === null || _$Encounter22 === void 0 ? void 0 : (_$Encounter22$patient = _$Encounter22.patient_id) === null || _$Encounter22$patient === void 0 ? void 0 : (_$Encounter22$patient2 = _$Encounter22$patient[0]) === null || _$Encounter22$patient2 === void 0 ? void 0 : (_$Encounter22$patient3 = _$Encounter22$patient2.telecom) === null || _$Encounter22$patient3 === void 0 ? void 0 : (_$Encounter22$patient4 = _$Encounter22$patient3[0]) === null || _$Encounter22$patient4 === void 0 ? void 0 : _$Encounter22$patient4.value),
|
|
38064
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter23 = _.Encounter) === null || _$Encounter23 === void 0 ? void 0 : _$Encounter23.visit_type,
|
|
38065
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter24 = _.Encounter) === null || _$Encounter24 === void 0 ? void 0 : (_$Encounter24$status = _$Encounter24.status) === null || _$Encounter24$status === void 0 ? void 0 : _$Encounter24$status.display,
|
|
37690
38066
|
"Register Visit": true,
|
|
37691
38067
|
"Modify Appointment": true,
|
|
37692
38068
|
"Cancel Appointment": true,
|
|
@@ -37735,20 +38111,24 @@ var GET_NEW_PATIENTS = createAsyncThunk("appointmentStatsApiSlice/getNewPatients
|
|
|
37735
38111
|
case 5:
|
|
37736
38112
|
data = _context5.sent;
|
|
37737
38113
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : _data$result5.map(function (_) {
|
|
37738
|
-
var _$
|
|
38114
|
+
var _$Appointment33, _$Appointment33$Perso, _$Appointment33$Perso2, _$Appointment33$Perso3, _$Appointment33$Perso4, _$Appointment34, _$Appointment34$Perso, _$Appointment34$Perso2, _$Appointment34$Perso3, _$Appointment34$Perso4, _$Encounter25, _$Encounter25$patient, _$Encounter25$patient2, _$Encounter25$patient3, _$Encounter26, _$Encounter26$patient, _$Encounter26$patient2, _$Appointment35, _$Appointment36, _$Appointment37, _$Appointment38, _$Appointment39, _$Appointment39$Speci, _$Encounter27, _$Encounter27$practit, _$Encounter27$practit2, _$Appointment40, _$Appointment40$Perso, _$Appointment40$Perso2, _$Encounter28, _$Encounter28$patient, _$Encounter28$patient2, _$Encounter28$patient3, _$Encounter28$patient4, _$Encounter29, _$Encounter30, _$Encounter30$status;
|
|
37739
38115
|
|
|
37740
38116
|
return {
|
|
37741
|
-
|
|
37742
|
-
|
|
37743
|
-
|
|
37744
|
-
|
|
37745
|
-
|
|
37746
|
-
|
|
37747
|
-
|
|
37748
|
-
|
|
37749
|
-
|
|
37750
|
-
"
|
|
37751
|
-
|
|
38117
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment33 = _.Appointment) === null || _$Appointment33 === void 0 ? void 0 : (_$Appointment33$Perso = _$Appointment33.PersonID) === null || _$Appointment33$Perso === void 0 ? void 0 : (_$Appointment33$Perso2 = _$Appointment33$Perso[0]) === null || _$Appointment33$Perso2 === void 0 ? void 0 : (_$Appointment33$Perso3 = _$Appointment33$Perso2.photo) === null || _$Appointment33$Perso3 === void 0 ? void 0 : (_$Appointment33$Perso4 = _$Appointment33$Perso3[0]) === null || _$Appointment33$Perso4 === void 0 ? void 0 : _$Appointment33$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment34 = _.Appointment) === null || _$Appointment34 === void 0 ? void 0 : (_$Appointment34$Perso = _$Appointment34.PersonID) === null || _$Appointment34$Perso === void 0 ? void 0 : (_$Appointment34$Perso2 = _$Appointment34$Perso[0]) === null || _$Appointment34$Perso2 === void 0 ? void 0 : (_$Appointment34$Perso3 = _$Appointment34$Perso2.photo) === null || _$Appointment34$Perso3 === void 0 ? void 0 : (_$Appointment34$Perso4 = _$Appointment34$Perso3[0]) === null || _$Appointment34$Perso4 === void 0 ? void 0 : _$Appointment34$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38118
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter25 = _.Encounter) === null || _$Encounter25 === void 0 ? void 0 : (_$Encounter25$patient = _$Encounter25.patient_id) === null || _$Encounter25$patient === void 0 ? void 0 : (_$Encounter25$patient2 = _$Encounter25$patient[0]) === null || _$Encounter25$patient2 === void 0 ? void 0 : (_$Encounter25$patient3 = _$Encounter25$patient2.name) === null || _$Encounter25$patient3 === void 0 ? void 0 : _$Encounter25$patient3[0]) || {}),
|
|
38119
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter26 = _.Encounter) === null || _$Encounter26 === void 0 ? void 0 : (_$Encounter26$patient = _$Encounter26.patient_id) === null || _$Encounter26$patient === void 0 ? void 0 : (_$Encounter26$patient2 = _$Encounter26$patient[0]) === null || _$Encounter26$patient2 === void 0 ? void 0 : _$Encounter26$patient2.MRN,
|
|
38120
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment35 = _.Appointment) === null || _$Appointment35 === void 0 ? void 0 : _$Appointment35.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment36 = _.Appointment) === null || _$Appointment36 === void 0 ? void 0 : _$Appointment36.start).format("DD MMM,YYYY") : "",
|
|
38121
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment37 = _.Appointment) === null || _$Appointment37 === void 0 ? void 0 : _$Appointment37.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment38 = _.Appointment) === null || _$Appointment38 === void 0 ? void 0 : _$Appointment38.start).format("hh:mm A") : "",
|
|
38122
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment39 = _.Appointment) === null || _$Appointment39 === void 0 ? void 0 : (_$Appointment39$Speci = _$Appointment39.SpecialtyID) === null || _$Appointment39$Speci === void 0 ? void 0 : _$Appointment39$Speci.map(function (spl) {
|
|
38123
|
+
var _spl$coding5, _spl$coding5$;
|
|
38124
|
+
|
|
38125
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding5 = spl.coding) === null || _spl$coding5 === void 0 ? void 0 : (_spl$coding5$ = _spl$coding5[0]) === null || _spl$coding5$ === void 0 ? void 0 : _spl$coding5$.display;
|
|
38126
|
+
}).join(", "),
|
|
38127
|
+
clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter27 = _.Encounter) === null || _$Encounter27 === void 0 ? void 0 : (_$Encounter27$practit = _$Encounter27.practitioner_details) === null || _$Encounter27$practit === void 0 ? void 0 : (_$Encounter27$practit2 = _$Encounter27$practit[0]) === null || _$Encounter27$practit2 === void 0 ? void 0 : _$Encounter27$practit2.clinic,
|
|
38128
|
+
dob: _ === null || _ === void 0 ? void 0 : (_$Appointment40 = _.Appointment) === null || _$Appointment40 === void 0 ? void 0 : (_$Appointment40$Perso = _$Appointment40.PersonID) === null || _$Appointment40$Perso === void 0 ? void 0 : (_$Appointment40$Perso2 = _$Appointment40$Perso[0]) === null || _$Appointment40$Perso2 === void 0 ? void 0 : _$Appointment40$Perso2.birthDay,
|
|
38129
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter28 = _.Encounter) === null || _$Encounter28 === void 0 ? void 0 : (_$Encounter28$patient = _$Encounter28.patient_id) === null || _$Encounter28$patient === void 0 ? void 0 : (_$Encounter28$patient2 = _$Encounter28$patient[0]) === null || _$Encounter28$patient2 === void 0 ? void 0 : (_$Encounter28$patient3 = _$Encounter28$patient2.telecom) === null || _$Encounter28$patient3 === void 0 ? void 0 : (_$Encounter28$patient4 = _$Encounter28$patient3[0]) === null || _$Encounter28$patient4 === void 0 ? void 0 : _$Encounter28$patient4.value),
|
|
38130
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter29 = _.Encounter) === null || _$Encounter29 === void 0 ? void 0 : _$Encounter29.visit_type,
|
|
38131
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter30 = _.Encounter) === null || _$Encounter30 === void 0 ? void 0 : (_$Encounter30$status = _$Encounter30.status) === null || _$Encounter30$status === void 0 ? void 0 : _$Encounter30$status.display,
|
|
37752
38132
|
"Register Visit": true,
|
|
37753
38133
|
"Modify Appointment": true,
|
|
37754
38134
|
"Cancel Appointment": true,
|
|
@@ -37797,20 +38177,24 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
|
|
|
37797
38177
|
case 5:
|
|
37798
38178
|
data = _context6.sent;
|
|
37799
38179
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : _data$result6.map(function (_) {
|
|
37800
|
-
var _$
|
|
38180
|
+
var _$Appointment41, _$Appointment41$Perso, _$Appointment41$Perso2, _$Appointment41$Perso3, _$Appointment41$Perso4, _$Appointment42, _$Appointment42$Perso, _$Appointment42$Perso2, _$Appointment42$Perso3, _$Appointment42$Perso4, _$Encounter31, _$Encounter31$patient, _$Encounter31$patient2, _$Encounter31$patient3, _$Encounter32, _$Encounter32$patient, _$Encounter32$patient2, _$Appointment43, _$Appointment44, _$Appointment45, _$Appointment46, _$Appointment47, _$Appointment47$Speci, _$Encounter33, _$Encounter33$practit, _$Encounter33$practit2, _$Appointment48, _$Appointment48$Perso, _$Appointment48$Perso2, _$Encounter34, _$Encounter34$patient, _$Encounter34$patient2, _$Encounter34$patient3, _$Encounter34$patient4, _$Encounter35, _$Encounter36, _$Encounter36$status;
|
|
37801
38181
|
|
|
37802
38182
|
return {
|
|
37803
|
-
img: "https://
|
|
37804
|
-
name: _ === null || _ === void 0 ? void 0 : (_$
|
|
37805
|
-
mrn:
|
|
37806
|
-
date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
|
|
37807
|
-
time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
|
|
37808
|
-
speciality:
|
|
37809
|
-
|
|
37810
|
-
|
|
37811
|
-
|
|
37812
|
-
|
|
37813
|
-
|
|
38183
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment41 = _.Appointment) === null || _$Appointment41 === void 0 ? void 0 : (_$Appointment41$Perso = _$Appointment41.PersonID) === null || _$Appointment41$Perso === void 0 ? void 0 : (_$Appointment41$Perso2 = _$Appointment41$Perso[0]) === null || _$Appointment41$Perso2 === void 0 ? void 0 : (_$Appointment41$Perso3 = _$Appointment41$Perso2.photo) === null || _$Appointment41$Perso3 === void 0 ? void 0 : (_$Appointment41$Perso4 = _$Appointment41$Perso3[0]) === null || _$Appointment41$Perso4 === void 0 ? void 0 : _$Appointment41$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment42 = _.Appointment) === null || _$Appointment42 === void 0 ? void 0 : (_$Appointment42$Perso = _$Appointment42.PersonID) === null || _$Appointment42$Perso === void 0 ? void 0 : (_$Appointment42$Perso2 = _$Appointment42$Perso[0]) === null || _$Appointment42$Perso2 === void 0 ? void 0 : (_$Appointment42$Perso3 = _$Appointment42$Perso2.photo) === null || _$Appointment42$Perso3 === void 0 ? void 0 : (_$Appointment42$Perso4 = _$Appointment42$Perso3[0]) === null || _$Appointment42$Perso4 === void 0 ? void 0 : _$Appointment42$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38184
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter31 = _.Encounter) === null || _$Encounter31 === void 0 ? void 0 : (_$Encounter31$patient = _$Encounter31.patient_id) === null || _$Encounter31$patient === void 0 ? void 0 : (_$Encounter31$patient2 = _$Encounter31$patient[0]) === null || _$Encounter31$patient2 === void 0 ? void 0 : (_$Encounter31$patient3 = _$Encounter31$patient2.name) === null || _$Encounter31$patient3 === void 0 ? void 0 : _$Encounter31$patient3[0]) || {}),
|
|
38185
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter32 = _.Encounter) === null || _$Encounter32 === void 0 ? void 0 : (_$Encounter32$patient = _$Encounter32.patient_id) === null || _$Encounter32$patient === void 0 ? void 0 : (_$Encounter32$patient2 = _$Encounter32$patient[0]) === null || _$Encounter32$patient2 === void 0 ? void 0 : _$Encounter32$patient2.MRN,
|
|
38186
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment43 = _.Appointment) === null || _$Appointment43 === void 0 ? void 0 : _$Appointment43.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment44 = _.Appointment) === null || _$Appointment44 === void 0 ? void 0 : _$Appointment44.start).format("DD MMM,YYYY") : "",
|
|
38187
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment45 = _.Appointment) === null || _$Appointment45 === void 0 ? void 0 : _$Appointment45.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment46 = _.Appointment) === null || _$Appointment46 === void 0 ? void 0 : _$Appointment46.start).format("hh:mm A") : "",
|
|
38188
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment47 = _.Appointment) === null || _$Appointment47 === void 0 ? void 0 : (_$Appointment47$Speci = _$Appointment47.SpecialtyID) === null || _$Appointment47$Speci === void 0 ? void 0 : _$Appointment47$Speci.map(function (spl) {
|
|
38189
|
+
var _spl$coding6, _spl$coding6$;
|
|
38190
|
+
|
|
38191
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding6 = spl.coding) === null || _spl$coding6 === void 0 ? void 0 : (_spl$coding6$ = _spl$coding6[0]) === null || _spl$coding6$ === void 0 ? void 0 : _spl$coding6$.display;
|
|
38192
|
+
}).join(", "),
|
|
38193
|
+
clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter33 = _.Encounter) === null || _$Encounter33 === void 0 ? void 0 : (_$Encounter33$practit = _$Encounter33.practitioner_details) === null || _$Encounter33$practit === void 0 ? void 0 : (_$Encounter33$practit2 = _$Encounter33$practit[0]) === null || _$Encounter33$practit2 === void 0 ? void 0 : _$Encounter33$practit2.clinic,
|
|
38194
|
+
dob: _ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : (_$Appointment48$Perso = _$Appointment48.PersonID) === null || _$Appointment48$Perso === void 0 ? void 0 : (_$Appointment48$Perso2 = _$Appointment48$Perso[0]) === null || _$Appointment48$Perso2 === void 0 ? void 0 : _$Appointment48$Perso2.birthDay,
|
|
38195
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter34 = _.Encounter) === null || _$Encounter34 === void 0 ? void 0 : (_$Encounter34$patient = _$Encounter34.patient_id) === null || _$Encounter34$patient === void 0 ? void 0 : (_$Encounter34$patient2 = _$Encounter34$patient[0]) === null || _$Encounter34$patient2 === void 0 ? void 0 : (_$Encounter34$patient3 = _$Encounter34$patient2.telecom) === null || _$Encounter34$patient3 === void 0 ? void 0 : (_$Encounter34$patient4 = _$Encounter34$patient3[0]) === null || _$Encounter34$patient4 === void 0 ? void 0 : _$Encounter34$patient4.value),
|
|
38196
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter35 = _.Encounter) === null || _$Encounter35 === void 0 ? void 0 : _$Encounter35.visit_type,
|
|
38197
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter36 = _.Encounter) === null || _$Encounter36 === void 0 ? void 0 : (_$Encounter36$status = _$Encounter36.status) === null || _$Encounter36$status === void 0 ? void 0 : _$Encounter36$status.display,
|
|
37814
38198
|
"Register Visit": true,
|
|
37815
38199
|
"Modify Appointment": true,
|
|
37816
38200
|
"Cancel Appointment": true,
|
|
@@ -37854,27 +38238,32 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
|
|
|
37854
38238
|
_context7.prev = 2;
|
|
37855
38239
|
_context7.next = 5;
|
|
37856
38240
|
return fetchData$3({
|
|
37857
|
-
body: query$4.getAppointmentsNurse(payload)
|
|
38241
|
+
body: JSON.stringify(query$4.getAppointmentsNurse(payload))
|
|
37858
38242
|
}, __readDocumentUrl__);
|
|
37859
38243
|
|
|
37860
38244
|
case 5:
|
|
37861
38245
|
data = _context7.sent;
|
|
37862
38246
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result7 = data.result) === null || _data$result7 === void 0 ? void 0 : _data$result7.map(function (_) {
|
|
37863
|
-
var _$
|
|
38247
|
+
var _$appointmentId, _$appointmentId$, _$appointmentId$$Pers, _$appointmentId$$Pers2, _$appointmentId$$Pers3, _$appointmentId$$Pers4, _$appointmentId2, _$appointmentId2$, _$appointmentId2$$Per, _$appointmentId2$$Per2, _$appointmentId2$$Per3, _$appointmentId2$$Per4, _$patient_id, _$patient_id$, _$patient_id$$name, _$patient_id2, _$patient_id2$, _$patient_id3, _$patient_id3$, _$appointmentId3, _$appointmentId3$, _$appointmentId4, _$appointmentId4$, _$appointmentId5, _$appointmentId5$, _$appointmentId6, _$appointmentId6$, _$appointmentId7, _$appointmentId7$, _$visit_type, _$appointmentId8, _$appointmentId8$, _$appointmentId8$$Spe, _$practitioner_detail, _$practitioner_detail2, _$status;
|
|
37864
38248
|
|
|
37865
38249
|
return {
|
|
37866
|
-
|
|
37867
|
-
|
|
37868
|
-
|
|
37869
|
-
|
|
37870
|
-
|
|
37871
|
-
|
|
37872
|
-
|
|
37873
|
-
"
|
|
37874
|
-
|
|
37875
|
-
|
|
38250
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId = _.appointmentId) === null || _$appointmentId === void 0 ? void 0 : (_$appointmentId$ = _$appointmentId[0]) === null || _$appointmentId$ === void 0 ? void 0 : (_$appointmentId$$Pers = _$appointmentId$.PersonID) === null || _$appointmentId$$Pers === void 0 ? void 0 : (_$appointmentId$$Pers2 = _$appointmentId$$Pers[0]) === null || _$appointmentId$$Pers2 === void 0 ? void 0 : (_$appointmentId$$Pers3 = _$appointmentId$$Pers2.photo) === null || _$appointmentId$$Pers3 === void 0 ? void 0 : (_$appointmentId$$Pers4 = _$appointmentId$$Pers3[0]) === null || _$appointmentId$$Pers4 === void 0 ? void 0 : _$appointmentId$$Pers4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId2 = _.appointmentId) === null || _$appointmentId2 === void 0 ? void 0 : (_$appointmentId2$ = _$appointmentId2[0]) === null || _$appointmentId2$ === void 0 ? void 0 : (_$appointmentId2$$Per = _$appointmentId2$.PersonID) === null || _$appointmentId2$$Per === void 0 ? void 0 : (_$appointmentId2$$Per2 = _$appointmentId2$$Per[0]) === null || _$appointmentId2$$Per2 === void 0 ? void 0 : (_$appointmentId2$$Per3 = _$appointmentId2$$Per2.photo) === null || _$appointmentId2$$Per3 === void 0 ? void 0 : (_$appointmentId2$$Per4 = _$appointmentId2$$Per3[0]) === null || _$appointmentId2$$Per4 === void 0 ? void 0 : _$appointmentId2$$Per4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38251
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id = _.patient_id) === null || _$patient_id === void 0 ? void 0 : (_$patient_id$ = _$patient_id[0]) === null || _$patient_id$ === void 0 ? void 0 : (_$patient_id$$name = _$patient_id$.name) === null || _$patient_id$$name === void 0 ? void 0 : _$patient_id$$name[0]) || {}),
|
|
38252
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id2 = _.patient_id) === null || _$patient_id2 === void 0 ? void 0 : (_$patient_id2$ = _$patient_id2[0]) === null || _$patient_id2$ === void 0 ? void 0 : _$patient_id2$.alias) || "",
|
|
38253
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id3 = _.patient_id) === null || _$patient_id3 === void 0 ? void 0 : (_$patient_id3$ = _$patient_id3[0]) === null || _$patient_id3$ === void 0 ? void 0 : _$patient_id3$.age,
|
|
38254
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : (_$appointmentId3$ = _$appointmentId3[0]) === null || _$appointmentId3$ === void 0 ? void 0 : _$appointmentId3$.appno) || "",
|
|
38255
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : _$appointmentId4$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId5 = _.appointmentId) === null || _$appointmentId5 === void 0 ? void 0 : (_$appointmentId5$ = _$appointmentId5[0]) === null || _$appointmentId5$ === void 0 ? void 0 : _$appointmentId5$.start).format("DD MMM,YYYY") : "",
|
|
38256
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId6 = _.appointmentId) === null || _$appointmentId6 === void 0 ? void 0 : (_$appointmentId6$ = _$appointmentId6[0]) === null || _$appointmentId6$ === void 0 ? void 0 : _$appointmentId6$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId7 = _.appointmentId) === null || _$appointmentId7 === void 0 ? void 0 : (_$appointmentId7$ = _$appointmentId7[0]) === null || _$appointmentId7$ === void 0 ? void 0 : _$appointmentId7$.start).format("hh:mm A") : "",
|
|
38257
|
+
visitType: (_$visit_type = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type !== void 0 ? _$visit_type : "",
|
|
38258
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : (_$appointmentId8$$Spe = _$appointmentId8$.SpecialtyID) === null || _$appointmentId8$$Spe === void 0 ? void 0 : _$appointmentId8$$Spe.map(function (spl) {
|
|
38259
|
+
var _spl$coding7, _spl$coding7$;
|
|
38260
|
+
|
|
38261
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding7 = spl.coding) === null || _spl$coding7 === void 0 ? void 0 : (_spl$coding7$ = _spl$coding7[0]) === null || _spl$coding7$ === void 0 ? void 0 : _spl$coding7$.display;
|
|
38262
|
+
}).join(", "),
|
|
38263
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail = _.practitioner_details) === null || _$practitioner_detail === void 0 ? void 0 : (_$practitioner_detail2 = _$practitioner_detail[0]) === null || _$practitioner_detail2 === void 0 ? void 0 : _$practitioner_detail2.clinic) || "",
|
|
38264
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display) || "",
|
|
37876
38265
|
"View Patient": true,
|
|
37877
|
-
|
|
38266
|
+
Attend: true
|
|
37878
38267
|
};
|
|
37879
38268
|
}) : [];
|
|
37880
38269
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -37913,27 +38302,32 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
|
|
|
37913
38302
|
_context8.prev = 2;
|
|
37914
38303
|
_context8.next = 5;
|
|
37915
38304
|
return fetchData$3({
|
|
37916
|
-
body: query$4.getFirstVisitsNurse(payload)
|
|
38305
|
+
body: JSON.stringify(query$4.getFirstVisitsNurse(payload))
|
|
37917
38306
|
}, __readDocumentUrl__);
|
|
37918
38307
|
|
|
37919
38308
|
case 5:
|
|
37920
38309
|
data = _context8.sent;
|
|
37921
38310
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result8 = data.result) === null || _data$result8 === void 0 ? void 0 : _data$result8.map(function (_) {
|
|
37922
|
-
var _$
|
|
38311
|
+
var _$appointmentId9, _$appointmentId9$, _$appointmentId9$$Per, _$appointmentId9$$Per2, _$appointmentId9$$Per3, _$appointmentId9$$Per4, _$appointmentId10, _$appointmentId10$, _$appointmentId10$$Pe, _$appointmentId10$$Pe2, _$appointmentId10$$Pe3, _$appointmentId10$$Pe4, _$patient_id4, _$patient_id4$, _$patient_id4$$name, _$patient_id5, _$patient_id5$, _$patient_id6, _$patient_id6$, _$appointmentId11, _$appointmentId11$, _$appointmentId12, _$appointmentId12$, _$appointmentId13, _$appointmentId13$, _$appointmentId14, _$appointmentId14$, _$appointmentId15, _$appointmentId15$, _$visit_type2, _$appointmentId16, _$appointmentId16$, _$appointmentId16$$Sp, _$practitioner_detail3, _$practitioner_detail4, _$status2;
|
|
37923
38312
|
|
|
37924
38313
|
return {
|
|
37925
|
-
|
|
37926
|
-
|
|
37927
|
-
|
|
37928
|
-
|
|
37929
|
-
|
|
37930
|
-
|
|
37931
|
-
|
|
37932
|
-
"
|
|
37933
|
-
|
|
37934
|
-
|
|
38314
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : (_$appointmentId9$$Per = _$appointmentId9$.PersonID) === null || _$appointmentId9$$Per === void 0 ? void 0 : (_$appointmentId9$$Per2 = _$appointmentId9$$Per[0]) === null || _$appointmentId9$$Per2 === void 0 ? void 0 : (_$appointmentId9$$Per3 = _$appointmentId9$$Per2.photo) === null || _$appointmentId9$$Per3 === void 0 ? void 0 : (_$appointmentId9$$Per4 = _$appointmentId9$$Per3[0]) === null || _$appointmentId9$$Per4 === void 0 ? void 0 : _$appointmentId9$$Per4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : (_$appointmentId10$$Pe = _$appointmentId10$.PersonID) === null || _$appointmentId10$$Pe === void 0 ? void 0 : (_$appointmentId10$$Pe2 = _$appointmentId10$$Pe[0]) === null || _$appointmentId10$$Pe2 === void 0 ? void 0 : (_$appointmentId10$$Pe3 = _$appointmentId10$$Pe2.photo) === null || _$appointmentId10$$Pe3 === void 0 ? void 0 : (_$appointmentId10$$Pe4 = _$appointmentId10$$Pe3[0]) === null || _$appointmentId10$$Pe4 === void 0 ? void 0 : _$appointmentId10$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38315
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id4 = _.patient_id) === null || _$patient_id4 === void 0 ? void 0 : (_$patient_id4$ = _$patient_id4[0]) === null || _$patient_id4$ === void 0 ? void 0 : (_$patient_id4$$name = _$patient_id4$.name) === null || _$patient_id4$$name === void 0 ? void 0 : _$patient_id4$$name[0]) || {}),
|
|
38316
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id5 = _.patient_id) === null || _$patient_id5 === void 0 ? void 0 : (_$patient_id5$ = _$patient_id5[0]) === null || _$patient_id5$ === void 0 ? void 0 : _$patient_id5$.alias) || "",
|
|
38317
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id6 = _.patient_id) === null || _$patient_id6 === void 0 ? void 0 : (_$patient_id6$ = _$patient_id6[0]) === null || _$patient_id6$ === void 0 ? void 0 : _$patient_id6$.age,
|
|
38318
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId11 = _.appointmentId) === null || _$appointmentId11 === void 0 ? void 0 : (_$appointmentId11$ = _$appointmentId11[0]) === null || _$appointmentId11$ === void 0 ? void 0 : _$appointmentId11$.appno) || "",
|
|
38319
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId12 = _.appointmentId) === null || _$appointmentId12 === void 0 ? void 0 : (_$appointmentId12$ = _$appointmentId12[0]) === null || _$appointmentId12$ === void 0 ? void 0 : _$appointmentId12$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId13 = _.appointmentId) === null || _$appointmentId13 === void 0 ? void 0 : (_$appointmentId13$ = _$appointmentId13[0]) === null || _$appointmentId13$ === void 0 ? void 0 : _$appointmentId13$.start).format("DD MMM,YYYY") : "",
|
|
38320
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId14 = _.appointmentId) === null || _$appointmentId14 === void 0 ? void 0 : (_$appointmentId14$ = _$appointmentId14[0]) === null || _$appointmentId14$ === void 0 ? void 0 : _$appointmentId14$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : _$appointmentId15$.start).format("hh:mm A") : "",
|
|
38321
|
+
visitType: (_$visit_type2 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type2 !== void 0 ? _$visit_type2 : "",
|
|
38322
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : (_$appointmentId16$$Sp = _$appointmentId16$.SpecialtyID) === null || _$appointmentId16$$Sp === void 0 ? void 0 : _$appointmentId16$$Sp.map(function (spl) {
|
|
38323
|
+
var _spl$coding8, _spl$coding8$;
|
|
38324
|
+
|
|
38325
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding8 = spl.coding) === null || _spl$coding8 === void 0 ? void 0 : (_spl$coding8$ = _spl$coding8[0]) === null || _spl$coding8$ === void 0 ? void 0 : _spl$coding8$.display;
|
|
38326
|
+
}).join(", "),
|
|
38327
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail3 = _.practitioner_details) === null || _$practitioner_detail3 === void 0 ? void 0 : (_$practitioner_detail4 = _$practitioner_detail3[0]) === null || _$practitioner_detail4 === void 0 ? void 0 : _$practitioner_detail4.clinic) || "",
|
|
38328
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display) || "",
|
|
37935
38329
|
"View Patient": true,
|
|
37936
|
-
|
|
38330
|
+
Attend: true
|
|
37937
38331
|
};
|
|
37938
38332
|
}) : [];
|
|
37939
38333
|
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -37972,27 +38366,32 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
|
|
|
37972
38366
|
_context9.prev = 2;
|
|
37973
38367
|
_context9.next = 5;
|
|
37974
38368
|
return fetchData$3({
|
|
37975
|
-
body: query$4.getNewPatientsNurse(payload)
|
|
38369
|
+
body: JSON.stringify(query$4.getNewPatientsNurse(payload))
|
|
37976
38370
|
}, __readDocumentUrl__);
|
|
37977
38371
|
|
|
37978
38372
|
case 5:
|
|
37979
38373
|
data = _context9.sent;
|
|
37980
38374
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result9 = data.result) === null || _data$result9 === void 0 ? void 0 : _data$result9.map(function (_) {
|
|
37981
|
-
var _$
|
|
38375
|
+
var _$appointmentId17, _$appointmentId17$, _$appointmentId17$$Pe, _$appointmentId17$$Pe2, _$appointmentId17$$Pe3, _$appointmentId17$$Pe4, _$appointmentId18, _$appointmentId18$, _$appointmentId18$$Pe, _$appointmentId18$$Pe2, _$appointmentId18$$Pe3, _$appointmentId18$$Pe4, _$patient_id7, _$patient_id7$, _$patient_id7$$name, _$patient_id8, _$patient_id8$, _$patient_id9, _$patient_id9$, _$appointmentId19, _$appointmentId19$, _$appointmentId20, _$appointmentId20$, _$appointmentId21, _$appointmentId21$, _$appointmentId22, _$appointmentId22$, _$appointmentId23, _$appointmentId23$, _$visit_type3, _$appointmentId24, _$appointmentId24$, _$appointmentId24$$Sp, _$practitioner_detail5, _$practitioner_detail6, _$status3;
|
|
37982
38376
|
|
|
37983
38377
|
return {
|
|
37984
|
-
|
|
37985
|
-
|
|
37986
|
-
|
|
37987
|
-
|
|
37988
|
-
|
|
37989
|
-
|
|
37990
|
-
|
|
37991
|
-
"
|
|
37992
|
-
|
|
37993
|
-
|
|
38378
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : (_$appointmentId17$$Pe = _$appointmentId17$.PersonID) === null || _$appointmentId17$$Pe === void 0 ? void 0 : (_$appointmentId17$$Pe2 = _$appointmentId17$$Pe[0]) === null || _$appointmentId17$$Pe2 === void 0 ? void 0 : (_$appointmentId17$$Pe3 = _$appointmentId17$$Pe2.photo) === null || _$appointmentId17$$Pe3 === void 0 ? void 0 : (_$appointmentId17$$Pe4 = _$appointmentId17$$Pe3[0]) === null || _$appointmentId17$$Pe4 === void 0 ? void 0 : _$appointmentId17$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : (_$appointmentId18$$Pe = _$appointmentId18$.PersonID) === null || _$appointmentId18$$Pe === void 0 ? void 0 : (_$appointmentId18$$Pe2 = _$appointmentId18$$Pe[0]) === null || _$appointmentId18$$Pe2 === void 0 ? void 0 : (_$appointmentId18$$Pe3 = _$appointmentId18$$Pe2.photo) === null || _$appointmentId18$$Pe3 === void 0 ? void 0 : (_$appointmentId18$$Pe4 = _$appointmentId18$$Pe3[0]) === null || _$appointmentId18$$Pe4 === void 0 ? void 0 : _$appointmentId18$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38379
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id7 = _.patient_id) === null || _$patient_id7 === void 0 ? void 0 : (_$patient_id7$ = _$patient_id7[0]) === null || _$patient_id7$ === void 0 ? void 0 : (_$patient_id7$$name = _$patient_id7$.name) === null || _$patient_id7$$name === void 0 ? void 0 : _$patient_id7$$name[0]) || {}),
|
|
38380
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id8 = _.patient_id) === null || _$patient_id8 === void 0 ? void 0 : (_$patient_id8$ = _$patient_id8[0]) === null || _$patient_id8$ === void 0 ? void 0 : _$patient_id8$.alias) || "",
|
|
38381
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id9 = _.patient_id) === null || _$patient_id9 === void 0 ? void 0 : (_$patient_id9$ = _$patient_id9[0]) === null || _$patient_id9$ === void 0 ? void 0 : _$patient_id9$.age,
|
|
38382
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId19 = _.appointmentId) === null || _$appointmentId19 === void 0 ? void 0 : (_$appointmentId19$ = _$appointmentId19[0]) === null || _$appointmentId19$ === void 0 ? void 0 : _$appointmentId19$.appno) || "",
|
|
38383
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId20 = _.appointmentId) === null || _$appointmentId20 === void 0 ? void 0 : (_$appointmentId20$ = _$appointmentId20[0]) === null || _$appointmentId20$ === void 0 ? void 0 : _$appointmentId20$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId21 = _.appointmentId) === null || _$appointmentId21 === void 0 ? void 0 : (_$appointmentId21$ = _$appointmentId21[0]) === null || _$appointmentId21$ === void 0 ? void 0 : _$appointmentId21$.start).format("DD MMM,YYYY") : "",
|
|
38384
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId22 = _.appointmentId) === null || _$appointmentId22 === void 0 ? void 0 : (_$appointmentId22$ = _$appointmentId22[0]) === null || _$appointmentId22$ === void 0 ? void 0 : _$appointmentId22$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId23 = _.appointmentId) === null || _$appointmentId23 === void 0 ? void 0 : (_$appointmentId23$ = _$appointmentId23[0]) === null || _$appointmentId23$ === void 0 ? void 0 : _$appointmentId23$.start).format("hh:mm A") : "",
|
|
38385
|
+
visitType: (_$visit_type3 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type3 !== void 0 ? _$visit_type3 : "",
|
|
38386
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId24 = _.appointmentId) === null || _$appointmentId24 === void 0 ? void 0 : (_$appointmentId24$ = _$appointmentId24[0]) === null || _$appointmentId24$ === void 0 ? void 0 : (_$appointmentId24$$Sp = _$appointmentId24$.SpecialtyID) === null || _$appointmentId24$$Sp === void 0 ? void 0 : _$appointmentId24$$Sp.map(function (spl) {
|
|
38387
|
+
var _spl$coding9, _spl$coding9$;
|
|
38388
|
+
|
|
38389
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding9 = spl.coding) === null || _spl$coding9 === void 0 ? void 0 : (_spl$coding9$ = _spl$coding9[0]) === null || _spl$coding9$ === void 0 ? void 0 : _spl$coding9$.display;
|
|
38390
|
+
}).join(", "),
|
|
38391
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail5 = _.practitioner_details) === null || _$practitioner_detail5 === void 0 ? void 0 : (_$practitioner_detail6 = _$practitioner_detail5[0]) === null || _$practitioner_detail6 === void 0 ? void 0 : _$practitioner_detail6.clinic) || "",
|
|
38392
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display) || "",
|
|
37994
38393
|
"View Patient": true,
|
|
37995
|
-
|
|
38394
|
+
Attend: true
|
|
37996
38395
|
};
|
|
37997
38396
|
}) : [];
|
|
37998
38397
|
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38031,27 +38430,32 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
|
|
|
38031
38430
|
_context10.prev = 2;
|
|
38032
38431
|
_context10.next = 5;
|
|
38033
38432
|
return fetchData$3({
|
|
38034
|
-
body: query$4.getOtherVisitsNurse(payload)
|
|
38433
|
+
body: JSON.stringify(query$4.getOtherVisitsNurse(payload))
|
|
38035
38434
|
}, __readDocumentUrl__);
|
|
38036
38435
|
|
|
38037
38436
|
case 5:
|
|
38038
38437
|
data = _context10.sent;
|
|
38039
38438
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result10 = data.result) === null || _data$result10 === void 0 ? void 0 : _data$result10.map(function (_) {
|
|
38040
|
-
var _$
|
|
38439
|
+
var _$appointmentId25, _$appointmentId25$, _$appointmentId25$$Pe, _$appointmentId25$$Pe2, _$appointmentId25$$Pe3, _$appointmentId25$$Pe4, _$appointmentId26, _$appointmentId26$, _$appointmentId26$$Pe, _$appointmentId26$$Pe2, _$appointmentId26$$Pe3, _$appointmentId26$$Pe4, _$patient_id10, _$patient_id10$, _$patient_id10$$name, _$patient_id11, _$patient_id11$, _$patient_id12, _$patient_id12$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$appointmentId30, _$appointmentId30$, _$appointmentId31, _$appointmentId31$, _$visit_type4, _$appointmentId32, _$appointmentId32$, _$appointmentId32$$Sp, _$practitioner_detail7, _$practitioner_detail8, _$status4;
|
|
38041
38440
|
|
|
38042
38441
|
return {
|
|
38043
|
-
|
|
38044
|
-
|
|
38045
|
-
|
|
38046
|
-
|
|
38047
|
-
|
|
38048
|
-
|
|
38049
|
-
|
|
38050
|
-
"
|
|
38051
|
-
|
|
38052
|
-
|
|
38442
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId25 = _.appointmentId) === null || _$appointmentId25 === void 0 ? void 0 : (_$appointmentId25$ = _$appointmentId25[0]) === null || _$appointmentId25$ === void 0 ? void 0 : (_$appointmentId25$$Pe = _$appointmentId25$.PersonID) === null || _$appointmentId25$$Pe === void 0 ? void 0 : (_$appointmentId25$$Pe2 = _$appointmentId25$$Pe[0]) === null || _$appointmentId25$$Pe2 === void 0 ? void 0 : (_$appointmentId25$$Pe3 = _$appointmentId25$$Pe2.photo) === null || _$appointmentId25$$Pe3 === void 0 ? void 0 : (_$appointmentId25$$Pe4 = _$appointmentId25$$Pe3[0]) === null || _$appointmentId25$$Pe4 === void 0 ? void 0 : _$appointmentId25$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId26 = _.appointmentId) === null || _$appointmentId26 === void 0 ? void 0 : (_$appointmentId26$ = _$appointmentId26[0]) === null || _$appointmentId26$ === void 0 ? void 0 : (_$appointmentId26$$Pe = _$appointmentId26$.PersonID) === null || _$appointmentId26$$Pe === void 0 ? void 0 : (_$appointmentId26$$Pe2 = _$appointmentId26$$Pe[0]) === null || _$appointmentId26$$Pe2 === void 0 ? void 0 : (_$appointmentId26$$Pe3 = _$appointmentId26$$Pe2.photo) === null || _$appointmentId26$$Pe3 === void 0 ? void 0 : (_$appointmentId26$$Pe4 = _$appointmentId26$$Pe3[0]) === null || _$appointmentId26$$Pe4 === void 0 ? void 0 : _$appointmentId26$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38443
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id10 = _.patient_id) === null || _$patient_id10 === void 0 ? void 0 : (_$patient_id10$ = _$patient_id10[0]) === null || _$patient_id10$ === void 0 ? void 0 : (_$patient_id10$$name = _$patient_id10$.name) === null || _$patient_id10$$name === void 0 ? void 0 : _$patient_id10$$name[0]) || {}),
|
|
38444
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id11 = _.patient_id) === null || _$patient_id11 === void 0 ? void 0 : (_$patient_id11$ = _$patient_id11[0]) === null || _$patient_id11$ === void 0 ? void 0 : _$patient_id11$.alias) || "",
|
|
38445
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id12 = _.patient_id) === null || _$patient_id12 === void 0 ? void 0 : (_$patient_id12$ = _$patient_id12[0]) === null || _$patient_id12$ === void 0 ? void 0 : _$patient_id12$.age,
|
|
38446
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId27 = _.appointmentId) === null || _$appointmentId27 === void 0 ? void 0 : (_$appointmentId27$ = _$appointmentId27[0]) === null || _$appointmentId27$ === void 0 ? void 0 : _$appointmentId27$.appno) || "",
|
|
38447
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId28 = _.appointmentId) === null || _$appointmentId28 === void 0 ? void 0 : (_$appointmentId28$ = _$appointmentId28[0]) === null || _$appointmentId28$ === void 0 ? void 0 : _$appointmentId28$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId29 = _.appointmentId) === null || _$appointmentId29 === void 0 ? void 0 : (_$appointmentId29$ = _$appointmentId29[0]) === null || _$appointmentId29$ === void 0 ? void 0 : _$appointmentId29$.start).format("DD MMM,YYYY") : "",
|
|
38448
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId30 = _.appointmentId) === null || _$appointmentId30 === void 0 ? void 0 : (_$appointmentId30$ = _$appointmentId30[0]) === null || _$appointmentId30$ === void 0 ? void 0 : _$appointmentId30$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId31 = _.appointmentId) === null || _$appointmentId31 === void 0 ? void 0 : (_$appointmentId31$ = _$appointmentId31[0]) === null || _$appointmentId31$ === void 0 ? void 0 : _$appointmentId31$.start).format("hh:mm A") : "",
|
|
38449
|
+
visitType: (_$visit_type4 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type4 !== void 0 ? _$visit_type4 : "",
|
|
38450
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId32 = _.appointmentId) === null || _$appointmentId32 === void 0 ? void 0 : (_$appointmentId32$ = _$appointmentId32[0]) === null || _$appointmentId32$ === void 0 ? void 0 : (_$appointmentId32$$Sp = _$appointmentId32$.SpecialtyID) === null || _$appointmentId32$$Sp === void 0 ? void 0 : _$appointmentId32$$Sp.map(function (spl) {
|
|
38451
|
+
var _spl$coding10, _spl$coding10$;
|
|
38452
|
+
|
|
38453
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding10 = spl.coding) === null || _spl$coding10 === void 0 ? void 0 : (_spl$coding10$ = _spl$coding10[0]) === null || _spl$coding10$ === void 0 ? void 0 : _spl$coding10$.display;
|
|
38454
|
+
}).join(", "),
|
|
38455
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail7 = _.practitioner_details) === null || _$practitioner_detail7 === void 0 ? void 0 : (_$practitioner_detail8 = _$practitioner_detail7[0]) === null || _$practitioner_detail8 === void 0 ? void 0 : _$practitioner_detail8.clinic) || "",
|
|
38456
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display) || "",
|
|
38053
38457
|
"View Patient": true,
|
|
38054
|
-
|
|
38458
|
+
Attend: true
|
|
38055
38459
|
};
|
|
38056
38460
|
}) : [];
|
|
38057
38461
|
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38090,27 +38494,31 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
|
|
|
38090
38494
|
_context11.prev = 2;
|
|
38091
38495
|
_context11.next = 5;
|
|
38092
38496
|
return fetchData$3({
|
|
38093
|
-
body: query$4.getTodayVisitsNurse(payload)
|
|
38497
|
+
body: JSON.stringify(query$4.getTodayVisitsNurse(payload))
|
|
38094
38498
|
}, __readDocumentUrl__);
|
|
38095
38499
|
|
|
38096
38500
|
case 5:
|
|
38097
38501
|
data = _context11.sent;
|
|
38098
38502
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result11 = data.result) === null || _data$result11 === void 0 ? void 0 : _data$result11.map(function (_) {
|
|
38099
|
-
var _$
|
|
38503
|
+
var _$appointmentId33, _$appointmentId33$, _$appointmentId33$$Pe, _$appointmentId33$$Pe2, _$appointmentId33$$Pe3, _$appointmentId34, _$appointmentId34$, _$appointmentId34$$Pe, _$appointmentId34$$Pe2, _$appointmentId34$$Pe3, _$patient_id13, _$patient_id13$, _$patient_id13$$name, _$patient_id14, _$patient_id14$, _$patient_id15, _$patient_id15$, _$appointmentId35, _$appointmentId35$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId38, _$appointmentId38$, _$appointmentId39, _$appointmentId39$, _$appointmentId39$$Sp, _$patient_id16, _$patient_id16$, _$patient_id16$$telec, _$patient_id16$$telec2, _$status5;
|
|
38100
38504
|
|
|
38101
38505
|
return {
|
|
38102
|
-
|
|
38103
|
-
|
|
38104
|
-
|
|
38105
|
-
|
|
38106
|
-
|
|
38107
|
-
|
|
38108
|
-
|
|
38109
|
-
|
|
38110
|
-
|
|
38111
|
-
|
|
38112
|
-
"
|
|
38113
|
-
"
|
|
38506
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId33 = _.appointmentId) === null || _$appointmentId33 === void 0 ? void 0 : (_$appointmentId33$ = _$appointmentId33[0]) === null || _$appointmentId33$ === void 0 ? void 0 : (_$appointmentId33$$Pe = _$appointmentId33$.PersonID) === null || _$appointmentId33$$Pe === void 0 ? void 0 : (_$appointmentId33$$Pe2 = _$appointmentId33$$Pe[0]) === null || _$appointmentId33$$Pe2 === void 0 ? void 0 : (_$appointmentId33$$Pe3 = _$appointmentId33$$Pe2.photo[0]) === null || _$appointmentId33$$Pe3 === void 0 ? void 0 : _$appointmentId33$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId34 = _.appointmentId) === null || _$appointmentId34 === void 0 ? void 0 : (_$appointmentId34$ = _$appointmentId34[0]) === null || _$appointmentId34$ === void 0 ? void 0 : (_$appointmentId34$$Pe = _$appointmentId34$.PersonID) === null || _$appointmentId34$$Pe === void 0 ? void 0 : (_$appointmentId34$$Pe2 = _$appointmentId34$$Pe[0]) === null || _$appointmentId34$$Pe2 === void 0 ? void 0 : (_$appointmentId34$$Pe3 = _$appointmentId34$$Pe2.photo[0]) === null || _$appointmentId34$$Pe3 === void 0 ? void 0 : _$appointmentId34$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38507
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id13 = _.patient_id) === null || _$patient_id13 === void 0 ? void 0 : (_$patient_id13$ = _$patient_id13[0]) === null || _$patient_id13$ === void 0 ? void 0 : (_$patient_id13$$name = _$patient_id13$.name) === null || _$patient_id13$$name === void 0 ? void 0 : _$patient_id13$$name[0]) || {}),
|
|
38508
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id14 = _.patient_id) === null || _$patient_id14 === void 0 ? void 0 : (_$patient_id14$ = _$patient_id14[0]) === null || _$patient_id14$ === void 0 ? void 0 : _$patient_id14$.MRN,
|
|
38509
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id15 = _.patient_id) === null || _$patient_id15 === void 0 ? void 0 : (_$patient_id15$ = _$patient_id15[0]) === null || _$patient_id15$ === void 0 ? void 0 : _$patient_id15$.age,
|
|
38510
|
+
orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId35 = _.appointmentId) === null || _$appointmentId35 === void 0 ? void 0 : (_$appointmentId35$ = _$appointmentId35[0]) === null || _$appointmentId35$ === void 0 ? void 0 : _$appointmentId35$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : _$appointmentId36$.start).format("DD MMM,YYYY") : "",
|
|
38511
|
+
orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : _$appointmentId37$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : _$appointmentId38$.start).format("hh:mm A") : "",
|
|
38512
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : (_$appointmentId39$$Sp = _$appointmentId39$.SpecialtyID) === null || _$appointmentId39$$Sp === void 0 ? void 0 : _$appointmentId39$$Sp.map(function (spl) {
|
|
38513
|
+
var _spl$coding11, _spl$coding11$;
|
|
38514
|
+
|
|
38515
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding11 = spl.coding) === null || _spl$coding11 === void 0 ? void 0 : (_spl$coding11$ = _spl$coding11[0]) === null || _spl$coding11$ === void 0 ? void 0 : _spl$coding11$.display;
|
|
38516
|
+
}).join(", "),
|
|
38517
|
+
ward: "Ward 1",
|
|
38518
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id16 = _.patient_id) === null || _$patient_id16 === void 0 ? void 0 : (_$patient_id16$ = _$patient_id16[0]) === null || _$patient_id16$ === void 0 ? void 0 : (_$patient_id16$$telec = _$patient_id16$.telecom) === null || _$patient_id16$$telec === void 0 ? void 0 : (_$patient_id16$$telec2 = _$patient_id16$$telec[0]) === null || _$patient_id16$$telec2 === void 0 ? void 0 : _$patient_id16$$telec2.value),
|
|
38519
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
38520
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display,
|
|
38521
|
+
view: true
|
|
38114
38522
|
};
|
|
38115
38523
|
}) : [];
|
|
38116
38524
|
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38149,27 +38557,32 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
|
|
|
38149
38557
|
_context12.prev = 2;
|
|
38150
38558
|
_context12.next = 5;
|
|
38151
38559
|
return fetchData$3({
|
|
38152
|
-
body: query$4.getWalkInsNurse(payload)
|
|
38560
|
+
body: JSON.stringify(query$4.getWalkInsNurse(payload))
|
|
38153
38561
|
}, __readDocumentUrl__);
|
|
38154
38562
|
|
|
38155
38563
|
case 5:
|
|
38156
38564
|
data = _context12.sent;
|
|
38157
38565
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result12 = data.result) === null || _data$result12 === void 0 ? void 0 : _data$result12.map(function (_) {
|
|
38158
|
-
var _$
|
|
38566
|
+
var _$appointmentId40, _$appointmentId40$, _$appointmentId40$$Pe, _$appointmentId40$$Pe2, _$appointmentId40$$Pe3, _$appointmentId40$$Pe4, _$appointmentId41, _$appointmentId41$, _$appointmentId41$$Pe, _$appointmentId41$$Pe2, _$appointmentId41$$Pe3, _$appointmentId41$$Pe4, _$patient_id17, _$patient_id17$, _$patient_id17$$name, _$patient_id18, _$patient_id18$, _$patient_id19, _$patient_id19$, _$appointmentId42, _$appointmentId42$, _$appointmentId43, _$appointmentId43$, _$appointmentId44, _$appointmentId44$, _$appointmentId45, _$appointmentId45$, _$appointmentId46, _$appointmentId46$, _$visit_type5, _$appointmentId47, _$appointmentId47$, _$appointmentId47$$Sp, _$practitioner_detail9, _$practitioner_detail10, _$status6;
|
|
38159
38567
|
|
|
38160
38568
|
return {
|
|
38161
|
-
|
|
38162
|
-
|
|
38163
|
-
|
|
38164
|
-
|
|
38165
|
-
|
|
38166
|
-
|
|
38167
|
-
|
|
38168
|
-
"
|
|
38169
|
-
|
|
38170
|
-
|
|
38569
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : (_$appointmentId40$$Pe = _$appointmentId40$.PersonID) === null || _$appointmentId40$$Pe === void 0 ? void 0 : (_$appointmentId40$$Pe2 = _$appointmentId40$$Pe[0]) === null || _$appointmentId40$$Pe2 === void 0 ? void 0 : (_$appointmentId40$$Pe3 = _$appointmentId40$$Pe2.photo) === null || _$appointmentId40$$Pe3 === void 0 ? void 0 : (_$appointmentId40$$Pe4 = _$appointmentId40$$Pe3[0]) === null || _$appointmentId40$$Pe4 === void 0 ? void 0 : _$appointmentId40$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId41 = _.appointmentId) === null || _$appointmentId41 === void 0 ? void 0 : (_$appointmentId41$ = _$appointmentId41[0]) === null || _$appointmentId41$ === void 0 ? void 0 : (_$appointmentId41$$Pe = _$appointmentId41$.PersonID) === null || _$appointmentId41$$Pe === void 0 ? void 0 : (_$appointmentId41$$Pe2 = _$appointmentId41$$Pe[0]) === null || _$appointmentId41$$Pe2 === void 0 ? void 0 : (_$appointmentId41$$Pe3 = _$appointmentId41$$Pe2.photo) === null || _$appointmentId41$$Pe3 === void 0 ? void 0 : (_$appointmentId41$$Pe4 = _$appointmentId41$$Pe3[0]) === null || _$appointmentId41$$Pe4 === void 0 ? void 0 : _$appointmentId41$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38570
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id17 = _.patient_id) === null || _$patient_id17 === void 0 ? void 0 : (_$patient_id17$ = _$patient_id17[0]) === null || _$patient_id17$ === void 0 ? void 0 : (_$patient_id17$$name = _$patient_id17$.name) === null || _$patient_id17$$name === void 0 ? void 0 : _$patient_id17$$name[0]) || {}),
|
|
38571
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id18 = _.patient_id) === null || _$patient_id18 === void 0 ? void 0 : (_$patient_id18$ = _$patient_id18[0]) === null || _$patient_id18$ === void 0 ? void 0 : _$patient_id18$.alias) || "",
|
|
38572
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : _$patient_id19$.age,
|
|
38573
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : _$appointmentId42$.appno) || "",
|
|
38574
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId43 = _.appointmentId) === null || _$appointmentId43 === void 0 ? void 0 : (_$appointmentId43$ = _$appointmentId43[0]) === null || _$appointmentId43$ === void 0 ? void 0 : _$appointmentId43$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId44 = _.appointmentId) === null || _$appointmentId44 === void 0 ? void 0 : (_$appointmentId44$ = _$appointmentId44[0]) === null || _$appointmentId44$ === void 0 ? void 0 : _$appointmentId44$.start).format("DD MMM,YYYY") : "",
|
|
38575
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : _$appointmentId45$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : _$appointmentId46$.start).format("hh:mm A") : "",
|
|
38576
|
+
visitType: (_$visit_type5 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type5 !== void 0 ? _$visit_type5 : "",
|
|
38577
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : (_$appointmentId47$$Sp = _$appointmentId47$.SpecialtyID) === null || _$appointmentId47$$Sp === void 0 ? void 0 : _$appointmentId47$$Sp.map(function (spl) {
|
|
38578
|
+
var _spl$coding12, _spl$coding12$;
|
|
38579
|
+
|
|
38580
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding12 = spl.coding) === null || _spl$coding12 === void 0 ? void 0 : (_spl$coding12$ = _spl$coding12[0]) === null || _spl$coding12$ === void 0 ? void 0 : _spl$coding12$.display;
|
|
38581
|
+
}).join(", "),
|
|
38582
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail9 = _.practitioner_details) === null || _$practitioner_detail9 === void 0 ? void 0 : (_$practitioner_detail10 = _$practitioner_detail9[0]) === null || _$practitioner_detail10 === void 0 ? void 0 : _$practitioner_detail10.clinic) || "",
|
|
38583
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display) || "",
|
|
38171
38584
|
"View Patient": true,
|
|
38172
|
-
|
|
38585
|
+
Attend: true
|
|
38173
38586
|
};
|
|
38174
38587
|
}) : [];
|
|
38175
38588
|
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38209,27 +38622,31 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
|
|
|
38209
38622
|
_context13.prev = 2;
|
|
38210
38623
|
_context13.next = 5;
|
|
38211
38624
|
return fetchData$3({
|
|
38212
|
-
body: query$4.getAppointmentsDoctor(payload)
|
|
38625
|
+
body: JSON.stringify(query$4.getAppointmentsDoctor(payload))
|
|
38213
38626
|
}, __readDocumentUrl__);
|
|
38214
38627
|
|
|
38215
38628
|
case 5:
|
|
38216
38629
|
data = _context13.sent;
|
|
38217
38630
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result13 = data.result) === null || _data$result13 === void 0 ? void 0 : _data$result13.map(function (_) {
|
|
38218
|
-
var _$
|
|
38631
|
+
var _$appointmentId48, _$appointmentId48$, _$appointmentId48$$Pe, _$appointmentId48$$Pe2, _$appointmentId48$$Pe3, _$appointmentId48$$Pe4, _$appointmentId49, _$appointmentId49$, _$appointmentId49$$Pe, _$appointmentId49$$Pe2, _$appointmentId49$$Pe3, _$appointmentId49$$Pe4, _$patient_id20, _$patient_id20$, _$patient_id20$$name, _$patient_id21, _$patient_id21$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$appointmentId54, _$appointmentId54$, _$visit_type6, _$appointmentId55, _$appointmentId55$, _$appointmentId55$$Sp, _$practitioner_detail11, _$practitioner_detail12, _$status7;
|
|
38219
38632
|
|
|
38220
38633
|
return {
|
|
38221
|
-
|
|
38222
|
-
|
|
38223
|
-
|
|
38224
|
-
|
|
38225
|
-
|
|
38226
|
-
|
|
38227
|
-
|
|
38228
|
-
|
|
38229
|
-
|
|
38230
|
-
|
|
38634
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : (_$appointmentId48$$Pe = _$appointmentId48$.PersonID) === null || _$appointmentId48$$Pe === void 0 ? void 0 : (_$appointmentId48$$Pe2 = _$appointmentId48$$Pe[0]) === null || _$appointmentId48$$Pe2 === void 0 ? void 0 : (_$appointmentId48$$Pe3 = _$appointmentId48$$Pe2.photo) === null || _$appointmentId48$$Pe3 === void 0 ? void 0 : (_$appointmentId48$$Pe4 = _$appointmentId48$$Pe3[0]) === null || _$appointmentId48$$Pe4 === void 0 ? void 0 : _$appointmentId48$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : (_$appointmentId49$$Pe = _$appointmentId49$.PersonID) === null || _$appointmentId49$$Pe === void 0 ? void 0 : (_$appointmentId49$$Pe2 = _$appointmentId49$$Pe[0]) === null || _$appointmentId49$$Pe2 === void 0 ? void 0 : (_$appointmentId49$$Pe3 = _$appointmentId49$$Pe2.photo) === null || _$appointmentId49$$Pe3 === void 0 ? void 0 : (_$appointmentId49$$Pe4 = _$appointmentId49$$Pe3[0]) === null || _$appointmentId49$$Pe4 === void 0 ? void 0 : _$appointmentId49$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38635
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : (_$patient_id20$ = _$patient_id20[0]) === null || _$patient_id20$ === void 0 ? void 0 : (_$patient_id20$$name = _$patient_id20$.name) === null || _$patient_id20$$name === void 0 ? void 0 : _$patient_id20$$name[0]) || {}),
|
|
38636
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : _$patient_id21$.MRN) || "",
|
|
38637
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : _$appointmentId50$.appno) || "",
|
|
38638
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : _$appointmentId51$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : _$appointmentId52$.start).format("DD MMM,YYYY") : "",
|
|
38639
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId53 = _.appointmentId) === null || _$appointmentId53 === void 0 ? void 0 : (_$appointmentId53$ = _$appointmentId53[0]) === null || _$appointmentId53$ === void 0 ? void 0 : _$appointmentId53$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId54 = _.appointmentId) === null || _$appointmentId54 === void 0 ? void 0 : (_$appointmentId54$ = _$appointmentId54[0]) === null || _$appointmentId54$ === void 0 ? void 0 : _$appointmentId54$.start).format("hh:mm A") : "",
|
|
38640
|
+
visitType: (_$visit_type6 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type6 !== void 0 ? _$visit_type6 : "",
|
|
38641
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : (_$appointmentId55$$Sp = _$appointmentId55$.SpecialtyID) === null || _$appointmentId55$$Sp === void 0 ? void 0 : _$appointmentId55$$Sp.map(function (spl) {
|
|
38642
|
+
var _spl$coding13, _spl$coding13$;
|
|
38643
|
+
|
|
38644
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding13 = spl.coding) === null || _spl$coding13 === void 0 ? void 0 : (_spl$coding13$ = _spl$coding13[0]) === null || _spl$coding13$ === void 0 ? void 0 : _spl$coding13$.display;
|
|
38645
|
+
}).join(", "),
|
|
38646
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail11 = _.practitioner_details) === null || _$practitioner_detail11 === void 0 ? void 0 : (_$practitioner_detail12 = _$practitioner_detail11[0]) === null || _$practitioner_detail12 === void 0 ? void 0 : _$practitioner_detail12.clinic) || "",
|
|
38647
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display) || "",
|
|
38231
38648
|
"View Patient": true,
|
|
38232
|
-
|
|
38649
|
+
Attend: true
|
|
38233
38650
|
};
|
|
38234
38651
|
}) : [];
|
|
38235
38652
|
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38268,27 +38685,31 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
|
|
|
38268
38685
|
_context14.prev = 2;
|
|
38269
38686
|
_context14.next = 5;
|
|
38270
38687
|
return fetchData$3({
|
|
38271
|
-
body: query$4.getFirstVisitsDoctor(payload)
|
|
38688
|
+
body: JSON.stringify(query$4.getFirstVisitsDoctor(payload))
|
|
38272
38689
|
}, __readDocumentUrl__);
|
|
38273
38690
|
|
|
38274
38691
|
case 5:
|
|
38275
38692
|
data = _context14.sent;
|
|
38276
38693
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result14 = data.result) === null || _data$result14 === void 0 ? void 0 : _data$result14.map(function (_) {
|
|
38277
|
-
var _$
|
|
38694
|
+
var _$appointmentId56, _$appointmentId56$, _$appointmentId56$$Pe, _$appointmentId56$$Pe2, _$appointmentId56$$Pe3, _$appointmentId56$$Pe4, _$appointmentId57, _$appointmentId57$, _$appointmentId57$$Pe, _$appointmentId57$$Pe2, _$appointmentId57$$Pe3, _$appointmentId57$$Pe4, _$patient_id22, _$patient_id22$, _$patient_id22$$name, _$patient_id23, _$patient_id23$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$appointmentId60, _$appointmentId60$, _$appointmentId61, _$appointmentId61$, _$appointmentId62, _$appointmentId62$, _$visit_type7, _$appointmentId63, _$appointmentId63$, _$appointmentId63$$Sp, _$practitioner_detail13, _$practitioner_detail14, _$status8;
|
|
38278
38695
|
|
|
38279
38696
|
return {
|
|
38280
|
-
|
|
38281
|
-
|
|
38282
|
-
|
|
38283
|
-
|
|
38284
|
-
|
|
38285
|
-
|
|
38286
|
-
|
|
38287
|
-
|
|
38288
|
-
|
|
38289
|
-
|
|
38697
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : (_$appointmentId56$$Pe = _$appointmentId56$.PersonID) === null || _$appointmentId56$$Pe === void 0 ? void 0 : (_$appointmentId56$$Pe2 = _$appointmentId56$$Pe[0]) === null || _$appointmentId56$$Pe2 === void 0 ? void 0 : (_$appointmentId56$$Pe3 = _$appointmentId56$$Pe2.photo) === null || _$appointmentId56$$Pe3 === void 0 ? void 0 : (_$appointmentId56$$Pe4 = _$appointmentId56$$Pe3[0]) === null || _$appointmentId56$$Pe4 === void 0 ? void 0 : _$appointmentId56$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : (_$appointmentId57$$Pe = _$appointmentId57$.PersonID) === null || _$appointmentId57$$Pe === void 0 ? void 0 : (_$appointmentId57$$Pe2 = _$appointmentId57$$Pe[0]) === null || _$appointmentId57$$Pe2 === void 0 ? void 0 : (_$appointmentId57$$Pe3 = _$appointmentId57$$Pe2.photo) === null || _$appointmentId57$$Pe3 === void 0 ? void 0 : (_$appointmentId57$$Pe4 = _$appointmentId57$$Pe3[0]) === null || _$appointmentId57$$Pe4 === void 0 ? void 0 : _$appointmentId57$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38698
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id22 = _.patient_id) === null || _$patient_id22 === void 0 ? void 0 : (_$patient_id22$ = _$patient_id22[0]) === null || _$patient_id22$ === void 0 ? void 0 : (_$patient_id22$$name = _$patient_id22$.name) === null || _$patient_id22$$name === void 0 ? void 0 : _$patient_id22$$name[0]) || {}),
|
|
38699
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id23 = _.patient_id) === null || _$patient_id23 === void 0 ? void 0 : (_$patient_id23$ = _$patient_id23[0]) === null || _$patient_id23$ === void 0 ? void 0 : _$patient_id23$.MRN) || "",
|
|
38700
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId58 = _.appointmentId) === null || _$appointmentId58 === void 0 ? void 0 : (_$appointmentId58$ = _$appointmentId58[0]) === null || _$appointmentId58$ === void 0 ? void 0 : _$appointmentId58$.appno) || "",
|
|
38701
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId59 = _.appointmentId) === null || _$appointmentId59 === void 0 ? void 0 : (_$appointmentId59$ = _$appointmentId59[0]) === null || _$appointmentId59$ === void 0 ? void 0 : _$appointmentId59$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : _$appointmentId60$.start).format("DD MMM,YYYY") : "",
|
|
38702
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : _$appointmentId61$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId62 = _.appointmentId) === null || _$appointmentId62 === void 0 ? void 0 : (_$appointmentId62$ = _$appointmentId62[0]) === null || _$appointmentId62$ === void 0 ? void 0 : _$appointmentId62$.start).format("hh:mm A") : "",
|
|
38703
|
+
visitType: (_$visit_type7 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type7 !== void 0 ? _$visit_type7 : "",
|
|
38704
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId63 = _.appointmentId) === null || _$appointmentId63 === void 0 ? void 0 : (_$appointmentId63$ = _$appointmentId63[0]) === null || _$appointmentId63$ === void 0 ? void 0 : (_$appointmentId63$$Sp = _$appointmentId63$.SpecialtyID) === null || _$appointmentId63$$Sp === void 0 ? void 0 : _$appointmentId63$$Sp.map(function (spl) {
|
|
38705
|
+
var _spl$coding14, _spl$coding14$;
|
|
38706
|
+
|
|
38707
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding14 = spl.coding) === null || _spl$coding14 === void 0 ? void 0 : (_spl$coding14$ = _spl$coding14[0]) === null || _spl$coding14$ === void 0 ? void 0 : _spl$coding14$.display;
|
|
38708
|
+
}).join(", "),
|
|
38709
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail13 = _.practitioner_details) === null || _$practitioner_detail13 === void 0 ? void 0 : (_$practitioner_detail14 = _$practitioner_detail13[0]) === null || _$practitioner_detail14 === void 0 ? void 0 : _$practitioner_detail14.clinic) || "",
|
|
38710
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display) || "",
|
|
38290
38711
|
"View Patient": true,
|
|
38291
|
-
|
|
38712
|
+
Attend: true
|
|
38292
38713
|
};
|
|
38293
38714
|
}) : [];
|
|
38294
38715
|
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38327,27 +38748,31 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
|
|
|
38327
38748
|
_context15.prev = 2;
|
|
38328
38749
|
_context15.next = 5;
|
|
38329
38750
|
return fetchData$3({
|
|
38330
|
-
body: query$4.getNewPatientsDoctor(payload)
|
|
38751
|
+
body: JSON.stringify(query$4.getNewPatientsDoctor(payload))
|
|
38331
38752
|
}, __readDocumentUrl__);
|
|
38332
38753
|
|
|
38333
38754
|
case 5:
|
|
38334
38755
|
data = _context15.sent;
|
|
38335
38756
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result15 = data.result) === null || _data$result15 === void 0 ? void 0 : _data$result15.map(function (_) {
|
|
38336
|
-
var _$
|
|
38757
|
+
var _$appointmentId64, _$appointmentId64$, _$appointmentId64$$Pe, _$appointmentId64$$Pe2, _$appointmentId64$$Pe3, _$appointmentId64$$Pe4, _$appointmentId65, _$appointmentId65$, _$appointmentId65$$Pe, _$appointmentId65$$Pe2, _$appointmentId65$$Pe3, _$appointmentId65$$Pe4, _$patient_id24, _$patient_id24$, _$patient_id24$$name, _$patient_id25, _$patient_id25$, _$appointmentId66, _$appointmentId66$, _$appointmentId67, _$appointmentId67$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$appointmentId70, _$appointmentId70$, _$visit_type8, _$appointmentId71, _$appointmentId71$, _$appointmentId71$$Sp, _$practitioner_detail15, _$practitioner_detail16, _$status9;
|
|
38337
38758
|
|
|
38338
38759
|
return {
|
|
38339
|
-
|
|
38340
|
-
|
|
38341
|
-
|
|
38342
|
-
|
|
38343
|
-
|
|
38344
|
-
|
|
38345
|
-
|
|
38346
|
-
|
|
38347
|
-
|
|
38348
|
-
|
|
38760
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId64 = _.appointmentId) === null || _$appointmentId64 === void 0 ? void 0 : (_$appointmentId64$ = _$appointmentId64[0]) === null || _$appointmentId64$ === void 0 ? void 0 : (_$appointmentId64$$Pe = _$appointmentId64$.PersonID) === null || _$appointmentId64$$Pe === void 0 ? void 0 : (_$appointmentId64$$Pe2 = _$appointmentId64$$Pe[0]) === null || _$appointmentId64$$Pe2 === void 0 ? void 0 : (_$appointmentId64$$Pe3 = _$appointmentId64$$Pe2.photo) === null || _$appointmentId64$$Pe3 === void 0 ? void 0 : (_$appointmentId64$$Pe4 = _$appointmentId64$$Pe3[0]) === null || _$appointmentId64$$Pe4 === void 0 ? void 0 : _$appointmentId64$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : (_$appointmentId65$$Pe = _$appointmentId65$.PersonID) === null || _$appointmentId65$$Pe === void 0 ? void 0 : (_$appointmentId65$$Pe2 = _$appointmentId65$$Pe[0]) === null || _$appointmentId65$$Pe2 === void 0 ? void 0 : (_$appointmentId65$$Pe3 = _$appointmentId65$$Pe2.photo) === null || _$appointmentId65$$Pe3 === void 0 ? void 0 : (_$appointmentId65$$Pe4 = _$appointmentId65$$Pe3[0]) === null || _$appointmentId65$$Pe4 === void 0 ? void 0 : _$appointmentId65$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38761
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id24 = _.patient_id) === null || _$patient_id24 === void 0 ? void 0 : (_$patient_id24$ = _$patient_id24[0]) === null || _$patient_id24$ === void 0 ? void 0 : (_$patient_id24$$name = _$patient_id24$.name) === null || _$patient_id24$$name === void 0 ? void 0 : _$patient_id24$$name[0]) || {}),
|
|
38762
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id25 = _.patient_id) === null || _$patient_id25 === void 0 ? void 0 : (_$patient_id25$ = _$patient_id25[0]) === null || _$patient_id25$ === void 0 ? void 0 : _$patient_id25$.MRN) || "",
|
|
38763
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId66 = _.appointmentId) === null || _$appointmentId66 === void 0 ? void 0 : (_$appointmentId66$ = _$appointmentId66[0]) === null || _$appointmentId66$ === void 0 ? void 0 : _$appointmentId66$.appno) || "",
|
|
38764
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId67 = _.appointmentId) === null || _$appointmentId67 === void 0 ? void 0 : (_$appointmentId67$ = _$appointmentId67[0]) === null || _$appointmentId67$ === void 0 ? void 0 : _$appointmentId67$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId68 = _.appointmentId) === null || _$appointmentId68 === void 0 ? void 0 : (_$appointmentId68$ = _$appointmentId68[0]) === null || _$appointmentId68$ === void 0 ? void 0 : _$appointmentId68$.start).format("DD MMM,YYYY") : "",
|
|
38765
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId69 = _.appointmentId) === null || _$appointmentId69 === void 0 ? void 0 : (_$appointmentId69$ = _$appointmentId69[0]) === null || _$appointmentId69$ === void 0 ? void 0 : _$appointmentId69$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId70 = _.appointmentId) === null || _$appointmentId70 === void 0 ? void 0 : (_$appointmentId70$ = _$appointmentId70[0]) === null || _$appointmentId70$ === void 0 ? void 0 : _$appointmentId70$.start).format("hh:mm A") : "",
|
|
38766
|
+
visitType: (_$visit_type8 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type8 !== void 0 ? _$visit_type8 : "",
|
|
38767
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId71 = _.appointmentId) === null || _$appointmentId71 === void 0 ? void 0 : (_$appointmentId71$ = _$appointmentId71[0]) === null || _$appointmentId71$ === void 0 ? void 0 : (_$appointmentId71$$Sp = _$appointmentId71$.SpecialtyID) === null || _$appointmentId71$$Sp === void 0 ? void 0 : _$appointmentId71$$Sp.map(function (spl) {
|
|
38768
|
+
var _spl$coding15, _spl$coding15$;
|
|
38769
|
+
|
|
38770
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding15 = spl.coding) === null || _spl$coding15 === void 0 ? void 0 : (_spl$coding15$ = _spl$coding15[0]) === null || _spl$coding15$ === void 0 ? void 0 : _spl$coding15$.display;
|
|
38771
|
+
}).join(", "),
|
|
38772
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail15 = _.practitioner_details) === null || _$practitioner_detail15 === void 0 ? void 0 : (_$practitioner_detail16 = _$practitioner_detail15[0]) === null || _$practitioner_detail16 === void 0 ? void 0 : _$practitioner_detail16.clinic) || "",
|
|
38773
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display) || "",
|
|
38349
38774
|
"View Patient": true,
|
|
38350
|
-
|
|
38775
|
+
Attend: true
|
|
38351
38776
|
};
|
|
38352
38777
|
}) : [];
|
|
38353
38778
|
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38386,27 +38811,31 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
|
|
|
38386
38811
|
_context16.prev = 2;
|
|
38387
38812
|
_context16.next = 5;
|
|
38388
38813
|
return fetchData$3({
|
|
38389
|
-
body: query$4.getOtherVisitsDoctor(payload)
|
|
38814
|
+
body: JSON.stringify(query$4.getOtherVisitsDoctor(payload))
|
|
38390
38815
|
}, __readDocumentUrl__);
|
|
38391
38816
|
|
|
38392
38817
|
case 5:
|
|
38393
38818
|
data = _context16.sent;
|
|
38394
38819
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result16 = data.result) === null || _data$result16 === void 0 ? void 0 : _data$result16.map(function (_) {
|
|
38395
|
-
var _$
|
|
38820
|
+
var _$appointmentId72, _$appointmentId72$, _$appointmentId72$$Pe, _$appointmentId72$$Pe2, _$appointmentId72$$Pe3, _$appointmentId72$$Pe4, _$appointmentId73, _$appointmentId73$, _$appointmentId73$$Pe, _$appointmentId73$$Pe2, _$appointmentId73$$Pe3, _$appointmentId73$$Pe4, _$patient_id26, _$patient_id26$, _$patient_id26$$name, _$patient_id27, _$patient_id27$, _$appointmentId74, _$appointmentId74$, _$appointmentId75, _$appointmentId75$, _$appointmentId76, _$appointmentId76$, _$appointmentId77, _$appointmentId77$, _$appointmentId78, _$appointmentId78$, _$visit_type9, _$appointmentId79, _$appointmentId79$, _$appointmentId79$$Sp, _$practitioner_detail17, _$practitioner_detail18, _$status10;
|
|
38396
38821
|
|
|
38397
38822
|
return {
|
|
38398
|
-
|
|
38399
|
-
|
|
38400
|
-
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
|
|
38404
|
-
|
|
38405
|
-
|
|
38406
|
-
|
|
38407
|
-
|
|
38823
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId72 = _.appointmentId) === null || _$appointmentId72 === void 0 ? void 0 : (_$appointmentId72$ = _$appointmentId72[0]) === null || _$appointmentId72$ === void 0 ? void 0 : (_$appointmentId72$$Pe = _$appointmentId72$.PersonID) === null || _$appointmentId72$$Pe === void 0 ? void 0 : (_$appointmentId72$$Pe2 = _$appointmentId72$$Pe[0]) === null || _$appointmentId72$$Pe2 === void 0 ? void 0 : (_$appointmentId72$$Pe3 = _$appointmentId72$$Pe2.photo) === null || _$appointmentId72$$Pe3 === void 0 ? void 0 : (_$appointmentId72$$Pe4 = _$appointmentId72$$Pe3[0]) === null || _$appointmentId72$$Pe4 === void 0 ? void 0 : _$appointmentId72$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId73 = _.appointmentId) === null || _$appointmentId73 === void 0 ? void 0 : (_$appointmentId73$ = _$appointmentId73[0]) === null || _$appointmentId73$ === void 0 ? void 0 : (_$appointmentId73$$Pe = _$appointmentId73$.PersonID) === null || _$appointmentId73$$Pe === void 0 ? void 0 : (_$appointmentId73$$Pe2 = _$appointmentId73$$Pe[0]) === null || _$appointmentId73$$Pe2 === void 0 ? void 0 : (_$appointmentId73$$Pe3 = _$appointmentId73$$Pe2.photo) === null || _$appointmentId73$$Pe3 === void 0 ? void 0 : (_$appointmentId73$$Pe4 = _$appointmentId73$$Pe3[0]) === null || _$appointmentId73$$Pe4 === void 0 ? void 0 : _$appointmentId73$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38824
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id26 = _.patient_id) === null || _$patient_id26 === void 0 ? void 0 : (_$patient_id26$ = _$patient_id26[0]) === null || _$patient_id26$ === void 0 ? void 0 : (_$patient_id26$$name = _$patient_id26$.name) === null || _$patient_id26$$name === void 0 ? void 0 : _$patient_id26$$name[0]) || {}),
|
|
38825
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : _$patient_id27$.MRN) || "",
|
|
38826
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId74 = _.appointmentId) === null || _$appointmentId74 === void 0 ? void 0 : (_$appointmentId74$ = _$appointmentId74[0]) === null || _$appointmentId74$ === void 0 ? void 0 : _$appointmentId74$.appno) || "",
|
|
38827
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId75 = _.appointmentId) === null || _$appointmentId75 === void 0 ? void 0 : (_$appointmentId75$ = _$appointmentId75[0]) === null || _$appointmentId75$ === void 0 ? void 0 : _$appointmentId75$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId76 = _.appointmentId) === null || _$appointmentId76 === void 0 ? void 0 : (_$appointmentId76$ = _$appointmentId76[0]) === null || _$appointmentId76$ === void 0 ? void 0 : _$appointmentId76$.start).format("DD MMM,YYYY") : "",
|
|
38828
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId77 = _.appointmentId) === null || _$appointmentId77 === void 0 ? void 0 : (_$appointmentId77$ = _$appointmentId77[0]) === null || _$appointmentId77$ === void 0 ? void 0 : _$appointmentId77$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId78 = _.appointmentId) === null || _$appointmentId78 === void 0 ? void 0 : (_$appointmentId78$ = _$appointmentId78[0]) === null || _$appointmentId78$ === void 0 ? void 0 : _$appointmentId78$.start).format("hh:mm A") : "",
|
|
38829
|
+
visitType: (_$visit_type9 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type9 !== void 0 ? _$visit_type9 : "",
|
|
38830
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId79 = _.appointmentId) === null || _$appointmentId79 === void 0 ? void 0 : (_$appointmentId79$ = _$appointmentId79[0]) === null || _$appointmentId79$ === void 0 ? void 0 : (_$appointmentId79$$Sp = _$appointmentId79$.SpecialtyID) === null || _$appointmentId79$$Sp === void 0 ? void 0 : _$appointmentId79$$Sp.map(function (spl) {
|
|
38831
|
+
var _spl$coding16, _spl$coding16$;
|
|
38832
|
+
|
|
38833
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding16 = spl.coding) === null || _spl$coding16 === void 0 ? void 0 : (_spl$coding16$ = _spl$coding16[0]) === null || _spl$coding16$ === void 0 ? void 0 : _spl$coding16$.display;
|
|
38834
|
+
}).join(", "),
|
|
38835
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail17 = _.practitioner_details) === null || _$practitioner_detail17 === void 0 ? void 0 : (_$practitioner_detail18 = _$practitioner_detail17[0]) === null || _$practitioner_detail18 === void 0 ? void 0 : _$practitioner_detail18.clinic) || "",
|
|
38836
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status10 = _.status) === null || _$status10 === void 0 ? void 0 : _$status10.display) || "",
|
|
38408
38837
|
"View Patient": true,
|
|
38409
|
-
|
|
38838
|
+
Attend: true
|
|
38410
38839
|
};
|
|
38411
38840
|
}) : [];
|
|
38412
38841
|
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38445,27 +38874,31 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
|
|
|
38445
38874
|
_context17.prev = 2;
|
|
38446
38875
|
_context17.next = 5;
|
|
38447
38876
|
return fetchData$3({
|
|
38448
|
-
body: query$4.getTodayVisitsDoctor(payload)
|
|
38877
|
+
body: JSON.stringify(query$4.getTodayVisitsDoctor(payload))
|
|
38449
38878
|
}, __readDocumentUrl__);
|
|
38450
38879
|
|
|
38451
38880
|
case 5:
|
|
38452
38881
|
data = _context17.sent;
|
|
38453
38882
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result17 = data.result) === null || _data$result17 === void 0 ? void 0 : _data$result17.map(function (_) {
|
|
38454
|
-
var _$
|
|
38883
|
+
var _$appointmentId80, _$appointmentId80$, _$appointmentId80$$Pe, _$appointmentId80$$Pe2, _$appointmentId80$$Pe3, _$appointmentId80$$Pe4, _$appointmentId81, _$appointmentId81$, _$appointmentId81$$Pe, _$appointmentId81$$Pe2, _$appointmentId81$$Pe3, _$appointmentId81$$Pe4, _$patient_id28, _$patient_id28$, _$patient_id28$$name, _$patient_id29, _$patient_id29$, _$appointmentId82, _$appointmentId82$, _$appointmentId83, _$appointmentId83$, _$appointmentId84, _$appointmentId84$, _$appointmentId85, _$appointmentId85$, _$appointmentId86, _$appointmentId86$, _$visit_type10, _$appointmentId87, _$appointmentId87$, _$appointmentId87$$Sp, _$practitioner_detail19, _$practitioner_detail20, _$status11;
|
|
38455
38884
|
|
|
38456
38885
|
return {
|
|
38457
|
-
|
|
38458
|
-
|
|
38459
|
-
|
|
38460
|
-
|
|
38461
|
-
|
|
38462
|
-
|
|
38463
|
-
|
|
38464
|
-
|
|
38465
|
-
|
|
38466
|
-
|
|
38886
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId80 = _.appointmentId) === null || _$appointmentId80 === void 0 ? void 0 : (_$appointmentId80$ = _$appointmentId80[0]) === null || _$appointmentId80$ === void 0 ? void 0 : (_$appointmentId80$$Pe = _$appointmentId80$.PersonID) === null || _$appointmentId80$$Pe === void 0 ? void 0 : (_$appointmentId80$$Pe2 = _$appointmentId80$$Pe[0]) === null || _$appointmentId80$$Pe2 === void 0 ? void 0 : (_$appointmentId80$$Pe3 = _$appointmentId80$$Pe2.photo) === null || _$appointmentId80$$Pe3 === void 0 ? void 0 : (_$appointmentId80$$Pe4 = _$appointmentId80$$Pe3[0]) === null || _$appointmentId80$$Pe4 === void 0 ? void 0 : _$appointmentId80$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId81 = _.appointmentId) === null || _$appointmentId81 === void 0 ? void 0 : (_$appointmentId81$ = _$appointmentId81[0]) === null || _$appointmentId81$ === void 0 ? void 0 : (_$appointmentId81$$Pe = _$appointmentId81$.PersonID) === null || _$appointmentId81$$Pe === void 0 ? void 0 : (_$appointmentId81$$Pe2 = _$appointmentId81$$Pe[0]) === null || _$appointmentId81$$Pe2 === void 0 ? void 0 : (_$appointmentId81$$Pe3 = _$appointmentId81$$Pe2.photo) === null || _$appointmentId81$$Pe3 === void 0 ? void 0 : (_$appointmentId81$$Pe4 = _$appointmentId81$$Pe3[0]) === null || _$appointmentId81$$Pe4 === void 0 ? void 0 : _$appointmentId81$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38887
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id28 = _.patient_id) === null || _$patient_id28 === void 0 ? void 0 : (_$patient_id28$ = _$patient_id28[0]) === null || _$patient_id28$ === void 0 ? void 0 : (_$patient_id28$$name = _$patient_id28$.name) === null || _$patient_id28$$name === void 0 ? void 0 : _$patient_id28$$name[0]) || {}),
|
|
38888
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id29 = _.patient_id) === null || _$patient_id29 === void 0 ? void 0 : (_$patient_id29$ = _$patient_id29[0]) === null || _$patient_id29$ === void 0 ? void 0 : _$patient_id29$.MRN) || "",
|
|
38889
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId82 = _.appointmentId) === null || _$appointmentId82 === void 0 ? void 0 : (_$appointmentId82$ = _$appointmentId82[0]) === null || _$appointmentId82$ === void 0 ? void 0 : _$appointmentId82$.appno) || "",
|
|
38890
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId83 = _.appointmentId) === null || _$appointmentId83 === void 0 ? void 0 : (_$appointmentId83$ = _$appointmentId83[0]) === null || _$appointmentId83$ === void 0 ? void 0 : _$appointmentId83$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId84 = _.appointmentId) === null || _$appointmentId84 === void 0 ? void 0 : (_$appointmentId84$ = _$appointmentId84[0]) === null || _$appointmentId84$ === void 0 ? void 0 : _$appointmentId84$.start).format("DD MMM,YYYY") : "",
|
|
38891
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId85 = _.appointmentId) === null || _$appointmentId85 === void 0 ? void 0 : (_$appointmentId85$ = _$appointmentId85[0]) === null || _$appointmentId85$ === void 0 ? void 0 : _$appointmentId85$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId86 = _.appointmentId) === null || _$appointmentId86 === void 0 ? void 0 : (_$appointmentId86$ = _$appointmentId86[0]) === null || _$appointmentId86$ === void 0 ? void 0 : _$appointmentId86$.start).format("hh:mm A") : "",
|
|
38892
|
+
visitType: (_$visit_type10 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type10 !== void 0 ? _$visit_type10 : "",
|
|
38893
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId87 = _.appointmentId) === null || _$appointmentId87 === void 0 ? void 0 : (_$appointmentId87$ = _$appointmentId87[0]) === null || _$appointmentId87$ === void 0 ? void 0 : (_$appointmentId87$$Sp = _$appointmentId87$.SpecialtyID) === null || _$appointmentId87$$Sp === void 0 ? void 0 : _$appointmentId87$$Sp.map(function (spl) {
|
|
38894
|
+
var _spl$coding17, _spl$coding17$;
|
|
38895
|
+
|
|
38896
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding17 = spl.coding) === null || _spl$coding17 === void 0 ? void 0 : (_spl$coding17$ = _spl$coding17[0]) === null || _spl$coding17$ === void 0 ? void 0 : _spl$coding17$.display;
|
|
38897
|
+
}).join(", "),
|
|
38898
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail19 = _.practitioner_details) === null || _$practitioner_detail19 === void 0 ? void 0 : (_$practitioner_detail20 = _$practitioner_detail19[0]) === null || _$practitioner_detail20 === void 0 ? void 0 : _$practitioner_detail20.clinic) || "",
|
|
38899
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status11 = _.status) === null || _$status11 === void 0 ? void 0 : _$status11.display) || "",
|
|
38467
38900
|
"View Patient": true,
|
|
38468
|
-
|
|
38901
|
+
Attend: true
|
|
38469
38902
|
};
|
|
38470
38903
|
}) : [];
|
|
38471
38904
|
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38504,27 +38937,31 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
|
|
|
38504
38937
|
_context18.prev = 2;
|
|
38505
38938
|
_context18.next = 5;
|
|
38506
38939
|
return fetchData$3({
|
|
38507
|
-
body: query$4.getWalkInsDoctor(payload)
|
|
38940
|
+
body: JSON.stringify(query$4.getWalkInsDoctor(payload))
|
|
38508
38941
|
}, __readDocumentUrl__);
|
|
38509
38942
|
|
|
38510
38943
|
case 5:
|
|
38511
38944
|
data = _context18.sent;
|
|
38512
38945
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result18 = data.result) === null || _data$result18 === void 0 ? void 0 : _data$result18.map(function (_) {
|
|
38513
|
-
var _$
|
|
38946
|
+
var _$appointmentId88, _$appointmentId88$, _$appointmentId88$$Pe, _$appointmentId88$$Pe2, _$appointmentId88$$Pe3, _$appointmentId88$$Pe4, _$appointmentId89, _$appointmentId89$, _$appointmentId89$$Pe, _$appointmentId89$$Pe2, _$appointmentId89$$Pe3, _$appointmentId89$$Pe4, _$patient_id30, _$patient_id30$, _$patient_id30$$name, _$patient_id31, _$patient_id31$, _$appointmentId90, _$appointmentId90$, _$appointmentId91, _$appointmentId91$, _$appointmentId92, _$appointmentId92$, _$appointmentId93, _$appointmentId93$, _$appointmentId94, _$appointmentId94$, _$visit_type11, _$appointmentId95, _$appointmentId95$, _$appointmentId95$$Sp, _$practitioner_detail21, _$practitioner_detail22, _$status12;
|
|
38514
38947
|
|
|
38515
38948
|
return {
|
|
38516
|
-
|
|
38517
|
-
|
|
38518
|
-
|
|
38519
|
-
|
|
38520
|
-
|
|
38521
|
-
|
|
38522
|
-
|
|
38523
|
-
|
|
38524
|
-
|
|
38525
|
-
|
|
38949
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId88 = _.appointmentId) === null || _$appointmentId88 === void 0 ? void 0 : (_$appointmentId88$ = _$appointmentId88[0]) === null || _$appointmentId88$ === void 0 ? void 0 : (_$appointmentId88$$Pe = _$appointmentId88$.PersonID) === null || _$appointmentId88$$Pe === void 0 ? void 0 : (_$appointmentId88$$Pe2 = _$appointmentId88$$Pe[0]) === null || _$appointmentId88$$Pe2 === void 0 ? void 0 : (_$appointmentId88$$Pe3 = _$appointmentId88$$Pe2.photo) === null || _$appointmentId88$$Pe3 === void 0 ? void 0 : (_$appointmentId88$$Pe4 = _$appointmentId88$$Pe3[0]) === null || _$appointmentId88$$Pe4 === void 0 ? void 0 : _$appointmentId88$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId89 = _.appointmentId) === null || _$appointmentId89 === void 0 ? void 0 : (_$appointmentId89$ = _$appointmentId89[0]) === null || _$appointmentId89$ === void 0 ? void 0 : (_$appointmentId89$$Pe = _$appointmentId89$.PersonID) === null || _$appointmentId89$$Pe === void 0 ? void 0 : (_$appointmentId89$$Pe2 = _$appointmentId89$$Pe[0]) === null || _$appointmentId89$$Pe2 === void 0 ? void 0 : (_$appointmentId89$$Pe3 = _$appointmentId89$$Pe2.photo) === null || _$appointmentId89$$Pe3 === void 0 ? void 0 : (_$appointmentId89$$Pe4 = _$appointmentId89$$Pe3[0]) === null || _$appointmentId89$$Pe4 === void 0 ? void 0 : _$appointmentId89$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38950
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id30 = _.patient_id) === null || _$patient_id30 === void 0 ? void 0 : (_$patient_id30$ = _$patient_id30[0]) === null || _$patient_id30$ === void 0 ? void 0 : (_$patient_id30$$name = _$patient_id30$.name) === null || _$patient_id30$$name === void 0 ? void 0 : _$patient_id30$$name[0]) || {}),
|
|
38951
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id31 = _.patient_id) === null || _$patient_id31 === void 0 ? void 0 : (_$patient_id31$ = _$patient_id31[0]) === null || _$patient_id31$ === void 0 ? void 0 : _$patient_id31$.MRN) || "",
|
|
38952
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId90 = _.appointmentId) === null || _$appointmentId90 === void 0 ? void 0 : (_$appointmentId90$ = _$appointmentId90[0]) === null || _$appointmentId90$ === void 0 ? void 0 : _$appointmentId90$.appno) || "",
|
|
38953
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId91 = _.appointmentId) === null || _$appointmentId91 === void 0 ? void 0 : (_$appointmentId91$ = _$appointmentId91[0]) === null || _$appointmentId91$ === void 0 ? void 0 : _$appointmentId91$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId92 = _.appointmentId) === null || _$appointmentId92 === void 0 ? void 0 : (_$appointmentId92$ = _$appointmentId92[0]) === null || _$appointmentId92$ === void 0 ? void 0 : _$appointmentId92$.start).format("DD MMM,YYYY") : "",
|
|
38954
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId93 = _.appointmentId) === null || _$appointmentId93 === void 0 ? void 0 : (_$appointmentId93$ = _$appointmentId93[0]) === null || _$appointmentId93$ === void 0 ? void 0 : _$appointmentId93$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId94 = _.appointmentId) === null || _$appointmentId94 === void 0 ? void 0 : (_$appointmentId94$ = _$appointmentId94[0]) === null || _$appointmentId94$ === void 0 ? void 0 : _$appointmentId94$.start).format("hh:mm A") : "",
|
|
38955
|
+
visitType: (_$visit_type11 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type11 !== void 0 ? _$visit_type11 : "",
|
|
38956
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId95 = _.appointmentId) === null || _$appointmentId95 === void 0 ? void 0 : (_$appointmentId95$ = _$appointmentId95[0]) === null || _$appointmentId95$ === void 0 ? void 0 : (_$appointmentId95$$Sp = _$appointmentId95$.SpecialtyID) === null || _$appointmentId95$$Sp === void 0 ? void 0 : _$appointmentId95$$Sp.map(function (spl) {
|
|
38957
|
+
var _spl$coding18, _spl$coding18$;
|
|
38958
|
+
|
|
38959
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding18 = spl.coding) === null || _spl$coding18 === void 0 ? void 0 : (_spl$coding18$ = _spl$coding18[0]) === null || _spl$coding18$ === void 0 ? void 0 : _spl$coding18$.display;
|
|
38960
|
+
}).join(", "),
|
|
38961
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail21 = _.practitioner_details) === null || _$practitioner_detail21 === void 0 ? void 0 : (_$practitioner_detail22 = _$practitioner_detail21[0]) === null || _$practitioner_detail22 === void 0 ? void 0 : _$practitioner_detail22.clinic) || "",
|
|
38962
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status12 = _.status) === null || _$status12 === void 0 ? void 0 : _$status12.display) || "",
|
|
38526
38963
|
"View Patient": true,
|
|
38527
|
-
|
|
38964
|
+
Attend: true
|
|
38528
38965
|
};
|
|
38529
38966
|
}) : [];
|
|
38530
38967
|
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39025,12 +39462,11 @@ var ALERT_INTERACTIONS_UPERT = createAsyncThunk("alertIntractionsSlice/alertInte
|
|
|
39025
39462
|
case 11:
|
|
39026
39463
|
_context2.prev = 11;
|
|
39027
39464
|
_context2.t0 = _context2["catch"](2);
|
|
39028
|
-
debugger;
|
|
39029
39465
|
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39030
39466
|
message: _context2.t0.message
|
|
39031
39467
|
})));
|
|
39032
39468
|
|
|
39033
|
-
case
|
|
39469
|
+
case 14:
|
|
39034
39470
|
case "end":
|
|
39035
39471
|
return _context2.stop();
|
|
39036
39472
|
}
|
|
@@ -39793,42 +40229,100 @@ var consultActions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2
|
|
|
39793
40229
|
var query$2 = {
|
|
39794
40230
|
//FRONTDESK
|
|
39795
40231
|
getPatientsCheckedIn: function getPatientsCheckedIn(data) {
|
|
39796
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id ==
|
|
40232
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})\"\n }");
|
|
39797
40233
|
},
|
|
39798
40234
|
getTriageDone: function getTriageDone(data) {
|
|
39799
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"
|
|
40235
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged' \",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})\"\n }");
|
|
39800
40236
|
},
|
|
39801
40237
|
getVisitCompleted: function getVisitCompleted(data) {
|
|
39802
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"
|
|
40238
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})\"\n }");
|
|
39803
40239
|
},
|
|
39804
40240
|
getPatientsNoShows: function getPatientsNoShows(data) {
|
|
39805
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.orgid==
|
|
40241
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.orgid== ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && 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.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30\",\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)}))}))})\"\n }");
|
|
39806
40242
|
},
|
|
39807
40243
|
//NURSE
|
|
39808
40244
|
getPatientsCheckedInNurse: function getPatientsCheckedInNurse(data) {
|
|
39809
|
-
return
|
|
40245
|
+
return {
|
|
40246
|
+
db_name: dbName,
|
|
40247
|
+
entity: "Practitioner,Encounter",
|
|
40248
|
+
filter: {
|
|
40249
|
+
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40250
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'")
|
|
40251
|
+
},
|
|
40252
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40253
|
+
};
|
|
39810
40254
|
},
|
|
39811
40255
|
getVisitCompletedNurse: function getVisitCompletedNurse(data) {
|
|
39812
|
-
return
|
|
40256
|
+
return {
|
|
40257
|
+
db_name: dbName,
|
|
40258
|
+
entity: "Practitioner,Encounter",
|
|
40259
|
+
filter: {
|
|
40260
|
+
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40261
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010'")
|
|
40262
|
+
},
|
|
40263
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40264
|
+
};
|
|
39813
40265
|
},
|
|
39814
40266
|
getPatientsNoShowsNurse: function getPatientsNoShowsNurse(data) {
|
|
39815
|
-
return
|
|
40267
|
+
return {
|
|
40268
|
+
"db_name": dbName,
|
|
40269
|
+
"entity": "Appointment",
|
|
40270
|
+
"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.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30"),
|
|
40271
|
+
"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)}))}))})"
|
|
40272
|
+
};
|
|
39816
40273
|
},
|
|
39817
40274
|
getTriageDoneNurse: function getTriageDoneNurse(data) {
|
|
39818
|
-
return
|
|
40275
|
+
return {
|
|
40276
|
+
db_name: dbName,
|
|
40277
|
+
entity: "Practitioner,Encounter",
|
|
40278
|
+
filter: {
|
|
40279
|
+
Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40280
|
+
Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged'")
|
|
40281
|
+
},
|
|
40282
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40283
|
+
};
|
|
39819
40284
|
},
|
|
39820
40285
|
//DOCTOR
|
|
39821
40286
|
getPatientsNoShowsDoctor: function getPatientsNoShowsDoctor(data) {
|
|
39822
|
-
return
|
|
40287
|
+
return {
|
|
40288
|
+
"db_name": dbName,
|
|
40289
|
+
"entity": "Appointment",
|
|
40290
|
+
"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.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30"),
|
|
40291
|
+
"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)}))}))})"
|
|
40292
|
+
};
|
|
39823
40293
|
},
|
|
39824
40294
|
getPatientsCheckedInDoctor: function getPatientsCheckedInDoctor(data) {
|
|
39825
|
-
return
|
|
40295
|
+
return {
|
|
40296
|
+
db_name: dbName,
|
|
40297
|
+
entity: "Appointment,Encounter",
|
|
40298
|
+
filter: {
|
|
40299
|
+
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, " && 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, "' "),
|
|
40300
|
+
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
|
|
40301
|
+
},
|
|
40302
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40303
|
+
};
|
|
39826
40304
|
},
|
|
39827
40305
|
getVisitCompletedDoctor: function getVisitCompletedDoctor(data) {
|
|
39828
|
-
return
|
|
40306
|
+
return {
|
|
40307
|
+
db_name: dbName,
|
|
40308
|
+
entity: "Appointment,Encounter",
|
|
40309
|
+
filter: {
|
|
40310
|
+
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, "' "),
|
|
40311
|
+
Encounter: "Appointment.id in Encounter.appointmentId && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010'"
|
|
40312
|
+
},
|
|
40313
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40314
|
+
};
|
|
39829
40315
|
},
|
|
39830
40316
|
getTriageDoneDoctor: function getTriageDoneDoctor(data) {
|
|
39831
|
-
return
|
|
40317
|
+
return {
|
|
40318
|
+
db_name: dbName,
|
|
40319
|
+
entity: "Appointment,Encounter",
|
|
40320
|
+
filter: {
|
|
40321
|
+
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, "' "),
|
|
40322
|
+
Encounter: "Appointment.id in Encounter.appointmentId && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Triaged'"
|
|
40323
|
+
},
|
|
40324
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40325
|
+
};
|
|
39832
40326
|
}
|
|
39833
40327
|
};
|
|
39834
40328
|
|
|
@@ -39858,21 +40352,25 @@ var GET_PATIENTS_CHECKED_IN = createAsyncThunk("currentVisitStatsApiSlice/getPat
|
|
|
39858
40352
|
case 5:
|
|
39859
40353
|
data = _context.sent;
|
|
39860
40354
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (_) {
|
|
39861
|
-
var _$patient_id, _$patient_id$, _$
|
|
40355
|
+
var _$appointmentId, _$appointmentId$, _$appointmentId$$Pers, _$appointmentId$$Pers2, _$appointmentId$$Pers3, _$appointmentId2, _$appointmentId2$, _$appointmentId2$$Per, _$appointmentId2$$Per2, _$appointmentId2$$Per3, _$patient_id, _$patient_id$, _$patient_id$$name, _$patient_id2, _$patient_id2$, _$appointmentId3, _$appointmentId3$, _$appointmentId4, _$appointmentId4$, _$appointmentId5, _$appointmentId5$, _$appointmentId6, _$appointmentId6$, _$appointmentId7, _$appointmentId7$, _$appointmentId7$$Spe, _$patient_id3, _$patient_id3$, _$patient_id4, _$patient_id4$, _$patient_id4$$teleco, _$patient_id4$$teleco2, _$status;
|
|
39862
40356
|
|
|
39863
40357
|
return {
|
|
39864
|
-
|
|
39865
|
-
|
|
39866
|
-
|
|
39867
|
-
|
|
39868
|
-
|
|
39869
|
-
|
|
39870
|
-
|
|
39871
|
-
|
|
39872
|
-
|
|
39873
|
-
|
|
39874
|
-
"
|
|
39875
|
-
|
|
40358
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId = _.appointmentId) === null || _$appointmentId === void 0 ? void 0 : (_$appointmentId$ = _$appointmentId[0]) === null || _$appointmentId$ === void 0 ? void 0 : (_$appointmentId$$Pers = _$appointmentId$.PersonID) === null || _$appointmentId$$Pers === void 0 ? void 0 : (_$appointmentId$$Pers2 = _$appointmentId$$Pers[0]) === null || _$appointmentId$$Pers2 === void 0 ? void 0 : (_$appointmentId$$Pers3 = _$appointmentId$$Pers2.photo[0]) === null || _$appointmentId$$Pers3 === void 0 ? void 0 : _$appointmentId$$Pers3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId2 = _.appointmentId) === null || _$appointmentId2 === void 0 ? void 0 : (_$appointmentId2$ = _$appointmentId2[0]) === null || _$appointmentId2$ === void 0 ? void 0 : (_$appointmentId2$$Per = _$appointmentId2$.PersonID) === null || _$appointmentId2$$Per === void 0 ? void 0 : (_$appointmentId2$$Per2 = _$appointmentId2$$Per[0]) === null || _$appointmentId2$$Per2 === void 0 ? void 0 : (_$appointmentId2$$Per3 = _$appointmentId2$$Per2.photo[0]) === null || _$appointmentId2$$Per3 === void 0 ? void 0 : _$appointmentId2$$Per3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40359
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id = _.patient_id) === null || _$patient_id === void 0 ? void 0 : (_$patient_id$ = _$patient_id[0]) === null || _$patient_id$ === void 0 ? void 0 : (_$patient_id$$name = _$patient_id$.name) === null || _$patient_id$$name === void 0 ? void 0 : _$patient_id$$name[0]) || {}),
|
|
40360
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id2 = _.patient_id) === null || _$patient_id2 === void 0 ? void 0 : (_$patient_id2$ = _$patient_id2[0]) === null || _$patient_id2$ === void 0 ? void 0 : _$patient_id2$.MRN,
|
|
40361
|
+
orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : (_$appointmentId3$ = _$appointmentId3[0]) === null || _$appointmentId3$ === void 0 ? void 0 : _$appointmentId3$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : _$appointmentId4$.start).format("DD MMM,YYYY") : "",
|
|
40362
|
+
orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId5 = _.appointmentId) === null || _$appointmentId5 === void 0 ? void 0 : (_$appointmentId5$ = _$appointmentId5[0]) === null || _$appointmentId5$ === void 0 ? void 0 : _$appointmentId5$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId6 = _.appointmentId) === null || _$appointmentId6 === void 0 ? void 0 : (_$appointmentId6$ = _$appointmentId6[0]) === null || _$appointmentId6$ === void 0 ? void 0 : _$appointmentId6$.start).format("hh:mm A") : "",
|
|
40363
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId7 = _.appointmentId) === null || _$appointmentId7 === void 0 ? void 0 : (_$appointmentId7$ = _$appointmentId7[0]) === null || _$appointmentId7$ === void 0 ? void 0 : (_$appointmentId7$$Spe = _$appointmentId7$.SpecialtyID) === null || _$appointmentId7$$Spe === void 0 ? void 0 : _$appointmentId7$$Spe.map(function (spl) {
|
|
40364
|
+
var _spl$coding, _spl$coding$;
|
|
40365
|
+
|
|
40366
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding = spl.coding) === null || _spl$coding === void 0 ? void 0 : (_spl$coding$ = _spl$coding[0]) === null || _spl$coding$ === void 0 ? void 0 : _spl$coding$.display;
|
|
40367
|
+
}).join(", "),
|
|
40368
|
+
ward: "Ward 1",
|
|
40369
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id3 = _.patient_id) === null || _$patient_id3 === void 0 ? void 0 : (_$patient_id3$ = _$patient_id3[0]) === null || _$patient_id3$ === void 0 ? void 0 : _$patient_id3$.age,
|
|
40370
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id4 = _.patient_id) === null || _$patient_id4 === void 0 ? void 0 : (_$patient_id4$ = _$patient_id4[0]) === null || _$patient_id4$ === void 0 ? void 0 : (_$patient_id4$$teleco = _$patient_id4$.telecom) === null || _$patient_id4$$teleco === void 0 ? void 0 : (_$patient_id4$$teleco2 = _$patient_id4$$teleco[0]) === null || _$patient_id4$$teleco2 === void 0 ? void 0 : _$patient_id4$$teleco2.value),
|
|
40371
|
+
type: _ === null || _ === void 0 ? void 0 : _.visit_type,
|
|
40372
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display,
|
|
40373
|
+
view: true
|
|
39876
40374
|
};
|
|
39877
40375
|
}) : [];
|
|
39878
40376
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39917,21 +40415,25 @@ var GET_TRAIGE_DONE = createAsyncThunk("currentVisitStatsApiSlice/getTriageDone"
|
|
|
39917
40415
|
case 5:
|
|
39918
40416
|
data = _context2.sent;
|
|
39919
40417
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2.map(function (_) {
|
|
39920
|
-
var _$
|
|
40418
|
+
var _$appointmentId8, _$appointmentId8$, _$appointmentId8$$Per, _$appointmentId8$$Per2, _$appointmentId8$$Per3, _$appointmentId9, _$appointmentId9$, _$appointmentId9$$Per, _$appointmentId9$$Per2, _$appointmentId9$$Per3, _$patient_id5, _$patient_id5$, _$patient_id5$$name, _$patient_id6, _$patient_id6$, _$appointmentId10, _$appointmentId10$, _$appointmentId11, _$appointmentId11$, _$appointmentId12, _$appointmentId12$, _$appointmentId13, _$appointmentId13$, _$appointmentId14, _$appointmentId14$, _$appointmentId14$$Sp, _$patient_id7, _$patient_id7$, _$patient_id8, _$patient_id8$, _$patient_id8$$teleco, _$patient_id8$$teleco2, _$status2;
|
|
39921
40419
|
|
|
39922
40420
|
return {
|
|
39923
|
-
|
|
39924
|
-
|
|
39925
|
-
|
|
39926
|
-
|
|
39927
|
-
|
|
39928
|
-
|
|
39929
|
-
|
|
39930
|
-
|
|
39931
|
-
|
|
39932
|
-
|
|
39933
|
-
"
|
|
39934
|
-
|
|
40421
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : (_$appointmentId8$$Per = _$appointmentId8$.PersonID) === null || _$appointmentId8$$Per === void 0 ? void 0 : (_$appointmentId8$$Per2 = _$appointmentId8$$Per[0]) === null || _$appointmentId8$$Per2 === void 0 ? void 0 : (_$appointmentId8$$Per3 = _$appointmentId8$$Per2.photo[0]) === null || _$appointmentId8$$Per3 === void 0 ? void 0 : _$appointmentId8$$Per3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : (_$appointmentId9$$Per = _$appointmentId9$.PersonID) === null || _$appointmentId9$$Per === void 0 ? void 0 : (_$appointmentId9$$Per2 = _$appointmentId9$$Per[0]) === null || _$appointmentId9$$Per2 === void 0 ? void 0 : (_$appointmentId9$$Per3 = _$appointmentId9$$Per2.photo[0]) === null || _$appointmentId9$$Per3 === void 0 ? void 0 : _$appointmentId9$$Per3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40422
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id5 = _.patient_id) === null || _$patient_id5 === void 0 ? void 0 : (_$patient_id5$ = _$patient_id5[0]) === null || _$patient_id5$ === void 0 ? void 0 : (_$patient_id5$$name = _$patient_id5$.name) === null || _$patient_id5$$name === void 0 ? void 0 : _$patient_id5$$name[0]) || {}),
|
|
40423
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id6 = _.patient_id) === null || _$patient_id6 === void 0 ? void 0 : (_$patient_id6$ = _$patient_id6[0]) === null || _$patient_id6$ === void 0 ? void 0 : _$patient_id6$.MRN,
|
|
40424
|
+
orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : _$appointmentId10$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId11 = _.appointmentId) === null || _$appointmentId11 === void 0 ? void 0 : (_$appointmentId11$ = _$appointmentId11[0]) === null || _$appointmentId11$ === void 0 ? void 0 : _$appointmentId11$.start).format("DD MMM,YYYY") : "",
|
|
40425
|
+
orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId12 = _.appointmentId) === null || _$appointmentId12 === void 0 ? void 0 : (_$appointmentId12$ = _$appointmentId12[0]) === null || _$appointmentId12$ === void 0 ? void 0 : _$appointmentId12$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId13 = _.appointmentId) === null || _$appointmentId13 === void 0 ? void 0 : (_$appointmentId13$ = _$appointmentId13[0]) === null || _$appointmentId13$ === void 0 ? void 0 : _$appointmentId13$.start).format("hh:mm A") : "",
|
|
40426
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId14 = _.appointmentId) === null || _$appointmentId14 === void 0 ? void 0 : (_$appointmentId14$ = _$appointmentId14[0]) === null || _$appointmentId14$ === void 0 ? void 0 : (_$appointmentId14$$Sp = _$appointmentId14$.SpecialtyID) === null || _$appointmentId14$$Sp === void 0 ? void 0 : _$appointmentId14$$Sp.map(function (spl) {
|
|
40427
|
+
var _spl$coding2, _spl$coding2$;
|
|
40428
|
+
|
|
40429
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding2 = spl.coding) === null || _spl$coding2 === void 0 ? void 0 : (_spl$coding2$ = _spl$coding2[0]) === null || _spl$coding2$ === void 0 ? void 0 : _spl$coding2$.display;
|
|
40430
|
+
}).join(", "),
|
|
40431
|
+
ward: "Ward 1",
|
|
40432
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id7 = _.patient_id) === null || _$patient_id7 === void 0 ? void 0 : (_$patient_id7$ = _$patient_id7[0]) === null || _$patient_id7$ === void 0 ? void 0 : _$patient_id7$.age,
|
|
40433
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id8 = _.patient_id) === null || _$patient_id8 === void 0 ? void 0 : (_$patient_id8$ = _$patient_id8[0]) === null || _$patient_id8$ === void 0 ? void 0 : (_$patient_id8$$teleco = _$patient_id8$.telecom) === null || _$patient_id8$$teleco === void 0 ? void 0 : (_$patient_id8$$teleco2 = _$patient_id8$$teleco[0]) === null || _$patient_id8$$teleco2 === void 0 ? void 0 : _$patient_id8$$teleco2.value),
|
|
40434
|
+
type: _ === null || _ === void 0 ? void 0 : _.visit_type,
|
|
40435
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display,
|
|
40436
|
+
view: true
|
|
39935
40437
|
};
|
|
39936
40438
|
}) : [];
|
|
39937
40439
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39976,21 +40478,25 @@ var GET_VISIT_COMPLETED = createAsyncThunk("currentVisitStatsApiSlice/getVisitCo
|
|
|
39976
40478
|
case 5:
|
|
39977
40479
|
data = _context3.sent;
|
|
39978
40480
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : _data$result3.map(function (_) {
|
|
39979
|
-
var _$
|
|
40481
|
+
var _$appointmentId15, _$appointmentId15$, _$appointmentId15$$Pe, _$appointmentId15$$Pe2, _$appointmentId15$$Pe3, _$appointmentId16, _$appointmentId16$, _$appointmentId16$$Pe, _$appointmentId16$$Pe2, _$appointmentId16$$Pe3, _$patient_id9, _$patient_id9$, _$patient_id9$$name, _$patient_id10, _$patient_id10$, _$appointmentId17, _$appointmentId17$, _$appointmentId18, _$appointmentId18$, _$appointmentId19, _$appointmentId19$, _$appointmentId20, _$appointmentId20$, _$appointmentId21, _$appointmentId21$, _$appointmentId21$$Sp, _$patient_id11, _$patient_id11$, _$patient_id12, _$patient_id12$, _$patient_id12$$telec, _$patient_id12$$telec2, _$status3;
|
|
39980
40482
|
|
|
39981
40483
|
return {
|
|
39982
|
-
|
|
39983
|
-
|
|
39984
|
-
|
|
39985
|
-
|
|
39986
|
-
|
|
39987
|
-
|
|
39988
|
-
|
|
39989
|
-
|
|
39990
|
-
|
|
39991
|
-
|
|
39992
|
-
"
|
|
39993
|
-
|
|
40484
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : (_$appointmentId15$$Pe = _$appointmentId15$.PersonID) === null || _$appointmentId15$$Pe === void 0 ? void 0 : (_$appointmentId15$$Pe2 = _$appointmentId15$$Pe[0]) === null || _$appointmentId15$$Pe2 === void 0 ? void 0 : (_$appointmentId15$$Pe3 = _$appointmentId15$$Pe2.photo[0]) === null || _$appointmentId15$$Pe3 === void 0 ? void 0 : _$appointmentId15$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : (_$appointmentId16$$Pe = _$appointmentId16$.PersonID) === null || _$appointmentId16$$Pe === void 0 ? void 0 : (_$appointmentId16$$Pe2 = _$appointmentId16$$Pe[0]) === null || _$appointmentId16$$Pe2 === void 0 ? void 0 : (_$appointmentId16$$Pe3 = _$appointmentId16$$Pe2.photo[0]) === null || _$appointmentId16$$Pe3 === void 0 ? void 0 : _$appointmentId16$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40485
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id9 = _.patient_id) === null || _$patient_id9 === void 0 ? void 0 : (_$patient_id9$ = _$patient_id9[0]) === null || _$patient_id9$ === void 0 ? void 0 : (_$patient_id9$$name = _$patient_id9$.name) === null || _$patient_id9$$name === void 0 ? void 0 : _$patient_id9$$name[0]) || {}),
|
|
40486
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id10 = _.patient_id) === null || _$patient_id10 === void 0 ? void 0 : (_$patient_id10$ = _$patient_id10[0]) === null || _$patient_id10$ === void 0 ? void 0 : _$patient_id10$.MRN,
|
|
40487
|
+
orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : _$appointmentId17$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : _$appointmentId18$.start).format("DD MMM,YYYY") : "",
|
|
40488
|
+
orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId19 = _.appointmentId) === null || _$appointmentId19 === void 0 ? void 0 : (_$appointmentId19$ = _$appointmentId19[0]) === null || _$appointmentId19$ === void 0 ? void 0 : _$appointmentId19$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId20 = _.appointmentId) === null || _$appointmentId20 === void 0 ? void 0 : (_$appointmentId20$ = _$appointmentId20[0]) === null || _$appointmentId20$ === void 0 ? void 0 : _$appointmentId20$.start).format("hh:mm A") : "",
|
|
40489
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId21 = _.appointmentId) === null || _$appointmentId21 === void 0 ? void 0 : (_$appointmentId21$ = _$appointmentId21[0]) === null || _$appointmentId21$ === void 0 ? void 0 : (_$appointmentId21$$Sp = _$appointmentId21$.SpecialtyID) === null || _$appointmentId21$$Sp === void 0 ? void 0 : _$appointmentId21$$Sp.map(function (spl) {
|
|
40490
|
+
var _spl$coding3, _spl$coding3$;
|
|
40491
|
+
|
|
40492
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding3 = spl.coding) === null || _spl$coding3 === void 0 ? void 0 : (_spl$coding3$ = _spl$coding3[0]) === null || _spl$coding3$ === void 0 ? void 0 : _spl$coding3$.display;
|
|
40493
|
+
}).join(", "),
|
|
40494
|
+
ward: "Ward 1",
|
|
40495
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id11 = _.patient_id) === null || _$patient_id11 === void 0 ? void 0 : (_$patient_id11$ = _$patient_id11[0]) === null || _$patient_id11$ === void 0 ? void 0 : _$patient_id11$.age,
|
|
40496
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id12 = _.patient_id) === null || _$patient_id12 === void 0 ? void 0 : (_$patient_id12$ = _$patient_id12[0]) === null || _$patient_id12$ === void 0 ? void 0 : (_$patient_id12$$telec = _$patient_id12$.telecom) === null || _$patient_id12$$telec === void 0 ? void 0 : (_$patient_id12$$telec2 = _$patient_id12$$telec[0]) === null || _$patient_id12$$telec2 === void 0 ? void 0 : _$patient_id12$$telec2.value),
|
|
40497
|
+
type: _ === null || _ === void 0 ? void 0 : _.visit_type,
|
|
40498
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display,
|
|
40499
|
+
view: true
|
|
39994
40500
|
};
|
|
39995
40501
|
}) : [];
|
|
39996
40502
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40035,21 +40541,21 @@ var GET_PATIENTS_NO_SHOWS = createAsyncThunk("currentVisitStatsApiSlice/getPatie
|
|
|
40035
40541
|
case 5:
|
|
40036
40542
|
data = _context4.sent;
|
|
40037
40543
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : _data$result4.map(function (_) {
|
|
40038
|
-
var _$patient_id$0$alias, _$
|
|
40544
|
+
var _$patient_id$0$alias, _$patient_id13, _$patient_id13$, _$practitioner_detail, _$practitioner_detail2, _$practitioner_detail3, _$patient_id$0$birthD, _$patient_id14, _$patient_id14$, _$type$0$display, _$type, _$type$;
|
|
40039
40545
|
|
|
40040
40546
|
return {
|
|
40041
|
-
|
|
40042
|
-
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
|
|
40048
|
-
|
|
40049
|
-
|
|
40050
|
-
|
|
40051
|
-
|
|
40052
|
-
|
|
40547
|
+
img: "https://www.fillmurray.com/640/360",
|
|
40548
|
+
name: "Louis Barrett",
|
|
40549
|
+
mrn: (_$patient_id$0$alias = _ === null || _ === void 0 ? void 0 : (_$patient_id13 = _.patient_id) === null || _$patient_id13 === void 0 ? void 0 : (_$patient_id13$ = _$patient_id13[0]) === null || _$patient_id13$ === void 0 ? void 0 : _$patient_id13$.alias) !== null && _$patient_id$0$alias !== void 0 ? _$patient_id$0$alias : "",
|
|
40550
|
+
orderDate: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
|
|
40551
|
+
orderTime: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
|
|
40552
|
+
speciality: (_$practitioner_detail = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail2 = _.practitioner_details) === null || _$practitioner_detail2 === void 0 ? void 0 : (_$practitioner_detail3 = _$practitioner_detail2[0]) === null || _$practitioner_detail3 === void 0 ? void 0 : _$practitioner_detail3.speciality) !== null && _$practitioner_detail !== void 0 ? _$practitioner_detail : "",
|
|
40553
|
+
ward: "Ward 1",
|
|
40554
|
+
dob: (_$patient_id$0$birthD = _ === null || _ === void 0 ? void 0 : (_$patient_id14 = _.patient_id) === null || _$patient_id14 === void 0 ? void 0 : (_$patient_id14$ = _$patient_id14[0]) === null || _$patient_id14$ === void 0 ? void 0 : _$patient_id14$.birthDate) !== null && _$patient_id$0$birthD !== void 0 ? _$patient_id$0$birthD : "",
|
|
40555
|
+
contact: "Contact",
|
|
40556
|
+
type: (_$type$0$display = _ === null || _ === void 0 ? void 0 : (_$type = _.type) === null || _$type === void 0 ? void 0 : (_$type$ = _$type[0]) === null || _$type$ === void 0 ? void 0 : _$type$.display) !== null && _$type$0$display !== void 0 ? _$type$0$display : "",
|
|
40557
|
+
encounterStatus: "Pending",
|
|
40558
|
+
view: true
|
|
40053
40559
|
};
|
|
40054
40560
|
}) : [];
|
|
40055
40561
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40089,30 +40595,34 @@ var GET_PATIENTS_CHECKED_IN_NURSE = createAsyncThunk("currentVisitStatsApiSlice/
|
|
|
40089
40595
|
_context5.prev = 2;
|
|
40090
40596
|
_context5.next = 5;
|
|
40091
40597
|
return fetchData$3({
|
|
40092
|
-
body: query$2.getPatientsCheckedInNurse(payload)
|
|
40598
|
+
body: JSON.stringify(query$2.getPatientsCheckedInNurse(payload))
|
|
40093
40599
|
}, __readDocumentUrl__);
|
|
40094
40600
|
|
|
40095
40601
|
case 5:
|
|
40096
40602
|
data = _context5.sent;
|
|
40097
40603
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : _data$result5.map(function (_) {
|
|
40098
|
-
var _$
|
|
40604
|
+
var _$appointmentId22, _$appointmentId22$, _$appointmentId22$$Pe, _$appointmentId22$$Pe2, _$appointmentId22$$Pe3, _$appointmentId23, _$appointmentId23$, _$appointmentId23$$Pe, _$appointmentId23$$Pe2, _$appointmentId23$$Pe3, _$patient_id15, _$patient_id15$, _$patient_id15$$name, _$patient_id16, _$patient_id16$, _$patient_id17, _$patient_id17$, _$patient_id18, _$patient_id18$, _$patient_id18$$gende, _$patient_id19, _$patient_id19$, _$patient_id19$$telec, _$patient_id19$$telec2, _$appointmentId24, _$appointmentId24$, _$appointmentId25, _$appointmentId25$, _$appointmentId26, _$appointmentId26$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$appointmentId29$$Sp, _$practitioner_detail4, _$practitioner_detail5, _$status4;
|
|
40099
40605
|
|
|
40100
40606
|
return {
|
|
40101
|
-
|
|
40102
|
-
|
|
40103
|
-
|
|
40104
|
-
|
|
40105
|
-
|
|
40106
|
-
|
|
40107
|
-
|
|
40108
|
-
|
|
40109
|
-
|
|
40110
|
-
|
|
40111
|
-
|
|
40112
|
-
|
|
40113
|
-
|
|
40607
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId22 = _.appointmentId) === null || _$appointmentId22 === void 0 ? void 0 : (_$appointmentId22$ = _$appointmentId22[0]) === null || _$appointmentId22$ === void 0 ? void 0 : (_$appointmentId22$$Pe = _$appointmentId22$.PersonID) === null || _$appointmentId22$$Pe === void 0 ? void 0 : (_$appointmentId22$$Pe2 = _$appointmentId22$$Pe[0]) === null || _$appointmentId22$$Pe2 === void 0 ? void 0 : (_$appointmentId22$$Pe3 = _$appointmentId22$$Pe2.photo[0]) === null || _$appointmentId22$$Pe3 === void 0 ? void 0 : _$appointmentId22$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId23 = _.appointmentId) === null || _$appointmentId23 === void 0 ? void 0 : (_$appointmentId23$ = _$appointmentId23[0]) === null || _$appointmentId23$ === void 0 ? void 0 : (_$appointmentId23$$Pe = _$appointmentId23$.PersonID) === null || _$appointmentId23$$Pe === void 0 ? void 0 : (_$appointmentId23$$Pe2 = _$appointmentId23$$Pe[0]) === null || _$appointmentId23$$Pe2 === void 0 ? void 0 : (_$appointmentId23$$Pe3 = _$appointmentId23$$Pe2.photo[0]) === null || _$appointmentId23$$Pe3 === void 0 ? void 0 : _$appointmentId23$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40608
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id15 = _.patient_id) === null || _$patient_id15 === void 0 ? void 0 : (_$patient_id15$ = _$patient_id15[0]) === null || _$patient_id15$ === void 0 ? void 0 : (_$patient_id15$$name = _$patient_id15$.name) === null || _$patient_id15$$name === void 0 ? void 0 : _$patient_id15$$name[0]) || {}),
|
|
40609
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id16 = _.patient_id) === null || _$patient_id16 === void 0 ? void 0 : (_$patient_id16$ = _$patient_id16[0]) === null || _$patient_id16$ === void 0 ? void 0 : _$patient_id16$.MRN,
|
|
40610
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id17 = _.patient_id) === null || _$patient_id17 === void 0 ? void 0 : (_$patient_id17$ = _$patient_id17[0]) === null || _$patient_id17$ === void 0 ? void 0 : _$patient_id17$.age,
|
|
40611
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$patient_id18 = _.patient_id) === null || _$patient_id18 === void 0 ? void 0 : (_$patient_id18$ = _$patient_id18[0]) === null || _$patient_id18$ === void 0 ? void 0 : (_$patient_id18$$gende = _$patient_id18$.gender) === null || _$patient_id18$$gende === void 0 ? void 0 : _$patient_id18$$gende.display,
|
|
40612
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : (_$patient_id19$$telec = _$patient_id19$.telecom) === null || _$patient_id19$$telec === void 0 ? void 0 : (_$patient_id19$$telec2 = _$patient_id19$$telec[0]) === null || _$patient_id19$$telec2 === void 0 ? void 0 : _$patient_id19$$telec2.value),
|
|
40613
|
+
refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId24 = _.appointmentId) === null || _$appointmentId24 === void 0 ? void 0 : (_$appointmentId24$ = _$appointmentId24[0]) === null || _$appointmentId24$ === void 0 ? void 0 : _$appointmentId24$.appno,
|
|
40614
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId25 = _.appointmentId) === null || _$appointmentId25 === void 0 ? void 0 : (_$appointmentId25$ = _$appointmentId25[0]) === null || _$appointmentId25$ === void 0 ? void 0 : _$appointmentId25$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId26 = _.appointmentId) === null || _$appointmentId26 === void 0 ? void 0 : (_$appointmentId26$ = _$appointmentId26[0]) === null || _$appointmentId26$ === void 0 ? void 0 : _$appointmentId26$.start).format("DD MMM,YYYY") : "",
|
|
40615
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId27 = _.appointmentId) === null || _$appointmentId27 === void 0 ? void 0 : (_$appointmentId27$ = _$appointmentId27[0]) === null || _$appointmentId27$ === void 0 ? void 0 : _$appointmentId27$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId28 = _.appointmentId) === null || _$appointmentId28 === void 0 ? void 0 : (_$appointmentId28$ = _$appointmentId28[0]) === null || _$appointmentId28$ === void 0 ? void 0 : _$appointmentId28$.start).format("hh:mm A") : "",
|
|
40616
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
40617
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId29 = _.appointmentId) === null || _$appointmentId29 === void 0 ? void 0 : (_$appointmentId29$ = _$appointmentId29[0]) === null || _$appointmentId29$ === void 0 ? void 0 : (_$appointmentId29$$Sp = _$appointmentId29$.SpecialtyID) === null || _$appointmentId29$$Sp === void 0 ? void 0 : _$appointmentId29$$Sp.map(function (spl) {
|
|
40618
|
+
var _spl$coding4, _spl$coding4$;
|
|
40619
|
+
|
|
40620
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding4 = spl.coding) === null || _spl$coding4 === void 0 ? void 0 : (_spl$coding4$ = _spl$coding4[0]) === null || _spl$coding4$ === void 0 ? void 0 : _spl$coding4$.display;
|
|
40621
|
+
}).join(", "),
|
|
40622
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail4 = _.practitioner_details) === null || _$practitioner_detail4 === void 0 ? void 0 : (_$practitioner_detail5 = _$practitioner_detail4[0]) === null || _$practitioner_detail5 === void 0 ? void 0 : _$practitioner_detail5.clinic) || "",
|
|
40623
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display,
|
|
40114
40624
|
"View Patient": true,
|
|
40115
|
-
|
|
40625
|
+
Attend: true
|
|
40116
40626
|
};
|
|
40117
40627
|
}) : [];
|
|
40118
40628
|
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40151,30 +40661,34 @@ var GET_VISIT_COMPLETED_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getV
|
|
|
40151
40661
|
_context6.prev = 2;
|
|
40152
40662
|
_context6.next = 5;
|
|
40153
40663
|
return fetchData$3({
|
|
40154
|
-
body: query$2.getVisitCompletedNurse(payload)
|
|
40664
|
+
body: JSON.stringify(query$2.getVisitCompletedNurse(payload))
|
|
40155
40665
|
}, __readDocumentUrl__);
|
|
40156
40666
|
|
|
40157
40667
|
case 5:
|
|
40158
40668
|
data = _context6.sent;
|
|
40159
40669
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : _data$result6.map(function (_) {
|
|
40160
|
-
var _$
|
|
40670
|
+
var _$appointmentId30, _$appointmentId30$, _$appointmentId30$$Pe, _$appointmentId30$$Pe2, _$appointmentId30$$Pe3, _$appointmentId31, _$appointmentId31$, _$appointmentId31$$Pe, _$appointmentId31$$Pe2, _$appointmentId31$$Pe3, _$patient_id20, _$patient_id20$, _$patient_id20$$name, _$patient_id21, _$patient_id21$, _$patient_id22, _$patient_id22$, _$patient_id23, _$patient_id23$, _$patient_id23$$gende, _$patient_id24, _$patient_id24$, _$patient_id24$$telec, _$patient_id24$$telec2, _$appointmentId32, _$appointmentId32$, _$appointmentId33, _$appointmentId33$, _$appointmentId34, _$appointmentId34$, _$appointmentId35, _$appointmentId35$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId37$$Sp, _$practitioner_detail6, _$practitioner_detail7, _$status5;
|
|
40161
40671
|
|
|
40162
40672
|
return {
|
|
40163
|
-
|
|
40164
|
-
|
|
40165
|
-
|
|
40166
|
-
|
|
40167
|
-
|
|
40168
|
-
|
|
40169
|
-
|
|
40170
|
-
|
|
40171
|
-
|
|
40172
|
-
|
|
40173
|
-
|
|
40174
|
-
|
|
40175
|
-
|
|
40673
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId30 = _.appointmentId) === null || _$appointmentId30 === void 0 ? void 0 : (_$appointmentId30$ = _$appointmentId30[0]) === null || _$appointmentId30$ === void 0 ? void 0 : (_$appointmentId30$$Pe = _$appointmentId30$.PersonID) === null || _$appointmentId30$$Pe === void 0 ? void 0 : (_$appointmentId30$$Pe2 = _$appointmentId30$$Pe[0]) === null || _$appointmentId30$$Pe2 === void 0 ? void 0 : (_$appointmentId30$$Pe3 = _$appointmentId30$$Pe2.photo[0]) === null || _$appointmentId30$$Pe3 === void 0 ? void 0 : _$appointmentId30$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId31 = _.appointmentId) === null || _$appointmentId31 === void 0 ? void 0 : (_$appointmentId31$ = _$appointmentId31[0]) === null || _$appointmentId31$ === void 0 ? void 0 : (_$appointmentId31$$Pe = _$appointmentId31$.PersonID) === null || _$appointmentId31$$Pe === void 0 ? void 0 : (_$appointmentId31$$Pe2 = _$appointmentId31$$Pe[0]) === null || _$appointmentId31$$Pe2 === void 0 ? void 0 : (_$appointmentId31$$Pe3 = _$appointmentId31$$Pe2.photo[0]) === null || _$appointmentId31$$Pe3 === void 0 ? void 0 : _$appointmentId31$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40674
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : (_$patient_id20$ = _$patient_id20[0]) === null || _$patient_id20$ === void 0 ? void 0 : (_$patient_id20$$name = _$patient_id20$.name) === null || _$patient_id20$$name === void 0 ? void 0 : _$patient_id20$$name[0]) || {}),
|
|
40675
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : _$patient_id21$.MRN,
|
|
40676
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id22 = _.patient_id) === null || _$patient_id22 === void 0 ? void 0 : (_$patient_id22$ = _$patient_id22[0]) === null || _$patient_id22$ === void 0 ? void 0 : _$patient_id22$.age,
|
|
40677
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$patient_id23 = _.patient_id) === null || _$patient_id23 === void 0 ? void 0 : (_$patient_id23$ = _$patient_id23[0]) === null || _$patient_id23$ === void 0 ? void 0 : (_$patient_id23$$gende = _$patient_id23$.gender) === null || _$patient_id23$$gende === void 0 ? void 0 : _$patient_id23$$gende.display,
|
|
40678
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id24 = _.patient_id) === null || _$patient_id24 === void 0 ? void 0 : (_$patient_id24$ = _$patient_id24[0]) === null || _$patient_id24$ === void 0 ? void 0 : (_$patient_id24$$telec = _$patient_id24$.telecom) === null || _$patient_id24$$telec === void 0 ? void 0 : (_$patient_id24$$telec2 = _$patient_id24$$telec[0]) === null || _$patient_id24$$telec2 === void 0 ? void 0 : _$patient_id24$$telec2.value),
|
|
40679
|
+
refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId32 = _.appointmentId) === null || _$appointmentId32 === void 0 ? void 0 : (_$appointmentId32$ = _$appointmentId32[0]) === null || _$appointmentId32$ === void 0 ? void 0 : _$appointmentId32$.appno,
|
|
40680
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId33 = _.appointmentId) === null || _$appointmentId33 === void 0 ? void 0 : (_$appointmentId33$ = _$appointmentId33[0]) === null || _$appointmentId33$ === void 0 ? void 0 : _$appointmentId33$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId34 = _.appointmentId) === null || _$appointmentId34 === void 0 ? void 0 : (_$appointmentId34$ = _$appointmentId34[0]) === null || _$appointmentId34$ === void 0 ? void 0 : _$appointmentId34$.start).format("DD MMM,YYYY") : "",
|
|
40681
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId35 = _.appointmentId) === null || _$appointmentId35 === void 0 ? void 0 : (_$appointmentId35$ = _$appointmentId35[0]) === null || _$appointmentId35$ === void 0 ? void 0 : _$appointmentId35$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : _$appointmentId36$.start).format("hh:mm A") : "",
|
|
40682
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
40683
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : (_$appointmentId37$$Sp = _$appointmentId37$.SpecialtyID) === null || _$appointmentId37$$Sp === void 0 ? void 0 : _$appointmentId37$$Sp.map(function (spl) {
|
|
40684
|
+
var _spl$coding5, _spl$coding5$;
|
|
40685
|
+
|
|
40686
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding5 = spl.coding) === null || _spl$coding5 === void 0 ? void 0 : (_spl$coding5$ = _spl$coding5[0]) === null || _spl$coding5$ === void 0 ? void 0 : _spl$coding5$.display;
|
|
40687
|
+
}).join(", "),
|
|
40688
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail6 = _.practitioner_details) === null || _$practitioner_detail6 === void 0 ? void 0 : (_$practitioner_detail7 = _$practitioner_detail6[0]) === null || _$practitioner_detail7 === void 0 ? void 0 : _$practitioner_detail7.clinic) || "",
|
|
40689
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display,
|
|
40176
40690
|
"View Patient": true,
|
|
40177
|
-
|
|
40691
|
+
Attend: true
|
|
40178
40692
|
};
|
|
40179
40693
|
}) : [];
|
|
40180
40694
|
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40213,30 +40727,30 @@ var GET_PATIENTS_NO_SHOWS_NURSE = createAsyncThunk("currentVisitStatsApiSlice/ge
|
|
|
40213
40727
|
_context7.prev = 2;
|
|
40214
40728
|
_context7.next = 5;
|
|
40215
40729
|
return fetchData$3({
|
|
40216
|
-
body: query$2.getPatientsNoShowsNurse(payload)
|
|
40730
|
+
body: JSON.stringify(query$2.getPatientsNoShowsNurse(payload))
|
|
40217
40731
|
}, __readDocumentUrl__);
|
|
40218
40732
|
|
|
40219
40733
|
case 5:
|
|
40220
40734
|
data = _context7.sent;
|
|
40221
40735
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result7 = data.result) === null || _data$result7 === void 0 ? void 0 : _data$result7.map(function (_) {
|
|
40222
|
-
var _$
|
|
40736
|
+
var _$PersonID, _$PersonID$, _$PersonID$$name, _$PersonID$$name$, _$PersonID2, _$PersonID2$, _$type2, _$type2$, _$practitioner_detail8, _$practitioner_detail9;
|
|
40223
40737
|
|
|
40224
40738
|
return {
|
|
40225
|
-
|
|
40226
|
-
|
|
40227
|
-
|
|
40228
|
-
|
|
40229
|
-
|
|
40230
|
-
|
|
40231
|
-
|
|
40232
|
-
|
|
40233
|
-
|
|
40234
|
-
|
|
40235
|
-
|
|
40236
|
-
|
|
40237
|
-
|
|
40739
|
+
img: "https://www.fillmurray.com/640/360",
|
|
40740
|
+
name: _ === null || _ === void 0 ? void 0 : (_$PersonID = _.PersonID) === null || _$PersonID === void 0 ? void 0 : (_$PersonID$ = _$PersonID[0]) === null || _$PersonID$ === void 0 ? void 0 : (_$PersonID$$name = _$PersonID$.name) === null || _$PersonID$$name === void 0 ? void 0 : (_$PersonID$$name$ = _$PersonID$$name[0]) === null || _$PersonID$$name$ === void 0 ? void 0 : _$PersonID$$name$.given,
|
|
40741
|
+
mrn: "MRN",
|
|
40742
|
+
age: "Age",
|
|
40743
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$PersonID2 = _.PersonID) === null || _$PersonID2 === void 0 ? void 0 : (_$PersonID2$ = _$PersonID2[0]) === null || _$PersonID2$ === void 0 ? void 0 : _$PersonID2$.gender,
|
|
40744
|
+
contact: "Contact",
|
|
40745
|
+
refNo: "Ref No",
|
|
40746
|
+
date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
|
|
40747
|
+
time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
|
|
40748
|
+
visittype: _ === null || _ === void 0 ? void 0 : (_$type2 = _.type) === null || _$type2 === void 0 ? void 0 : (_$type2$ = _$type2[0]) === null || _$type2$ === void 0 ? void 0 : _$type2$.display,
|
|
40749
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$practitioner_detail8 = _.practitioner_details) === null || _$practitioner_detail8 === void 0 ? void 0 : (_$practitioner_detail9 = _$practitioner_detail8[0]) === null || _$practitioner_detail9 === void 0 ? void 0 : _$practitioner_detail9.speciality,
|
|
40750
|
+
clinic: "Clinic",
|
|
40751
|
+
encounterStatus: "Pending",
|
|
40238
40752
|
"View Patient": true,
|
|
40239
|
-
|
|
40753
|
+
Attend: true
|
|
40240
40754
|
};
|
|
40241
40755
|
}) : [];
|
|
40242
40756
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40275,30 +40789,34 @@ var GET_TRAIGE_DONE_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getTriag
|
|
|
40275
40789
|
_context8.prev = 2;
|
|
40276
40790
|
_context8.next = 5;
|
|
40277
40791
|
return fetchData$3({
|
|
40278
|
-
body: query$2.getTriageDoneNurse(payload)
|
|
40792
|
+
body: JSON.stringify(query$2.getTriageDoneNurse(payload))
|
|
40279
40793
|
}, __readDocumentUrl__);
|
|
40280
40794
|
|
|
40281
40795
|
case 5:
|
|
40282
40796
|
data = _context8.sent;
|
|
40283
40797
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result8 = data.result) === null || _data$result8 === void 0 ? void 0 : _data$result8.map(function (_) {
|
|
40284
|
-
var _$
|
|
40798
|
+
var _$appointmentId38, _$appointmentId38$, _$appointmentId38$$Pe, _$appointmentId38$$Pe2, _$appointmentId38$$Pe3, _$appointmentId39, _$appointmentId39$, _$appointmentId39$$Pe, _$appointmentId39$$Pe2, _$appointmentId39$$Pe3, _$patient_id25, _$patient_id25$, _$patient_id25$$name, _$patient_id26, _$patient_id26$, _$patient_id27, _$patient_id27$, _$patient_id28, _$patient_id28$, _$patient_id28$$gende, _$patient_id29, _$patient_id29$, _$patient_id29$$telec, _$patient_id29$$telec2, _$appointmentId40, _$appointmentId40$, _$appointmentId41, _$appointmentId41$, _$appointmentId42, _$appointmentId42$, _$appointmentId43, _$appointmentId43$, _$appointmentId44, _$appointmentId44$, _$appointmentId45, _$appointmentId45$, _$appointmentId45$$Sp, _$practitioner_detail10, _$practitioner_detail11, _$status6;
|
|
40285
40799
|
|
|
40286
40800
|
return {
|
|
40287
|
-
|
|
40288
|
-
|
|
40289
|
-
|
|
40290
|
-
|
|
40291
|
-
|
|
40292
|
-
|
|
40293
|
-
|
|
40294
|
-
|
|
40295
|
-
|
|
40296
|
-
|
|
40297
|
-
|
|
40298
|
-
|
|
40299
|
-
|
|
40801
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : (_$appointmentId38$$Pe = _$appointmentId38$.PersonID) === null || _$appointmentId38$$Pe === void 0 ? void 0 : (_$appointmentId38$$Pe2 = _$appointmentId38$$Pe[0]) === null || _$appointmentId38$$Pe2 === void 0 ? void 0 : (_$appointmentId38$$Pe3 = _$appointmentId38$$Pe2.photo[0]) === null || _$appointmentId38$$Pe3 === void 0 ? void 0 : _$appointmentId38$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : (_$appointmentId39$$Pe = _$appointmentId39$.PersonID) === null || _$appointmentId39$$Pe === void 0 ? void 0 : (_$appointmentId39$$Pe2 = _$appointmentId39$$Pe[0]) === null || _$appointmentId39$$Pe2 === void 0 ? void 0 : (_$appointmentId39$$Pe3 = _$appointmentId39$$Pe2.photo[0]) === null || _$appointmentId39$$Pe3 === void 0 ? void 0 : _$appointmentId39$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40802
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id25 = _.patient_id) === null || _$patient_id25 === void 0 ? void 0 : (_$patient_id25$ = _$patient_id25[0]) === null || _$patient_id25$ === void 0 ? void 0 : (_$patient_id25$$name = _$patient_id25$.name) === null || _$patient_id25$$name === void 0 ? void 0 : _$patient_id25$$name[0]) || {}),
|
|
40803
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id26 = _.patient_id) === null || _$patient_id26 === void 0 ? void 0 : (_$patient_id26$ = _$patient_id26[0]) === null || _$patient_id26$ === void 0 ? void 0 : _$patient_id26$.MRN,
|
|
40804
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : _$patient_id27$.age,
|
|
40805
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$patient_id28 = _.patient_id) === null || _$patient_id28 === void 0 ? void 0 : (_$patient_id28$ = _$patient_id28[0]) === null || _$patient_id28$ === void 0 ? void 0 : (_$patient_id28$$gende = _$patient_id28$.gender) === null || _$patient_id28$$gende === void 0 ? void 0 : _$patient_id28$$gende.display,
|
|
40806
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id29 = _.patient_id) === null || _$patient_id29 === void 0 ? void 0 : (_$patient_id29$ = _$patient_id29[0]) === null || _$patient_id29$ === void 0 ? void 0 : (_$patient_id29$$telec = _$patient_id29$.telecom) === null || _$patient_id29$$telec === void 0 ? void 0 : (_$patient_id29$$telec2 = _$patient_id29$$telec[0]) === null || _$patient_id29$$telec2 === void 0 ? void 0 : _$patient_id29$$telec2.value),
|
|
40807
|
+
refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : _$appointmentId40$.appno,
|
|
40808
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId41 = _.appointmentId) === null || _$appointmentId41 === void 0 ? void 0 : (_$appointmentId41$ = _$appointmentId41[0]) === null || _$appointmentId41$ === void 0 ? void 0 : _$appointmentId41$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : _$appointmentId42$.start).format("DD MMM,YYYY") : "",
|
|
40809
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId43 = _.appointmentId) === null || _$appointmentId43 === void 0 ? void 0 : (_$appointmentId43$ = _$appointmentId43[0]) === null || _$appointmentId43$ === void 0 ? void 0 : _$appointmentId43$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId44 = _.appointmentId) === null || _$appointmentId44 === void 0 ? void 0 : (_$appointmentId44$ = _$appointmentId44[0]) === null || _$appointmentId44$ === void 0 ? void 0 : _$appointmentId44$.start).format("hh:mm A") : "",
|
|
40810
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
40811
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : (_$appointmentId45$$Sp = _$appointmentId45$.SpecialtyID) === null || _$appointmentId45$$Sp === void 0 ? void 0 : _$appointmentId45$$Sp.map(function (spl) {
|
|
40812
|
+
var _spl$coding6, _spl$coding6$;
|
|
40813
|
+
|
|
40814
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding6 = spl.coding) === null || _spl$coding6 === void 0 ? void 0 : (_spl$coding6$ = _spl$coding6[0]) === null || _spl$coding6$ === void 0 ? void 0 : _spl$coding6$.display;
|
|
40815
|
+
}).join(", "),
|
|
40816
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail10 = _.practitioner_details) === null || _$practitioner_detail10 === void 0 ? void 0 : (_$practitioner_detail11 = _$practitioner_detail10[0]) === null || _$practitioner_detail11 === void 0 ? void 0 : _$practitioner_detail11.clinic) || "",
|
|
40817
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display,
|
|
40300
40818
|
"View Patient": true,
|
|
40301
|
-
|
|
40819
|
+
Attend: true
|
|
40302
40820
|
};
|
|
40303
40821
|
}) : [];
|
|
40304
40822
|
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40338,30 +40856,30 @@ var GET_PATIENTS_NO_SHOWS_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/g
|
|
|
40338
40856
|
_context9.prev = 2;
|
|
40339
40857
|
_context9.next = 5;
|
|
40340
40858
|
return fetchData$3({
|
|
40341
|
-
body: query$2.getPatientsNoShowsDoctor(payload)
|
|
40859
|
+
body: JSON.stringify(query$2.getPatientsNoShowsDoctor(payload))
|
|
40342
40860
|
}, __readDocumentUrl__);
|
|
40343
40861
|
|
|
40344
40862
|
case 5:
|
|
40345
40863
|
data = _context9.sent;
|
|
40346
40864
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result9 = data.result) === null || _data$result9 === void 0 ? void 0 : _data$result9.map(function (_) {
|
|
40347
|
-
var _$
|
|
40865
|
+
var _$PersonID3, _$PersonID3$, _$PersonID3$$name, _$PersonID3$$name$, _$PersonID4, _$PersonID4$, _$type3, _$type3$, _$practitioner_detail12, _$practitioner_detail13;
|
|
40348
40866
|
|
|
40349
40867
|
return {
|
|
40350
|
-
|
|
40351
|
-
|
|
40352
|
-
|
|
40353
|
-
|
|
40354
|
-
|
|
40355
|
-
|
|
40356
|
-
|
|
40357
|
-
|
|
40358
|
-
|
|
40359
|
-
|
|
40360
|
-
|
|
40361
|
-
|
|
40362
|
-
|
|
40868
|
+
img: "https://www.fillmurray.com/640/360",
|
|
40869
|
+
name: _ === null || _ === void 0 ? void 0 : (_$PersonID3 = _.PersonID) === null || _$PersonID3 === void 0 ? void 0 : (_$PersonID3$ = _$PersonID3[0]) === null || _$PersonID3$ === void 0 ? void 0 : (_$PersonID3$$name = _$PersonID3$.name) === null || _$PersonID3$$name === void 0 ? void 0 : (_$PersonID3$$name$ = _$PersonID3$$name[0]) === null || _$PersonID3$$name$ === void 0 ? void 0 : _$PersonID3$$name$.given,
|
|
40870
|
+
mrn: "MRN",
|
|
40871
|
+
age: "Age",
|
|
40872
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$PersonID4 = _.PersonID) === null || _$PersonID4 === void 0 ? void 0 : (_$PersonID4$ = _$PersonID4[0]) === null || _$PersonID4$ === void 0 ? void 0 : _$PersonID4$.gender,
|
|
40873
|
+
contact: "Contact",
|
|
40874
|
+
refNo: "Ref No",
|
|
40875
|
+
date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
|
|
40876
|
+
time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
|
|
40877
|
+
visittype: _ === null || _ === void 0 ? void 0 : (_$type3 = _.type) === null || _$type3 === void 0 ? void 0 : (_$type3$ = _$type3[0]) === null || _$type3$ === void 0 ? void 0 : _$type3$.display,
|
|
40878
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$practitioner_detail12 = _.practitioner_details) === null || _$practitioner_detail12 === void 0 ? void 0 : (_$practitioner_detail13 = _$practitioner_detail12[0]) === null || _$practitioner_detail13 === void 0 ? void 0 : _$practitioner_detail13.speciality,
|
|
40879
|
+
clinic: "Clinic",
|
|
40880
|
+
encounterStatus: "Pending",
|
|
40363
40881
|
"View Patient": true,
|
|
40364
|
-
|
|
40882
|
+
Attend: true
|
|
40365
40883
|
};
|
|
40366
40884
|
}) : [];
|
|
40367
40885
|
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40400,30 +40918,34 @@ var GET_PATIENTS_CHECKED_IN_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice
|
|
|
40400
40918
|
_context10.prev = 2;
|
|
40401
40919
|
_context10.next = 5;
|
|
40402
40920
|
return fetchData$3({
|
|
40403
|
-
body: query$2.getPatientsCheckedInDoctor(payload)
|
|
40921
|
+
body: JSON.stringify(query$2.getPatientsCheckedInDoctor(payload))
|
|
40404
40922
|
}, __readDocumentUrl__);
|
|
40405
40923
|
|
|
40406
40924
|
case 5:
|
|
40407
40925
|
data = _context10.sent;
|
|
40408
40926
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result10 = data.result) === null || _data$result10 === void 0 ? void 0 : _data$result10.map(function (_) {
|
|
40409
|
-
var _$
|
|
40927
|
+
var _$appointmentId46, _$appointmentId46$, _$appointmentId46$$Pe, _$appointmentId46$$Pe2, _$appointmentId46$$Pe3, _$appointmentId47, _$appointmentId47$, _$appointmentId47$$Pe, _$appointmentId47$$Pe2, _$appointmentId47$$Pe3, _$patient_id30, _$patient_id30$, _$patient_id30$$name, _$patient_id31, _$patient_id31$, _$patient_id32, _$patient_id32$, _$patient_id33, _$patient_id33$, _$patient_id33$$gende, _$patient_id34, _$patient_id34$, _$patient_id34$$telec, _$patient_id34$$telec2, _$appointmentId48, _$appointmentId48$, _$appointmentId49, _$appointmentId49$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$appointmentId53$$Sp, _$practitioner_detail14, _$practitioner_detail15, _$status7;
|
|
40410
40928
|
|
|
40411
40929
|
return {
|
|
40412
|
-
|
|
40413
|
-
|
|
40414
|
-
|
|
40415
|
-
|
|
40416
|
-
|
|
40417
|
-
|
|
40418
|
-
|
|
40419
|
-
|
|
40420
|
-
|
|
40421
|
-
|
|
40422
|
-
|
|
40423
|
-
|
|
40424
|
-
|
|
40930
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : (_$appointmentId46$$Pe = _$appointmentId46$.PersonID) === null || _$appointmentId46$$Pe === void 0 ? void 0 : (_$appointmentId46$$Pe2 = _$appointmentId46$$Pe[0]) === null || _$appointmentId46$$Pe2 === void 0 ? void 0 : (_$appointmentId46$$Pe3 = _$appointmentId46$$Pe2.photo[0]) === null || _$appointmentId46$$Pe3 === void 0 ? void 0 : _$appointmentId46$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : (_$appointmentId47$$Pe = _$appointmentId47$.PersonID) === null || _$appointmentId47$$Pe === void 0 ? void 0 : (_$appointmentId47$$Pe2 = _$appointmentId47$$Pe[0]) === null || _$appointmentId47$$Pe2 === void 0 ? void 0 : (_$appointmentId47$$Pe3 = _$appointmentId47$$Pe2.photo[0]) === null || _$appointmentId47$$Pe3 === void 0 ? void 0 : _$appointmentId47$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40931
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id30 = _.patient_id) === null || _$patient_id30 === void 0 ? void 0 : (_$patient_id30$ = _$patient_id30[0]) === null || _$patient_id30$ === void 0 ? void 0 : (_$patient_id30$$name = _$patient_id30$.name) === null || _$patient_id30$$name === void 0 ? void 0 : _$patient_id30$$name[0]) || {}),
|
|
40932
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id31 = _.patient_id) === null || _$patient_id31 === void 0 ? void 0 : (_$patient_id31$ = _$patient_id31[0]) === null || _$patient_id31$ === void 0 ? void 0 : _$patient_id31$.MRN,
|
|
40933
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id32 = _.patient_id) === null || _$patient_id32 === void 0 ? void 0 : (_$patient_id32$ = _$patient_id32[0]) === null || _$patient_id32$ === void 0 ? void 0 : _$patient_id32$.age,
|
|
40934
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : (_$patient_id33$$gende = _$patient_id33$.gender) === null || _$patient_id33$$gende === void 0 ? void 0 : _$patient_id33$$gende.display,
|
|
40935
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id34 = _.patient_id) === null || _$patient_id34 === void 0 ? void 0 : (_$patient_id34$ = _$patient_id34[0]) === null || _$patient_id34$ === void 0 ? void 0 : (_$patient_id34$$telec = _$patient_id34$.telecom) === null || _$patient_id34$$telec === void 0 ? void 0 : (_$patient_id34$$telec2 = _$patient_id34$$telec[0]) === null || _$patient_id34$$telec2 === void 0 ? void 0 : _$patient_id34$$telec2.value),
|
|
40936
|
+
refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : _$appointmentId48$.appno,
|
|
40937
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : _$appointmentId49$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : _$appointmentId50$.start).format("DD MMM,YYYY") : "",
|
|
40938
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : _$appointmentId51$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : _$appointmentId52$.start).format("hh:mm A") : "",
|
|
40939
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
40940
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId53 = _.appointmentId) === null || _$appointmentId53 === void 0 ? void 0 : (_$appointmentId53$ = _$appointmentId53[0]) === null || _$appointmentId53$ === void 0 ? void 0 : (_$appointmentId53$$Sp = _$appointmentId53$.SpecialtyID) === null || _$appointmentId53$$Sp === void 0 ? void 0 : _$appointmentId53$$Sp.map(function (spl) {
|
|
40941
|
+
var _spl$coding7, _spl$coding7$;
|
|
40942
|
+
|
|
40943
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding7 = spl.coding) === null || _spl$coding7 === void 0 ? void 0 : (_spl$coding7$ = _spl$coding7[0]) === null || _spl$coding7$ === void 0 ? void 0 : _spl$coding7$.display;
|
|
40944
|
+
}).join(", "),
|
|
40945
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail14 = _.practitioner_details) === null || _$practitioner_detail14 === void 0 ? void 0 : (_$practitioner_detail15 = _$practitioner_detail14[0]) === null || _$practitioner_detail15 === void 0 ? void 0 : _$practitioner_detail15.clinic) || "",
|
|
40946
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display,
|
|
40425
40947
|
"View Patient": true,
|
|
40426
|
-
|
|
40948
|
+
Attend: true
|
|
40427
40949
|
};
|
|
40428
40950
|
}) : [];
|
|
40429
40951
|
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40462,30 +40984,34 @@ var GET_VISIT_COMPLETED_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/get
|
|
|
40462
40984
|
_context11.prev = 2;
|
|
40463
40985
|
_context11.next = 5;
|
|
40464
40986
|
return fetchData$3({
|
|
40465
|
-
body: query$2.getVisitCompletedDoctor(payload)
|
|
40987
|
+
body: JSON.stringify(query$2.getVisitCompletedDoctor(payload))
|
|
40466
40988
|
}, __readDocumentUrl__);
|
|
40467
40989
|
|
|
40468
40990
|
case 5:
|
|
40469
40991
|
data = _context11.sent;
|
|
40470
40992
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result11 = data.result) === null || _data$result11 === void 0 ? void 0 : _data$result11.map(function (_) {
|
|
40471
|
-
var _$
|
|
40993
|
+
var _$appointmentId54, _$appointmentId54$, _$appointmentId54$$Pe, _$appointmentId54$$Pe2, _$appointmentId54$$Pe3, _$appointmentId55, _$appointmentId55$, _$appointmentId55$$Pe, _$appointmentId55$$Pe2, _$appointmentId55$$Pe3, _$patient_id35, _$patient_id35$, _$patient_id35$$name, _$patient_id36, _$patient_id36$, _$patient_id37, _$patient_id37$, _$patient_id38, _$patient_id38$, _$patient_id38$$gende, _$patient_id39, _$patient_id39$, _$patient_id39$$telec, _$patient_id39$$telec2, _$appointmentId56, _$appointmentId56$, _$appointmentId57, _$appointmentId57$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$appointmentId60, _$appointmentId60$, _$appointmentId61, _$appointmentId61$, _$appointmentId61$$Sp, _$practitioner_detail16, _$practitioner_detail17, _$status8;
|
|
40472
40994
|
|
|
40473
40995
|
return {
|
|
40474
|
-
|
|
40475
|
-
|
|
40476
|
-
|
|
40477
|
-
|
|
40478
|
-
|
|
40479
|
-
|
|
40480
|
-
|
|
40481
|
-
|
|
40482
|
-
|
|
40483
|
-
|
|
40484
|
-
|
|
40485
|
-
|
|
40486
|
-
|
|
40996
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId54 = _.appointmentId) === null || _$appointmentId54 === void 0 ? void 0 : (_$appointmentId54$ = _$appointmentId54[0]) === null || _$appointmentId54$ === void 0 ? void 0 : (_$appointmentId54$$Pe = _$appointmentId54$.PersonID) === null || _$appointmentId54$$Pe === void 0 ? void 0 : (_$appointmentId54$$Pe2 = _$appointmentId54$$Pe[0]) === null || _$appointmentId54$$Pe2 === void 0 ? void 0 : (_$appointmentId54$$Pe3 = _$appointmentId54$$Pe2.photo[0]) === null || _$appointmentId54$$Pe3 === void 0 ? void 0 : _$appointmentId54$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : (_$appointmentId55$$Pe = _$appointmentId55$.PersonID) === null || _$appointmentId55$$Pe === void 0 ? void 0 : (_$appointmentId55$$Pe2 = _$appointmentId55$$Pe[0]) === null || _$appointmentId55$$Pe2 === void 0 ? void 0 : (_$appointmentId55$$Pe3 = _$appointmentId55$$Pe2.photo[0]) === null || _$appointmentId55$$Pe3 === void 0 ? void 0 : _$appointmentId55$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
40997
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : (_$patient_id35$ = _$patient_id35[0]) === null || _$patient_id35$ === void 0 ? void 0 : (_$patient_id35$$name = _$patient_id35$.name) === null || _$patient_id35$$name === void 0 ? void 0 : _$patient_id35$$name[0]) || {}),
|
|
40998
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id36 = _.patient_id) === null || _$patient_id36 === void 0 ? void 0 : (_$patient_id36$ = _$patient_id36[0]) === null || _$patient_id36$ === void 0 ? void 0 : _$patient_id36$.MRN,
|
|
40999
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id37 = _.patient_id) === null || _$patient_id37 === void 0 ? void 0 : (_$patient_id37$ = _$patient_id37[0]) === null || _$patient_id37$ === void 0 ? void 0 : _$patient_id37$.age,
|
|
41000
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$gende = _$patient_id38$.gender) === null || _$patient_id38$$gende === void 0 ? void 0 : _$patient_id38$$gende.display,
|
|
41001
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id39 = _.patient_id) === null || _$patient_id39 === void 0 ? void 0 : (_$patient_id39$ = _$patient_id39[0]) === null || _$patient_id39$ === void 0 ? void 0 : (_$patient_id39$$telec = _$patient_id39$.telecom) === null || _$patient_id39$$telec === void 0 ? void 0 : (_$patient_id39$$telec2 = _$patient_id39$$telec[0]) === null || _$patient_id39$$telec2 === void 0 ? void 0 : _$patient_id39$$telec2.value),
|
|
41002
|
+
refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : _$appointmentId56$.appno,
|
|
41003
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : _$appointmentId57$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId58 = _.appointmentId) === null || _$appointmentId58 === void 0 ? void 0 : (_$appointmentId58$ = _$appointmentId58[0]) === null || _$appointmentId58$ === void 0 ? void 0 : _$appointmentId58$.start).format("DD MMM,YYYY") : "",
|
|
41004
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId59 = _.appointmentId) === null || _$appointmentId59 === void 0 ? void 0 : (_$appointmentId59$ = _$appointmentId59[0]) === null || _$appointmentId59$ === void 0 ? void 0 : _$appointmentId59$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : _$appointmentId60$.start).format("hh:mm A") : "",
|
|
41005
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
41006
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : (_$appointmentId61$$Sp = _$appointmentId61$.SpecialtyID) === null || _$appointmentId61$$Sp === void 0 ? void 0 : _$appointmentId61$$Sp.map(function (spl) {
|
|
41007
|
+
var _spl$coding8, _spl$coding8$;
|
|
41008
|
+
|
|
41009
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding8 = spl.coding) === null || _spl$coding8 === void 0 ? void 0 : (_spl$coding8$ = _spl$coding8[0]) === null || _spl$coding8$ === void 0 ? void 0 : _spl$coding8$.display;
|
|
41010
|
+
}).join(", "),
|
|
41011
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail16 = _.practitioner_details) === null || _$practitioner_detail16 === void 0 ? void 0 : (_$practitioner_detail17 = _$practitioner_detail16[0]) === null || _$practitioner_detail17 === void 0 ? void 0 : _$practitioner_detail17.clinic) || "",
|
|
41012
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display,
|
|
40487
41013
|
"View Patient": true,
|
|
40488
|
-
|
|
41014
|
+
Attend: true
|
|
40489
41015
|
};
|
|
40490
41016
|
}) : [];
|
|
40491
41017
|
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -40524,30 +41050,34 @@ var GET_TRAIGE_DONE_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/getTria
|
|
|
40524
41050
|
_context12.prev = 2;
|
|
40525
41051
|
_context12.next = 5;
|
|
40526
41052
|
return fetchData$3({
|
|
40527
|
-
body: query$2.getTriageDoneDoctor(payload)
|
|
41053
|
+
body: JSON.stringify(query$2.getTriageDoneDoctor(payload))
|
|
40528
41054
|
}, __readDocumentUrl__);
|
|
40529
41055
|
|
|
40530
41056
|
case 5:
|
|
40531
41057
|
data = _context12.sent;
|
|
40532
41058
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result12 = data.result) === null || _data$result12 === void 0 ? void 0 : _data$result12.map(function (_) {
|
|
40533
|
-
var _$
|
|
41059
|
+
var _$appointmentId62, _$appointmentId62$, _$appointmentId62$$Pe, _$appointmentId62$$Pe2, _$appointmentId62$$Pe3, _$appointmentId63, _$appointmentId63$, _$appointmentId63$$Pe, _$appointmentId63$$Pe2, _$appointmentId63$$Pe3, _$patient_id40, _$patient_id40$, _$patient_id40$$name, _$patient_id41, _$patient_id41$, _$patient_id42, _$patient_id42$, _$patient_id43, _$patient_id43$, _$patient_id43$$gende, _$patient_id44, _$patient_id44$, _$patient_id44$$telec, _$patient_id44$$telec2, _$appointmentId64, _$appointmentId64$, _$appointmentId65, _$appointmentId65$, _$appointmentId66, _$appointmentId66$, _$appointmentId67, _$appointmentId67$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$appointmentId69$$Sp, _$practitioner_detail18, _$practitioner_detail19, _$status9;
|
|
40534
41060
|
|
|
40535
41061
|
return {
|
|
40536
|
-
|
|
40537
|
-
|
|
40538
|
-
|
|
40539
|
-
|
|
40540
|
-
|
|
40541
|
-
|
|
40542
|
-
|
|
40543
|
-
|
|
40544
|
-
|
|
40545
|
-
|
|
40546
|
-
|
|
40547
|
-
|
|
40548
|
-
|
|
41062
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId62 = _.appointmentId) === null || _$appointmentId62 === void 0 ? void 0 : (_$appointmentId62$ = _$appointmentId62[0]) === null || _$appointmentId62$ === void 0 ? void 0 : (_$appointmentId62$$Pe = _$appointmentId62$.PersonID) === null || _$appointmentId62$$Pe === void 0 ? void 0 : (_$appointmentId62$$Pe2 = _$appointmentId62$$Pe[0]) === null || _$appointmentId62$$Pe2 === void 0 ? void 0 : (_$appointmentId62$$Pe3 = _$appointmentId62$$Pe2.photo[0]) === null || _$appointmentId62$$Pe3 === void 0 ? void 0 : _$appointmentId62$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId63 = _.appointmentId) === null || _$appointmentId63 === void 0 ? void 0 : (_$appointmentId63$ = _$appointmentId63[0]) === null || _$appointmentId63$ === void 0 ? void 0 : (_$appointmentId63$$Pe = _$appointmentId63$.PersonID) === null || _$appointmentId63$$Pe === void 0 ? void 0 : (_$appointmentId63$$Pe2 = _$appointmentId63$$Pe[0]) === null || _$appointmentId63$$Pe2 === void 0 ? void 0 : (_$appointmentId63$$Pe3 = _$appointmentId63$$Pe2.photo[0]) === null || _$appointmentId63$$Pe3 === void 0 ? void 0 : _$appointmentId63$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
41063
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id40 = _.patient_id) === null || _$patient_id40 === void 0 ? void 0 : (_$patient_id40$ = _$patient_id40[0]) === null || _$patient_id40$ === void 0 ? void 0 : (_$patient_id40$$name = _$patient_id40$.name) === null || _$patient_id40$$name === void 0 ? void 0 : _$patient_id40$$name[0]) || {}),
|
|
41064
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id41 = _.patient_id) === null || _$patient_id41 === void 0 ? void 0 : (_$patient_id41$ = _$patient_id41[0]) === null || _$patient_id41$ === void 0 ? void 0 : _$patient_id41$.MRN,
|
|
41065
|
+
age: _ === null || _ === void 0 ? void 0 : (_$patient_id42 = _.patient_id) === null || _$patient_id42 === void 0 ? void 0 : (_$patient_id42$ = _$patient_id42[0]) === null || _$patient_id42$ === void 0 ? void 0 : _$patient_id42$.age,
|
|
41066
|
+
gender: _ === null || _ === void 0 ? void 0 : (_$patient_id43 = _.patient_id) === null || _$patient_id43 === void 0 ? void 0 : (_$patient_id43$ = _$patient_id43[0]) === null || _$patient_id43$ === void 0 ? void 0 : (_$patient_id43$$gende = _$patient_id43$.gender) === null || _$patient_id43$$gende === void 0 ? void 0 : _$patient_id43$$gende.display,
|
|
41067
|
+
contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id44 = _.patient_id) === null || _$patient_id44 === void 0 ? void 0 : (_$patient_id44$ = _$patient_id44[0]) === null || _$patient_id44$ === void 0 ? void 0 : (_$patient_id44$$telec = _$patient_id44$.telecom) === null || _$patient_id44$$telec === void 0 ? void 0 : (_$patient_id44$$telec2 = _$patient_id44$$telec[0]) === null || _$patient_id44$$telec2 === void 0 ? void 0 : _$patient_id44$$telec2.value),
|
|
41068
|
+
refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId64 = _.appointmentId) === null || _$appointmentId64 === void 0 ? void 0 : (_$appointmentId64$ = _$appointmentId64[0]) === null || _$appointmentId64$ === void 0 ? void 0 : _$appointmentId64$.appno,
|
|
41069
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : _$appointmentId65$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId66 = _.appointmentId) === null || _$appointmentId66 === void 0 ? void 0 : (_$appointmentId66$ = _$appointmentId66[0]) === null || _$appointmentId66$ === void 0 ? void 0 : _$appointmentId66$.start).format("DD MMM,YYYY") : "",
|
|
41070
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId67 = _.appointmentId) === null || _$appointmentId67 === void 0 ? void 0 : (_$appointmentId67$ = _$appointmentId67[0]) === null || _$appointmentId67$ === void 0 ? void 0 : _$appointmentId67$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId68 = _.appointmentId) === null || _$appointmentId68 === void 0 ? void 0 : (_$appointmentId68$ = _$appointmentId68[0]) === null || _$appointmentId68$ === void 0 ? void 0 : _$appointmentId68$.start).format("hh:mm A") : "",
|
|
41071
|
+
visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
|
|
41072
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId69 = _.appointmentId) === null || _$appointmentId69 === void 0 ? void 0 : (_$appointmentId69$ = _$appointmentId69[0]) === null || _$appointmentId69$ === void 0 ? void 0 : (_$appointmentId69$$Sp = _$appointmentId69$.SpecialtyID) === null || _$appointmentId69$$Sp === void 0 ? void 0 : _$appointmentId69$$Sp.map(function (spl) {
|
|
41073
|
+
var _spl$coding9, _spl$coding9$;
|
|
41074
|
+
|
|
41075
|
+
return spl === null || spl === void 0 ? void 0 : (_spl$coding9 = spl.coding) === null || _spl$coding9 === void 0 ? void 0 : (_spl$coding9$ = _spl$coding9[0]) === null || _spl$coding9$ === void 0 ? void 0 : _spl$coding9$.display;
|
|
41076
|
+
}).join(", "),
|
|
41077
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail18 = _.practitioner_details) === null || _$practitioner_detail18 === void 0 ? void 0 : (_$practitioner_detail19 = _$practitioner_detail18[0]) === null || _$practitioner_detail19 === void 0 ? void 0 : _$practitioner_detail19.clinic) || "",
|
|
41078
|
+
encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display,
|
|
40549
41079
|
"View Patient": true,
|
|
40550
|
-
|
|
41080
|
+
Attend: true
|
|
40551
41081
|
};
|
|
40552
41082
|
}) : [];
|
|
40553
41083
|
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|