primarycare-binder 1.1.32 → 1.1.36
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 +990 -384
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9476,13 +9476,14 @@ var makeName = function makeName() {
|
|
|
9476
9476
|
_nameObj$text = nameObj.text,
|
|
9477
9477
|
text = _nameObj$text === void 0 ? "" : _nameObj$text,
|
|
9478
9478
|
_nameObj$given = nameObj.given,
|
|
9479
|
-
given = _nameObj$given === void 0 ? "" : _nameObj$given
|
|
9480
|
-
nameObj.family
|
|
9481
|
-
|
|
9479
|
+
given = _nameObj$given === void 0 ? "" : _nameObj$given,
|
|
9480
|
+
_nameObj$family = nameObj.family,
|
|
9481
|
+
family = _nameObj$family === void 0 ? "" : _nameObj$family,
|
|
9482
|
+
_nameObj$suffix = nameObj.suffix,
|
|
9482
9483
|
suffix = _nameObj$suffix === void 0 ? "" : _nameObj$suffix;
|
|
9483
9484
|
var prefixVal = (prefix === null || prefix === void 0 ? void 0 : (_prefix$coding = prefix.coding) === null || _prefix$coding === void 0 ? void 0 : (_prefix$coding$ = _prefix$coding[0]) === null || _prefix$coding$ === void 0 ? void 0 : _prefix$coding$.display) || "";
|
|
9484
9485
|
var suffixVal = (suffix === null || suffix === void 0 ? void 0 : (_suffix$coding = suffix.coding) === null || _suffix$coding === void 0 ? void 0 : (_suffix$coding$ = _suffix$coding[0]) === null || _suffix$coding$ === void 0 ? void 0 : _suffix$coding$.display) || "";
|
|
9485
|
-
return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(suffixVal && suffixVal);
|
|
9486
|
+
return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(family && family + " ").concat(suffixVal && suffixVal);
|
|
9486
9487
|
};
|
|
9487
9488
|
|
|
9488
9489
|
var fetchData$3 = /*#__PURE__*/function () {
|
|
@@ -11371,7 +11372,7 @@ var GET__FOLLOW_UP_APPOINTMENT = createAsyncThunk("appointmentReducer/follow_up_
|
|
|
11371
11372
|
body = {
|
|
11372
11373
|
db_name: dbName,
|
|
11373
11374
|
entity: "AppointmentRequest",
|
|
11374
|
-
filter: "AppointmentRequest.patientid=='".concat(patientId, "' and DATE_TIMESTAMP(DATE_ADD(AppointmentRequest.encounterdate*1000,AppointmentRequest.followupdurval,DOCUMENT(AppointmentRequest.followupduruom).display=='Days'?'day':DOCUMENT(AppointmentRequest.followupduruom).display=='month'?'month':'week'))>=DATE_TIMESTAMP(DATE_NOW())"),
|
|
11375
|
+
filter: "AppointmentRequest.status =='pending' && AppointmentRequest.patientid=='".concat(patientId, "' and DATE_TIMESTAMP(DATE_ADD(AppointmentRequest.encounterdate*1000,AppointmentRequest.followupdurval,DOCUMENT(AppointmentRequest.followupduruom).display=='Days'?'day':DOCUMENT(AppointmentRequest.followupduruom).display=='month'?'month':'week'))>=DATE_TIMESTAMP(DATE_NOW())"),
|
|
11375
11376
|
return_fields: "merge(AppointmentRequest,{encounterid:(for e in Encounter filter e._id == AppointmentRequest.encounterid return merge(e,{appointmentId:(for app in Appointment filter app.id in e.appointmentId return app.consultationMode)}))},{followupduruom:document(AppointmentRequest.followupduruom)},{followupreason:document(AppointmentRequest.followupreason)},{healthserviceid:to_array(document(AppointmentRequest.healthserviceid))},{orgid:to_array(document(AppointmentRequest.orgid))}, {practitionerid:(for doc in Practitioner filter doc._id == AppointmentRequest.practitionerid return merge(doc,{name:(for name in HumanNameMaster filter name._id in doc.name return merge(name,{use:document(name.use)},{prefix:merge(document(name.prefix),{coding:document(document(name.prefix).coding)})},{suffix:merge(document(name.suffix),{coding:document(document(name.suffix).coding)})}))}, {practitioner_role:(for pr in PractitionerRole filter pr._id in doc.practitioner_role return merge(pr,{role:document(pr.role)}))},{photo:document(doc.photo)}))}, {patientid:(for pat in Patient filter pat._id == AppointmentRequest.patientid return merge (pat,{name:(for name in HumanNameMaster filter name._id in pat.name return merge(name,{use:(document(name.use))},{prefix:(document(name.prefix))},{suffix:document(name.suffix)}))}))},{specialtyid:document(AppointmentRequest.specialtyid)})"
|
|
11376
11377
|
}; // const body = {
|
|
11377
11378
|
// "db_name": dbName,
|
|
@@ -13977,6 +13978,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
13977
13978
|
night: night,
|
|
13978
13979
|
slots: slots,
|
|
13979
13980
|
resourceInfo: resourceInfo,
|
|
13981
|
+
bio: "",
|
|
13980
13982
|
specialities: [],
|
|
13981
13983
|
healthCareId: healthCareId,
|
|
13982
13984
|
orgId: isClinic ? id : restData === null || restData === void 0 ? void 0 : (_restData$hospital3 = restData.hospital) === null || _restData$hospital3 === void 0 ? void 0 : _restData$hospital3.id,
|
|
@@ -14026,7 +14028,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
14026
14028
|
info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
|
|
14027
14029
|
info["img"] = getImgUrl(restData === null || restData === void 0 ? void 0 : (_restData$locationID4 = restData.locationID) === null || _restData$locationID4 === void 0 ? void 0 : (_restData$locationID5 = _restData$locationID4.photo) === null || _restData$locationID5 === void 0 ? void 0 : (_restData$locationID6 = _restData$locationID5[0]) === null || _restData$locationID6 === void 0 ? void 0 : _restData$locationID6.fileid);
|
|
14028
14030
|
} else {
|
|
14029
|
-
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$;
|
|
14031
|
+
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$, _restData$biography, _restData$biography$;
|
|
14030
14032
|
|
|
14031
14033
|
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) || "";
|
|
14032
14034
|
|
|
@@ -14070,7 +14072,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
14070
14072
|
info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : _restData$hospital6.id;
|
|
14071
14073
|
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) {
|
|
14072
14074
|
return (q === null || q === void 0 ? void 0 : q.name) || "";
|
|
14073
|
-
})) === null || _restData$qualificati3 === void 0 ? void 0 : _restData$qualificati3.join(", ")) || "
|
|
14075
|
+
})) === null || _restData$qualificati3 === void 0 ? void 0 : _restData$qualificati3.join(", ")) || "----";
|
|
14074
14076
|
info["language"] = languages.size > 0 ? _toConsumableArray(languages) : [];
|
|
14075
14077
|
info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital7 = restData.hospital) === null || _restData$hospital7 === void 0 ? void 0 : _restData$hospital7.name) || "";
|
|
14076
14078
|
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) || "";
|
|
@@ -14079,6 +14081,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
|
|
|
14079
14081
|
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);
|
|
14080
14082
|
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";
|
|
14081
14083
|
info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
|
|
14084
|
+
info["bio"] = (restData === null || restData === void 0 ? void 0 : (_restData$biography = restData.biography) === null || _restData$biography === void 0 ? void 0 : (_restData$biography$ = _restData$biography[0]) === null || _restData$biography$ === void 0 ? void 0 : _restData$biography$.biography_description) || "";
|
|
14082
14085
|
}
|
|
14083
14086
|
|
|
14084
14087
|
returnData.push(info);
|
|
@@ -16352,11 +16355,11 @@ var UPSERT_PERSON = createAsyncThunk("personApiSlice/upsertPerson", /*#__PURE__*
|
|
|
16352
16355
|
doc: {
|
|
16353
16356
|
identifier: [],
|
|
16354
16357
|
name: [{
|
|
16355
|
-
use: "
|
|
16358
|
+
use: "",
|
|
16356
16359
|
text: firstName,
|
|
16357
16360
|
family: lastName,
|
|
16358
|
-
given:
|
|
16359
|
-
prefix:
|
|
16361
|
+
given: "",
|
|
16362
|
+
prefix: "",
|
|
16360
16363
|
suffix: "",
|
|
16361
16364
|
period: [{
|
|
16362
16365
|
start: Math.floor(Date.now() / 1000),
|
|
@@ -16619,6 +16622,12 @@ var READ_PERSON = createAsyncThunk("personApiSlice/readPerson", /*#__PURE__*/_as
|
|
|
16619
16622
|
_data$9$,
|
|
16620
16623
|
_data$9$$photo,
|
|
16621
16624
|
_data$9$$photo$,
|
|
16625
|
+
_data$10,
|
|
16626
|
+
_data$10$,
|
|
16627
|
+
_data$10$$Patientname,
|
|
16628
|
+
_data$10$$Patientname2,
|
|
16629
|
+
_data$10$$Patientname3,
|
|
16630
|
+
_data$10$$Patientname4,
|
|
16622
16631
|
_payload$phone3,
|
|
16623
16632
|
phone,
|
|
16624
16633
|
_payload$allData,
|
|
@@ -16662,7 +16671,7 @@ var READ_PERSON = createAsyncThunk("personApiSlice/readPerson", /*#__PURE__*/_as
|
|
|
16662
16671
|
return val.system === "Email" && val.use === "Work";
|
|
16663
16672
|
})) === null || _data$7$$telecom$find === void 0 ? void 0 : _data$7$$telecom$find.value) || "",
|
|
16664
16673
|
allData: data === null || data === void 0 ? void 0 : (_data$8 = data[0]) === null || _data$8 === void 0 ? void 0 : _data$8[0],
|
|
16665
|
-
imgUrl: (data === null || data === void 0 ? void 0 : (_data$9 = data[0]) === null || _data$9 === void 0 ? void 0 : (_data$9$ = _data$9[0]) === null || _data$9$ === void 0 ? void 0 : (_data$9$$photo = _data$9$.photo) === null || _data$9$$photo === void 0 ? void 0 : (_data$9$$photo$ = _data$9$$photo[0]) === null || _data$9$$photo$ === void 0 ? void 0 : _data$9$$photo$.fileid) || "",
|
|
16674
|
+
imgUrl: (data === null || data === void 0 ? void 0 : (_data$9 = data[0]) === null || _data$9 === void 0 ? void 0 : (_data$9$ = _data$9[0]) === null || _data$9$ === void 0 ? void 0 : (_data$9$$photo = _data$9$.photo) === null || _data$9$$photo === void 0 ? void 0 : (_data$9$$photo$ = _data$9$$photo[0]) === null || _data$9$$photo$ === void 0 ? void 0 : _data$9$$photo$.fileid) || (data === null || data === void 0 ? void 0 : (_data$10 = data[0]) === null || _data$10 === void 0 ? void 0 : (_data$10$ = _data$10[0]) === null || _data$10$ === void 0 ? void 0 : (_data$10$$Patientname = _data$10$.Patientname) === null || _data$10$$Patientname === void 0 ? void 0 : (_data$10$$Patientname2 = _data$10$$Patientname[0]) === null || _data$10$$Patientname2 === void 0 ? void 0 : (_data$10$$Patientname3 = _data$10$$Patientname2.photo) === null || _data$10$$Patientname3 === void 0 ? void 0 : (_data$10$$Patientname4 = _data$10$$Patientname3[0]) === null || _data$10$$Patientname4 === void 0 ? void 0 : _data$10$$Patientname4.fileid) || "",
|
|
16666
16675
|
data: data
|
|
16667
16676
|
};
|
|
16668
16677
|
|
|
@@ -16797,8 +16806,8 @@ var SEARCH_PRACTIONER = createAsyncThunk("personApiSlice/SearchPractioner", /*#_
|
|
|
16797
16806
|
var payload,
|
|
16798
16807
|
_ref13,
|
|
16799
16808
|
rejectWithValue,
|
|
16800
|
-
_data$
|
|
16801
|
-
_data$
|
|
16809
|
+
_data$11,
|
|
16810
|
+
_data$11$OrgID,
|
|
16802
16811
|
_payload$email3,
|
|
16803
16812
|
email,
|
|
16804
16813
|
body,
|
|
@@ -16834,7 +16843,7 @@ var SEARCH_PRACTIONER = createAsyncThunk("personApiSlice/SearchPractioner", /*#_
|
|
|
16834
16843
|
body__ = {
|
|
16835
16844
|
db_name: dbName,
|
|
16836
16845
|
entity: "Organization",
|
|
16837
|
-
filter: "Organization.id==".concat(data === null || data === void 0 ? void 0 : (_data$
|
|
16846
|
+
filter: "Organization.id==".concat(data === null || data === void 0 ? void 0 : (_data$11 = data[0]) === null || _data$11 === void 0 ? void 0 : (_data$11$OrgID = _data$11.OrgID) === null || _data$11$OrgID === void 0 ? void 0 : _data$11$OrgID[0]),
|
|
16838
16847
|
return_fields: "{_id:Organization._id,OrgID:Organization.id,name:Organization.name}"
|
|
16839
16848
|
};
|
|
16840
16849
|
_context6.next = 11;
|
|
@@ -16877,7 +16886,7 @@ var GET_RELATED_PERSON = createAsyncThunk("personApiSlice/getRelatedPerson", /*#
|
|
|
16877
16886
|
body,
|
|
16878
16887
|
data,
|
|
16879
16888
|
returnData,
|
|
16880
|
-
_data$
|
|
16889
|
+
_data$12,
|
|
16881
16890
|
_args7 = arguments;
|
|
16882
16891
|
|
|
16883
16892
|
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
@@ -16905,7 +16914,7 @@ var GET_RELATED_PERSON = createAsyncThunk("personApiSlice/getRelatedPerson", /*#
|
|
|
16905
16914
|
returnData = [];
|
|
16906
16915
|
|
|
16907
16916
|
if (Array.isArray(data)) {
|
|
16908
|
-
returnData = ((_data$
|
|
16917
|
+
returnData = ((_data$12 = data[0]) === null || _data$12 === void 0 ? void 0 : _data$12.data) || [];
|
|
16909
16918
|
}
|
|
16910
16919
|
|
|
16911
16920
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -19995,7 +20004,7 @@ var FOLLOW_UP_COUNT = createAsyncThunk("dashboardApiSlice/followUpCount", /*#__P
|
|
|
19995
20004
|
body: JSON.stringify({
|
|
19996
20005
|
db_name: dbName,
|
|
19997
20006
|
entity: "AppointmentRequest",
|
|
19998
|
-
filter: "DATE_TIMESTAMP(DATE_ADD(AppointmentRequest.encounterdate*1000,AppointmentRequest.followupdurval,DOCUMENT(AppointmentRequest.followupduruom).display=='Days'?'day':DOCUMENT(AppointmentRequest.followupduruom).display=='month'?'month':'week'))>=".concat(startDate, "*1000 && DATE_TIMESTAMP(DATE_ADD(AppointmentRequest.encounterdate*1000,AppointmentRequest.followupdurval,DOCUMENT(AppointmentRequest.followupduruom).display=='Days'?'day':DOCUMENT(AppointmentRequest.followupduruom).display=='month'?'month':'week'))<=").concat(endDate, "*1000 COLLECT WITH COUNT INTO length"),
|
|
20007
|
+
filter: "AppointmentRequest.status == 'pending' && DATE_TIMESTAMP(DATE_ADD(AppointmentRequest.encounterdate*1000,AppointmentRequest.followupdurval,DOCUMENT(AppointmentRequest.followupduruom).display=='Days'?'day':DOCUMENT(AppointmentRequest.followupduruom).display=='month'?'month':'week'))>=".concat(startDate, "*1000 && DATE_TIMESTAMP(DATE_ADD(AppointmentRequest.encounterdate*1000,AppointmentRequest.followupdurval,DOCUMENT(AppointmentRequest.followupduruom).display=='Days'?'day':DOCUMENT(AppointmentRequest.followupduruom).display=='month'?'month':'week'))<=").concat(endDate, "*1000 COLLECT WITH COUNT INTO length"),
|
|
19999
20008
|
return_fields: "{FollowUpAppointments:length}"
|
|
20000
20009
|
})
|
|
20001
20010
|
}, __readDocumentUrl__);
|
|
@@ -20029,6 +20038,7 @@ var REFERRAL_COUNT = createAsyncThunk("dashboardApiSlice/referralCount", /*#__PU
|
|
|
20029
20038
|
_data$result$0$Appoin,
|
|
20030
20039
|
_data$result8,
|
|
20031
20040
|
_data$result8$,
|
|
20041
|
+
startDate,
|
|
20032
20042
|
data,
|
|
20033
20043
|
_args16 = arguments;
|
|
20034
20044
|
|
|
@@ -20039,17 +20049,19 @@ var REFERRAL_COUNT = createAsyncThunk("dashboardApiSlice/referralCount", /*#__PU
|
|
|
20039
20049
|
payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
|
|
20040
20050
|
_ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
20041
20051
|
_context16.prev = 2;
|
|
20042
|
-
|
|
20052
|
+
startDate = getUtcTime(moment().startOf("day"));
|
|
20053
|
+
;
|
|
20054
|
+
_context16.next = 7;
|
|
20043
20055
|
return fetchData$3({
|
|
20044
20056
|
body: JSON.stringify({
|
|
20045
20057
|
db_name: dbName,
|
|
20046
20058
|
entity: "ReferralTrx",
|
|
20047
|
-
filter: "ReferralTrx.activestatus==true && ReferralTrx.recipientBookingReqd==true collect with count into length",
|
|
20059
|
+
filter: "ReferralTrx.activestatus==true && ReferralTrx.recipientBookingReqd==true && ReferralTrx.recipientBookingReqd ==true collect with count into length",
|
|
20048
20060
|
return_fields: "{AppointmentReferral : length}"
|
|
20049
20061
|
})
|
|
20050
20062
|
}, __readDocumentUrl__);
|
|
20051
20063
|
|
|
20052
|
-
case
|
|
20064
|
+
case 7:
|
|
20053
20065
|
data = _context16.sent;
|
|
20054
20066
|
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
20055
20067
|
data: {
|
|
@@ -20057,19 +20069,19 @@ var REFERRAL_COUNT = createAsyncThunk("dashboardApiSlice/referralCount", /*#__PU
|
|
|
20057
20069
|
}
|
|
20058
20070
|
}));
|
|
20059
20071
|
|
|
20060
|
-
case
|
|
20061
|
-
_context16.prev =
|
|
20072
|
+
case 11:
|
|
20073
|
+
_context16.prev = 11;
|
|
20062
20074
|
_context16.t0 = _context16["catch"](2);
|
|
20063
20075
|
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20064
20076
|
message: _context16.t0.message
|
|
20065
20077
|
})));
|
|
20066
20078
|
|
|
20067
|
-
case
|
|
20079
|
+
case 14:
|
|
20068
20080
|
case "end":
|
|
20069
20081
|
return _context16.stop();
|
|
20070
20082
|
}
|
|
20071
20083
|
}
|
|
20072
|
-
}, _callee16, null, [[2,
|
|
20084
|
+
}, _callee16, null, [[2, 11]]);
|
|
20073
20085
|
}))); //ASSIGN_PRACTITIONER_TYPE
|
|
20074
20086
|
|
|
20075
20087
|
var ASSIGN_PRACTITIONER_TYPE = createAsyncThunk("dashboardApiSlice/assignPractitionerType", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
@@ -20441,8 +20453,9 @@ var ASSIGN_LIST = createAsyncThunk("dashboardApiSlice/assignList", /*#__PURE__*/
|
|
|
20441
20453
|
})));
|
|
20442
20454
|
|
|
20443
20455
|
var generateReadJSON_Reassign = function generateReadJSON_Reassign(data) {
|
|
20444
|
-
var _data$Encounter$visit2, _data$Encounter23, _data$Encounter24, _data$Encounter25, _data$Encounter$reaso2, _data$Encounter26, _data$Encounter26$rea, _data$Appointment7, _data$Appointment8, _data$Appointment$con2, _data$Appointment9, _data$Appointment10, _data$Appointment11, _data$Appointment12, _data$Appointment12$a, _data$Encounter$patie5, _data$Encounter27, _data$Encounter27$pat, _data$Encounter27$pat2, _data$Encounter27$pat3, _ref46, _data$Encounter28, _data$Encounter28$pat, _data$Encounter28$pat2, _data$Encounter28$pat3, _data$Encounter29, _data$Encounter29$pat, _data$Encounter29$pat2, _data$Encounter29$pat3, _data$Encounter$patie6, _data$Encounter30, _data$Encounter30$pat, _data$Encounter30$pat2, _data$Encounter31, _data$Encounter31$pat, _data$Encounter31$pat2, _data$Encounter31$pat3, _data$Encounter32, _data$Encounter32$pat, _data$Encounter32$pat2, _data$Encounter32$pat3, _data$Encounter33, _data$Encounter33$pat, _data$Encounter33$pat2, _data$Encounter33$pat3, _data$Encounter$patie7, _data$Encounter34, _data$Encounter34$pat, _data$Encounter34$pat2, _data$Encounter$patie8, _data$Encounter35, _data$Encounter35$pat, _data$Encounter35$pat2, _data$Encounter35$pat3, _data$Encounter35$pat4, _data$Encounter$pract3, _data$Encounter36, _data$Encounter36$pra, _data$Encounter36$pra2, _data$Encounter36$pra3, _data$Encounter36$pra4, _data$Encounter36$pra5, _data$Encounter36$pra6, _data$Encounter37, _data$Encounter37$pra, _data$Encounter37$pra2, _data$Encounter38, _data$Encounter38$pra, _data$Encounter38$pra2, _data$Encounter$parti6, _data$Encounter39, _data$Encounter39$par, _data$Encounter39$par2, _data$Encounter39$par3, _data$Encounter39$par4, _data$Encounter$parti7, _data$Encounter40, _data$Encounter40$par, _data$Encounter40$par2, _data$Encounter40$par3, _data$Encounter40$par4, _data$Encounter40$par5, _data$Encounter40$par6, _data$Encounter40$par7, _data$Encounter40$par8, _data$Encounter40$par9, _data$Encounter$parti8, _data$Encounter41, _data$Encounter41$par, _data$Encounter41$par2, _data$Encounter41$par3, _data$Encounter41$par4, _data$Encounter41$par5, _data$Encounter41$par6, _data$Encounter$parti9, _data$Encounter42, _data$Encounter42$par, _data$Encounter42$par2, _data$Encounter42$par3, _data$Encounter42$par4, _data$Encounter42$par5, _data$Encounter42$par6, _data$Encounter$parti10, _data$Encounter43, _data$Encounter43$par, _data$Encounter43$par2, _data$Encounter43$par3, _data$Encounter$pract4, _data$Encounter44, _data$Encounter44$pra, _data$Encounter44$pra2, _data$Encounter44$pra3, _data$Encounter44$pra4, _data$Encounter45;
|
|
20456
|
+
var _data$Encounter$visit2, _data$Encounter23, _data$Encounter24, _data$Encounter25, _data$Encounter$reaso2, _data$Encounter26, _data$Encounter26$rea, _data$Appointment7, _data$Appointment8, _data$Appointment$con2, _data$Appointment9, _data$Appointment10, _data$Appointment11, _data$Appointment12, _data$Appointment12$a, _data$Encounter$patie5, _data$Encounter27, _data$Encounter27$pat, _data$Encounter27$pat2, _data$Encounter27$pat3, _ref46, _data$Encounter28, _data$Encounter28$pat, _data$Encounter28$pat2, _data$Encounter28$pat3, _data$Encounter29, _data$Encounter29$pat, _data$Encounter29$pat2, _data$Encounter29$pat3, _data$Encounter$patie6, _data$Encounter30, _data$Encounter30$pat, _data$Encounter30$pat2, _data$Encounter31, _data$Encounter31$pat, _data$Encounter31$pat2, _data$Encounter31$pat3, _data$Encounter32, _data$Encounter32$pat, _data$Encounter32$pat2, _data$Encounter32$pat3, _data$Encounter33, _data$Encounter33$pat, _data$Encounter33$pat2, _data$Encounter33$pat3, _data$Encounter$patie7, _data$Encounter34, _data$Encounter34$pat, _data$Encounter34$pat2, _data$Encounter$patie8, _data$Encounter35, _data$Encounter35$pat, _data$Encounter35$pat2, _data$Encounter35$pat3, _data$Encounter35$pat4, _data$Encounter$pract3, _data$Encounter36, _data$Encounter36$pra, _data$Encounter36$pra2, _data$Encounter36$pra3, _data$Encounter36$pra4, _data$Encounter36$pra5, _data$Encounter36$pra6, _data$Encounter37, _data$Encounter37$pra, _data$Encounter37$pra2, _data$Encounter38, _data$Encounter38$pra, _data$Encounter38$pra2, _data$Encounter$parti6, _data$Encounter39, _data$Encounter39$par, _data$Encounter39$par2, _data$Encounter39$par3, _data$Encounter39$par4, _data$Encounter$parti7, _data$Encounter40, _data$Encounter40$par, _data$Encounter40$par2, _data$Encounter40$par3, _data$Encounter40$par4, _data$Encounter40$par5, _data$Encounter40$par6, _data$Encounter40$par7, _data$Encounter40$par8, _data$Encounter40$par9, _data$Encounter40$par10, _data$Encounter$parti8, _data$Encounter41, _data$Encounter41$par, _data$Encounter41$par2, _data$Encounter41$par3, _data$Encounter41$par4, _data$Encounter41$par5, _data$Encounter41$par6, _data$Encounter$parti9, _data$Encounter42, _data$Encounter42$par, _data$Encounter42$par2, _data$Encounter42$par3, _data$Encounter42$par4, _data$Encounter42$par5, _data$Encounter42$par6, _data$Encounter$parti10, _data$Encounter43, _data$Encounter43$par, _data$Encounter43$par2, _data$Encounter43$par3, _data$Encounter$pract4, _data$Encounter44, _data$Encounter44$pra, _data$Encounter44$pra2, _data$Encounter44$pra3, _data$Encounter44$pra4, _data$Encounter45;
|
|
20445
20457
|
|
|
20458
|
+
debugger;
|
|
20446
20459
|
var json = {
|
|
20447
20460
|
visitType: (_data$Encounter$visit2 = data === null || data === void 0 ? void 0 : (_data$Encounter23 = data.Encounter) === null || _data$Encounter23 === void 0 ? void 0 : _data$Encounter23.visit_type) !== null && _data$Encounter$visit2 !== void 0 ? _data$Encounter$visit2 : "",
|
|
20448
20461
|
encounterDate: (data === null || data === void 0 ? void 0 : (_data$Encounter24 = data.Encounter) === null || _data$Encounter24 === void 0 ? void 0 : _data$Encounter24.encounterdate) ? utcTOLocal$1(data === null || data === void 0 ? void 0 : (_data$Encounter25 = data.Encounter) === null || _data$Encounter25 === void 0 ? void 0 : _data$Encounter25.encounterdate, "DD MMM,YYYY hh:mm A") : "",
|
|
@@ -20461,7 +20474,7 @@ var generateReadJSON_Reassign = function generateReadJSON_Reassign(data) {
|
|
|
20461
20474
|
clinic: (data === null || data === void 0 ? void 0 : (_data$Encounter37 = data.Encounter) === null || _data$Encounter37 === void 0 ? void 0 : (_data$Encounter37$pra = _data$Encounter37.practitioner_details) === null || _data$Encounter37$pra === void 0 ? void 0 : (_data$Encounter37$pra2 = _data$Encounter37$pra[0]) === null || _data$Encounter37$pra2 === void 0 ? void 0 : _data$Encounter37$pra2.clinic) !== "" ? data === null || data === void 0 ? void 0 : (_data$Encounter38 = data.Encounter) === null || _data$Encounter38 === void 0 ? void 0 : (_data$Encounter38$pra = _data$Encounter38.practitioner_details) === null || _data$Encounter38$pra === void 0 ? void 0 : (_data$Encounter38$pra2 = _data$Encounter38$pra[0]) === null || _data$Encounter38$pra2 === void 0 ? void 0 : _data$Encounter38$pra2.clinic : null,
|
|
20462
20475
|
//FROM PRACTITIONER
|
|
20463
20476
|
practitionerType: (_data$Encounter$parti6 = data === null || data === void 0 ? void 0 : (_data$Encounter39 = data.Encounter) === null || _data$Encounter39 === void 0 ? void 0 : (_data$Encounter39$par = _data$Encounter39.participant) === null || _data$Encounter39$par === void 0 ? void 0 : (_data$Encounter39$par2 = _data$Encounter39$par[0]) === null || _data$Encounter39$par2 === void 0 ? void 0 : (_data$Encounter39$par3 = _data$Encounter39$par2.type) === null || _data$Encounter39$par3 === void 0 ? void 0 : (_data$Encounter39$par4 = _data$Encounter39$par3[0]) === null || _data$Encounter39$par4 === void 0 ? void 0 : _data$Encounter39$par4.display) !== null && _data$Encounter$parti6 !== void 0 ? _data$Encounter$parti6 : "",
|
|
20464
|
-
practitionerRole: (_data$Encounter$parti7 = data === null || data === void 0 ? void 0 : (_data$Encounter40 = data.Encounter) === null || _data$Encounter40 === void 0 ? void 0 : (_data$Encounter40$par = _data$Encounter40.participant) === null || _data$Encounter40$par === void 0 ? void 0 : (_data$Encounter40$par2 = _data$Encounter40$par[0]) === null || _data$Encounter40$par2 === void 0 ? void 0 : (_data$Encounter40$par3 = _data$Encounter40$par2.Practitioner_id) === null || _data$Encounter40$par3 === void 0 ? void 0 : (_data$Encounter40$par4 = _data$Encounter40$par3[0]) === null || _data$Encounter40$par4 === void 0 ? void 0 : (_data$Encounter40$par5 = _data$Encounter40$par4.practitioner_role) === null || _data$Encounter40$par5 === void 0 ? void 0 : (_data$Encounter40$par6 = _data$Encounter40$par5[0]) === null || _data$Encounter40$par6 === void 0 ? void 0 : (_data$Encounter40$par7 = _data$Encounter40$par6.role) === null || _data$Encounter40$par7 === void 0 ? void 0 : (_data$Encounter40$par8 = _data$Encounter40$par7[0]
|
|
20477
|
+
practitionerRole: (_data$Encounter$parti7 = data === null || data === void 0 ? void 0 : (_data$Encounter40 = data.Encounter) === null || _data$Encounter40 === void 0 ? void 0 : (_data$Encounter40$par = _data$Encounter40.participant) === null || _data$Encounter40$par === void 0 ? void 0 : (_data$Encounter40$par2 = _data$Encounter40$par[0]) === null || _data$Encounter40$par2 === void 0 ? void 0 : (_data$Encounter40$par3 = _data$Encounter40$par2.Practitioner_id) === null || _data$Encounter40$par3 === void 0 ? void 0 : (_data$Encounter40$par4 = _data$Encounter40$par3[0]) === null || _data$Encounter40$par4 === void 0 ? void 0 : (_data$Encounter40$par5 = _data$Encounter40$par4.practitioner_role) === null || _data$Encounter40$par5 === void 0 ? void 0 : (_data$Encounter40$par6 = _data$Encounter40$par5[0]) === null || _data$Encounter40$par6 === void 0 ? void 0 : (_data$Encounter40$par7 = _data$Encounter40$par6.role) === null || _data$Encounter40$par7 === void 0 ? void 0 : (_data$Encounter40$par8 = _data$Encounter40$par7[0]) === null || _data$Encounter40$par8 === void 0 ? void 0 : (_data$Encounter40$par9 = _data$Encounter40$par8.coding) === null || _data$Encounter40$par9 === void 0 ? void 0 : (_data$Encounter40$par10 = _data$Encounter40$par9[0]) === null || _data$Encounter40$par10 === void 0 ? void 0 : _data$Encounter40$par10.display) !== null && _data$Encounter$parti7 !== void 0 ? _data$Encounter$parti7 : "",
|
|
20465
20478
|
practitioner: (_data$Encounter$parti8 = data === null || data === void 0 ? void 0 : (_data$Encounter41 = data.Encounter) === null || _data$Encounter41 === void 0 ? void 0 : (_data$Encounter41$par = _data$Encounter41.participant) === null || _data$Encounter41$par === void 0 ? void 0 : (_data$Encounter41$par2 = _data$Encounter41$par[0]) === null || _data$Encounter41$par2 === void 0 ? void 0 : (_data$Encounter41$par3 = _data$Encounter41$par2.Practitioner_id) === null || _data$Encounter41$par3 === void 0 ? void 0 : (_data$Encounter41$par4 = _data$Encounter41$par3[0]) === null || _data$Encounter41$par4 === void 0 ? void 0 : (_data$Encounter41$par5 = _data$Encounter41$par4.name) === null || _data$Encounter41$par5 === void 0 ? void 0 : (_data$Encounter41$par6 = _data$Encounter41$par5[0]) === null || _data$Encounter41$par6 === void 0 ? void 0 : _data$Encounter41$par6.text) !== null && _data$Encounter$parti8 !== void 0 ? _data$Encounter$parti8 : "",
|
|
20466
20479
|
//FOR ASSIGN QUERY
|
|
20467
20480
|
practroleId: (_data$Encounter$parti9 = data === null || data === void 0 ? void 0 : (_data$Encounter42 = data.Encounter) === null || _data$Encounter42 === void 0 ? void 0 : (_data$Encounter42$par = _data$Encounter42.participant) === null || _data$Encounter42$par === void 0 ? void 0 : (_data$Encounter42$par2 = _data$Encounter42$par[0]) === null || _data$Encounter42$par2 === void 0 ? void 0 : (_data$Encounter42$par3 = _data$Encounter42$par2.Practitioner_id) === null || _data$Encounter42$par3 === void 0 ? void 0 : (_data$Encounter42$par4 = _data$Encounter42$par3[0]) === null || _data$Encounter42$par4 === void 0 ? void 0 : (_data$Encounter42$par5 = _data$Encounter42$par4.practitioner_role) === null || _data$Encounter42$par5 === void 0 ? void 0 : (_data$Encounter42$par6 = _data$Encounter42$par5[0]) === null || _data$Encounter42$par6 === void 0 ? void 0 : _data$Encounter42$par6._id) !== null && _data$Encounter$parti9 !== void 0 ? _data$Encounter$parti9 : "",
|
|
@@ -20590,23 +20603,24 @@ var REASSIGN_LIST = createAsyncThunk("dashboardApiSlice/reassignList", /*#__PURE
|
|
|
20590
20603
|
case 6:
|
|
20591
20604
|
data = _context23.sent;
|
|
20592
20605
|
readJSON = generateReadJSON_Reassign(data.result[0] ? data.result[0] : null);
|
|
20606
|
+
debugger;
|
|
20593
20607
|
return _context23.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
20594
20608
|
data: readJSON
|
|
20595
20609
|
}));
|
|
20596
20610
|
|
|
20597
|
-
case
|
|
20598
|
-
_context23.prev =
|
|
20611
|
+
case 12:
|
|
20612
|
+
_context23.prev = 12;
|
|
20599
20613
|
_context23.t0 = _context23["catch"](2);
|
|
20600
20614
|
return _context23.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20601
20615
|
message: _context23.t0.message
|
|
20602
20616
|
})));
|
|
20603
20617
|
|
|
20604
|
-
case
|
|
20618
|
+
case 15:
|
|
20605
20619
|
case "end":
|
|
20606
20620
|
return _context23.stop();
|
|
20607
20621
|
}
|
|
20608
20622
|
}
|
|
20609
|
-
}, _callee23, null, [[2,
|
|
20623
|
+
}, _callee23, null, [[2, 12]]);
|
|
20610
20624
|
}))); //CLOSE_CONSULTATION
|
|
20611
20625
|
|
|
20612
20626
|
var CLOSE_CONSULTATION = createAsyncThunk("dashboardApiSlice/closeConsultation", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee24() {
|
|
@@ -37966,12 +37980,13 @@ var query$4 = {
|
|
|
37966
37980
|
getAppointments: function getAppointments(data) {
|
|
37967
37981
|
return {
|
|
37968
37982
|
db_name: dbName,
|
|
37969
|
-
entity: "Appointment
|
|
37983
|
+
entity: "Appointment",
|
|
37970
37984
|
filter: {
|
|
37971
|
-
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, "'")
|
|
37972
|
-
|
|
37985
|
+
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, "'") // Encounter:
|
|
37986
|
+
// "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'",
|
|
37987
|
+
|
|
37973
37988
|
},
|
|
37974
|
-
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)}
|
|
37989
|
+
"return_fields": "{Appointment:merge(Appointment,{orgid:document(Appointment.orgid)},{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)},{MRN:(for pat in Patient filter pat.personID==per.Id return pat.alias)},{age:(for pat in Patient filter pat.personID==per.Id return pat.age)})),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)}))})}"
|
|
37975
37990
|
};
|
|
37976
37991
|
},
|
|
37977
37992
|
getFirstVisits: function getFirstVisits(data) {
|
|
@@ -37982,7 +37997,7 @@ var query$4 = {
|
|
|
37982
37997
|
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, "'"),
|
|
37983
37998
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
|
|
37984
37999
|
},
|
|
37985
|
-
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))}))})}"
|
|
38000
|
+
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 {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37986
38001
|
};
|
|
37987
38002
|
},
|
|
37988
38003
|
getOtherVisits: function getOtherVisits(data) {
|
|
@@ -37993,7 +38008,7 @@ var query$4 = {
|
|
|
37993
38008
|
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, "'"),
|
|
37994
38009
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
|
|
37995
38010
|
},
|
|
37996
|
-
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))}))})}"
|
|
38011
|
+
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 {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
37997
38012
|
};
|
|
37998
38013
|
},
|
|
37999
38014
|
getWalkIns: function getWalkIns(data) {
|
|
@@ -38004,7 +38019,7 @@ var query$4 = {
|
|
|
38004
38019
|
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, "'"),
|
|
38005
38020
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
|
|
38006
38021
|
},
|
|
38007
|
-
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))}))})}"
|
|
38022
|
+
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 {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
38008
38023
|
};
|
|
38009
38024
|
},
|
|
38010
38025
|
getNewPatients: function getNewPatients(data) {
|
|
@@ -38015,7 +38030,7 @@ var query$4 = {
|
|
|
38015
38030
|
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, "'"),
|
|
38016
38031
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
|
|
38017
38032
|
},
|
|
38018
|
-
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))}))})}"
|
|
38033
|
+
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 {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
38019
38034
|
};
|
|
38020
38035
|
},
|
|
38021
38036
|
getTodayVisits: function getTodayVisits(data) {
|
|
@@ -38026,20 +38041,31 @@ var query$4 = {
|
|
|
38026
38041
|
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, "'"),
|
|
38027
38042
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' "
|
|
38028
38043
|
},
|
|
38029
|
-
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))}))})}"
|
|
38044
|
+
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 {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
|
|
38030
38045
|
};
|
|
38031
38046
|
},
|
|
38032
38047
|
// NURSE
|
|
38033
38048
|
getAppointmentsNurse: function getAppointmentsNurse(data) {
|
|
38049
|
+
// return {
|
|
38050
|
+
// db_name: dbName,
|
|
38051
|
+
// entity: "Practitioner,Appointment,Encounter",
|
|
38052
|
+
// filter: {
|
|
38053
|
+
// Practitioner: `Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==${data?.practionerID} && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='${data?.orgID}'`,
|
|
38054
|
+
// Appointment: `Appointment.activestatus==true && Appointment.orgid=='${data?.orgID}' && Appointment.start>=${data?.startDate} && Appointment.end<=${data?.endDate} && lower(Appointment.appointmentType)!='cancelled' && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID`,
|
|
38055
|
+
// Encounter:
|
|
38056
|
+
// "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'",
|
|
38057
|
+
// },
|
|
38058
|
+
// return_fields:
|
|
38059
|
+
// "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)}))})",
|
|
38060
|
+
// };
|
|
38034
38061
|
return {
|
|
38035
|
-
db_name:
|
|
38036
|
-
entity: "Practitioner,Appointment
|
|
38037
|
-
filter: {
|
|
38062
|
+
"db_name": "primarycare",
|
|
38063
|
+
"entity": "Practitioner,Appointment",
|
|
38064
|
+
"filter": {
|
|
38038
38065
|
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, "'"),
|
|
38039
|
-
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")
|
|
38040
|
-
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
|
|
38066
|
+
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")
|
|
38041
38067
|
},
|
|
38042
|
-
return_fields: "merge(
|
|
38068
|
+
"return_fields": "{Appointment:merge(Appointment,{orgid:document(Appointment.orgid)},{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)},{MRN:(for pat in Patient filter pat.personID==per.Id return pat.alias)},{age:(for pat in Patient filter pat.personID==per.Id return pat.age)})),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)}))})}"
|
|
38043
38069
|
};
|
|
38044
38070
|
},
|
|
38045
38071
|
getFirstVisitsNurse: function getFirstVisitsNurse(data) {
|
|
@@ -38086,7 +38112,7 @@ var query$4 = {
|
|
|
38086
38112
|
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, "'"),
|
|
38087
38113
|
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'")
|
|
38088
38114
|
},
|
|
38089
|
-
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)}))}))})"
|
|
38115
|
+
return_fields: "merge(Encounter,{status:document(Encounter.status),patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
38090
38116
|
};
|
|
38091
38117
|
},
|
|
38092
38118
|
getWalkInsNurse: function getWalkInsNurse(data) {
|
|
@@ -38105,12 +38131,13 @@ var query$4 = {
|
|
|
38105
38131
|
getAppointmentsDoctor: function getAppointmentsDoctor(data) {
|
|
38106
38132
|
return {
|
|
38107
38133
|
db_name: dbName,
|
|
38108
|
-
entity: "Appointment
|
|
38134
|
+
entity: "Appointment",
|
|
38109
38135
|
filter: {
|
|
38110
|
-
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, "'")
|
|
38111
|
-
|
|
38136
|
+
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, "'") // Encounter:
|
|
38137
|
+
// "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'",
|
|
38138
|
+
|
|
38112
38139
|
},
|
|
38113
|
-
return_fields: "merge(
|
|
38140
|
+
"return_fields": "{Appointment:merge(Appointment,{orgid:document(Appointment.orgid)},{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)},{MRN:(for pat in Patient filter pat.personID==per.Id return pat.alias)},{age:(for pat in Patient filter pat.personID==per.Id return pat.age)})),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)}))})}"
|
|
38114
38141
|
};
|
|
38115
38142
|
},
|
|
38116
38143
|
getFirstVisitsDoctor: function getFirstVisitsDoctor(data) {
|
|
@@ -38121,7 +38148,7 @@ var query$4 = {
|
|
|
38121
38148
|
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, "'"),
|
|
38122
38149
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
|
|
38123
38150
|
},
|
|
38124
|
-
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)}))}))})"
|
|
38151
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(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)}))}))})"
|
|
38125
38152
|
};
|
|
38126
38153
|
},
|
|
38127
38154
|
getNewPatientsDoctor: function getNewPatientsDoctor(data) {
|
|
@@ -38132,7 +38159,7 @@ var query$4 = {
|
|
|
38132
38159
|
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, "'"),
|
|
38133
38160
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
|
|
38134
38161
|
},
|
|
38135
|
-
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)}))}))})"
|
|
38162
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(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)}))}))})"
|
|
38136
38163
|
};
|
|
38137
38164
|
},
|
|
38138
38165
|
getOtherVisitsDoctor: function getOtherVisitsDoctor(data) {
|
|
@@ -38143,7 +38170,7 @@ var query$4 = {
|
|
|
38143
38170
|
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, "'"),
|
|
38144
38171
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
|
|
38145
38172
|
},
|
|
38146
|
-
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)}))}))})"
|
|
38173
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(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)}))}))})"
|
|
38147
38174
|
};
|
|
38148
38175
|
},
|
|
38149
38176
|
getTodayVisitsDoctor: function getTodayVisitsDoctor(data) {
|
|
@@ -38154,7 +38181,7 @@ var query$4 = {
|
|
|
38154
38181
|
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, "' "),
|
|
38155
38182
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
|
|
38156
38183
|
},
|
|
38157
|
-
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)}))}))})"
|
|
38184
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(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)}))}))})"
|
|
38158
38185
|
};
|
|
38159
38186
|
},
|
|
38160
38187
|
getWalkInsDoctor: function getWalkInsDoctor(data) {
|
|
@@ -38165,7 +38192,7 @@ var query$4 = {
|
|
|
38165
38192
|
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, "'"),
|
|
38166
38193
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
|
|
38167
38194
|
},
|
|
38168
|
-
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)}))}))})"
|
|
38195
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(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)}))}))})"
|
|
38169
38196
|
};
|
|
38170
38197
|
}
|
|
38171
38198
|
};
|
|
@@ -38196,28 +38223,48 @@ var GET_APPOINTMENTS = createAsyncThunk("appointmentStatsApiSlice/getAppointment
|
|
|
38196
38223
|
case 5:
|
|
38197
38224
|
data = _context.sent;
|
|
38198
38225
|
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 (_) {
|
|
38199
|
-
var _$Appointment, _$Appointment$PersonI, _$Appointment$PersonI2, _$Appointment$PersonI3, _$
|
|
38226
|
+
var _$Appointment, _$Appointment$PersonI, _$Appointment$PersonI2, _$Appointment$PersonI3, _$Appointment2, _$Appointment2$Person, _$Appointment2$Person2, _$Appointment2$Person3, _$Appointment3, _$Appointment3$Person, _$Appointment3$Person2, _$Appointment4, _$Appointment5, _$Appointment6, _$Appointment7, _$Appointment$appoint, _$Appointment8, _$Appointment9, _$Appointment10;
|
|
38200
38227
|
|
|
38201
38228
|
return {
|
|
38202
|
-
img:
|
|
38203
|
-
|
|
38204
|
-
|
|
38205
|
-
|
|
38206
|
-
|
|
38207
|
-
|
|
38208
|
-
|
|
38209
|
-
|
|
38210
|
-
|
|
38211
|
-
|
|
38212
|
-
|
|
38213
|
-
|
|
38214
|
-
|
|
38215
|
-
|
|
38216
|
-
|
|
38217
|
-
|
|
38218
|
-
"
|
|
38219
|
-
|
|
38220
|
-
|
|
38229
|
+
// img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
38230
|
+
// ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
|
|
38231
|
+
// : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38232
|
+
name: makeName((_ === 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.name) === null || _$Appointment$PersonI3 === void 0 ? void 0 : _$Appointment$PersonI3[0]) || {}),
|
|
38233
|
+
mrn: (_$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.MRN) === null || _$Appointment2$Person3 === void 0 ? void 0 : _$Appointment2$Person3[0],
|
|
38234
|
+
// enId: _.Encounter.id,
|
|
38235
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment3 = _.Appointment) === null || _$Appointment3 === void 0 ? void 0 : (_$Appointment3$Person = _$Appointment3.PersonID) === null || _$Appointment3$Person === void 0 ? void 0 : (_$Appointment3$Person2 = _$Appointment3$Person[0]) === null || _$Appointment3$Person2 === void 0 ? void 0 : _$Appointment3$Person2.birthDay),
|
|
38236
|
+
// date: _?.Appointment?.start
|
|
38237
|
+
// ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
|
|
38238
|
+
// : "",
|
|
38239
|
+
// time: _?.Appointment?.start
|
|
38240
|
+
// ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
|
|
38241
|
+
// : "",
|
|
38242
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment4 = _.Appointment) === null || _$Appointment4 === void 0 ? void 0 : _$Appointment4.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment5 = _.Appointment) === null || _$Appointment5 === void 0 ? void 0 : _$Appointment5.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment6 = _.Appointment) === null || _$Appointment6 === void 0 ? void 0 : _$Appointment6.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment7 = _.Appointment) === null || _$Appointment7 === void 0 ? void 0 : _$Appointment7.start, "hh:mm A") : ""),
|
|
38243
|
+
// speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
|
|
38244
|
+
// return spl?.coding?.[0]?.display;
|
|
38245
|
+
// }).join(", "),
|
|
38246
|
+
// clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
|
|
38247
|
+
// dob: _?.Appointment?.PersonID?.[0]?.birthDay,
|
|
38248
|
+
// gender: _?.Appointment?.PersonID?.[0]?.gender,
|
|
38249
|
+
// contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
|
|
38250
|
+
visitType: (_$Appointment$appoint = _ === null || _ === void 0 ? void 0 : (_$Appointment8 = _.Appointment) === null || _$Appointment8 === void 0 ? void 0 : _$Appointment8.appointmentType) !== null && _$Appointment$appoint !== void 0 ? _$Appointment$appoint : "",
|
|
38251
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment9 = _.Appointment) === null || _$Appointment9 === void 0 ? void 0 : _$Appointment9.appstatus) || "",
|
|
38252
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment10 = _.Appointment) === null || _$Appointment10 === void 0 ? void 0 : _$Appointment10.appno) || "",
|
|
38253
|
+
// type: "OP",
|
|
38254
|
+
// "Register Visit": true,
|
|
38255
|
+
// "Modify Appointment": true,
|
|
38256
|
+
// "Cancel Appointment": true,
|
|
38257
|
+
// "View Profile": true,
|
|
38258
|
+
// data: _,
|
|
38259
|
+
viewaction: JSON.stringify({
|
|
38260
|
+
appNo: _.Appointment.id
|
|
38261
|
+
}),
|
|
38262
|
+
modifyaction: JSON.stringify({
|
|
38263
|
+
appNo: _.Appointment.id
|
|
38264
|
+
}),
|
|
38265
|
+
cancelaction: JSON.stringify({
|
|
38266
|
+
appNo: _.Appointment.id
|
|
38267
|
+
})
|
|
38221
38268
|
};
|
|
38222
38269
|
}) : [];
|
|
38223
38270
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38262,28 +38309,64 @@ var GET_FIRST_VISITS = createAsyncThunk("appointmentStatsApiSlice/getFirstVisits
|
|
|
38262
38309
|
case 5:
|
|
38263
38310
|
data = _context2.sent;
|
|
38264
38311
|
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 (_) {
|
|
38265
|
-
var _$
|
|
38312
|
+
var _$Appointment11, _$Appointment11$Perso, _$Appointment11$Perso2, _$Appointment11$Perso3, _$Appointment11$Perso4, _$Appointment12, _$Appointment12$Perso, _$Appointment12$Perso2, _$Appointment12$Perso3, _$Appointment12$Perso4, _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Appointment13, _$Appointment13$Perso, _$Appointment13$Perso2, _$Appointment14, _$Appointment15, _$Appointment16, _$Appointment17, _$Encounter3, _$Encounter4, _$Encounter4$status, _$Encounter$appointme, _$Encounter5, _$Encounter5$appointm, _$Encounter$appointme2, _$Encounter6, _$Encounter6$appointm, _$Encounter7, _$Encounter7$patient_, _$Encounter7$patient_2, _$Encounter7$patient_3, _$Encounter7$patient_4, _$Appointment$PersonI4, _$Appointment18, _$Appointment18$Perso, _$Appointment18$Perso2, _$Encounter$patient_i4, _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Encounter$appointme3, _$Encounter9, _$Encounter9$appointm, _$Encounter10, _$Encounter10$patient, _$Encounter10$patient2, _$Encounter10$patient3, _$Encounter10$patient4, _$Appointment$PersonI5, _$Appointment19, _$Appointment19$Perso, _$Appointment19$Perso2, _$Encounter$patient_i5, _$Encounter11, _$Encounter11$patient, _$Encounter11$patient2, _$Encounter$appointme4, _$Encounter12, _$Encounter12$appoint, _$Encounter13, _$Encounter13$patient, _$Encounter13$patient2, _$Encounter13$patient3, _$Encounter13$patient4, _$Appointment$PersonI6, _$Appointment20, _$Appointment20$Perso, _$Appointment20$Perso2, _$Encounter$patient_i6, _$Encounter14, _$Encounter14$patient, _$Encounter14$patient2;
|
|
38266
38313
|
|
|
38267
38314
|
return {
|
|
38268
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38269
|
-
name: makeName(
|
|
38270
|
-
mrn: _
|
|
38271
|
-
date:
|
|
38272
|
-
|
|
38273
|
-
|
|
38274
|
-
|
|
38275
|
-
|
|
38276
|
-
|
|
38277
|
-
|
|
38278
|
-
|
|
38279
|
-
|
|
38280
|
-
|
|
38281
|
-
|
|
38282
|
-
|
|
38283
|
-
|
|
38284
|
-
|
|
38285
|
-
|
|
38286
|
-
|
|
38315
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment11 = _.Appointment) === null || _$Appointment11 === void 0 ? void 0 : (_$Appointment11$Perso = _$Appointment11.PersonID) === null || _$Appointment11$Perso === void 0 ? void 0 : (_$Appointment11$Perso2 = _$Appointment11$Perso[0]) === null || _$Appointment11$Perso2 === void 0 ? void 0 : (_$Appointment11$Perso3 = _$Appointment11$Perso2.photo) === null || _$Appointment11$Perso3 === void 0 ? void 0 : (_$Appointment11$Perso4 = _$Appointment11$Perso3[0]) === null || _$Appointment11$Perso4 === void 0 ? void 0 : _$Appointment11$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment12 = _.Appointment) === null || _$Appointment12 === void 0 ? void 0 : (_$Appointment12$Perso = _$Appointment12.PersonID) === null || _$Appointment12$Perso === void 0 ? void 0 : (_$Appointment12$Perso2 = _$Appointment12$Perso[0]) === null || _$Appointment12$Perso2 === void 0 ? void 0 : (_$Appointment12$Perso3 = _$Appointment12$Perso2.photo) === null || _$Appointment12$Perso3 === void 0 ? void 0 : (_$Appointment12$Perso4 = _$Appointment12$Perso3[0]) === null || _$Appointment12$Perso4 === void 0 ? void 0 : _$Appointment12$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38316
|
+
// name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
|
|
38317
|
+
// mrn: _?.Encounter?.patient_id?.[0]?.MRN,
|
|
38318
|
+
// date: _?.Appointment?.start
|
|
38319
|
+
// ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
|
|
38320
|
+
// : "",
|
|
38321
|
+
// time: _?.Appointment?.start
|
|
38322
|
+
// ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
|
|
38323
|
+
// : "",
|
|
38324
|
+
// speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
|
|
38325
|
+
// return spl?.coding?.[0]?.display;
|
|
38326
|
+
// }).join(", "),
|
|
38327
|
+
// clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
|
|
38328
|
+
// dob: _?.Appointment?.PersonID?.[0]?.birthDay,
|
|
38329
|
+
// contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
|
|
38330
|
+
// visitType: _?.Encounter?.visit_type,
|
|
38331
|
+
// appointmentStatus: _?.Encounter?.status?.display,
|
|
38332
|
+
// type: "OP",
|
|
38333
|
+
// appNo: _?.Encounter?.appointmentId?.[0] ?? "",
|
|
38334
|
+
// data: _,
|
|
38335
|
+
// enId: _.Encounter.id,
|
|
38336
|
+
// age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
|
|
38337
|
+
// gender: _?.Appointment?.PersonID?.[0]?.gender,
|
|
38338
|
+
// "Register Visit": true,
|
|
38339
|
+
// "Modify Appointment": true,
|
|
38340
|
+
// "Cancel Appointment": true,
|
|
38341
|
+
// "View Profile": true,
|
|
38342
|
+
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]) || {}),
|
|
38343
|
+
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,
|
|
38344
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment13 = _.Appointment) === null || _$Appointment13 === void 0 ? void 0 : (_$Appointment13$Perso = _$Appointment13.PersonID) === null || _$Appointment13$Perso === void 0 ? void 0 : (_$Appointment13$Perso2 = _$Appointment13$Perso[0]) === null || _$Appointment13$Perso2 === void 0 ? void 0 : _$Appointment13$Perso2.birthDay),
|
|
38345
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment14 = _.Appointment) === null || _$Appointment14 === void 0 ? void 0 : _$Appointment14.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment15 = _.Appointment) === null || _$Appointment15 === void 0 ? void 0 : _$Appointment15.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment16 = _.Appointment) === null || _$Appointment16 === void 0 ? void 0 : _$Appointment16.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment17 = _.Appointment) === null || _$Appointment17 === void 0 ? void 0 : _$Appointment17.start, "hh:mm A") : ""),
|
|
38346
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter3 = _.Encounter) === null || _$Encounter3 === void 0 ? void 0 : _$Encounter3.visit_type,
|
|
38347
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter4 = _.Encounter) === null || _$Encounter4 === void 0 ? void 0 : (_$Encounter4$status = _$Encounter4.status) === null || _$Encounter4$status === void 0 ? void 0 : _$Encounter4$status.display,
|
|
38348
|
+
refNo: (_$Encounter$appointme = _ === null || _ === void 0 ? void 0 : (_$Encounter5 = _.Encounter) === null || _$Encounter5 === void 0 ? void 0 : (_$Encounter5$appointm = _$Encounter5.appointmentId) === null || _$Encounter5$appointm === void 0 ? void 0 : _$Encounter5$appointm[0]) !== null && _$Encounter$appointme !== void 0 ? _$Encounter$appointme : "",
|
|
38349
|
+
viewaction: JSON.stringify({
|
|
38350
|
+
appNo: (_$Encounter$appointme2 = _ === null || _ === void 0 ? void 0 : (_$Encounter6 = _.Encounter) === null || _$Encounter6 === void 0 ? void 0 : (_$Encounter6$appointm = _$Encounter6.appointmentId) === null || _$Encounter6$appointm === void 0 ? void 0 : _$Encounter6$appointm[0]) !== null && _$Encounter$appointme2 !== void 0 ? _$Encounter$appointme2 : "",
|
|
38351
|
+
enId: _.Encounter.id,
|
|
38352
|
+
contact: _ === 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.telecom) === null || _$Encounter7$patient_3 === void 0 ? void 0 : (_$Encounter7$patient_4 = _$Encounter7$patient_3[0]) === null || _$Encounter7$patient_4 === void 0 ? void 0 : _$Encounter7$patient_4.value,
|
|
38353
|
+
personId: (_$Appointment$PersonI4 = _ === 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$Perso2.Id) !== null && _$Appointment$PersonI4 !== void 0 ? _$Appointment$PersonI4 : null,
|
|
38354
|
+
patientId: (_$Encounter$patient_i4 = _ === 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.id) !== null && _$Encounter$patient_i4 !== void 0 ? _$Encounter$patient_i4 : null
|
|
38355
|
+
}),
|
|
38356
|
+
modifyaction: JSON.stringify({
|
|
38357
|
+
appNo: (_$Encounter$appointme3 = _ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$appointm = _$Encounter9.appointmentId) === null || _$Encounter9$appointm === void 0 ? void 0 : _$Encounter9$appointm[0]) !== null && _$Encounter$appointme3 !== void 0 ? _$Encounter$appointme3 : "",
|
|
38358
|
+
enId: _.Encounter.id,
|
|
38359
|
+
contact: _ === 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,
|
|
38360
|
+
personId: (_$Appointment$PersonI5 = _ === null || _ === void 0 ? void 0 : (_$Appointment19 = _.Appointment) === null || _$Appointment19 === void 0 ? void 0 : (_$Appointment19$Perso = _$Appointment19.PersonID) === null || _$Appointment19$Perso === void 0 ? void 0 : (_$Appointment19$Perso2 = _$Appointment19$Perso[0]) === null || _$Appointment19$Perso2 === void 0 ? void 0 : _$Appointment19$Perso2.Id) !== null && _$Appointment$PersonI5 !== void 0 ? _$Appointment$PersonI5 : null,
|
|
38361
|
+
patientId: (_$Encounter$patient_i5 = _ === null || _ === void 0 ? void 0 : (_$Encounter11 = _.Encounter) === null || _$Encounter11 === void 0 ? void 0 : (_$Encounter11$patient = _$Encounter11.patient_id) === null || _$Encounter11$patient === void 0 ? void 0 : (_$Encounter11$patient2 = _$Encounter11$patient[0]) === null || _$Encounter11$patient2 === void 0 ? void 0 : _$Encounter11$patient2.id) !== null && _$Encounter$patient_i5 !== void 0 ? _$Encounter$patient_i5 : null
|
|
38362
|
+
}),
|
|
38363
|
+
cancelaction: JSON.stringify({
|
|
38364
|
+
appNo: (_$Encounter$appointme4 = _ === null || _ === void 0 ? void 0 : (_$Encounter12 = _.Encounter) === null || _$Encounter12 === void 0 ? void 0 : (_$Encounter12$appoint = _$Encounter12.appointmentId) === null || _$Encounter12$appoint === void 0 ? void 0 : _$Encounter12$appoint[0]) !== null && _$Encounter$appointme4 !== void 0 ? _$Encounter$appointme4 : "",
|
|
38365
|
+
enId: _.Encounter.id,
|
|
38366
|
+
contact: _ === 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.telecom) === null || _$Encounter13$patient3 === void 0 ? void 0 : (_$Encounter13$patient4 = _$Encounter13$patient3[0]) === null || _$Encounter13$patient4 === void 0 ? void 0 : _$Encounter13$patient4.value,
|
|
38367
|
+
personId: (_$Appointment$PersonI6 = _ === null || _ === void 0 ? void 0 : (_$Appointment20 = _.Appointment) === null || _$Appointment20 === void 0 ? void 0 : (_$Appointment20$Perso = _$Appointment20.PersonID) === null || _$Appointment20$Perso === void 0 ? void 0 : (_$Appointment20$Perso2 = _$Appointment20$Perso[0]) === null || _$Appointment20$Perso2 === void 0 ? void 0 : _$Appointment20$Perso2.Id) !== null && _$Appointment$PersonI6 !== void 0 ? _$Appointment$PersonI6 : null,
|
|
38368
|
+
patientId: (_$Encounter$patient_i6 = _ === 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.id) !== null && _$Encounter$patient_i6 !== void 0 ? _$Encounter$patient_i6 : null
|
|
38369
|
+
})
|
|
38287
38370
|
};
|
|
38288
38371
|
}) : [];
|
|
38289
38372
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38328,28 +38411,66 @@ var GET_OTHER_VISITS = createAsyncThunk("appointmentStatsApiSlice/getOtherVisits
|
|
|
38328
38411
|
case 5:
|
|
38329
38412
|
data = _context3.sent;
|
|
38330
38413
|
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 (_) {
|
|
38331
|
-
var _$
|
|
38414
|
+
var _$Encounter15, _$Encounter15$patient, _$Encounter15$patient2, _$Encounter15$patient3, _$Encounter16, _$Encounter16$patient, _$Encounter16$patient2, _$Appointment21, _$Appointment21$Perso, _$Appointment21$Perso2, _$Appointment22, _$Appointment23, _$Appointment24, _$Appointment25, _$Encounter17, _$Encounter18, _$Encounter18$status, _$Encounter$appointme5, _$Encounter19, _$Encounter19$appoint, _$Encounter$appointme6, _$Encounter20, _$Encounter20$appoint, _$Encounter21, _$Encounter21$patient, _$Encounter21$patient2, _$Encounter21$patient3, _$Encounter21$patient4, _$Appointment$PersonI7, _$Appointment26, _$Appointment26$Perso, _$Appointment26$Perso2, _$Encounter$patient_i7, _$Encounter22, _$Encounter22$patient, _$Encounter22$patient2, _$Encounter$appointme7, _$Encounter23, _$Encounter23$appoint, _$Encounter24, _$Encounter24$patient, _$Encounter24$patient2, _$Encounter24$patient3, _$Encounter24$patient4, _$Appointment$PersonI8, _$Appointment27, _$Appointment27$Perso, _$Appointment27$Perso2, _$Encounter$patient_i8, _$Encounter25, _$Encounter25$patient, _$Encounter25$patient2, _$Encounter$appointme8, _$Encounter26, _$Encounter26$appoint, _$Encounter27, _$Encounter27$patient, _$Encounter27$patient2, _$Encounter27$patient3, _$Encounter27$patient4, _$Appointment$PersonI9, _$Appointment28, _$Appointment28$Perso, _$Appointment28$Perso2, _$Encounter$patient_i9, _$Encounter28, _$Encounter28$patient, _$Encounter28$patient2;
|
|
38332
38415
|
|
|
38333
38416
|
return {
|
|
38334
|
-
img:
|
|
38335
|
-
|
|
38336
|
-
|
|
38337
|
-
|
|
38338
|
-
|
|
38339
|
-
|
|
38340
|
-
|
|
38341
|
-
|
|
38342
|
-
|
|
38343
|
-
|
|
38344
|
-
|
|
38345
|
-
|
|
38346
|
-
|
|
38417
|
+
// img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
38418
|
+
// ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
|
|
38419
|
+
// : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38420
|
+
// name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
|
|
38421
|
+
// mrn: _?.Encounter?.patient_id?.[0]?.MRN,
|
|
38422
|
+
// date: _?.Appointment?.start
|
|
38423
|
+
// ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
|
|
38424
|
+
// : "",
|
|
38425
|
+
// time: _?.Appointment?.start
|
|
38426
|
+
// ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
|
|
38427
|
+
// : "",
|
|
38428
|
+
// speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
|
|
38429
|
+
// return spl?.coding?.[0]?.display;
|
|
38430
|
+
// }).join(", "),
|
|
38431
|
+
// clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
|
|
38432
|
+
// dob: _?.Appointment?.PersonID?.[0]?.birthDay,
|
|
38433
|
+
// type: "OP",
|
|
38434
|
+
// appNo: _?.Encounter?.appointmentId?.[0] ?? "",
|
|
38435
|
+
// data: _,
|
|
38436
|
+
// enId: _.Encounter.id,
|
|
38437
|
+
// age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
|
|
38438
|
+
// gender: _?.Appointment?.PersonID?.[0]?.gender,
|
|
38439
|
+
// contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
|
|
38440
|
+
// visitType: _?.Encounter?.visit_type,
|
|
38441
|
+
// appointmentStatus: _?.Encounter?.status?.display,
|
|
38442
|
+
// "Register Visit": true,
|
|
38443
|
+
// "Modify Appointment": true,
|
|
38444
|
+
// "Cancel Appointment": true,
|
|
38445
|
+
// "View Profile": true,
|
|
38446
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter15 = _.Encounter) === null || _$Encounter15 === void 0 ? void 0 : (_$Encounter15$patient = _$Encounter15.patient_id) === null || _$Encounter15$patient === void 0 ? void 0 : (_$Encounter15$patient2 = _$Encounter15$patient[0]) === null || _$Encounter15$patient2 === void 0 ? void 0 : (_$Encounter15$patient3 = _$Encounter15$patient2.name) === null || _$Encounter15$patient3 === void 0 ? void 0 : _$Encounter15$patient3[0]) || {}),
|
|
38447
|
+
mrn: _ === 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$patient2.MRN,
|
|
38448
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment21 = _.Appointment) === null || _$Appointment21 === void 0 ? void 0 : (_$Appointment21$Perso = _$Appointment21.PersonID) === null || _$Appointment21$Perso === void 0 ? void 0 : (_$Appointment21$Perso2 = _$Appointment21$Perso[0]) === null || _$Appointment21$Perso2 === void 0 ? void 0 : _$Appointment21$Perso2.birthDay),
|
|
38449
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment22 = _.Appointment) === null || _$Appointment22 === void 0 ? void 0 : _$Appointment22.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment23 = _.Appointment) === null || _$Appointment23 === void 0 ? void 0 : _$Appointment23.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment24 = _.Appointment) === null || _$Appointment24 === void 0 ? void 0 : _$Appointment24.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment25 = _.Appointment) === null || _$Appointment25 === void 0 ? void 0 : _$Appointment25.start, "hh:mm A") : ""),
|
|
38347
38450
|
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter17 = _.Encounter) === null || _$Encounter17 === void 0 ? void 0 : _$Encounter17.visit_type,
|
|
38348
38451
|
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,
|
|
38349
|
-
|
|
38350
|
-
|
|
38351
|
-
|
|
38352
|
-
|
|
38452
|
+
refNo: (_$Encounter$appointme5 = _ === null || _ === void 0 ? void 0 : (_$Encounter19 = _.Encounter) === null || _$Encounter19 === void 0 ? void 0 : (_$Encounter19$appoint = _$Encounter19.appointmentId) === null || _$Encounter19$appoint === void 0 ? void 0 : _$Encounter19$appoint[0]) !== null && _$Encounter$appointme5 !== void 0 ? _$Encounter$appointme5 : "",
|
|
38453
|
+
viewaction: JSON.stringify({
|
|
38454
|
+
appNo: (_$Encounter$appointme6 = _ === null || _ === void 0 ? void 0 : (_$Encounter20 = _.Encounter) === null || _$Encounter20 === void 0 ? void 0 : (_$Encounter20$appoint = _$Encounter20.appointmentId) === null || _$Encounter20$appoint === void 0 ? void 0 : _$Encounter20$appoint[0]) !== null && _$Encounter$appointme6 !== void 0 ? _$Encounter$appointme6 : "",
|
|
38455
|
+
enId: _.Encounter.id,
|
|
38456
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter21 = _.Encounter) === null || _$Encounter21 === void 0 ? void 0 : (_$Encounter21$patient = _$Encounter21.patient_id) === null || _$Encounter21$patient === void 0 ? void 0 : (_$Encounter21$patient2 = _$Encounter21$patient[0]) === null || _$Encounter21$patient2 === void 0 ? void 0 : (_$Encounter21$patient3 = _$Encounter21$patient2.telecom) === null || _$Encounter21$patient3 === void 0 ? void 0 : (_$Encounter21$patient4 = _$Encounter21$patient3[0]) === null || _$Encounter21$patient4 === void 0 ? void 0 : _$Encounter21$patient4.value,
|
|
38457
|
+
personId: (_$Appointment$PersonI7 = _ === 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$Perso2.Id) !== null && _$Appointment$PersonI7 !== void 0 ? _$Appointment$PersonI7 : null,
|
|
38458
|
+
patientId: (_$Encounter$patient_i7 = _ === 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$patient2.id) !== null && _$Encounter$patient_i7 !== void 0 ? _$Encounter$patient_i7 : null
|
|
38459
|
+
}),
|
|
38460
|
+
modifyaction: JSON.stringify({
|
|
38461
|
+
appNo: (_$Encounter$appointme7 = _ === null || _ === void 0 ? void 0 : (_$Encounter23 = _.Encounter) === null || _$Encounter23 === void 0 ? void 0 : (_$Encounter23$appoint = _$Encounter23.appointmentId) === null || _$Encounter23$appoint === void 0 ? void 0 : _$Encounter23$appoint[0]) !== null && _$Encounter$appointme7 !== void 0 ? _$Encounter$appointme7 : "",
|
|
38462
|
+
enId: _.Encounter.id,
|
|
38463
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter24 = _.Encounter) === null || _$Encounter24 === void 0 ? void 0 : (_$Encounter24$patient = _$Encounter24.patient_id) === null || _$Encounter24$patient === void 0 ? void 0 : (_$Encounter24$patient2 = _$Encounter24$patient[0]) === null || _$Encounter24$patient2 === void 0 ? void 0 : (_$Encounter24$patient3 = _$Encounter24$patient2.telecom) === null || _$Encounter24$patient3 === void 0 ? void 0 : (_$Encounter24$patient4 = _$Encounter24$patient3[0]) === null || _$Encounter24$patient4 === void 0 ? void 0 : _$Encounter24$patient4.value,
|
|
38464
|
+
personId: (_$Appointment$PersonI8 = _ === null || _ === void 0 ? void 0 : (_$Appointment27 = _.Appointment) === null || _$Appointment27 === void 0 ? void 0 : (_$Appointment27$Perso = _$Appointment27.PersonID) === null || _$Appointment27$Perso === void 0 ? void 0 : (_$Appointment27$Perso2 = _$Appointment27$Perso[0]) === null || _$Appointment27$Perso2 === void 0 ? void 0 : _$Appointment27$Perso2.Id) !== null && _$Appointment$PersonI8 !== void 0 ? _$Appointment$PersonI8 : null,
|
|
38465
|
+
patientId: (_$Encounter$patient_i8 = _ === 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$patient2.id) !== null && _$Encounter$patient_i8 !== void 0 ? _$Encounter$patient_i8 : null
|
|
38466
|
+
}),
|
|
38467
|
+
cancelaction: JSON.stringify({
|
|
38468
|
+
appNo: (_$Encounter$appointme8 = _ === null || _ === void 0 ? void 0 : (_$Encounter26 = _.Encounter) === null || _$Encounter26 === void 0 ? void 0 : (_$Encounter26$appoint = _$Encounter26.appointmentId) === null || _$Encounter26$appoint === void 0 ? void 0 : _$Encounter26$appoint[0]) !== null && _$Encounter$appointme8 !== void 0 ? _$Encounter$appointme8 : "",
|
|
38469
|
+
enId: _.Encounter.id,
|
|
38470
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter27 = _.Encounter) === null || _$Encounter27 === void 0 ? void 0 : (_$Encounter27$patient = _$Encounter27.patient_id) === null || _$Encounter27$patient === void 0 ? void 0 : (_$Encounter27$patient2 = _$Encounter27$patient[0]) === null || _$Encounter27$patient2 === void 0 ? void 0 : (_$Encounter27$patient3 = _$Encounter27$patient2.telecom) === null || _$Encounter27$patient3 === void 0 ? void 0 : (_$Encounter27$patient4 = _$Encounter27$patient3[0]) === null || _$Encounter27$patient4 === void 0 ? void 0 : _$Encounter27$patient4.value,
|
|
38471
|
+
personId: (_$Appointment$PersonI9 = _ === null || _ === void 0 ? void 0 : (_$Appointment28 = _.Appointment) === null || _$Appointment28 === void 0 ? void 0 : (_$Appointment28$Perso = _$Appointment28.PersonID) === null || _$Appointment28$Perso === void 0 ? void 0 : (_$Appointment28$Perso2 = _$Appointment28$Perso[0]) === null || _$Appointment28$Perso2 === void 0 ? void 0 : _$Appointment28$Perso2.Id) !== null && _$Appointment$PersonI9 !== void 0 ? _$Appointment$PersonI9 : null,
|
|
38472
|
+
patientId: (_$Encounter$patient_i9 = _ === 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$patient2.id) !== null && _$Encounter$patient_i9 !== void 0 ? _$Encounter$patient_i9 : null
|
|
38473
|
+
})
|
|
38353
38474
|
};
|
|
38354
38475
|
}) : [];
|
|
38355
38476
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38394,28 +38515,66 @@ var GET_WALK_INS = createAsyncThunk("appointmentStatsApiSlice/getWalkIns", /*#__
|
|
|
38394
38515
|
case 5:
|
|
38395
38516
|
data = _context4.sent;
|
|
38396
38517
|
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 (_) {
|
|
38397
|
-
var _$
|
|
38518
|
+
var _$Encounter29, _$Encounter29$patient, _$Encounter29$patient2, _$Encounter29$patient3, _$Encounter30, _$Encounter30$patient, _$Encounter30$patient2, _$Appointment29, _$Appointment29$Perso, _$Appointment29$Perso2, _$Appointment30, _$Appointment31, _$Appointment32, _$Appointment33, _$Encounter31, _$Encounter32, _$Encounter32$status, _$Encounter$appointme9, _$Encounter33, _$Encounter33$appoint, _$Encounter$appointme10, _$Encounter34, _$Encounter34$appoint, _$Encounter35, _$Encounter35$patient, _$Encounter35$patient2, _$Encounter35$patient3, _$Encounter35$patient4, _$Appointment$PersonI10, _$Appointment34, _$Appointment34$Perso, _$Appointment34$Perso2, _$Encounter$patient_i10, _$Encounter36, _$Encounter36$patient, _$Encounter36$patient2, _$Encounter$appointme11, _$Encounter37, _$Encounter37$appoint, _$Encounter38, _$Encounter38$patient, _$Encounter38$patient2, _$Encounter38$patient3, _$Encounter38$patient4, _$Appointment$PersonI11, _$Appointment35, _$Appointment35$Perso, _$Appointment35$Perso2, _$Encounter$patient_i11, _$Encounter39, _$Encounter39$patient, _$Encounter39$patient2, _$Encounter$appointme12, _$Encounter40, _$Encounter40$appoint, _$Encounter41, _$Encounter41$patient, _$Encounter41$patient2, _$Encounter41$patient3, _$Encounter41$patient4, _$Appointment$PersonI12, _$Appointment36, _$Appointment36$Perso, _$Appointment36$Perso2, _$Encounter$patient_i12, _$Encounter42, _$Encounter42$patient, _$Encounter42$patient2;
|
|
38398
38519
|
|
|
38399
38520
|
return {
|
|
38400
|
-
img:
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
|
|
38404
|
-
|
|
38405
|
-
|
|
38406
|
-
|
|
38407
|
-
|
|
38408
|
-
|
|
38409
|
-
|
|
38410
|
-
|
|
38411
|
-
|
|
38412
|
-
|
|
38413
|
-
|
|
38414
|
-
|
|
38415
|
-
|
|
38416
|
-
|
|
38417
|
-
|
|
38418
|
-
|
|
38521
|
+
// img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
38522
|
+
// ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
|
|
38523
|
+
// : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38524
|
+
// name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
|
|
38525
|
+
// mrn: _?.Encounter?.patient_id?.[0]?.MRN,
|
|
38526
|
+
// date: _?.Appointment?.start
|
|
38527
|
+
// ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
|
|
38528
|
+
// : "",
|
|
38529
|
+
// time: _?.Appointment?.start
|
|
38530
|
+
// ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
|
|
38531
|
+
// : "",
|
|
38532
|
+
// speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
|
|
38533
|
+
// return spl?.coding?.[0]?.display;
|
|
38534
|
+
// }).join(", "),
|
|
38535
|
+
// clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
|
|
38536
|
+
// dob: _?.Appointment?.PersonID?.[0]?.birthDay,
|
|
38537
|
+
// type: "OP",
|
|
38538
|
+
// appNo: _?.Encounter?.appointmentId?.[0] ?? "",
|
|
38539
|
+
// data: _,
|
|
38540
|
+
// enId: _.Encounter.id,
|
|
38541
|
+
// age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
|
|
38542
|
+
// gender: _?.Appointment?.PersonID?.[0]?.gender,
|
|
38543
|
+
// contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
|
|
38544
|
+
// visitType: _?.Encounter?.visit_type,
|
|
38545
|
+
// appointmentStatus: _?.Encounter?.status?.display,
|
|
38546
|
+
// "Register Visit": true,
|
|
38547
|
+
// "Modify Appointment": true,
|
|
38548
|
+
// "Cancel Appointment": true,
|
|
38549
|
+
// "View Profile": true,
|
|
38550
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter29 = _.Encounter) === null || _$Encounter29 === void 0 ? void 0 : (_$Encounter29$patient = _$Encounter29.patient_id) === null || _$Encounter29$patient === void 0 ? void 0 : (_$Encounter29$patient2 = _$Encounter29$patient[0]) === null || _$Encounter29$patient2 === void 0 ? void 0 : (_$Encounter29$patient3 = _$Encounter29$patient2.name) === null || _$Encounter29$patient3 === void 0 ? void 0 : _$Encounter29$patient3[0]) || {}),
|
|
38551
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter30 = _.Encounter) === null || _$Encounter30 === void 0 ? void 0 : (_$Encounter30$patient = _$Encounter30.patient_id) === null || _$Encounter30$patient === void 0 ? void 0 : (_$Encounter30$patient2 = _$Encounter30$patient[0]) === null || _$Encounter30$patient2 === void 0 ? void 0 : _$Encounter30$patient2.MRN,
|
|
38552
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment29 = _.Appointment) === null || _$Appointment29 === void 0 ? void 0 : (_$Appointment29$Perso = _$Appointment29.PersonID) === null || _$Appointment29$Perso === void 0 ? void 0 : (_$Appointment29$Perso2 = _$Appointment29$Perso[0]) === null || _$Appointment29$Perso2 === void 0 ? void 0 : _$Appointment29$Perso2.birthDay),
|
|
38553
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment30 = _.Appointment) === null || _$Appointment30 === void 0 ? void 0 : _$Appointment30.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment31 = _.Appointment) === null || _$Appointment31 === void 0 ? void 0 : _$Appointment31.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment32 = _.Appointment) === null || _$Appointment32 === void 0 ? void 0 : _$Appointment32.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment33 = _.Appointment) === null || _$Appointment33 === void 0 ? void 0 : _$Appointment33.start, "hh:mm A") : ""),
|
|
38554
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter31 = _.Encounter) === null || _$Encounter31 === void 0 ? void 0 : _$Encounter31.visit_type,
|
|
38555
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter32 = _.Encounter) === null || _$Encounter32 === void 0 ? void 0 : (_$Encounter32$status = _$Encounter32.status) === null || _$Encounter32$status === void 0 ? void 0 : _$Encounter32$status.display,
|
|
38556
|
+
refNo: (_$Encounter$appointme9 = _ === null || _ === void 0 ? void 0 : (_$Encounter33 = _.Encounter) === null || _$Encounter33 === void 0 ? void 0 : (_$Encounter33$appoint = _$Encounter33.appointmentId) === null || _$Encounter33$appoint === void 0 ? void 0 : _$Encounter33$appoint[0]) !== null && _$Encounter$appointme9 !== void 0 ? _$Encounter$appointme9 : "",
|
|
38557
|
+
viewaction: JSON.stringify({
|
|
38558
|
+
appNo: (_$Encounter$appointme10 = _ === null || _ === void 0 ? void 0 : (_$Encounter34 = _.Encounter) === null || _$Encounter34 === void 0 ? void 0 : (_$Encounter34$appoint = _$Encounter34.appointmentId) === null || _$Encounter34$appoint === void 0 ? void 0 : _$Encounter34$appoint[0]) !== null && _$Encounter$appointme10 !== void 0 ? _$Encounter$appointme10 : "",
|
|
38559
|
+
enId: _.Encounter.id,
|
|
38560
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter35 = _.Encounter) === null || _$Encounter35 === void 0 ? void 0 : (_$Encounter35$patient = _$Encounter35.patient_id) === null || _$Encounter35$patient === void 0 ? void 0 : (_$Encounter35$patient2 = _$Encounter35$patient[0]) === null || _$Encounter35$patient2 === void 0 ? void 0 : (_$Encounter35$patient3 = _$Encounter35$patient2.telecom) === null || _$Encounter35$patient3 === void 0 ? void 0 : (_$Encounter35$patient4 = _$Encounter35$patient3[0]) === null || _$Encounter35$patient4 === void 0 ? void 0 : _$Encounter35$patient4.value,
|
|
38561
|
+
personId: (_$Appointment$PersonI10 = _ === 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$Perso2.Id) !== null && _$Appointment$PersonI10 !== void 0 ? _$Appointment$PersonI10 : null,
|
|
38562
|
+
patientId: (_$Encounter$patient_i10 = _ === null || _ === void 0 ? void 0 : (_$Encounter36 = _.Encounter) === null || _$Encounter36 === void 0 ? void 0 : (_$Encounter36$patient = _$Encounter36.patient_id) === null || _$Encounter36$patient === void 0 ? void 0 : (_$Encounter36$patient2 = _$Encounter36$patient[0]) === null || _$Encounter36$patient2 === void 0 ? void 0 : _$Encounter36$patient2.id) !== null && _$Encounter$patient_i10 !== void 0 ? _$Encounter$patient_i10 : null
|
|
38563
|
+
}),
|
|
38564
|
+
modifyaction: JSON.stringify({
|
|
38565
|
+
appNo: (_$Encounter$appointme11 = _ === null || _ === void 0 ? void 0 : (_$Encounter37 = _.Encounter) === null || _$Encounter37 === void 0 ? void 0 : (_$Encounter37$appoint = _$Encounter37.appointmentId) === null || _$Encounter37$appoint === void 0 ? void 0 : _$Encounter37$appoint[0]) !== null && _$Encounter$appointme11 !== void 0 ? _$Encounter$appointme11 : "",
|
|
38566
|
+
enId: _.Encounter.id,
|
|
38567
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter38 = _.Encounter) === null || _$Encounter38 === void 0 ? void 0 : (_$Encounter38$patient = _$Encounter38.patient_id) === null || _$Encounter38$patient === void 0 ? void 0 : (_$Encounter38$patient2 = _$Encounter38$patient[0]) === null || _$Encounter38$patient2 === void 0 ? void 0 : (_$Encounter38$patient3 = _$Encounter38$patient2.telecom) === null || _$Encounter38$patient3 === void 0 ? void 0 : (_$Encounter38$patient4 = _$Encounter38$patient3[0]) === null || _$Encounter38$patient4 === void 0 ? void 0 : _$Encounter38$patient4.value,
|
|
38568
|
+
personId: (_$Appointment$PersonI11 = _ === null || _ === void 0 ? void 0 : (_$Appointment35 = _.Appointment) === null || _$Appointment35 === void 0 ? void 0 : (_$Appointment35$Perso = _$Appointment35.PersonID) === null || _$Appointment35$Perso === void 0 ? void 0 : (_$Appointment35$Perso2 = _$Appointment35$Perso[0]) === null || _$Appointment35$Perso2 === void 0 ? void 0 : _$Appointment35$Perso2.Id) !== null && _$Appointment$PersonI11 !== void 0 ? _$Appointment$PersonI11 : null,
|
|
38569
|
+
patientId: (_$Encounter$patient_i11 = _ === null || _ === void 0 ? void 0 : (_$Encounter39 = _.Encounter) === null || _$Encounter39 === void 0 ? void 0 : (_$Encounter39$patient = _$Encounter39.patient_id) === null || _$Encounter39$patient === void 0 ? void 0 : (_$Encounter39$patient2 = _$Encounter39$patient[0]) === null || _$Encounter39$patient2 === void 0 ? void 0 : _$Encounter39$patient2.id) !== null && _$Encounter$patient_i11 !== void 0 ? _$Encounter$patient_i11 : null
|
|
38570
|
+
}),
|
|
38571
|
+
cancelaction: JSON.stringify({
|
|
38572
|
+
appNo: (_$Encounter$appointme12 = _ === null || _ === void 0 ? void 0 : (_$Encounter40 = _.Encounter) === null || _$Encounter40 === void 0 ? void 0 : (_$Encounter40$appoint = _$Encounter40.appointmentId) === null || _$Encounter40$appoint === void 0 ? void 0 : _$Encounter40$appoint[0]) !== null && _$Encounter$appointme12 !== void 0 ? _$Encounter$appointme12 : "",
|
|
38573
|
+
enId: _.Encounter.id,
|
|
38574
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter41 = _.Encounter) === null || _$Encounter41 === void 0 ? void 0 : (_$Encounter41$patient = _$Encounter41.patient_id) === null || _$Encounter41$patient === void 0 ? void 0 : (_$Encounter41$patient2 = _$Encounter41$patient[0]) === null || _$Encounter41$patient2 === void 0 ? void 0 : (_$Encounter41$patient3 = _$Encounter41$patient2.telecom) === null || _$Encounter41$patient3 === void 0 ? void 0 : (_$Encounter41$patient4 = _$Encounter41$patient3[0]) === null || _$Encounter41$patient4 === void 0 ? void 0 : _$Encounter41$patient4.value,
|
|
38575
|
+
personId: (_$Appointment$PersonI12 = _ === null || _ === void 0 ? void 0 : (_$Appointment36 = _.Appointment) === null || _$Appointment36 === void 0 ? void 0 : (_$Appointment36$Perso = _$Appointment36.PersonID) === null || _$Appointment36$Perso === void 0 ? void 0 : (_$Appointment36$Perso2 = _$Appointment36$Perso[0]) === null || _$Appointment36$Perso2 === void 0 ? void 0 : _$Appointment36$Perso2.Id) !== null && _$Appointment$PersonI12 !== void 0 ? _$Appointment$PersonI12 : null,
|
|
38576
|
+
patientId: (_$Encounter$patient_i12 = _ === null || _ === void 0 ? void 0 : (_$Encounter42 = _.Encounter) === null || _$Encounter42 === void 0 ? void 0 : (_$Encounter42$patient = _$Encounter42.patient_id) === null || _$Encounter42$patient === void 0 ? void 0 : (_$Encounter42$patient2 = _$Encounter42$patient[0]) === null || _$Encounter42$patient2 === void 0 ? void 0 : _$Encounter42$patient2.id) !== null && _$Encounter$patient_i12 !== void 0 ? _$Encounter$patient_i12 : null
|
|
38577
|
+
})
|
|
38419
38578
|
};
|
|
38420
38579
|
}) : [];
|
|
38421
38580
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38460,28 +38619,66 @@ var GET_NEW_PATIENTS = createAsyncThunk("appointmentStatsApiSlice/getNewPatients
|
|
|
38460
38619
|
case 5:
|
|
38461
38620
|
data = _context5.sent;
|
|
38462
38621
|
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 (_) {
|
|
38463
|
-
var _$
|
|
38622
|
+
var _$Encounter43, _$Encounter43$patient, _$Encounter43$patient2, _$Encounter43$patient3, _$Encounter44, _$Encounter44$patient, _$Encounter44$patient2, _$Appointment37, _$Appointment37$Perso, _$Appointment37$Perso2, _$Appointment38, _$Appointment39, _$Appointment40, _$Appointment41, _$Encounter45, _$Encounter46, _$Encounter46$status, _$Encounter$appointme13, _$Encounter47, _$Encounter47$appoint, _$Encounter$appointme14, _$Encounter48, _$Encounter48$appoint, _$Encounter49, _$Encounter49$patient, _$Encounter49$patient2, _$Encounter49$patient3, _$Encounter49$patient4, _$Appointment$PersonI13, _$Appointment42, _$Appointment42$Perso, _$Appointment42$Perso2, _$Encounter$patient_i13, _$Encounter50, _$Encounter50$patient, _$Encounter50$patient2, _$Encounter$appointme15, _$Encounter51, _$Encounter51$appoint, _$Encounter52, _$Encounter52$patient, _$Encounter52$patient2, _$Encounter52$patient3, _$Encounter52$patient4, _$Appointment$PersonI14, _$Appointment43, _$Appointment43$Perso, _$Appointment43$Perso2, _$Encounter$patient_i14, _$Encounter53, _$Encounter53$patient, _$Encounter53$patient2, _$Encounter$appointme16, _$Encounter54, _$Encounter54$appoint, _$Encounter55, _$Encounter55$patient, _$Encounter55$patient2, _$Encounter55$patient3, _$Encounter55$patient4, _$Appointment$PersonI15, _$Appointment44, _$Appointment44$Perso, _$Appointment44$Perso2, _$Encounter$patient_i15, _$Encounter56, _$Encounter56$patient, _$Encounter56$patient2;
|
|
38464
38623
|
|
|
38465
38624
|
return {
|
|
38466
|
-
img:
|
|
38467
|
-
|
|
38468
|
-
|
|
38469
|
-
|
|
38470
|
-
|
|
38471
|
-
|
|
38472
|
-
|
|
38473
|
-
|
|
38474
|
-
|
|
38475
|
-
|
|
38476
|
-
|
|
38477
|
-
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38482
|
-
|
|
38483
|
-
|
|
38484
|
-
|
|
38625
|
+
// img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
38626
|
+
// ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
|
|
38627
|
+
// : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38628
|
+
// name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
|
|
38629
|
+
// mrn: _?.Encounter?.patient_id?.[0]?.MRN,
|
|
38630
|
+
// date: _?.Appointment?.start
|
|
38631
|
+
// ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
|
|
38632
|
+
// : "",
|
|
38633
|
+
// time: _?.Appointment?.start
|
|
38634
|
+
// ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
|
|
38635
|
+
// : "",
|
|
38636
|
+
// speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
|
|
38637
|
+
// return spl?.coding?.[0]?.display;
|
|
38638
|
+
// }).join(", "),
|
|
38639
|
+
// clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
|
|
38640
|
+
// dob: _?.Appointment?.PersonID?.[0]?.birthDay,
|
|
38641
|
+
// type: "OP",
|
|
38642
|
+
// appNo: _?.Encounter?.appointmentId?.[0] ?? "",
|
|
38643
|
+
// data: _,
|
|
38644
|
+
// enId: _.Encounter.id,
|
|
38645
|
+
// age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
|
|
38646
|
+
// gender: _?.Appointment?.PersonID?.[0]?.gender,
|
|
38647
|
+
// contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
|
|
38648
|
+
// visitType: _?.Encounter?.visit_type,
|
|
38649
|
+
// appointmentStatus: _?.Encounter?.status?.display,
|
|
38650
|
+
// "Register Visit": true,
|
|
38651
|
+
// "Modify Appointment": true,
|
|
38652
|
+
// "Cancel Appointment": true,
|
|
38653
|
+
// "View Profile": true,
|
|
38654
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter43 = _.Encounter) === null || _$Encounter43 === void 0 ? void 0 : (_$Encounter43$patient = _$Encounter43.patient_id) === null || _$Encounter43$patient === void 0 ? void 0 : (_$Encounter43$patient2 = _$Encounter43$patient[0]) === null || _$Encounter43$patient2 === void 0 ? void 0 : (_$Encounter43$patient3 = _$Encounter43$patient2.name) === null || _$Encounter43$patient3 === void 0 ? void 0 : _$Encounter43$patient3[0]) || {}),
|
|
38655
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter44 = _.Encounter) === null || _$Encounter44 === void 0 ? void 0 : (_$Encounter44$patient = _$Encounter44.patient_id) === null || _$Encounter44$patient === void 0 ? void 0 : (_$Encounter44$patient2 = _$Encounter44$patient[0]) === null || _$Encounter44$patient2 === void 0 ? void 0 : _$Encounter44$patient2.MRN,
|
|
38656
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment37 = _.Appointment) === null || _$Appointment37 === void 0 ? void 0 : (_$Appointment37$Perso = _$Appointment37.PersonID) === null || _$Appointment37$Perso === void 0 ? void 0 : (_$Appointment37$Perso2 = _$Appointment37$Perso[0]) === null || _$Appointment37$Perso2 === void 0 ? void 0 : _$Appointment37$Perso2.birthDay),
|
|
38657
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment38 = _.Appointment) === null || _$Appointment38 === void 0 ? void 0 : _$Appointment38.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment39 = _.Appointment) === null || _$Appointment39 === void 0 ? void 0 : _$Appointment39.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment40 = _.Appointment) === null || _$Appointment40 === void 0 ? void 0 : _$Appointment40.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment41 = _.Appointment) === null || _$Appointment41 === void 0 ? void 0 : _$Appointment41.start, "hh:mm A") : ""),
|
|
38658
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter45 = _.Encounter) === null || _$Encounter45 === void 0 ? void 0 : _$Encounter45.visit_type,
|
|
38659
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter46 = _.Encounter) === null || _$Encounter46 === void 0 ? void 0 : (_$Encounter46$status = _$Encounter46.status) === null || _$Encounter46$status === void 0 ? void 0 : _$Encounter46$status.display,
|
|
38660
|
+
refNo: (_$Encounter$appointme13 = _ === null || _ === void 0 ? void 0 : (_$Encounter47 = _.Encounter) === null || _$Encounter47 === void 0 ? void 0 : (_$Encounter47$appoint = _$Encounter47.appointmentId) === null || _$Encounter47$appoint === void 0 ? void 0 : _$Encounter47$appoint[0]) !== null && _$Encounter$appointme13 !== void 0 ? _$Encounter$appointme13 : "",
|
|
38661
|
+
viewaction: JSON.stringify({
|
|
38662
|
+
appNo: (_$Encounter$appointme14 = _ === null || _ === void 0 ? void 0 : (_$Encounter48 = _.Encounter) === null || _$Encounter48 === void 0 ? void 0 : (_$Encounter48$appoint = _$Encounter48.appointmentId) === null || _$Encounter48$appoint === void 0 ? void 0 : _$Encounter48$appoint[0]) !== null && _$Encounter$appointme14 !== void 0 ? _$Encounter$appointme14 : "",
|
|
38663
|
+
enId: _.Encounter.id,
|
|
38664
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter49 = _.Encounter) === null || _$Encounter49 === void 0 ? void 0 : (_$Encounter49$patient = _$Encounter49.patient_id) === null || _$Encounter49$patient === void 0 ? void 0 : (_$Encounter49$patient2 = _$Encounter49$patient[0]) === null || _$Encounter49$patient2 === void 0 ? void 0 : (_$Encounter49$patient3 = _$Encounter49$patient2.telecom) === null || _$Encounter49$patient3 === void 0 ? void 0 : (_$Encounter49$patient4 = _$Encounter49$patient3[0]) === null || _$Encounter49$patient4 === void 0 ? void 0 : _$Encounter49$patient4.value,
|
|
38665
|
+
personId: (_$Appointment$PersonI13 = _ === 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$Perso2.Id) !== null && _$Appointment$PersonI13 !== void 0 ? _$Appointment$PersonI13 : null,
|
|
38666
|
+
patientId: (_$Encounter$patient_i13 = _ === null || _ === void 0 ? void 0 : (_$Encounter50 = _.Encounter) === null || _$Encounter50 === void 0 ? void 0 : (_$Encounter50$patient = _$Encounter50.patient_id) === null || _$Encounter50$patient === void 0 ? void 0 : (_$Encounter50$patient2 = _$Encounter50$patient[0]) === null || _$Encounter50$patient2 === void 0 ? void 0 : _$Encounter50$patient2.id) !== null && _$Encounter$patient_i13 !== void 0 ? _$Encounter$patient_i13 : null
|
|
38667
|
+
}),
|
|
38668
|
+
modifyaction: JSON.stringify({
|
|
38669
|
+
appNo: (_$Encounter$appointme15 = _ === null || _ === void 0 ? void 0 : (_$Encounter51 = _.Encounter) === null || _$Encounter51 === void 0 ? void 0 : (_$Encounter51$appoint = _$Encounter51.appointmentId) === null || _$Encounter51$appoint === void 0 ? void 0 : _$Encounter51$appoint[0]) !== null && _$Encounter$appointme15 !== void 0 ? _$Encounter$appointme15 : "",
|
|
38670
|
+
enId: _.Encounter.id,
|
|
38671
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter52 = _.Encounter) === null || _$Encounter52 === void 0 ? void 0 : (_$Encounter52$patient = _$Encounter52.patient_id) === null || _$Encounter52$patient === void 0 ? void 0 : (_$Encounter52$patient2 = _$Encounter52$patient[0]) === null || _$Encounter52$patient2 === void 0 ? void 0 : (_$Encounter52$patient3 = _$Encounter52$patient2.telecom) === null || _$Encounter52$patient3 === void 0 ? void 0 : (_$Encounter52$patient4 = _$Encounter52$patient3[0]) === null || _$Encounter52$patient4 === void 0 ? void 0 : _$Encounter52$patient4.value,
|
|
38672
|
+
personId: (_$Appointment$PersonI14 = _ === null || _ === void 0 ? void 0 : (_$Appointment43 = _.Appointment) === null || _$Appointment43 === void 0 ? void 0 : (_$Appointment43$Perso = _$Appointment43.PersonID) === null || _$Appointment43$Perso === void 0 ? void 0 : (_$Appointment43$Perso2 = _$Appointment43$Perso[0]) === null || _$Appointment43$Perso2 === void 0 ? void 0 : _$Appointment43$Perso2.Id) !== null && _$Appointment$PersonI14 !== void 0 ? _$Appointment$PersonI14 : null,
|
|
38673
|
+
patientId: (_$Encounter$patient_i14 = _ === null || _ === void 0 ? void 0 : (_$Encounter53 = _.Encounter) === null || _$Encounter53 === void 0 ? void 0 : (_$Encounter53$patient = _$Encounter53.patient_id) === null || _$Encounter53$patient === void 0 ? void 0 : (_$Encounter53$patient2 = _$Encounter53$patient[0]) === null || _$Encounter53$patient2 === void 0 ? void 0 : _$Encounter53$patient2.id) !== null && _$Encounter$patient_i14 !== void 0 ? _$Encounter$patient_i14 : null
|
|
38674
|
+
}),
|
|
38675
|
+
cancelaction: JSON.stringify({
|
|
38676
|
+
appNo: (_$Encounter$appointme16 = _ === null || _ === void 0 ? void 0 : (_$Encounter54 = _.Encounter) === null || _$Encounter54 === void 0 ? void 0 : (_$Encounter54$appoint = _$Encounter54.appointmentId) === null || _$Encounter54$appoint === void 0 ? void 0 : _$Encounter54$appoint[0]) !== null && _$Encounter$appointme16 !== void 0 ? _$Encounter$appointme16 : "",
|
|
38677
|
+
enId: _.Encounter.id,
|
|
38678
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter55 = _.Encounter) === null || _$Encounter55 === void 0 ? void 0 : (_$Encounter55$patient = _$Encounter55.patient_id) === null || _$Encounter55$patient === void 0 ? void 0 : (_$Encounter55$patient2 = _$Encounter55$patient[0]) === null || _$Encounter55$patient2 === void 0 ? void 0 : (_$Encounter55$patient3 = _$Encounter55$patient2.telecom) === null || _$Encounter55$patient3 === void 0 ? void 0 : (_$Encounter55$patient4 = _$Encounter55$patient3[0]) === null || _$Encounter55$patient4 === void 0 ? void 0 : _$Encounter55$patient4.value,
|
|
38679
|
+
personId: (_$Appointment$PersonI15 = _ === null || _ === void 0 ? void 0 : (_$Appointment44 = _.Appointment) === null || _$Appointment44 === void 0 ? void 0 : (_$Appointment44$Perso = _$Appointment44.PersonID) === null || _$Appointment44$Perso === void 0 ? void 0 : (_$Appointment44$Perso2 = _$Appointment44$Perso[0]) === null || _$Appointment44$Perso2 === void 0 ? void 0 : _$Appointment44$Perso2.Id) !== null && _$Appointment$PersonI15 !== void 0 ? _$Appointment$PersonI15 : null,
|
|
38680
|
+
patientId: (_$Encounter$patient_i15 = _ === null || _ === void 0 ? void 0 : (_$Encounter56 = _.Encounter) === null || _$Encounter56 === void 0 ? void 0 : (_$Encounter56$patient = _$Encounter56.patient_id) === null || _$Encounter56$patient === void 0 ? void 0 : (_$Encounter56$patient2 = _$Encounter56$patient[0]) === null || _$Encounter56$patient2 === void 0 ? void 0 : _$Encounter56$patient2.id) !== null && _$Encounter$patient_i15 !== void 0 ? _$Encounter$patient_i15 : null
|
|
38681
|
+
})
|
|
38485
38682
|
};
|
|
38486
38683
|
}) : [];
|
|
38487
38684
|
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38526,28 +38723,66 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
|
|
|
38526
38723
|
case 5:
|
|
38527
38724
|
data = _context6.sent;
|
|
38528
38725
|
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 (_) {
|
|
38529
|
-
var _$
|
|
38726
|
+
var _$Encounter57, _$Encounter57$patient, _$Encounter57$patient2, _$Encounter57$patient3, _$Encounter58, _$Encounter58$patient, _$Encounter58$patient2, _$Appointment45, _$Appointment45$Perso, _$Appointment45$Perso2, _$Appointment46, _$Appointment47, _$Appointment48, _$Appointment49, _$Encounter59, _$Encounter60, _$Encounter60$status, _$Encounter$appointme17, _$Encounter61, _$Encounter61$appoint, _$Encounter$appointme18, _$Encounter62, _$Encounter62$appoint, _$Encounter63, _$Encounter63$patient, _$Encounter63$patient2, _$Encounter63$patient3, _$Encounter63$patient4, _$Appointment$PersonI16, _$Appointment50, _$Appointment50$Perso, _$Appointment50$Perso2, _$Encounter$patient_i16, _$Encounter64, _$Encounter64$patient, _$Encounter64$patient2, _$Encounter$appointme19, _$Encounter65, _$Encounter65$appoint, _$Encounter66, _$Encounter66$patient, _$Encounter66$patient2, _$Encounter66$patient3, _$Encounter66$patient4, _$Appointment$PersonI17, _$Appointment51, _$Appointment51$Perso, _$Appointment51$Perso2, _$Encounter$patient_i17, _$Encounter67, _$Encounter67$patient, _$Encounter67$patient2, _$Encounter$appointme20, _$Encounter68, _$Encounter68$appoint, _$Encounter69, _$Encounter69$patient, _$Encounter69$patient2, _$Encounter69$patient3, _$Encounter69$patient4, _$Appointment$PersonI18, _$Appointment52, _$Appointment52$Perso, _$Appointment52$Perso2, _$Encounter$patient_i18, _$Encounter70, _$Encounter70$patient, _$Encounter70$patient2;
|
|
38530
38727
|
|
|
38531
38728
|
return {
|
|
38532
|
-
img:
|
|
38533
|
-
|
|
38534
|
-
|
|
38535
|
-
|
|
38536
|
-
|
|
38537
|
-
|
|
38538
|
-
|
|
38539
|
-
|
|
38540
|
-
|
|
38541
|
-
|
|
38542
|
-
|
|
38543
|
-
|
|
38544
|
-
|
|
38545
|
-
|
|
38546
|
-
|
|
38547
|
-
|
|
38548
|
-
|
|
38549
|
-
|
|
38550
|
-
|
|
38729
|
+
// img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
38730
|
+
// ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
|
|
38731
|
+
// : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38732
|
+
// name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
|
|
38733
|
+
// mrn: _?.Encounter?.patient_id?.[0]?.MRN,
|
|
38734
|
+
// date: _?.Appointment?.start
|
|
38735
|
+
// ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
|
|
38736
|
+
// : "",
|
|
38737
|
+
// time: _?.Appointment?.start
|
|
38738
|
+
// ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
|
|
38739
|
+
// : "",
|
|
38740
|
+
// speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
|
|
38741
|
+
// return spl?.coding?.[0]?.display;
|
|
38742
|
+
// }).join(", "),
|
|
38743
|
+
// clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
|
|
38744
|
+
// dob: _?.Appointment?.PersonID?.[0]?.birthDay,
|
|
38745
|
+
// type: "OP",
|
|
38746
|
+
// appNo: _?.Encounter?.appointmentId?.[0] ?? "",
|
|
38747
|
+
// data: _,
|
|
38748
|
+
// enId: _.Encounter.id,
|
|
38749
|
+
// age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
|
|
38750
|
+
// gender: _?.Appointment?.PersonID?.[0]?.gender,
|
|
38751
|
+
// contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
|
|
38752
|
+
// visitType: _?.Encounter?.visit_type,
|
|
38753
|
+
// appointmentStatus: _?.Encounter?.status?.display,
|
|
38754
|
+
// "Register Visit": true,
|
|
38755
|
+
// "Modify Appointment": true,
|
|
38756
|
+
// "Cancel Appointment": true,
|
|
38757
|
+
// "View Profile": true,
|
|
38758
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter57 = _.Encounter) === null || _$Encounter57 === void 0 ? void 0 : (_$Encounter57$patient = _$Encounter57.patient_id) === null || _$Encounter57$patient === void 0 ? void 0 : (_$Encounter57$patient2 = _$Encounter57$patient[0]) === null || _$Encounter57$patient2 === void 0 ? void 0 : (_$Encounter57$patient3 = _$Encounter57$patient2.name) === null || _$Encounter57$patient3 === void 0 ? void 0 : _$Encounter57$patient3[0]) || {}),
|
|
38759
|
+
mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter58 = _.Encounter) === null || _$Encounter58 === void 0 ? void 0 : (_$Encounter58$patient = _$Encounter58.patient_id) === null || _$Encounter58$patient === void 0 ? void 0 : (_$Encounter58$patient2 = _$Encounter58$patient[0]) === null || _$Encounter58$patient2 === void 0 ? void 0 : _$Encounter58$patient2.MRN,
|
|
38760
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment45 = _.Appointment) === null || _$Appointment45 === void 0 ? void 0 : (_$Appointment45$Perso = _$Appointment45.PersonID) === null || _$Appointment45$Perso === void 0 ? void 0 : (_$Appointment45$Perso2 = _$Appointment45$Perso[0]) === null || _$Appointment45$Perso2 === void 0 ? void 0 : _$Appointment45$Perso2.birthDay),
|
|
38761
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment46 = _.Appointment) === null || _$Appointment46 === void 0 ? void 0 : _$Appointment46.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment47 = _.Appointment) === null || _$Appointment47 === void 0 ? void 0 : _$Appointment47.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : _$Appointment48.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment49 = _.Appointment) === null || _$Appointment49 === void 0 ? void 0 : _$Appointment49.start, "hh:mm A") : ""),
|
|
38762
|
+
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter59 = _.Encounter) === null || _$Encounter59 === void 0 ? void 0 : _$Encounter59.visit_type,
|
|
38763
|
+
appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter60 = _.Encounter) === null || _$Encounter60 === void 0 ? void 0 : (_$Encounter60$status = _$Encounter60.status) === null || _$Encounter60$status === void 0 ? void 0 : _$Encounter60$status.display,
|
|
38764
|
+
refNo: (_$Encounter$appointme17 = _ === null || _ === void 0 ? void 0 : (_$Encounter61 = _.Encounter) === null || _$Encounter61 === void 0 ? void 0 : (_$Encounter61$appoint = _$Encounter61.appointmentId) === null || _$Encounter61$appoint === void 0 ? void 0 : _$Encounter61$appoint[0]) !== null && _$Encounter$appointme17 !== void 0 ? _$Encounter$appointme17 : "",
|
|
38765
|
+
viewaction: JSON.stringify({
|
|
38766
|
+
appNo: (_$Encounter$appointme18 = _ === null || _ === void 0 ? void 0 : (_$Encounter62 = _.Encounter) === null || _$Encounter62 === void 0 ? void 0 : (_$Encounter62$appoint = _$Encounter62.appointmentId) === null || _$Encounter62$appoint === void 0 ? void 0 : _$Encounter62$appoint[0]) !== null && _$Encounter$appointme18 !== void 0 ? _$Encounter$appointme18 : "",
|
|
38767
|
+
enId: _.Encounter.id,
|
|
38768
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter63 = _.Encounter) === null || _$Encounter63 === void 0 ? void 0 : (_$Encounter63$patient = _$Encounter63.patient_id) === null || _$Encounter63$patient === void 0 ? void 0 : (_$Encounter63$patient2 = _$Encounter63$patient[0]) === null || _$Encounter63$patient2 === void 0 ? void 0 : (_$Encounter63$patient3 = _$Encounter63$patient2.telecom) === null || _$Encounter63$patient3 === void 0 ? void 0 : (_$Encounter63$patient4 = _$Encounter63$patient3[0]) === null || _$Encounter63$patient4 === void 0 ? void 0 : _$Encounter63$patient4.value,
|
|
38769
|
+
personId: (_$Appointment$PersonI16 = _ === null || _ === void 0 ? void 0 : (_$Appointment50 = _.Appointment) === null || _$Appointment50 === void 0 ? void 0 : (_$Appointment50$Perso = _$Appointment50.PersonID) === null || _$Appointment50$Perso === void 0 ? void 0 : (_$Appointment50$Perso2 = _$Appointment50$Perso[0]) === null || _$Appointment50$Perso2 === void 0 ? void 0 : _$Appointment50$Perso2.Id) !== null && _$Appointment$PersonI16 !== void 0 ? _$Appointment$PersonI16 : null,
|
|
38770
|
+
patientId: (_$Encounter$patient_i16 = _ === null || _ === void 0 ? void 0 : (_$Encounter64 = _.Encounter) === null || _$Encounter64 === void 0 ? void 0 : (_$Encounter64$patient = _$Encounter64.patient_id) === null || _$Encounter64$patient === void 0 ? void 0 : (_$Encounter64$patient2 = _$Encounter64$patient[0]) === null || _$Encounter64$patient2 === void 0 ? void 0 : _$Encounter64$patient2.id) !== null && _$Encounter$patient_i16 !== void 0 ? _$Encounter$patient_i16 : null
|
|
38771
|
+
}),
|
|
38772
|
+
modifyaction: JSON.stringify({
|
|
38773
|
+
appNo: (_$Encounter$appointme19 = _ === null || _ === void 0 ? void 0 : (_$Encounter65 = _.Encounter) === null || _$Encounter65 === void 0 ? void 0 : (_$Encounter65$appoint = _$Encounter65.appointmentId) === null || _$Encounter65$appoint === void 0 ? void 0 : _$Encounter65$appoint[0]) !== null && _$Encounter$appointme19 !== void 0 ? _$Encounter$appointme19 : "",
|
|
38774
|
+
enId: _.Encounter.id,
|
|
38775
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter66 = _.Encounter) === null || _$Encounter66 === void 0 ? void 0 : (_$Encounter66$patient = _$Encounter66.patient_id) === null || _$Encounter66$patient === void 0 ? void 0 : (_$Encounter66$patient2 = _$Encounter66$patient[0]) === null || _$Encounter66$patient2 === void 0 ? void 0 : (_$Encounter66$patient3 = _$Encounter66$patient2.telecom) === null || _$Encounter66$patient3 === void 0 ? void 0 : (_$Encounter66$patient4 = _$Encounter66$patient3[0]) === null || _$Encounter66$patient4 === void 0 ? void 0 : _$Encounter66$patient4.value,
|
|
38776
|
+
personId: (_$Appointment$PersonI17 = _ === null || _ === void 0 ? void 0 : (_$Appointment51 = _.Appointment) === null || _$Appointment51 === void 0 ? void 0 : (_$Appointment51$Perso = _$Appointment51.PersonID) === null || _$Appointment51$Perso === void 0 ? void 0 : (_$Appointment51$Perso2 = _$Appointment51$Perso[0]) === null || _$Appointment51$Perso2 === void 0 ? void 0 : _$Appointment51$Perso2.Id) !== null && _$Appointment$PersonI17 !== void 0 ? _$Appointment$PersonI17 : null,
|
|
38777
|
+
patientId: (_$Encounter$patient_i17 = _ === null || _ === void 0 ? void 0 : (_$Encounter67 = _.Encounter) === null || _$Encounter67 === void 0 ? void 0 : (_$Encounter67$patient = _$Encounter67.patient_id) === null || _$Encounter67$patient === void 0 ? void 0 : (_$Encounter67$patient2 = _$Encounter67$patient[0]) === null || _$Encounter67$patient2 === void 0 ? void 0 : _$Encounter67$patient2.id) !== null && _$Encounter$patient_i17 !== void 0 ? _$Encounter$patient_i17 : null
|
|
38778
|
+
}),
|
|
38779
|
+
cancelaction: JSON.stringify({
|
|
38780
|
+
appNo: (_$Encounter$appointme20 = _ === null || _ === void 0 ? void 0 : (_$Encounter68 = _.Encounter) === null || _$Encounter68 === void 0 ? void 0 : (_$Encounter68$appoint = _$Encounter68.appointmentId) === null || _$Encounter68$appoint === void 0 ? void 0 : _$Encounter68$appoint[0]) !== null && _$Encounter$appointme20 !== void 0 ? _$Encounter$appointme20 : "",
|
|
38781
|
+
enId: _.Encounter.id,
|
|
38782
|
+
contact: _ === null || _ === void 0 ? void 0 : (_$Encounter69 = _.Encounter) === null || _$Encounter69 === void 0 ? void 0 : (_$Encounter69$patient = _$Encounter69.patient_id) === null || _$Encounter69$patient === void 0 ? void 0 : (_$Encounter69$patient2 = _$Encounter69$patient[0]) === null || _$Encounter69$patient2 === void 0 ? void 0 : (_$Encounter69$patient3 = _$Encounter69$patient2.telecom) === null || _$Encounter69$patient3 === void 0 ? void 0 : (_$Encounter69$patient4 = _$Encounter69$patient3[0]) === null || _$Encounter69$patient4 === void 0 ? void 0 : _$Encounter69$patient4.value,
|
|
38783
|
+
personId: (_$Appointment$PersonI18 = _ === null || _ === void 0 ? void 0 : (_$Appointment52 = _.Appointment) === null || _$Appointment52 === void 0 ? void 0 : (_$Appointment52$Perso = _$Appointment52.PersonID) === null || _$Appointment52$Perso === void 0 ? void 0 : (_$Appointment52$Perso2 = _$Appointment52$Perso[0]) === null || _$Appointment52$Perso2 === void 0 ? void 0 : _$Appointment52$Perso2.Id) !== null && _$Appointment$PersonI18 !== void 0 ? _$Appointment$PersonI18 : null,
|
|
38784
|
+
patientId: (_$Encounter$patient_i18 = _ === null || _ === void 0 ? void 0 : (_$Encounter70 = _.Encounter) === null || _$Encounter70 === void 0 ? void 0 : (_$Encounter70$patient = _$Encounter70.patient_id) === null || _$Encounter70$patient === void 0 ? void 0 : (_$Encounter70$patient2 = _$Encounter70$patient[0]) === null || _$Encounter70$patient2 === void 0 ? void 0 : _$Encounter70$patient2.id) !== null && _$Encounter$patient_i18 !== void 0 ? _$Encounter$patient_i18 : null
|
|
38785
|
+
})
|
|
38551
38786
|
};
|
|
38552
38787
|
}) : [];
|
|
38553
38788
|
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38593,26 +38828,46 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
|
|
|
38593
38828
|
case 5:
|
|
38594
38829
|
data = _context7.sent;
|
|
38595
38830
|
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 (_) {
|
|
38596
|
-
var _$
|
|
38831
|
+
var _$Appointment53, _$Appointment53$Perso, _$Appointment53$Perso2, _$Appointment53$Perso3, _$Appointment53$Perso4, _$Appointment54, _$Appointment54$Perso, _$Appointment54$Perso2, _$Appointment54$Perso3, _$Appointment54$Perso4, _$Appointment55, _$Appointment55$Perso, _$Appointment55$Perso2, _$Appointment55$Perso3, _$Appointment56, _$Appointment56$Perso, _$Appointment56$Perso2, _$Appointment57, _$Appointment57$Perso, _$Appointment57$Perso2, _$Appointment57$Perso3, _$Appointment58, _$Appointment59, _$Appointment60, _$Appointment61, _$Appointment62, _$Appointment$appoint2, _$Appointment63, _$Appointment$Special, _$Appointment64, _$Appointment64$Speci, _$Appointment$orgid$n, _$Appointment65, _$Appointment65$orgid, _$practitioner_detail, _$practitioner_detail2, _$Appointment66;
|
|
38597
38832
|
|
|
38598
38833
|
return {
|
|
38599
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38600
|
-
name:
|
|
38601
|
-
|
|
38602
|
-
|
|
38603
|
-
|
|
38604
|
-
|
|
38605
|
-
|
|
38606
|
-
|
|
38607
|
-
|
|
38608
|
-
|
|
38609
|
-
|
|
38610
|
-
|
|
38611
|
-
|
|
38834
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment53 = _.Appointment) === null || _$Appointment53 === void 0 ? void 0 : (_$Appointment53$Perso = _$Appointment53.PersonID) === null || _$Appointment53$Perso === void 0 ? void 0 : (_$Appointment53$Perso2 = _$Appointment53$Perso[0]) === null || _$Appointment53$Perso2 === void 0 ? void 0 : (_$Appointment53$Perso3 = _$Appointment53$Perso2.photo) === null || _$Appointment53$Perso3 === void 0 ? void 0 : (_$Appointment53$Perso4 = _$Appointment53$Perso3[0]) === null || _$Appointment53$Perso4 === void 0 ? void 0 : _$Appointment53$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment54 = _.Appointment) === null || _$Appointment54 === void 0 ? void 0 : (_$Appointment54$Perso = _$Appointment54.PersonID) === null || _$Appointment54$Perso === void 0 ? void 0 : (_$Appointment54$Perso2 = _$Appointment54$Perso[0]) === null || _$Appointment54$Perso2 === void 0 ? void 0 : (_$Appointment54$Perso3 = _$Appointment54$Perso2.photo) === null || _$Appointment54$Perso3 === void 0 ? void 0 : (_$Appointment54$Perso4 = _$Appointment54$Perso3[0]) === null || _$Appointment54$Perso4 === void 0 ? void 0 : _$Appointment54$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
38835
|
+
name: JSON.stringify({
|
|
38836
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment55 = _.Appointment) === null || _$Appointment55 === void 0 ? void 0 : (_$Appointment55$Perso = _$Appointment55.PersonID) === null || _$Appointment55$Perso === void 0 ? void 0 : (_$Appointment55$Perso2 = _$Appointment55$Perso[0]) === null || _$Appointment55$Perso2 === void 0 ? void 0 : (_$Appointment55$Perso3 = _$Appointment55$Perso2.name) === null || _$Appointment55$Perso3 === void 0 ? void 0 : _$Appointment55$Perso3[0]) || {}),
|
|
38837
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment56 = _.Appointment) === null || _$Appointment56 === void 0 ? void 0 : (_$Appointment56$Perso = _$Appointment56.PersonID) === null || _$Appointment56$Perso === void 0 ? void 0 : (_$Appointment56$Perso2 = _$Appointment56$Perso[0]) === null || _$Appointment56$Perso2 === void 0 ? void 0 : _$Appointment56$Perso2.birthDay),
|
|
38838
|
+
mrn: (_$Appointment57 = _.Appointment) === null || _$Appointment57 === void 0 ? void 0 : (_$Appointment57$Perso = _$Appointment57.PersonID) === null || _$Appointment57$Perso === void 0 ? void 0 : (_$Appointment57$Perso2 = _$Appointment57$Perso[0]) === null || _$Appointment57$Perso2 === void 0 ? void 0 : (_$Appointment57$Perso3 = _$Appointment57$Perso2.MRN) === null || _$Appointment57$Perso3 === void 0 ? void 0 : _$Appointment57$Perso3[0],
|
|
38839
|
+
genderData: "M",
|
|
38840
|
+
contact: "9785487478"
|
|
38841
|
+
}),
|
|
38842
|
+
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
38843
|
+
// age: _?.patient_id?.[0]?.age,
|
|
38844
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment58 = _.Appointment) === null || _$Appointment58 === void 0 ? void 0 : _$Appointment58.appno) || "",
|
|
38845
|
+
date: JSON.stringify({
|
|
38846
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment59 = _.Appointment) === null || _$Appointment59 === void 0 ? void 0 : _$Appointment59.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment60 = _.Appointment) === null || _$Appointment60 === void 0 ? void 0 : _$Appointment60.start, "DD MMM,YYYY") : "",
|
|
38847
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment61 = _.Appointment) === null || _$Appointment61 === void 0 ? void 0 : _$Appointment61.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment62 = _.Appointment) === null || _$Appointment62 === void 0 ? void 0 : _$Appointment62.start, "hh:mm A") : ""
|
|
38848
|
+
}),
|
|
38849
|
+
visitType: (_$Appointment$appoint2 = _ === null || _ === void 0 ? void 0 : (_$Appointment63 = _.Appointment) === null || _$Appointment63 === void 0 ? void 0 : _$Appointment63.appointmentType) !== null && _$Appointment$appoint2 !== void 0 ? _$Appointment$appoint2 : "",
|
|
38850
|
+
speciality: JSON.stringify({
|
|
38851
|
+
speciality: (_$Appointment$Special = _ === null || _ === void 0 ? void 0 : (_$Appointment64 = _.Appointment) === null || _$Appointment64 === void 0 ? void 0 : (_$Appointment64$Speci = _$Appointment64.SpecialtyID) === null || _$Appointment64$Speci === void 0 ? void 0 : _$Appointment64$Speci.map(function (spl) {
|
|
38852
|
+
var _spl$coding, _spl$coding$;
|
|
38853
|
+
|
|
38854
|
+
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;
|
|
38855
|
+
}).join(", ")) !== null && _$Appointment$Special !== void 0 ? _$Appointment$Special : "",
|
|
38856
|
+
clinic: (_$Appointment$orgid$n = _ === null || _ === void 0 ? void 0 : (_$Appointment65 = _.Appointment) === null || _$Appointment65 === void 0 ? void 0 : (_$Appointment65$orgid = _$Appointment65.orgid) === null || _$Appointment65$orgid === void 0 ? void 0 : _$Appointment65$orgid.name) !== null && _$Appointment$orgid$n !== void 0 ? _$Appointment$orgid$n : ""
|
|
38857
|
+
}),
|
|
38612
38858
|
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) || "",
|
|
38613
|
-
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38859
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment66 = _.Appointment) === null || _$Appointment66 === void 0 ? void 0 : _$Appointment66.appstatus) || "",
|
|
38614
38860
|
"View Patient": true,
|
|
38615
|
-
Attend: true
|
|
38861
|
+
Attend: true,
|
|
38862
|
+
action: true,
|
|
38863
|
+
type: "OP" // appNo: _?.id ?? '',
|
|
38864
|
+
// // data: _,
|
|
38865
|
+
// enId: _.id,
|
|
38866
|
+
// age: getAge(_?.PersonID?.[0]?.birthDay),
|
|
38867
|
+
// // gender: _?.PersonID?.[0]?.gender,
|
|
38868
|
+
// contact: _?.PersonID?.[0]?.telecom?.[0]?.value ?? "",
|
|
38869
|
+
// pId : _?.patient_id?.id,
|
|
38870
|
+
|
|
38616
38871
|
};
|
|
38617
38872
|
}) : [];
|
|
38618
38873
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38657,26 +38912,59 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
|
|
|
38657
38912
|
case 5:
|
|
38658
38913
|
data = _context8.sent;
|
|
38659
38914
|
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 (_) {
|
|
38660
|
-
var _$
|
|
38915
|
+
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, _$appointmentId3, _$appointmentId3$, _$appointmentId3$$Per, _$appointmentId3$$Per2, _$patient_id2, _$patient_id2$, _$appointmentId$0$Per, _$appointmentId4, _$appointmentId4$, _$appointmentId4$$Per, _$appointmentId4$$Per2, _$patient_id$0$teleco, _$patient_id3, _$patient_id3$, _$patient_id3$$teleco, _$patient_id3$$teleco2, _$appointmentId5, _$appointmentId5$, _$appointmentId6, _$appointmentId6$, _$appointmentId7, _$appointmentId7$, _$appointmentId8, _$appointmentId8$, _$appointmentId9, _$appointmentId9$, _$visit_type, _$appointmentId10, _$appointmentId10$, _$appointmentId10$$Sp, _$practitioner_detail3, _$practitioner_detail4, _$status;
|
|
38661
38916
|
|
|
38662
38917
|
return {
|
|
38663
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38664
|
-
name: makeName(
|
|
38665
|
-
mrn:
|
|
38666
|
-
age: _
|
|
38667
|
-
refNo:
|
|
38668
|
-
date:
|
|
38669
|
-
|
|
38670
|
-
|
|
38671
|
-
|
|
38672
|
-
|
|
38918
|
+
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",
|
|
38919
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
38920
|
+
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
38921
|
+
// age: _?.patient_id?.[0]?.age,
|
|
38922
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
38923
|
+
// date: _?.appointmentId?.[0]?.start
|
|
38924
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
38925
|
+
// : "",
|
|
38926
|
+
// time: _?.appointmentId?.[0]?.start
|
|
38927
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
38928
|
+
// : "",
|
|
38929
|
+
// visitType: _?.visit_type ?? "",
|
|
38930
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
38931
|
+
// return spl?.coding?.[0]?.display;
|
|
38932
|
+
// }).join(", "),
|
|
38933
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
38934
|
+
// appointmentStatus: _?.status?.display || "",
|
|
38935
|
+
// "View Patient": true,
|
|
38936
|
+
// Attend: true,
|
|
38937
|
+
// type: "OP",
|
|
38938
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
38939
|
+
// data: _,
|
|
38940
|
+
// enId: _.id,
|
|
38941
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
38942
|
+
// // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
38943
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
38944
|
+
// pId: _?.patient_id?.id ?? "",
|
|
38945
|
+
name: JSON.stringify({
|
|
38946
|
+
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]) || {}),
|
|
38947
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : (_$appointmentId3$ = _$appointmentId3[0]) === null || _$appointmentId3$ === void 0 ? void 0 : (_$appointmentId3$$Per = _$appointmentId3$.PersonID) === null || _$appointmentId3$$Per === void 0 ? void 0 : (_$appointmentId3$$Per2 = _$appointmentId3$$Per[0]) === null || _$appointmentId3$$Per2 === void 0 ? void 0 : _$appointmentId3$$Per2.birthDay),
|
|
38948
|
+
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) || "",
|
|
38949
|
+
genderData: (_$appointmentId$0$Per = _ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : (_$appointmentId4$$Per = _$appointmentId4$.PersonID) === null || _$appointmentId4$$Per === void 0 ? void 0 : (_$appointmentId4$$Per2 = _$appointmentId4$$Per[0]) === null || _$appointmentId4$$Per2 === void 0 ? void 0 : _$appointmentId4$$Per2.gender) !== null && _$appointmentId$0$Per !== void 0 ? _$appointmentId$0$Per : "",
|
|
38950
|
+
contact: (_$patient_id$0$teleco = _ === 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$$teleco = _$patient_id3$.telecom) === null || _$patient_id3$$teleco === void 0 ? void 0 : (_$patient_id3$$teleco2 = _$patient_id3$$teleco[0]) === null || _$patient_id3$$teleco2 === void 0 ? void 0 : _$patient_id3$$teleco2.value) !== null && _$patient_id$0$teleco !== void 0 ? _$patient_id$0$teleco : ""
|
|
38951
|
+
}),
|
|
38952
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId5 = _.appointmentId) === null || _$appointmentId5 === void 0 ? void 0 : (_$appointmentId5$ = _$appointmentId5[0]) === null || _$appointmentId5$ === void 0 ? void 0 : _$appointmentId5$.appno) || "",
|
|
38953
|
+
date: JSON.stringify({
|
|
38954
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId6 = _.appointmentId) === null || _$appointmentId6 === void 0 ? void 0 : (_$appointmentId6$ = _$appointmentId6[0]) === null || _$appointmentId6$ === void 0 ? void 0 : _$appointmentId6$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId7 = _.appointmentId) === null || _$appointmentId7 === void 0 ? void 0 : (_$appointmentId7$ = _$appointmentId7[0]) === null || _$appointmentId7$ === void 0 ? void 0 : _$appointmentId7$.start, "DD MMM,YYYY") : "",
|
|
38955
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : _$appointmentId8$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : _$appointmentId9$.start, "hh:mm A") : ""
|
|
38956
|
+
}),
|
|
38957
|
+
visitType: (_$visit_type = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type !== void 0 ? _$visit_type : "",
|
|
38958
|
+
speciality: JSON.stringify({
|
|
38959
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : (_$appointmentId10$$Sp = _$appointmentId10$.SpecialtyID) === null || _$appointmentId10$$Sp === void 0 ? void 0 : _$appointmentId10$$Sp.map(function (spl) {
|
|
38960
|
+
var _spl$coding2, _spl$coding2$;
|
|
38673
38961
|
|
|
38674
|
-
|
|
38675
|
-
|
|
38676
|
-
|
|
38677
|
-
|
|
38678
|
-
|
|
38679
|
-
|
|
38962
|
+
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;
|
|
38963
|
+
}).join(", "),
|
|
38964
|
+
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) || ""
|
|
38965
|
+
}),
|
|
38966
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display) || "",
|
|
38967
|
+
action: true
|
|
38680
38968
|
};
|
|
38681
38969
|
}) : [];
|
|
38682
38970
|
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38721,26 +39009,59 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
|
|
|
38721
39009
|
case 5:
|
|
38722
39010
|
data = _context9.sent;
|
|
38723
39011
|
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 (_) {
|
|
38724
|
-
var _$
|
|
39012
|
+
var _$appointmentId11, _$appointmentId11$, _$appointmentId11$$Pe, _$appointmentId11$$Pe2, _$appointmentId11$$Pe3, _$appointmentId11$$Pe4, _$appointmentId12, _$appointmentId12$, _$appointmentId12$$Pe, _$appointmentId12$$Pe2, _$appointmentId12$$Pe3, _$appointmentId12$$Pe4, _$patient_id4, _$patient_id4$, _$patient_id4$$name, _$appointmentId13, _$appointmentId13$, _$appointmentId13$$Pe, _$appointmentId13$$Pe2, _$patient_id5, _$patient_id5$, _$appointmentId$0$Per2, _$appointmentId14, _$appointmentId14$, _$appointmentId14$$Pe, _$appointmentId14$$Pe2, _$patient_id$0$teleco2, _$patient_id6, _$patient_id6$, _$patient_id6$$teleco, _$patient_id6$$teleco2, _$appointmentId15, _$appointmentId15$, _$appointmentId16, _$appointmentId16$, _$appointmentId17, _$appointmentId17$, _$appointmentId18, _$appointmentId18$, _$appointmentId19, _$appointmentId19$, _$visit_type2, _$appointmentId20, _$appointmentId20$, _$appointmentId20$$Sp, _$practitioner_detail5, _$practitioner_detail6, _$status2;
|
|
38725
39013
|
|
|
38726
39014
|
return {
|
|
38727
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38728
|
-
name: makeName(
|
|
38729
|
-
mrn:
|
|
38730
|
-
age: _
|
|
38731
|
-
refNo:
|
|
38732
|
-
date:
|
|
38733
|
-
|
|
38734
|
-
|
|
38735
|
-
|
|
38736
|
-
|
|
39015
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId11 = _.appointmentId) === null || _$appointmentId11 === void 0 ? void 0 : (_$appointmentId11$ = _$appointmentId11[0]) === null || _$appointmentId11$ === void 0 ? void 0 : (_$appointmentId11$$Pe = _$appointmentId11$.PersonID) === null || _$appointmentId11$$Pe === void 0 ? void 0 : (_$appointmentId11$$Pe2 = _$appointmentId11$$Pe[0]) === null || _$appointmentId11$$Pe2 === void 0 ? void 0 : (_$appointmentId11$$Pe3 = _$appointmentId11$$Pe2.photo) === null || _$appointmentId11$$Pe3 === void 0 ? void 0 : (_$appointmentId11$$Pe4 = _$appointmentId11$$Pe3[0]) === null || _$appointmentId11$$Pe4 === void 0 ? void 0 : _$appointmentId11$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId12 = _.appointmentId) === null || _$appointmentId12 === void 0 ? void 0 : (_$appointmentId12$ = _$appointmentId12[0]) === null || _$appointmentId12$ === void 0 ? void 0 : (_$appointmentId12$$Pe = _$appointmentId12$.PersonID) === null || _$appointmentId12$$Pe === void 0 ? void 0 : (_$appointmentId12$$Pe2 = _$appointmentId12$$Pe[0]) === null || _$appointmentId12$$Pe2 === void 0 ? void 0 : (_$appointmentId12$$Pe3 = _$appointmentId12$$Pe2.photo) === null || _$appointmentId12$$Pe3 === void 0 ? void 0 : (_$appointmentId12$$Pe4 = _$appointmentId12$$Pe3[0]) === null || _$appointmentId12$$Pe4 === void 0 ? void 0 : _$appointmentId12$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39016
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39017
|
+
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
39018
|
+
// age: _?.patient_id?.[0]?.age,
|
|
39019
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39020
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39021
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39022
|
+
// : "",
|
|
39023
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39024
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39025
|
+
// : "",
|
|
39026
|
+
// visitType: _?.visit_type ?? "",
|
|
39027
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39028
|
+
// return spl?.coding?.[0]?.display;
|
|
39029
|
+
// }).join(", "),
|
|
39030
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39031
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39032
|
+
// "View Patient": true,
|
|
39033
|
+
// Attend: true,
|
|
39034
|
+
// type: "OP",
|
|
39035
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39036
|
+
// data: _,
|
|
39037
|
+
// enId: _.id,
|
|
39038
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39039
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39040
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39041
|
+
// pId: _?.patient_id?.id,
|
|
39042
|
+
name: JSON.stringify({
|
|
39043
|
+
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]) || {}),
|
|
39044
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId13 = _.appointmentId) === null || _$appointmentId13 === void 0 ? void 0 : (_$appointmentId13$ = _$appointmentId13[0]) === null || _$appointmentId13$ === void 0 ? void 0 : (_$appointmentId13$$Pe = _$appointmentId13$.PersonID) === null || _$appointmentId13$$Pe === void 0 ? void 0 : (_$appointmentId13$$Pe2 = _$appointmentId13$$Pe[0]) === null || _$appointmentId13$$Pe2 === void 0 ? void 0 : _$appointmentId13$$Pe2.birthDay),
|
|
39045
|
+
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) || "",
|
|
39046
|
+
gender: (_$appointmentId$0$Per2 = _ === null || _ === void 0 ? void 0 : (_$appointmentId14 = _.appointmentId) === null || _$appointmentId14 === void 0 ? void 0 : (_$appointmentId14$ = _$appointmentId14[0]) === null || _$appointmentId14$ === void 0 ? void 0 : (_$appointmentId14$$Pe = _$appointmentId14$.PersonID) === null || _$appointmentId14$$Pe === void 0 ? void 0 : (_$appointmentId14$$Pe2 = _$appointmentId14$$Pe[0]) === null || _$appointmentId14$$Pe2 === void 0 ? void 0 : _$appointmentId14$$Pe2.gender) !== null && _$appointmentId$0$Per2 !== void 0 ? _$appointmentId$0$Per2 : "",
|
|
39047
|
+
contact: (_$patient_id$0$teleco2 = _ === 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$$teleco = _$patient_id6$.telecom) === null || _$patient_id6$$teleco === void 0 ? void 0 : (_$patient_id6$$teleco2 = _$patient_id6$$teleco[0]) === null || _$patient_id6$$teleco2 === void 0 ? void 0 : _$patient_id6$$teleco2.value) !== null && _$patient_id$0$teleco2 !== void 0 ? _$patient_id$0$teleco2 : ""
|
|
39048
|
+
}),
|
|
39049
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : _$appointmentId15$.appno) || "",
|
|
39050
|
+
date: JSON.stringify({
|
|
39051
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : _$appointmentId16$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : _$appointmentId17$.start, "DD MMM,YYYY") : "",
|
|
39052
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : _$appointmentId18$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId19 = _.appointmentId) === null || _$appointmentId19 === void 0 ? void 0 : (_$appointmentId19$ = _$appointmentId19[0]) === null || _$appointmentId19$ === void 0 ? void 0 : _$appointmentId19$.start, "hh:mm A") : ""
|
|
39053
|
+
}),
|
|
39054
|
+
visitType: (_$visit_type2 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type2 !== void 0 ? _$visit_type2 : "",
|
|
39055
|
+
speciality: JSON.stringify({
|
|
39056
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId20 = _.appointmentId) === null || _$appointmentId20 === void 0 ? void 0 : (_$appointmentId20$ = _$appointmentId20[0]) === null || _$appointmentId20$ === void 0 ? void 0 : (_$appointmentId20$$Sp = _$appointmentId20$.SpecialtyID) === null || _$appointmentId20$$Sp === void 0 ? void 0 : _$appointmentId20$$Sp.map(function (spl) {
|
|
39057
|
+
var _spl$coding3, _spl$coding3$;
|
|
38737
39058
|
|
|
38738
|
-
|
|
38739
|
-
|
|
38740
|
-
|
|
38741
|
-
|
|
38742
|
-
|
|
38743
|
-
|
|
39059
|
+
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;
|
|
39060
|
+
}).join(", "),
|
|
39061
|
+
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) || ""
|
|
39062
|
+
}),
|
|
39063
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display) || "",
|
|
39064
|
+
action: true
|
|
38744
39065
|
};
|
|
38745
39066
|
}) : [];
|
|
38746
39067
|
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38785,26 +39106,59 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
|
|
|
38785
39106
|
case 5:
|
|
38786
39107
|
data = _context10.sent;
|
|
38787
39108
|
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 (_) {
|
|
38788
|
-
var _$
|
|
39109
|
+
var _$appointmentId21, _$appointmentId21$, _$appointmentId21$$Pe, _$appointmentId21$$Pe2, _$appointmentId21$$Pe3, _$appointmentId21$$Pe4, _$appointmentId22, _$appointmentId22$, _$appointmentId22$$Pe, _$appointmentId22$$Pe2, _$appointmentId22$$Pe3, _$appointmentId22$$Pe4, _$patient_id7, _$patient_id7$, _$patient_id7$$name, _$appointmentId23, _$appointmentId23$, _$appointmentId23$$Pe, _$appointmentId23$$Pe2, _$patient_id8, _$patient_id8$, _$appointmentId$0$Per3, _$appointmentId24, _$appointmentId24$, _$appointmentId24$$Pe, _$appointmentId24$$Pe2, _$patient_id$0$teleco3, _$patient_id9, _$patient_id9$, _$patient_id9$$teleco, _$patient_id9$$teleco2, _$appointmentId25, _$appointmentId25$, _$appointmentId26, _$appointmentId26$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$visit_type3, _$appointmentId30, _$appointmentId30$, _$appointmentId30$$Sp, _$practitioner_detail7, _$practitioner_detail8, _$status3;
|
|
38789
39110
|
|
|
38790
39111
|
return {
|
|
38791
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38792
|
-
name: makeName(
|
|
38793
|
-
mrn:
|
|
38794
|
-
age: _
|
|
38795
|
-
refNo:
|
|
38796
|
-
date:
|
|
38797
|
-
|
|
38798
|
-
|
|
38799
|
-
|
|
38800
|
-
|
|
39112
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId21 = _.appointmentId) === null || _$appointmentId21 === void 0 ? void 0 : (_$appointmentId21$ = _$appointmentId21[0]) === null || _$appointmentId21$ === void 0 ? void 0 : (_$appointmentId21$$Pe = _$appointmentId21$.PersonID) === null || _$appointmentId21$$Pe === void 0 ? void 0 : (_$appointmentId21$$Pe2 = _$appointmentId21$$Pe[0]) === null || _$appointmentId21$$Pe2 === void 0 ? void 0 : (_$appointmentId21$$Pe3 = _$appointmentId21$$Pe2.photo) === null || _$appointmentId21$$Pe3 === void 0 ? void 0 : (_$appointmentId21$$Pe4 = _$appointmentId21$$Pe3[0]) === null || _$appointmentId21$$Pe4 === void 0 ? void 0 : _$appointmentId21$$Pe4.fileid) ? getImgUrl(_ === 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) === null || _$appointmentId22$$Pe3 === void 0 ? void 0 : (_$appointmentId22$$Pe4 = _$appointmentId22$$Pe3[0]) === null || _$appointmentId22$$Pe4 === void 0 ? void 0 : _$appointmentId22$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39113
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39114
|
+
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
39115
|
+
// age: _?.patient_id?.[0]?.age,
|
|
39116
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39117
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39118
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39119
|
+
// : "",
|
|
39120
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39121
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39122
|
+
// : "",
|
|
39123
|
+
// visitType: _?.visit_type ?? "",
|
|
39124
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39125
|
+
// return spl?.coding?.[0]?.display;
|
|
39126
|
+
// }).join(", "),
|
|
39127
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39128
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39129
|
+
// "View Patient": true,
|
|
39130
|
+
// Attend: true,
|
|
39131
|
+
// type: "OP",
|
|
39132
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39133
|
+
// data: _,
|
|
39134
|
+
// enId: _.id,
|
|
39135
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39136
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39137
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39138
|
+
// pId: _?.patient_id?.id,
|
|
39139
|
+
name: JSON.stringify({
|
|
39140
|
+
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]) || {}),
|
|
39141
|
+
age: getAge(_ === 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$$Pe2.birthDay),
|
|
39142
|
+
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) || "",
|
|
39143
|
+
gender: (_$appointmentId$0$Per3 = _ === null || _ === void 0 ? void 0 : (_$appointmentId24 = _.appointmentId) === null || _$appointmentId24 === void 0 ? void 0 : (_$appointmentId24$ = _$appointmentId24[0]) === null || _$appointmentId24$ === void 0 ? void 0 : (_$appointmentId24$$Pe = _$appointmentId24$.PersonID) === null || _$appointmentId24$$Pe === void 0 ? void 0 : (_$appointmentId24$$Pe2 = _$appointmentId24$$Pe[0]) === null || _$appointmentId24$$Pe2 === void 0 ? void 0 : _$appointmentId24$$Pe2.gender) !== null && _$appointmentId$0$Per3 !== void 0 ? _$appointmentId$0$Per3 : "",
|
|
39144
|
+
contact: (_$patient_id$0$teleco3 = _ === 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$$teleco = _$patient_id9$.telecom) === null || _$patient_id9$$teleco === void 0 ? void 0 : (_$patient_id9$$teleco2 = _$patient_id9$$teleco[0]) === null || _$patient_id9$$teleco2 === void 0 ? void 0 : _$patient_id9$$teleco2.value) !== null && _$patient_id$0$teleco3 !== void 0 ? _$patient_id$0$teleco3 : ""
|
|
39145
|
+
}),
|
|
39146
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId25 = _.appointmentId) === null || _$appointmentId25 === void 0 ? void 0 : (_$appointmentId25$ = _$appointmentId25[0]) === null || _$appointmentId25$ === void 0 ? void 0 : _$appointmentId25$.appno) || "",
|
|
39147
|
+
date: JSON.stringify({
|
|
39148
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId26 = _.appointmentId) === null || _$appointmentId26 === void 0 ? void 0 : (_$appointmentId26$ = _$appointmentId26[0]) === null || _$appointmentId26$ === void 0 ? void 0 : _$appointmentId26$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId27 = _.appointmentId) === null || _$appointmentId27 === void 0 ? void 0 : (_$appointmentId27$ = _$appointmentId27[0]) === null || _$appointmentId27$ === void 0 ? void 0 : _$appointmentId27$.start, "DD MMM,YYYY") : "",
|
|
39149
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId28 = _.appointmentId) === null || _$appointmentId28 === void 0 ? void 0 : (_$appointmentId28$ = _$appointmentId28[0]) === null || _$appointmentId28$ === void 0 ? void 0 : _$appointmentId28$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId29 = _.appointmentId) === null || _$appointmentId29 === void 0 ? void 0 : (_$appointmentId29$ = _$appointmentId29[0]) === null || _$appointmentId29$ === void 0 ? void 0 : _$appointmentId29$.start, "hh:mm A") : ""
|
|
39150
|
+
}),
|
|
39151
|
+
visitType: (_$visit_type3 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type3 !== void 0 ? _$visit_type3 : "",
|
|
39152
|
+
speciality: JSON.stringify({
|
|
39153
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId30 = _.appointmentId) === null || _$appointmentId30 === void 0 ? void 0 : (_$appointmentId30$ = _$appointmentId30[0]) === null || _$appointmentId30$ === void 0 ? void 0 : (_$appointmentId30$$Sp = _$appointmentId30$.SpecialtyID) === null || _$appointmentId30$$Sp === void 0 ? void 0 : _$appointmentId30$$Sp.map(function (spl) {
|
|
39154
|
+
var _spl$coding4, _spl$coding4$;
|
|
38801
39155
|
|
|
38802
|
-
|
|
38803
|
-
|
|
38804
|
-
|
|
38805
|
-
|
|
38806
|
-
|
|
38807
|
-
|
|
39156
|
+
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;
|
|
39157
|
+
}).join(", "),
|
|
39158
|
+
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) || ""
|
|
39159
|
+
}),
|
|
39160
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display) || "",
|
|
39161
|
+
action: true
|
|
38808
39162
|
};
|
|
38809
39163
|
}) : [];
|
|
38810
39164
|
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38849,25 +39203,58 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
|
|
|
38849
39203
|
case 5:
|
|
38850
39204
|
data = _context11.sent;
|
|
38851
39205
|
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 (_) {
|
|
38852
|
-
var _$
|
|
39206
|
+
var _$appointmentId31, _$appointmentId31$, _$appointmentId31$$Pe, _$appointmentId31$$Pe2, _$appointmentId31$$Pe3, _$appointmentId32, _$appointmentId32$, _$appointmentId32$$Pe, _$appointmentId32$$Pe2, _$appointmentId32$$Pe3, _$patient_id10, _$patient_id10$, _$patient_id10$$name, _$appointmentId33, _$appointmentId33$, _$appointmentId33$$Pe, _$appointmentId33$$Pe2, _$patient_id11, _$patient_id11$, _$appointmentId$0$Per4, _$appointmentId34, _$appointmentId34$, _$appointmentId34$$Pe, _$appointmentId34$$Pe2, _$patient_id$0$teleco4, _$patient_id12, _$patient_id12$, _$patient_id12$$telec, _$patient_id12$$telec2, _$appointmentId35, _$appointmentId35$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId38, _$appointmentId38$, _$appointmentId39, _$appointmentId39$, _$visit_type4, _$appointmentId40, _$appointmentId40$, _$appointmentId40$$Sp, _$practitioner_detail9, _$practitioner_detail10, _$status4;
|
|
38853
39207
|
|
|
38854
39208
|
return {
|
|
38855
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38856
|
-
name: makeName(
|
|
38857
|
-
mrn: _
|
|
38858
|
-
age: _
|
|
38859
|
-
orderDate:
|
|
38860
|
-
|
|
38861
|
-
|
|
38862
|
-
|
|
38863
|
-
|
|
38864
|
-
|
|
38865
|
-
|
|
38866
|
-
|
|
38867
|
-
|
|
38868
|
-
|
|
38869
|
-
|
|
38870
|
-
|
|
39209
|
+
img: (_ === 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) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId32 = _.appointmentId) === null || _$appointmentId32 === void 0 ? void 0 : (_$appointmentId32$ = _$appointmentId32[0]) === null || _$appointmentId32$ === void 0 ? void 0 : (_$appointmentId32$$Pe = _$appointmentId32$.PersonID) === null || _$appointmentId32$$Pe === void 0 ? void 0 : (_$appointmentId32$$Pe2 = _$appointmentId32$$Pe[0]) === null || _$appointmentId32$$Pe2 === void 0 ? void 0 : (_$appointmentId32$$Pe3 = _$appointmentId32$$Pe2.photo[0]) === null || _$appointmentId32$$Pe3 === void 0 ? void 0 : _$appointmentId32$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39210
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39211
|
+
// mrn: _?.patient_id?.[0]?.MRN,
|
|
39212
|
+
// age: _?.patient_id?.[0]?.age,
|
|
39213
|
+
// orderDate: _?.appointmentId?.[0]?.start
|
|
39214
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39215
|
+
// : "",
|
|
39216
|
+
// orderTime: _?.appointmentId?.[0]?.start
|
|
39217
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39218
|
+
// : "",
|
|
39219
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39220
|
+
// return spl?.coding?.[0]?.display;
|
|
39221
|
+
// }).join(", "),
|
|
39222
|
+
// ward: "Ward 1",
|
|
39223
|
+
// contact: JSON.stringify(_?.patient_id?.[0]?.telecom?.[0]?.value),
|
|
39224
|
+
// visittype: _?.visit_type || "",
|
|
39225
|
+
// encounterStatus: _?.status?.display,
|
|
39226
|
+
// view: true,
|
|
39227
|
+
// type: "OP",
|
|
39228
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39229
|
+
// data: _,
|
|
39230
|
+
// enId: _.id,
|
|
39231
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39232
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39233
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39234
|
+
// pId: _?.patient_id?.id,
|
|
39235
|
+
name: JSON.stringify({
|
|
39236
|
+
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]) || {}),
|
|
39237
|
+
age: getAge(_ === 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$$Pe2.birthDay),
|
|
39238
|
+
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) || "",
|
|
39239
|
+
gender: (_$appointmentId$0$Per4 = _ === 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$$Pe2.gender) !== null && _$appointmentId$0$Per4 !== void 0 ? _$appointmentId$0$Per4 : "",
|
|
39240
|
+
contact: (_$patient_id$0$teleco4 = _ === 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) !== null && _$patient_id$0$teleco4 !== void 0 ? _$patient_id$0$teleco4 : ""
|
|
39241
|
+
}),
|
|
39242
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId35 = _.appointmentId) === null || _$appointmentId35 === void 0 ? void 0 : (_$appointmentId35$ = _$appointmentId35[0]) === null || _$appointmentId35$ === void 0 ? void 0 : _$appointmentId35$.appno) || "",
|
|
39243
|
+
date: JSON.stringify({
|
|
39244
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : _$appointmentId36$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : _$appointmentId37$.start, "DD MMM,YYYY") : "",
|
|
39245
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : _$appointmentId38$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : _$appointmentId39$.start, "hh:mm A") : ""
|
|
39246
|
+
}),
|
|
39247
|
+
visitType: (_$visit_type4 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type4 !== void 0 ? _$visit_type4 : "",
|
|
39248
|
+
speciality: JSON.stringify({
|
|
39249
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : (_$appointmentId40$$Sp = _$appointmentId40$.SpecialtyID) === null || _$appointmentId40$$Sp === void 0 ? void 0 : _$appointmentId40$$Sp.map(function (spl) {
|
|
39250
|
+
var _spl$coding5, _spl$coding5$;
|
|
39251
|
+
|
|
39252
|
+
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;
|
|
39253
|
+
}).join(", "),
|
|
39254
|
+
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) || ""
|
|
39255
|
+
}),
|
|
39256
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display) || "",
|
|
39257
|
+
action: true
|
|
38871
39258
|
};
|
|
38872
39259
|
}) : [];
|
|
38873
39260
|
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38912,26 +39299,59 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
|
|
|
38912
39299
|
case 5:
|
|
38913
39300
|
data = _context12.sent;
|
|
38914
39301
|
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 (_) {
|
|
38915
|
-
var _$
|
|
39302
|
+
var _$appointmentId41, _$appointmentId41$, _$appointmentId41$$Pe, _$appointmentId41$$Pe2, _$appointmentId41$$Pe3, _$appointmentId41$$Pe4, _$appointmentId42, _$appointmentId42$, _$appointmentId42$$Pe, _$appointmentId42$$Pe2, _$appointmentId42$$Pe3, _$appointmentId42$$Pe4, _$patient_id13, _$patient_id13$, _$patient_id13$$name, _$appointmentId43, _$appointmentId43$, _$appointmentId43$$Pe, _$appointmentId43$$Pe2, _$patient_id14, _$patient_id14$, _$appointmentId$0$Per5, _$appointmentId44, _$appointmentId44$, _$appointmentId44$$Pe, _$appointmentId44$$Pe2, _$patient_id$0$teleco5, _$patient_id15, _$patient_id15$, _$patient_id15$$telec, _$patient_id15$$telec2, _$appointmentId45, _$appointmentId45$, _$appointmentId46, _$appointmentId46$, _$appointmentId47, _$appointmentId47$, _$appointmentId48, _$appointmentId48$, _$appointmentId49, _$appointmentId49$, _$visit_type5, _$appointmentId50, _$appointmentId50$, _$appointmentId50$$Sp, _$practitioner_detail11, _$practitioner_detail12, _$status5;
|
|
38916
39303
|
|
|
38917
39304
|
return {
|
|
38918
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38919
|
-
name: makeName(
|
|
38920
|
-
mrn:
|
|
38921
|
-
age: _
|
|
38922
|
-
refNo:
|
|
38923
|
-
date:
|
|
38924
|
-
|
|
39305
|
+
img: (_ === 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) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : (_$appointmentId42$$Pe = _$appointmentId42$.PersonID) === null || _$appointmentId42$$Pe === void 0 ? void 0 : (_$appointmentId42$$Pe2 = _$appointmentId42$$Pe[0]) === null || _$appointmentId42$$Pe2 === void 0 ? void 0 : (_$appointmentId42$$Pe3 = _$appointmentId42$$Pe2.photo) === null || _$appointmentId42$$Pe3 === void 0 ? void 0 : (_$appointmentId42$$Pe4 = _$appointmentId42$$Pe3[0]) === null || _$appointmentId42$$Pe4 === void 0 ? void 0 : _$appointmentId42$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39306
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39307
|
+
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
39308
|
+
// age: _?.patient_id?.[0]?.age,
|
|
39309
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39310
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39311
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39312
|
+
// : "",
|
|
39313
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39314
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39315
|
+
// : "",
|
|
39316
|
+
// visitType: _?.visit_type ?? "Walk-Ins",
|
|
39317
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39318
|
+
// return spl?.coding?.[0]?.display;
|
|
39319
|
+
// }).join(", "),
|
|
39320
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39321
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39322
|
+
// "View Patient": true,
|
|
39323
|
+
// Attend: true,
|
|
39324
|
+
// type: "OP",
|
|
39325
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39326
|
+
// data: _,
|
|
39327
|
+
// enId: _.id,
|
|
39328
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39329
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39330
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39331
|
+
// pId: _?.patient_id?.id,
|
|
39332
|
+
name: JSON.stringify({
|
|
39333
|
+
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]) || {}),
|
|
39334
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId43 = _.appointmentId) === null || _$appointmentId43 === void 0 ? void 0 : (_$appointmentId43$ = _$appointmentId43[0]) === null || _$appointmentId43$ === void 0 ? void 0 : (_$appointmentId43$$Pe = _$appointmentId43$.PersonID) === null || _$appointmentId43$$Pe === void 0 ? void 0 : (_$appointmentId43$$Pe2 = _$appointmentId43$$Pe[0]) === null || _$appointmentId43$$Pe2 === void 0 ? void 0 : _$appointmentId43$$Pe2.birthDay),
|
|
39335
|
+
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$.alias) || "",
|
|
39336
|
+
gender: (_$appointmentId$0$Per5 = _ === null || _ === void 0 ? void 0 : (_$appointmentId44 = _.appointmentId) === null || _$appointmentId44 === void 0 ? void 0 : (_$appointmentId44$ = _$appointmentId44[0]) === null || _$appointmentId44$ === void 0 ? void 0 : (_$appointmentId44$$Pe = _$appointmentId44$.PersonID) === null || _$appointmentId44$$Pe === void 0 ? void 0 : (_$appointmentId44$$Pe2 = _$appointmentId44$$Pe[0]) === null || _$appointmentId44$$Pe2 === void 0 ? void 0 : _$appointmentId44$$Pe2.gender) !== null && _$appointmentId$0$Per5 !== void 0 ? _$appointmentId$0$Per5 : "",
|
|
39337
|
+
contact: (_$patient_id$0$teleco5 = _ === 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$$telec = _$patient_id15$.telecom) === null || _$patient_id15$$telec === void 0 ? void 0 : (_$patient_id15$$telec2 = _$patient_id15$$telec[0]) === null || _$patient_id15$$telec2 === void 0 ? void 0 : _$patient_id15$$telec2.value) !== null && _$patient_id$0$teleco5 !== void 0 ? _$patient_id$0$teleco5 : ""
|
|
39338
|
+
}),
|
|
39339
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : _$appointmentId45$.appno) || "",
|
|
39340
|
+
date: JSON.stringify({
|
|
39341
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : _$appointmentId46$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : _$appointmentId47$.start, "DD MMM,YYYY") : "",
|
|
39342
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : _$appointmentId48$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : _$appointmentId49$.start, "hh:mm A") : ""
|
|
39343
|
+
}),
|
|
38925
39344
|
visitType: (_$visit_type5 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type5 !== void 0 ? _$visit_type5 : "",
|
|
38926
|
-
speciality:
|
|
38927
|
-
|
|
39345
|
+
speciality: JSON.stringify({
|
|
39346
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : (_$appointmentId50$$Sp = _$appointmentId50$.SpecialtyID) === null || _$appointmentId50$$Sp === void 0 ? void 0 : _$appointmentId50$$Sp.map(function (spl) {
|
|
39347
|
+
var _spl$coding6, _spl$coding6$;
|
|
38928
39348
|
|
|
38929
|
-
|
|
38930
|
-
|
|
38931
|
-
|
|
38932
|
-
|
|
38933
|
-
|
|
38934
|
-
|
|
39349
|
+
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;
|
|
39350
|
+
}).join(", "),
|
|
39351
|
+
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) || ""
|
|
39352
|
+
}),
|
|
39353
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display) || "",
|
|
39354
|
+
action: true
|
|
38935
39355
|
};
|
|
38936
39356
|
}) : [];
|
|
38937
39357
|
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -38977,25 +39397,46 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
|
|
|
38977
39397
|
case 5:
|
|
38978
39398
|
data = _context13.sent;
|
|
38979
39399
|
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 (_) {
|
|
38980
|
-
var _$
|
|
39400
|
+
var _$Appointment67, _$Appointment67$Perso, _$Appointment67$Perso2, _$Appointment67$Perso3, _$Appointment67$Perso4, _$Appointment68, _$Appointment68$Perso, _$Appointment68$Perso2, _$Appointment68$Perso3, _$Appointment68$Perso4, _$Appointment69, _$Appointment69$Perso, _$Appointment69$Perso2, _$Appointment69$Perso3, _$Appointment70, _$Appointment70$Perso, _$Appointment70$Perso2, _$Appointment71, _$Appointment71$Perso, _$Appointment71$Perso2, _$Appointment71$Perso3, _$Appointment72, _$Appointment73, _$Appointment74, _$Appointment75, _$Appointment76, _$Appointment$appoint3, _$Appointment77, _$Appointment$Special2, _$Appointment78, _$Appointment78$Speci, _$Appointment$orgid$n2, _$Appointment79, _$Appointment79$orgid, _$practitioner_detail13, _$practitioner_detail14, _$Appointment80;
|
|
38981
39401
|
|
|
38982
39402
|
return {
|
|
38983
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
38984
|
-
name:
|
|
38985
|
-
|
|
38986
|
-
|
|
38987
|
-
|
|
38988
|
-
|
|
38989
|
-
|
|
38990
|
-
|
|
38991
|
-
|
|
38992
|
-
|
|
38993
|
-
|
|
38994
|
-
|
|
38995
|
-
|
|
38996
|
-
|
|
39403
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$Appointment67 = _.Appointment) === null || _$Appointment67 === void 0 ? void 0 : (_$Appointment67$Perso = _$Appointment67.PersonID) === null || _$Appointment67$Perso === void 0 ? void 0 : (_$Appointment67$Perso2 = _$Appointment67$Perso[0]) === null || _$Appointment67$Perso2 === void 0 ? void 0 : (_$Appointment67$Perso3 = _$Appointment67$Perso2.photo) === null || _$Appointment67$Perso3 === void 0 ? void 0 : (_$Appointment67$Perso4 = _$Appointment67$Perso3[0]) === null || _$Appointment67$Perso4 === void 0 ? void 0 : _$Appointment67$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment68 = _.Appointment) === null || _$Appointment68 === void 0 ? void 0 : (_$Appointment68$Perso = _$Appointment68.PersonID) === null || _$Appointment68$Perso === void 0 ? void 0 : (_$Appointment68$Perso2 = _$Appointment68$Perso[0]) === null || _$Appointment68$Perso2 === void 0 ? void 0 : (_$Appointment68$Perso3 = _$Appointment68$Perso2.photo) === null || _$Appointment68$Perso3 === void 0 ? void 0 : (_$Appointment68$Perso4 = _$Appointment68$Perso3[0]) === null || _$Appointment68$Perso4 === void 0 ? void 0 : _$Appointment68$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39404
|
+
name: JSON.stringify({
|
|
39405
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment69 = _.Appointment) === null || _$Appointment69 === void 0 ? void 0 : (_$Appointment69$Perso = _$Appointment69.PersonID) === null || _$Appointment69$Perso === void 0 ? void 0 : (_$Appointment69$Perso2 = _$Appointment69$Perso[0]) === null || _$Appointment69$Perso2 === void 0 ? void 0 : (_$Appointment69$Perso3 = _$Appointment69$Perso2.name) === null || _$Appointment69$Perso3 === void 0 ? void 0 : _$Appointment69$Perso3[0]) || {}),
|
|
39406
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment70 = _.Appointment) === null || _$Appointment70 === void 0 ? void 0 : (_$Appointment70$Perso = _$Appointment70.PersonID) === null || _$Appointment70$Perso === void 0 ? void 0 : (_$Appointment70$Perso2 = _$Appointment70$Perso[0]) === null || _$Appointment70$Perso2 === void 0 ? void 0 : _$Appointment70$Perso2.birthDay),
|
|
39407
|
+
mrn: (_$Appointment71 = _.Appointment) === null || _$Appointment71 === void 0 ? void 0 : (_$Appointment71$Perso = _$Appointment71.PersonID) === null || _$Appointment71$Perso === void 0 ? void 0 : (_$Appointment71$Perso2 = _$Appointment71$Perso[0]) === null || _$Appointment71$Perso2 === void 0 ? void 0 : (_$Appointment71$Perso3 = _$Appointment71$Perso2.MRN) === null || _$Appointment71$Perso3 === void 0 ? void 0 : _$Appointment71$Perso3[0],
|
|
39408
|
+
genderData: "M",
|
|
39409
|
+
contact: "9785487478"
|
|
39410
|
+
}),
|
|
39411
|
+
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
39412
|
+
// age: _?.patient_id?.[0]?.age,
|
|
39413
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment72 = _.Appointment) === null || _$Appointment72 === void 0 ? void 0 : _$Appointment72.appno) || "",
|
|
39414
|
+
date: JSON.stringify({
|
|
39415
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$Appointment73 = _.Appointment) === null || _$Appointment73 === void 0 ? void 0 : _$Appointment73.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment74 = _.Appointment) === null || _$Appointment74 === void 0 ? void 0 : _$Appointment74.start, "DD MMM,YYYY") : "",
|
|
39416
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$Appointment75 = _.Appointment) === null || _$Appointment75 === void 0 ? void 0 : _$Appointment75.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment76 = _.Appointment) === null || _$Appointment76 === void 0 ? void 0 : _$Appointment76.start, "hh:mm A") : ""
|
|
39417
|
+
}),
|
|
39418
|
+
visitType: (_$Appointment$appoint3 = _ === null || _ === void 0 ? void 0 : (_$Appointment77 = _.Appointment) === null || _$Appointment77 === void 0 ? void 0 : _$Appointment77.appointmentType) !== null && _$Appointment$appoint3 !== void 0 ? _$Appointment$appoint3 : "",
|
|
39419
|
+
speciality: JSON.stringify({
|
|
39420
|
+
speciality: (_$Appointment$Special2 = _ === null || _ === void 0 ? void 0 : (_$Appointment78 = _.Appointment) === null || _$Appointment78 === void 0 ? void 0 : (_$Appointment78$Speci = _$Appointment78.SpecialtyID) === null || _$Appointment78$Speci === void 0 ? void 0 : _$Appointment78$Speci.map(function (spl) {
|
|
39421
|
+
var _spl$coding7, _spl$coding7$;
|
|
39422
|
+
|
|
39423
|
+
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;
|
|
39424
|
+
}).join(", ")) !== null && _$Appointment$Special2 !== void 0 ? _$Appointment$Special2 : "",
|
|
39425
|
+
clinic: (_$Appointment$orgid$n2 = _ === null || _ === void 0 ? void 0 : (_$Appointment79 = _.Appointment) === null || _$Appointment79 === void 0 ? void 0 : (_$Appointment79$orgid = _$Appointment79.orgid) === null || _$Appointment79$orgid === void 0 ? void 0 : _$Appointment79$orgid.name) !== null && _$Appointment$orgid$n2 !== void 0 ? _$Appointment$orgid$n2 : ""
|
|
39426
|
+
}),
|
|
39427
|
+
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) || "",
|
|
39428
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment80 = _.Appointment) === null || _$Appointment80 === void 0 ? void 0 : _$Appointment80.appstatus) || "",
|
|
38997
39429
|
"View Patient": true,
|
|
38998
|
-
Attend: true
|
|
39430
|
+
Attend: true,
|
|
39431
|
+
action: true,
|
|
39432
|
+
type: "OP" // appNo: _?.id ?? '',
|
|
39433
|
+
// // data: _,
|
|
39434
|
+
// enId: _.id,
|
|
39435
|
+
// age: getAge(_?.PersonID?.[0]?.birthDay),
|
|
39436
|
+
// // gender: _?.PersonID?.[0]?.gender,
|
|
39437
|
+
// contact: _?.PersonID?.[0]?.telecom?.[0]?.value ?? "",
|
|
39438
|
+
// pId : _?.patient_id?.id,
|
|
39439
|
+
|
|
38999
39440
|
};
|
|
39000
39441
|
}) : [];
|
|
39001
39442
|
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39040,25 +39481,58 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
|
|
|
39040
39481
|
case 5:
|
|
39041
39482
|
data = _context14.sent;
|
|
39042
39483
|
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 (_) {
|
|
39043
|
-
var _$
|
|
39484
|
+
var _$appointmentId51, _$appointmentId51$, _$appointmentId51$$Pe, _$appointmentId51$$Pe2, _$appointmentId51$$Pe3, _$appointmentId51$$Pe4, _$appointmentId52, _$appointmentId52$, _$appointmentId52$$Pe, _$appointmentId52$$Pe2, _$appointmentId52$$Pe3, _$appointmentId52$$Pe4, _$patient_id16, _$patient_id16$, _$patient_id16$$name, _$appointmentId53, _$appointmentId53$, _$appointmentId53$$Pe, _$appointmentId53$$Pe2, _$patient_id17, _$patient_id17$, _$appointmentId$0$Per6, _$appointmentId54, _$appointmentId54$, _$appointmentId54$$Pe, _$appointmentId54$$Pe2, _$patient_id$0$teleco6, _$patient_id18, _$patient_id18$, _$patient_id18$$telec, _$patient_id18$$telec2, _$appointmentId55, _$appointmentId55$, _$appointmentId56, _$appointmentId56$, _$appointmentId57, _$appointmentId57$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$visit_type6, _$appointmentId60, _$appointmentId60$, _$appointmentId60$$Sp, _$practitioner_detail15, _$practitioner_detail16, _$status6;
|
|
39044
39485
|
|
|
39045
39486
|
return {
|
|
39046
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
39047
|
-
name: makeName(
|
|
39048
|
-
mrn:
|
|
39049
|
-
refNo:
|
|
39050
|
-
date:
|
|
39051
|
-
|
|
39052
|
-
|
|
39053
|
-
|
|
39054
|
-
|
|
39487
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : (_$appointmentId51$$Pe = _$appointmentId51$.PersonID) === null || _$appointmentId51$$Pe === void 0 ? void 0 : (_$appointmentId51$$Pe2 = _$appointmentId51$$Pe[0]) === null || _$appointmentId51$$Pe2 === void 0 ? void 0 : (_$appointmentId51$$Pe3 = _$appointmentId51$$Pe2.photo) === null || _$appointmentId51$$Pe3 === void 0 ? void 0 : (_$appointmentId51$$Pe4 = _$appointmentId51$$Pe3[0]) === null || _$appointmentId51$$Pe4 === void 0 ? void 0 : _$appointmentId51$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : (_$appointmentId52$$Pe = _$appointmentId52$.PersonID) === null || _$appointmentId52$$Pe === void 0 ? void 0 : (_$appointmentId52$$Pe2 = _$appointmentId52$$Pe[0]) === null || _$appointmentId52$$Pe2 === void 0 ? void 0 : (_$appointmentId52$$Pe3 = _$appointmentId52$$Pe2.photo) === null || _$appointmentId52$$Pe3 === void 0 ? void 0 : (_$appointmentId52$$Pe4 = _$appointmentId52$$Pe3[0]) === null || _$appointmentId52$$Pe4 === void 0 ? void 0 : _$appointmentId52$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39488
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39489
|
+
// mrn: _?.patient_id?.[0]?.MRN || "",
|
|
39490
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39491
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39492
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39493
|
+
// : "",
|
|
39494
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39495
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39496
|
+
// : "",
|
|
39497
|
+
// visitType: _?.visit_type ?? "",
|
|
39498
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39499
|
+
// return spl?.coding?.[0]?.display;
|
|
39500
|
+
// }).join(", "),
|
|
39501
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39502
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39503
|
+
// "View Patient": true,
|
|
39504
|
+
// Attend: true,
|
|
39505
|
+
// type: "OP",
|
|
39506
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39507
|
+
// data: _,
|
|
39508
|
+
// enId: _.id,
|
|
39509
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39510
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39511
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39512
|
+
// pId: _?.patient_id?.id,
|
|
39513
|
+
name: JSON.stringify({
|
|
39514
|
+
name: makeName((_ === 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$$name = _$patient_id16$.name) === null || _$patient_id16$$name === void 0 ? void 0 : _$patient_id16$$name[0]) || {}),
|
|
39515
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId53 = _.appointmentId) === null || _$appointmentId53 === void 0 ? void 0 : (_$appointmentId53$ = _$appointmentId53[0]) === null || _$appointmentId53$ === void 0 ? void 0 : (_$appointmentId53$$Pe = _$appointmentId53$.PersonID) === null || _$appointmentId53$$Pe === void 0 ? void 0 : (_$appointmentId53$$Pe2 = _$appointmentId53$$Pe[0]) === null || _$appointmentId53$$Pe2 === void 0 ? void 0 : _$appointmentId53$$Pe2.birthDay),
|
|
39516
|
+
mrn: (_ === 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$.MRN) || "",
|
|
39517
|
+
gender: (_$appointmentId$0$Per6 = _ === 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$$Pe2.gender) !== null && _$appointmentId$0$Per6 !== void 0 ? _$appointmentId$0$Per6 : "",
|
|
39518
|
+
contact: (_$patient_id$0$teleco6 = _ === 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$$telec = _$patient_id18$.telecom) === null || _$patient_id18$$telec === void 0 ? void 0 : (_$patient_id18$$telec2 = _$patient_id18$$telec[0]) === null || _$patient_id18$$telec2 === void 0 ? void 0 : _$patient_id18$$telec2.value) !== null && _$patient_id$0$teleco6 !== void 0 ? _$patient_id$0$teleco6 : ""
|
|
39519
|
+
}),
|
|
39520
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : _$appointmentId55$.appno) || "",
|
|
39521
|
+
date: JSON.stringify({
|
|
39522
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : _$appointmentId56$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : _$appointmentId57$.start, "DD MMM,YYYY") : "",
|
|
39523
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId58 = _.appointmentId) === null || _$appointmentId58 === void 0 ? void 0 : (_$appointmentId58$ = _$appointmentId58[0]) === null || _$appointmentId58$ === void 0 ? void 0 : _$appointmentId58$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId59 = _.appointmentId) === null || _$appointmentId59 === void 0 ? void 0 : (_$appointmentId59$ = _$appointmentId59[0]) === null || _$appointmentId59$ === void 0 ? void 0 : _$appointmentId59$.start, "hh:mm A") : ""
|
|
39524
|
+
}),
|
|
39525
|
+
visitType: (_$visit_type6 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type6 !== void 0 ? _$visit_type6 : "",
|
|
39526
|
+
speciality: JSON.stringify({
|
|
39527
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : (_$appointmentId60$$Sp = _$appointmentId60$.SpecialtyID) === null || _$appointmentId60$$Sp === void 0 ? void 0 : _$appointmentId60$$Sp.map(function (spl) {
|
|
39528
|
+
var _spl$coding8, _spl$coding8$;
|
|
39055
39529
|
|
|
39056
|
-
|
|
39057
|
-
|
|
39058
|
-
|
|
39059
|
-
|
|
39060
|
-
|
|
39061
|
-
|
|
39530
|
+
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;
|
|
39531
|
+
}).join(", "),
|
|
39532
|
+
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) || ""
|
|
39533
|
+
}),
|
|
39534
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display) || "",
|
|
39535
|
+
action: true
|
|
39062
39536
|
};
|
|
39063
39537
|
}) : [];
|
|
39064
39538
|
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39103,25 +39577,58 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
|
|
|
39103
39577
|
case 5:
|
|
39104
39578
|
data = _context15.sent;
|
|
39105
39579
|
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 (_) {
|
|
39106
|
-
var _$
|
|
39580
|
+
var _$appointmentId61, _$appointmentId61$, _$appointmentId61$$Pe, _$appointmentId61$$Pe2, _$appointmentId61$$Pe3, _$appointmentId61$$Pe4, _$appointmentId62, _$appointmentId62$, _$appointmentId62$$Pe, _$appointmentId62$$Pe2, _$appointmentId62$$Pe3, _$appointmentId62$$Pe4, _$patient_id19, _$patient_id19$, _$patient_id19$$name, _$appointmentId63, _$appointmentId63$, _$appointmentId63$$Pe, _$appointmentId63$$Pe2, _$patient_id20, _$patient_id20$, _$appointmentId$0$Per7, _$appointmentId64, _$appointmentId64$, _$appointmentId64$$Pe, _$appointmentId64$$Pe2, _$patient_id$0$teleco7, _$patient_id21, _$patient_id21$, _$patient_id21$$telec, _$patient_id21$$telec2, _$appointmentId65, _$appointmentId65$, _$appointmentId66, _$appointmentId66$, _$appointmentId67, _$appointmentId67$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$visit_type7, _$appointmentId70, _$appointmentId70$, _$appointmentId70$$Sp, _$practitioner_detail17, _$practitioner_detail18, _$status7;
|
|
39107
39581
|
|
|
39108
39582
|
return {
|
|
39109
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
39110
|
-
name: makeName(
|
|
39111
|
-
mrn:
|
|
39112
|
-
refNo:
|
|
39113
|
-
date:
|
|
39114
|
-
|
|
39115
|
-
|
|
39116
|
-
|
|
39117
|
-
|
|
39583
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : (_$appointmentId61$$Pe = _$appointmentId61$.PersonID) === null || _$appointmentId61$$Pe === void 0 ? void 0 : (_$appointmentId61$$Pe2 = _$appointmentId61$$Pe[0]) === null || _$appointmentId61$$Pe2 === void 0 ? void 0 : (_$appointmentId61$$Pe3 = _$appointmentId61$$Pe2.photo) === null || _$appointmentId61$$Pe3 === void 0 ? void 0 : (_$appointmentId61$$Pe4 = _$appointmentId61$$Pe3[0]) === null || _$appointmentId61$$Pe4 === void 0 ? void 0 : _$appointmentId61$$Pe4.fileid) ? getImgUrl(_ === 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) === null || _$appointmentId62$$Pe3 === void 0 ? void 0 : (_$appointmentId62$$Pe4 = _$appointmentId62$$Pe3[0]) === null || _$appointmentId62$$Pe4 === void 0 ? void 0 : _$appointmentId62$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39584
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39585
|
+
// mrn: _?.patient_id?.[0]?.MRN || "",
|
|
39586
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39587
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39588
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39589
|
+
// : "",
|
|
39590
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39591
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39592
|
+
// : "",
|
|
39593
|
+
// visitType: _?.visit_type ?? "",
|
|
39594
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39595
|
+
// return spl?.coding?.[0]?.display;
|
|
39596
|
+
// }).join(", "),
|
|
39597
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39598
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39599
|
+
// "View Patient": true,
|
|
39600
|
+
// Attend: true,
|
|
39601
|
+
// type: "OP",
|
|
39602
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39603
|
+
// data: _,
|
|
39604
|
+
// enId: _.id,
|
|
39605
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39606
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39607
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39608
|
+
// pId: _?.patient_id?.id,
|
|
39609
|
+
name: JSON.stringify({
|
|
39610
|
+
name: makeName((_ === 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$$name = _$patient_id19$.name) === null || _$patient_id19$$name === void 0 ? void 0 : _$patient_id19$$name[0]) || {}),
|
|
39611
|
+
age: getAge(_ === 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$$Pe2.birthDay),
|
|
39612
|
+
mrn: (_ === 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$.MRN) || "",
|
|
39613
|
+
gender: (_$appointmentId$0$Per7 = _ === 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$$Pe2.gender) !== null && _$appointmentId$0$Per7 !== void 0 ? _$appointmentId$0$Per7 : "",
|
|
39614
|
+
contact: (_$patient_id$0$teleco7 = _ === 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$$telec = _$patient_id21$.telecom) === null || _$patient_id21$$telec === void 0 ? void 0 : (_$patient_id21$$telec2 = _$patient_id21$$telec[0]) === null || _$patient_id21$$telec2 === void 0 ? void 0 : _$patient_id21$$telec2.value) !== null && _$patient_id$0$teleco7 !== void 0 ? _$patient_id$0$teleco7 : ""
|
|
39615
|
+
}),
|
|
39616
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : _$appointmentId65$.appno) || "",
|
|
39617
|
+
date: JSON.stringify({
|
|
39618
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId66 = _.appointmentId) === null || _$appointmentId66 === void 0 ? void 0 : (_$appointmentId66$ = _$appointmentId66[0]) === null || _$appointmentId66$ === void 0 ? void 0 : _$appointmentId66$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId67 = _.appointmentId) === null || _$appointmentId67 === void 0 ? void 0 : (_$appointmentId67$ = _$appointmentId67[0]) === null || _$appointmentId67$ === void 0 ? void 0 : _$appointmentId67$.start, "DD MMM,YYYY") : "",
|
|
39619
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId68 = _.appointmentId) === null || _$appointmentId68 === void 0 ? void 0 : (_$appointmentId68$ = _$appointmentId68[0]) === null || _$appointmentId68$ === void 0 ? void 0 : _$appointmentId68$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId69 = _.appointmentId) === null || _$appointmentId69 === void 0 ? void 0 : (_$appointmentId69$ = _$appointmentId69[0]) === null || _$appointmentId69$ === void 0 ? void 0 : _$appointmentId69$.start, "hh:mm A") : ""
|
|
39620
|
+
}),
|
|
39621
|
+
visitType: (_$visit_type7 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type7 !== void 0 ? _$visit_type7 : "",
|
|
39622
|
+
speciality: JSON.stringify({
|
|
39623
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId70 = _.appointmentId) === null || _$appointmentId70 === void 0 ? void 0 : (_$appointmentId70$ = _$appointmentId70[0]) === null || _$appointmentId70$ === void 0 ? void 0 : (_$appointmentId70$$Sp = _$appointmentId70$.SpecialtyID) === null || _$appointmentId70$$Sp === void 0 ? void 0 : _$appointmentId70$$Sp.map(function (spl) {
|
|
39624
|
+
var _spl$coding9, _spl$coding9$;
|
|
39118
39625
|
|
|
39119
|
-
|
|
39120
|
-
|
|
39121
|
-
|
|
39122
|
-
|
|
39123
|
-
|
|
39124
|
-
|
|
39626
|
+
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;
|
|
39627
|
+
}).join(", "),
|
|
39628
|
+
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) || ""
|
|
39629
|
+
}),
|
|
39630
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display) || "",
|
|
39631
|
+
action: true
|
|
39125
39632
|
};
|
|
39126
39633
|
}) : [];
|
|
39127
39634
|
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39166,25 +39673,58 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
|
|
|
39166
39673
|
case 5:
|
|
39167
39674
|
data = _context16.sent;
|
|
39168
39675
|
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 (_) {
|
|
39169
|
-
var _$appointmentId72, _$appointmentId72$, _$appointmentId72$$Pe, _$appointmentId72$$Pe2, _$appointmentId72$$Pe3, _$appointmentId72$$Pe4, _$appointmentId73, _$appointmentId73$, _$appointmentId73$$Pe, _$appointmentId73$$Pe2, _$
|
|
39676
|
+
var _$appointmentId71, _$appointmentId71$, _$appointmentId71$$Pe, _$appointmentId71$$Pe2, _$appointmentId71$$Pe3, _$appointmentId71$$Pe4, _$appointmentId72, _$appointmentId72$, _$appointmentId72$$Pe, _$appointmentId72$$Pe2, _$appointmentId72$$Pe3, _$appointmentId72$$Pe4, _$patient_id22, _$patient_id22$, _$patient_id22$$name, _$appointmentId73, _$appointmentId73$, _$appointmentId73$$Pe, _$appointmentId73$$Pe2, _$patient_id23, _$patient_id23$, _$appointmentId$0$Per8, _$appointmentId74, _$appointmentId74$, _$appointmentId74$$Pe, _$appointmentId74$$Pe2, _$patient_id$0$teleco8, _$patient_id24, _$patient_id24$, _$patient_id24$$telec, _$patient_id24$$telec2, _$appointmentId75, _$appointmentId75$, _$appointmentId76, _$appointmentId76$, _$appointmentId77, _$appointmentId77$, _$appointmentId78, _$appointmentId78$, _$appointmentId79, _$appointmentId79$, _$visit_type8, _$appointmentId80, _$appointmentId80$, _$appointmentId80$$Sp, _$practitioner_detail19, _$practitioner_detail20, _$status8;
|
|
39170
39677
|
|
|
39171
39678
|
return {
|
|
39172
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
39173
|
-
name: makeName(
|
|
39174
|
-
mrn:
|
|
39175
|
-
refNo:
|
|
39176
|
-
date:
|
|
39177
|
-
|
|
39178
|
-
|
|
39179
|
-
|
|
39180
|
-
|
|
39679
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId71 = _.appointmentId) === null || _$appointmentId71 === void 0 ? void 0 : (_$appointmentId71$ = _$appointmentId71[0]) === null || _$appointmentId71$ === void 0 ? void 0 : (_$appointmentId71$$Pe = _$appointmentId71$.PersonID) === null || _$appointmentId71$$Pe === void 0 ? void 0 : (_$appointmentId71$$Pe2 = _$appointmentId71$$Pe[0]) === null || _$appointmentId71$$Pe2 === void 0 ? void 0 : (_$appointmentId71$$Pe3 = _$appointmentId71$$Pe2.photo) === null || _$appointmentId71$$Pe3 === void 0 ? void 0 : (_$appointmentId71$$Pe4 = _$appointmentId71$$Pe3[0]) === null || _$appointmentId71$$Pe4 === void 0 ? void 0 : _$appointmentId71$$Pe4.fileid) ? getImgUrl(_ === 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) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39680
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39681
|
+
// mrn: _?.patient_id?.[0]?.MRN || "",
|
|
39682
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39683
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39684
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39685
|
+
// : "",
|
|
39686
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39687
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39688
|
+
// : "",
|
|
39689
|
+
// visitType: _?.visit_type ?? "",
|
|
39690
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39691
|
+
// return spl?.coding?.[0]?.display;
|
|
39692
|
+
// }).join(", "),
|
|
39693
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39694
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39695
|
+
// "View Patient": true,
|
|
39696
|
+
// Attend: true,
|
|
39697
|
+
// type: "OP",
|
|
39698
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39699
|
+
// data: _,
|
|
39700
|
+
// enId: _.id,
|
|
39701
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39702
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39703
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39704
|
+
// pId: _?.patient_id?.id,
|
|
39705
|
+
name: JSON.stringify({
|
|
39706
|
+
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]) || {}),
|
|
39707
|
+
age: getAge(_ === 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$$Pe2.birthDay),
|
|
39708
|
+
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) || "",
|
|
39709
|
+
gender: (_$appointmentId$0$Per8 = _ === null || _ === void 0 ? void 0 : (_$appointmentId74 = _.appointmentId) === null || _$appointmentId74 === void 0 ? void 0 : (_$appointmentId74$ = _$appointmentId74[0]) === null || _$appointmentId74$ === void 0 ? void 0 : (_$appointmentId74$$Pe = _$appointmentId74$.PersonID) === null || _$appointmentId74$$Pe === void 0 ? void 0 : (_$appointmentId74$$Pe2 = _$appointmentId74$$Pe[0]) === null || _$appointmentId74$$Pe2 === void 0 ? void 0 : _$appointmentId74$$Pe2.gender) !== null && _$appointmentId$0$Per8 !== void 0 ? _$appointmentId$0$Per8 : "",
|
|
39710
|
+
contact: (_$patient_id$0$teleco8 = _ === 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) !== null && _$patient_id$0$teleco8 !== void 0 ? _$patient_id$0$teleco8 : ""
|
|
39711
|
+
}),
|
|
39712
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId75 = _.appointmentId) === null || _$appointmentId75 === void 0 ? void 0 : (_$appointmentId75$ = _$appointmentId75[0]) === null || _$appointmentId75$ === void 0 ? void 0 : _$appointmentId75$.appno) || "",
|
|
39713
|
+
date: JSON.stringify({
|
|
39714
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId76 = _.appointmentId) === null || _$appointmentId76 === void 0 ? void 0 : (_$appointmentId76$ = _$appointmentId76[0]) === null || _$appointmentId76$ === void 0 ? void 0 : _$appointmentId76$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId77 = _.appointmentId) === null || _$appointmentId77 === void 0 ? void 0 : (_$appointmentId77$ = _$appointmentId77[0]) === null || _$appointmentId77$ === void 0 ? void 0 : _$appointmentId77$.start, "DD MMM,YYYY") : "",
|
|
39715
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId78 = _.appointmentId) === null || _$appointmentId78 === void 0 ? void 0 : (_$appointmentId78$ = _$appointmentId78[0]) === null || _$appointmentId78$ === void 0 ? void 0 : _$appointmentId78$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId79 = _.appointmentId) === null || _$appointmentId79 === void 0 ? void 0 : (_$appointmentId79$ = _$appointmentId79[0]) === null || _$appointmentId79$ === void 0 ? void 0 : _$appointmentId79$.start, "hh:mm A") : ""
|
|
39716
|
+
}),
|
|
39717
|
+
visitType: (_$visit_type8 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type8 !== void 0 ? _$visit_type8 : "",
|
|
39718
|
+
speciality: JSON.stringify({
|
|
39719
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId80 = _.appointmentId) === null || _$appointmentId80 === void 0 ? void 0 : (_$appointmentId80$ = _$appointmentId80[0]) === null || _$appointmentId80$ === void 0 ? void 0 : (_$appointmentId80$$Sp = _$appointmentId80$.SpecialtyID) === null || _$appointmentId80$$Sp === void 0 ? void 0 : _$appointmentId80$$Sp.map(function (spl) {
|
|
39720
|
+
var _spl$coding10, _spl$coding10$;
|
|
39181
39721
|
|
|
39182
|
-
|
|
39183
|
-
|
|
39184
|
-
|
|
39185
|
-
|
|
39186
|
-
|
|
39187
|
-
|
|
39722
|
+
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;
|
|
39723
|
+
}).join(", "),
|
|
39724
|
+
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) || ""
|
|
39725
|
+
}),
|
|
39726
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display) || "",
|
|
39727
|
+
action: true
|
|
39188
39728
|
};
|
|
39189
39729
|
}) : [];
|
|
39190
39730
|
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39229,25 +39769,58 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
|
|
|
39229
39769
|
case 5:
|
|
39230
39770
|
data = _context17.sent;
|
|
39231
39771
|
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 (_) {
|
|
39232
|
-
var _$
|
|
39772
|
+
var _$appointmentId81, _$appointmentId81$, _$appointmentId81$$Pe, _$appointmentId81$$Pe2, _$appointmentId81$$Pe3, _$appointmentId81$$Pe4, _$appointmentId82, _$appointmentId82$, _$appointmentId82$$Pe, _$appointmentId82$$Pe2, _$appointmentId82$$Pe3, _$appointmentId82$$Pe4, _$patient_id25, _$patient_id25$, _$patient_id25$$name, _$appointmentId83, _$appointmentId83$, _$appointmentId83$$Pe, _$appointmentId83$$Pe2, _$patient_id26, _$patient_id26$, _$appointmentId$0$Per9, _$appointmentId84, _$appointmentId84$, _$appointmentId84$$Pe, _$appointmentId84$$Pe2, _$patient_id$0$teleco9, _$patient_id27, _$patient_id27$, _$patient_id27$$telec, _$patient_id27$$telec2, _$appointmentId85, _$appointmentId85$, _$appointmentId86, _$appointmentId86$, _$appointmentId87, _$appointmentId87$, _$appointmentId88, _$appointmentId88$, _$appointmentId89, _$appointmentId89$, _$visit_type9, _$appointmentId90, _$appointmentId90$, _$appointmentId90$$Sp, _$practitioner_detail21, _$practitioner_detail22, _$status9;
|
|
39233
39773
|
|
|
39234
39774
|
return {
|
|
39235
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
39236
|
-
name: makeName(
|
|
39237
|
-
mrn:
|
|
39238
|
-
refNo:
|
|
39239
|
-
date:
|
|
39240
|
-
|
|
39241
|
-
|
|
39242
|
-
|
|
39243
|
-
|
|
39775
|
+
img: (_ === 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) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId82 = _.appointmentId) === null || _$appointmentId82 === void 0 ? void 0 : (_$appointmentId82$ = _$appointmentId82[0]) === null || _$appointmentId82$ === void 0 ? void 0 : (_$appointmentId82$$Pe = _$appointmentId82$.PersonID) === null || _$appointmentId82$$Pe === void 0 ? void 0 : (_$appointmentId82$$Pe2 = _$appointmentId82$$Pe[0]) === null || _$appointmentId82$$Pe2 === void 0 ? void 0 : (_$appointmentId82$$Pe3 = _$appointmentId82$$Pe2.photo) === null || _$appointmentId82$$Pe3 === void 0 ? void 0 : (_$appointmentId82$$Pe4 = _$appointmentId82$$Pe3[0]) === null || _$appointmentId82$$Pe4 === void 0 ? void 0 : _$appointmentId82$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39776
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39777
|
+
// mrn: _?.patient_id?.[0]?.MRN || "",
|
|
39778
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39779
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39780
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39781
|
+
// : "",
|
|
39782
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39783
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39784
|
+
// : "",
|
|
39785
|
+
// visitType: _?.visit_type ?? "",
|
|
39786
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39787
|
+
// return spl?.coding?.[0]?.display;
|
|
39788
|
+
// }).join(", "),
|
|
39789
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39790
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39791
|
+
// "View Patient": true,
|
|
39792
|
+
// Attend: true,
|
|
39793
|
+
// type: "OP",
|
|
39794
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39795
|
+
// data: _,
|
|
39796
|
+
// enId: _.id,
|
|
39797
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39798
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39799
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39800
|
+
// pId: _?.patient_id?.id,
|
|
39801
|
+
name: JSON.stringify({
|
|
39802
|
+
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]) || {}),
|
|
39803
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId83 = _.appointmentId) === null || _$appointmentId83 === void 0 ? void 0 : (_$appointmentId83$ = _$appointmentId83[0]) === null || _$appointmentId83$ === void 0 ? void 0 : (_$appointmentId83$$Pe = _$appointmentId83$.PersonID) === null || _$appointmentId83$$Pe === void 0 ? void 0 : (_$appointmentId83$$Pe2 = _$appointmentId83$$Pe[0]) === null || _$appointmentId83$$Pe2 === void 0 ? void 0 : _$appointmentId83$$Pe2.birthDay),
|
|
39804
|
+
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) || "",
|
|
39805
|
+
gender: (_$appointmentId$0$Per9 = _ === null || _ === void 0 ? void 0 : (_$appointmentId84 = _.appointmentId) === null || _$appointmentId84 === void 0 ? void 0 : (_$appointmentId84$ = _$appointmentId84[0]) === null || _$appointmentId84$ === void 0 ? void 0 : (_$appointmentId84$$Pe = _$appointmentId84$.PersonID) === null || _$appointmentId84$$Pe === void 0 ? void 0 : (_$appointmentId84$$Pe2 = _$appointmentId84$$Pe[0]) === null || _$appointmentId84$$Pe2 === void 0 ? void 0 : _$appointmentId84$$Pe2.gender) !== null && _$appointmentId$0$Per9 !== void 0 ? _$appointmentId$0$Per9 : "",
|
|
39806
|
+
contact: (_$patient_id$0$teleco9 = _ === 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$$telec = _$patient_id27$.telecom) === null || _$patient_id27$$telec === void 0 ? void 0 : (_$patient_id27$$telec2 = _$patient_id27$$telec[0]) === null || _$patient_id27$$telec2 === void 0 ? void 0 : _$patient_id27$$telec2.value) !== null && _$patient_id$0$teleco9 !== void 0 ? _$patient_id$0$teleco9 : ""
|
|
39807
|
+
}),
|
|
39808
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId85 = _.appointmentId) === null || _$appointmentId85 === void 0 ? void 0 : (_$appointmentId85$ = _$appointmentId85[0]) === null || _$appointmentId85$ === void 0 ? void 0 : _$appointmentId85$.appno) || "",
|
|
39809
|
+
date: JSON.stringify({
|
|
39810
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId86 = _.appointmentId) === null || _$appointmentId86 === void 0 ? void 0 : (_$appointmentId86$ = _$appointmentId86[0]) === null || _$appointmentId86$ === void 0 ? void 0 : _$appointmentId86$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId87 = _.appointmentId) === null || _$appointmentId87 === void 0 ? void 0 : (_$appointmentId87$ = _$appointmentId87[0]) === null || _$appointmentId87$ === void 0 ? void 0 : _$appointmentId87$.start, "DD MMM,YYYY") : "",
|
|
39811
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId88 = _.appointmentId) === null || _$appointmentId88 === void 0 ? void 0 : (_$appointmentId88$ = _$appointmentId88[0]) === null || _$appointmentId88$ === void 0 ? void 0 : _$appointmentId88$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId89 = _.appointmentId) === null || _$appointmentId89 === void 0 ? void 0 : (_$appointmentId89$ = _$appointmentId89[0]) === null || _$appointmentId89$ === void 0 ? void 0 : _$appointmentId89$.start, "hh:mm A") : ""
|
|
39812
|
+
}),
|
|
39813
|
+
visitType: (_$visit_type9 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type9 !== void 0 ? _$visit_type9 : "",
|
|
39814
|
+
speciality: JSON.stringify({
|
|
39815
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId90 = _.appointmentId) === null || _$appointmentId90 === void 0 ? void 0 : (_$appointmentId90$ = _$appointmentId90[0]) === null || _$appointmentId90$ === void 0 ? void 0 : (_$appointmentId90$$Sp = _$appointmentId90$.SpecialtyID) === null || _$appointmentId90$$Sp === void 0 ? void 0 : _$appointmentId90$$Sp.map(function (spl) {
|
|
39816
|
+
var _spl$coding11, _spl$coding11$;
|
|
39244
39817
|
|
|
39245
|
-
|
|
39246
|
-
|
|
39247
|
-
|
|
39248
|
-
|
|
39249
|
-
|
|
39250
|
-
|
|
39818
|
+
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;
|
|
39819
|
+
}).join(", "),
|
|
39820
|
+
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) || ""
|
|
39821
|
+
}),
|
|
39822
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display) || "",
|
|
39823
|
+
action: true
|
|
39251
39824
|
};
|
|
39252
39825
|
}) : [];
|
|
39253
39826
|
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -39292,25 +39865,58 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
|
|
|
39292
39865
|
case 5:
|
|
39293
39866
|
data = _context18.sent;
|
|
39294
39867
|
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 (_) {
|
|
39295
|
-
var _$
|
|
39868
|
+
var _$appointmentId91, _$appointmentId91$, _$appointmentId91$$Pe, _$appointmentId91$$Pe2, _$appointmentId91$$Pe3, _$appointmentId91$$Pe4, _$appointmentId92, _$appointmentId92$, _$appointmentId92$$Pe, _$appointmentId92$$Pe2, _$appointmentId92$$Pe3, _$appointmentId92$$Pe4, _$patient_id28, _$patient_id28$, _$patient_id28$$name, _$appointmentId93, _$appointmentId93$, _$appointmentId93$$Pe, _$appointmentId93$$Pe2, _$patient_id29, _$patient_id29$, _$appointmentId$0$Per10, _$appointmentId94, _$appointmentId94$, _$appointmentId94$$Pe, _$appointmentId94$$Pe2, _$patient_id$0$teleco10, _$patient_id30, _$patient_id30$, _$patient_id30$$telec, _$patient_id30$$telec2, _$appointmentId95, _$appointmentId95$, _$appointmentId96, _$appointmentId96$, _$appointmentId97, _$appointmentId97$, _$appointmentId98, _$appointmentId98$, _$appointmentId99, _$appointmentId99$, _$visit_type10, _$appointmentId100, _$appointmentId100$, _$appointmentId100$$S, _$practitioner_detail23, _$practitioner_detail24, _$status10;
|
|
39296
39869
|
|
|
39297
39870
|
return {
|
|
39298
|
-
img: (_ === null || _ === void 0 ? void 0 : (_$
|
|
39299
|
-
name: makeName(
|
|
39300
|
-
mrn:
|
|
39301
|
-
refNo:
|
|
39302
|
-
date:
|
|
39303
|
-
|
|
39304
|
-
|
|
39305
|
-
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
39309
|
-
|
|
39310
|
-
|
|
39311
|
-
|
|
39312
|
-
|
|
39313
|
-
|
|
39871
|
+
img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId91 = _.appointmentId) === null || _$appointmentId91 === void 0 ? void 0 : (_$appointmentId91$ = _$appointmentId91[0]) === null || _$appointmentId91$ === void 0 ? void 0 : (_$appointmentId91$$Pe = _$appointmentId91$.PersonID) === null || _$appointmentId91$$Pe === void 0 ? void 0 : (_$appointmentId91$$Pe2 = _$appointmentId91$$Pe[0]) === null || _$appointmentId91$$Pe2 === void 0 ? void 0 : (_$appointmentId91$$Pe3 = _$appointmentId91$$Pe2.photo) === null || _$appointmentId91$$Pe3 === void 0 ? void 0 : (_$appointmentId91$$Pe4 = _$appointmentId91$$Pe3[0]) === null || _$appointmentId91$$Pe4 === void 0 ? void 0 : _$appointmentId91$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId92 = _.appointmentId) === null || _$appointmentId92 === void 0 ? void 0 : (_$appointmentId92$ = _$appointmentId92[0]) === null || _$appointmentId92$ === void 0 ? void 0 : (_$appointmentId92$$Pe = _$appointmentId92$.PersonID) === null || _$appointmentId92$$Pe === void 0 ? void 0 : (_$appointmentId92$$Pe2 = _$appointmentId92$$Pe[0]) === null || _$appointmentId92$$Pe2 === void 0 ? void 0 : (_$appointmentId92$$Pe3 = _$appointmentId92$$Pe2.photo) === null || _$appointmentId92$$Pe3 === void 0 ? void 0 : (_$appointmentId92$$Pe4 = _$appointmentId92$$Pe3[0]) === null || _$appointmentId92$$Pe4 === void 0 ? void 0 : _$appointmentId92$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
|
|
39872
|
+
// name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
|
|
39873
|
+
// mrn: _?.patient_id?.[0]?.MRN || "",
|
|
39874
|
+
// refNo: _?.appointmentId?.[0]?.appno || "",
|
|
39875
|
+
// date: _?.appointmentId?.[0]?.start
|
|
39876
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
|
|
39877
|
+
// : "",
|
|
39878
|
+
// time: _?.appointmentId?.[0]?.start
|
|
39879
|
+
// ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
|
|
39880
|
+
// : "",
|
|
39881
|
+
// visitType: _?.visit_type ?? "",
|
|
39882
|
+
// speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
|
|
39883
|
+
// return spl?.coding?.[0]?.display;
|
|
39884
|
+
// }).join(", "),
|
|
39885
|
+
// clinic: _?.practitioner_details?.[0]?.clinic || "",
|
|
39886
|
+
// appointmentStatus: _?.status?.display || "",
|
|
39887
|
+
// "View Patient": true,
|
|
39888
|
+
// Attend: true,
|
|
39889
|
+
// type: "OP",
|
|
39890
|
+
// appNo: _?.appointmentId?.[0]?.id ?? '',
|
|
39891
|
+
// data: _,
|
|
39892
|
+
// enId: _.id,
|
|
39893
|
+
// age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
|
|
39894
|
+
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
|
|
39895
|
+
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
|
|
39896
|
+
// pId: _?.patient_id?.id,
|
|
39897
|
+
name: JSON.stringify({
|
|
39898
|
+
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]) || {}),
|
|
39899
|
+
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId93 = _.appointmentId) === null || _$appointmentId93 === void 0 ? void 0 : (_$appointmentId93$ = _$appointmentId93[0]) === null || _$appointmentId93$ === void 0 ? void 0 : (_$appointmentId93$$Pe = _$appointmentId93$.PersonID) === null || _$appointmentId93$$Pe === void 0 ? void 0 : (_$appointmentId93$$Pe2 = _$appointmentId93$$Pe[0]) === null || _$appointmentId93$$Pe2 === void 0 ? void 0 : _$appointmentId93$$Pe2.birthDay),
|
|
39900
|
+
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) || "",
|
|
39901
|
+
gender: (_$appointmentId$0$Per10 = _ === null || _ === void 0 ? void 0 : (_$appointmentId94 = _.appointmentId) === null || _$appointmentId94 === void 0 ? void 0 : (_$appointmentId94$ = _$appointmentId94[0]) === null || _$appointmentId94$ === void 0 ? void 0 : (_$appointmentId94$$Pe = _$appointmentId94$.PersonID) === null || _$appointmentId94$$Pe === void 0 ? void 0 : (_$appointmentId94$$Pe2 = _$appointmentId94$$Pe[0]) === null || _$appointmentId94$$Pe2 === void 0 ? void 0 : _$appointmentId94$$Pe2.gender) !== null && _$appointmentId$0$Per10 !== void 0 ? _$appointmentId$0$Per10 : "",
|
|
39902
|
+
contact: (_$patient_id$0$teleco10 = _ === 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$$telec = _$patient_id30$.telecom) === null || _$patient_id30$$telec === void 0 ? void 0 : (_$patient_id30$$telec2 = _$patient_id30$$telec[0]) === null || _$patient_id30$$telec2 === void 0 ? void 0 : _$patient_id30$$telec2.value) !== null && _$patient_id$0$teleco10 !== void 0 ? _$patient_id$0$teleco10 : ""
|
|
39903
|
+
}),
|
|
39904
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId95 = _.appointmentId) === null || _$appointmentId95 === void 0 ? void 0 : (_$appointmentId95$ = _$appointmentId95[0]) === null || _$appointmentId95$ === void 0 ? void 0 : _$appointmentId95$.appno) || "",
|
|
39905
|
+
date: JSON.stringify({
|
|
39906
|
+
date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId96 = _.appointmentId) === null || _$appointmentId96 === void 0 ? void 0 : (_$appointmentId96$ = _$appointmentId96[0]) === null || _$appointmentId96$ === void 0 ? void 0 : _$appointmentId96$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId97 = _.appointmentId) === null || _$appointmentId97 === void 0 ? void 0 : (_$appointmentId97$ = _$appointmentId97[0]) === null || _$appointmentId97$ === void 0 ? void 0 : _$appointmentId97$.start, "DD MMM,YYYY") : "",
|
|
39907
|
+
time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId98 = _.appointmentId) === null || _$appointmentId98 === void 0 ? void 0 : (_$appointmentId98$ = _$appointmentId98[0]) === null || _$appointmentId98$ === void 0 ? void 0 : _$appointmentId98$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId99 = _.appointmentId) === null || _$appointmentId99 === void 0 ? void 0 : (_$appointmentId99$ = _$appointmentId99[0]) === null || _$appointmentId99$ === void 0 ? void 0 : _$appointmentId99$.start, "hh:mm A") : ""
|
|
39908
|
+
}),
|
|
39909
|
+
visitType: (_$visit_type10 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type10 !== void 0 ? _$visit_type10 : "",
|
|
39910
|
+
speciality: JSON.stringify({
|
|
39911
|
+
speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId100 = _.appointmentId) === null || _$appointmentId100 === void 0 ? void 0 : (_$appointmentId100$ = _$appointmentId100[0]) === null || _$appointmentId100$ === void 0 ? void 0 : (_$appointmentId100$$S = _$appointmentId100$.SpecialtyID) === null || _$appointmentId100$$S === void 0 ? void 0 : _$appointmentId100$$S.map(function (spl) {
|
|
39912
|
+
var _spl$coding12, _spl$coding12$;
|
|
39913
|
+
|
|
39914
|
+
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;
|
|
39915
|
+
}).join(", "),
|
|
39916
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail23 = _.practitioner_details) === null || _$practitioner_detail23 === void 0 ? void 0 : (_$practitioner_detail24 = _$practitioner_detail23[0]) === null || _$practitioner_detail24 === void 0 ? void 0 : _$practitioner_detail24.clinic) || ""
|
|
39917
|
+
}),
|
|
39918
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status10 = _.status) === null || _$status10 === void 0 ? void 0 : _$status10.display) || "",
|
|
39919
|
+
action: true
|
|
39314
39920
|
};
|
|
39315
39921
|
}) : [];
|
|
39316
39922
|
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -42778,10 +43384,10 @@ var pendingTasksApiActions = {
|
|
|
42778
43384
|
|
|
42779
43385
|
var query = {
|
|
42780
43386
|
getAssignPractitonerList: function getAssignPractitonerList(data) {
|
|
42781
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, "\",\n \"Encounter\": \"Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id &&
|
|
43387
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, "\",\n \"Encounter\": \"Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && Encounter.participant == [] && (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))\"\n },\n \"return_fields\": \"{Appointment:Appointment,Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounter_no'),{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)})}\"\n }");
|
|
42782
43388
|
},
|
|
42783
43389
|
getReAssignPractitonerList: function getReAssignPractitonerList(data) {
|
|
42784
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, "\",\n \"Encounter\": \"Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id &&
|
|
43390
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " \",\n \"Encounter\": \"Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && Encounter.participant != [] && (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))\"\n },\n \"return_fields\": \"{Appointment:Appointment,Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounter_no'),{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)},{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'),{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))}))}))}))})}\"\n }");
|
|
42785
43391
|
},
|
|
42786
43392
|
getClosePractitonerList: function getClosePractitonerList(data) {
|
|
42787
43393
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter,Appointment\",\n \"filter\": {\n \"Encounter\": \"Encounter.activestatus==true && lower(document(Encounter.status).display)=='consultation over'\",\n \"Appointment\": \"Appointment.id in Encounter.appointmentId && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, "\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for nam in HumanNameMaster filter nam._id in pat.name return merge(nam,{use:document(nam.use),suffix:document(nam.suffix),prefix:document(nam.prefix)})),telecom:document(pat.telecom),gender:document(pat.gender)}))},{status:document(Encounter.status)},{appointmentId: merge(Appointment,{practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding))}))})),HealthcareServiceID:(for hs in HealthcareService filter hs.id in Appointment.HealthcareServiceID return hs)})})\"\n }");
|
|
@@ -42814,17 +43420,17 @@ var GET_ASSIGN_PRACTITIONER_LIST = createAsyncThunk("workListApiSlice/getAssignP
|
|
|
42814
43420
|
case 5:
|
|
42815
43421
|
data = _context.sent;
|
|
42816
43422
|
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 (_) {
|
|
42817
|
-
var _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$
|
|
43423
|
+
var _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Encounter3, _$Encounter3$patient_, _$Encounter3$patient_2, _$Encounter4, _$Encounter4$patient_, _$Encounter4$patient_2, _$Encounter4$patient_3, _$Encounter4$patient_4, _$Appointment, _$Appointment2, _$Appointment3, _$Encounter5, _$Encounter6, _$Encounter7, _$Encounter7$status;
|
|
42818
43424
|
|
|
42819
43425
|
return {
|
|
42820
|
-
name: _ === 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 :
|
|
43426
|
+
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]) || {}),
|
|
42821
43427
|
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,
|
|
42822
43428
|
age: _ === null || _ === void 0 ? void 0 : (_$Encounter3 = _.Encounter) === null || _$Encounter3 === void 0 ? void 0 : (_$Encounter3$patient_ = _$Encounter3.patient_id) === null || _$Encounter3$patient_ === void 0 ? void 0 : (_$Encounter3$patient_2 = _$Encounter3$patient_[0]) === null || _$Encounter3$patient_2 === void 0 ? void 0 : _$Encounter3$patient_2.age,
|
|
42823
43429
|
mobileNo: _ === 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,
|
|
42824
43430
|
apptRefNo: _ === null || _ === void 0 ? void 0 : (_$Appointment = _.Appointment) === null || _$Appointment === void 0 ? void 0 : _$Appointment.appno,
|
|
42825
43431
|
// "apptDate&Time":_.Appointment.start,
|
|
42826
43432
|
"apptDate&Time": (_ === null || _ === void 0 ? void 0 : (_$Appointment2 = _.Appointment) === null || _$Appointment2 === void 0 ? void 0 : _$Appointment2.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment3 = _.Appointment) === null || _$Appointment3 === void 0 ? void 0 : _$Appointment3.start, "DD MMM,YYYY hh:mm A") : "",
|
|
42827
|
-
encounterNo: _ === null || _ === void 0 ? void 0 : (_$Encounter5 = _.Encounter) === null || _$Encounter5 === void 0 ? void 0 : _$Encounter5.
|
|
43433
|
+
encounterNo: "EN-".concat(_ === null || _ === void 0 ? void 0 : (_$Encounter5 = _.Encounter) === null || _$Encounter5 === void 0 ? void 0 : _$Encounter5._key),
|
|
42828
43434
|
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter6 = _.Encounter) === null || _$Encounter6 === void 0 ? void 0 : _$Encounter6.visit_type,
|
|
42829
43435
|
status: _ === null || _ === void 0 ? void 0 : (_$Encounter7 = _.Encounter) === null || _$Encounter7 === void 0 ? void 0 : (_$Encounter7$status = _$Encounter7.status) === null || _$Encounter7$status === void 0 ? void 0 : _$Encounter7$status.display,
|
|
42830
43436
|
action: "AssignPractitioner",
|
|
@@ -42874,17 +43480,17 @@ var GET_REASSIGN_PRACTITIONER_LIST = createAsyncThunk("workListApiSlice/getReAss
|
|
|
42874
43480
|
case 5:
|
|
42875
43481
|
data = _context2.sent;
|
|
42876
43482
|
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 (_) {
|
|
42877
|
-
var _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Encounter8$patient_3, _$
|
|
43483
|
+
var _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Encounter8$patient_3, _$Encounter9, _$Encounter9$particip, _$Encounter9$particip2, _$Encounter9$particip3, _$Encounter9$particip4, _$Encounter9$particip5, _$Encounter10, _$Encounter10$patient, _$Encounter10$patient2, _$Encounter11, _$Encounter11$patient, _$Encounter11$patient2, _$Encounter12, _$Encounter12$patient, _$Encounter12$patient2, _$Encounter12$patient3, _$Encounter12$patient4, _$Appointment4, _$Appointment5, _$Appointment6, _$Encounter13, _$Encounter14, _$Encounter15, _$Encounter15$status;
|
|
42878
43484
|
|
|
42879
43485
|
return {
|
|
42880
|
-
name: _ === 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_3 = _$Encounter8$patient_2.name) === null || _$Encounter8$patient_3 === void 0 ? void 0 :
|
|
42881
|
-
assignedPractitioner: _ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$particip = _$Encounter9.participant) === null || _$Encounter9$particip === void 0 ? void 0 : (_$Encounter9$particip2 = _$Encounter9$particip[0]) === null || _$Encounter9$particip2 === void 0 ? void 0 : (_$Encounter9$particip3 = _$Encounter9$particip2.Practitioner_id) === null || _$Encounter9$particip3 === void 0 ? void 0 : (_$Encounter9$particip4 = _$Encounter9$particip3[0]) === null || _$Encounter9$particip4 === void 0 ? void 0 : (_$Encounter9$particip5 = _$Encounter9$particip4.name) === null || _$Encounter9$particip5 === void 0 ? void 0 :
|
|
43486
|
+
name: makeName((_ === 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_3 = _$Encounter8$patient_2.name) === null || _$Encounter8$patient_3 === void 0 ? void 0 : _$Encounter8$patient_3[0]) || {}),
|
|
43487
|
+
assignedPractitioner: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$particip = _$Encounter9.participant) === null || _$Encounter9$particip === void 0 ? void 0 : (_$Encounter9$particip2 = _$Encounter9$particip[0]) === null || _$Encounter9$particip2 === void 0 ? void 0 : (_$Encounter9$particip3 = _$Encounter9$particip2.Practitioner_id) === null || _$Encounter9$particip3 === void 0 ? void 0 : (_$Encounter9$particip4 = _$Encounter9$particip3[0]) === null || _$Encounter9$particip4 === void 0 ? void 0 : (_$Encounter9$particip5 = _$Encounter9$particip4.name) === null || _$Encounter9$particip5 === void 0 ? void 0 : _$Encounter9$particip5[0]) || {}),
|
|
42882
43488
|
mrn: _ === 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$patient2.MRN,
|
|
42883
43489
|
age: _ === null || _ === void 0 ? void 0 : (_$Encounter11 = _.Encounter) === null || _$Encounter11 === void 0 ? void 0 : (_$Encounter11$patient = _$Encounter11.patient_id) === null || _$Encounter11$patient === void 0 ? void 0 : (_$Encounter11$patient2 = _$Encounter11$patient[0]) === null || _$Encounter11$patient2 === void 0 ? void 0 : _$Encounter11$patient2.age,
|
|
42884
43490
|
mobileNo: _ === null || _ === void 0 ? void 0 : (_$Encounter12 = _.Encounter) === null || _$Encounter12 === void 0 ? void 0 : (_$Encounter12$patient = _$Encounter12.patient_id) === null || _$Encounter12$patient === void 0 ? void 0 : (_$Encounter12$patient2 = _$Encounter12$patient[0]) === null || _$Encounter12$patient2 === void 0 ? void 0 : (_$Encounter12$patient3 = _$Encounter12$patient2.telecom) === null || _$Encounter12$patient3 === void 0 ? void 0 : (_$Encounter12$patient4 = _$Encounter12$patient3[0]) === null || _$Encounter12$patient4 === void 0 ? void 0 : _$Encounter12$patient4.value,
|
|
42885
43491
|
apptRefNo: _ === null || _ === void 0 ? void 0 : (_$Appointment4 = _.Appointment) === null || _$Appointment4 === void 0 ? void 0 : _$Appointment4.appno,
|
|
42886
43492
|
"apptDate&Time": (_ === null || _ === void 0 ? void 0 : (_$Appointment5 = _.Appointment) === null || _$Appointment5 === void 0 ? void 0 : _$Appointment5.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment6 = _.Appointment) === null || _$Appointment6 === void 0 ? void 0 : _$Appointment6.start, "DD MMM,YYYY hh:mm A") : "",
|
|
42887
|
-
encounterNo: _ === null || _ === void 0 ? void 0 : (_$Encounter13 = _.Encounter) === null || _$Encounter13 === void 0 ? void 0 : _$Encounter13.
|
|
43493
|
+
encounterNo: "EN-".concat(_ === null || _ === void 0 ? void 0 : (_$Encounter13 = _.Encounter) === null || _$Encounter13 === void 0 ? void 0 : _$Encounter13._key),
|
|
42888
43494
|
visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter14 = _.Encounter) === null || _$Encounter14 === void 0 ? void 0 : _$Encounter14.visit_type,
|
|
42889
43495
|
status: _ === null || _ === void 0 ? void 0 : (_$Encounter15 = _.Encounter) === null || _$Encounter15 === void 0 ? void 0 : (_$Encounter15$status = _$Encounter15.status) === null || _$Encounter15$status === void 0 ? void 0 : _$Encounter15$status.display,
|
|
42890
43496
|
action: "ReassignPractitioner",
|
|
@@ -42934,17 +43540,17 @@ var GET_CLOSE_PRACTITIONER_LIST = createAsyncThunk("workListApiSlice/getClosePra
|
|
|
42934
43540
|
case 5:
|
|
42935
43541
|
data = _context3.sent;
|
|
42936
43542
|
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 (_) {
|
|
42937
|
-
var _$patient_id$0$name$, _$patient_id, _$patient_id$, _$patient_id$$name, _$patient_id$$name$, _$
|
|
43543
|
+
var _$patient_id$0$name$, _$patient_id, _$patient_id$, _$patient_id$$name, _$patient_id$$name$, _$practitioner_detail, _$practitioner_detail2, _$practitioner_detail3, _$patient_id$0$alias, _$patient_id2, _$patient_id2$, _$patient_id$0$age, _$patient_id3, _$patient_id3$, _$patient_id$0$teleco, _$patient_id4, _$patient_id4$, _$patient_id4$$teleco, _$patient_id4$$teleco2, _$appointmentId$appno, _$appointmentId, _$appointmentId2, _$appointmentId3, _ref7, _$visit_type, _$status$display, _$status;
|
|
42938
43544
|
|
|
42939
43545
|
return {
|
|
42940
43546
|
name: (_$patient_id$0$name$ = _ === 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$ = _$patient_id$$name[0]) === null || _$patient_id$$name$ === void 0 ? void 0 : _$patient_id$$name$.given) !== null && _$patient_id$0$name$ !== void 0 ? _$patient_id$0$name$ : "",
|
|
42941
|
-
assignedPractitioner: (_$
|
|
43547
|
+
assignedPractitioner: (_$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.id_name) !== null && _$practitioner_detail !== void 0 ? _$practitioner_detail : "",
|
|
42942
43548
|
mrn: (_$patient_id$0$alias = _ === 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) !== null && _$patient_id$0$alias !== void 0 ? _$patient_id$0$alias : "",
|
|
42943
43549
|
age: (_$patient_id$0$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) !== null && _$patient_id$0$age !== void 0 ? _$patient_id$0$age : "",
|
|
42944
43550
|
mobileNo: (_$patient_id$0$teleco = _ === 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) !== null && _$patient_id$0$teleco !== void 0 ? _$patient_id$0$teleco : "",
|
|
42945
|
-
apptRefNo: (_$appointmentId$appno = _ === null || _ === void 0 ? void 0 : (_$
|
|
42946
|
-
"apptDate&Time": (_ === null || _ === void 0 ? void 0 : (_$
|
|
42947
|
-
encounterNo: (
|
|
43551
|
+
apptRefNo: (_$appointmentId$appno = _ === null || _ === void 0 ? void 0 : (_$appointmentId = _.appointmentId) === null || _$appointmentId === void 0 ? void 0 : _$appointmentId.appno) !== null && _$appointmentId$appno !== void 0 ? _$appointmentId$appno : "",
|
|
43552
|
+
"apptDate&Time": (_ === null || _ === void 0 ? void 0 : (_$appointmentId2 = _.appointmentId) === null || _$appointmentId2 === void 0 ? void 0 : _$appointmentId2.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : _$appointmentId3.start, "DD MMM,YYYY hh:mm A") : "",
|
|
43553
|
+
encounterNo: (_ref7 = "EN-".concat(_ === null || _ === void 0 ? void 0 : _._key)) !== null && _ref7 !== void 0 ? _ref7 : "",
|
|
42948
43554
|
visitType: (_$visit_type = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type !== void 0 ? _$visit_type : "",
|
|
42949
43555
|
status: (_$status$display = _ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display) !== null && _$status$display !== void 0 ? _$status$display : "",
|
|
42950
43556
|
action: "ClosePractitioner",
|