primarycare-binder 1.1.35 → 1.1.39

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.
Files changed (2) hide show
  1. package/dist/index.cjs.js +1010 -480
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -13780,7 +13780,48 @@ var getLocationInfo$1 = /*#__PURE__*/function () {
13780
13780
  return function getLocationInfo(_x, _x2) {
13781
13781
  return _ref.apply(this, arguments);
13782
13782
  };
13783
- }(); // DOCTER_LISTING
13783
+ }();
13784
+
13785
+ var calculationExp = function calculationExp(jexp) {
13786
+ var expInMs = 0;
13787
+ jexp.forEach(function () {
13788
+ var exp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
13789
+ var start_date = exp.start_date,
13790
+ end_date = exp.end_date;
13791
+
13792
+ if (typeof start_date === "number") {
13793
+ if (typeof end_date === "number") {
13794
+ if (start_date < end_date) {
13795
+ expInMs += (end_date - start_date) * 1000;
13796
+ }
13797
+ } else {
13798
+ expInMs += (Date.now() - start_date) * 1000;
13799
+ }
13800
+ }
13801
+ });
13802
+ var expInDays = moment(expInMs).diff(moment(0), "days");
13803
+ var expInMonths = moment(expInMs).diff(moment(0), "months");
13804
+ var expInYears = moment(expInMs).diff(moment(0), "years");
13805
+
13806
+ if (expInYears >= 1) {
13807
+ var value = Math.floor(expInYears);
13808
+ return "".concat(value, " year") + (value > 1 ? "s" : "");
13809
+ }
13810
+
13811
+ if (expInMonths >= 1) {
13812
+ var _value = Math.floor(expInMonths);
13813
+
13814
+ return "".concat(_value, " month") + (_value > 1 ? "s" : "");
13815
+ }
13816
+
13817
+ if (expInDays >= 1) {
13818
+ var _value2 = Math.floor(expInDays);
13819
+
13820
+ return "".concat(_value2, " day") + (_value2 > 1 ? "s" : "");
13821
+ }
13822
+
13823
+ return "0 days";
13824
+ }; // DOCTER_LISTING
13784
13825
 
13785
13826
 
13786
13827
  var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
@@ -13962,6 +14003,9 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13962
14003
  isDoctor: !isClinic,
13963
14004
  language: [],
13964
14005
  isClinic: isClinic,
14006
+ experience: 0,
14007
+ role: "",
14008
+ mobile: "",
13965
14009
  memberIncludes: "0",
13966
14010
  hospitalName: "",
13967
14011
  hospitalLocation: "",
@@ -14028,7 +14072,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
14028
14072
  info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
14029
14073
  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);
14030
14074
  } else {
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$;
14075
+ var _restData$gender, _restData$gender$codi, _restData$gender$codi2, _restData$Specialties, _restData$communicati, _restData$practitione, _restData$practitione2, _restData$practitione3, _restData$practitione4, _restData$practitione5, _restData$hospital6, _restData$hospital6$t, _restData$hospital6$t2, _restData$hospital7, _restData$qualificati, _restData$qualificati2, _restData$qualificati3, _restData$hospital8, _restData$address5, _restData$address5$, _restData$name, _restData$photo, _restData$photo$, _restData$address6, _restData$address6$, _restData$biography, _restData$biography$;
14032
14076
 
14033
14077
  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) || "";
14034
14078
 
@@ -14067,14 +14111,17 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
14067
14111
  });
14068
14112
  }
14069
14113
  });
14114
+ info["role"] = restData === null || restData === void 0 ? void 0 : (_restData$practitione = restData.practitioner_role) === null || _restData$practitione === void 0 ? void 0 : (_restData$practitione2 = _restData$practitione[0]) === null || _restData$practitione2 === void 0 ? void 0 : (_restData$practitione3 = _restData$practitione2.role) === null || _restData$practitione3 === void 0 ? void 0 : (_restData$practitione4 = _restData$practitione3.coding) === null || _restData$practitione4 === void 0 ? void 0 : (_restData$practitione5 = _restData$practitione4[0]) === null || _restData$practitione5 === void 0 ? void 0 : _restData$practitione5.display;
14115
+ info["mobile"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : (_restData$hospital6$t = _restData$hospital6.telecom) === null || _restData$hospital6$t === void 0 ? void 0 : (_restData$hospital6$t2 = _restData$hospital6$t[0]) === null || _restData$hospital6$t2 === void 0 ? void 0 : _restData$hospital6$t2.value;
14116
+ info["experience"] = calculationExp(restData === null || restData === void 0 ? void 0 : restData.job_experience);
14070
14117
  info["title"] = "".concat(_gender).concat(_gender && " | ").concat(designation);
14071
14118
  info["gender"] = _gender;
14072
- info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : _restData$hospital6.id;
14119
+ info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital7 = restData.hospital) === null || _restData$hospital7 === void 0 ? void 0 : _restData$hospital7.id;
14073
14120
  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) {
14074
14121
  return (q === null || q === void 0 ? void 0 : q.name) || "";
14075
14122
  })) === null || _restData$qualificati3 === void 0 ? void 0 : _restData$qualificati3.join(", ")) || "----";
14076
14123
  info["language"] = languages.size > 0 ? _toConsumableArray(languages) : [];
14077
- info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital7 = restData.hospital) === null || _restData$hospital7 === void 0 ? void 0 : _restData$hospital7.name) || "";
14124
+ info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital8 = restData.hospital) === null || _restData$hospital8 === void 0 ? void 0 : _restData$hospital8.name) || "";
14078
14125
  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
14126
  var nameObj = (restData === null || restData === void 0 ? void 0 : (_restData$name = restData.name) === null || _restData$name === void 0 ? void 0 : _restData$name[0]) || {};
14080
14127
  info["name"] = makeName(nameObj);
@@ -16604,7 +16651,6 @@ var READ_PERSON = createAsyncThunk("personApiSlice/readPerson", /*#__PURE__*/_as
16604
16651
  _data$4,
16605
16652
  _data$4$,
16606
16653
  _data$4$$names,
16607
- _data$4$$names$,
16608
16654
  _data$5,
16609
16655
  _data$5$,
16610
16656
  _data$5$$Patientname,
@@ -16663,7 +16709,7 @@ var READ_PERSON = createAsyncThunk("personApiSlice/readPerson", /*#__PURE__*/_as
16663
16709
  id: (data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$ = _data$[0]) === null || _data$$ === void 0 ? void 0 : _data$$.Id) || 0,
16664
16710
  birthDay: (data === null || data === void 0 ? void 0 : (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$ = _data$2[0]) === null || _data$2$ === void 0 ? void 0 : _data$2$.birthDay) || "",
16665
16711
  gender: (data === null || data === void 0 ? void 0 : (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : (_data$3$ = _data$3[0]) === null || _data$3$ === void 0 ? void 0 : _data$3$.gender) || "",
16666
- name: (data === null || data === void 0 ? void 0 : (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : (_data$4$ = _data$4[0]) === null || _data$4$ === void 0 ? void 0 : (_data$4$$names = _data$4$.names) === null || _data$4$$names === void 0 ? void 0 : (_data$4$$names$ = _data$4$$names[0]) === null || _data$4$$names$ === void 0 ? void 0 : _data$4$$names$.given) || "",
16712
+ name: makeName(data === null || data === void 0 ? void 0 : (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : (_data$4$ = _data$4[0]) === null || _data$4$ === void 0 ? void 0 : (_data$4$$names = _data$4$.names) === null || _data$4$$names === void 0 ? void 0 : _data$4$$names[0]) || "",
16667
16713
  pid: (data === null || data === void 0 ? void 0 : (_data$5 = data[0]) === null || _data$5 === void 0 ? void 0 : (_data$5$ = _data$5[0]) === null || _data$5$ === void 0 ? void 0 : (_data$5$$Patientname = _data$5$.Patientname) === null || _data$5$$Patientname === void 0 ? void 0 : (_data$5$$Patientname$ = _data$5$$Patientname[0]) === null || _data$5$$Patientname$ === void 0 ? void 0 : _data$5$$Patientname$._id) || "",
16668
16714
  mrn: (data === null || data === void 0 ? void 0 : (_data$6 = data[0]) === null || _data$6 === void 0 ? void 0 : (_data$6$ = _data$6[0]) === null || _data$6$ === void 0 ? void 0 : (_data$6$$Patientname = _data$6$.Patientname) === null || _data$6$$Patientname === void 0 ? void 0 : (_data$6$$Patientname$ = _data$6$$Patientname[0]) === null || _data$6$$Patientname$ === void 0 ? void 0 : _data$6$$Patientname$.alias) || "",
16669
16715
  username: phone,
@@ -37980,12 +38026,13 @@ var query$4 = {
37980
38026
  getAppointments: function getAppointments(data) {
37981
38027
  return {
37982
38028
  db_name: dbName,
37983
- entity: "Appointment,Encounter",
38029
+ entity: "Appointment",
37984
38030
  filter: {
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, "'"),
37986
- Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
38031
+ 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:
38032
+ // "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'",
38033
+
37987
38034
  },
37988
- 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))}))})}"
38035
+ "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)},{telecom:document(per.telecom)},{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)}))})}"
37989
38036
  };
37990
38037
  },
37991
38038
  getFirstVisits: function getFirstVisits(data) {
@@ -38045,15 +38092,26 @@ var query$4 = {
38045
38092
  },
38046
38093
  // NURSE
38047
38094
  getAppointmentsNurse: function getAppointmentsNurse(data) {
38095
+ // return {
38096
+ // db_name: dbName,
38097
+ // entity: "Practitioner,Appointment,Encounter",
38098
+ // filter: {
38099
+ // 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}'`,
38100
+ // 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`,
38101
+ // Encounter:
38102
+ // "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'",
38103
+ // },
38104
+ // return_fields:
38105
+ // "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)}))})",
38106
+ // };
38048
38107
  return {
38049
- db_name: dbName,
38050
- entity: "Practitioner,Appointment,Encounter",
38051
- filter: {
38108
+ "db_name": "primarycare",
38109
+ "entity": "Practitioner,Appointment",
38110
+ "filter": {
38052
38111
  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, "'"),
38053
- 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"),
38054
- Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
38112
+ 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")
38055
38113
  },
38056
- return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
38114
+ "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)},{telecom:document(per.telecom)},{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)}))})}"
38057
38115
  };
38058
38116
  },
38059
38117
  getFirstVisitsNurse: function getFirstVisitsNurse(data) {
@@ -38119,12 +38177,13 @@ var query$4 = {
38119
38177
  getAppointmentsDoctor: function getAppointmentsDoctor(data) {
38120
38178
  return {
38121
38179
  db_name: dbName,
38122
- entity: "Appointment,Encounter",
38180
+ entity: "Appointment",
38123
38181
  filter: {
38124
- 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, "'"),
38125
- Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
38182
+ 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:
38183
+ // "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'",
38184
+
38126
38185
  },
38127
- 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)}))}))})"
38186
+ "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)},{telecom:document(per.telecom)},{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)}))})}"
38128
38187
  };
38129
38188
  },
38130
38189
  getFirstVisitsDoctor: function getFirstVisitsDoctor(data) {
@@ -38210,34 +38269,48 @@ var GET_APPOINTMENTS = createAsyncThunk("appointmentStatsApiSlice/getAppointment
38210
38269
  case 5:
38211
38270
  data = _context.sent;
38212
38271
  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 (_) {
38213
- var _$Appointment, _$Appointment$PersonI, _$Appointment$PersonI2, _$Appointment$PersonI3, _$Appointment$PersonI4, _$Appointment2, _$Appointment2$Person, _$Appointment2$Person2, _$Appointment2$Person3, _$Appointment2$Person4, _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Appointment3, _$Appointment3$Person, _$Appointment3$Person2, _$Appointment4, _$Appointment5, _$Appointment6, _$Appointment7, _$Appointment8, _$Appointment8$Specia, _$Encounter3, _$Encounter3$practiti, _$Encounter3$practiti2, _$Appointment9, _$Appointment9$Person, _$Appointment9$Person2, _$Appointment10, _$Appointment10$Perso, _$Appointment10$Perso2, _$Encounter4, _$Encounter4$patient_, _$Encounter4$patient_2, _$Encounter4$patient_3, _$Encounter4$patient_4, _$Encounter5, _$Encounter6, _$Encounter6$status, _$Encounter$appointme, _$Encounter7, _$Encounter7$appointm;
38272
+ 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$PersonI4, _$Appointment8, _$Appointment8$Person, _$Appointment8$Person2, _$Appointment8$Person3, _$Appointment8$Person4, _$Appointment$appoint, _$Appointment9, _$Appointment10, _$Appointment11;
38214
38273
 
38215
38274
  return {
38216
- img: (_ === null || _ === void 0 ? void 0 : (_$Appointment = _.Appointment) === null || _$Appointment === void 0 ? void 0 : (_$Appointment$PersonI = _$Appointment.PersonID) === null || _$Appointment$PersonI === void 0 ? void 0 : (_$Appointment$PersonI2 = _$Appointment$PersonI[0]) === null || _$Appointment$PersonI2 === void 0 ? void 0 : (_$Appointment$PersonI3 = _$Appointment$PersonI2.photo) === null || _$Appointment$PersonI3 === void 0 ? void 0 : (_$Appointment$PersonI4 = _$Appointment$PersonI3[0]) === null || _$Appointment$PersonI4 === void 0 ? void 0 : _$Appointment$PersonI4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment2 = _.Appointment) === null || _$Appointment2 === void 0 ? void 0 : (_$Appointment2$Person = _$Appointment2.PersonID) === null || _$Appointment2$Person === void 0 ? void 0 : (_$Appointment2$Person2 = _$Appointment2$Person[0]) === null || _$Appointment2$Person2 === void 0 ? void 0 : (_$Appointment2$Person3 = _$Appointment2$Person2.photo) === null || _$Appointment2$Person3 === void 0 ? void 0 : (_$Appointment2$Person4 = _$Appointment2$Person3[0]) === null || _$Appointment2$Person4 === void 0 ? void 0 : _$Appointment2$Person4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38217
- 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]) || {}),
38218
- 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,
38219
- enId: _.Encounter.id,
38275
+ // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
38276
+ // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
38277
+ // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38278
+ 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]) || {}),
38279
+ 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],
38280
+ // enId: _.Encounter.id,
38220
38281
  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),
38221
- date: (_ === 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") : "",
38222
- time: (_ === 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") : "",
38223
- speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment8 = _.Appointment) === null || _$Appointment8 === void 0 ? void 0 : (_$Appointment8$Specia = _$Appointment8.SpecialtyID) === null || _$Appointment8$Specia === void 0 ? void 0 : _$Appointment8$Specia.map(function (spl) {
38224
- var _spl$coding, _spl$coding$;
38225
-
38226
- 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;
38227
- }).join(", "),
38228
- clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter3 = _.Encounter) === null || _$Encounter3 === void 0 ? void 0 : (_$Encounter3$practiti = _$Encounter3.practitioner_details) === null || _$Encounter3$practiti === void 0 ? void 0 : (_$Encounter3$practiti2 = _$Encounter3$practiti[0]) === null || _$Encounter3$practiti2 === void 0 ? void 0 : _$Encounter3$practiti2.clinic,
38229
- dob: _ === null || _ === void 0 ? void 0 : (_$Appointment9 = _.Appointment) === null || _$Appointment9 === void 0 ? void 0 : (_$Appointment9$Person = _$Appointment9.PersonID) === null || _$Appointment9$Person === void 0 ? void 0 : (_$Appointment9$Person2 = _$Appointment9$Person[0]) === null || _$Appointment9$Person2 === void 0 ? void 0 : _$Appointment9$Person2.birthDay,
38230
- gender: _ === null || _ === void 0 ? void 0 : (_$Appointment10 = _.Appointment) === null || _$Appointment10 === void 0 ? void 0 : (_$Appointment10$Perso = _$Appointment10.PersonID) === null || _$Appointment10$Perso === void 0 ? void 0 : (_$Appointment10$Perso2 = _$Appointment10$Perso[0]) === null || _$Appointment10$Perso2 === void 0 ? void 0 : _$Appointment10$Perso2.gender,
38231
- contact: _ === 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,
38232
- visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter5 = _.Encounter) === null || _$Encounter5 === void 0 ? void 0 : _$Encounter5.visit_type,
38233
- appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter6 = _.Encounter) === null || _$Encounter6 === void 0 ? void 0 : (_$Encounter6$status = _$Encounter6.status) === null || _$Encounter6$status === void 0 ? void 0 : _$Encounter6$status.display,
38234
- appNo: (_$Encounter$appointme = _ === null || _ === void 0 ? void 0 : (_$Encounter7 = _.Encounter) === null || _$Encounter7 === void 0 ? void 0 : (_$Encounter7$appointm = _$Encounter7.appointmentId) === null || _$Encounter7$appointm === void 0 ? void 0 : _$Encounter7$appointm[0]) !== null && _$Encounter$appointme !== void 0 ? _$Encounter$appointme : "",
38235
- type: "OP",
38236
- "Register Visit": true,
38237
- "Modify Appointment": true,
38238
- "Cancel Appointment": true,
38239
- "View Profile": true,
38240
- data: _
38282
+ // date: _?.Appointment?.start
38283
+ // ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
38284
+ // : "",
38285
+ // time: _?.Appointment?.start
38286
+ // ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
38287
+ // : "",
38288
+ 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") : ""),
38289
+ // speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
38290
+ // return spl?.coding?.[0]?.display;
38291
+ // }).join(", "),
38292
+ // clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
38293
+ // dob: _?.Appointment?.PersonID?.[0]?.birthDay,
38294
+ // gender: _?.Appointment?.PersonID?.[0]?.gender,
38295
+ contact: (_$Appointment$PersonI4 = _ === null || _ === void 0 ? void 0 : (_$Appointment8 = _.Appointment) === null || _$Appointment8 === void 0 ? void 0 : (_$Appointment8$Person = _$Appointment8.PersonID) === null || _$Appointment8$Person === void 0 ? void 0 : (_$Appointment8$Person2 = _$Appointment8$Person[0]) === null || _$Appointment8$Person2 === void 0 ? void 0 : (_$Appointment8$Person3 = _$Appointment8$Person2.telecom) === null || _$Appointment8$Person3 === void 0 ? void 0 : (_$Appointment8$Person4 = _$Appointment8$Person3[0]) === null || _$Appointment8$Person4 === void 0 ? void 0 : _$Appointment8$Person4.value) !== null && _$Appointment$PersonI4 !== void 0 ? _$Appointment$PersonI4 : "",
38296
+ visitType: (_$Appointment$appoint = _ === null || _ === void 0 ? void 0 : (_$Appointment9 = _.Appointment) === null || _$Appointment9 === void 0 ? void 0 : _$Appointment9.appointmentType) !== null && _$Appointment$appoint !== void 0 ? _$Appointment$appoint : "",
38297
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment10 = _.Appointment) === null || _$Appointment10 === void 0 ? void 0 : _$Appointment10.appstatus) || "",
38298
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment11 = _.Appointment) === null || _$Appointment11 === void 0 ? void 0 : _$Appointment11.appno) || "",
38299
+ // type: "OP",
38300
+ // "Register Visit": true,
38301
+ // "Modify Appointment": true,
38302
+ // "Cancel Appointment": true,
38303
+ // "View Profile": true,
38304
+ // data: _,
38305
+ viewaction: JSON.stringify({
38306
+ appNo: _.Appointment.id
38307
+ }),
38308
+ modifyaction: JSON.stringify({
38309
+ appNo: _.Appointment.id
38310
+ }),
38311
+ cancelaction: JSON.stringify({
38312
+ appNo: _.Appointment.id
38313
+ })
38241
38314
  };
38242
38315
  }) : [];
38243
38316
  return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38282,34 +38355,64 @@ var GET_FIRST_VISITS = createAsyncThunk("appointmentStatsApiSlice/getFirstVisits
38282
38355
  case 5:
38283
38356
  data = _context2.sent;
38284
38357
  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 (_) {
38285
- var _$Appointment11, _$Appointment11$Perso, _$Appointment11$Perso2, _$Appointment11$Perso3, _$Appointment11$Perso4, _$Appointment12, _$Appointment12$Perso, _$Appointment12$Perso2, _$Appointment12$Perso3, _$Appointment12$Perso4, _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Encounter8$patient_3, _$Encounter9, _$Encounter9$patient_, _$Encounter9$patient_2, _$Appointment13, _$Appointment14, _$Appointment15, _$Appointment16, _$Appointment17, _$Appointment17$Speci, _$Encounter10, _$Encounter10$practit, _$Encounter10$practit2, _$Appointment18, _$Appointment18$Perso, _$Appointment18$Perso2, _$Encounter11, _$Encounter11$patient, _$Encounter11$patient2, _$Encounter11$patient3, _$Encounter11$patient4, _$Encounter12, _$Encounter13, _$Encounter13$status, _$Encounter$appointme2, _$Encounter14, _$Encounter14$appoint, _$Appointment19, _$Appointment19$Perso, _$Appointment19$Perso2, _$Appointment20, _$Appointment20$Perso, _$Appointment20$Perso2;
38358
+ var _$Appointment12, _$Appointment12$Perso, _$Appointment12$Perso2, _$Appointment12$Perso3, _$Appointment12$Perso4, _$Appointment13, _$Appointment13$Perso, _$Appointment13$Perso2, _$Appointment13$Perso3, _$Appointment13$Perso4, _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Appointment14, _$Appointment14$Perso, _$Appointment14$Perso2, _$Appointment15, _$Appointment16, _$Appointment17, _$Appointment18, _$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$PersonI5, _$Appointment19, _$Appointment19$Perso, _$Appointment19$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$PersonI6, _$Appointment20, _$Appointment20$Perso, _$Appointment20$Perso2, _$Encounter$patient_i5, _$Encounter11, _$Encounter11$patient, _$Encounter11$patient2, _$Encounter$appointme4, _$Encounter12, _$Encounter12$appoint, _$Encounter13, _$Encounter13$patient, _$Encounter13$patient2, _$Encounter13$patient3, _$Encounter13$patient4, _$Appointment$PersonI7, _$Appointment21, _$Appointment21$Perso, _$Appointment21$Perso2, _$Encounter$patient_i6, _$Encounter14, _$Encounter14$patient, _$Encounter14$patient2;
38286
38359
 
38287
38360
  return {
38288
- 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",
38289
- 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]) || {}),
38290
- mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$patient_ = _$Encounter9.patient_id) === null || _$Encounter9$patient_ === void 0 ? void 0 : (_$Encounter9$patient_2 = _$Encounter9$patient_[0]) === null || _$Encounter9$patient_2 === void 0 ? void 0 : _$Encounter9$patient_2.MRN,
38291
- date: (_ === null || _ === void 0 ? void 0 : (_$Appointment13 = _.Appointment) === null || _$Appointment13 === void 0 ? void 0 : _$Appointment13.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment14 = _.Appointment) === null || _$Appointment14 === void 0 ? void 0 : _$Appointment14.start, "DD MMM,YYYY") : "",
38292
- time: (_ === null || _ === void 0 ? void 0 : (_$Appointment15 = _.Appointment) === null || _$Appointment15 === void 0 ? void 0 : _$Appointment15.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment16 = _.Appointment) === null || _$Appointment16 === void 0 ? void 0 : _$Appointment16.start, "hh:mm A") : "",
38293
- speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment17 = _.Appointment) === null || _$Appointment17 === void 0 ? void 0 : (_$Appointment17$Speci = _$Appointment17.SpecialtyID) === null || _$Appointment17$Speci === void 0 ? void 0 : _$Appointment17$Speci.map(function (spl) {
38294
- var _spl$coding2, _spl$coding2$;
38295
-
38296
- 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;
38297
- }).join(", "),
38298
- clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter10 = _.Encounter) === null || _$Encounter10 === void 0 ? void 0 : (_$Encounter10$practit = _$Encounter10.practitioner_details) === null || _$Encounter10$practit === void 0 ? void 0 : (_$Encounter10$practit2 = _$Encounter10$practit[0]) === null || _$Encounter10$practit2 === void 0 ? void 0 : _$Encounter10$practit2.clinic,
38299
- dob: _ === 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.birthDay,
38300
- contact: _ === 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$patient3 = _$Encounter11$patient2.telecom) === null || _$Encounter11$patient3 === void 0 ? void 0 : (_$Encounter11$patient4 = _$Encounter11$patient3[0]) === null || _$Encounter11$patient4 === void 0 ? void 0 : _$Encounter11$patient4.value,
38301
- visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter12 = _.Encounter) === null || _$Encounter12 === void 0 ? void 0 : _$Encounter12.visit_type,
38302
- appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter13 = _.Encounter) === null || _$Encounter13 === void 0 ? void 0 : (_$Encounter13$status = _$Encounter13.status) === null || _$Encounter13$status === void 0 ? void 0 : _$Encounter13$status.display,
38303
- type: "OP",
38304
- appNo: (_$Encounter$appointme2 = _ === null || _ === void 0 ? void 0 : (_$Encounter14 = _.Encounter) === null || _$Encounter14 === void 0 ? void 0 : (_$Encounter14$appoint = _$Encounter14.appointmentId) === null || _$Encounter14$appoint === void 0 ? void 0 : _$Encounter14$appoint[0]) !== null && _$Encounter$appointme2 !== void 0 ? _$Encounter$appointme2 : "",
38305
- data: _,
38306
- enId: _.Encounter.id,
38307
- age: getAge(_ === 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.birthDay),
38308
- gender: _ === 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.gender,
38309
- "Register Visit": true,
38310
- "Modify Appointment": true,
38311
- "Cancel Appointment": true,
38312
- "View Profile": true
38361
+ img: (_ === 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) ? getImgUrl(_ === 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$Perso3 = _$Appointment13$Perso2.photo) === null || _$Appointment13$Perso3 === void 0 ? void 0 : (_$Appointment13$Perso4 = _$Appointment13$Perso3[0]) === null || _$Appointment13$Perso4 === void 0 ? void 0 : _$Appointment13$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38362
+ // name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
38363
+ // mrn: _?.Encounter?.patient_id?.[0]?.MRN,
38364
+ // date: _?.Appointment?.start
38365
+ // ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
38366
+ // : "",
38367
+ // time: _?.Appointment?.start
38368
+ // ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
38369
+ // : "",
38370
+ // speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
38371
+ // return spl?.coding?.[0]?.display;
38372
+ // }).join(", "),
38373
+ // clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
38374
+ // dob: _?.Appointment?.PersonID?.[0]?.birthDay,
38375
+ // contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
38376
+ // visitType: _?.Encounter?.visit_type,
38377
+ // appointmentStatus: _?.Encounter?.status?.display,
38378
+ // type: "OP",
38379
+ // appNo: _?.Encounter?.appointmentId?.[0] ?? "",
38380
+ // data: _,
38381
+ // enId: _.Encounter.id,
38382
+ // age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
38383
+ // gender: _?.Appointment?.PersonID?.[0]?.gender,
38384
+ // "Register Visit": true,
38385
+ // "Modify Appointment": true,
38386
+ // "Cancel Appointment": true,
38387
+ // "View Profile": true,
38388
+ 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]) || {}),
38389
+ 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,
38390
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment14 = _.Appointment) === null || _$Appointment14 === void 0 ? void 0 : (_$Appointment14$Perso = _$Appointment14.PersonID) === null || _$Appointment14$Perso === void 0 ? void 0 : (_$Appointment14$Perso2 = _$Appointment14$Perso[0]) === null || _$Appointment14$Perso2 === void 0 ? void 0 : _$Appointment14$Perso2.birthDay),
38391
+ date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment15 = _.Appointment) === null || _$Appointment15 === void 0 ? void 0 : _$Appointment15.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment16 = _.Appointment) === null || _$Appointment16 === void 0 ? void 0 : _$Appointment16.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment17 = _.Appointment) === null || _$Appointment17 === void 0 ? void 0 : _$Appointment17.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment18 = _.Appointment) === null || _$Appointment18 === void 0 ? void 0 : _$Appointment18.start, "hh:mm A") : ""),
38392
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter3 = _.Encounter) === null || _$Encounter3 === void 0 ? void 0 : _$Encounter3.visit_type,
38393
+ 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,
38394
+ 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 : "",
38395
+ viewaction: JSON.stringify({
38396
+ 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 : "",
38397
+ enId: _.Encounter.id,
38398
+ 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,
38399
+ 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,
38400
+ 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
38401
+ }),
38402
+ modifyaction: JSON.stringify({
38403
+ 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 : "",
38404
+ enId: _.Encounter.id,
38405
+ 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,
38406
+ 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,
38407
+ 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
38408
+ }),
38409
+ cancelaction: JSON.stringify({
38410
+ 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 : "",
38411
+ enId: _.Encounter.id,
38412
+ 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,
38413
+ personId: (_$Appointment$PersonI7 = _ === 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.Id) !== null && _$Appointment$PersonI7 !== void 0 ? _$Appointment$PersonI7 : null,
38414
+ 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
38415
+ })
38313
38416
  };
38314
38417
  }) : [];
38315
38418
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38354,34 +38457,66 @@ var GET_OTHER_VISITS = createAsyncThunk("appointmentStatsApiSlice/getOtherVisits
38354
38457
  case 5:
38355
38458
  data = _context3.sent;
38356
38459
  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 (_) {
38357
- var _$Appointment21, _$Appointment21$Perso, _$Appointment21$Perso2, _$Appointment21$Perso3, _$Appointment21$Perso4, _$Appointment22, _$Appointment22$Perso, _$Appointment22$Perso2, _$Appointment22$Perso3, _$Appointment22$Perso4, _$Encounter15, _$Encounter15$patient, _$Encounter15$patient2, _$Encounter15$patient3, _$Encounter16, _$Encounter16$patient, _$Encounter16$patient2, _$Appointment23, _$Appointment24, _$Appointment25, _$Appointment26, _$Appointment27, _$Appointment27$Speci, _$Encounter17, _$Encounter17$practit, _$Encounter17$practit2, _$Appointment28, _$Appointment28$Perso, _$Appointment28$Perso2, _$Encounter$appointme3, _$Encounter18, _$Encounter18$appoint, _$Appointment29, _$Appointment29$Perso, _$Appointment29$Perso2, _$Appointment30, _$Appointment30$Perso, _$Appointment30$Perso2, _$Encounter19, _$Encounter19$patient, _$Encounter19$patient2, _$Encounter19$patient3, _$Encounter19$patient4, _$Encounter20, _$Encounter21, _$Encounter21$status;
38460
+ var _$Encounter15, _$Encounter15$patient, _$Encounter15$patient2, _$Encounter15$patient3, _$Encounter16, _$Encounter16$patient, _$Encounter16$patient2, _$Appointment22, _$Appointment22$Perso, _$Appointment22$Perso2, _$Appointment23, _$Appointment24, _$Appointment25, _$Appointment26, _$Encounter17, _$Encounter18, _$Encounter18$status, _$Encounter$appointme5, _$Encounter19, _$Encounter19$appoint, _$Encounter$appointme6, _$Encounter20, _$Encounter20$appoint, _$Encounter21, _$Encounter21$patient, _$Encounter21$patient2, _$Encounter21$patient3, _$Encounter21$patient4, _$Appointment$PersonI8, _$Appointment27, _$Appointment27$Perso, _$Appointment27$Perso2, _$Encounter$patient_i7, _$Encounter22, _$Encounter22$patient, _$Encounter22$patient2, _$Encounter$appointme7, _$Encounter23, _$Encounter23$appoint, _$Encounter24, _$Encounter24$patient, _$Encounter24$patient2, _$Encounter24$patient3, _$Encounter24$patient4, _$Appointment$PersonI9, _$Appointment28, _$Appointment28$Perso, _$Appointment28$Perso2, _$Encounter$patient_i8, _$Encounter25, _$Encounter25$patient, _$Encounter25$patient2, _$Encounter$appointme8, _$Encounter26, _$Encounter26$appoint, _$Encounter27, _$Encounter27$patient, _$Encounter27$patient2, _$Encounter27$patient3, _$Encounter27$patient4, _$Appointment$PersonI10, _$Appointment29, _$Appointment29$Perso, _$Appointment29$Perso2, _$Encounter$patient_i9, _$Encounter28, _$Encounter28$patient, _$Encounter28$patient2;
38358
38461
 
38359
38462
  return {
38360
- img: (_ === 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$Perso3 = _$Appointment21$Perso2.photo) === null || _$Appointment21$Perso3 === void 0 ? void 0 : (_$Appointment21$Perso4 = _$Appointment21$Perso3[0]) === null || _$Appointment21$Perso4 === void 0 ? void 0 : _$Appointment21$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment22 = _.Appointment) === null || _$Appointment22 === void 0 ? void 0 : (_$Appointment22$Perso = _$Appointment22.PersonID) === null || _$Appointment22$Perso === void 0 ? void 0 : (_$Appointment22$Perso2 = _$Appointment22$Perso[0]) === null || _$Appointment22$Perso2 === void 0 ? void 0 : (_$Appointment22$Perso3 = _$Appointment22$Perso2.photo) === null || _$Appointment22$Perso3 === void 0 ? void 0 : (_$Appointment22$Perso4 = _$Appointment22$Perso3[0]) === null || _$Appointment22$Perso4 === void 0 ? void 0 : _$Appointment22$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38463
+ // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
38464
+ // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
38465
+ // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38466
+ // name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
38467
+ // mrn: _?.Encounter?.patient_id?.[0]?.MRN,
38468
+ // date: _?.Appointment?.start
38469
+ // ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
38470
+ // : "",
38471
+ // time: _?.Appointment?.start
38472
+ // ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
38473
+ // : "",
38474
+ // speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
38475
+ // return spl?.coding?.[0]?.display;
38476
+ // }).join(", "),
38477
+ // clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
38478
+ // dob: _?.Appointment?.PersonID?.[0]?.birthDay,
38479
+ // type: "OP",
38480
+ // appNo: _?.Encounter?.appointmentId?.[0] ?? "",
38481
+ // data: _,
38482
+ // enId: _.Encounter.id,
38483
+ // age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
38484
+ // gender: _?.Appointment?.PersonID?.[0]?.gender,
38485
+ // contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
38486
+ // visitType: _?.Encounter?.visit_type,
38487
+ // appointmentStatus: _?.Encounter?.status?.display,
38488
+ // "Register Visit": true,
38489
+ // "Modify Appointment": true,
38490
+ // "Cancel Appointment": true,
38491
+ // "View Profile": true,
38361
38492
  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]) || {}),
38362
38493
  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,
38363
- date: (_ === null || _ === void 0 ? void 0 : (_$Appointment23 = _.Appointment) === null || _$Appointment23 === void 0 ? void 0 : _$Appointment23.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment24 = _.Appointment) === null || _$Appointment24 === void 0 ? void 0 : _$Appointment24.start, "DD MMM,YYYY") : "",
38364
- time: (_ === null || _ === void 0 ? void 0 : (_$Appointment25 = _.Appointment) === null || _$Appointment25 === void 0 ? void 0 : _$Appointment25.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment26 = _.Appointment) === null || _$Appointment26 === void 0 ? void 0 : _$Appointment26.start, "hh:mm A") : "",
38365
- speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment27 = _.Appointment) === null || _$Appointment27 === void 0 ? void 0 : (_$Appointment27$Speci = _$Appointment27.SpecialtyID) === null || _$Appointment27$Speci === void 0 ? void 0 : _$Appointment27$Speci.map(function (spl) {
38366
- var _spl$coding3, _spl$coding3$;
38367
-
38368
- 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;
38369
- }).join(", "),
38370
- clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter17 = _.Encounter) === null || _$Encounter17 === void 0 ? void 0 : (_$Encounter17$practit = _$Encounter17.practitioner_details) === null || _$Encounter17$practit === void 0 ? void 0 : (_$Encounter17$practit2 = _$Encounter17$practit[0]) === null || _$Encounter17$practit2 === void 0 ? void 0 : _$Encounter17$practit2.clinic,
38371
- dob: _ === 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.birthDay,
38372
- type: "OP",
38373
- appNo: (_$Encounter$appointme3 = _ === null || _ === void 0 ? void 0 : (_$Encounter18 = _.Encounter) === null || _$Encounter18 === void 0 ? void 0 : (_$Encounter18$appoint = _$Encounter18.appointmentId) === null || _$Encounter18$appoint === void 0 ? void 0 : _$Encounter18$appoint[0]) !== null && _$Encounter$appointme3 !== void 0 ? _$Encounter$appointme3 : "",
38374
- data: _,
38375
- enId: _.Encounter.id,
38376
- 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),
38377
- gender: _ === null || _ === void 0 ? void 0 : (_$Appointment30 = _.Appointment) === null || _$Appointment30 === void 0 ? void 0 : (_$Appointment30$Perso = _$Appointment30.PersonID) === null || _$Appointment30$Perso === void 0 ? void 0 : (_$Appointment30$Perso2 = _$Appointment30$Perso[0]) === null || _$Appointment30$Perso2 === void 0 ? void 0 : _$Appointment30$Perso2.gender,
38378
- contact: _ === null || _ === void 0 ? void 0 : (_$Encounter19 = _.Encounter) === null || _$Encounter19 === void 0 ? void 0 : (_$Encounter19$patient = _$Encounter19.patient_id) === null || _$Encounter19$patient === void 0 ? void 0 : (_$Encounter19$patient2 = _$Encounter19$patient[0]) === null || _$Encounter19$patient2 === void 0 ? void 0 : (_$Encounter19$patient3 = _$Encounter19$patient2.telecom) === null || _$Encounter19$patient3 === void 0 ? void 0 : (_$Encounter19$patient4 = _$Encounter19$patient3[0]) === null || _$Encounter19$patient4 === void 0 ? void 0 : _$Encounter19$patient4.value,
38379
- visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter20 = _.Encounter) === null || _$Encounter20 === void 0 ? void 0 : _$Encounter20.visit_type,
38380
- appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter21 = _.Encounter) === null || _$Encounter21 === void 0 ? void 0 : (_$Encounter21$status = _$Encounter21.status) === null || _$Encounter21$status === void 0 ? void 0 : _$Encounter21$status.display,
38381
- "Register Visit": true,
38382
- "Modify Appointment": true,
38383
- "Cancel Appointment": true,
38384
- "View Profile": true
38494
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment22 = _.Appointment) === null || _$Appointment22 === void 0 ? void 0 : (_$Appointment22$Perso = _$Appointment22.PersonID) === null || _$Appointment22$Perso === void 0 ? void 0 : (_$Appointment22$Perso2 = _$Appointment22$Perso[0]) === null || _$Appointment22$Perso2 === void 0 ? void 0 : _$Appointment22$Perso2.birthDay),
38495
+ date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment23 = _.Appointment) === null || _$Appointment23 === void 0 ? void 0 : _$Appointment23.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment24 = _.Appointment) === null || _$Appointment24 === void 0 ? void 0 : _$Appointment24.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment25 = _.Appointment) === null || _$Appointment25 === void 0 ? void 0 : _$Appointment25.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment26 = _.Appointment) === null || _$Appointment26 === void 0 ? void 0 : _$Appointment26.start, "hh:mm A") : ""),
38496
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter17 = _.Encounter) === null || _$Encounter17 === void 0 ? void 0 : _$Encounter17.visit_type,
38497
+ 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,
38498
+ 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 : "",
38499
+ viewaction: JSON.stringify({
38500
+ 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 : "",
38501
+ enId: _.Encounter.id,
38502
+ 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,
38503
+ 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,
38504
+ 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
38505
+ }),
38506
+ modifyaction: JSON.stringify({
38507
+ 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 : "",
38508
+ enId: _.Encounter.id,
38509
+ 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,
38510
+ 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,
38511
+ 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
38512
+ }),
38513
+ cancelaction: JSON.stringify({
38514
+ 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 : "",
38515
+ enId: _.Encounter.id,
38516
+ 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,
38517
+ personId: (_$Appointment$PersonI10 = _ === 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.Id) !== null && _$Appointment$PersonI10 !== void 0 ? _$Appointment$PersonI10 : null,
38518
+ 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
38519
+ })
38385
38520
  };
38386
38521
  }) : [];
38387
38522
  return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38426,34 +38561,66 @@ var GET_WALK_INS = createAsyncThunk("appointmentStatsApiSlice/getWalkIns", /*#__
38426
38561
  case 5:
38427
38562
  data = _context4.sent;
38428
38563
  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 (_) {
38429
- var _$Appointment31, _$Appointment31$Perso, _$Appointment31$Perso2, _$Appointment31$Perso3, _$Appointment31$Perso4, _$Appointment32, _$Appointment32$Perso, _$Appointment32$Perso2, _$Appointment32$Perso3, _$Appointment32$Perso4, _$Encounter22, _$Encounter22$patient, _$Encounter22$patient2, _$Encounter22$patient3, _$Encounter23, _$Encounter23$patient, _$Encounter23$patient2, _$Appointment33, _$Appointment34, _$Appointment35, _$Appointment36, _$Appointment37, _$Appointment37$Speci, _$Encounter24, _$Encounter24$practit, _$Encounter24$practit2, _$Appointment38, _$Appointment38$Perso, _$Appointment38$Perso2, _$Encounter$appointme4, _$Encounter25, _$Encounter25$appoint, _$Appointment39, _$Appointment39$Perso, _$Appointment39$Perso2, _$Appointment40, _$Appointment40$Perso, _$Appointment40$Perso2, _$Encounter26, _$Encounter26$patient, _$Encounter26$patient2, _$Encounter26$patient3, _$Encounter26$patient4, _$Encounter27, _$Encounter28, _$Encounter28$status;
38564
+ var _$Encounter29, _$Encounter29$patient, _$Encounter29$patient2, _$Encounter29$patient3, _$Encounter30, _$Encounter30$patient, _$Encounter30$patient2, _$Appointment30, _$Appointment30$Perso, _$Appointment30$Perso2, _$Appointment31, _$Appointment32, _$Appointment33, _$Appointment34, _$Encounter31, _$Encounter32, _$Encounter32$status, _$Encounter$appointme9, _$Encounter33, _$Encounter33$appoint, _$Encounter$appointme10, _$Encounter34, _$Encounter34$appoint, _$Encounter35, _$Encounter35$patient, _$Encounter35$patient2, _$Encounter35$patient3, _$Encounter35$patient4, _$Appointment$PersonI11, _$Appointment35, _$Appointment35$Perso, _$Appointment35$Perso2, _$Encounter$patient_i10, _$Encounter36, _$Encounter36$patient, _$Encounter36$patient2, _$Encounter$appointme11, _$Encounter37, _$Encounter37$appoint, _$Encounter38, _$Encounter38$patient, _$Encounter38$patient2, _$Encounter38$patient3, _$Encounter38$patient4, _$Appointment$PersonI12, _$Appointment36, _$Appointment36$Perso, _$Appointment36$Perso2, _$Encounter$patient_i11, _$Encounter39, _$Encounter39$patient, _$Encounter39$patient2, _$Encounter$appointme12, _$Encounter40, _$Encounter40$appoint, _$Encounter41, _$Encounter41$patient, _$Encounter41$patient2, _$Encounter41$patient3, _$Encounter41$patient4, _$Appointment$PersonI13, _$Appointment37, _$Appointment37$Perso, _$Appointment37$Perso2, _$Encounter$patient_i12, _$Encounter42, _$Encounter42$patient, _$Encounter42$patient2;
38430
38565
 
38431
38566
  return {
38432
- img: (_ === null || _ === void 0 ? void 0 : (_$Appointment31 = _.Appointment) === null || _$Appointment31 === void 0 ? void 0 : (_$Appointment31$Perso = _$Appointment31.PersonID) === null || _$Appointment31$Perso === void 0 ? void 0 : (_$Appointment31$Perso2 = _$Appointment31$Perso[0]) === null || _$Appointment31$Perso2 === void 0 ? void 0 : (_$Appointment31$Perso3 = _$Appointment31$Perso2.photo) === null || _$Appointment31$Perso3 === void 0 ? void 0 : (_$Appointment31$Perso4 = _$Appointment31$Perso3[0]) === null || _$Appointment31$Perso4 === void 0 ? void 0 : _$Appointment31$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment32 = _.Appointment) === null || _$Appointment32 === void 0 ? void 0 : (_$Appointment32$Perso = _$Appointment32.PersonID) === null || _$Appointment32$Perso === void 0 ? void 0 : (_$Appointment32$Perso2 = _$Appointment32$Perso[0]) === null || _$Appointment32$Perso2 === void 0 ? void 0 : (_$Appointment32$Perso3 = _$Appointment32$Perso2.photo) === null || _$Appointment32$Perso3 === void 0 ? void 0 : (_$Appointment32$Perso4 = _$Appointment32$Perso3[0]) === null || _$Appointment32$Perso4 === void 0 ? void 0 : _$Appointment32$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38433
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter22 = _.Encounter) === null || _$Encounter22 === void 0 ? void 0 : (_$Encounter22$patient = _$Encounter22.patient_id) === null || _$Encounter22$patient === void 0 ? void 0 : (_$Encounter22$patient2 = _$Encounter22$patient[0]) === null || _$Encounter22$patient2 === void 0 ? void 0 : (_$Encounter22$patient3 = _$Encounter22$patient2.name) === null || _$Encounter22$patient3 === void 0 ? void 0 : _$Encounter22$patient3[0]) || {}),
38434
- mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter23 = _.Encounter) === null || _$Encounter23 === void 0 ? void 0 : (_$Encounter23$patient = _$Encounter23.patient_id) === null || _$Encounter23$patient === void 0 ? void 0 : (_$Encounter23$patient2 = _$Encounter23$patient[0]) === null || _$Encounter23$patient2 === void 0 ? void 0 : _$Encounter23$patient2.MRN,
38435
- date: (_ === null || _ === void 0 ? void 0 : (_$Appointment33 = _.Appointment) === null || _$Appointment33 === void 0 ? void 0 : _$Appointment33.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment34 = _.Appointment) === null || _$Appointment34 === void 0 ? void 0 : _$Appointment34.start, "DD MMM,YYYY") : "",
38436
- time: (_ === null || _ === void 0 ? void 0 : (_$Appointment35 = _.Appointment) === null || _$Appointment35 === void 0 ? void 0 : _$Appointment35.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment36 = _.Appointment) === null || _$Appointment36 === void 0 ? void 0 : _$Appointment36.start, "hh:mm A") : "",
38437
- speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment37 = _.Appointment) === null || _$Appointment37 === void 0 ? void 0 : (_$Appointment37$Speci = _$Appointment37.SpecialtyID) === null || _$Appointment37$Speci === void 0 ? void 0 : _$Appointment37$Speci.map(function (spl) {
38438
- var _spl$coding4, _spl$coding4$;
38439
-
38440
- 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;
38441
- }).join(", "),
38442
- clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter24 = _.Encounter) === null || _$Encounter24 === void 0 ? void 0 : (_$Encounter24$practit = _$Encounter24.practitioner_details) === null || _$Encounter24$practit === void 0 ? void 0 : (_$Encounter24$practit2 = _$Encounter24$practit[0]) === null || _$Encounter24$practit2 === void 0 ? void 0 : _$Encounter24$practit2.clinic,
38443
- dob: _ === null || _ === void 0 ? void 0 : (_$Appointment38 = _.Appointment) === null || _$Appointment38 === void 0 ? void 0 : (_$Appointment38$Perso = _$Appointment38.PersonID) === null || _$Appointment38$Perso === void 0 ? void 0 : (_$Appointment38$Perso2 = _$Appointment38$Perso[0]) === null || _$Appointment38$Perso2 === void 0 ? void 0 : _$Appointment38$Perso2.birthDay,
38444
- type: "OP",
38445
- appNo: (_$Encounter$appointme4 = _ === null || _ === void 0 ? void 0 : (_$Encounter25 = _.Encounter) === null || _$Encounter25 === void 0 ? void 0 : (_$Encounter25$appoint = _$Encounter25.appointmentId) === null || _$Encounter25$appoint === void 0 ? void 0 : _$Encounter25$appoint[0]) !== null && _$Encounter$appointme4 !== void 0 ? _$Encounter$appointme4 : "",
38446
- data: _,
38447
- enId: _.Encounter.id,
38448
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment39 = _.Appointment) === null || _$Appointment39 === void 0 ? void 0 : (_$Appointment39$Perso = _$Appointment39.PersonID) === null || _$Appointment39$Perso === void 0 ? void 0 : (_$Appointment39$Perso2 = _$Appointment39$Perso[0]) === null || _$Appointment39$Perso2 === void 0 ? void 0 : _$Appointment39$Perso2.birthDay),
38449
- gender: _ === null || _ === void 0 ? void 0 : (_$Appointment40 = _.Appointment) === null || _$Appointment40 === void 0 ? void 0 : (_$Appointment40$Perso = _$Appointment40.PersonID) === null || _$Appointment40$Perso === void 0 ? void 0 : (_$Appointment40$Perso2 = _$Appointment40$Perso[0]) === null || _$Appointment40$Perso2 === void 0 ? void 0 : _$Appointment40$Perso2.gender,
38450
- contact: _ === null || _ === void 0 ? void 0 : (_$Encounter26 = _.Encounter) === null || _$Encounter26 === void 0 ? void 0 : (_$Encounter26$patient = _$Encounter26.patient_id) === null || _$Encounter26$patient === void 0 ? void 0 : (_$Encounter26$patient2 = _$Encounter26$patient[0]) === null || _$Encounter26$patient2 === void 0 ? void 0 : (_$Encounter26$patient3 = _$Encounter26$patient2.telecom) === null || _$Encounter26$patient3 === void 0 ? void 0 : (_$Encounter26$patient4 = _$Encounter26$patient3[0]) === null || _$Encounter26$patient4 === void 0 ? void 0 : _$Encounter26$patient4.value,
38451
- visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter27 = _.Encounter) === null || _$Encounter27 === void 0 ? void 0 : _$Encounter27.visit_type,
38452
- appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter28 = _.Encounter) === null || _$Encounter28 === void 0 ? void 0 : (_$Encounter28$status = _$Encounter28.status) === null || _$Encounter28$status === void 0 ? void 0 : _$Encounter28$status.display,
38453
- "Register Visit": true,
38454
- "Modify Appointment": true,
38455
- "Cancel Appointment": true,
38456
- "View Profile": true
38567
+ // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
38568
+ // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
38569
+ // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38570
+ // name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
38571
+ // mrn: _?.Encounter?.patient_id?.[0]?.MRN,
38572
+ // date: _?.Appointment?.start
38573
+ // ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
38574
+ // : "",
38575
+ // time: _?.Appointment?.start
38576
+ // ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
38577
+ // : "",
38578
+ // speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
38579
+ // return spl?.coding?.[0]?.display;
38580
+ // }).join(", "),
38581
+ // clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
38582
+ // dob: _?.Appointment?.PersonID?.[0]?.birthDay,
38583
+ // type: "OP",
38584
+ // appNo: _?.Encounter?.appointmentId?.[0] ?? "",
38585
+ // data: _,
38586
+ // enId: _.Encounter.id,
38587
+ // age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
38588
+ // gender: _?.Appointment?.PersonID?.[0]?.gender,
38589
+ // contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
38590
+ // visitType: _?.Encounter?.visit_type,
38591
+ // appointmentStatus: _?.Encounter?.status?.display,
38592
+ // "Register Visit": true,
38593
+ // "Modify Appointment": true,
38594
+ // "Cancel Appointment": true,
38595
+ // "View Profile": true,
38596
+ 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]) || {}),
38597
+ 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,
38598
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment30 = _.Appointment) === null || _$Appointment30 === void 0 ? void 0 : (_$Appointment30$Perso = _$Appointment30.PersonID) === null || _$Appointment30$Perso === void 0 ? void 0 : (_$Appointment30$Perso2 = _$Appointment30$Perso[0]) === null || _$Appointment30$Perso2 === void 0 ? void 0 : _$Appointment30$Perso2.birthDay),
38599
+ date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment31 = _.Appointment) === null || _$Appointment31 === void 0 ? void 0 : _$Appointment31.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment32 = _.Appointment) === null || _$Appointment32 === void 0 ? void 0 : _$Appointment32.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment33 = _.Appointment) === null || _$Appointment33 === void 0 ? void 0 : _$Appointment33.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment34 = _.Appointment) === null || _$Appointment34 === void 0 ? void 0 : _$Appointment34.start, "hh:mm A") : ""),
38600
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter31 = _.Encounter) === null || _$Encounter31 === void 0 ? void 0 : _$Encounter31.visit_type,
38601
+ 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,
38602
+ 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 : "",
38603
+ viewaction: JSON.stringify({
38604
+ 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 : "",
38605
+ enId: _.Encounter.id,
38606
+ 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,
38607
+ 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,
38608
+ 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
38609
+ }),
38610
+ modifyaction: JSON.stringify({
38611
+ 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 : "",
38612
+ enId: _.Encounter.id,
38613
+ 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,
38614
+ 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,
38615
+ 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
38616
+ }),
38617
+ cancelaction: JSON.stringify({
38618
+ 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 : "",
38619
+ enId: _.Encounter.id,
38620
+ 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,
38621
+ personId: (_$Appointment$PersonI13 = _ === 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.Id) !== null && _$Appointment$PersonI13 !== void 0 ? _$Appointment$PersonI13 : null,
38622
+ 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
38623
+ })
38457
38624
  };
38458
38625
  }) : [];
38459
38626
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38498,34 +38665,66 @@ var GET_NEW_PATIENTS = createAsyncThunk("appointmentStatsApiSlice/getNewPatients
38498
38665
  case 5:
38499
38666
  data = _context5.sent;
38500
38667
  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 (_) {
38501
- var _$Appointment41, _$Appointment41$Perso, _$Appointment41$Perso2, _$Appointment41$Perso3, _$Appointment41$Perso4, _$Appointment42, _$Appointment42$Perso, _$Appointment42$Perso2, _$Appointment42$Perso3, _$Appointment42$Perso4, _$Encounter29, _$Encounter29$patient, _$Encounter29$patient2, _$Encounter29$patient3, _$Encounter30, _$Encounter30$patient, _$Encounter30$patient2, _$Appointment43, _$Appointment44, _$Appointment45, _$Appointment46, _$Appointment47, _$Appointment47$Speci, _$Encounter31, _$Encounter31$practit, _$Encounter31$practit2, _$Appointment48, _$Appointment48$Perso, _$Appointment48$Perso2, _$Encounter$appointme5, _$Encounter32, _$Encounter32$appoint, _$Appointment49, _$Appointment49$Perso, _$Appointment49$Perso2, _$Appointment50, _$Appointment50$Perso, _$Appointment50$Perso2, _$Encounter33, _$Encounter33$patient, _$Encounter33$patient2, _$Encounter33$patient3, _$Encounter33$patient4, _$Encounter34, _$Encounter35, _$Encounter35$status;
38668
+ var _$Encounter43, _$Encounter43$patient, _$Encounter43$patient2, _$Encounter43$patient3, _$Encounter44, _$Encounter44$patient, _$Encounter44$patient2, _$Appointment38, _$Appointment38$Perso, _$Appointment38$Perso2, _$Appointment39, _$Appointment40, _$Appointment41, _$Appointment42, _$Encounter45, _$Encounter46, _$Encounter46$status, _$Encounter$appointme13, _$Encounter47, _$Encounter47$appoint, _$Encounter$appointme14, _$Encounter48, _$Encounter48$appoint, _$Encounter49, _$Encounter49$patient, _$Encounter49$patient2, _$Encounter49$patient3, _$Encounter49$patient4, _$Appointment$PersonI14, _$Appointment43, _$Appointment43$Perso, _$Appointment43$Perso2, _$Encounter$patient_i13, _$Encounter50, _$Encounter50$patient, _$Encounter50$patient2, _$Encounter$appointme15, _$Encounter51, _$Encounter51$appoint, _$Encounter52, _$Encounter52$patient, _$Encounter52$patient2, _$Encounter52$patient3, _$Encounter52$patient4, _$Appointment$PersonI15, _$Appointment44, _$Appointment44$Perso, _$Appointment44$Perso2, _$Encounter$patient_i14, _$Encounter53, _$Encounter53$patient, _$Encounter53$patient2, _$Encounter$appointme16, _$Encounter54, _$Encounter54$appoint, _$Encounter55, _$Encounter55$patient, _$Encounter55$patient2, _$Encounter55$patient3, _$Encounter55$patient4, _$Appointment$PersonI16, _$Appointment45, _$Appointment45$Perso, _$Appointment45$Perso2, _$Encounter$patient_i15, _$Encounter56, _$Encounter56$patient, _$Encounter56$patient2;
38502
38669
 
38503
38670
  return {
38504
- img: (_ === null || _ === void 0 ? void 0 : (_$Appointment41 = _.Appointment) === null || _$Appointment41 === void 0 ? void 0 : (_$Appointment41$Perso = _$Appointment41.PersonID) === null || _$Appointment41$Perso === void 0 ? void 0 : (_$Appointment41$Perso2 = _$Appointment41$Perso[0]) === null || _$Appointment41$Perso2 === void 0 ? void 0 : (_$Appointment41$Perso3 = _$Appointment41$Perso2.photo) === null || _$Appointment41$Perso3 === void 0 ? void 0 : (_$Appointment41$Perso4 = _$Appointment41$Perso3[0]) === null || _$Appointment41$Perso4 === void 0 ? void 0 : _$Appointment41$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment42 = _.Appointment) === null || _$Appointment42 === void 0 ? void 0 : (_$Appointment42$Perso = _$Appointment42.PersonID) === null || _$Appointment42$Perso === void 0 ? void 0 : (_$Appointment42$Perso2 = _$Appointment42$Perso[0]) === null || _$Appointment42$Perso2 === void 0 ? void 0 : (_$Appointment42$Perso3 = _$Appointment42$Perso2.photo) === null || _$Appointment42$Perso3 === void 0 ? void 0 : (_$Appointment42$Perso4 = _$Appointment42$Perso3[0]) === null || _$Appointment42$Perso4 === void 0 ? void 0 : _$Appointment42$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38505
- 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]) || {}),
38506
- 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,
38507
- date: (_ === null || _ === void 0 ? void 0 : (_$Appointment43 = _.Appointment) === null || _$Appointment43 === void 0 ? void 0 : _$Appointment43.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment44 = _.Appointment) === null || _$Appointment44 === void 0 ? void 0 : _$Appointment44.start, "DD MMM,YYYY") : "",
38508
- time: (_ === null || _ === void 0 ? void 0 : (_$Appointment45 = _.Appointment) === null || _$Appointment45 === void 0 ? void 0 : _$Appointment45.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment46 = _.Appointment) === null || _$Appointment46 === void 0 ? void 0 : _$Appointment46.start, "hh:mm A") : "",
38509
- speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment47 = _.Appointment) === null || _$Appointment47 === void 0 ? void 0 : (_$Appointment47$Speci = _$Appointment47.SpecialtyID) === null || _$Appointment47$Speci === void 0 ? void 0 : _$Appointment47$Speci.map(function (spl) {
38510
- var _spl$coding5, _spl$coding5$;
38511
-
38512
- 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;
38513
- }).join(", "),
38514
- clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter31 = _.Encounter) === null || _$Encounter31 === void 0 ? void 0 : (_$Encounter31$practit = _$Encounter31.practitioner_details) === null || _$Encounter31$practit === void 0 ? void 0 : (_$Encounter31$practit2 = _$Encounter31$practit[0]) === null || _$Encounter31$practit2 === void 0 ? void 0 : _$Encounter31$practit2.clinic,
38515
- dob: _ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : (_$Appointment48$Perso = _$Appointment48.PersonID) === null || _$Appointment48$Perso === void 0 ? void 0 : (_$Appointment48$Perso2 = _$Appointment48$Perso[0]) === null || _$Appointment48$Perso2 === void 0 ? void 0 : _$Appointment48$Perso2.birthDay,
38516
- type: "OP",
38517
- appNo: (_$Encounter$appointme5 = _ === null || _ === void 0 ? void 0 : (_$Encounter32 = _.Encounter) === null || _$Encounter32 === void 0 ? void 0 : (_$Encounter32$appoint = _$Encounter32.appointmentId) === null || _$Encounter32$appoint === void 0 ? void 0 : _$Encounter32$appoint[0]) !== null && _$Encounter$appointme5 !== void 0 ? _$Encounter$appointme5 : "",
38518
- data: _,
38519
- enId: _.Encounter.id,
38520
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment49 = _.Appointment) === null || _$Appointment49 === void 0 ? void 0 : (_$Appointment49$Perso = _$Appointment49.PersonID) === null || _$Appointment49$Perso === void 0 ? void 0 : (_$Appointment49$Perso2 = _$Appointment49$Perso[0]) === null || _$Appointment49$Perso2 === void 0 ? void 0 : _$Appointment49$Perso2.birthDay),
38521
- gender: _ === 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.gender,
38522
- contact: _ === null || _ === void 0 ? void 0 : (_$Encounter33 = _.Encounter) === null || _$Encounter33 === void 0 ? void 0 : (_$Encounter33$patient = _$Encounter33.patient_id) === null || _$Encounter33$patient === void 0 ? void 0 : (_$Encounter33$patient2 = _$Encounter33$patient[0]) === null || _$Encounter33$patient2 === void 0 ? void 0 : (_$Encounter33$patient3 = _$Encounter33$patient2.telecom) === null || _$Encounter33$patient3 === void 0 ? void 0 : (_$Encounter33$patient4 = _$Encounter33$patient3[0]) === null || _$Encounter33$patient4 === void 0 ? void 0 : _$Encounter33$patient4.value,
38523
- visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter34 = _.Encounter) === null || _$Encounter34 === void 0 ? void 0 : _$Encounter34.visit_type,
38524
- appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter35 = _.Encounter) === null || _$Encounter35 === void 0 ? void 0 : (_$Encounter35$status = _$Encounter35.status) === null || _$Encounter35$status === void 0 ? void 0 : _$Encounter35$status.display,
38525
- "Register Visit": true,
38526
- "Modify Appointment": true,
38527
- "Cancel Appointment": true,
38528
- "View Profile": true
38671
+ // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
38672
+ // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
38673
+ // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38674
+ // name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
38675
+ // mrn: _?.Encounter?.patient_id?.[0]?.MRN,
38676
+ // date: _?.Appointment?.start
38677
+ // ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
38678
+ // : "",
38679
+ // time: _?.Appointment?.start
38680
+ // ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
38681
+ // : "",
38682
+ // speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
38683
+ // return spl?.coding?.[0]?.display;
38684
+ // }).join(", "),
38685
+ // clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
38686
+ // dob: _?.Appointment?.PersonID?.[0]?.birthDay,
38687
+ // type: "OP",
38688
+ // appNo: _?.Encounter?.appointmentId?.[0] ?? "",
38689
+ // data: _,
38690
+ // enId: _.Encounter.id,
38691
+ // age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
38692
+ // gender: _?.Appointment?.PersonID?.[0]?.gender,
38693
+ // contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
38694
+ // visitType: _?.Encounter?.visit_type,
38695
+ // appointmentStatus: _?.Encounter?.status?.display,
38696
+ // "Register Visit": true,
38697
+ // "Modify Appointment": true,
38698
+ // "Cancel Appointment": true,
38699
+ // "View Profile": true,
38700
+ 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]) || {}),
38701
+ 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,
38702
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment38 = _.Appointment) === null || _$Appointment38 === void 0 ? void 0 : (_$Appointment38$Perso = _$Appointment38.PersonID) === null || _$Appointment38$Perso === void 0 ? void 0 : (_$Appointment38$Perso2 = _$Appointment38$Perso[0]) === null || _$Appointment38$Perso2 === void 0 ? void 0 : _$Appointment38$Perso2.birthDay),
38703
+ date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment39 = _.Appointment) === null || _$Appointment39 === void 0 ? void 0 : _$Appointment39.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment40 = _.Appointment) === null || _$Appointment40 === void 0 ? void 0 : _$Appointment40.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment41 = _.Appointment) === null || _$Appointment41 === void 0 ? void 0 : _$Appointment41.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment42 = _.Appointment) === null || _$Appointment42 === void 0 ? void 0 : _$Appointment42.start, "hh:mm A") : ""),
38704
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter45 = _.Encounter) === null || _$Encounter45 === void 0 ? void 0 : _$Encounter45.visit_type,
38705
+ 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,
38706
+ 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 : "",
38707
+ viewaction: JSON.stringify({
38708
+ 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 : "",
38709
+ enId: _.Encounter.id,
38710
+ 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,
38711
+ 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,
38712
+ 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
38713
+ }),
38714
+ modifyaction: JSON.stringify({
38715
+ 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 : "",
38716
+ enId: _.Encounter.id,
38717
+ 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,
38718
+ 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,
38719
+ 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
38720
+ }),
38721
+ cancelaction: JSON.stringify({
38722
+ 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 : "",
38723
+ enId: _.Encounter.id,
38724
+ 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,
38725
+ personId: (_$Appointment$PersonI16 = _ === 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.Id) !== null && _$Appointment$PersonI16 !== void 0 ? _$Appointment$PersonI16 : null,
38726
+ 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
38727
+ })
38529
38728
  };
38530
38729
  }) : [];
38531
38730
  return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38570,34 +38769,66 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
38570
38769
  case 5:
38571
38770
  data = _context6.sent;
38572
38771
  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 (_) {
38573
- var _$Appointment51, _$Appointment51$Perso, _$Appointment51$Perso2, _$Appointment51$Perso3, _$Appointment51$Perso4, _$Appointment52, _$Appointment52$Perso, _$Appointment52$Perso2, _$Appointment52$Perso3, _$Appointment52$Perso4, _$Encounter36, _$Encounter36$patient, _$Encounter36$patient2, _$Encounter36$patient3, _$Encounter37, _$Encounter37$patient, _$Encounter37$patient2, _$Appointment53, _$Appointment54, _$Appointment55, _$Appointment56, _$Appointment57, _$Appointment57$Speci, _$Encounter38, _$Encounter38$practit, _$Encounter38$practit2, _$Appointment58, _$Appointment58$Perso, _$Appointment58$Perso2, _$Encounter$appointme6, _$Encounter39, _$Encounter39$appoint, _$Appointment59, _$Appointment59$Perso, _$Appointment59$Perso2, _$Appointment60, _$Appointment60$Perso, _$Appointment60$Perso2, _$Encounter40, _$Encounter40$patient, _$Encounter40$patient2, _$Encounter40$patient3, _$Encounter40$patient4, _$Encounter41, _$Encounter42, _$Encounter42$status;
38772
+ var _$Encounter57, _$Encounter57$patient, _$Encounter57$patient2, _$Encounter57$patient3, _$Encounter58, _$Encounter58$patient, _$Encounter58$patient2, _$Appointment46, _$Appointment46$Perso, _$Appointment46$Perso2, _$Appointment47, _$Appointment48, _$Appointment49, _$Appointment50, _$Encounter59, _$Encounter60, _$Encounter60$status, _$Encounter$appointme17, _$Encounter61, _$Encounter61$appoint, _$Encounter$appointme18, _$Encounter62, _$Encounter62$appoint, _$Encounter63, _$Encounter63$patient, _$Encounter63$patient2, _$Encounter63$patient3, _$Encounter63$patient4, _$Appointment$PersonI17, _$Appointment51, _$Appointment51$Perso, _$Appointment51$Perso2, _$Encounter$patient_i16, _$Encounter64, _$Encounter64$patient, _$Encounter64$patient2, _$Encounter$appointme19, _$Encounter65, _$Encounter65$appoint, _$Encounter66, _$Encounter66$patient, _$Encounter66$patient2, _$Encounter66$patient3, _$Encounter66$patient4, _$Appointment$PersonI18, _$Appointment52, _$Appointment52$Perso, _$Appointment52$Perso2, _$Encounter$patient_i17, _$Encounter67, _$Encounter67$patient, _$Encounter67$patient2, _$Encounter$appointme20, _$Encounter68, _$Encounter68$appoint, _$Encounter69, _$Encounter69$patient, _$Encounter69$patient2, _$Encounter69$patient3, _$Encounter69$patient4, _$Appointment$PersonI19, _$Appointment53, _$Appointment53$Perso, _$Appointment53$Perso2, _$Encounter$patient_i18, _$Encounter70, _$Encounter70$patient, _$Encounter70$patient2;
38574
38773
 
38575
38774
  return {
38576
- img: (_ === 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$Perso3 = _$Appointment51$Perso2.photo) === null || _$Appointment51$Perso3 === void 0 ? void 0 : (_$Appointment51$Perso4 = _$Appointment51$Perso3[0]) === null || _$Appointment51$Perso4 === void 0 ? void 0 : _$Appointment51$Perso4.fileid) ? getImgUrl(_ === 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$Perso3 = _$Appointment52$Perso2.photo) === null || _$Appointment52$Perso3 === void 0 ? void 0 : (_$Appointment52$Perso4 = _$Appointment52$Perso3[0]) === null || _$Appointment52$Perso4 === void 0 ? void 0 : _$Appointment52$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38577
- name: makeName((_ === 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$patient3 = _$Encounter36$patient2.name) === null || _$Encounter36$patient3 === void 0 ? void 0 : _$Encounter36$patient3[0]) || {}),
38578
- mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter37 = _.Encounter) === null || _$Encounter37 === void 0 ? void 0 : (_$Encounter37$patient = _$Encounter37.patient_id) === null || _$Encounter37$patient === void 0 ? void 0 : (_$Encounter37$patient2 = _$Encounter37$patient[0]) === null || _$Encounter37$patient2 === void 0 ? void 0 : _$Encounter37$patient2.MRN,
38579
- date: (_ === null || _ === void 0 ? void 0 : (_$Appointment53 = _.Appointment) === null || _$Appointment53 === void 0 ? void 0 : _$Appointment53.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment54 = _.Appointment) === null || _$Appointment54 === void 0 ? void 0 : _$Appointment54.start, "DD MMM,YYYY") : "",
38580
- time: (_ === null || _ === void 0 ? void 0 : (_$Appointment55 = _.Appointment) === null || _$Appointment55 === void 0 ? void 0 : _$Appointment55.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment56 = _.Appointment) === null || _$Appointment56 === void 0 ? void 0 : _$Appointment56.start, "hh:mm A") : "",
38581
- speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment57 = _.Appointment) === null || _$Appointment57 === void 0 ? void 0 : (_$Appointment57$Speci = _$Appointment57.SpecialtyID) === null || _$Appointment57$Speci === void 0 ? void 0 : _$Appointment57$Speci.map(function (spl) {
38582
- var _spl$coding6, _spl$coding6$;
38583
-
38584
- 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;
38585
- }).join(", "),
38586
- clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter38 = _.Encounter) === null || _$Encounter38 === void 0 ? void 0 : (_$Encounter38$practit = _$Encounter38.practitioner_details) === null || _$Encounter38$practit === void 0 ? void 0 : (_$Encounter38$practit2 = _$Encounter38$practit[0]) === null || _$Encounter38$practit2 === void 0 ? void 0 : _$Encounter38$practit2.clinic,
38587
- dob: _ === null || _ === void 0 ? void 0 : (_$Appointment58 = _.Appointment) === null || _$Appointment58 === void 0 ? void 0 : (_$Appointment58$Perso = _$Appointment58.PersonID) === null || _$Appointment58$Perso === void 0 ? void 0 : (_$Appointment58$Perso2 = _$Appointment58$Perso[0]) === null || _$Appointment58$Perso2 === void 0 ? void 0 : _$Appointment58$Perso2.birthDay,
38588
- type: "OP",
38589
- appNo: (_$Encounter$appointme6 = _ === null || _ === void 0 ? void 0 : (_$Encounter39 = _.Encounter) === null || _$Encounter39 === void 0 ? void 0 : (_$Encounter39$appoint = _$Encounter39.appointmentId) === null || _$Encounter39$appoint === void 0 ? void 0 : _$Encounter39$appoint[0]) !== null && _$Encounter$appointme6 !== void 0 ? _$Encounter$appointme6 : "",
38590
- data: _,
38591
- enId: _.Encounter.id,
38592
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment59 = _.Appointment) === null || _$Appointment59 === void 0 ? void 0 : (_$Appointment59$Perso = _$Appointment59.PersonID) === null || _$Appointment59$Perso === void 0 ? void 0 : (_$Appointment59$Perso2 = _$Appointment59$Perso[0]) === null || _$Appointment59$Perso2 === void 0 ? void 0 : _$Appointment59$Perso2.birthDay),
38593
- gender: _ === null || _ === void 0 ? void 0 : (_$Appointment60 = _.Appointment) === null || _$Appointment60 === void 0 ? void 0 : (_$Appointment60$Perso = _$Appointment60.PersonID) === null || _$Appointment60$Perso === void 0 ? void 0 : (_$Appointment60$Perso2 = _$Appointment60$Perso[0]) === null || _$Appointment60$Perso2 === void 0 ? void 0 : _$Appointment60$Perso2.gender,
38594
- contact: _ === null || _ === void 0 ? void 0 : (_$Encounter40 = _.Encounter) === null || _$Encounter40 === void 0 ? void 0 : (_$Encounter40$patient = _$Encounter40.patient_id) === null || _$Encounter40$patient === void 0 ? void 0 : (_$Encounter40$patient2 = _$Encounter40$patient[0]) === null || _$Encounter40$patient2 === void 0 ? void 0 : (_$Encounter40$patient3 = _$Encounter40$patient2.telecom) === null || _$Encounter40$patient3 === void 0 ? void 0 : (_$Encounter40$patient4 = _$Encounter40$patient3[0]) === null || _$Encounter40$patient4 === void 0 ? void 0 : _$Encounter40$patient4.value,
38595
- visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter41 = _.Encounter) === null || _$Encounter41 === void 0 ? void 0 : _$Encounter41.visit_type,
38596
- appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter42 = _.Encounter) === null || _$Encounter42 === void 0 ? void 0 : (_$Encounter42$status = _$Encounter42.status) === null || _$Encounter42$status === void 0 ? void 0 : _$Encounter42$status.display,
38597
- "Register Visit": true,
38598
- "Modify Appointment": true,
38599
- "Cancel Appointment": true,
38600
- "View Profile": true
38775
+ // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
38776
+ // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
38777
+ // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38778
+ // name: makeName(_?.Encounter?.patient_id?.[0]?.name?.[0] || {}),
38779
+ // mrn: _?.Encounter?.patient_id?.[0]?.MRN,
38780
+ // date: _?.Appointment?.start
38781
+ // ? utcTOLocal(_?.Appointment?.start, "DD MMM,YYYY")
38782
+ // : "",
38783
+ // time: _?.Appointment?.start
38784
+ // ? utcTOLocal(_?.Appointment?.start, "hh:mm A")
38785
+ // : "",
38786
+ // speciality: _?.Appointment?.SpecialtyID?.map((spl) => {
38787
+ // return spl?.coding?.[0]?.display;
38788
+ // }).join(", "),
38789
+ // clinic: _?.Encounter?.practitioner_details?.[0]?.clinic,
38790
+ // dob: _?.Appointment?.PersonID?.[0]?.birthDay,
38791
+ // type: "OP",
38792
+ // appNo: _?.Encounter?.appointmentId?.[0] ?? "",
38793
+ // data: _,
38794
+ // enId: _.Encounter.id,
38795
+ // age: getAge(_?.Appointment?.PersonID?.[0]?.birthDay),
38796
+ // gender: _?.Appointment?.PersonID?.[0]?.gender,
38797
+ // contact: _?.Encounter?.patient_id?.[0]?.telecom?.[0]?.value,
38798
+ // visitType: _?.Encounter?.visit_type,
38799
+ // appointmentStatus: _?.Encounter?.status?.display,
38800
+ // "Register Visit": true,
38801
+ // "Modify Appointment": true,
38802
+ // "Cancel Appointment": true,
38803
+ // "View Profile": true,
38804
+ 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]) || {}),
38805
+ 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,
38806
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment46 = _.Appointment) === null || _$Appointment46 === void 0 ? void 0 : (_$Appointment46$Perso = _$Appointment46.PersonID) === null || _$Appointment46$Perso === void 0 ? void 0 : (_$Appointment46$Perso2 = _$Appointment46$Perso[0]) === null || _$Appointment46$Perso2 === void 0 ? void 0 : _$Appointment46$Perso2.birthDay),
38807
+ date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment47 = _.Appointment) === null || _$Appointment47 === void 0 ? void 0 : _$Appointment47.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : _$Appointment48.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment49 = _.Appointment) === null || _$Appointment49 === void 0 ? void 0 : _$Appointment49.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment50 = _.Appointment) === null || _$Appointment50 === void 0 ? void 0 : _$Appointment50.start, "hh:mm A") : ""),
38808
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter59 = _.Encounter) === null || _$Encounter59 === void 0 ? void 0 : _$Encounter59.visit_type,
38809
+ 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,
38810
+ 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 : "",
38811
+ viewaction: JSON.stringify({
38812
+ 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 : "",
38813
+ enId: _.Encounter.id,
38814
+ 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,
38815
+ 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,
38816
+ 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
38817
+ }),
38818
+ modifyaction: JSON.stringify({
38819
+ 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 : "",
38820
+ enId: _.Encounter.id,
38821
+ 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,
38822
+ 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,
38823
+ 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
38824
+ }),
38825
+ cancelaction: JSON.stringify({
38826
+ 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 : "",
38827
+ enId: _.Encounter.id,
38828
+ 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,
38829
+ personId: (_$Appointment$PersonI19 = _ === 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$Perso2.Id) !== null && _$Appointment$PersonI19 !== void 0 ? _$Appointment$PersonI19 : null,
38830
+ 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
38831
+ })
38601
38832
  };
38602
38833
  }) : [];
38603
38834
  return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38643,31 +38874,47 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
38643
38874
  case 5:
38644
38875
  data = _context7.sent;
38645
38876
  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 (_) {
38646
- var _$appointmentId, _$appointmentId$, _$appointmentId$$Pers, _$appointmentId$$Pers2, _$appointmentId$$Pers3, _$appointmentId$$Pers4, _$appointmentId2, _$appointmentId2$, _$appointmentId2$$Per, _$appointmentId2$$Per2, _$appointmentId2$$Per3, _$appointmentId2$$Per4, _$patient_id, _$patient_id$, _$patient_id$$name, _$patient_id2, _$patient_id2$, _$patient_id3, _$patient_id3$, _$appointmentId3, _$appointmentId3$, _$appointmentId4, _$appointmentId4$, _$appointmentId5, _$appointmentId5$, _$appointmentId6, _$appointmentId6$, _$appointmentId7, _$appointmentId7$, _$visit_type, _$appointmentId8, _$appointmentId8$, _$appointmentId8$$Spe, _$practitioner_detail, _$practitioner_detail2, _$status, _$appointmentId$0$id, _$appointmentId9, _$appointmentId9$, _$appointmentId10, _$appointmentId10$, _$appointmentId10$$Pe, _$appointmentId10$$Pe2, _$appointmentId11, _$appointmentId11$, _$appointmentId11$$Pe, _$appointmentId11$$Pe2, _$patient_id$0$teleco, _$patient_id4, _$patient_id4$, _$patient_id4$$teleco, _$patient_id4$$teleco2, _$patient_id5, _ref15;
38647
-
38648
- return _ref15 = {
38649
- 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",
38650
- 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]) || {}),
38651
- 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) || "",
38652
- 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,
38653
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : (_$appointmentId3$ = _$appointmentId3[0]) === null || _$appointmentId3$ === void 0 ? void 0 : _$appointmentId3$.appno) || "",
38654
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : _$appointmentId4$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId5 = _.appointmentId) === null || _$appointmentId5 === void 0 ? void 0 : (_$appointmentId5$ = _$appointmentId5[0]) === null || _$appointmentId5$ === void 0 ? void 0 : _$appointmentId5$.start, "DD MMM,YYYY") : "",
38655
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId6 = _.appointmentId) === null || _$appointmentId6 === void 0 ? void 0 : (_$appointmentId6$ = _$appointmentId6[0]) === null || _$appointmentId6$ === void 0 ? void 0 : _$appointmentId6$.start) ? 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, "hh:mm A") : "",
38656
- visitType: (_$visit_type = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type !== void 0 ? _$visit_type : "",
38657
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : (_$appointmentId8$$Spe = _$appointmentId8$.SpecialtyID) === null || _$appointmentId8$$Spe === void 0 ? void 0 : _$appointmentId8$$Spe.map(function (spl) {
38658
- var _spl$coding7, _spl$coding7$;
38877
+ var _$Appointment54, _$Appointment54$Perso, _$Appointment54$Perso2, _$Appointment54$Perso3, _$Appointment54$Perso4, _$Appointment55, _$Appointment55$Perso, _$Appointment55$Perso2, _$Appointment55$Perso3, _$Appointment55$Perso4, _$Appointment56, _$Appointment56$Perso, _$Appointment56$Perso2, _$Appointment56$Perso3, _$Appointment57, _$Appointment57$Perso, _$Appointment57$Perso2, _$Appointment58, _$Appointment58$Perso, _$Appointment58$Perso2, _$Appointment58$Perso3, _$Appointment$PersonI20, _$Appointment59, _$Appointment59$Perso, _$Appointment59$Perso2, _$Appointment59$Perso3, _$Appointment59$Perso4, _$Appointment60, _$Appointment61, _$Appointment62, _$Appointment63, _$Appointment64, _$Appointment$appoint2, _$Appointment65, _$Appointment$Special, _$Appointment66, _$Appointment66$Speci, _$Appointment$orgid$n, _$Appointment67, _$Appointment67$orgid, _$practitioner_detail, _$practitioner_detail2, _$Appointment68;
38659
38878
 
38660
- 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;
38661
- }).join(", "),
38879
+ return {
38880
+ img: (_ === 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) ? getImgUrl(_ === 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.photo) === null || _$Appointment55$Perso3 === void 0 ? void 0 : (_$Appointment55$Perso4 = _$Appointment55$Perso3[0]) === null || _$Appointment55$Perso4 === void 0 ? void 0 : _$Appointment55$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38881
+ name: JSON.stringify({
38882
+ name: makeName((_ === 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$Perso3 = _$Appointment56$Perso2.name) === null || _$Appointment56$Perso3 === void 0 ? void 0 : _$Appointment56$Perso3[0]) || {}),
38883
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$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$Perso2.birthDay),
38884
+ mrn: (_$Appointment58 = _.Appointment) === null || _$Appointment58 === void 0 ? void 0 : (_$Appointment58$Perso = _$Appointment58.PersonID) === null || _$Appointment58$Perso === void 0 ? void 0 : (_$Appointment58$Perso2 = _$Appointment58$Perso[0]) === null || _$Appointment58$Perso2 === void 0 ? void 0 : (_$Appointment58$Perso3 = _$Appointment58$Perso2.MRN) === null || _$Appointment58$Perso3 === void 0 ? void 0 : _$Appointment58$Perso3[0],
38885
+ // genderData: "M",
38886
+ contact: (_$Appointment$PersonI20 = (_$Appointment59 = _.Appointment) === null || _$Appointment59 === void 0 ? void 0 : (_$Appointment59$Perso = _$Appointment59.PersonID) === null || _$Appointment59$Perso === void 0 ? void 0 : (_$Appointment59$Perso2 = _$Appointment59$Perso[0]) === null || _$Appointment59$Perso2 === void 0 ? void 0 : (_$Appointment59$Perso3 = _$Appointment59$Perso2.telecom) === null || _$Appointment59$Perso3 === void 0 ? void 0 : (_$Appointment59$Perso4 = _$Appointment59$Perso3[0]) === null || _$Appointment59$Perso4 === void 0 ? void 0 : _$Appointment59$Perso4.value) !== null && _$Appointment$PersonI20 !== void 0 ? _$Appointment$PersonI20 : ""
38887
+ }),
38888
+ // mrn: _?.patient_id?.[0]?.alias || "",
38889
+ // age: _?.patient_id?.[0]?.age,
38890
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment60 = _.Appointment) === null || _$Appointment60 === void 0 ? void 0 : _$Appointment60.appno) || "",
38891
+ date: JSON.stringify({
38892
+ date: (_ === 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, "DD MMM,YYYY") : "",
38893
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment63 = _.Appointment) === null || _$Appointment63 === void 0 ? void 0 : _$Appointment63.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment64 = _.Appointment) === null || _$Appointment64 === void 0 ? void 0 : _$Appointment64.start, "hh:mm A") : ""
38894
+ }),
38895
+ visitType: (_$Appointment$appoint2 = _ === null || _ === void 0 ? void 0 : (_$Appointment65 = _.Appointment) === null || _$Appointment65 === void 0 ? void 0 : _$Appointment65.appointmentType) !== null && _$Appointment$appoint2 !== void 0 ? _$Appointment$appoint2 : "",
38896
+ speciality: JSON.stringify({
38897
+ speciality: (_$Appointment$Special = _ === null || _ === void 0 ? void 0 : (_$Appointment66 = _.Appointment) === null || _$Appointment66 === void 0 ? void 0 : (_$Appointment66$Speci = _$Appointment66.SpecialtyID) === null || _$Appointment66$Speci === void 0 ? void 0 : _$Appointment66$Speci.map(function (spl) {
38898
+ var _spl$coding, _spl$coding$;
38899
+
38900
+ 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;
38901
+ }).join(", ")) !== null && _$Appointment$Special !== void 0 ? _$Appointment$Special : "",
38902
+ clinic: (_$Appointment$orgid$n = _ === null || _ === void 0 ? void 0 : (_$Appointment67 = _.Appointment) === null || _$Appointment67 === void 0 ? void 0 : (_$Appointment67$orgid = _$Appointment67.orgid) === null || _$Appointment67$orgid === void 0 ? void 0 : _$Appointment67$orgid.name) !== null && _$Appointment$orgid$n !== void 0 ? _$Appointment$orgid$n : ""
38903
+ }),
38662
38904
  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) || "",
38663
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display) || "",
38905
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment68 = _.Appointment) === null || _$Appointment68 === void 0 ? void 0 : _$Appointment68.appstatus) || "",
38664
38906
  "View Patient": true,
38665
38907
  Attend: true,
38666
- type: "OP",
38667
- appNo: (_$appointmentId$0$id = _ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : _$appointmentId9$.id) !== null && _$appointmentId$0$id !== void 0 ? _$appointmentId$0$id : '',
38668
- data: _,
38669
- enId: _.id
38670
- }, _defineProperty(_ref15, "age", getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : (_$appointmentId10$$Pe = _$appointmentId10$.PersonID) === null || _$appointmentId10$$Pe === void 0 ? void 0 : (_$appointmentId10$$Pe2 = _$appointmentId10$$Pe[0]) === null || _$appointmentId10$$Pe2 === void 0 ? void 0 : _$appointmentId10$$Pe2.birthDay)), _defineProperty(_ref15, "gender", _ === 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$$Pe2.gender), _defineProperty(_ref15, "contact", (_$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 : ""), _defineProperty(_ref15, "pId", _ === null || _ === void 0 ? void 0 : (_$patient_id5 = _.patient_id) === null || _$patient_id5 === void 0 ? void 0 : _$patient_id5.id), _ref15;
38908
+ action: true,
38909
+ type: "OP" // appNo: _?.id ?? '',
38910
+ // // data: _,
38911
+ // enId: _.id,
38912
+ // age: getAge(_?.PersonID?.[0]?.birthDay),
38913
+ // // gender: _?.PersonID?.[0]?.gender,
38914
+ // contact: _?.PersonID?.[0]?.telecom?.[0]?.value ?? "",
38915
+ // pId : _?.patient_id?.id,
38916
+
38917
+ };
38671
38918
  }) : [];
38672
38919
  return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
38673
38920
  data: returnedData
@@ -38689,7 +38936,7 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
38689
38936
  })));
38690
38937
  var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirstVisitsNurse", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
38691
38938
  var payload,
38692
- _ref17,
38939
+ _ref16,
38693
38940
  rejectWithValue,
38694
38941
  _data$result8,
38695
38942
  data,
@@ -38701,7 +38948,7 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
38701
38948
  switch (_context8.prev = _context8.next) {
38702
38949
  case 0:
38703
38950
  payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
38704
- _ref17 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
38951
+ _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
38705
38952
  _context8.prev = 2;
38706
38953
  _context8.next = 5;
38707
38954
  return fetchData$3({
@@ -38711,31 +38958,60 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
38711
38958
  case 5:
38712
38959
  data = _context8.sent;
38713
38960
  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 (_) {
38714
- var _$appointmentId12, _$appointmentId12$, _$appointmentId12$$Pe, _$appointmentId12$$Pe2, _$appointmentId12$$Pe3, _$appointmentId12$$Pe4, _$appointmentId13, _$appointmentId13$, _$appointmentId13$$Pe, _$appointmentId13$$Pe2, _$appointmentId13$$Pe3, _$appointmentId13$$Pe4, _$patient_id6, _$patient_id6$, _$patient_id6$$name, _$patient_id7, _$patient_id7$, _$patient_id8, _$patient_id8$, _$appointmentId14, _$appointmentId14$, _$appointmentId15, _$appointmentId15$, _$appointmentId16, _$appointmentId16$, _$appointmentId17, _$appointmentId17$, _$appointmentId18, _$appointmentId18$, _$visit_type2, _$appointmentId19, _$appointmentId19$, _$appointmentId19$$Sp, _$practitioner_detail3, _$practitioner_detail4, _$status2, _$appointmentId$0$id2, _$appointmentId20, _$appointmentId20$, _$appointmentId21, _$appointmentId21$, _$appointmentId21$$Pe, _$appointmentId21$$Pe2, _$appointmentId22, _$appointmentId22$, _$appointmentId22$$Pe, _$appointmentId22$$Pe2, _$patient_id$0$teleco2, _$patient_id9, _$patient_id9$, _$patient_id9$$teleco, _$patient_id9$$teleco2, _$patient_id10, _ref18;
38715
-
38716
- return _ref18 = {
38717
- img: (_ === 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) ? getImgUrl(_ === 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$$Pe3 = _$appointmentId13$$Pe2.photo) === null || _$appointmentId13$$Pe3 === void 0 ? void 0 : (_$appointmentId13$$Pe4 = _$appointmentId13$$Pe3[0]) === null || _$appointmentId13$$Pe4 === void 0 ? void 0 : _$appointmentId13$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38718
- name: makeName((_ === 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$$name = _$patient_id6$.name) === null || _$patient_id6$$name === void 0 ? void 0 : _$patient_id6$$name[0]) || {}),
38719
- mrn: (_ === 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$.alias) || "",
38720
- age: _ === 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$.age,
38721
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId14 = _.appointmentId) === null || _$appointmentId14 === void 0 ? void 0 : (_$appointmentId14$ = _$appointmentId14[0]) === null || _$appointmentId14$ === void 0 ? void 0 : _$appointmentId14$.appno) || "",
38722
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : _$appointmentId15$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : _$appointmentId16$.start, "DD MMM,YYYY") : "",
38723
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : _$appointmentId17$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : _$appointmentId18$.start, "hh:mm A") : "",
38724
- visitType: (_$visit_type2 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type2 !== void 0 ? _$visit_type2 : "",
38725
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId19 = _.appointmentId) === null || _$appointmentId19 === void 0 ? void 0 : (_$appointmentId19$ = _$appointmentId19[0]) === null || _$appointmentId19$ === void 0 ? void 0 : (_$appointmentId19$$Sp = _$appointmentId19$.SpecialtyID) === null || _$appointmentId19$$Sp === void 0 ? void 0 : _$appointmentId19$$Sp.map(function (spl) {
38726
- var _spl$coding8, _spl$coding8$;
38961
+ 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;
38727
38962
 
38728
- 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;
38729
- }).join(", "),
38730
- 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) || "",
38731
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display) || "",
38732
- "View Patient": true,
38733
- Attend: true,
38734
- type: "OP",
38735
- appNo: (_$appointmentId$0$id2 = _ === null || _ === void 0 ? void 0 : (_$appointmentId20 = _.appointmentId) === null || _$appointmentId20 === void 0 ? void 0 : (_$appointmentId20$ = _$appointmentId20[0]) === null || _$appointmentId20$ === void 0 ? void 0 : _$appointmentId20$.id) !== null && _$appointmentId$0$id2 !== void 0 ? _$appointmentId$0$id2 : '',
38736
- data: _,
38737
- enId: _.id
38738
- }, _defineProperty(_ref18, "age", getAge(_ === 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$$Pe2.birthDay)), _defineProperty(_ref18, "gender", _ === 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$$Pe2.gender), _defineProperty(_ref18, "contact", (_$patient_id$0$teleco2 = _ === 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$teleco2 !== void 0 ? _$patient_id$0$teleco2 : ""), _defineProperty(_ref18, "pId", _ === null || _ === void 0 ? void 0 : (_$patient_id10 = _.patient_id) === null || _$patient_id10 === void 0 ? void 0 : _$patient_id10.id), _ref18;
38963
+ return {
38964
+ 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",
38965
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
38966
+ // mrn: _?.patient_id?.[0]?.alias || "",
38967
+ // age: _?.patient_id?.[0]?.age,
38968
+ // refNo: _?.appointmentId?.[0]?.appno || "",
38969
+ // date: _?.appointmentId?.[0]?.start
38970
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
38971
+ // : "",
38972
+ // time: _?.appointmentId?.[0]?.start
38973
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
38974
+ // : "",
38975
+ // visitType: _?.visit_type ?? "",
38976
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
38977
+ // return spl?.coding?.[0]?.display;
38978
+ // }).join(", "),
38979
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
38980
+ // appointmentStatus: _?.status?.display || "",
38981
+ // "View Patient": true,
38982
+ // Attend: true,
38983
+ // type: "OP",
38984
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
38985
+ // data: _,
38986
+ // enId: _.id,
38987
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
38988
+ // // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
38989
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
38990
+ // pId: _?.patient_id?.id ?? "",
38991
+ name: JSON.stringify({
38992
+ 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]) || {}),
38993
+ 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),
38994
+ 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) || "",
38995
+ 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 : "",
38996
+ 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 : ""
38997
+ }),
38998
+ 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) || "",
38999
+ date: JSON.stringify({
39000
+ 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") : "",
39001
+ 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") : ""
39002
+ }),
39003
+ visitType: (_$visit_type = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type !== void 0 ? _$visit_type : "",
39004
+ speciality: JSON.stringify({
39005
+ 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) {
39006
+ var _spl$coding2, _spl$coding2$;
39007
+
39008
+ 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;
39009
+ }).join(", "),
39010
+ 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) || ""
39011
+ }),
39012
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display) || "",
39013
+ action: true
39014
+ };
38739
39015
  }) : [];
38740
39016
  return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
38741
39017
  data: returnedData
@@ -38757,7 +39033,7 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
38757
39033
  })));
38758
39034
  var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPatientsNurse", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
38759
39035
  var payload,
38760
- _ref20,
39036
+ _ref18,
38761
39037
  rejectWithValue,
38762
39038
  _data$result9,
38763
39039
  data,
@@ -38769,7 +39045,7 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
38769
39045
  switch (_context9.prev = _context9.next) {
38770
39046
  case 0:
38771
39047
  payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
38772
- _ref20 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
39048
+ _ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
38773
39049
  _context9.prev = 2;
38774
39050
  _context9.next = 5;
38775
39051
  return fetchData$3({
@@ -38779,31 +39055,60 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
38779
39055
  case 5:
38780
39056
  data = _context9.sent;
38781
39057
  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 (_) {
38782
- var _$appointmentId23, _$appointmentId23$, _$appointmentId23$$Pe, _$appointmentId23$$Pe2, _$appointmentId23$$Pe3, _$appointmentId23$$Pe4, _$appointmentId24, _$appointmentId24$, _$appointmentId24$$Pe, _$appointmentId24$$Pe2, _$appointmentId24$$Pe3, _$appointmentId24$$Pe4, _$patient_id11, _$patient_id11$, _$patient_id11$$name, _$patient_id12, _$patient_id12$, _$patient_id13, _$patient_id13$, _$appointmentId25, _$appointmentId25$, _$appointmentId26, _$appointmentId26$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$visit_type3, _$appointmentId30, _$appointmentId30$, _$appointmentId30$$Sp, _$practitioner_detail5, _$practitioner_detail6, _$status3, _$appointmentId$0$id3, _$appointmentId31, _$appointmentId31$, _$appointmentId32, _$appointmentId32$, _$appointmentId32$$Pe, _$appointmentId32$$Pe2, _$appointmentId33, _$appointmentId33$, _$appointmentId33$$Pe, _$appointmentId33$$Pe2, _$patient_id$0$teleco3, _$patient_id14, _$patient_id14$, _$patient_id14$$telec, _$patient_id14$$telec2, _$patient_id15, _ref21;
39058
+ 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;
38783
39059
 
38784
- return _ref21 = {
38785
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId23 = _.appointmentId) === null || _$appointmentId23 === void 0 ? void 0 : (_$appointmentId23$ = _$appointmentId23[0]) === null || _$appointmentId23$ === void 0 ? void 0 : (_$appointmentId23$$Pe = _$appointmentId23$.PersonID) === null || _$appointmentId23$$Pe === void 0 ? void 0 : (_$appointmentId23$$Pe2 = _$appointmentId23$$Pe[0]) === null || _$appointmentId23$$Pe2 === void 0 ? void 0 : (_$appointmentId23$$Pe3 = _$appointmentId23$$Pe2.photo) === null || _$appointmentId23$$Pe3 === void 0 ? void 0 : (_$appointmentId23$$Pe4 = _$appointmentId23$$Pe3[0]) === null || _$appointmentId23$$Pe4 === void 0 ? void 0 : _$appointmentId23$$Pe4.fileid) ? getImgUrl(_ === 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$$Pe3 = _$appointmentId24$$Pe2.photo) === null || _$appointmentId24$$Pe3 === void 0 ? void 0 : (_$appointmentId24$$Pe4 = _$appointmentId24$$Pe3[0]) === null || _$appointmentId24$$Pe4 === void 0 ? void 0 : _$appointmentId24$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38786
- name: makeName((_ === 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$$name = _$patient_id11$.name) === null || _$patient_id11$$name === void 0 ? void 0 : _$patient_id11$$name[0]) || {}),
38787
- mrn: (_ === 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$.alias) || "",
38788
- age: _ === 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$.age,
38789
- 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) || "",
38790
- 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") : "",
38791
- 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") : "",
38792
- visitType: (_$visit_type3 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type3 !== void 0 ? _$visit_type3 : "",
38793
- 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) {
38794
- var _spl$coding9, _spl$coding9$;
39060
+ return {
39061
+ 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",
39062
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39063
+ // mrn: _?.patient_id?.[0]?.alias || "",
39064
+ // age: _?.patient_id?.[0]?.age,
39065
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39066
+ // date: _?.appointmentId?.[0]?.start
39067
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39068
+ // : "",
39069
+ // time: _?.appointmentId?.[0]?.start
39070
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39071
+ // : "",
39072
+ // visitType: _?.visit_type ?? "",
39073
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39074
+ // return spl?.coding?.[0]?.display;
39075
+ // }).join(", "),
39076
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39077
+ // appointmentStatus: _?.status?.display || "",
39078
+ // "View Patient": true,
39079
+ // Attend: true,
39080
+ // type: "OP",
39081
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39082
+ // data: _,
39083
+ // enId: _.id,
39084
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39085
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39086
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39087
+ // pId: _?.patient_id?.id,
39088
+ name: JSON.stringify({
39089
+ 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]) || {}),
39090
+ 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),
39091
+ 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) || "",
39092
+ 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 : "",
39093
+ 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 : ""
39094
+ }),
39095
+ 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) || "",
39096
+ date: JSON.stringify({
39097
+ 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") : "",
39098
+ 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") : ""
39099
+ }),
39100
+ visitType: (_$visit_type2 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type2 !== void 0 ? _$visit_type2 : "",
39101
+ speciality: JSON.stringify({
39102
+ 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) {
39103
+ var _spl$coding3, _spl$coding3$;
38795
39104
 
38796
- 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;
38797
- }).join(", "),
38798
- 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) || "",
38799
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display) || "",
38800
- "View Patient": true,
38801
- Attend: true,
38802
- type: "OP",
38803
- appNo: (_$appointmentId$0$id3 = _ === null || _ === void 0 ? void 0 : (_$appointmentId31 = _.appointmentId) === null || _$appointmentId31 === void 0 ? void 0 : (_$appointmentId31$ = _$appointmentId31[0]) === null || _$appointmentId31$ === void 0 ? void 0 : _$appointmentId31$.id) !== null && _$appointmentId$0$id3 !== void 0 ? _$appointmentId$0$id3 : '',
38804
- data: _,
38805
- enId: _.id
38806
- }, _defineProperty(_ref21, "age", getAge(_ === 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$$Pe2.birthDay)), _defineProperty(_ref21, "gender", _ === 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.gender), _defineProperty(_ref21, "contact", (_$patient_id$0$teleco3 = _ === 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$$telec = _$patient_id14$.telecom) === null || _$patient_id14$$telec === void 0 ? void 0 : (_$patient_id14$$telec2 = _$patient_id14$$telec[0]) === null || _$patient_id14$$telec2 === void 0 ? void 0 : _$patient_id14$$telec2.value) !== null && _$patient_id$0$teleco3 !== void 0 ? _$patient_id$0$teleco3 : ""), _defineProperty(_ref21, "pId", _ === null || _ === void 0 ? void 0 : (_$patient_id15 = _.patient_id) === null || _$patient_id15 === void 0 ? void 0 : _$patient_id15.id), _ref21;
39105
+ 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;
39106
+ }).join(", "),
39107
+ 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) || ""
39108
+ }),
39109
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display) || "",
39110
+ action: true
39111
+ };
38807
39112
  }) : [];
38808
39113
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
38809
39114
  data: returnedData
@@ -38825,7 +39130,7 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
38825
39130
  })));
38826
39131
  var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOtherVisitsNurse", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
38827
39132
  var payload,
38828
- _ref23,
39133
+ _ref20,
38829
39134
  rejectWithValue,
38830
39135
  _data$result10,
38831
39136
  data,
@@ -38837,7 +39142,7 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
38837
39142
  switch (_context10.prev = _context10.next) {
38838
39143
  case 0:
38839
39144
  payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
38840
- _ref23 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
39145
+ _ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
38841
39146
  _context10.prev = 2;
38842
39147
  _context10.next = 5;
38843
39148
  return fetchData$3({
@@ -38847,31 +39152,60 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
38847
39152
  case 5:
38848
39153
  data = _context10.sent;
38849
39154
  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 (_) {
38850
- var _$appointmentId34, _$appointmentId34$, _$appointmentId34$$Pe, _$appointmentId34$$Pe2, _$appointmentId34$$Pe3, _$appointmentId34$$Pe4, _$appointmentId35, _$appointmentId35$, _$appointmentId35$$Pe, _$appointmentId35$$Pe2, _$appointmentId35$$Pe3, _$appointmentId35$$Pe4, _$patient_id16, _$patient_id16$, _$patient_id16$$name, _$patient_id17, _$patient_id17$, _$patient_id18, _$patient_id18$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId38, _$appointmentId38$, _$appointmentId39, _$appointmentId39$, _$appointmentId40, _$appointmentId40$, _$visit_type4, _$appointmentId41, _$appointmentId41$, _$appointmentId41$$Sp, _$practitioner_detail7, _$practitioner_detail8, _$status4, _$appointmentId$0$id4, _$appointmentId42, _$appointmentId42$, _$appointmentId43, _$appointmentId43$, _$appointmentId43$$Pe, _$appointmentId43$$Pe2, _$appointmentId44, _$appointmentId44$, _$appointmentId44$$Pe, _$appointmentId44$$Pe2, _$patient_id$0$teleco4, _$patient_id19, _$patient_id19$, _$patient_id19$$telec, _$patient_id19$$telec2, _$patient_id20, _ref24;
38851
-
38852
- return _ref24 = {
38853
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId34 = _.appointmentId) === null || _$appointmentId34 === void 0 ? void 0 : (_$appointmentId34$ = _$appointmentId34[0]) === null || _$appointmentId34$ === void 0 ? void 0 : (_$appointmentId34$$Pe = _$appointmentId34$.PersonID) === null || _$appointmentId34$$Pe === void 0 ? void 0 : (_$appointmentId34$$Pe2 = _$appointmentId34$$Pe[0]) === null || _$appointmentId34$$Pe2 === void 0 ? void 0 : (_$appointmentId34$$Pe3 = _$appointmentId34$$Pe2.photo) === null || _$appointmentId34$$Pe3 === void 0 ? void 0 : (_$appointmentId34$$Pe4 = _$appointmentId34$$Pe3[0]) === null || _$appointmentId34$$Pe4 === void 0 ? void 0 : _$appointmentId34$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId35 = _.appointmentId) === null || _$appointmentId35 === void 0 ? void 0 : (_$appointmentId35$ = _$appointmentId35[0]) === null || _$appointmentId35$ === void 0 ? void 0 : (_$appointmentId35$$Pe = _$appointmentId35$.PersonID) === null || _$appointmentId35$$Pe === void 0 ? void 0 : (_$appointmentId35$$Pe2 = _$appointmentId35$$Pe[0]) === null || _$appointmentId35$$Pe2 === void 0 ? void 0 : (_$appointmentId35$$Pe3 = _$appointmentId35$$Pe2.photo) === null || _$appointmentId35$$Pe3 === void 0 ? void 0 : (_$appointmentId35$$Pe4 = _$appointmentId35$$Pe3[0]) === null || _$appointmentId35$$Pe4 === void 0 ? void 0 : _$appointmentId35$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38854
- 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]) || {}),
38855
- 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$.alias) || "",
38856
- age: _ === 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$.age,
38857
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : _$appointmentId36$.appno) || "",
38858
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : _$appointmentId37$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : _$appointmentId38$.start, "DD MMM,YYYY") : "",
38859
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : _$appointmentId39$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : _$appointmentId40$.start, "hh:mm A") : "",
38860
- visitType: (_$visit_type4 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type4 !== void 0 ? _$visit_type4 : "",
38861
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId41 = _.appointmentId) === null || _$appointmentId41 === void 0 ? void 0 : (_$appointmentId41$ = _$appointmentId41[0]) === null || _$appointmentId41$ === void 0 ? void 0 : (_$appointmentId41$$Sp = _$appointmentId41$.SpecialtyID) === null || _$appointmentId41$$Sp === void 0 ? void 0 : _$appointmentId41$$Sp.map(function (spl) {
38862
- var _spl$coding10, _spl$coding10$;
39155
+ 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;
38863
39156
 
38864
- 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;
38865
- }).join(", "),
38866
- 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) || "",
38867
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display) || "",
38868
- "View Patient": true,
38869
- Attend: true,
38870
- type: "OP",
38871
- appNo: (_$appointmentId$0$id4 = _ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : _$appointmentId42$.id) !== null && _$appointmentId$0$id4 !== void 0 ? _$appointmentId$0$id4 : '',
38872
- data: _,
38873
- enId: _.id
38874
- }, _defineProperty(_ref24, "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)), _defineProperty(_ref24, "gender", _ === 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), _defineProperty(_ref24, "contact", (_$patient_id$0$teleco4 = _ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : (_$patient_id19$$telec = _$patient_id19$.telecom) === null || _$patient_id19$$telec === void 0 ? void 0 : (_$patient_id19$$telec2 = _$patient_id19$$telec[0]) === null || _$patient_id19$$telec2 === void 0 ? void 0 : _$patient_id19$$telec2.value) !== null && _$patient_id$0$teleco4 !== void 0 ? _$patient_id$0$teleco4 : ""), _defineProperty(_ref24, "pId", _ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : _$patient_id20.id), _ref24;
39157
+ return {
39158
+ 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",
39159
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39160
+ // mrn: _?.patient_id?.[0]?.alias || "",
39161
+ // age: _?.patient_id?.[0]?.age,
39162
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39163
+ // date: _?.appointmentId?.[0]?.start
39164
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39165
+ // : "",
39166
+ // time: _?.appointmentId?.[0]?.start
39167
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39168
+ // : "",
39169
+ // visitType: _?.visit_type ?? "",
39170
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39171
+ // return spl?.coding?.[0]?.display;
39172
+ // }).join(", "),
39173
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39174
+ // appointmentStatus: _?.status?.display || "",
39175
+ // "View Patient": true,
39176
+ // Attend: true,
39177
+ // type: "OP",
39178
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39179
+ // data: _,
39180
+ // enId: _.id,
39181
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39182
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39183
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39184
+ // pId: _?.patient_id?.id,
39185
+ name: JSON.stringify({
39186
+ 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]) || {}),
39187
+ 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),
39188
+ 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) || "",
39189
+ 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 : "",
39190
+ 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 : ""
39191
+ }),
39192
+ 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) || "",
39193
+ date: JSON.stringify({
39194
+ 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") : "",
39195
+ 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") : ""
39196
+ }),
39197
+ visitType: (_$visit_type3 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type3 !== void 0 ? _$visit_type3 : "",
39198
+ speciality: JSON.stringify({
39199
+ 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) {
39200
+ var _spl$coding4, _spl$coding4$;
39201
+
39202
+ 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;
39203
+ }).join(", "),
39204
+ 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) || ""
39205
+ }),
39206
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display) || "",
39207
+ action: true
39208
+ };
38875
39209
  }) : [];
38876
39210
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
38877
39211
  data: returnedData
@@ -38893,7 +39227,7 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
38893
39227
  })));
38894
39228
  var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getTodayVisitsNurse", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
38895
39229
  var payload,
38896
- _ref26,
39230
+ _ref22,
38897
39231
  rejectWithValue,
38898
39232
  _data$result11,
38899
39233
  data,
@@ -38905,7 +39239,7 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38905
39239
  switch (_context11.prev = _context11.next) {
38906
39240
  case 0:
38907
39241
  payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
38908
- _ref26 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
39242
+ _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
38909
39243
  _context11.prev = 2;
38910
39244
  _context11.next = 5;
38911
39245
  return fetchData$3({
@@ -38915,30 +39249,59 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38915
39249
  case 5:
38916
39250
  data = _context11.sent;
38917
39251
  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 (_) {
38918
- var _$appointmentId45, _$appointmentId45$, _$appointmentId45$$Pe, _$appointmentId45$$Pe2, _$appointmentId45$$Pe3, _$appointmentId46, _$appointmentId46$, _$appointmentId46$$Pe, _$appointmentId46$$Pe2, _$appointmentId46$$Pe3, _$patient_id21, _$patient_id21$, _$patient_id21$$name, _$patient_id22, _$patient_id22$, _$patient_id23, _$patient_id23$, _$appointmentId47, _$appointmentId47$, _$appointmentId48, _$appointmentId48$, _$appointmentId49, _$appointmentId49$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId51$$Sp, _$patient_id24, _$patient_id24$, _$patient_id24$$telec, _$patient_id24$$telec2, _$status5, _$appointmentId$0$id5, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$appointmentId53$$Pe, _$appointmentId53$$Pe2, _$appointmentId54, _$appointmentId54$, _$appointmentId54$$Pe, _$appointmentId54$$Pe2, _$patient_id$0$teleco5, _$patient_id25, _$patient_id25$, _$patient_id25$$telec, _$patient_id25$$telec2, _$patient_id26, _ref27;
38919
-
38920
- return _ref27 = {
38921
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : (_$appointmentId45$$Pe = _$appointmentId45$.PersonID) === null || _$appointmentId45$$Pe === void 0 ? void 0 : (_$appointmentId45$$Pe2 = _$appointmentId45$$Pe[0]) === null || _$appointmentId45$$Pe2 === void 0 ? void 0 : (_$appointmentId45$$Pe3 = _$appointmentId45$$Pe2.photo[0]) === null || _$appointmentId45$$Pe3 === void 0 ? void 0 : _$appointmentId45$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : (_$appointmentId46$$Pe = _$appointmentId46$.PersonID) === null || _$appointmentId46$$Pe === void 0 ? void 0 : (_$appointmentId46$$Pe2 = _$appointmentId46$$Pe[0]) === null || _$appointmentId46$$Pe2 === void 0 ? void 0 : (_$appointmentId46$$Pe3 = _$appointmentId46$$Pe2.photo[0]) === null || _$appointmentId46$$Pe3 === void 0 ? void 0 : _$appointmentId46$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38922
- name: makeName((_ === 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$$name = _$patient_id21$.name) === null || _$patient_id21$$name === void 0 ? void 0 : _$patient_id21$$name[0]) || {}),
38923
- mrn: _ === 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$.MRN,
38924
- age: _ === 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$.age,
38925
- orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : _$appointmentId47$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : _$appointmentId48$.start, "DD MMM,YYYY") : "",
38926
- orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : _$appointmentId49$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : _$appointmentId50$.start, "hh:mm A") : "",
38927
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : (_$appointmentId51$$Sp = _$appointmentId51$.SpecialtyID) === null || _$appointmentId51$$Sp === void 0 ? void 0 : _$appointmentId51$$Sp.map(function (spl) {
38928
- var _spl$coding11, _spl$coding11$;
38929
-
38930
- 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;
38931
- }).join(", "),
38932
- ward: "Ward 1",
38933
- contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id24 = _.patient_id) === null || _$patient_id24 === void 0 ? void 0 : (_$patient_id24$ = _$patient_id24[0]) === null || _$patient_id24$ === void 0 ? void 0 : (_$patient_id24$$telec = _$patient_id24$.telecom) === null || _$patient_id24$$telec === void 0 ? void 0 : (_$patient_id24$$telec2 = _$patient_id24$$telec[0]) === null || _$patient_id24$$telec2 === void 0 ? void 0 : _$patient_id24$$telec2.value),
38934
- visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
38935
- encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display,
38936
- view: true,
38937
- type: "OP",
38938
- appNo: (_$appointmentId$0$id5 = _ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : _$appointmentId52$.id) !== null && _$appointmentId$0$id5 !== void 0 ? _$appointmentId$0$id5 : '',
38939
- data: _,
38940
- enId: _.id
38941
- }, _defineProperty(_ref27, "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)), _defineProperty(_ref27, "gender", _ === 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), _defineProperty(_ref27, "contact", (_$patient_id$0$teleco5 = _ === 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$$telec = _$patient_id25$.telecom) === null || _$patient_id25$$telec === void 0 ? void 0 : (_$patient_id25$$telec2 = _$patient_id25$$telec[0]) === null || _$patient_id25$$telec2 === void 0 ? void 0 : _$patient_id25$$telec2.value) !== null && _$patient_id$0$teleco5 !== void 0 ? _$patient_id$0$teleco5 : ""), _defineProperty(_ref27, "pId", _ === null || _ === void 0 ? void 0 : (_$patient_id26 = _.patient_id) === null || _$patient_id26 === void 0 ? void 0 : _$patient_id26.id), _ref27;
39252
+ 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;
39253
+
39254
+ return {
39255
+ 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",
39256
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39257
+ // mrn: _?.patient_id?.[0]?.MRN,
39258
+ // age: _?.patient_id?.[0]?.age,
39259
+ // orderDate: _?.appointmentId?.[0]?.start
39260
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39261
+ // : "",
39262
+ // orderTime: _?.appointmentId?.[0]?.start
39263
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39264
+ // : "",
39265
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39266
+ // return spl?.coding?.[0]?.display;
39267
+ // }).join(", "),
39268
+ // ward: "Ward 1",
39269
+ // contact: JSON.stringify(_?.patient_id?.[0]?.telecom?.[0]?.value),
39270
+ // visittype: _?.visit_type || "",
39271
+ // encounterStatus: _?.status?.display,
39272
+ // view: true,
39273
+ // type: "OP",
39274
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39275
+ // data: _,
39276
+ // enId: _.id,
39277
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39278
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39279
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39280
+ // pId: _?.patient_id?.id,
39281
+ name: JSON.stringify({
39282
+ 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]) || {}),
39283
+ 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),
39284
+ 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) || "",
39285
+ 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 : "",
39286
+ 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 : ""
39287
+ }),
39288
+ 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) || "",
39289
+ date: JSON.stringify({
39290
+ 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") : "",
39291
+ 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") : ""
39292
+ }),
39293
+ visitType: (_$visit_type4 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type4 !== void 0 ? _$visit_type4 : "",
39294
+ speciality: JSON.stringify({
39295
+ 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) {
39296
+ var _spl$coding5, _spl$coding5$;
39297
+
39298
+ 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;
39299
+ }).join(", "),
39300
+ 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) || ""
39301
+ }),
39302
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display) || "",
39303
+ action: true
39304
+ };
38942
39305
  }) : [];
38943
39306
  return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
38944
39307
  data: returnedData
@@ -38960,7 +39323,7 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38960
39323
  })));
38961
39324
  var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNurse", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
38962
39325
  var payload,
38963
- _ref29,
39326
+ _ref24,
38964
39327
  rejectWithValue,
38965
39328
  _data$result12,
38966
39329
  data,
@@ -38972,7 +39335,7 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
38972
39335
  switch (_context12.prev = _context12.next) {
38973
39336
  case 0:
38974
39337
  payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
38975
- _ref29 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
39338
+ _ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
38976
39339
  _context12.prev = 2;
38977
39340
  _context12.next = 5;
38978
39341
  return fetchData$3({
@@ -38982,31 +39345,60 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
38982
39345
  case 5:
38983
39346
  data = _context12.sent;
38984
39347
  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 (_) {
38985
- var _$appointmentId55, _$appointmentId55$, _$appointmentId55$$Pe, _$appointmentId55$$Pe2, _$appointmentId55$$Pe3, _$appointmentId55$$Pe4, _$appointmentId56, _$appointmentId56$, _$appointmentId56$$Pe, _$appointmentId56$$Pe2, _$appointmentId56$$Pe3, _$appointmentId56$$Pe4, _$patient_id27, _$patient_id27$, _$patient_id27$$name, _$patient_id28, _$patient_id28$, _$patient_id29, _$patient_id29$, _$appointmentId57, _$appointmentId57$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$appointmentId60, _$appointmentId60$, _$appointmentId61, _$appointmentId61$, _$visit_type5, _$appointmentId62, _$appointmentId62$, _$appointmentId62$$Sp, _$practitioner_detail9, _$practitioner_detail10, _$status6, _$appointmentId$0$id6, _$appointmentId63, _$appointmentId63$, _$appointmentId64, _$appointmentId64$, _$appointmentId64$$Pe, _$appointmentId64$$Pe2, _$appointmentId65, _$appointmentId65$, _$appointmentId65$$Pe, _$appointmentId65$$Pe2, _$patient_id$0$teleco6, _$patient_id30, _$patient_id30$, _$patient_id30$$telec, _$patient_id30$$telec2, _$patient_id31, _ref30;
38986
-
38987
- return _ref30 = {
38988
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : (_$appointmentId55$$Pe = _$appointmentId55$.PersonID) === null || _$appointmentId55$$Pe === void 0 ? void 0 : (_$appointmentId55$$Pe2 = _$appointmentId55$$Pe[0]) === null || _$appointmentId55$$Pe2 === void 0 ? void 0 : (_$appointmentId55$$Pe3 = _$appointmentId55$$Pe2.photo) === null || _$appointmentId55$$Pe3 === void 0 ? void 0 : (_$appointmentId55$$Pe4 = _$appointmentId55$$Pe3[0]) === null || _$appointmentId55$$Pe4 === void 0 ? void 0 : _$appointmentId55$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : (_$appointmentId56$$Pe = _$appointmentId56$.PersonID) === null || _$appointmentId56$$Pe === void 0 ? void 0 : (_$appointmentId56$$Pe2 = _$appointmentId56$$Pe[0]) === null || _$appointmentId56$$Pe2 === void 0 ? void 0 : (_$appointmentId56$$Pe3 = _$appointmentId56$$Pe2.photo) === null || _$appointmentId56$$Pe3 === void 0 ? void 0 : (_$appointmentId56$$Pe4 = _$appointmentId56$$Pe3[0]) === null || _$appointmentId56$$Pe4 === void 0 ? void 0 : _$appointmentId56$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38989
- name: makeName((_ === 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$$name = _$patient_id27$.name) === null || _$patient_id27$$name === void 0 ? void 0 : _$patient_id27$$name[0]) || {}),
38990
- mrn: (_ === 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$.alias) || "",
38991
- age: _ === 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$.age,
38992
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : _$appointmentId57$.appno) || "",
38993
- date: (_ === 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, "DD MMM,YYYY") : "",
38994
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : _$appointmentId60$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : _$appointmentId61$.start, "hh:mm A") : "",
38995
- visitType: (_$visit_type5 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type5 !== void 0 ? _$visit_type5 : "Walk-Ins",
38996
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId62 = _.appointmentId) === null || _$appointmentId62 === void 0 ? void 0 : (_$appointmentId62$ = _$appointmentId62[0]) === null || _$appointmentId62$ === void 0 ? void 0 : (_$appointmentId62$$Sp = _$appointmentId62$.SpecialtyID) === null || _$appointmentId62$$Sp === void 0 ? void 0 : _$appointmentId62$$Sp.map(function (spl) {
38997
- var _spl$coding12, _spl$coding12$;
38998
-
38999
- 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;
39000
- }).join(", "),
39001
- 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) || "",
39002
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display) || "",
39003
- "View Patient": true,
39004
- Attend: true,
39005
- type: "OP",
39006
- appNo: (_$appointmentId$0$id6 = _ === null || _ === void 0 ? void 0 : (_$appointmentId63 = _.appointmentId) === null || _$appointmentId63 === void 0 ? void 0 : (_$appointmentId63$ = _$appointmentId63[0]) === null || _$appointmentId63$ === void 0 ? void 0 : _$appointmentId63$.id) !== null && _$appointmentId$0$id6 !== void 0 ? _$appointmentId$0$id6 : '',
39007
- data: _,
39008
- enId: _.id
39009
- }, _defineProperty(_ref30, "age", getAge(_ === 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.birthDay)), _defineProperty(_ref30, "gender", _ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : (_$appointmentId65$$Pe = _$appointmentId65$.PersonID) === null || _$appointmentId65$$Pe === void 0 ? void 0 : (_$appointmentId65$$Pe2 = _$appointmentId65$$Pe[0]) === null || _$appointmentId65$$Pe2 === void 0 ? void 0 : _$appointmentId65$$Pe2.gender), _defineProperty(_ref30, "contact", (_$patient_id$0$teleco6 = _ === 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$teleco6 !== void 0 ? _$patient_id$0$teleco6 : ""), _defineProperty(_ref30, "pId", _ === null || _ === void 0 ? void 0 : (_$patient_id31 = _.patient_id) === null || _$patient_id31 === void 0 ? void 0 : _$patient_id31.id), _ref30;
39348
+ 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;
39349
+
39350
+ return {
39351
+ 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",
39352
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39353
+ // mrn: _?.patient_id?.[0]?.alias || "",
39354
+ // age: _?.patient_id?.[0]?.age,
39355
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39356
+ // date: _?.appointmentId?.[0]?.start
39357
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39358
+ // : "",
39359
+ // time: _?.appointmentId?.[0]?.start
39360
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39361
+ // : "",
39362
+ // visitType: _?.visit_type ?? "Walk-Ins",
39363
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39364
+ // return spl?.coding?.[0]?.display;
39365
+ // }).join(", "),
39366
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39367
+ // appointmentStatus: _?.status?.display || "",
39368
+ // "View Patient": true,
39369
+ // Attend: true,
39370
+ // type: "OP",
39371
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39372
+ // data: _,
39373
+ // enId: _.id,
39374
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39375
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39376
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39377
+ // pId: _?.patient_id?.id,
39378
+ name: JSON.stringify({
39379
+ 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]) || {}),
39380
+ 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),
39381
+ 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) || "",
39382
+ 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 : "",
39383
+ 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 : ""
39384
+ }),
39385
+ 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) || "",
39386
+ date: JSON.stringify({
39387
+ 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") : "",
39388
+ 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") : ""
39389
+ }),
39390
+ visitType: (_$visit_type5 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type5 !== void 0 ? _$visit_type5 : "",
39391
+ speciality: JSON.stringify({
39392
+ 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) {
39393
+ var _spl$coding6, _spl$coding6$;
39394
+
39395
+ 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;
39396
+ }).join(", "),
39397
+ 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) || ""
39398
+ }),
39399
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display) || "",
39400
+ action: true
39401
+ };
39010
39402
  }) : [];
39011
39403
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
39012
39404
  data: returnedData
@@ -39029,7 +39421,7 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
39029
39421
 
39030
39422
  var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppointmentsDoctor", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
39031
39423
  var payload,
39032
- _ref32,
39424
+ _ref26,
39033
39425
  rejectWithValue,
39034
39426
  _data$result13,
39035
39427
  data,
@@ -39041,7 +39433,7 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
39041
39433
  switch (_context13.prev = _context13.next) {
39042
39434
  case 0:
39043
39435
  payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
39044
- _ref32 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
39436
+ _ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
39045
39437
  _context13.prev = 2;
39046
39438
  _context13.next = 5;
39047
39439
  return fetchData$3({
@@ -39051,33 +39443,46 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
39051
39443
  case 5:
39052
39444
  data = _context13.sent;
39053
39445
  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 (_) {
39054
- var _$appointmentId66, _$appointmentId66$, _$appointmentId66$$Pe, _$appointmentId66$$Pe2, _$appointmentId66$$Pe3, _$appointmentId66$$Pe4, _$appointmentId67, _$appointmentId67$, _$appointmentId67$$Pe, _$appointmentId67$$Pe2, _$appointmentId67$$Pe3, _$appointmentId67$$Pe4, _$patient_id32, _$patient_id32$, _$patient_id32$$name, _$patient_id33, _$patient_id33$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$appointmentId70, _$appointmentId70$, _$appointmentId71, _$appointmentId71$, _$appointmentId72, _$appointmentId72$, _$visit_type6, _$appointmentId73, _$appointmentId73$, _$appointmentId73$$Sp, _$practitioner_detail11, _$practitioner_detail12, _$status7, _$appointmentId$0$id7, _$appointmentId74, _$appointmentId74$, _$appointmentId75, _$appointmentId75$, _$appointmentId75$$Pe, _$appointmentId75$$Pe2, _$appointmentId76, _$appointmentId76$, _$appointmentId76$$Pe, _$appointmentId76$$Pe2, _$patient_id$0$teleco7, _$patient_id34, _$patient_id34$, _$patient_id34$$telec, _$patient_id34$$telec2, _$patient_id35;
39446
+ var _$Appointment69, _$Appointment69$Perso, _$Appointment69$Perso2, _$Appointment69$Perso3, _$Appointment69$Perso4, _$Appointment70, _$Appointment70$Perso, _$Appointment70$Perso2, _$Appointment70$Perso3, _$Appointment70$Perso4, _$Appointment71, _$Appointment71$Perso, _$Appointment71$Perso2, _$Appointment71$Perso3, _$Appointment72, _$Appointment72$Perso, _$Appointment72$Perso2, _$Appointment73, _$Appointment73$Perso, _$Appointment73$Perso2, _$Appointment73$Perso3, _$Appointment$PersonI21, _$Appointment74, _$Appointment74$Perso, _$Appointment74$Perso2, _$Appointment74$Perso3, _$Appointment74$Perso4, _$Appointment75, _$Appointment76, _$Appointment77, _$Appointment78, _$Appointment79, _$Appointment$appoint3, _$Appointment80, _$Appointment$Special2, _$Appointment81, _$Appointment81$Speci, _$Appointment$orgid$n2, _$Appointment82, _$Appointment82$orgid, _$practitioner_detail13, _$practitioner_detail14, _$Appointment83;
39055
39447
 
39056
39448
  return {
39057
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId66 = _.appointmentId) === null || _$appointmentId66 === void 0 ? void 0 : (_$appointmentId66$ = _$appointmentId66[0]) === null || _$appointmentId66$ === void 0 ? void 0 : (_$appointmentId66$$Pe = _$appointmentId66$.PersonID) === null || _$appointmentId66$$Pe === void 0 ? void 0 : (_$appointmentId66$$Pe2 = _$appointmentId66$$Pe[0]) === null || _$appointmentId66$$Pe2 === void 0 ? void 0 : (_$appointmentId66$$Pe3 = _$appointmentId66$$Pe2.photo) === null || _$appointmentId66$$Pe3 === void 0 ? void 0 : (_$appointmentId66$$Pe4 = _$appointmentId66$$Pe3[0]) === null || _$appointmentId66$$Pe4 === void 0 ? void 0 : _$appointmentId66$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId67 = _.appointmentId) === null || _$appointmentId67 === void 0 ? void 0 : (_$appointmentId67$ = _$appointmentId67[0]) === null || _$appointmentId67$ === void 0 ? void 0 : (_$appointmentId67$$Pe = _$appointmentId67$.PersonID) === null || _$appointmentId67$$Pe === void 0 ? void 0 : (_$appointmentId67$$Pe2 = _$appointmentId67$$Pe[0]) === null || _$appointmentId67$$Pe2 === void 0 ? void 0 : (_$appointmentId67$$Pe3 = _$appointmentId67$$Pe2.photo) === null || _$appointmentId67$$Pe3 === void 0 ? void 0 : (_$appointmentId67$$Pe4 = _$appointmentId67$$Pe3[0]) === null || _$appointmentId67$$Pe4 === void 0 ? void 0 : _$appointmentId67$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39058
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id32 = _.patient_id) === null || _$patient_id32 === void 0 ? void 0 : (_$patient_id32$ = _$patient_id32[0]) === null || _$patient_id32$ === void 0 ? void 0 : (_$patient_id32$$name = _$patient_id32$.name) === null || _$patient_id32$$name === void 0 ? void 0 : _$patient_id32$$name[0]) || {}),
39059
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : _$patient_id33$.MRN) || "",
39060
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId68 = _.appointmentId) === null || _$appointmentId68 === void 0 ? void 0 : (_$appointmentId68$ = _$appointmentId68[0]) === null || _$appointmentId68$ === void 0 ? void 0 : _$appointmentId68$.appno) || "",
39061
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId69 = _.appointmentId) === null || _$appointmentId69 === void 0 ? void 0 : (_$appointmentId69$ = _$appointmentId69[0]) === null || _$appointmentId69$ === void 0 ? void 0 : _$appointmentId69$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId70 = _.appointmentId) === null || _$appointmentId70 === void 0 ? void 0 : (_$appointmentId70$ = _$appointmentId70[0]) === null || _$appointmentId70$ === void 0 ? void 0 : _$appointmentId70$.start, "DD MMM,YYYY") : "",
39062
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId71 = _.appointmentId) === null || _$appointmentId71 === void 0 ? void 0 : (_$appointmentId71$ = _$appointmentId71[0]) === null || _$appointmentId71$ === void 0 ? void 0 : _$appointmentId71$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId72 = _.appointmentId) === null || _$appointmentId72 === void 0 ? void 0 : (_$appointmentId72$ = _$appointmentId72[0]) === null || _$appointmentId72$ === void 0 ? void 0 : _$appointmentId72$.start, "hh:mm A") : "",
39063
- visitType: (_$visit_type6 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type6 !== void 0 ? _$visit_type6 : "",
39064
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId73 = _.appointmentId) === null || _$appointmentId73 === void 0 ? void 0 : (_$appointmentId73$ = _$appointmentId73[0]) === null || _$appointmentId73$ === void 0 ? void 0 : (_$appointmentId73$$Sp = _$appointmentId73$.SpecialtyID) === null || _$appointmentId73$$Sp === void 0 ? void 0 : _$appointmentId73$$Sp.map(function (spl) {
39065
- var _spl$coding13, _spl$coding13$;
39066
-
39067
- return spl === null || spl === void 0 ? void 0 : (_spl$coding13 = spl.coding) === null || _spl$coding13 === void 0 ? void 0 : (_spl$coding13$ = _spl$coding13[0]) === null || _spl$coding13$ === void 0 ? void 0 : _spl$coding13$.display;
39068
- }).join(", "),
39069
- 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) || "",
39070
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display) || "",
39449
+ img: (_ === 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.photo) === null || _$Appointment69$Perso3 === void 0 ? void 0 : (_$Appointment69$Perso4 = _$Appointment69$Perso3[0]) === null || _$Appointment69$Perso4 === void 0 ? void 0 : _$Appointment69$Perso4.fileid) ? getImgUrl(_ === 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$Perso3 = _$Appointment70$Perso2.photo) === null || _$Appointment70$Perso3 === void 0 ? void 0 : (_$Appointment70$Perso4 = _$Appointment70$Perso3[0]) === null || _$Appointment70$Perso4 === void 0 ? void 0 : _$Appointment70$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39450
+ name: JSON.stringify({
39451
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$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.name) === null || _$Appointment71$Perso3 === void 0 ? void 0 : _$Appointment71$Perso3[0]) || {}),
39452
+ age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment72 = _.Appointment) === null || _$Appointment72 === void 0 ? void 0 : (_$Appointment72$Perso = _$Appointment72.PersonID) === null || _$Appointment72$Perso === void 0 ? void 0 : (_$Appointment72$Perso2 = _$Appointment72$Perso[0]) === null || _$Appointment72$Perso2 === void 0 ? void 0 : _$Appointment72$Perso2.birthDay),
39453
+ mrn: (_$Appointment73 = _.Appointment) === null || _$Appointment73 === void 0 ? void 0 : (_$Appointment73$Perso = _$Appointment73.PersonID) === null || _$Appointment73$Perso === void 0 ? void 0 : (_$Appointment73$Perso2 = _$Appointment73$Perso[0]) === null || _$Appointment73$Perso2 === void 0 ? void 0 : (_$Appointment73$Perso3 = _$Appointment73$Perso2.MRN) === null || _$Appointment73$Perso3 === void 0 ? void 0 : _$Appointment73$Perso3[0],
39454
+ // genderData: "M",
39455
+ contact: (_$Appointment$PersonI21 = (_$Appointment74 = _.Appointment) === null || _$Appointment74 === void 0 ? void 0 : (_$Appointment74$Perso = _$Appointment74.PersonID) === null || _$Appointment74$Perso === void 0 ? void 0 : (_$Appointment74$Perso2 = _$Appointment74$Perso[0]) === null || _$Appointment74$Perso2 === void 0 ? void 0 : (_$Appointment74$Perso3 = _$Appointment74$Perso2.telecom) === null || _$Appointment74$Perso3 === void 0 ? void 0 : (_$Appointment74$Perso4 = _$Appointment74$Perso3[0]) === null || _$Appointment74$Perso4 === void 0 ? void 0 : _$Appointment74$Perso4.value) !== null && _$Appointment$PersonI21 !== void 0 ? _$Appointment$PersonI21 : ""
39456
+ }),
39457
+ // mrn: _?.patient_id?.[0]?.alias || "",
39458
+ // age: _?.patient_id?.[0]?.age,
39459
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment75 = _.Appointment) === null || _$Appointment75 === void 0 ? void 0 : _$Appointment75.appno) || "",
39460
+ date: JSON.stringify({
39461
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment76 = _.Appointment) === null || _$Appointment76 === void 0 ? void 0 : _$Appointment76.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment77 = _.Appointment) === null || _$Appointment77 === void 0 ? void 0 : _$Appointment77.start, "DD MMM,YYYY") : "",
39462
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment78 = _.Appointment) === null || _$Appointment78 === void 0 ? void 0 : _$Appointment78.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment79 = _.Appointment) === null || _$Appointment79 === void 0 ? void 0 : _$Appointment79.start, "hh:mm A") : ""
39463
+ }),
39464
+ visitType: (_$Appointment$appoint3 = _ === null || _ === void 0 ? void 0 : (_$Appointment80 = _.Appointment) === null || _$Appointment80 === void 0 ? void 0 : _$Appointment80.appointmentType) !== null && _$Appointment$appoint3 !== void 0 ? _$Appointment$appoint3 : "",
39465
+ speciality: JSON.stringify({
39466
+ speciality: (_$Appointment$Special2 = _ === null || _ === void 0 ? void 0 : (_$Appointment81 = _.Appointment) === null || _$Appointment81 === void 0 ? void 0 : (_$Appointment81$Speci = _$Appointment81.SpecialtyID) === null || _$Appointment81$Speci === void 0 ? void 0 : _$Appointment81$Speci.map(function (spl) {
39467
+ var _spl$coding7, _spl$coding7$;
39468
+
39469
+ 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;
39470
+ }).join(", ")) !== null && _$Appointment$Special2 !== void 0 ? _$Appointment$Special2 : "",
39471
+ clinic: (_$Appointment$orgid$n2 = _ === null || _ === void 0 ? void 0 : (_$Appointment82 = _.Appointment) === null || _$Appointment82 === void 0 ? void 0 : (_$Appointment82$orgid = _$Appointment82.orgid) === null || _$Appointment82$orgid === void 0 ? void 0 : _$Appointment82$orgid.name) !== null && _$Appointment$orgid$n2 !== void 0 ? _$Appointment$orgid$n2 : ""
39472
+ }),
39473
+ 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) || "",
39474
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment83 = _.Appointment) === null || _$Appointment83 === void 0 ? void 0 : _$Appointment83.appstatus) || "",
39071
39475
  "View Patient": true,
39072
39476
  Attend: true,
39073
- type: "OP",
39074
- appNo: (_$appointmentId$0$id7 = _ === null || _ === void 0 ? void 0 : (_$appointmentId74 = _.appointmentId) === null || _$appointmentId74 === void 0 ? void 0 : (_$appointmentId74$ = _$appointmentId74[0]) === null || _$appointmentId74$ === void 0 ? void 0 : _$appointmentId74$.id) !== null && _$appointmentId$0$id7 !== void 0 ? _$appointmentId$0$id7 : '',
39075
- data: _,
39076
- enId: _.id,
39077
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId75 = _.appointmentId) === null || _$appointmentId75 === void 0 ? void 0 : (_$appointmentId75$ = _$appointmentId75[0]) === null || _$appointmentId75$ === void 0 ? void 0 : (_$appointmentId75$$Pe = _$appointmentId75$.PersonID) === null || _$appointmentId75$$Pe === void 0 ? void 0 : (_$appointmentId75$$Pe2 = _$appointmentId75$$Pe[0]) === null || _$appointmentId75$$Pe2 === void 0 ? void 0 : _$appointmentId75$$Pe2.birthDay),
39078
- gender: _ === null || _ === void 0 ? void 0 : (_$appointmentId76 = _.appointmentId) === null || _$appointmentId76 === void 0 ? void 0 : (_$appointmentId76$ = _$appointmentId76[0]) === null || _$appointmentId76$ === void 0 ? void 0 : (_$appointmentId76$$Pe = _$appointmentId76$.PersonID) === null || _$appointmentId76$$Pe === void 0 ? void 0 : (_$appointmentId76$$Pe2 = _$appointmentId76$$Pe[0]) === null || _$appointmentId76$$Pe2 === void 0 ? void 0 : _$appointmentId76$$Pe2.gender,
39079
- contact: (_$patient_id$0$teleco7 = _ === null || _ === void 0 ? void 0 : (_$patient_id34 = _.patient_id) === null || _$patient_id34 === void 0 ? void 0 : (_$patient_id34$ = _$patient_id34[0]) === null || _$patient_id34$ === void 0 ? void 0 : (_$patient_id34$$telec = _$patient_id34$.telecom) === null || _$patient_id34$$telec === void 0 ? void 0 : (_$patient_id34$$telec2 = _$patient_id34$$telec[0]) === null || _$patient_id34$$telec2 === void 0 ? void 0 : _$patient_id34$$telec2.value) !== null && _$patient_id$0$teleco7 !== void 0 ? _$patient_id$0$teleco7 : "",
39080
- pId: _ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : _$patient_id35.id
39477
+ action: true,
39478
+ type: "OP" // appNo: _?.id ?? '',
39479
+ // // data: _,
39480
+ // enId: _.id,
39481
+ // age: getAge(_?.PersonID?.[0]?.birthDay),
39482
+ // // gender: _?.PersonID?.[0]?.gender,
39483
+ // contact: _?.PersonID?.[0]?.telecom?.[0]?.value ?? "",
39484
+ // pId : _?.patient_id?.id,
39485
+
39081
39486
  };
39082
39487
  }) : [];
39083
39488
  return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39100,7 +39505,7 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
39100
39505
  })));
39101
39506
  var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirstVisitsDoctor", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
39102
39507
  var payload,
39103
- _ref34,
39508
+ _ref28,
39104
39509
  rejectWithValue,
39105
39510
  _data$result14,
39106
39511
  data,
@@ -39112,7 +39517,7 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
39112
39517
  switch (_context14.prev = _context14.next) {
39113
39518
  case 0:
39114
39519
  payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
39115
- _ref34 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
39520
+ _ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
39116
39521
  _context14.prev = 2;
39117
39522
  _context14.next = 5;
39118
39523
  return fetchData$3({
@@ -39122,33 +39527,58 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
39122
39527
  case 5:
39123
39528
  data = _context14.sent;
39124
39529
  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 (_) {
39125
- var _$appointmentId77, _$appointmentId77$, _$appointmentId77$$Pe, _$appointmentId77$$Pe2, _$appointmentId77$$Pe3, _$appointmentId77$$Pe4, _$appointmentId78, _$appointmentId78$, _$appointmentId78$$Pe, _$appointmentId78$$Pe2, _$appointmentId78$$Pe3, _$appointmentId78$$Pe4, _$patient_id36, _$patient_id36$, _$patient_id36$$name, _$patient_id37, _$patient_id37$, _$appointmentId79, _$appointmentId79$, _$appointmentId80, _$appointmentId80$, _$appointmentId81, _$appointmentId81$, _$appointmentId82, _$appointmentId82$, _$appointmentId83, _$appointmentId83$, _$visit_type7, _$appointmentId84, _$appointmentId84$, _$appointmentId84$$Sp, _$practitioner_detail13, _$practitioner_detail14, _$status8, _$appointmentId$0$id8, _$appointmentId85, _$appointmentId85$, _$appointmentId86, _$appointmentId86$, _$appointmentId86$$Pe, _$appointmentId86$$Pe2, _$appointmentId87, _$appointmentId87$, _$appointmentId87$$Pe, _$appointmentId87$$Pe2, _$patient_id$0$teleco8, _$patient_id38, _$patient_id38$, _$patient_id38$$telec, _$patient_id38$$telec2, _$patient_id39;
39530
+ 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;
39126
39531
 
39127
39532
  return {
39128
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId77 = _.appointmentId) === null || _$appointmentId77 === void 0 ? void 0 : (_$appointmentId77$ = _$appointmentId77[0]) === null || _$appointmentId77$ === void 0 ? void 0 : (_$appointmentId77$$Pe = _$appointmentId77$.PersonID) === null || _$appointmentId77$$Pe === void 0 ? void 0 : (_$appointmentId77$$Pe2 = _$appointmentId77$$Pe[0]) === null || _$appointmentId77$$Pe2 === void 0 ? void 0 : (_$appointmentId77$$Pe3 = _$appointmentId77$$Pe2.photo) === null || _$appointmentId77$$Pe3 === void 0 ? void 0 : (_$appointmentId77$$Pe4 = _$appointmentId77$$Pe3[0]) === null || _$appointmentId77$$Pe4 === void 0 ? void 0 : _$appointmentId77$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId78 = _.appointmentId) === null || _$appointmentId78 === void 0 ? void 0 : (_$appointmentId78$ = _$appointmentId78[0]) === null || _$appointmentId78$ === void 0 ? void 0 : (_$appointmentId78$$Pe = _$appointmentId78$.PersonID) === null || _$appointmentId78$$Pe === void 0 ? void 0 : (_$appointmentId78$$Pe2 = _$appointmentId78$$Pe[0]) === null || _$appointmentId78$$Pe2 === void 0 ? void 0 : (_$appointmentId78$$Pe3 = _$appointmentId78$$Pe2.photo) === null || _$appointmentId78$$Pe3 === void 0 ? void 0 : (_$appointmentId78$$Pe4 = _$appointmentId78$$Pe3[0]) === null || _$appointmentId78$$Pe4 === void 0 ? void 0 : _$appointmentId78$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39129
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id36 = _.patient_id) === null || _$patient_id36 === void 0 ? void 0 : (_$patient_id36$ = _$patient_id36[0]) === null || _$patient_id36$ === void 0 ? void 0 : (_$patient_id36$$name = _$patient_id36$.name) === null || _$patient_id36$$name === void 0 ? void 0 : _$patient_id36$$name[0]) || {}),
39130
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id37 = _.patient_id) === null || _$patient_id37 === void 0 ? void 0 : (_$patient_id37$ = _$patient_id37[0]) === null || _$patient_id37$ === void 0 ? void 0 : _$patient_id37$.MRN) || "",
39131
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId79 = _.appointmentId) === null || _$appointmentId79 === void 0 ? void 0 : (_$appointmentId79$ = _$appointmentId79[0]) === null || _$appointmentId79$ === void 0 ? void 0 : _$appointmentId79$.appno) || "",
39132
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId80 = _.appointmentId) === null || _$appointmentId80 === void 0 ? void 0 : (_$appointmentId80$ = _$appointmentId80[0]) === null || _$appointmentId80$ === void 0 ? void 0 : _$appointmentId80$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId81 = _.appointmentId) === null || _$appointmentId81 === void 0 ? void 0 : (_$appointmentId81$ = _$appointmentId81[0]) === null || _$appointmentId81$ === void 0 ? void 0 : _$appointmentId81$.start, "DD MMM,YYYY") : "",
39133
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId82 = _.appointmentId) === null || _$appointmentId82 === void 0 ? void 0 : (_$appointmentId82$ = _$appointmentId82[0]) === null || _$appointmentId82$ === void 0 ? void 0 : _$appointmentId82$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId83 = _.appointmentId) === null || _$appointmentId83 === void 0 ? void 0 : (_$appointmentId83$ = _$appointmentId83[0]) === null || _$appointmentId83$ === void 0 ? void 0 : _$appointmentId83$.start, "hh:mm A") : "",
39134
- visitType: (_$visit_type7 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type7 !== void 0 ? _$visit_type7 : "",
39135
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId84 = _.appointmentId) === null || _$appointmentId84 === void 0 ? void 0 : (_$appointmentId84$ = _$appointmentId84[0]) === null || _$appointmentId84$ === void 0 ? void 0 : (_$appointmentId84$$Sp = _$appointmentId84$.SpecialtyID) === null || _$appointmentId84$$Sp === void 0 ? void 0 : _$appointmentId84$$Sp.map(function (spl) {
39136
- var _spl$coding14, _spl$coding14$;
39533
+ 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",
39534
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39535
+ // mrn: _?.patient_id?.[0]?.MRN || "",
39536
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39537
+ // date: _?.appointmentId?.[0]?.start
39538
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39539
+ // : "",
39540
+ // time: _?.appointmentId?.[0]?.start
39541
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39542
+ // : "",
39543
+ // visitType: _?.visit_type ?? "",
39544
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39545
+ // return spl?.coding?.[0]?.display;
39546
+ // }).join(", "),
39547
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39548
+ // appointmentStatus: _?.status?.display || "",
39549
+ // "View Patient": true,
39550
+ // Attend: true,
39551
+ // type: "OP",
39552
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39553
+ // data: _,
39554
+ // enId: _.id,
39555
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39556
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39557
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39558
+ // pId: _?.patient_id?.id,
39559
+ name: JSON.stringify({
39560
+ 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]) || {}),
39561
+ 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),
39562
+ 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) || "",
39563
+ 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 : "",
39564
+ 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 : ""
39565
+ }),
39566
+ 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) || "",
39567
+ date: JSON.stringify({
39568
+ 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") : "",
39569
+ 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") : ""
39570
+ }),
39571
+ visitType: (_$visit_type6 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type6 !== void 0 ? _$visit_type6 : "",
39572
+ speciality: JSON.stringify({
39573
+ 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) {
39574
+ var _spl$coding8, _spl$coding8$;
39137
39575
 
39138
- return spl === null || spl === void 0 ? void 0 : (_spl$coding14 = spl.coding) === null || _spl$coding14 === void 0 ? void 0 : (_spl$coding14$ = _spl$coding14[0]) === null || _spl$coding14$ === void 0 ? void 0 : _spl$coding14$.display;
39139
- }).join(", "),
39140
- 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) || "",
39141
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display) || "",
39142
- "View Patient": true,
39143
- Attend: true,
39144
- type: "OP",
39145
- appNo: (_$appointmentId$0$id8 = _ === null || _ === void 0 ? void 0 : (_$appointmentId85 = _.appointmentId) === null || _$appointmentId85 === void 0 ? void 0 : (_$appointmentId85$ = _$appointmentId85[0]) === null || _$appointmentId85$ === void 0 ? void 0 : _$appointmentId85$.id) !== null && _$appointmentId$0$id8 !== void 0 ? _$appointmentId$0$id8 : '',
39146
- data: _,
39147
- enId: _.id,
39148
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId86 = _.appointmentId) === null || _$appointmentId86 === void 0 ? void 0 : (_$appointmentId86$ = _$appointmentId86[0]) === null || _$appointmentId86$ === void 0 ? void 0 : (_$appointmentId86$$Pe = _$appointmentId86$.PersonID) === null || _$appointmentId86$$Pe === void 0 ? void 0 : (_$appointmentId86$$Pe2 = _$appointmentId86$$Pe[0]) === null || _$appointmentId86$$Pe2 === void 0 ? void 0 : _$appointmentId86$$Pe2.birthDay),
39149
- gender: _ === null || _ === void 0 ? void 0 : (_$appointmentId87 = _.appointmentId) === null || _$appointmentId87 === void 0 ? void 0 : (_$appointmentId87$ = _$appointmentId87[0]) === null || _$appointmentId87$ === void 0 ? void 0 : (_$appointmentId87$$Pe = _$appointmentId87$.PersonID) === null || _$appointmentId87$$Pe === void 0 ? void 0 : (_$appointmentId87$$Pe2 = _$appointmentId87$$Pe[0]) === null || _$appointmentId87$$Pe2 === void 0 ? void 0 : _$appointmentId87$$Pe2.gender,
39150
- contact: (_$patient_id$0$teleco8 = _ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$telec = _$patient_id38$.telecom) === null || _$patient_id38$$telec === void 0 ? void 0 : (_$patient_id38$$telec2 = _$patient_id38$$telec[0]) === null || _$patient_id38$$telec2 === void 0 ? void 0 : _$patient_id38$$telec2.value) !== null && _$patient_id$0$teleco8 !== void 0 ? _$patient_id$0$teleco8 : "",
39151
- pId: _ === null || _ === void 0 ? void 0 : (_$patient_id39 = _.patient_id) === null || _$patient_id39 === void 0 ? void 0 : _$patient_id39.id
39576
+ 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;
39577
+ }).join(", "),
39578
+ 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) || ""
39579
+ }),
39580
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display) || "",
39581
+ action: true
39152
39582
  };
39153
39583
  }) : [];
39154
39584
  return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39171,7 +39601,7 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
39171
39601
  })));
39172
39602
  var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewPatientsDoctor", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
39173
39603
  var payload,
39174
- _ref36,
39604
+ _ref30,
39175
39605
  rejectWithValue,
39176
39606
  _data$result15,
39177
39607
  data,
@@ -39183,7 +39613,7 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
39183
39613
  switch (_context15.prev = _context15.next) {
39184
39614
  case 0:
39185
39615
  payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
39186
- _ref36 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
39616
+ _ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
39187
39617
  _context15.prev = 2;
39188
39618
  _context15.next = 5;
39189
39619
  return fetchData$3({
@@ -39193,33 +39623,58 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
39193
39623
  case 5:
39194
39624
  data = _context15.sent;
39195
39625
  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 (_) {
39196
- var _$appointmentId88, _$appointmentId88$, _$appointmentId88$$Pe, _$appointmentId88$$Pe2, _$appointmentId88$$Pe3, _$appointmentId88$$Pe4, _$appointmentId89, _$appointmentId89$, _$appointmentId89$$Pe, _$appointmentId89$$Pe2, _$appointmentId89$$Pe3, _$appointmentId89$$Pe4, _$patient_id40, _$patient_id40$, _$patient_id40$$name, _$patient_id41, _$patient_id41$, _$appointmentId90, _$appointmentId90$, _$appointmentId91, _$appointmentId91$, _$appointmentId92, _$appointmentId92$, _$appointmentId93, _$appointmentId93$, _$appointmentId94, _$appointmentId94$, _$visit_type8, _$appointmentId95, _$appointmentId95$, _$appointmentId95$$Sp, _$practitioner_detail15, _$practitioner_detail16, _$status9, _$appointmentId$0$id9, _$appointmentId96, _$appointmentId96$, _$appointmentId97, _$appointmentId97$, _$appointmentId97$$Pe, _$appointmentId97$$Pe2, _$appointmentId98, _$appointmentId98$, _$appointmentId98$$Pe, _$appointmentId98$$Pe2, _$patient_id$0$teleco9, _$patient_id42, _$patient_id42$, _$patient_id42$$telec, _$patient_id42$$telec2, _$patient_id43;
39626
+ 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;
39197
39627
 
39198
39628
  return {
39199
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId88 = _.appointmentId) === null || _$appointmentId88 === void 0 ? void 0 : (_$appointmentId88$ = _$appointmentId88[0]) === null || _$appointmentId88$ === void 0 ? void 0 : (_$appointmentId88$$Pe = _$appointmentId88$.PersonID) === null || _$appointmentId88$$Pe === void 0 ? void 0 : (_$appointmentId88$$Pe2 = _$appointmentId88$$Pe[0]) === null || _$appointmentId88$$Pe2 === void 0 ? void 0 : (_$appointmentId88$$Pe3 = _$appointmentId88$$Pe2.photo) === null || _$appointmentId88$$Pe3 === void 0 ? void 0 : (_$appointmentId88$$Pe4 = _$appointmentId88$$Pe3[0]) === null || _$appointmentId88$$Pe4 === void 0 ? void 0 : _$appointmentId88$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId89 = _.appointmentId) === null || _$appointmentId89 === void 0 ? void 0 : (_$appointmentId89$ = _$appointmentId89[0]) === null || _$appointmentId89$ === void 0 ? void 0 : (_$appointmentId89$$Pe = _$appointmentId89$.PersonID) === null || _$appointmentId89$$Pe === void 0 ? void 0 : (_$appointmentId89$$Pe2 = _$appointmentId89$$Pe[0]) === null || _$appointmentId89$$Pe2 === void 0 ? void 0 : (_$appointmentId89$$Pe3 = _$appointmentId89$$Pe2.photo) === null || _$appointmentId89$$Pe3 === void 0 ? void 0 : (_$appointmentId89$$Pe4 = _$appointmentId89$$Pe3[0]) === null || _$appointmentId89$$Pe4 === void 0 ? void 0 : _$appointmentId89$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39200
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id40 = _.patient_id) === null || _$patient_id40 === void 0 ? void 0 : (_$patient_id40$ = _$patient_id40[0]) === null || _$patient_id40$ === void 0 ? void 0 : (_$patient_id40$$name = _$patient_id40$.name) === null || _$patient_id40$$name === void 0 ? void 0 : _$patient_id40$$name[0]) || {}),
39201
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id41 = _.patient_id) === null || _$patient_id41 === void 0 ? void 0 : (_$patient_id41$ = _$patient_id41[0]) === null || _$patient_id41$ === void 0 ? void 0 : _$patient_id41$.MRN) || "",
39202
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId90 = _.appointmentId) === null || _$appointmentId90 === void 0 ? void 0 : (_$appointmentId90$ = _$appointmentId90[0]) === null || _$appointmentId90$ === void 0 ? void 0 : _$appointmentId90$.appno) || "",
39203
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId91 = _.appointmentId) === null || _$appointmentId91 === void 0 ? void 0 : (_$appointmentId91$ = _$appointmentId91[0]) === null || _$appointmentId91$ === void 0 ? void 0 : _$appointmentId91$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId92 = _.appointmentId) === null || _$appointmentId92 === void 0 ? void 0 : (_$appointmentId92$ = _$appointmentId92[0]) === null || _$appointmentId92$ === void 0 ? void 0 : _$appointmentId92$.start, "DD MMM,YYYY") : "",
39204
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId93 = _.appointmentId) === null || _$appointmentId93 === void 0 ? void 0 : (_$appointmentId93$ = _$appointmentId93[0]) === null || _$appointmentId93$ === void 0 ? void 0 : _$appointmentId93$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId94 = _.appointmentId) === null || _$appointmentId94 === void 0 ? void 0 : (_$appointmentId94$ = _$appointmentId94[0]) === null || _$appointmentId94$ === void 0 ? void 0 : _$appointmentId94$.start, "hh:mm A") : "",
39205
- visitType: (_$visit_type8 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type8 !== void 0 ? _$visit_type8 : "",
39206
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId95 = _.appointmentId) === null || _$appointmentId95 === void 0 ? void 0 : (_$appointmentId95$ = _$appointmentId95[0]) === null || _$appointmentId95$ === void 0 ? void 0 : (_$appointmentId95$$Sp = _$appointmentId95$.SpecialtyID) === null || _$appointmentId95$$Sp === void 0 ? void 0 : _$appointmentId95$$Sp.map(function (spl) {
39207
- var _spl$coding15, _spl$coding15$;
39629
+ 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",
39630
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39631
+ // mrn: _?.patient_id?.[0]?.MRN || "",
39632
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39633
+ // date: _?.appointmentId?.[0]?.start
39634
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39635
+ // : "",
39636
+ // time: _?.appointmentId?.[0]?.start
39637
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39638
+ // : "",
39639
+ // visitType: _?.visit_type ?? "",
39640
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39641
+ // return spl?.coding?.[0]?.display;
39642
+ // }).join(", "),
39643
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39644
+ // appointmentStatus: _?.status?.display || "",
39645
+ // "View Patient": true,
39646
+ // Attend: true,
39647
+ // type: "OP",
39648
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39649
+ // data: _,
39650
+ // enId: _.id,
39651
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39652
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39653
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39654
+ // pId: _?.patient_id?.id,
39655
+ name: JSON.stringify({
39656
+ 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]) || {}),
39657
+ 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),
39658
+ 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) || "",
39659
+ 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 : "",
39660
+ 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 : ""
39661
+ }),
39662
+ 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) || "",
39663
+ date: JSON.stringify({
39664
+ 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") : "",
39665
+ 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") : ""
39666
+ }),
39667
+ visitType: (_$visit_type7 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type7 !== void 0 ? _$visit_type7 : "",
39668
+ speciality: JSON.stringify({
39669
+ 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) {
39670
+ var _spl$coding9, _spl$coding9$;
39208
39671
 
39209
- return spl === null || spl === void 0 ? void 0 : (_spl$coding15 = spl.coding) === null || _spl$coding15 === void 0 ? void 0 : (_spl$coding15$ = _spl$coding15[0]) === null || _spl$coding15$ === void 0 ? void 0 : _spl$coding15$.display;
39210
- }).join(", "),
39211
- 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) || "",
39212
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display) || "",
39213
- "View Patient": true,
39214
- Attend: true,
39215
- type: "OP",
39216
- appNo: (_$appointmentId$0$id9 = _ === null || _ === void 0 ? void 0 : (_$appointmentId96 = _.appointmentId) === null || _$appointmentId96 === void 0 ? void 0 : (_$appointmentId96$ = _$appointmentId96[0]) === null || _$appointmentId96$ === void 0 ? void 0 : _$appointmentId96$.id) !== null && _$appointmentId$0$id9 !== void 0 ? _$appointmentId$0$id9 : '',
39217
- data: _,
39218
- enId: _.id,
39219
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId97 = _.appointmentId) === null || _$appointmentId97 === void 0 ? void 0 : (_$appointmentId97$ = _$appointmentId97[0]) === null || _$appointmentId97$ === void 0 ? void 0 : (_$appointmentId97$$Pe = _$appointmentId97$.PersonID) === null || _$appointmentId97$$Pe === void 0 ? void 0 : (_$appointmentId97$$Pe2 = _$appointmentId97$$Pe[0]) === null || _$appointmentId97$$Pe2 === void 0 ? void 0 : _$appointmentId97$$Pe2.birthDay),
39220
- gender: _ === null || _ === void 0 ? void 0 : (_$appointmentId98 = _.appointmentId) === null || _$appointmentId98 === void 0 ? void 0 : (_$appointmentId98$ = _$appointmentId98[0]) === null || _$appointmentId98$ === void 0 ? void 0 : (_$appointmentId98$$Pe = _$appointmentId98$.PersonID) === null || _$appointmentId98$$Pe === void 0 ? void 0 : (_$appointmentId98$$Pe2 = _$appointmentId98$$Pe[0]) === null || _$appointmentId98$$Pe2 === void 0 ? void 0 : _$appointmentId98$$Pe2.gender,
39221
- contact: (_$patient_id$0$teleco9 = _ === null || _ === void 0 ? void 0 : (_$patient_id42 = _.patient_id) === null || _$patient_id42 === void 0 ? void 0 : (_$patient_id42$ = _$patient_id42[0]) === null || _$patient_id42$ === void 0 ? void 0 : (_$patient_id42$$telec = _$patient_id42$.telecom) === null || _$patient_id42$$telec === void 0 ? void 0 : (_$patient_id42$$telec2 = _$patient_id42$$telec[0]) === null || _$patient_id42$$telec2 === void 0 ? void 0 : _$patient_id42$$telec2.value) !== null && _$patient_id$0$teleco9 !== void 0 ? _$patient_id$0$teleco9 : "",
39222
- pId: _ === null || _ === void 0 ? void 0 : (_$patient_id43 = _.patient_id) === null || _$patient_id43 === void 0 ? void 0 : _$patient_id43.id
39672
+ 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;
39673
+ }).join(", "),
39674
+ 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) || ""
39675
+ }),
39676
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display) || "",
39677
+ action: true
39223
39678
  };
39224
39679
  }) : [];
39225
39680
  return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39242,7 +39697,7 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
39242
39697
  })));
39243
39698
  var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOtherVisitsDoctor", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
39244
39699
  var payload,
39245
- _ref38,
39700
+ _ref32,
39246
39701
  rejectWithValue,
39247
39702
  _data$result16,
39248
39703
  data,
@@ -39254,7 +39709,7 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
39254
39709
  switch (_context16.prev = _context16.next) {
39255
39710
  case 0:
39256
39711
  payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
39257
- _ref38 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
39712
+ _ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
39258
39713
  _context16.prev = 2;
39259
39714
  _context16.next = 5;
39260
39715
  return fetchData$3({
@@ -39264,33 +39719,58 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
39264
39719
  case 5:
39265
39720
  data = _context16.sent;
39266
39721
  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 (_) {
39267
- var _$appointmentId99, _$appointmentId99$, _$appointmentId99$$Pe, _$appointmentId99$$Pe2, _$appointmentId99$$Pe3, _$appointmentId99$$Pe4, _$appointmentId100, _$appointmentId100$, _$appointmentId100$$P, _$appointmentId100$$P2, _$appointmentId100$$P3, _$appointmentId100$$P4, _$patient_id44, _$patient_id44$, _$patient_id44$$name, _$patient_id45, _$patient_id45$, _$appointmentId101, _$appointmentId101$, _$appointmentId102, _$appointmentId102$, _$appointmentId103, _$appointmentId103$, _$appointmentId104, _$appointmentId104$, _$appointmentId105, _$appointmentId105$, _$visit_type9, _$appointmentId106, _$appointmentId106$, _$appointmentId106$$S, _$practitioner_detail17, _$practitioner_detail18, _$status10, _$appointmentId$0$id10, _$appointmentId107, _$appointmentId107$, _$appointmentId108, _$appointmentId108$, _$appointmentId108$$P, _$appointmentId108$$P2, _$appointmentId109, _$appointmentId109$, _$appointmentId109$$P, _$appointmentId109$$P2, _$patient_id$0$teleco10, _$patient_id46, _$patient_id46$, _$patient_id46$$telec, _$patient_id46$$telec2, _$patient_id47;
39722
+ 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;
39268
39723
 
39269
39724
  return {
39270
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId99 = _.appointmentId) === null || _$appointmentId99 === void 0 ? void 0 : (_$appointmentId99$ = _$appointmentId99[0]) === null || _$appointmentId99$ === void 0 ? void 0 : (_$appointmentId99$$Pe = _$appointmentId99$.PersonID) === null || _$appointmentId99$$Pe === void 0 ? void 0 : (_$appointmentId99$$Pe2 = _$appointmentId99$$Pe[0]) === null || _$appointmentId99$$Pe2 === void 0 ? void 0 : (_$appointmentId99$$Pe3 = _$appointmentId99$$Pe2.photo) === null || _$appointmentId99$$Pe3 === void 0 ? void 0 : (_$appointmentId99$$Pe4 = _$appointmentId99$$Pe3[0]) === null || _$appointmentId99$$Pe4 === void 0 ? void 0 : _$appointmentId99$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId100 = _.appointmentId) === null || _$appointmentId100 === void 0 ? void 0 : (_$appointmentId100$ = _$appointmentId100[0]) === null || _$appointmentId100$ === void 0 ? void 0 : (_$appointmentId100$$P = _$appointmentId100$.PersonID) === null || _$appointmentId100$$P === void 0 ? void 0 : (_$appointmentId100$$P2 = _$appointmentId100$$P[0]) === null || _$appointmentId100$$P2 === void 0 ? void 0 : (_$appointmentId100$$P3 = _$appointmentId100$$P2.photo) === null || _$appointmentId100$$P3 === void 0 ? void 0 : (_$appointmentId100$$P4 = _$appointmentId100$$P3[0]) === null || _$appointmentId100$$P4 === void 0 ? void 0 : _$appointmentId100$$P4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39271
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id44 = _.patient_id) === null || _$patient_id44 === void 0 ? void 0 : (_$patient_id44$ = _$patient_id44[0]) === null || _$patient_id44$ === void 0 ? void 0 : (_$patient_id44$$name = _$patient_id44$.name) === null || _$patient_id44$$name === void 0 ? void 0 : _$patient_id44$$name[0]) || {}),
39272
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id45 = _.patient_id) === null || _$patient_id45 === void 0 ? void 0 : (_$patient_id45$ = _$patient_id45[0]) === null || _$patient_id45$ === void 0 ? void 0 : _$patient_id45$.MRN) || "",
39273
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId101 = _.appointmentId) === null || _$appointmentId101 === void 0 ? void 0 : (_$appointmentId101$ = _$appointmentId101[0]) === null || _$appointmentId101$ === void 0 ? void 0 : _$appointmentId101$.appno) || "",
39274
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId102 = _.appointmentId) === null || _$appointmentId102 === void 0 ? void 0 : (_$appointmentId102$ = _$appointmentId102[0]) === null || _$appointmentId102$ === void 0 ? void 0 : _$appointmentId102$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId103 = _.appointmentId) === null || _$appointmentId103 === void 0 ? void 0 : (_$appointmentId103$ = _$appointmentId103[0]) === null || _$appointmentId103$ === void 0 ? void 0 : _$appointmentId103$.start, "DD MMM,YYYY") : "",
39275
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId104 = _.appointmentId) === null || _$appointmentId104 === void 0 ? void 0 : (_$appointmentId104$ = _$appointmentId104[0]) === null || _$appointmentId104$ === void 0 ? void 0 : _$appointmentId104$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId105 = _.appointmentId) === null || _$appointmentId105 === void 0 ? void 0 : (_$appointmentId105$ = _$appointmentId105[0]) === null || _$appointmentId105$ === void 0 ? void 0 : _$appointmentId105$.start, "hh:mm A") : "",
39276
- visitType: (_$visit_type9 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type9 !== void 0 ? _$visit_type9 : "",
39277
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId106 = _.appointmentId) === null || _$appointmentId106 === void 0 ? void 0 : (_$appointmentId106$ = _$appointmentId106[0]) === null || _$appointmentId106$ === void 0 ? void 0 : (_$appointmentId106$$S = _$appointmentId106$.SpecialtyID) === null || _$appointmentId106$$S === void 0 ? void 0 : _$appointmentId106$$S.map(function (spl) {
39278
- var _spl$coding16, _spl$coding16$;
39725
+ 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",
39726
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39727
+ // mrn: _?.patient_id?.[0]?.MRN || "",
39728
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39729
+ // date: _?.appointmentId?.[0]?.start
39730
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39731
+ // : "",
39732
+ // time: _?.appointmentId?.[0]?.start
39733
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39734
+ // : "",
39735
+ // visitType: _?.visit_type ?? "",
39736
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39737
+ // return spl?.coding?.[0]?.display;
39738
+ // }).join(", "),
39739
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39740
+ // appointmentStatus: _?.status?.display || "",
39741
+ // "View Patient": true,
39742
+ // Attend: true,
39743
+ // type: "OP",
39744
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39745
+ // data: _,
39746
+ // enId: _.id,
39747
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39748
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39749
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39750
+ // pId: _?.patient_id?.id,
39751
+ name: JSON.stringify({
39752
+ 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]) || {}),
39753
+ 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),
39754
+ 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) || "",
39755
+ 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 : "",
39756
+ 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 : ""
39757
+ }),
39758
+ 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) || "",
39759
+ date: JSON.stringify({
39760
+ 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") : "",
39761
+ 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") : ""
39762
+ }),
39763
+ visitType: (_$visit_type8 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type8 !== void 0 ? _$visit_type8 : "",
39764
+ speciality: JSON.stringify({
39765
+ 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) {
39766
+ var _spl$coding10, _spl$coding10$;
39279
39767
 
39280
- return spl === null || spl === void 0 ? void 0 : (_spl$coding16 = spl.coding) === null || _spl$coding16 === void 0 ? void 0 : (_spl$coding16$ = _spl$coding16[0]) === null || _spl$coding16$ === void 0 ? void 0 : _spl$coding16$.display;
39281
- }).join(", "),
39282
- 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) || "",
39283
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status10 = _.status) === null || _$status10 === void 0 ? void 0 : _$status10.display) || "",
39284
- "View Patient": true,
39285
- Attend: true,
39286
- type: "OP",
39287
- appNo: (_$appointmentId$0$id10 = _ === null || _ === void 0 ? void 0 : (_$appointmentId107 = _.appointmentId) === null || _$appointmentId107 === void 0 ? void 0 : (_$appointmentId107$ = _$appointmentId107[0]) === null || _$appointmentId107$ === void 0 ? void 0 : _$appointmentId107$.id) !== null && _$appointmentId$0$id10 !== void 0 ? _$appointmentId$0$id10 : '',
39288
- data: _,
39289
- enId: _.id,
39290
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId108 = _.appointmentId) === null || _$appointmentId108 === void 0 ? void 0 : (_$appointmentId108$ = _$appointmentId108[0]) === null || _$appointmentId108$ === void 0 ? void 0 : (_$appointmentId108$$P = _$appointmentId108$.PersonID) === null || _$appointmentId108$$P === void 0 ? void 0 : (_$appointmentId108$$P2 = _$appointmentId108$$P[0]) === null || _$appointmentId108$$P2 === void 0 ? void 0 : _$appointmentId108$$P2.birthDay),
39291
- gender: _ === null || _ === void 0 ? void 0 : (_$appointmentId109 = _.appointmentId) === null || _$appointmentId109 === void 0 ? void 0 : (_$appointmentId109$ = _$appointmentId109[0]) === null || _$appointmentId109$ === void 0 ? void 0 : (_$appointmentId109$$P = _$appointmentId109$.PersonID) === null || _$appointmentId109$$P === void 0 ? void 0 : (_$appointmentId109$$P2 = _$appointmentId109$$P[0]) === null || _$appointmentId109$$P2 === void 0 ? void 0 : _$appointmentId109$$P2.gender,
39292
- contact: (_$patient_id$0$teleco10 = _ === null || _ === void 0 ? void 0 : (_$patient_id46 = _.patient_id) === null || _$patient_id46 === void 0 ? void 0 : (_$patient_id46$ = _$patient_id46[0]) === null || _$patient_id46$ === void 0 ? void 0 : (_$patient_id46$$telec = _$patient_id46$.telecom) === null || _$patient_id46$$telec === void 0 ? void 0 : (_$patient_id46$$telec2 = _$patient_id46$$telec[0]) === null || _$patient_id46$$telec2 === void 0 ? void 0 : _$patient_id46$$telec2.value) !== null && _$patient_id$0$teleco10 !== void 0 ? _$patient_id$0$teleco10 : "",
39293
- pId: _ === null || _ === void 0 ? void 0 : (_$patient_id47 = _.patient_id) === null || _$patient_id47 === void 0 ? void 0 : _$patient_id47.id
39768
+ 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;
39769
+ }).join(", "),
39770
+ 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) || ""
39771
+ }),
39772
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display) || "",
39773
+ action: true
39294
39774
  };
39295
39775
  }) : [];
39296
39776
  return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39313,7 +39793,7 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
39313
39793
  })));
39314
39794
  var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getTodayVisitsDoctor", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
39315
39795
  var payload,
39316
- _ref40,
39796
+ _ref34,
39317
39797
  rejectWithValue,
39318
39798
  _data$result17,
39319
39799
  data,
@@ -39325,7 +39805,7 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
39325
39805
  switch (_context17.prev = _context17.next) {
39326
39806
  case 0:
39327
39807
  payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
39328
- _ref40 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref40.rejectWithValue;
39808
+ _ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
39329
39809
  _context17.prev = 2;
39330
39810
  _context17.next = 5;
39331
39811
  return fetchData$3({
@@ -39335,33 +39815,58 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
39335
39815
  case 5:
39336
39816
  data = _context17.sent;
39337
39817
  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 (_) {
39338
- var _$appointmentId110, _$appointmentId110$, _$appointmentId110$$P, _$appointmentId110$$P2, _$appointmentId110$$P3, _$appointmentId110$$P4, _$appointmentId111, _$appointmentId111$, _$appointmentId111$$P, _$appointmentId111$$P2, _$appointmentId111$$P3, _$appointmentId111$$P4, _$patient_id48, _$patient_id48$, _$patient_id48$$name, _$patient_id49, _$patient_id49$, _$appointmentId112, _$appointmentId112$, _$appointmentId113, _$appointmentId113$, _$appointmentId114, _$appointmentId114$, _$appointmentId115, _$appointmentId115$, _$appointmentId116, _$appointmentId116$, _$visit_type10, _$appointmentId117, _$appointmentId117$, _$appointmentId117$$S, _$practitioner_detail19, _$practitioner_detail20, _$status11, _$appointmentId$0$id11, _$appointmentId118, _$appointmentId118$, _$appointmentId119, _$appointmentId119$, _$appointmentId119$$P, _$appointmentId119$$P2, _$appointmentId120, _$appointmentId120$, _$appointmentId120$$P, _$appointmentId120$$P2, _$patient_id$0$teleco11, _$patient_id50, _$patient_id50$, _$patient_id50$$telec, _$patient_id50$$telec2, _$patient_id51;
39818
+ 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;
39339
39819
 
39340
39820
  return {
39341
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId110 = _.appointmentId) === null || _$appointmentId110 === void 0 ? void 0 : (_$appointmentId110$ = _$appointmentId110[0]) === null || _$appointmentId110$ === void 0 ? void 0 : (_$appointmentId110$$P = _$appointmentId110$.PersonID) === null || _$appointmentId110$$P === void 0 ? void 0 : (_$appointmentId110$$P2 = _$appointmentId110$$P[0]) === null || _$appointmentId110$$P2 === void 0 ? void 0 : (_$appointmentId110$$P3 = _$appointmentId110$$P2.photo) === null || _$appointmentId110$$P3 === void 0 ? void 0 : (_$appointmentId110$$P4 = _$appointmentId110$$P3[0]) === null || _$appointmentId110$$P4 === void 0 ? void 0 : _$appointmentId110$$P4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId111 = _.appointmentId) === null || _$appointmentId111 === void 0 ? void 0 : (_$appointmentId111$ = _$appointmentId111[0]) === null || _$appointmentId111$ === void 0 ? void 0 : (_$appointmentId111$$P = _$appointmentId111$.PersonID) === null || _$appointmentId111$$P === void 0 ? void 0 : (_$appointmentId111$$P2 = _$appointmentId111$$P[0]) === null || _$appointmentId111$$P2 === void 0 ? void 0 : (_$appointmentId111$$P3 = _$appointmentId111$$P2.photo) === null || _$appointmentId111$$P3 === void 0 ? void 0 : (_$appointmentId111$$P4 = _$appointmentId111$$P3[0]) === null || _$appointmentId111$$P4 === void 0 ? void 0 : _$appointmentId111$$P4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39342
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id48 = _.patient_id) === null || _$patient_id48 === void 0 ? void 0 : (_$patient_id48$ = _$patient_id48[0]) === null || _$patient_id48$ === void 0 ? void 0 : (_$patient_id48$$name = _$patient_id48$.name) === null || _$patient_id48$$name === void 0 ? void 0 : _$patient_id48$$name[0]) || {}),
39343
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id49 = _.patient_id) === null || _$patient_id49 === void 0 ? void 0 : (_$patient_id49$ = _$patient_id49[0]) === null || _$patient_id49$ === void 0 ? void 0 : _$patient_id49$.MRN) || "",
39344
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId112 = _.appointmentId) === null || _$appointmentId112 === void 0 ? void 0 : (_$appointmentId112$ = _$appointmentId112[0]) === null || _$appointmentId112$ === void 0 ? void 0 : _$appointmentId112$.appno) || "",
39345
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId113 = _.appointmentId) === null || _$appointmentId113 === void 0 ? void 0 : (_$appointmentId113$ = _$appointmentId113[0]) === null || _$appointmentId113$ === void 0 ? void 0 : _$appointmentId113$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId114 = _.appointmentId) === null || _$appointmentId114 === void 0 ? void 0 : (_$appointmentId114$ = _$appointmentId114[0]) === null || _$appointmentId114$ === void 0 ? void 0 : _$appointmentId114$.start, "DD MMM,YYYY") : "",
39346
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId115 = _.appointmentId) === null || _$appointmentId115 === void 0 ? void 0 : (_$appointmentId115$ = _$appointmentId115[0]) === null || _$appointmentId115$ === void 0 ? void 0 : _$appointmentId115$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId116 = _.appointmentId) === null || _$appointmentId116 === void 0 ? void 0 : (_$appointmentId116$ = _$appointmentId116[0]) === null || _$appointmentId116$ === void 0 ? void 0 : _$appointmentId116$.start, "hh:mm A") : "",
39347
- visitType: (_$visit_type10 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type10 !== void 0 ? _$visit_type10 : "",
39348
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId117 = _.appointmentId) === null || _$appointmentId117 === void 0 ? void 0 : (_$appointmentId117$ = _$appointmentId117[0]) === null || _$appointmentId117$ === void 0 ? void 0 : (_$appointmentId117$$S = _$appointmentId117$.SpecialtyID) === null || _$appointmentId117$$S === void 0 ? void 0 : _$appointmentId117$$S.map(function (spl) {
39349
- var _spl$coding17, _spl$coding17$;
39821
+ 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",
39822
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39823
+ // mrn: _?.patient_id?.[0]?.MRN || "",
39824
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39825
+ // date: _?.appointmentId?.[0]?.start
39826
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39827
+ // : "",
39828
+ // time: _?.appointmentId?.[0]?.start
39829
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39830
+ // : "",
39831
+ // visitType: _?.visit_type ?? "",
39832
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39833
+ // return spl?.coding?.[0]?.display;
39834
+ // }).join(", "),
39835
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39836
+ // appointmentStatus: _?.status?.display || "",
39837
+ // "View Patient": true,
39838
+ // Attend: true,
39839
+ // type: "OP",
39840
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39841
+ // data: _,
39842
+ // enId: _.id,
39843
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39844
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39845
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39846
+ // pId: _?.patient_id?.id,
39847
+ name: JSON.stringify({
39848
+ 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]) || {}),
39849
+ 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),
39850
+ 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) || "",
39851
+ 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 : "",
39852
+ 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 : ""
39853
+ }),
39854
+ 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) || "",
39855
+ date: JSON.stringify({
39856
+ 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") : "",
39857
+ 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") : ""
39858
+ }),
39859
+ visitType: (_$visit_type9 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type9 !== void 0 ? _$visit_type9 : "",
39860
+ speciality: JSON.stringify({
39861
+ 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) {
39862
+ var _spl$coding11, _spl$coding11$;
39350
39863
 
39351
- return spl === null || spl === void 0 ? void 0 : (_spl$coding17 = spl.coding) === null || _spl$coding17 === void 0 ? void 0 : (_spl$coding17$ = _spl$coding17[0]) === null || _spl$coding17$ === void 0 ? void 0 : _spl$coding17$.display;
39352
- }).join(", "),
39353
- 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) || "",
39354
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status11 = _.status) === null || _$status11 === void 0 ? void 0 : _$status11.display) || "",
39355
- "View Patient": true,
39356
- Attend: true,
39357
- type: "OP",
39358
- appNo: (_$appointmentId$0$id11 = _ === null || _ === void 0 ? void 0 : (_$appointmentId118 = _.appointmentId) === null || _$appointmentId118 === void 0 ? void 0 : (_$appointmentId118$ = _$appointmentId118[0]) === null || _$appointmentId118$ === void 0 ? void 0 : _$appointmentId118$.id) !== null && _$appointmentId$0$id11 !== void 0 ? _$appointmentId$0$id11 : '',
39359
- data: _,
39360
- enId: _.id,
39361
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId119 = _.appointmentId) === null || _$appointmentId119 === void 0 ? void 0 : (_$appointmentId119$ = _$appointmentId119[0]) === null || _$appointmentId119$ === void 0 ? void 0 : (_$appointmentId119$$P = _$appointmentId119$.PersonID) === null || _$appointmentId119$$P === void 0 ? void 0 : (_$appointmentId119$$P2 = _$appointmentId119$$P[0]) === null || _$appointmentId119$$P2 === void 0 ? void 0 : _$appointmentId119$$P2.birthDay),
39362
- gender: _ === null || _ === void 0 ? void 0 : (_$appointmentId120 = _.appointmentId) === null || _$appointmentId120 === void 0 ? void 0 : (_$appointmentId120$ = _$appointmentId120[0]) === null || _$appointmentId120$ === void 0 ? void 0 : (_$appointmentId120$$P = _$appointmentId120$.PersonID) === null || _$appointmentId120$$P === void 0 ? void 0 : (_$appointmentId120$$P2 = _$appointmentId120$$P[0]) === null || _$appointmentId120$$P2 === void 0 ? void 0 : _$appointmentId120$$P2.gender,
39363
- contact: (_$patient_id$0$teleco11 = _ === null || _ === void 0 ? void 0 : (_$patient_id50 = _.patient_id) === null || _$patient_id50 === void 0 ? void 0 : (_$patient_id50$ = _$patient_id50[0]) === null || _$patient_id50$ === void 0 ? void 0 : (_$patient_id50$$telec = _$patient_id50$.telecom) === null || _$patient_id50$$telec === void 0 ? void 0 : (_$patient_id50$$telec2 = _$patient_id50$$telec[0]) === null || _$patient_id50$$telec2 === void 0 ? void 0 : _$patient_id50$$telec2.value) !== null && _$patient_id$0$teleco11 !== void 0 ? _$patient_id$0$teleco11 : "",
39364
- pId: _ === null || _ === void 0 ? void 0 : (_$patient_id51 = _.patient_id) === null || _$patient_id51 === void 0 ? void 0 : _$patient_id51.id
39864
+ 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;
39865
+ }).join(", "),
39866
+ 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) || ""
39867
+ }),
39868
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display) || "",
39869
+ action: true
39365
39870
  };
39366
39871
  }) : [];
39367
39872
  return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39384,7 +39889,7 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
39384
39889
  })));
39385
39890
  var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsDoctor", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
39386
39891
  var payload,
39387
- _ref42,
39892
+ _ref36,
39388
39893
  rejectWithValue,
39389
39894
  _data$result18,
39390
39895
  data,
@@ -39396,7 +39901,7 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
39396
39901
  switch (_context18.prev = _context18.next) {
39397
39902
  case 0:
39398
39903
  payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
39399
- _ref42 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref42.rejectWithValue;
39904
+ _ref36 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
39400
39905
  _context18.prev = 2;
39401
39906
  _context18.next = 5;
39402
39907
  return fetchData$3({
@@ -39406,33 +39911,58 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
39406
39911
  case 5:
39407
39912
  data = _context18.sent;
39408
39913
  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 (_) {
39409
- var _$appointmentId121, _$appointmentId121$, _$appointmentId121$$P, _$appointmentId121$$P2, _$appointmentId121$$P3, _$appointmentId121$$P4, _$appointmentId122, _$appointmentId122$, _$appointmentId122$$P, _$appointmentId122$$P2, _$appointmentId122$$P3, _$appointmentId122$$P4, _$patient_id52, _$patient_id52$, _$patient_id52$$name, _$patient_id53, _$patient_id53$, _$appointmentId123, _$appointmentId123$, _$appointmentId124, _$appointmentId124$, _$appointmentId125, _$appointmentId125$, _$appointmentId126, _$appointmentId126$, _$appointmentId127, _$appointmentId127$, _$visit_type11, _$appointmentId128, _$appointmentId128$, _$appointmentId128$$S, _$practitioner_detail21, _$practitioner_detail22, _$status12, _$appointmentId$0$id12, _$appointmentId129, _$appointmentId129$, _$appointmentId130, _$appointmentId130$, _$appointmentId130$$P, _$appointmentId130$$P2, _$appointmentId131, _$appointmentId131$, _$appointmentId131$$P, _$appointmentId131$$P2, _$patient_id$0$teleco12, _$patient_id54, _$patient_id54$, _$patient_id54$$telec, _$patient_id54$$telec2, _$patient_id55;
39914
+ 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;
39410
39915
 
39411
39916
  return {
39412
- img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId121 = _.appointmentId) === null || _$appointmentId121 === void 0 ? void 0 : (_$appointmentId121$ = _$appointmentId121[0]) === null || _$appointmentId121$ === void 0 ? void 0 : (_$appointmentId121$$P = _$appointmentId121$.PersonID) === null || _$appointmentId121$$P === void 0 ? void 0 : (_$appointmentId121$$P2 = _$appointmentId121$$P[0]) === null || _$appointmentId121$$P2 === void 0 ? void 0 : (_$appointmentId121$$P3 = _$appointmentId121$$P2.photo) === null || _$appointmentId121$$P3 === void 0 ? void 0 : (_$appointmentId121$$P4 = _$appointmentId121$$P3[0]) === null || _$appointmentId121$$P4 === void 0 ? void 0 : _$appointmentId121$$P4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId122 = _.appointmentId) === null || _$appointmentId122 === void 0 ? void 0 : (_$appointmentId122$ = _$appointmentId122[0]) === null || _$appointmentId122$ === void 0 ? void 0 : (_$appointmentId122$$P = _$appointmentId122$.PersonID) === null || _$appointmentId122$$P === void 0 ? void 0 : (_$appointmentId122$$P2 = _$appointmentId122$$P[0]) === null || _$appointmentId122$$P2 === void 0 ? void 0 : (_$appointmentId122$$P3 = _$appointmentId122$$P2.photo) === null || _$appointmentId122$$P3 === void 0 ? void 0 : (_$appointmentId122$$P4 = _$appointmentId122$$P3[0]) === null || _$appointmentId122$$P4 === void 0 ? void 0 : _$appointmentId122$$P4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
39413
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id52 = _.patient_id) === null || _$patient_id52 === void 0 ? void 0 : (_$patient_id52$ = _$patient_id52[0]) === null || _$patient_id52$ === void 0 ? void 0 : (_$patient_id52$$name = _$patient_id52$.name) === null || _$patient_id52$$name === void 0 ? void 0 : _$patient_id52$$name[0]) || {}),
39414
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id53 = _.patient_id) === null || _$patient_id53 === void 0 ? void 0 : (_$patient_id53$ = _$patient_id53[0]) === null || _$patient_id53$ === void 0 ? void 0 : _$patient_id53$.MRN) || "",
39415
- refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId123 = _.appointmentId) === null || _$appointmentId123 === void 0 ? void 0 : (_$appointmentId123$ = _$appointmentId123[0]) === null || _$appointmentId123$ === void 0 ? void 0 : _$appointmentId123$.appno) || "",
39416
- date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId124 = _.appointmentId) === null || _$appointmentId124 === void 0 ? void 0 : (_$appointmentId124$ = _$appointmentId124[0]) === null || _$appointmentId124$ === void 0 ? void 0 : _$appointmentId124$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId125 = _.appointmentId) === null || _$appointmentId125 === void 0 ? void 0 : (_$appointmentId125$ = _$appointmentId125[0]) === null || _$appointmentId125$ === void 0 ? void 0 : _$appointmentId125$.start, "DD MMM,YYYY") : "",
39417
- time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId126 = _.appointmentId) === null || _$appointmentId126 === void 0 ? void 0 : (_$appointmentId126$ = _$appointmentId126[0]) === null || _$appointmentId126$ === void 0 ? void 0 : _$appointmentId126$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId127 = _.appointmentId) === null || _$appointmentId127 === void 0 ? void 0 : (_$appointmentId127$ = _$appointmentId127[0]) === null || _$appointmentId127$ === void 0 ? void 0 : _$appointmentId127$.start, "hh:mm A") : "",
39418
- visitType: (_$visit_type11 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type11 !== void 0 ? _$visit_type11 : "",
39419
- speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId128 = _.appointmentId) === null || _$appointmentId128 === void 0 ? void 0 : (_$appointmentId128$ = _$appointmentId128[0]) === null || _$appointmentId128$ === void 0 ? void 0 : (_$appointmentId128$$S = _$appointmentId128$.SpecialtyID) === null || _$appointmentId128$$S === void 0 ? void 0 : _$appointmentId128$$S.map(function (spl) {
39420
- var _spl$coding18, _spl$coding18$;
39421
-
39422
- return spl === null || spl === void 0 ? void 0 : (_spl$coding18 = spl.coding) === null || _spl$coding18 === void 0 ? void 0 : (_spl$coding18$ = _spl$coding18[0]) === null || _spl$coding18$ === void 0 ? void 0 : _spl$coding18$.display;
39423
- }).join(", "),
39424
- 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) || "",
39425
- appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status12 = _.status) === null || _$status12 === void 0 ? void 0 : _$status12.display) || "",
39426
- "View Patient": true,
39427
- Attend: true,
39428
- type: "OP",
39429
- appNo: (_$appointmentId$0$id12 = _ === null || _ === void 0 ? void 0 : (_$appointmentId129 = _.appointmentId) === null || _$appointmentId129 === void 0 ? void 0 : (_$appointmentId129$ = _$appointmentId129[0]) === null || _$appointmentId129$ === void 0 ? void 0 : _$appointmentId129$.id) !== null && _$appointmentId$0$id12 !== void 0 ? _$appointmentId$0$id12 : '',
39430
- data: _,
39431
- enId: _.id,
39432
- age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId130 = _.appointmentId) === null || _$appointmentId130 === void 0 ? void 0 : (_$appointmentId130$ = _$appointmentId130[0]) === null || _$appointmentId130$ === void 0 ? void 0 : (_$appointmentId130$$P = _$appointmentId130$.PersonID) === null || _$appointmentId130$$P === void 0 ? void 0 : (_$appointmentId130$$P2 = _$appointmentId130$$P[0]) === null || _$appointmentId130$$P2 === void 0 ? void 0 : _$appointmentId130$$P2.birthDay),
39433
- gender: _ === null || _ === void 0 ? void 0 : (_$appointmentId131 = _.appointmentId) === null || _$appointmentId131 === void 0 ? void 0 : (_$appointmentId131$ = _$appointmentId131[0]) === null || _$appointmentId131$ === void 0 ? void 0 : (_$appointmentId131$$P = _$appointmentId131$.PersonID) === null || _$appointmentId131$$P === void 0 ? void 0 : (_$appointmentId131$$P2 = _$appointmentId131$$P[0]) === null || _$appointmentId131$$P2 === void 0 ? void 0 : _$appointmentId131$$P2.gender,
39434
- contact: (_$patient_id$0$teleco12 = _ === null || _ === void 0 ? void 0 : (_$patient_id54 = _.patient_id) === null || _$patient_id54 === void 0 ? void 0 : (_$patient_id54$ = _$patient_id54[0]) === null || _$patient_id54$ === void 0 ? void 0 : (_$patient_id54$$telec = _$patient_id54$.telecom) === null || _$patient_id54$$telec === void 0 ? void 0 : (_$patient_id54$$telec2 = _$patient_id54$$telec[0]) === null || _$patient_id54$$telec2 === void 0 ? void 0 : _$patient_id54$$telec2.value) !== null && _$patient_id$0$teleco12 !== void 0 ? _$patient_id$0$teleco12 : "",
39435
- pId: _ === null || _ === void 0 ? void 0 : (_$patient_id55 = _.patient_id) === null || _$patient_id55 === void 0 ? void 0 : _$patient_id55.id
39917
+ 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",
39918
+ // name: makeName(_?.patient_id?.[0]?.name?.[0] || {}),
39919
+ // mrn: _?.patient_id?.[0]?.MRN || "",
39920
+ // refNo: _?.appointmentId?.[0]?.appno || "",
39921
+ // date: _?.appointmentId?.[0]?.start
39922
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "DD MMM,YYYY")
39923
+ // : "",
39924
+ // time: _?.appointmentId?.[0]?.start
39925
+ // ? utcTOLocal(_?.appointmentId?.[0]?.start, "hh:mm A")
39926
+ // : "",
39927
+ // visitType: _?.visit_type ?? "",
39928
+ // speciality: _?.appointmentId?.[0]?.SpecialtyID?.map((spl) => {
39929
+ // return spl?.coding?.[0]?.display;
39930
+ // }).join(", "),
39931
+ // clinic: _?.practitioner_details?.[0]?.clinic || "",
39932
+ // appointmentStatus: _?.status?.display || "",
39933
+ // "View Patient": true,
39934
+ // Attend: true,
39935
+ // type: "OP",
39936
+ // appNo: _?.appointmentId?.[0]?.id ?? '',
39937
+ // data: _,
39938
+ // enId: _.id,
39939
+ // age: getAge(_?.appointmentId?.[0]?.PersonID?.[0]?.birthDay),
39940
+ // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
39941
+ // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
39942
+ // pId: _?.patient_id?.id,
39943
+ name: JSON.stringify({
39944
+ 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]) || {}),
39945
+ 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),
39946
+ 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) || "",
39947
+ 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 : "",
39948
+ 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 : ""
39949
+ }),
39950
+ 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) || "",
39951
+ date: JSON.stringify({
39952
+ 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") : "",
39953
+ 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") : ""
39954
+ }),
39955
+ visitType: (_$visit_type10 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type10 !== void 0 ? _$visit_type10 : "",
39956
+ speciality: JSON.stringify({
39957
+ 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) {
39958
+ var _spl$coding12, _spl$coding12$;
39959
+
39960
+ 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;
39961
+ }).join(", "),
39962
+ 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) || ""
39963
+ }),
39964
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status10 = _.status) === null || _$status10 === void 0 ? void 0 : _$status10.display) || "",
39965
+ action: true
39436
39966
  };
39437
39967
  }) : [];
39438
39968
  return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {