primarycare-binder 1.1.9 → 1.1.13

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 +799 -503
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8016,9 +8016,15 @@ var query_ids = {
8016
8016
  "db_name": dbName,
8017
8017
  "entity": "Schedule",
8018
8018
  "filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
8019
- "return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.start >= ".concat(moment().unix(), " RETURN slt)})")
8019
+ "return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment().unix(), " AND slt.activestatus==true sort slt._id asc RETURN slt)})")
8020
8020
  };
8021
- }
8021
+ } // query: ({ start, end, id }) => ({
8022
+ // "db_name": dbName,
8023
+ // "entity": "Schedule",
8024
+ // "filter": `Schedule.start >= ${start} AND Schedule.end <= ${end} AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ${id}`,
8025
+ // "return_fields": `MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.start >= ${moment().unix()} RETURN slt)})`
8026
+ // }),
8027
+
8022
8028
  },
8023
8029
  "appointmentReducer/allAppointments": "ff38b85a-7363-4fb3-9a8a-2b861f06aeff",
8024
8030
  "appointmentReducer/reasonForAppointment": "ff38b85a-7363-4fb3-9a8a-2b861f05ceff",
@@ -18296,7 +18302,7 @@ var dashboardQuery = {
18296
18302
  entity: "Appointment,Encounter",
18297
18303
  filter: {
18298
18304
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
18299
- Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && lower(first(document(Encounter.statushistory[*].status)[*].display)) =='checked-in'")
18305
+ Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Checked-in'")
18300
18306
  },
18301
18307
  return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
18302
18308
  },
@@ -18305,7 +18311,7 @@ var dashboardQuery = {
18305
18311
  entity: "Appointment,Encounter",
18306
18312
  filter: {
18307
18313
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
18308
- Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && lower(first(document(Encounter.statushistory[*].status)[*].display)) =='checked-in'")
18314
+ Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Checked-in'")
18309
18315
  },
18310
18316
  return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
18311
18317
  }
@@ -18317,13 +18323,13 @@ var dashboardQuery = {
18317
18323
  db_name: dbName,
18318
18324
  entity: "Practitioner",
18319
18325
  filter: "Practitioner.activestatus==true && document(Practitioner.practitioner_role)[*].role any =='".concat(role, "'&& Practitioner.practitioner_type=='").concat(type, "'"),
18320
- return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:document(Practitioner.practitioner_role)},{photo:document(Practitioner.photo), assignedpatient:LENGTH(FOR Appointment IN Appointment FILTER Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end, " && Appointment.practitionerID[*] any==Practitioner.id Return Appointment)})")
18326
+ return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:(for pracrr in PractitionerRole filter pracrr._id in Practitioner.practitioner_role return merge(pracrr,{role:(for cod in CodeableConceptMaster filter cod._id==pracrr.role return document(cod.coding))}))},{photo:document(Practitioner.photo), assignedpatient:LENGTH(FOR Encounter IN Encounter FILTER Encounter.activestatus==true && Encounter.encounterdate>=".concat(start, " && Encounter.encounterdate<=").concat(end, " && Encounter.participant[*].Practitioner_id any == document(Practitioner._id).id return Encounter)})")
18321
18327
  },
18322
18328
  reassign: {
18323
18329
  db_name: dbName,
18324
18330
  entity: "Practitioner",
18325
18331
  filter: "Practitioner.activestatus==true && document(Practitioner.practitioner_role)[*].role any =='".concat(role, "'&& Practitioner.practitioner_type=='").concat(type, "'"),
18326
- return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:document(Practitioner.practitioner_role)},{photo:document(Practitioner.photo), assignedpatient:LENGTH(FOR Appointment IN Appointment FILTER Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end, " && Appointment.practitionerID[*] any==Practitioner.id Return Appointment)})")
18332
+ return_fields: "merge(keep(Practitioner,'name','id','_id','_key','practitioner_role','photo'),{name:(for hnm in HumanNameMaster filter hnm._id in Practitioner.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_role:(for pracrr in PractitionerRole filter pracrr._id in Practitioner.practitioner_role return merge(pracrr,{role:(for cod in CodeableConceptMaster filter cod._id==pracrr.role return document(cod.coding))}))},{photo:document(Practitioner.photo), assignedpatient:LENGTH(FOR Encounter IN Encounter FILTER Encounter.activestatus==true && Encounter.encounterdate>=".concat(start, " && Encounter.encounterdate<=").concat(end, " && Encounter.participant[*].Practitioner_id any == document(Practitioner._id).id return Encounter)})")
18327
18333
  }
18328
18334
  };
18329
18335
  },
@@ -18425,10 +18431,10 @@ var visitQuery = {
18425
18431
  return {
18426
18432
  1: {
18427
18433
  db_name: dbName,
18428
- entity: "Practitioner,Encounter",
18434
+ entity: "Appointment,Encounter",
18429
18435
  filter: {
18430
- Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
18431
- Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length")
18436
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orGId, "' "),
18437
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' collect with count into length"
18432
18438
  },
18433
18439
  return_fields: "{CheckedIn:length}"
18434
18440
  },
@@ -18453,10 +18459,10 @@ var visitQuery = {
18453
18459
  return {
18454
18460
  1: {
18455
18461
  db_name: dbName,
18456
- entity: "Practitioner,Encounter",
18462
+ entity: "Appointment,Encounter",
18457
18463
  filter: {
18458
- Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
18459
- Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Triaged' collect with count into length")
18464
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orGId, "' "),
18465
+ Encounter: "Appointment.id in Encounter.appointmentId && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Triaged' collect with count into length"
18460
18466
  },
18461
18467
  return_fields: "{TriagedCount:length}"
18462
18468
  },
@@ -18481,10 +18487,10 @@ var visitQuery = {
18481
18487
  return {
18482
18488
  1: {
18483
18489
  db_name: "primarycare",
18484
- entity: "Practitioner,Encounter",
18490
+ entity: "Appointment,Encounter",
18485
18491
  filter: {
18486
- Practitioner: "Practitioner.activestatus==true && Practitioner.id== ".concat(loginId, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(orGId, "'"),
18487
- Encounter: "Encounter.activestatus == true && Encounter.Organization_id ==".concat(orgId, " && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>= ").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length")
18492
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(startDate, " && Appointment.end<=").concat(endDate, " && document(Appointment.resourcecode).id ==").concat(loginId, " && Appointment.orgid=='").concat(orGId, "' "),
18493
+ Encounter: "Appointment.id in Encounter.appointmentId && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010' collect with count into length"
18488
18494
  },
18489
18495
  return_fields: "{CompletedCount:length}"
18490
18496
  },
@@ -18692,12 +18698,15 @@ var TODAY_SCHEDULE = createAsyncThunk("dashboardApiSlice/today_schedul", /*#__PU
18692
18698
  return arr.push({
18693
18699
  title: (_task$Appointment$0$c = task === null || task === void 0 ? void 0 : (_task$Appointment = task.Appointment) === null || _task$Appointment === void 0 ? void 0 : (_task$Appointment$ = _task$Appointment[0]) === null || _task$Appointment$ === void 0 ? void 0 : _task$Appointment$.consultationMode) !== null && _task$Appointment$0$c !== void 0 ? _task$Appointment$0$c : "",
18694
18700
  status: (task === null || task === void 0 ? void 0 : task.Appointment.length) > 0 ? false : true,
18695
- timefrom: (_task$start = task === null || task === void 0 ? void 0 : task.start) !== null && _task$start !== void 0 ? _task$start : "",
18696
- timeto: (_task$end = task === null || task === void 0 ? void 0 : task.end) !== null && _task$end !== void 0 ? _task$end : "",
18701
+ timefrom: (_task$start = task === null || task === void 0 ? void 0 : task.start) !== null && _task$start !== void 0 ? _task$start : 0,
18702
+ timeto: (_task$end = task === null || task === void 0 ? void 0 : task.end) !== null && _task$end !== void 0 ? _task$end : 0,
18697
18703
  type: (_task$Type = task === null || task === void 0 ? void 0 : task.Type) !== null && _task$Type !== void 0 ? _task$Type : ""
18698
18704
  });
18699
18705
  });
18700
18706
  });
18707
+ arr.sort(function (a, b) {
18708
+ return Number(a.timefrom) - Number(b.timefrom);
18709
+ });
18701
18710
  }
18702
18711
 
18703
18712
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -19047,7 +19056,7 @@ var TODAY_VISIT = createAsyncThunk("dashboardApiSlice/today_visit", /*#__PURE__*
19047
19056
  orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgIdInt = payload.orgIdInt;
19048
19057
  _context9.next = 6;
19049
19058
  return fetchData$3({
19050
- body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId)[roleId])
19059
+ body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
19051
19060
  }, __readDocumentUrl__);
19052
19061
 
19053
19062
  case 6:
@@ -20596,12 +20605,12 @@ var VISIT_CHECKEDIN = createAsyncThunk("visitStatsApiSlice/visitCheckedin", /*#_
20596
20605
  rejectWithValue,
20597
20606
  _data$result$0$Checke,
20598
20607
  _data$result$,
20599
- orgId,
20608
+ orgIdInt,
20600
20609
  startDate,
20601
20610
  endDate,
20602
20611
  roleId,
20603
20612
  loginId,
20604
- org_id,
20613
+ orgId,
20605
20614
  data,
20606
20615
  _args = arguments;
20607
20616
 
@@ -20612,10 +20621,10 @@ var VISIT_CHECKEDIN = createAsyncThunk("visitStatsApiSlice/visitCheckedin", /*#_
20612
20621
  payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
20613
20622
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
20614
20623
  _context.prev = 2;
20615
- orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, org_id = payload.org_id;
20624
+ orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
20616
20625
  _context.next = 6;
20617
20626
  return fetchData$3({
20618
- body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgId, loginId, org_id)[roleId])
20627
+ body: JSON.stringify(visitQuery.checkedIn(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
20619
20628
  }, __readDocumentUrl__);
20620
20629
 
20621
20630
  case 6:
@@ -20644,14 +20653,14 @@ var VISIT_TRAIGE_DONE = createAsyncThunk("visitStatsApiSlice/visitTraigeCount",
20644
20653
  var payload,
20645
20654
  _ref4,
20646
20655
  rejectWithValue,
20647
- _data$0$result$Triage,
20648
- _data$,
20649
- _data$$result,
20650
- orgId,
20656
+ _data$result$0$Triage,
20657
+ _data$result$2,
20658
+ orgIdInt,
20651
20659
  startDate,
20652
20660
  endDate,
20653
20661
  roleId,
20654
20662
  loginId,
20663
+ orgId,
20655
20664
  data,
20656
20665
  _args2 = arguments;
20657
20666
 
@@ -20662,17 +20671,17 @@ var VISIT_TRAIGE_DONE = createAsyncThunk("visitStatsApiSlice/visitTraigeCount",
20662
20671
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
20663
20672
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
20664
20673
  _context2.prev = 2;
20665
- orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
20674
+ orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
20666
20675
  _context2.next = 6;
20667
20676
  return fetchData$3({
20668
- body: JSON.stringify(visitQuery.traigeDone(orgId, startDate, endDate, loginId)[roleId])
20677
+ body: JSON.stringify(visitQuery.traigeDone(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
20669
20678
  }, __readDocumentUrl__);
20670
20679
 
20671
20680
  case 6:
20672
20681
  data = _context2.sent;
20673
20682
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
20674
20683
  data: {
20675
- count: (_data$0$result$Triage = (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$result = _data$.result) === null || _data$$result === void 0 ? void 0 : _data$$result.TriagedCount) !== null && _data$0$result$Triage !== void 0 ? _data$0$result$Triage : 0
20684
+ count: (_data$result$0$Triage = data === null || data === void 0 ? void 0 : (_data$result$2 = data.result[0]) === null || _data$result$2 === void 0 ? void 0 : _data$result$2.TriagedCount) !== null && _data$result$0$Triage !== void 0 ? _data$result$0$Triage : 0
20676
20685
  }
20677
20686
  }));
20678
20687
 
@@ -20694,14 +20703,14 @@ var VISIT_COMPLETED = createAsyncThunk("visitStatsApiSlice/visitCompletedCount",
20694
20703
  var payload,
20695
20704
  _ref6,
20696
20705
  rejectWithValue,
20697
- _data$0$result$Comple,
20698
- _data$2,
20699
- _data$2$result,
20700
- orgId,
20706
+ _data$result$0$Comple,
20707
+ _data$result$3,
20708
+ orgIdInt,
20701
20709
  startDate,
20702
20710
  endDate,
20703
20711
  roleId,
20704
20712
  loginId,
20713
+ orgId,
20705
20714
  data,
20706
20715
  _args3 = arguments;
20707
20716
 
@@ -20712,17 +20721,17 @@ var VISIT_COMPLETED = createAsyncThunk("visitStatsApiSlice/visitCompletedCount",
20712
20721
  payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
20713
20722
  _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
20714
20723
  _context3.prev = 2;
20715
- orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
20724
+ orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
20716
20725
  _context3.next = 6;
20717
20726
  return fetchData$3({
20718
- body: JSON.stringify(visitQuery.visitCompleted(orgId, startDate, endDate, loginId)[roleId])
20727
+ body: JSON.stringify(visitQuery.visitCompleted(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
20719
20728
  }, __readDocumentUrl__);
20720
20729
 
20721
20730
  case 6:
20722
20731
  data = _context3.sent;
20723
20732
  return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
20724
20733
  data: {
20725
- count: (_data$0$result$Comple = (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$result = _data$2.result) === null || _data$2$result === void 0 ? void 0 : _data$2$result.CompletedCount) !== null && _data$0$result$Comple !== void 0 ? _data$0$result$Comple : 0
20734
+ count: (_data$result$0$Comple = data === null || data === void 0 ? void 0 : (_data$result$3 = data.result[0]) === null || _data$result$3 === void 0 ? void 0 : _data$result$3.CompletedCount) !== null && _data$result$0$Comple !== void 0 ? _data$result$0$Comple : 0
20726
20735
  }
20727
20736
  }));
20728
20737
 
@@ -20744,14 +20753,14 @@ var VISIT_NO_SHOWS = createAsyncThunk("visitStatsApiSlice/visitNoShowCount", /*#
20744
20753
  var payload,
20745
20754
  _ref8,
20746
20755
  rejectWithValue,
20747
- _data$0$result$NoShow,
20748
- _data$3,
20749
- _data$3$result,
20750
- orgId,
20756
+ _data$result$0$NoShow,
20757
+ _data$result$4,
20758
+ orgIdInt,
20751
20759
  startDate,
20752
20760
  endDate,
20753
20761
  roleId,
20754
20762
  loginId,
20763
+ orgId,
20755
20764
  data,
20756
20765
  _args4 = arguments;
20757
20766
 
@@ -20762,17 +20771,17 @@ var VISIT_NO_SHOWS = createAsyncThunk("visitStatsApiSlice/visitNoShowCount", /*#
20762
20771
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
20763
20772
  _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
20764
20773
  _context4.prev = 2;
20765
- orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
20774
+ orgIdInt = payload.orgIdInt, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId, orgId = payload.orgId;
20766
20775
  _context4.next = 6;
20767
20776
  return fetchData$3({
20768
- body: JSON.stringify(visitQuery.noShows(orgId, startDate, endDate, loginId)[roleId])
20777
+ body: JSON.stringify(visitQuery.noShows(startDate, endDate, orgIdInt, loginId, orgId)[roleId])
20769
20778
  }, __readDocumentUrl__);
20770
20779
 
20771
20780
  case 6:
20772
20781
  data = _context4.sent;
20773
20782
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
20774
20783
  data: {
20775
- count: (_data$0$result$NoShow = (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : (_data$3$result = _data$3.result) === null || _data$3$result === void 0 ? void 0 : _data$3$result.NoShowCount) !== null && _data$0$result$NoShow !== void 0 ? _data$0$result$NoShow : 0
20784
+ count: (_data$result$0$NoShow = data === null || data === void 0 ? void 0 : (_data$result$4 = data.result[0]) === null || _data$result$4 === void 0 ? void 0 : _data$result$4.NoShowCount) !== null && _data$result$0$NoShow !== void 0 ? _data$result$0$NoShow : 0
20776
20785
  }
20777
20786
  }));
20778
20787
 
@@ -20795,7 +20804,7 @@ var GET_VISIT_STATS = createAsyncThunk("visitStatsApiSlice/visitStatsCount", /*#
20795
20804
  _ref10,
20796
20805
  rejectWithValue,
20797
20806
  _data$result$0$Checke2,
20798
- _data$result$2,
20807
+ _data$result$5,
20799
20808
  _data1$result$0$Triag,
20800
20809
  _data1$result,
20801
20810
  _data1$result$,
@@ -20855,7 +20864,7 @@ var GET_VISIT_STATS = createAsyncThunk("visitStatsApiSlice/visitStatsCount", /*#
20855
20864
  data3 = _context5.sent;
20856
20865
  return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
20857
20866
  data: {
20858
- checkedIn: (_data$result$0$Checke2 = data === null || data === void 0 ? void 0 : (_data$result$2 = data.result[0]) === null || _data$result$2 === void 0 ? void 0 : _data$result$2.CheckedIn) !== null && _data$result$0$Checke2 !== void 0 ? _data$result$0$Checke2 : 0,
20867
+ checkedIn: (_data$result$0$Checke2 = data === null || data === void 0 ? void 0 : (_data$result$5 = data.result[0]) === null || _data$result$5 === void 0 ? void 0 : _data$result$5.CheckedIn) !== null && _data$result$0$Checke2 !== void 0 ? _data$result$0$Checke2 : 0,
20859
20868
  traigeDone: (_data1$result$0$Triag = data1 === null || data1 === void 0 ? void 0 : (_data1$result = data1.result) === null || _data1$result === void 0 ? void 0 : (_data1$result$ = _data1$result[0]) === null || _data1$result$ === void 0 ? void 0 : _data1$result$.TriagedCount) !== null && _data1$result$0$Triag !== void 0 ? _data1$result$0$Triag : 0,
20860
20869
  visitCompleted: (_data2$result$0$Compl = data2 === null || data2 === void 0 ? void 0 : (_data2$result = data2.result) === null || _data2$result === void 0 ? void 0 : (_data2$result$ = _data2$result[0]) === null || _data2$result$ === void 0 ? void 0 : _data2$result$.CompletedCount) !== null && _data2$result$0$Compl !== void 0 ? _data2$result$0$Compl : 0,
20861
20870
  noShow: (_data3$result$0$NoSho = data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : (_data3$result$ = _data3$result[0]) === null || _data3$result$ === void 0 ? void 0 : _data3$result$.NoShowCount) !== null && _data3$result$0$NoSho !== void 0 ? _data3$result$0$NoSho : 0
@@ -20973,8 +20982,14 @@ var queries$9 = {
20973
20982
  deleteCC: function deleteCC(id) {
20974
20983
  return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CA_ChiefComplaints\",\n \"filter\": \"CA_ChiefComplaints._id =='").concat(id, "'\"\n }");
20975
20984
  },
20985
+ // encounterDetails: (encounterId) => `{
20986
+ // "db_name": "${dbName}",
20987
+ // "entity": "Encounter",
20988
+ // "filter": "Encounter.id == ${encounterId}",
20989
+ // "return_fields": "MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender})) })"
20990
+ // }`,
20976
20991
  encounterDetails: function encounterDetails(encounterId) {
20977
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.id == ").concat(encounterId, "\",\n \"return_fields\": \"MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender})) })\"\n }");
20992
+ return "{\n \"db_name\": \"primarycare\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.id == ".concat(encounterId, "\",\n \"return_fields\": \"MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender,communicationLanguage:document(p.communicationLanguage)})) })\"\n }");
20978
20993
  }
20979
20994
  };
20980
20995
 
@@ -21678,10 +21693,10 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
21678
21693
  data = _context12.sent;
21679
21694
  arr = [];
21680
21695
  data.result.map(function (val) {
21681
- var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$Patient$$communi2, _val$Patient$$communi3, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$practitioner_det4, _val$practitioner_det5, _ref25, _val$Patient2, _val$Patient2$, _val$Patient2$$name, _val$Patient2$$name$, _val$Patient2$$name$$, _val$Patient3, _val$Patient3$, _val$Patient3$$name, _val$Patient3$$name$, _val$Patient4, _val$Patient4$, _val$Patient4$$name, _val$Patient4$$name$, _val$Patient5, _val$Patient5$, _val$Patient5$$name, _val$Patient5$$name$, _val$Patient5$$name$$, _val$Patient6, _val$Patient6$, _val$Patient7, _val$Patient7$, _val$Patient8, _val$Patient8$, _val$Patient8$$gender, _val$Patient9, _val$Patient9$, _val$Patient$0$pident, _val$Patient10, _val$Patient10$, _val$Patient10$$piden, _val$Patient10$$piden2, _lang, _val$practitioner_det6, _val$practitioner_det7, _val$practitioner_det8;
21696
+ var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$practitioner_det4, _val$practitioner_det5, _ref25, _val$Patient2, _val$Patient2$, _val$Patient2$$name, _val$Patient2$$name$, _val$Patient2$$name$$, _val$Patient3, _val$Patient3$, _val$Patient3$$name, _val$Patient3$$name$, _val$Patient4, _val$Patient4$, _val$Patient4$$name, _val$Patient4$$name$, _val$Patient5, _val$Patient5$, _val$Patient5$$name, _val$Patient5$$name$, _val$Patient5$$name$$, _val$Patient6, _val$Patient6$, _val$Patient7, _val$Patient7$, _val$Patient8, _val$Patient8$, _val$Patient8$$gender, _val$Patient9, _val$Patient9$, _val$Patient$0$pident, _val$Patient10, _val$Patient10$, _val$Patient10$$piden, _val$Patient10$$piden2, _lang, _val$practitioner_det6, _val$practitioner_det7, _val$practitioner_det8;
21682
21697
 
21683
- var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.communication) === null || _val$Patient$$communi === void 0 ? void 0 : (_val$Patient$$communi2 = _val$Patient$$communi[0]) === null || _val$Patient$$communi2 === void 0 ? void 0 : (_val$Patient$$communi3 = _val$Patient$$communi2.language) === null || _val$Patient$$communi3 === void 0 ? void 0 : _val$Patient$$communi3.map(function (val) {
21684
- return val.language;
21698
+ var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.communicationLanguage) === null || _val$Patient$$communi === void 0 ? void 0 : _val$Patient$$communi.map(function (val) {
21699
+ return val.display;
21685
21700
  });
21686
21701
  lang = lang ? lang : null;
21687
21702
  arr.push({
@@ -24215,6 +24230,7 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
24215
24230
  body1,
24216
24231
  data1,
24217
24232
  vitelsJson,
24233
+ newObservations,
24218
24234
  adjArray,
24219
24235
  extraArr,
24220
24236
  _args3 = arguments;
@@ -24306,7 +24322,11 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
24306
24322
  vitelsJson = [];
24307
24323
 
24308
24324
  if (Array.isArray(data1[0].Observations)) {
24309
- vitelsJson = data1[0].Observations.map(function (val) {
24325
+ newObservations = data1[0].Observations;
24326
+ newObservations.sort(function (a, b) {
24327
+ return Number(a.obsseq) - Number(b.obsseq);
24328
+ });
24329
+ vitelsJson = newObservations.map(function (val) {
24310
24330
  var _val$obscode, _val$obscode2;
24311
24331
 
24312
24332
  if ((val === null || val === void 0 ? void 0 : (_val$obscode = val.obscode) === null || _val$obscode === void 0 ? void 0 : _val$obscode.VitalsCodesReferenceRanges.length) > 0 && (val === null || val === void 0 ? void 0 : (_val$obscode2 = val.obscode) === null || _val$obscode2 === void 0 ? void 0 : _val$obscode2.vitalscode)) {
@@ -24319,7 +24339,9 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
24319
24339
  return element !== undefined;
24320
24340
  });
24321
24341
  adjArray = vitelsJson.filter(function (val, i) {
24322
- return val.vitalscode == "HEIGHT";
24342
+ var _val$vitalscode, _val$vitalscode$toUpp, _val$vitalscode2, _val$vitalscode2$toUp;
24343
+
24344
+ return ((_val$vitalscode = val.vitalscode) === null || _val$vitalscode === void 0 ? void 0 : (_val$vitalscode$toUpp = _val$vitalscode.toUpperCase) === null || _val$vitalscode$toUpp === void 0 ? void 0 : _val$vitalscode$toUpp.call(_val$vitalscode)) === "HEIGHT" || ((_val$vitalscode2 = val.vitalscode) === null || _val$vitalscode2 === void 0 ? void 0 : (_val$vitalscode2$toUp = _val$vitalscode2.toUpperCase) === null || _val$vitalscode2$toUp === void 0 ? void 0 : _val$vitalscode2$toUp.call(_val$vitalscode2)) === "WEIGHT";
24323
24345
  });
24324
24346
  extraArr = [_objectSpread2(_objectSpread2({}, adjArray[0]), {}, {
24325
24347
  vitalscode: "BMI",
@@ -24337,7 +24359,7 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
24337
24359
  disabled: true
24338
24360
  })];
24339
24361
 
24340
- if (adjArray) {
24362
+ if (adjArray.length === 2) {
24341
24363
  vitelsJson = vitelsJson.concat(extraArr);
24342
24364
  }
24343
24365
 
@@ -37342,9 +37364,12 @@ var query$4 = {
37342
37364
  getAppointments: function getAppointments(data) {
37343
37365
  return {
37344
37366
  db_name: dbName,
37345
- entity: "Appointment",
37346
- filter: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appointmentType)!='cancelled' && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37347
- return_fields: "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})"
37367
+ entity: "Appointment,Encounter",
37368
+ filter: {
37369
+ 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, "'"),
37370
+ Encounter: "Appointment.id in Encounter.appointmentId"
37371
+ },
37372
+ return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
37348
37373
  };
37349
37374
  },
37350
37375
  getFirstVisits: function getFirstVisits(data) {
@@ -37352,10 +37377,10 @@ var query$4 = {
37352
37377
  db_name: dbName,
37353
37378
  entity: "Appointment,Encounter",
37354
37379
  filter: {
37355
- "Appointment": "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37356
- "Encounter": "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
37380
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37381
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
37357
37382
  },
37358
- "return_fields": "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})"
37383
+ return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
37359
37384
  };
37360
37385
  },
37361
37386
  getOtherVisits: function getOtherVisits(data) {
@@ -37363,10 +37388,10 @@ var query$4 = {
37363
37388
  db_name: dbName,
37364
37389
  entity: "Appointment,Encounter",
37365
37390
  filter: {
37366
- "Appointment": "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37367
- "Encounter": "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
37391
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37392
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
37368
37393
  },
37369
- "return_fields": "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})"
37394
+ return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
37370
37395
  };
37371
37396
  },
37372
37397
  getWalkIns: function getWalkIns(data) {
@@ -37374,10 +37399,10 @@ var query$4 = {
37374
37399
  db_name: dbName,
37375
37400
  entity: "Appointment,Encounter",
37376
37401
  filter: {
37377
- "Appointment": "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37378
- "Encounter": "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
37402
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37403
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
37379
37404
  },
37380
- "return_fields": "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})"
37405
+ return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
37381
37406
  };
37382
37407
  },
37383
37408
  getNewPatients: function getNewPatients(data) {
@@ -37385,10 +37410,10 @@ var query$4 = {
37385
37410
  db_name: dbName,
37386
37411
  entity: "Appointment,Encounter",
37387
37412
  filter: {
37388
- "Appointment": "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37389
- "Encounter": "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
37413
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37414
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
37390
37415
  },
37391
- "return_fields": "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})"
37416
+ return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
37392
37417
  };
37393
37418
  },
37394
37419
  getTodayVisits: function getTodayVisits(data) {
@@ -37399,46 +37424,147 @@ var query$4 = {
37399
37424
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37400
37425
  Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' "
37401
37426
  },
37402
- return_fields: "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})"
37427
+ return_fields: "{Appointment:merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}),Encounter:merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})}"
37403
37428
  };
37404
37429
  },
37405
37430
  // NURSE
37406
37431
  getAppointmentsNurse: function getAppointmentsNurse(data) {
37407
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\"\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37432
+ return {
37433
+ db_name: dbName,
37434
+ entity: "Practitioner,Appointment,Encounter",
37435
+ filter: {
37436
+ 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, "'"),
37437
+ 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"),
37438
+ Encounter: "Appointment.id in Encounter.appointmentId"
37439
+ },
37440
+ 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)}))})"
37441
+ };
37408
37442
  },
37409
37443
  getFirstVisitsNurse: function getFirstVisitsNurse(data) {
37410
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37444
+ return {
37445
+ db_name: dbName,
37446
+ entity: "Practitioner,Appointment,Encounter",
37447
+ filter: {
37448
+ 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, "'"),
37449
+ Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
37450
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
37451
+ },
37452
+ 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)}))})"
37453
+ };
37411
37454
  },
37412
37455
  getNewPatientsNurse: function getNewPatientsNurse(data) {
37413
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37456
+ return {
37457
+ db_name: dbName,
37458
+ entity: "Practitioner,Appointment,Encounter",
37459
+ filter: {
37460
+ 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, "'"),
37461
+ Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
37462
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
37463
+ },
37464
+ 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)}))})"
37465
+ };
37414
37466
  },
37415
37467
  getOtherVisitsNurse: function getOtherVisitsNurse(data) {
37416
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37468
+ return {
37469
+ db_name: dbName,
37470
+ entity: "Practitioner,Appointment,Encounter",
37471
+ filter: {
37472
+ 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, "'"),
37473
+ Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
37474
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
37475
+ },
37476
+ 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)}))})"
37477
+ };
37417
37478
  },
37418
37479
  getTodayVisitsNurse: function getTodayVisitsNurse(data) {
37419
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37480
+ return {
37481
+ db_name: dbName,
37482
+ entity: "Practitioner,Encounter",
37483
+ filter: {
37484
+ Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37485
+ Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIDInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'")
37486
+ },
37487
+ return_fields: "merge(Encounter,{status:document(Encounter.status),patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37488
+ };
37420
37489
  },
37421
37490
  getWalkInsNurse: function getWalkInsNurse(data) {
37422
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Appointment,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37491
+ return {
37492
+ db_name: dbName,
37493
+ entity: "Practitioner,Appointment,Encounter",
37494
+ filter: {
37495
+ Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37496
+ Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
37497
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
37498
+ },
37499
+ 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)}))})"
37500
+ };
37423
37501
  },
37424
37502
  //Doctor
37425
37503
  getAppointmentsDoctor: function getAppointmentsDoctor(data) {
37426
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appointmentType)!='cancelled' && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37504
+ return {
37505
+ db_name: dbName,
37506
+ entity: "Appointment,Encounter",
37507
+ filter: {
37508
+ 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, "'"),
37509
+ Encounter: "Appointment.id in Encounter.appointmentId"
37510
+ },
37511
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37512
+ };
37427
37513
  },
37428
37514
  getFirstVisitsDoctor: function getFirstVisitsDoctor(data) {
37429
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37515
+ return {
37516
+ db_name: dbName,
37517
+ entity: "Appointment,Encounter",
37518
+ filter: {
37519
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37520
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
37521
+ },
37522
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37523
+ };
37430
37524
  },
37431
37525
  getNewPatientsDoctor: function getNewPatientsDoctor(data) {
37432
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37526
+ return {
37527
+ db_name: dbName,
37528
+ entity: "Appointment,Encounter",
37529
+ filter: {
37530
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37531
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
37532
+ },
37533
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37534
+ };
37433
37535
  },
37434
37536
  getOtherVisitsDoctor: function getOtherVisitsDoctor(data) {
37435
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37537
+ return {
37538
+ db_name: dbName,
37539
+ entity: "Appointment,Encounter",
37540
+ filter: {
37541
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37542
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
37543
+ },
37544
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37545
+ };
37436
37546
  },
37437
37547
  getTodayVisitsDoctor: function getTodayVisitsDoctor(data) {
37438
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\": {\n \"Appointment\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, "\",\n \"Encounter\": \"Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'\",\n },\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in document(Appointment.practitionerID) return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37548
+ return {
37549
+ db_name: dbName,
37550
+ entity: "Appointment,Encounter",
37551
+ filter: {
37552
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' "),
37553
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
37554
+ },
37555
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37556
+ };
37439
37557
  },
37440
37558
  getWalkInsDoctor: function getWalkInsDoctor(data) {
37441
- return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment,Encounter\",\n \"filter\":{\n \"Appointment\":\"Appointment.activestatus==true && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\":\"Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')\"\n }\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)})),practitionerID:(for prac in Practitioner filter prac.id in Appointment.practitionerID return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(prac.gender)}))})\"\n }\n ");
37559
+ return {
37560
+ db_name: dbName,
37561
+ entity: "Appointment,Encounter",
37562
+ filter: {
37563
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
37564
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
37565
+ },
37566
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
37567
+ };
37442
37568
  }
37443
37569
  };
37444
37570
 
@@ -37468,20 +37594,24 @@ var GET_APPOINTMENTS = createAsyncThunk("appointmentStatsApiSlice/getAppointment
37468
37594
  case 5:
37469
37595
  data = _context.sent;
37470
37596
  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 (_) {
37471
- var _$PersonID, _$PersonID$, _$PersonID$$name, _$PersonID$$name$, _$SpecialtyID$0$text, _$SpecialtyID$, _$PersonID2, _$PersonID2$;
37597
+ var _$Appointment, _$Appointment$PersonI, _$Appointment$PersonI2, _$Appointment$PersonI3, _$Appointment$PersonI4, _$Appointment2, _$Appointment2$Person, _$Appointment2$Person2, _$Appointment2$Person3, _$Appointment2$Person4, _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Appointment3, _$Appointment4, _$Appointment5, _$Appointment6, _$Appointment7, _$Appointment7$Specia, _$Encounter3, _$Encounter3$practiti, _$Encounter3$practiti2, _$Appointment8, _$Appointment8$Person, _$Appointment8$Person2, _$Encounter4, _$Encounter4$patient_, _$Encounter4$patient_2, _$Encounter4$patient_3, _$Encounter4$patient_4, _$Encounter5, _$Encounter6, _$Encounter6$status;
37472
37598
 
37473
37599
  return {
37474
- "img": 'https://www.fillmurray.com/640/360',
37475
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID = _.PersonID) === null || _$PersonID === void 0 ? void 0 : (_$PersonID$ = _$PersonID[0]) === null || _$PersonID$ === void 0 ? void 0 : (_$PersonID$$name = _$PersonID$.name) === null || _$PersonID$$name === void 0 ? void 0 : (_$PersonID$$name$ = _$PersonID$$name[0]) === null || _$PersonID$$name$ === void 0 ? void 0 : _$PersonID$$name$.given,
37476
- "mrn": 'MRN',
37477
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37478
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37479
- "speciality": (_$SpecialtyID$0$text = _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$ = _.SpecialtyID[0]) === null || _$SpecialtyID$ === void 0 ? void 0 : _$SpecialtyID$.text) !== null && _$SpecialtyID$0$text !== void 0 ? _$SpecialtyID$0$text : "",
37480
- "clinic": 'Clinic',
37481
- "dob": _ === null || _ === void 0 ? void 0 : (_$PersonID2 = _.PersonID) === null || _$PersonID2 === void 0 ? void 0 : (_$PersonID2$ = _$PersonID2[0]) === null || _$PersonID2$ === void 0 ? void 0 : _$PersonID2$.birthDay,
37482
- "contact": 'Contact',
37483
- "visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
37484
- "appointmentStatus": 'Status',
37600
+ 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",
37601
+ 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]) || {}),
37602
+ 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,
37603
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment3 = _.Appointment) === null || _$Appointment3 === void 0 ? void 0 : _$Appointment3.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment4 = _.Appointment) === null || _$Appointment4 === void 0 ? void 0 : _$Appointment4.start).format("DD MMM,YYYY") : "",
37604
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment5 = _.Appointment) === null || _$Appointment5 === void 0 ? void 0 : _$Appointment5.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment6 = _.Appointment) === null || _$Appointment6 === void 0 ? void 0 : _$Appointment6.start).format("hh:mm A") : "",
37605
+ speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment7 = _.Appointment) === null || _$Appointment7 === void 0 ? void 0 : (_$Appointment7$Specia = _$Appointment7.SpecialtyID) === null || _$Appointment7$Specia === void 0 ? void 0 : _$Appointment7$Specia.map(function (spl) {
37606
+ var _spl$coding, _spl$coding$;
37607
+
37608
+ 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;
37609
+ }).join(", "),
37610
+ 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,
37611
+ dob: _ === null || _ === void 0 ? void 0 : (_$Appointment8 = _.Appointment) === null || _$Appointment8 === void 0 ? void 0 : (_$Appointment8$Person = _$Appointment8.PersonID) === null || _$Appointment8$Person === void 0 ? void 0 : (_$Appointment8$Person2 = _$Appointment8$Person[0]) === null || _$Appointment8$Person2 === void 0 ? void 0 : _$Appointment8$Person2.birthDay,
37612
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter4 = _.Encounter) === null || _$Encounter4 === void 0 ? void 0 : (_$Encounter4$patient_ = _$Encounter4.patient_id) === null || _$Encounter4$patient_ === void 0 ? void 0 : (_$Encounter4$patient_2 = _$Encounter4$patient_[0]) === null || _$Encounter4$patient_2 === void 0 ? void 0 : (_$Encounter4$patient_3 = _$Encounter4$patient_2.telecom) === null || _$Encounter4$patient_3 === void 0 ? void 0 : (_$Encounter4$patient_4 = _$Encounter4$patient_3[0]) === null || _$Encounter4$patient_4 === void 0 ? void 0 : _$Encounter4$patient_4.value),
37613
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter5 = _.Encounter) === null || _$Encounter5 === void 0 ? void 0 : _$Encounter5.visit_type,
37614
+ 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,
37485
37615
  "Register Visit": true,
37486
37616
  "Modify Appointment": true,
37487
37617
  "Cancel Appointment": true,
@@ -37530,20 +37660,24 @@ var GET_FIRST_VISITS = createAsyncThunk("appointmentStatsApiSlice/getFirstVisits
37530
37660
  case 5:
37531
37661
  data = _context2.sent;
37532
37662
  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 (_) {
37533
- var _$PersonID3, _$PersonID3$, _$PersonID3$$name, _$PersonID3$$name$, _$SpecialtyID$0$text2, _$SpecialtyID$2, _$PersonID4, _$PersonID4$;
37663
+ var _$Appointment9, _$Appointment9$Person, _$Appointment9$Person2, _$Appointment9$Person3, _$Appointment9$Person4, _$Appointment10, _$Appointment10$Perso, _$Appointment10$Perso2, _$Appointment10$Perso3, _$Appointment10$Perso4, _$Encounter7, _$Encounter7$patient_, _$Encounter7$patient_2, _$Encounter7$patient_3, _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Appointment11, _$Appointment12, _$Appointment13, _$Appointment14, _$Appointment15, _$Appointment15$Speci, _$Encounter9, _$Encounter9$practiti, _$Encounter9$practiti2, _$Appointment16, _$Appointment16$Perso, _$Appointment16$Perso2, _$Encounter10, _$Encounter10$patient, _$Encounter10$patient2, _$Encounter10$patient3, _$Encounter10$patient4, _$Encounter11, _$Encounter12, _$Encounter12$status;
37534
37664
 
37535
37665
  return {
37536
- img: "https://www.fillmurray.com/640/360",
37537
- name: _ === null || _ === void 0 ? void 0 : (_$PersonID3 = _.PersonID) === null || _$PersonID3 === void 0 ? void 0 : (_$PersonID3$ = _$PersonID3[0]) === null || _$PersonID3$ === void 0 ? void 0 : (_$PersonID3$$name = _$PersonID3$.name) === null || _$PersonID3$$name === void 0 ? void 0 : (_$PersonID3$$name$ = _$PersonID3$$name[0]) === null || _$PersonID3$$name$ === void 0 ? void 0 : _$PersonID3$$name$.given,
37538
- mrn: "MRN",
37539
- date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
37540
- time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
37541
- speciality: (_$SpecialtyID$0$text2 = _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$2 = _.SpecialtyID[0]) === null || _$SpecialtyID$2 === void 0 ? void 0 : _$SpecialtyID$2.text) !== null && _$SpecialtyID$0$text2 !== void 0 ? _$SpecialtyID$0$text2 : "",
37542
- clinic: "Clinic",
37543
- dob: _ === null || _ === void 0 ? void 0 : (_$PersonID4 = _.PersonID) === null || _$PersonID4 === void 0 ? void 0 : (_$PersonID4$ = _$PersonID4[0]) === null || _$PersonID4$ === void 0 ? void 0 : _$PersonID4$.birthDay,
37544
- contact: "Contact",
37545
- visitType: _ === null || _ === void 0 ? void 0 : _.appointmentType,
37546
- appointmentStatus: "Status",
37666
+ img: (_ === null || _ === void 0 ? void 0 : (_$Appointment9 = _.Appointment) === null || _$Appointment9 === void 0 ? void 0 : (_$Appointment9$Person = _$Appointment9.PersonID) === null || _$Appointment9$Person === void 0 ? void 0 : (_$Appointment9$Person2 = _$Appointment9$Person[0]) === null || _$Appointment9$Person2 === void 0 ? void 0 : (_$Appointment9$Person3 = _$Appointment9$Person2.photo) === null || _$Appointment9$Person3 === void 0 ? void 0 : (_$Appointment9$Person4 = _$Appointment9$Person3[0]) === null || _$Appointment9$Person4 === void 0 ? void 0 : _$Appointment9$Person4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment10 = _.Appointment) === null || _$Appointment10 === void 0 ? void 0 : (_$Appointment10$Perso = _$Appointment10.PersonID) === null || _$Appointment10$Perso === void 0 ? void 0 : (_$Appointment10$Perso2 = _$Appointment10$Perso[0]) === null || _$Appointment10$Perso2 === void 0 ? void 0 : (_$Appointment10$Perso3 = _$Appointment10$Perso2.photo) === null || _$Appointment10$Perso3 === void 0 ? void 0 : (_$Appointment10$Perso4 = _$Appointment10$Perso3[0]) === null || _$Appointment10$Perso4 === void 0 ? void 0 : _$Appointment10$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
37667
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter7 = _.Encounter) === null || _$Encounter7 === void 0 ? void 0 : (_$Encounter7$patient_ = _$Encounter7.patient_id) === null || _$Encounter7$patient_ === void 0 ? void 0 : (_$Encounter7$patient_2 = _$Encounter7$patient_[0]) === null || _$Encounter7$patient_2 === void 0 ? void 0 : (_$Encounter7$patient_3 = _$Encounter7$patient_2.name) === null || _$Encounter7$patient_3 === void 0 ? void 0 : _$Encounter7$patient_3[0]) || {}),
37668
+ mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter8 = _.Encounter) === null || _$Encounter8 === void 0 ? void 0 : (_$Encounter8$patient_ = _$Encounter8.patient_id) === null || _$Encounter8$patient_ === void 0 ? void 0 : (_$Encounter8$patient_2 = _$Encounter8$patient_[0]) === null || _$Encounter8$patient_2 === void 0 ? void 0 : _$Encounter8$patient_2.MRN,
37669
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment11 = _.Appointment) === null || _$Appointment11 === void 0 ? void 0 : _$Appointment11.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment12 = _.Appointment) === null || _$Appointment12 === void 0 ? void 0 : _$Appointment12.start).format("DD MMM,YYYY") : "",
37670
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment13 = _.Appointment) === null || _$Appointment13 === void 0 ? void 0 : _$Appointment13.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment14 = _.Appointment) === null || _$Appointment14 === void 0 ? void 0 : _$Appointment14.start).format("hh:mm A") : "",
37671
+ speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment15 = _.Appointment) === null || _$Appointment15 === void 0 ? void 0 : (_$Appointment15$Speci = _$Appointment15.SpecialtyID) === null || _$Appointment15$Speci === void 0 ? void 0 : _$Appointment15$Speci.map(function (spl) {
37672
+ var _spl$coding2, _spl$coding2$;
37673
+
37674
+ 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;
37675
+ }).join(", "),
37676
+ clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$practiti = _$Encounter9.practitioner_details) === null || _$Encounter9$practiti === void 0 ? void 0 : (_$Encounter9$practiti2 = _$Encounter9$practiti[0]) === null || _$Encounter9$practiti2 === void 0 ? void 0 : _$Encounter9$practiti2.clinic,
37677
+ dob: _ === null || _ === void 0 ? void 0 : (_$Appointment16 = _.Appointment) === null || _$Appointment16 === void 0 ? void 0 : (_$Appointment16$Perso = _$Appointment16.PersonID) === null || _$Appointment16$Perso === void 0 ? void 0 : (_$Appointment16$Perso2 = _$Appointment16$Perso[0]) === null || _$Appointment16$Perso2 === void 0 ? void 0 : _$Appointment16$Perso2.birthDay,
37678
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter10 = _.Encounter) === null || _$Encounter10 === void 0 ? void 0 : (_$Encounter10$patient = _$Encounter10.patient_id) === null || _$Encounter10$patient === void 0 ? void 0 : (_$Encounter10$patient2 = _$Encounter10$patient[0]) === null || _$Encounter10$patient2 === void 0 ? void 0 : (_$Encounter10$patient3 = _$Encounter10$patient2.telecom) === null || _$Encounter10$patient3 === void 0 ? void 0 : (_$Encounter10$patient4 = _$Encounter10$patient3[0]) === null || _$Encounter10$patient4 === void 0 ? void 0 : _$Encounter10$patient4.value),
37679
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter11 = _.Encounter) === null || _$Encounter11 === void 0 ? void 0 : _$Encounter11.visit_type,
37680
+ appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter12 = _.Encounter) === null || _$Encounter12 === void 0 ? void 0 : (_$Encounter12$status = _$Encounter12.status) === null || _$Encounter12$status === void 0 ? void 0 : _$Encounter12$status.display,
37547
37681
  "Register Visit": true,
37548
37682
  "Modify Appointment": true,
37549
37683
  "Cancel Appointment": true,
@@ -37592,20 +37726,24 @@ var GET_OTHER_VISITS = createAsyncThunk("appointmentStatsApiSlice/getOtherVisits
37592
37726
  case 5:
37593
37727
  data = _context3.sent;
37594
37728
  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 (_) {
37595
- var _$PersonID5, _$PersonID5$, _$PersonID5$$name, _$PersonID5$$name$, _$SpecialtyID$0$text3, _$SpecialtyID$3, _$PersonID6, _$PersonID6$;
37729
+ var _$Appointment17, _$Appointment17$Perso, _$Appointment17$Perso2, _$Appointment17$Perso3, _$Appointment17$Perso4, _$Appointment18, _$Appointment18$Perso, _$Appointment18$Perso2, _$Appointment18$Perso3, _$Appointment18$Perso4, _$Encounter13, _$Encounter13$patient, _$Encounter13$patient2, _$Encounter13$patient3, _$Encounter14, _$Encounter14$patient, _$Encounter14$patient2, _$Appointment19, _$Appointment20, _$Appointment21, _$Appointment22, _$Appointment23, _$Appointment23$Speci, _$Encounter15, _$Encounter15$practit, _$Encounter15$practit2, _$Appointment24, _$Appointment24$Perso, _$Appointment24$Perso2, _$Encounter16, _$Encounter16$patient, _$Encounter16$patient2, _$Encounter16$patient3, _$Encounter16$patient4, _$Encounter17, _$Encounter18, _$Encounter18$status;
37596
37730
 
37597
37731
  return {
37598
- img: "https://www.fillmurray.com/640/360",
37599
- name: _ === null || _ === void 0 ? void 0 : (_$PersonID5 = _.PersonID) === null || _$PersonID5 === void 0 ? void 0 : (_$PersonID5$ = _$PersonID5[0]) === null || _$PersonID5$ === void 0 ? void 0 : (_$PersonID5$$name = _$PersonID5$.name) === null || _$PersonID5$$name === void 0 ? void 0 : (_$PersonID5$$name$ = _$PersonID5$$name[0]) === null || _$PersonID5$$name$ === void 0 ? void 0 : _$PersonID5$$name$.given,
37600
- mrn: "MRN",
37601
- date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
37602
- time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
37603
- speciality: (_$SpecialtyID$0$text3 = _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$3 = _.SpecialtyID[0]) === null || _$SpecialtyID$3 === void 0 ? void 0 : _$SpecialtyID$3.text) !== null && _$SpecialtyID$0$text3 !== void 0 ? _$SpecialtyID$0$text3 : "",
37604
- clinic: "Clinic",
37605
- dob: _ === null || _ === void 0 ? void 0 : (_$PersonID6 = _.PersonID) === null || _$PersonID6 === void 0 ? void 0 : (_$PersonID6$ = _$PersonID6[0]) === null || _$PersonID6$ === void 0 ? void 0 : _$PersonID6$.birthDay,
37606
- contact: "Contact",
37607
- visitType: _ === null || _ === void 0 ? void 0 : _.appointmentType,
37608
- appointmentStatus: "Status",
37732
+ img: (_ === null || _ === void 0 ? void 0 : (_$Appointment17 = _.Appointment) === null || _$Appointment17 === void 0 ? void 0 : (_$Appointment17$Perso = _$Appointment17.PersonID) === null || _$Appointment17$Perso === void 0 ? void 0 : (_$Appointment17$Perso2 = _$Appointment17$Perso[0]) === null || _$Appointment17$Perso2 === void 0 ? void 0 : (_$Appointment17$Perso3 = _$Appointment17$Perso2.photo) === null || _$Appointment17$Perso3 === void 0 ? void 0 : (_$Appointment17$Perso4 = _$Appointment17$Perso3[0]) === null || _$Appointment17$Perso4 === void 0 ? void 0 : _$Appointment17$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment18 = _.Appointment) === null || _$Appointment18 === void 0 ? void 0 : (_$Appointment18$Perso = _$Appointment18.PersonID) === null || _$Appointment18$Perso === void 0 ? void 0 : (_$Appointment18$Perso2 = _$Appointment18$Perso[0]) === null || _$Appointment18$Perso2 === void 0 ? void 0 : (_$Appointment18$Perso3 = _$Appointment18$Perso2.photo) === null || _$Appointment18$Perso3 === void 0 ? void 0 : (_$Appointment18$Perso4 = _$Appointment18$Perso3[0]) === null || _$Appointment18$Perso4 === void 0 ? void 0 : _$Appointment18$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
37733
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter13 = _.Encounter) === null || _$Encounter13 === void 0 ? void 0 : (_$Encounter13$patient = _$Encounter13.patient_id) === null || _$Encounter13$patient === void 0 ? void 0 : (_$Encounter13$patient2 = _$Encounter13$patient[0]) === null || _$Encounter13$patient2 === void 0 ? void 0 : (_$Encounter13$patient3 = _$Encounter13$patient2.name) === null || _$Encounter13$patient3 === void 0 ? void 0 : _$Encounter13$patient3[0]) || {}),
37734
+ mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter14 = _.Encounter) === null || _$Encounter14 === void 0 ? void 0 : (_$Encounter14$patient = _$Encounter14.patient_id) === null || _$Encounter14$patient === void 0 ? void 0 : (_$Encounter14$patient2 = _$Encounter14$patient[0]) === null || _$Encounter14$patient2 === void 0 ? void 0 : _$Encounter14$patient2.MRN,
37735
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment19 = _.Appointment) === null || _$Appointment19 === void 0 ? void 0 : _$Appointment19.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment20 = _.Appointment) === null || _$Appointment20 === void 0 ? void 0 : _$Appointment20.start).format("DD MMM,YYYY") : "",
37736
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment21 = _.Appointment) === null || _$Appointment21 === void 0 ? void 0 : _$Appointment21.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment22 = _.Appointment) === null || _$Appointment22 === void 0 ? void 0 : _$Appointment22.start).format("hh:mm A") : "",
37737
+ speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment23 = _.Appointment) === null || _$Appointment23 === void 0 ? void 0 : (_$Appointment23$Speci = _$Appointment23.SpecialtyID) === null || _$Appointment23$Speci === void 0 ? void 0 : _$Appointment23$Speci.map(function (spl) {
37738
+ var _spl$coding3, _spl$coding3$;
37739
+
37740
+ 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;
37741
+ }).join(", "),
37742
+ clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter15 = _.Encounter) === null || _$Encounter15 === void 0 ? void 0 : (_$Encounter15$practit = _$Encounter15.practitioner_details) === null || _$Encounter15$practit === void 0 ? void 0 : (_$Encounter15$practit2 = _$Encounter15$practit[0]) === null || _$Encounter15$practit2 === void 0 ? void 0 : _$Encounter15$practit2.clinic,
37743
+ dob: _ === null || _ === void 0 ? void 0 : (_$Appointment24 = _.Appointment) === null || _$Appointment24 === void 0 ? void 0 : (_$Appointment24$Perso = _$Appointment24.PersonID) === null || _$Appointment24$Perso === void 0 ? void 0 : (_$Appointment24$Perso2 = _$Appointment24$Perso[0]) === null || _$Appointment24$Perso2 === void 0 ? void 0 : _$Appointment24$Perso2.birthDay,
37744
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter16 = _.Encounter) === null || _$Encounter16 === void 0 ? void 0 : (_$Encounter16$patient = _$Encounter16.patient_id) === null || _$Encounter16$patient === void 0 ? void 0 : (_$Encounter16$patient2 = _$Encounter16$patient[0]) === null || _$Encounter16$patient2 === void 0 ? void 0 : (_$Encounter16$patient3 = _$Encounter16$patient2.telecom) === null || _$Encounter16$patient3 === void 0 ? void 0 : (_$Encounter16$patient4 = _$Encounter16$patient3[0]) === null || _$Encounter16$patient4 === void 0 ? void 0 : _$Encounter16$patient4.value),
37745
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter17 = _.Encounter) === null || _$Encounter17 === void 0 ? void 0 : _$Encounter17.visit_type,
37746
+ 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,
37609
37747
  "Register Visit": true,
37610
37748
  "Modify Appointment": true,
37611
37749
  "Cancel Appointment": true,
@@ -37654,20 +37792,24 @@ var GET_WALK_INS = createAsyncThunk("appointmentStatsApiSlice/getWalkIns", /*#__
37654
37792
  case 5:
37655
37793
  data = _context4.sent;
37656
37794
  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 (_) {
37657
- var _$PersonID7, _$PersonID7$, _$PersonID7$$name, _$PersonID7$$name$, _$SpecialtyID$0$text4, _$SpecialtyID$4, _$PersonID8, _$PersonID8$;
37795
+ var _$Appointment25, _$Appointment25$Perso, _$Appointment25$Perso2, _$Appointment25$Perso3, _$Appointment25$Perso4, _$Appointment26, _$Appointment26$Perso, _$Appointment26$Perso2, _$Appointment26$Perso3, _$Appointment26$Perso4, _$Encounter19, _$Encounter19$patient, _$Encounter19$patient2, _$Encounter19$patient3, _$Encounter20, _$Encounter20$patient, _$Encounter20$patient2, _$Appointment27, _$Appointment28, _$Appointment29, _$Appointment30, _$Appointment31, _$Appointment31$Speci, _$Encounter21, _$Encounter21$practit, _$Encounter21$practit2, _$Appointment32, _$Appointment32$Perso, _$Appointment32$Perso2, _$Encounter22, _$Encounter22$patient, _$Encounter22$patient2, _$Encounter22$patient3, _$Encounter22$patient4, _$Encounter23, _$Encounter24, _$Encounter24$status;
37658
37796
 
37659
37797
  return {
37660
- "img": 'https://www.fillmurray.com/640/360',
37661
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID7 = _.PersonID) === null || _$PersonID7 === void 0 ? void 0 : (_$PersonID7$ = _$PersonID7[0]) === null || _$PersonID7$ === void 0 ? void 0 : (_$PersonID7$$name = _$PersonID7$.name) === null || _$PersonID7$$name === void 0 ? void 0 : (_$PersonID7$$name$ = _$PersonID7$$name[0]) === null || _$PersonID7$$name$ === void 0 ? void 0 : _$PersonID7$$name$.given,
37662
- "mrn": 'MRN',
37663
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37664
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37665
- "speciality": (_$SpecialtyID$0$text4 = _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$4 = _.SpecialtyID[0]) === null || _$SpecialtyID$4 === void 0 ? void 0 : _$SpecialtyID$4.text) !== null && _$SpecialtyID$0$text4 !== void 0 ? _$SpecialtyID$0$text4 : "",
37666
- "clinic": 'Clinic',
37667
- "dob": _ === null || _ === void 0 ? void 0 : (_$PersonID8 = _.PersonID) === null || _$PersonID8 === void 0 ? void 0 : (_$PersonID8$ = _$PersonID8[0]) === null || _$PersonID8$ === void 0 ? void 0 : _$PersonID8$.birthDay,
37668
- "contact": 'Contact',
37669
- "visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
37670
- "appointmentStatus": 'Status',
37798
+ img: (_ === null || _ === void 0 ? void 0 : (_$Appointment25 = _.Appointment) === null || _$Appointment25 === void 0 ? void 0 : (_$Appointment25$Perso = _$Appointment25.PersonID) === null || _$Appointment25$Perso === void 0 ? void 0 : (_$Appointment25$Perso2 = _$Appointment25$Perso[0]) === null || _$Appointment25$Perso2 === void 0 ? void 0 : (_$Appointment25$Perso3 = _$Appointment25$Perso2.photo) === null || _$Appointment25$Perso3 === void 0 ? void 0 : (_$Appointment25$Perso4 = _$Appointment25$Perso3[0]) === null || _$Appointment25$Perso4 === void 0 ? void 0 : _$Appointment25$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment26 = _.Appointment) === null || _$Appointment26 === void 0 ? void 0 : (_$Appointment26$Perso = _$Appointment26.PersonID) === null || _$Appointment26$Perso === void 0 ? void 0 : (_$Appointment26$Perso2 = _$Appointment26$Perso[0]) === null || _$Appointment26$Perso2 === void 0 ? void 0 : (_$Appointment26$Perso3 = _$Appointment26$Perso2.photo) === null || _$Appointment26$Perso3 === void 0 ? void 0 : (_$Appointment26$Perso4 = _$Appointment26$Perso3[0]) === null || _$Appointment26$Perso4 === void 0 ? void 0 : _$Appointment26$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
37799
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter19 = _.Encounter) === null || _$Encounter19 === void 0 ? void 0 : (_$Encounter19$patient = _$Encounter19.patient_id) === null || _$Encounter19$patient === void 0 ? void 0 : (_$Encounter19$patient2 = _$Encounter19$patient[0]) === null || _$Encounter19$patient2 === void 0 ? void 0 : (_$Encounter19$patient3 = _$Encounter19$patient2.name) === null || _$Encounter19$patient3 === void 0 ? void 0 : _$Encounter19$patient3[0]) || {}),
37800
+ mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter20 = _.Encounter) === null || _$Encounter20 === void 0 ? void 0 : (_$Encounter20$patient = _$Encounter20.patient_id) === null || _$Encounter20$patient === void 0 ? void 0 : (_$Encounter20$patient2 = _$Encounter20$patient[0]) === null || _$Encounter20$patient2 === void 0 ? void 0 : _$Encounter20$patient2.MRN,
37801
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment27 = _.Appointment) === null || _$Appointment27 === void 0 ? void 0 : _$Appointment27.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment28 = _.Appointment) === null || _$Appointment28 === void 0 ? void 0 : _$Appointment28.start).format("DD MMM,YYYY") : "",
37802
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment29 = _.Appointment) === null || _$Appointment29 === void 0 ? void 0 : _$Appointment29.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment30 = _.Appointment) === null || _$Appointment30 === void 0 ? void 0 : _$Appointment30.start).format("hh:mm A") : "",
37803
+ speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment31 = _.Appointment) === null || _$Appointment31 === void 0 ? void 0 : (_$Appointment31$Speci = _$Appointment31.SpecialtyID) === null || _$Appointment31$Speci === void 0 ? void 0 : _$Appointment31$Speci.map(function (spl) {
37804
+ var _spl$coding4, _spl$coding4$;
37805
+
37806
+ 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;
37807
+ }).join(", "),
37808
+ clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter21 = _.Encounter) === null || _$Encounter21 === void 0 ? void 0 : (_$Encounter21$practit = _$Encounter21.practitioner_details) === null || _$Encounter21$practit === void 0 ? void 0 : (_$Encounter21$practit2 = _$Encounter21$practit[0]) === null || _$Encounter21$practit2 === void 0 ? void 0 : _$Encounter21$practit2.clinic,
37809
+ dob: _ === null || _ === void 0 ? void 0 : (_$Appointment32 = _.Appointment) === null || _$Appointment32 === void 0 ? void 0 : (_$Appointment32$Perso = _$Appointment32.PersonID) === null || _$Appointment32$Perso === void 0 ? void 0 : (_$Appointment32$Perso2 = _$Appointment32$Perso[0]) === null || _$Appointment32$Perso2 === void 0 ? void 0 : _$Appointment32$Perso2.birthDay,
37810
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter22 = _.Encounter) === null || _$Encounter22 === void 0 ? void 0 : (_$Encounter22$patient = _$Encounter22.patient_id) === null || _$Encounter22$patient === void 0 ? void 0 : (_$Encounter22$patient2 = _$Encounter22$patient[0]) === null || _$Encounter22$patient2 === void 0 ? void 0 : (_$Encounter22$patient3 = _$Encounter22$patient2.telecom) === null || _$Encounter22$patient3 === void 0 ? void 0 : (_$Encounter22$patient4 = _$Encounter22$patient3[0]) === null || _$Encounter22$patient4 === void 0 ? void 0 : _$Encounter22$patient4.value),
37811
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter23 = _.Encounter) === null || _$Encounter23 === void 0 ? void 0 : _$Encounter23.visit_type,
37812
+ appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter24 = _.Encounter) === null || _$Encounter24 === void 0 ? void 0 : (_$Encounter24$status = _$Encounter24.status) === null || _$Encounter24$status === void 0 ? void 0 : _$Encounter24$status.display,
37671
37813
  "Register Visit": true,
37672
37814
  "Modify Appointment": true,
37673
37815
  "Cancel Appointment": true,
@@ -37716,20 +37858,24 @@ var GET_NEW_PATIENTS = createAsyncThunk("appointmentStatsApiSlice/getNewPatients
37716
37858
  case 5:
37717
37859
  data = _context5.sent;
37718
37860
  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 (_) {
37719
- var _$PersonID9, _$PersonID9$, _$PersonID9$$name, _$PersonID9$$name$, _$SpecialtyID$0$text5, _$SpecialtyID$5, _$PersonID10, _$PersonID10$;
37861
+ var _$Appointment33, _$Appointment33$Perso, _$Appointment33$Perso2, _$Appointment33$Perso3, _$Appointment33$Perso4, _$Appointment34, _$Appointment34$Perso, _$Appointment34$Perso2, _$Appointment34$Perso3, _$Appointment34$Perso4, _$Encounter25, _$Encounter25$patient, _$Encounter25$patient2, _$Encounter25$patient3, _$Encounter26, _$Encounter26$patient, _$Encounter26$patient2, _$Appointment35, _$Appointment36, _$Appointment37, _$Appointment38, _$Appointment39, _$Appointment39$Speci, _$Encounter27, _$Encounter27$practit, _$Encounter27$practit2, _$Appointment40, _$Appointment40$Perso, _$Appointment40$Perso2, _$Encounter28, _$Encounter28$patient, _$Encounter28$patient2, _$Encounter28$patient3, _$Encounter28$patient4, _$Encounter29, _$Encounter30, _$Encounter30$status;
37720
37862
 
37721
37863
  return {
37722
- "img": 'https://www.fillmurray.com/640/360',
37723
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID9 = _.PersonID) === null || _$PersonID9 === void 0 ? void 0 : (_$PersonID9$ = _$PersonID9[0]) === null || _$PersonID9$ === void 0 ? void 0 : (_$PersonID9$$name = _$PersonID9$.name) === null || _$PersonID9$$name === void 0 ? void 0 : (_$PersonID9$$name$ = _$PersonID9$$name[0]) === null || _$PersonID9$$name$ === void 0 ? void 0 : _$PersonID9$$name$.given,
37724
- "mrn": 'MRN',
37725
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37726
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37727
- "speciality": (_$SpecialtyID$0$text5 = _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$5 = _.SpecialtyID[0]) === null || _$SpecialtyID$5 === void 0 ? void 0 : _$SpecialtyID$5.text) !== null && _$SpecialtyID$0$text5 !== void 0 ? _$SpecialtyID$0$text5 : "",
37728
- "clinic": 'Clinic',
37729
- "dob": _ === null || _ === void 0 ? void 0 : (_$PersonID10 = _.PersonID) === null || _$PersonID10 === void 0 ? void 0 : (_$PersonID10$ = _$PersonID10[0]) === null || _$PersonID10$ === void 0 ? void 0 : _$PersonID10$.birthDay,
37730
- "contact": 'Contact',
37731
- "visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
37732
- "appointmentStatus": 'Status',
37864
+ img: (_ === null || _ === void 0 ? void 0 : (_$Appointment33 = _.Appointment) === null || _$Appointment33 === void 0 ? void 0 : (_$Appointment33$Perso = _$Appointment33.PersonID) === null || _$Appointment33$Perso === void 0 ? void 0 : (_$Appointment33$Perso2 = _$Appointment33$Perso[0]) === null || _$Appointment33$Perso2 === void 0 ? void 0 : (_$Appointment33$Perso3 = _$Appointment33$Perso2.photo) === null || _$Appointment33$Perso3 === void 0 ? void 0 : (_$Appointment33$Perso4 = _$Appointment33$Perso3[0]) === null || _$Appointment33$Perso4 === void 0 ? void 0 : _$Appointment33$Perso4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$Appointment34 = _.Appointment) === null || _$Appointment34 === void 0 ? void 0 : (_$Appointment34$Perso = _$Appointment34.PersonID) === null || _$Appointment34$Perso === void 0 ? void 0 : (_$Appointment34$Perso2 = _$Appointment34$Perso[0]) === null || _$Appointment34$Perso2 === void 0 ? void 0 : (_$Appointment34$Perso3 = _$Appointment34$Perso2.photo) === null || _$Appointment34$Perso3 === void 0 ? void 0 : (_$Appointment34$Perso4 = _$Appointment34$Perso3[0]) === null || _$Appointment34$Perso4 === void 0 ? void 0 : _$Appointment34$Perso4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
37865
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter25 = _.Encounter) === null || _$Encounter25 === void 0 ? void 0 : (_$Encounter25$patient = _$Encounter25.patient_id) === null || _$Encounter25$patient === void 0 ? void 0 : (_$Encounter25$patient2 = _$Encounter25$patient[0]) === null || _$Encounter25$patient2 === void 0 ? void 0 : (_$Encounter25$patient3 = _$Encounter25$patient2.name) === null || _$Encounter25$patient3 === void 0 ? void 0 : _$Encounter25$patient3[0]) || {}),
37866
+ mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter26 = _.Encounter) === null || _$Encounter26 === void 0 ? void 0 : (_$Encounter26$patient = _$Encounter26.patient_id) === null || _$Encounter26$patient === void 0 ? void 0 : (_$Encounter26$patient2 = _$Encounter26$patient[0]) === null || _$Encounter26$patient2 === void 0 ? void 0 : _$Encounter26$patient2.MRN,
37867
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment35 = _.Appointment) === null || _$Appointment35 === void 0 ? void 0 : _$Appointment35.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment36 = _.Appointment) === null || _$Appointment36 === void 0 ? void 0 : _$Appointment36.start).format("DD MMM,YYYY") : "",
37868
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment37 = _.Appointment) === null || _$Appointment37 === void 0 ? void 0 : _$Appointment37.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment38 = _.Appointment) === null || _$Appointment38 === void 0 ? void 0 : _$Appointment38.start).format("hh:mm A") : "",
37869
+ speciality: _ === null || _ === void 0 ? void 0 : (_$Appointment39 = _.Appointment) === null || _$Appointment39 === void 0 ? void 0 : (_$Appointment39$Speci = _$Appointment39.SpecialtyID) === null || _$Appointment39$Speci === void 0 ? void 0 : _$Appointment39$Speci.map(function (spl) {
37870
+ var _spl$coding5, _spl$coding5$;
37871
+
37872
+ 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;
37873
+ }).join(", "),
37874
+ clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter27 = _.Encounter) === null || _$Encounter27 === void 0 ? void 0 : (_$Encounter27$practit = _$Encounter27.practitioner_details) === null || _$Encounter27$practit === void 0 ? void 0 : (_$Encounter27$practit2 = _$Encounter27$practit[0]) === null || _$Encounter27$practit2 === void 0 ? void 0 : _$Encounter27$practit2.clinic,
37875
+ dob: _ === null || _ === void 0 ? void 0 : (_$Appointment40 = _.Appointment) === null || _$Appointment40 === void 0 ? void 0 : (_$Appointment40$Perso = _$Appointment40.PersonID) === null || _$Appointment40$Perso === void 0 ? void 0 : (_$Appointment40$Perso2 = _$Appointment40$Perso[0]) === null || _$Appointment40$Perso2 === void 0 ? void 0 : _$Appointment40$Perso2.birthDay,
37876
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter28 = _.Encounter) === null || _$Encounter28 === void 0 ? void 0 : (_$Encounter28$patient = _$Encounter28.patient_id) === null || _$Encounter28$patient === void 0 ? void 0 : (_$Encounter28$patient2 = _$Encounter28$patient[0]) === null || _$Encounter28$patient2 === void 0 ? void 0 : (_$Encounter28$patient3 = _$Encounter28$patient2.telecom) === null || _$Encounter28$patient3 === void 0 ? void 0 : (_$Encounter28$patient4 = _$Encounter28$patient3[0]) === null || _$Encounter28$patient4 === void 0 ? void 0 : _$Encounter28$patient4.value),
37877
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter29 = _.Encounter) === null || _$Encounter29 === void 0 ? void 0 : _$Encounter29.visit_type,
37878
+ appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter30 = _.Encounter) === null || _$Encounter30 === void 0 ? void 0 : (_$Encounter30$status = _$Encounter30.status) === null || _$Encounter30$status === void 0 ? void 0 : _$Encounter30$status.display,
37733
37879
  "Register Visit": true,
37734
37880
  "Modify Appointment": true,
37735
37881
  "Cancel Appointment": true,
@@ -37778,20 +37924,24 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
37778
37924
  case 5:
37779
37925
  data = _context6.sent;
37780
37926
  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 (_) {
37781
- var _$PersonID11, _$PersonID11$, _$PersonID11$$name, _$PersonID11$$name$, _$SpecialtyID$0$text6, _$SpecialtyID$6, _$PersonID12, _$PersonID12$;
37927
+ var _$Appointment41, _$Appointment41$Perso, _$Appointment41$Perso2, _$Appointment41$Perso3, _$Appointment41$Perso4, _$Appointment42, _$Appointment42$Perso, _$Appointment42$Perso2, _$Appointment42$Perso3, _$Appointment42$Perso4, _$Encounter31, _$Encounter31$patient, _$Encounter31$patient2, _$Encounter31$patient3, _$Encounter32, _$Encounter32$patient, _$Encounter32$patient2, _$Appointment43, _$Appointment44, _$Appointment45, _$Appointment46, _$Appointment47, _$Appointment47$Speci, _$Encounter33, _$Encounter33$practit, _$Encounter33$practit2, _$Appointment48, _$Appointment48$Perso, _$Appointment48$Perso2, _$Encounter34, _$Encounter34$patient, _$Encounter34$patient2, _$Encounter34$patient3, _$Encounter34$patient4, _$Encounter35, _$Encounter36, _$Encounter36$status;
37782
37928
 
37783
37929
  return {
37784
- img: "https://www.fillmurray.com/640/360",
37785
- name: _ === null || _ === void 0 ? void 0 : (_$PersonID11 = _.PersonID) === null || _$PersonID11 === void 0 ? void 0 : (_$PersonID11$ = _$PersonID11[0]) === null || _$PersonID11$ === void 0 ? void 0 : (_$PersonID11$$name = _$PersonID11$.name) === null || _$PersonID11$$name === void 0 ? void 0 : (_$PersonID11$$name$ = _$PersonID11$$name[0]) === null || _$PersonID11$$name$ === void 0 ? void 0 : _$PersonID11$$name$.given,
37786
- mrn: "MRN",
37787
- date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
37788
- time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
37789
- speciality: (_$SpecialtyID$0$text6 = _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$6 = _.SpecialtyID[0]) === null || _$SpecialtyID$6 === void 0 ? void 0 : _$SpecialtyID$6.text) !== null && _$SpecialtyID$0$text6 !== void 0 ? _$SpecialtyID$0$text6 : "",
37790
- clinic: "Clinic",
37791
- dob: _ === null || _ === void 0 ? void 0 : (_$PersonID12 = _.PersonID) === null || _$PersonID12 === void 0 ? void 0 : (_$PersonID12$ = _$PersonID12[0]) === null || _$PersonID12$ === void 0 ? void 0 : _$PersonID12$.birthDay,
37792
- contact: "Contact",
37793
- visitType: _ === null || _ === void 0 ? void 0 : _.appointmentType,
37794
- appointmentStatus: "Status",
37930
+ 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",
37931
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter31 = _.Encounter) === null || _$Encounter31 === void 0 ? void 0 : (_$Encounter31$patient = _$Encounter31.patient_id) === null || _$Encounter31$patient === void 0 ? void 0 : (_$Encounter31$patient2 = _$Encounter31$patient[0]) === null || _$Encounter31$patient2 === void 0 ? void 0 : (_$Encounter31$patient3 = _$Encounter31$patient2.name) === null || _$Encounter31$patient3 === void 0 ? void 0 : _$Encounter31$patient3[0]) || {}),
37932
+ mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter32 = _.Encounter) === null || _$Encounter32 === void 0 ? void 0 : (_$Encounter32$patient = _$Encounter32.patient_id) === null || _$Encounter32$patient === void 0 ? void 0 : (_$Encounter32$patient2 = _$Encounter32$patient[0]) === null || _$Encounter32$patient2 === void 0 ? void 0 : _$Encounter32$patient2.MRN,
37933
+ date: (_ === null || _ === void 0 ? void 0 : (_$Appointment43 = _.Appointment) === null || _$Appointment43 === void 0 ? void 0 : _$Appointment43.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment44 = _.Appointment) === null || _$Appointment44 === void 0 ? void 0 : _$Appointment44.start).format("DD MMM,YYYY") : "",
37934
+ time: (_ === null || _ === void 0 ? void 0 : (_$Appointment45 = _.Appointment) === null || _$Appointment45 === void 0 ? void 0 : _$Appointment45.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$Appointment46 = _.Appointment) === null || _$Appointment46 === void 0 ? void 0 : _$Appointment46.start).format("hh:mm A") : "",
37935
+ 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) {
37936
+ var _spl$coding6, _spl$coding6$;
37937
+
37938
+ 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;
37939
+ }).join(", "),
37940
+ clinic: _ === null || _ === void 0 ? void 0 : (_$Encounter33 = _.Encounter) === null || _$Encounter33 === void 0 ? void 0 : (_$Encounter33$practit = _$Encounter33.practitioner_details) === null || _$Encounter33$practit === void 0 ? void 0 : (_$Encounter33$practit2 = _$Encounter33$practit[0]) === null || _$Encounter33$practit2 === void 0 ? void 0 : _$Encounter33$practit2.clinic,
37941
+ 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,
37942
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Encounter34 = _.Encounter) === null || _$Encounter34 === void 0 ? void 0 : (_$Encounter34$patient = _$Encounter34.patient_id) === null || _$Encounter34$patient === void 0 ? void 0 : (_$Encounter34$patient2 = _$Encounter34$patient[0]) === null || _$Encounter34$patient2 === void 0 ? void 0 : (_$Encounter34$patient3 = _$Encounter34$patient2.telecom) === null || _$Encounter34$patient3 === void 0 ? void 0 : (_$Encounter34$patient4 = _$Encounter34$patient3[0]) === null || _$Encounter34$patient4 === void 0 ? void 0 : _$Encounter34$patient4.value),
37943
+ visitType: _ === null || _ === void 0 ? void 0 : (_$Encounter35 = _.Encounter) === null || _$Encounter35 === void 0 ? void 0 : _$Encounter35.visit_type,
37944
+ appointmentStatus: _ === null || _ === void 0 ? void 0 : (_$Encounter36 = _.Encounter) === null || _$Encounter36 === void 0 ? void 0 : (_$Encounter36$status = _$Encounter36.status) === null || _$Encounter36$status === void 0 ? void 0 : _$Encounter36$status.display,
37795
37945
  "Register Visit": true,
37796
37946
  "Modify Appointment": true,
37797
37947
  "Cancel Appointment": true,
@@ -37835,27 +37985,32 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
37835
37985
  _context7.prev = 2;
37836
37986
  _context7.next = 5;
37837
37987
  return fetchData$3({
37838
- body: query$4.getAppointmentsNurse(payload)
37988
+ body: JSON.stringify(query$4.getAppointmentsNurse(payload))
37839
37989
  }, __readDocumentUrl__);
37840
37990
 
37841
37991
  case 5:
37842
37992
  data = _context7.sent;
37843
37993
  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 (_) {
37844
- var _$PersonID13, _$PersonID13$, _$PersonID13$$name, _$PersonID13$$name$, _$appointmentType;
37994
+ 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;
37845
37995
 
37846
37996
  return {
37847
- "img": 'https://www.fillmurray.com/640/360',
37848
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID13 = _.PersonID) === null || _$PersonID13 === void 0 ? void 0 : (_$PersonID13$ = _$PersonID13[0]) === null || _$PersonID13$ === void 0 ? void 0 : (_$PersonID13$$name = _$PersonID13$.name) === null || _$PersonID13$$name === void 0 ? void 0 : (_$PersonID13$$name$ = _$PersonID13$$name[0]) === null || _$PersonID13$$name$ === void 0 ? void 0 : _$PersonID13$$name$.given,
37849
- "mrn": 'MRN',
37850
- "refNo": "Ref No",
37851
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37852
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37853
- "visitType": (_$appointmentType = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType !== void 0 ? _$appointmentType : '',
37854
- "speciality": 'Speciality',
37855
- "clinic": 'Clinic',
37856
- "appointmentStatus": 'Status',
37997
+ 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",
37998
+ 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]) || {}),
37999
+ 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) || "",
38000
+ 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,
38001
+ 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) || "",
38002
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : _$appointmentId4$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId5 = _.appointmentId) === null || _$appointmentId5 === void 0 ? void 0 : (_$appointmentId5$ = _$appointmentId5[0]) === null || _$appointmentId5$ === void 0 ? void 0 : _$appointmentId5$.start).format("DD MMM,YYYY") : "",
38003
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId6 = _.appointmentId) === null || _$appointmentId6 === void 0 ? void 0 : (_$appointmentId6$ = _$appointmentId6[0]) === null || _$appointmentId6$ === void 0 ? void 0 : _$appointmentId6$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId7 = _.appointmentId) === null || _$appointmentId7 === void 0 ? void 0 : (_$appointmentId7$ = _$appointmentId7[0]) === null || _$appointmentId7$ === void 0 ? void 0 : _$appointmentId7$.start).format("hh:mm A") : "",
38004
+ visitType: (_$visit_type = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type !== void 0 ? _$visit_type : "",
38005
+ 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) {
38006
+ var _spl$coding7, _spl$coding7$;
38007
+
38008
+ 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;
38009
+ }).join(", "),
38010
+ 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) || "",
38011
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display) || "",
37857
38012
  "View Patient": true,
37858
- "Attend": true
38013
+ Attend: true
37859
38014
  };
37860
38015
  }) : [];
37861
38016
  return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -37894,27 +38049,32 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
37894
38049
  _context8.prev = 2;
37895
38050
  _context8.next = 5;
37896
38051
  return fetchData$3({
37897
- body: query$4.getFirstVisitsNurse(payload)
38052
+ body: JSON.stringify(query$4.getFirstVisitsNurse(payload))
37898
38053
  }, __readDocumentUrl__);
37899
38054
 
37900
38055
  case 5:
37901
38056
  data = _context8.sent;
37902
38057
  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 (_) {
37903
- var _$PersonID14, _$PersonID14$, _$PersonID14$$name, _$PersonID14$$name$, _$appointmentType2;
38058
+ var _$appointmentId9, _$appointmentId9$, _$appointmentId9$$Per, _$appointmentId9$$Per2, _$appointmentId9$$Per3, _$appointmentId9$$Per4, _$appointmentId10, _$appointmentId10$, _$appointmentId10$$Pe, _$appointmentId10$$Pe2, _$appointmentId10$$Pe3, _$appointmentId10$$Pe4, _$patient_id4, _$patient_id4$, _$patient_id4$$name, _$patient_id5, _$patient_id5$, _$patient_id6, _$patient_id6$, _$appointmentId11, _$appointmentId11$, _$appointmentId12, _$appointmentId12$, _$appointmentId13, _$appointmentId13$, _$appointmentId14, _$appointmentId14$, _$appointmentId15, _$appointmentId15$, _$visit_type2, _$appointmentId16, _$appointmentId16$, _$appointmentId16$$Sp, _$practitioner_detail3, _$practitioner_detail4, _$status2;
37904
38059
 
37905
38060
  return {
37906
- "img": 'https://www.fillmurray.com/640/360',
37907
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID14 = _.PersonID) === null || _$PersonID14 === void 0 ? void 0 : (_$PersonID14$ = _$PersonID14[0]) === null || _$PersonID14$ === void 0 ? void 0 : (_$PersonID14$$name = _$PersonID14$.name) === null || _$PersonID14$$name === void 0 ? void 0 : (_$PersonID14$$name$ = _$PersonID14$$name[0]) === null || _$PersonID14$$name$ === void 0 ? void 0 : _$PersonID14$$name$.given,
37908
- "mrn": 'MRN',
37909
- "refNo": "Ref No",
37910
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37911
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37912
- "visitType": (_$appointmentType2 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType2 !== void 0 ? _$appointmentType2 : '',
37913
- "speciality": 'Speciality',
37914
- "clinic": 'Clinic',
37915
- "appointmentStatus": 'Status',
38061
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : (_$appointmentId9$$Per = _$appointmentId9$.PersonID) === null || _$appointmentId9$$Per === void 0 ? void 0 : (_$appointmentId9$$Per2 = _$appointmentId9$$Per[0]) === null || _$appointmentId9$$Per2 === void 0 ? void 0 : (_$appointmentId9$$Per3 = _$appointmentId9$$Per2.photo) === null || _$appointmentId9$$Per3 === void 0 ? void 0 : (_$appointmentId9$$Per4 = _$appointmentId9$$Per3[0]) === null || _$appointmentId9$$Per4 === void 0 ? void 0 : _$appointmentId9$$Per4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : (_$appointmentId10$$Pe = _$appointmentId10$.PersonID) === null || _$appointmentId10$$Pe === void 0 ? void 0 : (_$appointmentId10$$Pe2 = _$appointmentId10$$Pe[0]) === null || _$appointmentId10$$Pe2 === void 0 ? void 0 : (_$appointmentId10$$Pe3 = _$appointmentId10$$Pe2.photo) === null || _$appointmentId10$$Pe3 === void 0 ? void 0 : (_$appointmentId10$$Pe4 = _$appointmentId10$$Pe3[0]) === null || _$appointmentId10$$Pe4 === void 0 ? void 0 : _$appointmentId10$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38062
+ 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]) || {}),
38063
+ 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) || "",
38064
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id6 = _.patient_id) === null || _$patient_id6 === void 0 ? void 0 : (_$patient_id6$ = _$patient_id6[0]) === null || _$patient_id6$ === void 0 ? void 0 : _$patient_id6$.age,
38065
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId11 = _.appointmentId) === null || _$appointmentId11 === void 0 ? void 0 : (_$appointmentId11$ = _$appointmentId11[0]) === null || _$appointmentId11$ === void 0 ? void 0 : _$appointmentId11$.appno) || "",
38066
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId12 = _.appointmentId) === null || _$appointmentId12 === void 0 ? void 0 : (_$appointmentId12$ = _$appointmentId12[0]) === null || _$appointmentId12$ === void 0 ? void 0 : _$appointmentId12$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId13 = _.appointmentId) === null || _$appointmentId13 === void 0 ? void 0 : (_$appointmentId13$ = _$appointmentId13[0]) === null || _$appointmentId13$ === void 0 ? void 0 : _$appointmentId13$.start).format("DD MMM,YYYY") : "",
38067
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId14 = _.appointmentId) === null || _$appointmentId14 === void 0 ? void 0 : (_$appointmentId14$ = _$appointmentId14[0]) === null || _$appointmentId14$ === void 0 ? void 0 : _$appointmentId14$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : _$appointmentId15$.start).format("hh:mm A") : "",
38068
+ visitType: (_$visit_type2 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type2 !== void 0 ? _$visit_type2 : "",
38069
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : (_$appointmentId16$$Sp = _$appointmentId16$.SpecialtyID) === null || _$appointmentId16$$Sp === void 0 ? void 0 : _$appointmentId16$$Sp.map(function (spl) {
38070
+ var _spl$coding8, _spl$coding8$;
38071
+
38072
+ 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;
38073
+ }).join(", "),
38074
+ 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) || "",
38075
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display) || "",
37916
38076
  "View Patient": true,
37917
- "Attend": true
38077
+ Attend: true
37918
38078
  };
37919
38079
  }) : [];
37920
38080
  return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -37953,27 +38113,32 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
37953
38113
  _context9.prev = 2;
37954
38114
  _context9.next = 5;
37955
38115
  return fetchData$3({
37956
- body: query$4.getNewPatientsNurse(payload)
38116
+ body: JSON.stringify(query$4.getNewPatientsNurse(payload))
37957
38117
  }, __readDocumentUrl__);
37958
38118
 
37959
38119
  case 5:
37960
38120
  data = _context9.sent;
37961
38121
  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 (_) {
37962
- var _$PersonID15, _$PersonID15$, _$PersonID15$$name, _$PersonID15$$name$, _$appointmentType3;
38122
+ var _$appointmentId17, _$appointmentId17$, _$appointmentId17$$Pe, _$appointmentId17$$Pe2, _$appointmentId17$$Pe3, _$appointmentId17$$Pe4, _$appointmentId18, _$appointmentId18$, _$appointmentId18$$Pe, _$appointmentId18$$Pe2, _$appointmentId18$$Pe3, _$appointmentId18$$Pe4, _$patient_id7, _$patient_id7$, _$patient_id7$$name, _$patient_id8, _$patient_id8$, _$patient_id9, _$patient_id9$, _$appointmentId19, _$appointmentId19$, _$appointmentId20, _$appointmentId20$, _$appointmentId21, _$appointmentId21$, _$appointmentId22, _$appointmentId22$, _$appointmentId23, _$appointmentId23$, _$visit_type3, _$appointmentId24, _$appointmentId24$, _$appointmentId24$$Sp, _$practitioner_detail5, _$practitioner_detail6, _$status3;
37963
38123
 
37964
38124
  return {
37965
- "img": 'https://www.fillmurray.com/640/360',
37966
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID15 = _.PersonID) === null || _$PersonID15 === void 0 ? void 0 : (_$PersonID15$ = _$PersonID15[0]) === null || _$PersonID15$ === void 0 ? void 0 : (_$PersonID15$$name = _$PersonID15$.name) === null || _$PersonID15$$name === void 0 ? void 0 : (_$PersonID15$$name$ = _$PersonID15$$name[0]) === null || _$PersonID15$$name$ === void 0 ? void 0 : _$PersonID15$$name$.given,
37967
- "mrn": 'MRN',
37968
- "refNo": "Ref No",
37969
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37970
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37971
- "visitType": (_$appointmentType3 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType3 !== void 0 ? _$appointmentType3 : '',
37972
- "speciality": 'Speciality',
37973
- "clinic": 'Clinic',
37974
- "appointmentStatus": 'Status',
38125
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : (_$appointmentId17$$Pe = _$appointmentId17$.PersonID) === null || _$appointmentId17$$Pe === void 0 ? void 0 : (_$appointmentId17$$Pe2 = _$appointmentId17$$Pe[0]) === null || _$appointmentId17$$Pe2 === void 0 ? void 0 : (_$appointmentId17$$Pe3 = _$appointmentId17$$Pe2.photo) === null || _$appointmentId17$$Pe3 === void 0 ? void 0 : (_$appointmentId17$$Pe4 = _$appointmentId17$$Pe3[0]) === null || _$appointmentId17$$Pe4 === void 0 ? void 0 : _$appointmentId17$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : (_$appointmentId18$$Pe = _$appointmentId18$.PersonID) === null || _$appointmentId18$$Pe === void 0 ? void 0 : (_$appointmentId18$$Pe2 = _$appointmentId18$$Pe[0]) === null || _$appointmentId18$$Pe2 === void 0 ? void 0 : (_$appointmentId18$$Pe3 = _$appointmentId18$$Pe2.photo) === null || _$appointmentId18$$Pe3 === void 0 ? void 0 : (_$appointmentId18$$Pe4 = _$appointmentId18$$Pe3[0]) === null || _$appointmentId18$$Pe4 === void 0 ? void 0 : _$appointmentId18$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38126
+ 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]) || {}),
38127
+ 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) || "",
38128
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id9 = _.patient_id) === null || _$patient_id9 === void 0 ? void 0 : (_$patient_id9$ = _$patient_id9[0]) === null || _$patient_id9$ === void 0 ? void 0 : _$patient_id9$.age,
38129
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId19 = _.appointmentId) === null || _$appointmentId19 === void 0 ? void 0 : (_$appointmentId19$ = _$appointmentId19[0]) === null || _$appointmentId19$ === void 0 ? void 0 : _$appointmentId19$.appno) || "",
38130
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId20 = _.appointmentId) === null || _$appointmentId20 === void 0 ? void 0 : (_$appointmentId20$ = _$appointmentId20[0]) === null || _$appointmentId20$ === void 0 ? void 0 : _$appointmentId20$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId21 = _.appointmentId) === null || _$appointmentId21 === void 0 ? void 0 : (_$appointmentId21$ = _$appointmentId21[0]) === null || _$appointmentId21$ === void 0 ? void 0 : _$appointmentId21$.start).format("DD MMM,YYYY") : "",
38131
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId22 = _.appointmentId) === null || _$appointmentId22 === void 0 ? void 0 : (_$appointmentId22$ = _$appointmentId22[0]) === null || _$appointmentId22$ === void 0 ? void 0 : _$appointmentId22$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId23 = _.appointmentId) === null || _$appointmentId23 === void 0 ? void 0 : (_$appointmentId23$ = _$appointmentId23[0]) === null || _$appointmentId23$ === void 0 ? void 0 : _$appointmentId23$.start).format("hh:mm A") : "",
38132
+ visitType: (_$visit_type3 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type3 !== void 0 ? _$visit_type3 : "",
38133
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId24 = _.appointmentId) === null || _$appointmentId24 === void 0 ? void 0 : (_$appointmentId24$ = _$appointmentId24[0]) === null || _$appointmentId24$ === void 0 ? void 0 : (_$appointmentId24$$Sp = _$appointmentId24$.SpecialtyID) === null || _$appointmentId24$$Sp === void 0 ? void 0 : _$appointmentId24$$Sp.map(function (spl) {
38134
+ var _spl$coding9, _spl$coding9$;
38135
+
38136
+ 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;
38137
+ }).join(", "),
38138
+ 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) || "",
38139
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display) || "",
37975
38140
  "View Patient": true,
37976
- "Attend": true
38141
+ Attend: true
37977
38142
  };
37978
38143
  }) : [];
37979
38144
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38012,27 +38177,32 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
38012
38177
  _context10.prev = 2;
38013
38178
  _context10.next = 5;
38014
38179
  return fetchData$3({
38015
- body: query$4.getOtherVisitsNurse(payload)
38180
+ body: JSON.stringify(query$4.getOtherVisitsNurse(payload))
38016
38181
  }, __readDocumentUrl__);
38017
38182
 
38018
38183
  case 5:
38019
38184
  data = _context10.sent;
38020
38185
  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 (_) {
38021
- var _$PersonID16, _$PersonID16$, _$PersonID16$$name, _$PersonID16$$name$, _$appointmentType4;
38186
+ var _$appointmentId25, _$appointmentId25$, _$appointmentId25$$Pe, _$appointmentId25$$Pe2, _$appointmentId25$$Pe3, _$appointmentId25$$Pe4, _$appointmentId26, _$appointmentId26$, _$appointmentId26$$Pe, _$appointmentId26$$Pe2, _$appointmentId26$$Pe3, _$appointmentId26$$Pe4, _$patient_id10, _$patient_id10$, _$patient_id10$$name, _$patient_id11, _$patient_id11$, _$patient_id12, _$patient_id12$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$appointmentId30, _$appointmentId30$, _$appointmentId31, _$appointmentId31$, _$visit_type4, _$appointmentId32, _$appointmentId32$, _$appointmentId32$$Sp, _$practitioner_detail7, _$practitioner_detail8, _$status4;
38022
38187
 
38023
38188
  return {
38024
- "img": 'https://www.fillmurray.com/640/360',
38025
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID16 = _.PersonID) === null || _$PersonID16 === void 0 ? void 0 : (_$PersonID16$ = _$PersonID16[0]) === null || _$PersonID16$ === void 0 ? void 0 : (_$PersonID16$$name = _$PersonID16$.name) === null || _$PersonID16$$name === void 0 ? void 0 : (_$PersonID16$$name$ = _$PersonID16$$name[0]) === null || _$PersonID16$$name$ === void 0 ? void 0 : _$PersonID16$$name$.given,
38026
- "mrn": 'MRN',
38027
- "refNo": "Ref No",
38028
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38029
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38030
- "visitType": (_$appointmentType4 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType4 !== void 0 ? _$appointmentType4 : '',
38031
- "speciality": 'Speciality',
38032
- "clinic": 'Clinic',
38033
- "appointmentStatus": 'Status',
38189
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId25 = _.appointmentId) === null || _$appointmentId25 === void 0 ? void 0 : (_$appointmentId25$ = _$appointmentId25[0]) === null || _$appointmentId25$ === void 0 ? void 0 : (_$appointmentId25$$Pe = _$appointmentId25$.PersonID) === null || _$appointmentId25$$Pe === void 0 ? void 0 : (_$appointmentId25$$Pe2 = _$appointmentId25$$Pe[0]) === null || _$appointmentId25$$Pe2 === void 0 ? void 0 : (_$appointmentId25$$Pe3 = _$appointmentId25$$Pe2.photo) === null || _$appointmentId25$$Pe3 === void 0 ? void 0 : (_$appointmentId25$$Pe4 = _$appointmentId25$$Pe3[0]) === null || _$appointmentId25$$Pe4 === void 0 ? void 0 : _$appointmentId25$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId26 = _.appointmentId) === null || _$appointmentId26 === void 0 ? void 0 : (_$appointmentId26$ = _$appointmentId26[0]) === null || _$appointmentId26$ === void 0 ? void 0 : (_$appointmentId26$$Pe = _$appointmentId26$.PersonID) === null || _$appointmentId26$$Pe === void 0 ? void 0 : (_$appointmentId26$$Pe2 = _$appointmentId26$$Pe[0]) === null || _$appointmentId26$$Pe2 === void 0 ? void 0 : (_$appointmentId26$$Pe3 = _$appointmentId26$$Pe2.photo) === null || _$appointmentId26$$Pe3 === void 0 ? void 0 : (_$appointmentId26$$Pe4 = _$appointmentId26$$Pe3[0]) === null || _$appointmentId26$$Pe4 === void 0 ? void 0 : _$appointmentId26$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38190
+ 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]) || {}),
38191
+ 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) || "",
38192
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id12 = _.patient_id) === null || _$patient_id12 === void 0 ? void 0 : (_$patient_id12$ = _$patient_id12[0]) === null || _$patient_id12$ === void 0 ? void 0 : _$patient_id12$.age,
38193
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId27 = _.appointmentId) === null || _$appointmentId27 === void 0 ? void 0 : (_$appointmentId27$ = _$appointmentId27[0]) === null || _$appointmentId27$ === void 0 ? void 0 : _$appointmentId27$.appno) || "",
38194
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId28 = _.appointmentId) === null || _$appointmentId28 === void 0 ? void 0 : (_$appointmentId28$ = _$appointmentId28[0]) === null || _$appointmentId28$ === void 0 ? void 0 : _$appointmentId28$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId29 = _.appointmentId) === null || _$appointmentId29 === void 0 ? void 0 : (_$appointmentId29$ = _$appointmentId29[0]) === null || _$appointmentId29$ === void 0 ? void 0 : _$appointmentId29$.start).format("DD MMM,YYYY") : "",
38195
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId30 = _.appointmentId) === null || _$appointmentId30 === void 0 ? void 0 : (_$appointmentId30$ = _$appointmentId30[0]) === null || _$appointmentId30$ === void 0 ? void 0 : _$appointmentId30$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId31 = _.appointmentId) === null || _$appointmentId31 === void 0 ? void 0 : (_$appointmentId31$ = _$appointmentId31[0]) === null || _$appointmentId31$ === void 0 ? void 0 : _$appointmentId31$.start).format("hh:mm A") : "",
38196
+ visitType: (_$visit_type4 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type4 !== void 0 ? _$visit_type4 : "",
38197
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId32 = _.appointmentId) === null || _$appointmentId32 === void 0 ? void 0 : (_$appointmentId32$ = _$appointmentId32[0]) === null || _$appointmentId32$ === void 0 ? void 0 : (_$appointmentId32$$Sp = _$appointmentId32$.SpecialtyID) === null || _$appointmentId32$$Sp === void 0 ? void 0 : _$appointmentId32$$Sp.map(function (spl) {
38198
+ var _spl$coding10, _spl$coding10$;
38199
+
38200
+ 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;
38201
+ }).join(", "),
38202
+ 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) || "",
38203
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display) || "",
38034
38204
  "View Patient": true,
38035
- "Attend": true
38205
+ Attend: true
38036
38206
  };
38037
38207
  }) : [];
38038
38208
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38071,27 +38241,31 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38071
38241
  _context11.prev = 2;
38072
38242
  _context11.next = 5;
38073
38243
  return fetchData$3({
38074
- body: query$4.getTodayVisitsNurse(payload)
38244
+ body: JSON.stringify(query$4.getTodayVisitsNurse(payload))
38075
38245
  }, __readDocumentUrl__);
38076
38246
 
38077
38247
  case 5:
38078
38248
  data = _context11.sent;
38079
38249
  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 (_) {
38080
- var _$PersonID17, _$PersonID17$, _$PersonID17$$name, _$PersonID17$$name$, _$appointmentType5;
38250
+ var _$appointmentId33, _$appointmentId33$, _$appointmentId33$$Pe, _$appointmentId33$$Pe2, _$appointmentId33$$Pe3, _$appointmentId34, _$appointmentId34$, _$appointmentId34$$Pe, _$appointmentId34$$Pe2, _$appointmentId34$$Pe3, _$patient_id13, _$patient_id13$, _$patient_id13$$name, _$patient_id14, _$patient_id14$, _$patient_id15, _$patient_id15$, _$appointmentId35, _$appointmentId35$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId38, _$appointmentId38$, _$appointmentId39, _$appointmentId39$, _$appointmentId39$$Sp, _$patient_id16, _$patient_id16$, _$patient_id16$$telec, _$patient_id16$$telec2, _$status5;
38081
38251
 
38082
38252
  return {
38083
- "img": 'https://www.fillmurray.com/640/360',
38084
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID17 = _.PersonID) === null || _$PersonID17 === void 0 ? void 0 : (_$PersonID17$ = _$PersonID17[0]) === null || _$PersonID17$ === void 0 ? void 0 : (_$PersonID17$$name = _$PersonID17$.name) === null || _$PersonID17$$name === void 0 ? void 0 : (_$PersonID17$$name$ = _$PersonID17$$name[0]) === null || _$PersonID17$$name$ === void 0 ? void 0 : _$PersonID17$$name$.given,
38085
- "mrn": 'MRN',
38086
- "refNo": "Ref No",
38087
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38088
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38089
- "visitType": (_$appointmentType5 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType5 !== void 0 ? _$appointmentType5 : '',
38090
- "speciality": 'Speciality',
38091
- "clinic": 'Clinic',
38092
- "appointmentStatus": 'Status',
38093
- "View Patient": true,
38094
- "Attend": true
38253
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId33 = _.appointmentId) === null || _$appointmentId33 === void 0 ? void 0 : (_$appointmentId33$ = _$appointmentId33[0]) === null || _$appointmentId33$ === void 0 ? void 0 : (_$appointmentId33$$Pe = _$appointmentId33$.PersonID) === null || _$appointmentId33$$Pe === void 0 ? void 0 : (_$appointmentId33$$Pe2 = _$appointmentId33$$Pe[0]) === null || _$appointmentId33$$Pe2 === void 0 ? void 0 : (_$appointmentId33$$Pe3 = _$appointmentId33$$Pe2.photo[0]) === null || _$appointmentId33$$Pe3 === void 0 ? void 0 : _$appointmentId33$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId34 = _.appointmentId) === null || _$appointmentId34 === void 0 ? void 0 : (_$appointmentId34$ = _$appointmentId34[0]) === null || _$appointmentId34$ === void 0 ? void 0 : (_$appointmentId34$$Pe = _$appointmentId34$.PersonID) === null || _$appointmentId34$$Pe === void 0 ? void 0 : (_$appointmentId34$$Pe2 = _$appointmentId34$$Pe[0]) === null || _$appointmentId34$$Pe2 === void 0 ? void 0 : (_$appointmentId34$$Pe3 = _$appointmentId34$$Pe2.photo[0]) === null || _$appointmentId34$$Pe3 === void 0 ? void 0 : _$appointmentId34$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38254
+ 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]) || {}),
38255
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id14 = _.patient_id) === null || _$patient_id14 === void 0 ? void 0 : (_$patient_id14$ = _$patient_id14[0]) === null || _$patient_id14$ === void 0 ? void 0 : _$patient_id14$.MRN,
38256
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id15 = _.patient_id) === null || _$patient_id15 === void 0 ? void 0 : (_$patient_id15$ = _$patient_id15[0]) === null || _$patient_id15$ === void 0 ? void 0 : _$patient_id15$.age,
38257
+ orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId35 = _.appointmentId) === null || _$appointmentId35 === void 0 ? void 0 : (_$appointmentId35$ = _$appointmentId35[0]) === null || _$appointmentId35$ === void 0 ? void 0 : _$appointmentId35$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : _$appointmentId36$.start).format("DD MMM,YYYY") : "",
38258
+ orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : _$appointmentId37$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : _$appointmentId38$.start).format("hh:mm A") : "",
38259
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : (_$appointmentId39$$Sp = _$appointmentId39$.SpecialtyID) === null || _$appointmentId39$$Sp === void 0 ? void 0 : _$appointmentId39$$Sp.map(function (spl) {
38260
+ var _spl$coding11, _spl$coding11$;
38261
+
38262
+ 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;
38263
+ }).join(", "),
38264
+ ward: "Ward 1",
38265
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id16 = _.patient_id) === null || _$patient_id16 === void 0 ? void 0 : (_$patient_id16$ = _$patient_id16[0]) === null || _$patient_id16$ === void 0 ? void 0 : (_$patient_id16$$telec = _$patient_id16$.telecom) === null || _$patient_id16$$telec === void 0 ? void 0 : (_$patient_id16$$telec2 = _$patient_id16$$telec[0]) === null || _$patient_id16$$telec2 === void 0 ? void 0 : _$patient_id16$$telec2.value),
38266
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
38267
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display,
38268
+ view: true
38095
38269
  };
38096
38270
  }) : [];
38097
38271
  return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38130,27 +38304,32 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
38130
38304
  _context12.prev = 2;
38131
38305
  _context12.next = 5;
38132
38306
  return fetchData$3({
38133
- body: query$4.getWalkInsNurse(payload)
38307
+ body: JSON.stringify(query$4.getWalkInsNurse(payload))
38134
38308
  }, __readDocumentUrl__);
38135
38309
 
38136
38310
  case 5:
38137
38311
  data = _context12.sent;
38138
38312
  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 (_) {
38139
- var _$PersonID18, _$PersonID18$, _$PersonID18$$name, _$PersonID18$$name$, _$appointmentType6;
38313
+ var _$appointmentId40, _$appointmentId40$, _$appointmentId40$$Pe, _$appointmentId40$$Pe2, _$appointmentId40$$Pe3, _$appointmentId40$$Pe4, _$appointmentId41, _$appointmentId41$, _$appointmentId41$$Pe, _$appointmentId41$$Pe2, _$appointmentId41$$Pe3, _$appointmentId41$$Pe4, _$patient_id17, _$patient_id17$, _$patient_id17$$name, _$patient_id18, _$patient_id18$, _$patient_id19, _$patient_id19$, _$appointmentId42, _$appointmentId42$, _$appointmentId43, _$appointmentId43$, _$appointmentId44, _$appointmentId44$, _$appointmentId45, _$appointmentId45$, _$appointmentId46, _$appointmentId46$, _$visit_type5, _$appointmentId47, _$appointmentId47$, _$appointmentId47$$Sp, _$practitioner_detail9, _$practitioner_detail10, _$status6;
38140
38314
 
38141
38315
  return {
38142
- "img": 'https://www.fillmurray.com/640/360',
38143
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID18 = _.PersonID) === null || _$PersonID18 === void 0 ? void 0 : (_$PersonID18$ = _$PersonID18[0]) === null || _$PersonID18$ === void 0 ? void 0 : (_$PersonID18$$name = _$PersonID18$.name) === null || _$PersonID18$$name === void 0 ? void 0 : (_$PersonID18$$name$ = _$PersonID18$$name[0]) === null || _$PersonID18$$name$ === void 0 ? void 0 : _$PersonID18$$name$.given,
38144
- "mrn": 'MRN',
38145
- "refNo": "Ref No",
38146
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38147
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38148
- "visitType": (_$appointmentType6 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType6 !== void 0 ? _$appointmentType6 : '',
38149
- "speciality": 'Speciality',
38150
- "clinic": 'Clinic',
38151
- "appointmentStatus": 'Status',
38316
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : (_$appointmentId40$$Pe = _$appointmentId40$.PersonID) === null || _$appointmentId40$$Pe === void 0 ? void 0 : (_$appointmentId40$$Pe2 = _$appointmentId40$$Pe[0]) === null || _$appointmentId40$$Pe2 === void 0 ? void 0 : (_$appointmentId40$$Pe3 = _$appointmentId40$$Pe2.photo) === null || _$appointmentId40$$Pe3 === void 0 ? void 0 : (_$appointmentId40$$Pe4 = _$appointmentId40$$Pe3[0]) === null || _$appointmentId40$$Pe4 === void 0 ? void 0 : _$appointmentId40$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId41 = _.appointmentId) === null || _$appointmentId41 === void 0 ? void 0 : (_$appointmentId41$ = _$appointmentId41[0]) === null || _$appointmentId41$ === void 0 ? void 0 : (_$appointmentId41$$Pe = _$appointmentId41$.PersonID) === null || _$appointmentId41$$Pe === void 0 ? void 0 : (_$appointmentId41$$Pe2 = _$appointmentId41$$Pe[0]) === null || _$appointmentId41$$Pe2 === void 0 ? void 0 : (_$appointmentId41$$Pe3 = _$appointmentId41$$Pe2.photo) === null || _$appointmentId41$$Pe3 === void 0 ? void 0 : (_$appointmentId41$$Pe4 = _$appointmentId41$$Pe3[0]) === null || _$appointmentId41$$Pe4 === void 0 ? void 0 : _$appointmentId41$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38317
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id17 = _.patient_id) === null || _$patient_id17 === void 0 ? void 0 : (_$patient_id17$ = _$patient_id17[0]) === null || _$patient_id17$ === void 0 ? void 0 : (_$patient_id17$$name = _$patient_id17$.name) === null || _$patient_id17$$name === void 0 ? void 0 : _$patient_id17$$name[0]) || {}),
38318
+ mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id18 = _.patient_id) === null || _$patient_id18 === void 0 ? void 0 : (_$patient_id18$ = _$patient_id18[0]) === null || _$patient_id18$ === void 0 ? void 0 : _$patient_id18$.alias) || "",
38319
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : _$patient_id19$.age,
38320
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : _$appointmentId42$.appno) || "",
38321
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId43 = _.appointmentId) === null || _$appointmentId43 === void 0 ? void 0 : (_$appointmentId43$ = _$appointmentId43[0]) === null || _$appointmentId43$ === void 0 ? void 0 : _$appointmentId43$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId44 = _.appointmentId) === null || _$appointmentId44 === void 0 ? void 0 : (_$appointmentId44$ = _$appointmentId44[0]) === null || _$appointmentId44$ === void 0 ? void 0 : _$appointmentId44$.start).format("DD MMM,YYYY") : "",
38322
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : _$appointmentId45$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : _$appointmentId46$.start).format("hh:mm A") : "",
38323
+ visitType: (_$visit_type5 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type5 !== void 0 ? _$visit_type5 : "",
38324
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : (_$appointmentId47$$Sp = _$appointmentId47$.SpecialtyID) === null || _$appointmentId47$$Sp === void 0 ? void 0 : _$appointmentId47$$Sp.map(function (spl) {
38325
+ var _spl$coding12, _spl$coding12$;
38326
+
38327
+ 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;
38328
+ }).join(", "),
38329
+ 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) || "",
38330
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display) || "",
38152
38331
  "View Patient": true,
38153
- "Attend": true
38332
+ Attend: true
38154
38333
  };
38155
38334
  }) : [];
38156
38335
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38190,27 +38369,31 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
38190
38369
  _context13.prev = 2;
38191
38370
  _context13.next = 5;
38192
38371
  return fetchData$3({
38193
- body: query$4.getAppointmentsDoctor(payload)
38372
+ body: JSON.stringify(query$4.getAppointmentsDoctor(payload))
38194
38373
  }, __readDocumentUrl__);
38195
38374
 
38196
38375
  case 5:
38197
38376
  data = _context13.sent;
38198
38377
  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 (_) {
38199
- var _$PersonID19, _$PersonID19$, _$PersonID19$$name, _$PersonID19$$name$, _$appointmentType7;
38378
+ var _$appointmentId48, _$appointmentId48$, _$appointmentId48$$Pe, _$appointmentId48$$Pe2, _$appointmentId48$$Pe3, _$appointmentId48$$Pe4, _$appointmentId49, _$appointmentId49$, _$appointmentId49$$Pe, _$appointmentId49$$Pe2, _$appointmentId49$$Pe3, _$appointmentId49$$Pe4, _$patient_id20, _$patient_id20$, _$patient_id20$$name, _$patient_id21, _$patient_id21$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$appointmentId54, _$appointmentId54$, _$visit_type6, _$appointmentId55, _$appointmentId55$, _$appointmentId55$$Sp, _$practitioner_detail11, _$practitioner_detail12, _$status7;
38200
38379
 
38201
38380
  return {
38202
- "img": 'https://www.fillmurray.com/640/360',
38203
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID19 = _.PersonID) === null || _$PersonID19 === void 0 ? void 0 : (_$PersonID19$ = _$PersonID19[0]) === null || _$PersonID19$ === void 0 ? void 0 : (_$PersonID19$$name = _$PersonID19$.name) === null || _$PersonID19$$name === void 0 ? void 0 : (_$PersonID19$$name$ = _$PersonID19$$name[0]) === null || _$PersonID19$$name$ === void 0 ? void 0 : _$PersonID19$$name$.given,
38204
- "mrn": 'MRN',
38205
- "refNo": "Ref No",
38206
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38207
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38208
- "visitType": (_$appointmentType7 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType7 !== void 0 ? _$appointmentType7 : '',
38209
- "speciality": 'Speciality',
38210
- "clinic": 'Clinic',
38211
- "appointmentStatus": 'Status',
38381
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : (_$appointmentId48$$Pe = _$appointmentId48$.PersonID) === null || _$appointmentId48$$Pe === void 0 ? void 0 : (_$appointmentId48$$Pe2 = _$appointmentId48$$Pe[0]) === null || _$appointmentId48$$Pe2 === void 0 ? void 0 : (_$appointmentId48$$Pe3 = _$appointmentId48$$Pe2.photo) === null || _$appointmentId48$$Pe3 === void 0 ? void 0 : (_$appointmentId48$$Pe4 = _$appointmentId48$$Pe3[0]) === null || _$appointmentId48$$Pe4 === void 0 ? void 0 : _$appointmentId48$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : (_$appointmentId49$$Pe = _$appointmentId49$.PersonID) === null || _$appointmentId49$$Pe === void 0 ? void 0 : (_$appointmentId49$$Pe2 = _$appointmentId49$$Pe[0]) === null || _$appointmentId49$$Pe2 === void 0 ? void 0 : (_$appointmentId49$$Pe3 = _$appointmentId49$$Pe2.photo) === null || _$appointmentId49$$Pe3 === void 0 ? void 0 : (_$appointmentId49$$Pe4 = _$appointmentId49$$Pe3[0]) === null || _$appointmentId49$$Pe4 === void 0 ? void 0 : _$appointmentId49$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38382
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : (_$patient_id20$ = _$patient_id20[0]) === null || _$patient_id20$ === void 0 ? void 0 : (_$patient_id20$$name = _$patient_id20$.name) === null || _$patient_id20$$name === void 0 ? void 0 : _$patient_id20$$name[0]) || {}),
38383
+ mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : _$patient_id21$.MRN) || "",
38384
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : _$appointmentId50$.appno) || "",
38385
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : _$appointmentId51$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : _$appointmentId52$.start).format("DD MMM,YYYY") : "",
38386
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId53 = _.appointmentId) === null || _$appointmentId53 === void 0 ? void 0 : (_$appointmentId53$ = _$appointmentId53[0]) === null || _$appointmentId53$ === void 0 ? void 0 : _$appointmentId53$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId54 = _.appointmentId) === null || _$appointmentId54 === void 0 ? void 0 : (_$appointmentId54$ = _$appointmentId54[0]) === null || _$appointmentId54$ === void 0 ? void 0 : _$appointmentId54$.start).format("hh:mm A") : "",
38387
+ visitType: (_$visit_type6 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type6 !== void 0 ? _$visit_type6 : "",
38388
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : (_$appointmentId55$$Sp = _$appointmentId55$.SpecialtyID) === null || _$appointmentId55$$Sp === void 0 ? void 0 : _$appointmentId55$$Sp.map(function (spl) {
38389
+ var _spl$coding13, _spl$coding13$;
38390
+
38391
+ 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;
38392
+ }).join(", "),
38393
+ 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) || "",
38394
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display) || "",
38212
38395
  "View Patient": true,
38213
- "Attend": true
38396
+ Attend: true
38214
38397
  };
38215
38398
  }) : [];
38216
38399
  return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38249,27 +38432,31 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
38249
38432
  _context14.prev = 2;
38250
38433
  _context14.next = 5;
38251
38434
  return fetchData$3({
38252
- body: query$4.getFirstVisitsDoctor(payload)
38435
+ body: JSON.stringify(query$4.getFirstVisitsDoctor(payload))
38253
38436
  }, __readDocumentUrl__);
38254
38437
 
38255
38438
  case 5:
38256
38439
  data = _context14.sent;
38257
38440
  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 (_) {
38258
- var _$PersonID20, _$PersonID20$, _$PersonID20$$name, _$PersonID20$$name$, _$appointmentType8;
38441
+ var _$appointmentId56, _$appointmentId56$, _$appointmentId56$$Pe, _$appointmentId56$$Pe2, _$appointmentId56$$Pe3, _$appointmentId56$$Pe4, _$appointmentId57, _$appointmentId57$, _$appointmentId57$$Pe, _$appointmentId57$$Pe2, _$appointmentId57$$Pe3, _$appointmentId57$$Pe4, _$patient_id22, _$patient_id22$, _$patient_id22$$name, _$patient_id23, _$patient_id23$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$appointmentId60, _$appointmentId60$, _$appointmentId61, _$appointmentId61$, _$appointmentId62, _$appointmentId62$, _$visit_type7, _$appointmentId63, _$appointmentId63$, _$appointmentId63$$Sp, _$practitioner_detail13, _$practitioner_detail14, _$status8;
38259
38442
 
38260
38443
  return {
38261
- "img": 'https://www.fillmurray.com/640/360',
38262
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID20 = _.PersonID) === null || _$PersonID20 === void 0 ? void 0 : (_$PersonID20$ = _$PersonID20[0]) === null || _$PersonID20$ === void 0 ? void 0 : (_$PersonID20$$name = _$PersonID20$.name) === null || _$PersonID20$$name === void 0 ? void 0 : (_$PersonID20$$name$ = _$PersonID20$$name[0]) === null || _$PersonID20$$name$ === void 0 ? void 0 : _$PersonID20$$name$.given,
38263
- "mrn": 'MRN',
38264
- "refNo": "Ref No",
38265
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38266
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38267
- "visitType": (_$appointmentType8 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType8 !== void 0 ? _$appointmentType8 : '',
38268
- "speciality": 'Speciality',
38269
- "clinic": 'Clinic',
38270
- "appointmentStatus": 'Status',
38444
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : (_$appointmentId56$$Pe = _$appointmentId56$.PersonID) === null || _$appointmentId56$$Pe === void 0 ? void 0 : (_$appointmentId56$$Pe2 = _$appointmentId56$$Pe[0]) === null || _$appointmentId56$$Pe2 === void 0 ? void 0 : (_$appointmentId56$$Pe3 = _$appointmentId56$$Pe2.photo) === null || _$appointmentId56$$Pe3 === void 0 ? void 0 : (_$appointmentId56$$Pe4 = _$appointmentId56$$Pe3[0]) === null || _$appointmentId56$$Pe4 === void 0 ? void 0 : _$appointmentId56$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : (_$appointmentId57$$Pe = _$appointmentId57$.PersonID) === null || _$appointmentId57$$Pe === void 0 ? void 0 : (_$appointmentId57$$Pe2 = _$appointmentId57$$Pe[0]) === null || _$appointmentId57$$Pe2 === void 0 ? void 0 : (_$appointmentId57$$Pe3 = _$appointmentId57$$Pe2.photo) === null || _$appointmentId57$$Pe3 === void 0 ? void 0 : (_$appointmentId57$$Pe4 = _$appointmentId57$$Pe3[0]) === null || _$appointmentId57$$Pe4 === void 0 ? void 0 : _$appointmentId57$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38445
+ 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]) || {}),
38446
+ 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) || "",
38447
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId58 = _.appointmentId) === null || _$appointmentId58 === void 0 ? void 0 : (_$appointmentId58$ = _$appointmentId58[0]) === null || _$appointmentId58$ === void 0 ? void 0 : _$appointmentId58$.appno) || "",
38448
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId59 = _.appointmentId) === null || _$appointmentId59 === void 0 ? void 0 : (_$appointmentId59$ = _$appointmentId59[0]) === null || _$appointmentId59$ === void 0 ? void 0 : _$appointmentId59$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : _$appointmentId60$.start).format("DD MMM,YYYY") : "",
38449
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : _$appointmentId61$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId62 = _.appointmentId) === null || _$appointmentId62 === void 0 ? void 0 : (_$appointmentId62$ = _$appointmentId62[0]) === null || _$appointmentId62$ === void 0 ? void 0 : _$appointmentId62$.start).format("hh:mm A") : "",
38450
+ visitType: (_$visit_type7 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type7 !== void 0 ? _$visit_type7 : "",
38451
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId63 = _.appointmentId) === null || _$appointmentId63 === void 0 ? void 0 : (_$appointmentId63$ = _$appointmentId63[0]) === null || _$appointmentId63$ === void 0 ? void 0 : (_$appointmentId63$$Sp = _$appointmentId63$.SpecialtyID) === null || _$appointmentId63$$Sp === void 0 ? void 0 : _$appointmentId63$$Sp.map(function (spl) {
38452
+ var _spl$coding14, _spl$coding14$;
38453
+
38454
+ 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;
38455
+ }).join(", "),
38456
+ 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) || "",
38457
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display) || "",
38271
38458
  "View Patient": true,
38272
- "Attend": true
38459
+ Attend: true
38273
38460
  };
38274
38461
  }) : [];
38275
38462
  return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38308,27 +38495,31 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
38308
38495
  _context15.prev = 2;
38309
38496
  _context15.next = 5;
38310
38497
  return fetchData$3({
38311
- body: query$4.getNewPatientsDoctor(payload)
38498
+ body: JSON.stringify(query$4.getNewPatientsDoctor(payload))
38312
38499
  }, __readDocumentUrl__);
38313
38500
 
38314
38501
  case 5:
38315
38502
  data = _context15.sent;
38316
38503
  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 (_) {
38317
- var _$PersonID21, _$PersonID21$, _$PersonID21$$name, _$PersonID21$$name$, _$appointmentType9;
38504
+ var _$appointmentId64, _$appointmentId64$, _$appointmentId64$$Pe, _$appointmentId64$$Pe2, _$appointmentId64$$Pe3, _$appointmentId64$$Pe4, _$appointmentId65, _$appointmentId65$, _$appointmentId65$$Pe, _$appointmentId65$$Pe2, _$appointmentId65$$Pe3, _$appointmentId65$$Pe4, _$patient_id24, _$patient_id24$, _$patient_id24$$name, _$patient_id25, _$patient_id25$, _$appointmentId66, _$appointmentId66$, _$appointmentId67, _$appointmentId67$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$appointmentId70, _$appointmentId70$, _$visit_type8, _$appointmentId71, _$appointmentId71$, _$appointmentId71$$Sp, _$practitioner_detail15, _$practitioner_detail16, _$status9;
38318
38505
 
38319
38506
  return {
38320
- "img": 'https://www.fillmurray.com/640/360',
38321
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID21 = _.PersonID) === null || _$PersonID21 === void 0 ? void 0 : (_$PersonID21$ = _$PersonID21[0]) === null || _$PersonID21$ === void 0 ? void 0 : (_$PersonID21$$name = _$PersonID21$.name) === null || _$PersonID21$$name === void 0 ? void 0 : (_$PersonID21$$name$ = _$PersonID21$$name[0]) === null || _$PersonID21$$name$ === void 0 ? void 0 : _$PersonID21$$name$.given,
38322
- "mrn": 'MRN',
38323
- "refNo": "Ref No",
38324
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38325
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38326
- "visitType": (_$appointmentType9 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType9 !== void 0 ? _$appointmentType9 : '',
38327
- "speciality": 'Speciality',
38328
- "clinic": 'Clinic',
38329
- "appointmentStatus": 'Status',
38507
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId64 = _.appointmentId) === null || _$appointmentId64 === void 0 ? void 0 : (_$appointmentId64$ = _$appointmentId64[0]) === null || _$appointmentId64$ === void 0 ? void 0 : (_$appointmentId64$$Pe = _$appointmentId64$.PersonID) === null || _$appointmentId64$$Pe === void 0 ? void 0 : (_$appointmentId64$$Pe2 = _$appointmentId64$$Pe[0]) === null || _$appointmentId64$$Pe2 === void 0 ? void 0 : (_$appointmentId64$$Pe3 = _$appointmentId64$$Pe2.photo) === null || _$appointmentId64$$Pe3 === void 0 ? void 0 : (_$appointmentId64$$Pe4 = _$appointmentId64$$Pe3[0]) === null || _$appointmentId64$$Pe4 === void 0 ? void 0 : _$appointmentId64$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : (_$appointmentId65$$Pe = _$appointmentId65$.PersonID) === null || _$appointmentId65$$Pe === void 0 ? void 0 : (_$appointmentId65$$Pe2 = _$appointmentId65$$Pe[0]) === null || _$appointmentId65$$Pe2 === void 0 ? void 0 : (_$appointmentId65$$Pe3 = _$appointmentId65$$Pe2.photo) === null || _$appointmentId65$$Pe3 === void 0 ? void 0 : (_$appointmentId65$$Pe4 = _$appointmentId65$$Pe3[0]) === null || _$appointmentId65$$Pe4 === void 0 ? void 0 : _$appointmentId65$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38508
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id24 = _.patient_id) === null || _$patient_id24 === void 0 ? void 0 : (_$patient_id24$ = _$patient_id24[0]) === null || _$patient_id24$ === void 0 ? void 0 : (_$patient_id24$$name = _$patient_id24$.name) === null || _$patient_id24$$name === void 0 ? void 0 : _$patient_id24$$name[0]) || {}),
38509
+ mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id25 = _.patient_id) === null || _$patient_id25 === void 0 ? void 0 : (_$patient_id25$ = _$patient_id25[0]) === null || _$patient_id25$ === void 0 ? void 0 : _$patient_id25$.MRN) || "",
38510
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId66 = _.appointmentId) === null || _$appointmentId66 === void 0 ? void 0 : (_$appointmentId66$ = _$appointmentId66[0]) === null || _$appointmentId66$ === void 0 ? void 0 : _$appointmentId66$.appno) || "",
38511
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId67 = _.appointmentId) === null || _$appointmentId67 === void 0 ? void 0 : (_$appointmentId67$ = _$appointmentId67[0]) === null || _$appointmentId67$ === void 0 ? void 0 : _$appointmentId67$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId68 = _.appointmentId) === null || _$appointmentId68 === void 0 ? void 0 : (_$appointmentId68$ = _$appointmentId68[0]) === null || _$appointmentId68$ === void 0 ? void 0 : _$appointmentId68$.start).format("DD MMM,YYYY") : "",
38512
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId69 = _.appointmentId) === null || _$appointmentId69 === void 0 ? void 0 : (_$appointmentId69$ = _$appointmentId69[0]) === null || _$appointmentId69$ === void 0 ? void 0 : _$appointmentId69$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId70 = _.appointmentId) === null || _$appointmentId70 === void 0 ? void 0 : (_$appointmentId70$ = _$appointmentId70[0]) === null || _$appointmentId70$ === void 0 ? void 0 : _$appointmentId70$.start).format("hh:mm A") : "",
38513
+ visitType: (_$visit_type8 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type8 !== void 0 ? _$visit_type8 : "",
38514
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId71 = _.appointmentId) === null || _$appointmentId71 === void 0 ? void 0 : (_$appointmentId71$ = _$appointmentId71[0]) === null || _$appointmentId71$ === void 0 ? void 0 : (_$appointmentId71$$Sp = _$appointmentId71$.SpecialtyID) === null || _$appointmentId71$$Sp === void 0 ? void 0 : _$appointmentId71$$Sp.map(function (spl) {
38515
+ var _spl$coding15, _spl$coding15$;
38516
+
38517
+ 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;
38518
+ }).join(", "),
38519
+ 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) || "",
38520
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display) || "",
38330
38521
  "View Patient": true,
38331
- "Attend": true
38522
+ Attend: true
38332
38523
  };
38333
38524
  }) : [];
38334
38525
  return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38367,27 +38558,31 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
38367
38558
  _context16.prev = 2;
38368
38559
  _context16.next = 5;
38369
38560
  return fetchData$3({
38370
- body: query$4.getOtherVisitsDoctor(payload)
38561
+ body: JSON.stringify(query$4.getOtherVisitsDoctor(payload))
38371
38562
  }, __readDocumentUrl__);
38372
38563
 
38373
38564
  case 5:
38374
38565
  data = _context16.sent;
38375
38566
  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 (_) {
38376
- var _$PersonID22, _$PersonID22$, _$PersonID22$$name, _$PersonID22$$name$, _$appointmentType10;
38567
+ var _$appointmentId72, _$appointmentId72$, _$appointmentId72$$Pe, _$appointmentId72$$Pe2, _$appointmentId72$$Pe3, _$appointmentId72$$Pe4, _$appointmentId73, _$appointmentId73$, _$appointmentId73$$Pe, _$appointmentId73$$Pe2, _$appointmentId73$$Pe3, _$appointmentId73$$Pe4, _$patient_id26, _$patient_id26$, _$patient_id26$$name, _$patient_id27, _$patient_id27$, _$appointmentId74, _$appointmentId74$, _$appointmentId75, _$appointmentId75$, _$appointmentId76, _$appointmentId76$, _$appointmentId77, _$appointmentId77$, _$appointmentId78, _$appointmentId78$, _$visit_type9, _$appointmentId79, _$appointmentId79$, _$appointmentId79$$Sp, _$practitioner_detail17, _$practitioner_detail18, _$status10;
38377
38568
 
38378
38569
  return {
38379
- "img": 'https://www.fillmurray.com/640/360',
38380
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID22 = _.PersonID) === null || _$PersonID22 === void 0 ? void 0 : (_$PersonID22$ = _$PersonID22[0]) === null || _$PersonID22$ === void 0 ? void 0 : (_$PersonID22$$name = _$PersonID22$.name) === null || _$PersonID22$$name === void 0 ? void 0 : (_$PersonID22$$name$ = _$PersonID22$$name[0]) === null || _$PersonID22$$name$ === void 0 ? void 0 : _$PersonID22$$name$.given,
38381
- "mrn": 'MRN',
38382
- "refNo": "Ref No",
38383
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38384
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38385
- "visitType": (_$appointmentType10 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType10 !== void 0 ? _$appointmentType10 : '',
38386
- "speciality": 'Speciality',
38387
- "clinic": 'Clinic',
38388
- "appointmentStatus": 'Status',
38570
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId72 = _.appointmentId) === null || _$appointmentId72 === void 0 ? void 0 : (_$appointmentId72$ = _$appointmentId72[0]) === null || _$appointmentId72$ === void 0 ? void 0 : (_$appointmentId72$$Pe = _$appointmentId72$.PersonID) === null || _$appointmentId72$$Pe === void 0 ? void 0 : (_$appointmentId72$$Pe2 = _$appointmentId72$$Pe[0]) === null || _$appointmentId72$$Pe2 === void 0 ? void 0 : (_$appointmentId72$$Pe3 = _$appointmentId72$$Pe2.photo) === null || _$appointmentId72$$Pe3 === void 0 ? void 0 : (_$appointmentId72$$Pe4 = _$appointmentId72$$Pe3[0]) === null || _$appointmentId72$$Pe4 === void 0 ? void 0 : _$appointmentId72$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId73 = _.appointmentId) === null || _$appointmentId73 === void 0 ? void 0 : (_$appointmentId73$ = _$appointmentId73[0]) === null || _$appointmentId73$ === void 0 ? void 0 : (_$appointmentId73$$Pe = _$appointmentId73$.PersonID) === null || _$appointmentId73$$Pe === void 0 ? void 0 : (_$appointmentId73$$Pe2 = _$appointmentId73$$Pe[0]) === null || _$appointmentId73$$Pe2 === void 0 ? void 0 : (_$appointmentId73$$Pe3 = _$appointmentId73$$Pe2.photo) === null || _$appointmentId73$$Pe3 === void 0 ? void 0 : (_$appointmentId73$$Pe4 = _$appointmentId73$$Pe3[0]) === null || _$appointmentId73$$Pe4 === void 0 ? void 0 : _$appointmentId73$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38571
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id26 = _.patient_id) === null || _$patient_id26 === void 0 ? void 0 : (_$patient_id26$ = _$patient_id26[0]) === null || _$patient_id26$ === void 0 ? void 0 : (_$patient_id26$$name = _$patient_id26$.name) === null || _$patient_id26$$name === void 0 ? void 0 : _$patient_id26$$name[0]) || {}),
38572
+ mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : _$patient_id27$.MRN) || "",
38573
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId74 = _.appointmentId) === null || _$appointmentId74 === void 0 ? void 0 : (_$appointmentId74$ = _$appointmentId74[0]) === null || _$appointmentId74$ === void 0 ? void 0 : _$appointmentId74$.appno) || "",
38574
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId75 = _.appointmentId) === null || _$appointmentId75 === void 0 ? void 0 : (_$appointmentId75$ = _$appointmentId75[0]) === null || _$appointmentId75$ === void 0 ? void 0 : _$appointmentId75$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId76 = _.appointmentId) === null || _$appointmentId76 === void 0 ? void 0 : (_$appointmentId76$ = _$appointmentId76[0]) === null || _$appointmentId76$ === void 0 ? void 0 : _$appointmentId76$.start).format("DD MMM,YYYY") : "",
38575
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId77 = _.appointmentId) === null || _$appointmentId77 === void 0 ? void 0 : (_$appointmentId77$ = _$appointmentId77[0]) === null || _$appointmentId77$ === void 0 ? void 0 : _$appointmentId77$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId78 = _.appointmentId) === null || _$appointmentId78 === void 0 ? void 0 : (_$appointmentId78$ = _$appointmentId78[0]) === null || _$appointmentId78$ === void 0 ? void 0 : _$appointmentId78$.start).format("hh:mm A") : "",
38576
+ visitType: (_$visit_type9 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type9 !== void 0 ? _$visit_type9 : "",
38577
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId79 = _.appointmentId) === null || _$appointmentId79 === void 0 ? void 0 : (_$appointmentId79$ = _$appointmentId79[0]) === null || _$appointmentId79$ === void 0 ? void 0 : (_$appointmentId79$$Sp = _$appointmentId79$.SpecialtyID) === null || _$appointmentId79$$Sp === void 0 ? void 0 : _$appointmentId79$$Sp.map(function (spl) {
38578
+ var _spl$coding16, _spl$coding16$;
38579
+
38580
+ 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;
38581
+ }).join(", "),
38582
+ 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) || "",
38583
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status10 = _.status) === null || _$status10 === void 0 ? void 0 : _$status10.display) || "",
38389
38584
  "View Patient": true,
38390
- "Attend": true
38585
+ Attend: true
38391
38586
  };
38392
38587
  }) : [];
38393
38588
  return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38426,27 +38621,31 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
38426
38621
  _context17.prev = 2;
38427
38622
  _context17.next = 5;
38428
38623
  return fetchData$3({
38429
- body: query$4.getTodayVisitsDoctor(payload)
38624
+ body: JSON.stringify(query$4.getTodayVisitsDoctor(payload))
38430
38625
  }, __readDocumentUrl__);
38431
38626
 
38432
38627
  case 5:
38433
38628
  data = _context17.sent;
38434
38629
  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 (_) {
38435
- var _$PersonID23, _$PersonID23$, _$PersonID23$$name, _$PersonID23$$name$, _$appointmentType11;
38630
+ var _$appointmentId80, _$appointmentId80$, _$appointmentId80$$Pe, _$appointmentId80$$Pe2, _$appointmentId80$$Pe3, _$appointmentId80$$Pe4, _$appointmentId81, _$appointmentId81$, _$appointmentId81$$Pe, _$appointmentId81$$Pe2, _$appointmentId81$$Pe3, _$appointmentId81$$Pe4, _$patient_id28, _$patient_id28$, _$patient_id28$$name, _$patient_id29, _$patient_id29$, _$appointmentId82, _$appointmentId82$, _$appointmentId83, _$appointmentId83$, _$appointmentId84, _$appointmentId84$, _$appointmentId85, _$appointmentId85$, _$appointmentId86, _$appointmentId86$, _$visit_type10, _$appointmentId87, _$appointmentId87$, _$appointmentId87$$Sp, _$practitioner_detail19, _$practitioner_detail20, _$status11;
38436
38631
 
38437
38632
  return {
38438
- "img": 'https://www.fillmurray.com/640/360',
38439
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID23 = _.PersonID) === null || _$PersonID23 === void 0 ? void 0 : (_$PersonID23$ = _$PersonID23[0]) === null || _$PersonID23$ === void 0 ? void 0 : (_$PersonID23$$name = _$PersonID23$.name) === null || _$PersonID23$$name === void 0 ? void 0 : (_$PersonID23$$name$ = _$PersonID23$$name[0]) === null || _$PersonID23$$name$ === void 0 ? void 0 : _$PersonID23$$name$.given,
38440
- "mrn": 'MRN',
38441
- "refNo": "Ref No",
38442
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38443
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38444
- "visitType": (_$appointmentType11 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType11 !== void 0 ? _$appointmentType11 : '',
38445
- "speciality": 'Speciality',
38446
- "clinic": 'Clinic',
38447
- "appointmentStatus": 'Status',
38633
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId80 = _.appointmentId) === null || _$appointmentId80 === void 0 ? void 0 : (_$appointmentId80$ = _$appointmentId80[0]) === null || _$appointmentId80$ === void 0 ? void 0 : (_$appointmentId80$$Pe = _$appointmentId80$.PersonID) === null || _$appointmentId80$$Pe === void 0 ? void 0 : (_$appointmentId80$$Pe2 = _$appointmentId80$$Pe[0]) === null || _$appointmentId80$$Pe2 === void 0 ? void 0 : (_$appointmentId80$$Pe3 = _$appointmentId80$$Pe2.photo) === null || _$appointmentId80$$Pe3 === void 0 ? void 0 : (_$appointmentId80$$Pe4 = _$appointmentId80$$Pe3[0]) === null || _$appointmentId80$$Pe4 === void 0 ? void 0 : _$appointmentId80$$Pe4.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId81 = _.appointmentId) === null || _$appointmentId81 === void 0 ? void 0 : (_$appointmentId81$ = _$appointmentId81[0]) === null || _$appointmentId81$ === void 0 ? void 0 : (_$appointmentId81$$Pe = _$appointmentId81$.PersonID) === null || _$appointmentId81$$Pe === void 0 ? void 0 : (_$appointmentId81$$Pe2 = _$appointmentId81$$Pe[0]) === null || _$appointmentId81$$Pe2 === void 0 ? void 0 : (_$appointmentId81$$Pe3 = _$appointmentId81$$Pe2.photo) === null || _$appointmentId81$$Pe3 === void 0 ? void 0 : (_$appointmentId81$$Pe4 = _$appointmentId81$$Pe3[0]) === null || _$appointmentId81$$Pe4 === void 0 ? void 0 : _$appointmentId81$$Pe4.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
38634
+ 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]) || {}),
38635
+ 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) || "",
38636
+ refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId82 = _.appointmentId) === null || _$appointmentId82 === void 0 ? void 0 : (_$appointmentId82$ = _$appointmentId82[0]) === null || _$appointmentId82$ === void 0 ? void 0 : _$appointmentId82$.appno) || "",
38637
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId83 = _.appointmentId) === null || _$appointmentId83 === void 0 ? void 0 : (_$appointmentId83$ = _$appointmentId83[0]) === null || _$appointmentId83$ === void 0 ? void 0 : _$appointmentId83$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId84 = _.appointmentId) === null || _$appointmentId84 === void 0 ? void 0 : (_$appointmentId84$ = _$appointmentId84[0]) === null || _$appointmentId84$ === void 0 ? void 0 : _$appointmentId84$.start).format("DD MMM,YYYY") : "",
38638
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId85 = _.appointmentId) === null || _$appointmentId85 === void 0 ? void 0 : (_$appointmentId85$ = _$appointmentId85[0]) === null || _$appointmentId85$ === void 0 ? void 0 : _$appointmentId85$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId86 = _.appointmentId) === null || _$appointmentId86 === void 0 ? void 0 : (_$appointmentId86$ = _$appointmentId86[0]) === null || _$appointmentId86$ === void 0 ? void 0 : _$appointmentId86$.start).format("hh:mm A") : "",
38639
+ visitType: (_$visit_type10 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type10 !== void 0 ? _$visit_type10 : "",
38640
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId87 = _.appointmentId) === null || _$appointmentId87 === void 0 ? void 0 : (_$appointmentId87$ = _$appointmentId87[0]) === null || _$appointmentId87$ === void 0 ? void 0 : (_$appointmentId87$$Sp = _$appointmentId87$.SpecialtyID) === null || _$appointmentId87$$Sp === void 0 ? void 0 : _$appointmentId87$$Sp.map(function (spl) {
38641
+ var _spl$coding17, _spl$coding17$;
38642
+
38643
+ 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;
38644
+ }).join(", "),
38645
+ 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) || "",
38646
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status11 = _.status) === null || _$status11 === void 0 ? void 0 : _$status11.display) || "",
38448
38647
  "View Patient": true,
38449
- "Attend": true
38648
+ Attend: true
38450
38649
  };
38451
38650
  }) : [];
38452
38651
  return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38485,27 +38684,31 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
38485
38684
  _context18.prev = 2;
38486
38685
  _context18.next = 5;
38487
38686
  return fetchData$3({
38488
- body: query$4.getWalkInsDoctor(payload)
38687
+ body: JSON.stringify(query$4.getWalkInsDoctor(payload))
38489
38688
  }, __readDocumentUrl__);
38490
38689
 
38491
38690
  case 5:
38492
38691
  data = _context18.sent;
38493
38692
  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 (_) {
38494
- var _$PersonID24, _$PersonID24$, _$PersonID24$$name, _$PersonID24$$name$, _$appointmentType12;
38693
+ var _$appointmentId88, _$appointmentId88$, _$appointmentId88$$Pe, _$appointmentId88$$Pe2, _$appointmentId88$$Pe3, _$appointmentId88$$Pe4, _$appointmentId89, _$appointmentId89$, _$appointmentId89$$Pe, _$appointmentId89$$Pe2, _$appointmentId89$$Pe3, _$appointmentId89$$Pe4, _$patient_id30, _$patient_id30$, _$patient_id30$$name, _$patient_id31, _$patient_id31$, _$appointmentId90, _$appointmentId90$, _$appointmentId91, _$appointmentId91$, _$appointmentId92, _$appointmentId92$, _$appointmentId93, _$appointmentId93$, _$appointmentId94, _$appointmentId94$, _$visit_type11, _$appointmentId95, _$appointmentId95$, _$appointmentId95$$Sp, _$practitioner_detail21, _$practitioner_detail22, _$status12;
38495
38694
 
38496
38695
  return {
38497
- "img": 'https://www.fillmurray.com/640/360',
38498
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID24 = _.PersonID) === null || _$PersonID24 === void 0 ? void 0 : (_$PersonID24$ = _$PersonID24[0]) === null || _$PersonID24$ === void 0 ? void 0 : (_$PersonID24$$name = _$PersonID24$.name) === null || _$PersonID24$$name === void 0 ? void 0 : (_$PersonID24$$name$ = _$PersonID24$$name[0]) === null || _$PersonID24$$name$ === void 0 ? void 0 : _$PersonID24$$name$.given,
38499
- "mrn": 'MRN',
38500
- "refNo": "Ref No",
38501
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38502
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38503
- "visitType": (_$appointmentType12 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType12 !== void 0 ? _$appointmentType12 : '',
38504
- "speciality": 'Speciality',
38505
- "clinic": 'Clinic',
38506
- "appointmentStatus": 'Status',
38696
+ 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",
38697
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id30 = _.patient_id) === null || _$patient_id30 === void 0 ? void 0 : (_$patient_id30$ = _$patient_id30[0]) === null || _$patient_id30$ === void 0 ? void 0 : (_$patient_id30$$name = _$patient_id30$.name) === null || _$patient_id30$$name === void 0 ? void 0 : _$patient_id30$$name[0]) || {}),
38698
+ mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id31 = _.patient_id) === null || _$patient_id31 === void 0 ? void 0 : (_$patient_id31$ = _$patient_id31[0]) === null || _$patient_id31$ === void 0 ? void 0 : _$patient_id31$.MRN) || "",
38699
+ 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) || "",
38700
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId91 = _.appointmentId) === null || _$appointmentId91 === void 0 ? void 0 : (_$appointmentId91$ = _$appointmentId91[0]) === null || _$appointmentId91$ === void 0 ? void 0 : _$appointmentId91$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId92 = _.appointmentId) === null || _$appointmentId92 === void 0 ? void 0 : (_$appointmentId92$ = _$appointmentId92[0]) === null || _$appointmentId92$ === void 0 ? void 0 : _$appointmentId92$.start).format("DD MMM,YYYY") : "",
38701
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId93 = _.appointmentId) === null || _$appointmentId93 === void 0 ? void 0 : (_$appointmentId93$ = _$appointmentId93[0]) === null || _$appointmentId93$ === void 0 ? void 0 : _$appointmentId93$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId94 = _.appointmentId) === null || _$appointmentId94 === void 0 ? void 0 : (_$appointmentId94$ = _$appointmentId94[0]) === null || _$appointmentId94$ === void 0 ? void 0 : _$appointmentId94$.start).format("hh:mm A") : "",
38702
+ visitType: (_$visit_type11 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type11 !== void 0 ? _$visit_type11 : "",
38703
+ 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) {
38704
+ var _spl$coding18, _spl$coding18$;
38705
+
38706
+ 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;
38707
+ }).join(", "),
38708
+ 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) || "",
38709
+ appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status12 = _.status) === null || _$status12 === void 0 ? void 0 : _$status12.display) || "",
38507
38710
  "View Patient": true,
38508
- "Attend": true
38711
+ Attend: true
38509
38712
  };
38510
38713
  }) : [];
38511
38714
  return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39006,12 +39209,11 @@ var ALERT_INTERACTIONS_UPERT = createAsyncThunk("alertIntractionsSlice/alertInte
39006
39209
  case 11:
39007
39210
  _context2.prev = 11;
39008
39211
  _context2.t0 = _context2["catch"](2);
39009
- debugger;
39010
39212
  return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
39011
39213
  message: _context2.t0.message
39012
39214
  })));
39013
39215
 
39014
- case 15:
39216
+ case 14:
39015
39217
  case "end":
39016
39218
  return _context2.stop();
39017
39219
  }
@@ -39774,42 +39976,100 @@ var consultActions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2
39774
39976
  var query$2 = {
39775
39977
  //FRONTDESK
39776
39978
  getPatientsCheckedIn: function getPatientsCheckedIn(data) {
39777
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='checked-in'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
39979
+ return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})\"\n }");
39778
39980
  },
39779
39981
  getTriageDone: function getTriageDone(data) {
39780
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='triaged'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
39982
+ return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged' \",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})\"\n }");
39781
39983
  },
39782
39984
  getVisitCompleted: function getVisitCompleted(data) {
39783
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='finished'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
39985
+ return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.activestatus == true && Encounter.Organization_id == ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010'\",\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})\"\n }");
39784
39986
  },
39785
39987
  getPatientsNoShows: function getPatientsNoShows(data) {
39786
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.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.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30\",\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))}))})\"\n }");
39988
+ return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.orgid== ").concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && Appointment.start<=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end>=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30\",\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))}))})\"\n }");
39787
39989
  },
39788
39990
  //NURSE
39789
39991
  getPatientsCheckedInNurse: function getPatientsCheckedInNurse(data) {
39790
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && lower(document(Practitioner.practitioner_type).display)=='nurse' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='checked-in'\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
39992
+ return {
39993
+ db_name: dbName,
39994
+ entity: "Practitioner,Encounter",
39995
+ filter: {
39996
+ Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
39997
+ Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'")
39998
+ },
39999
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
40000
+ };
39791
40001
  },
39792
40002
  getVisitCompletedNurse: function getVisitCompletedNurse(data) {
39793
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && lower(document(Practitioner.practitioner_type).display)=='nurse' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='finished'\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
40003
+ return {
40004
+ db_name: dbName,
40005
+ entity: "Practitioner,Encounter",
40006
+ filter: {
40007
+ Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
40008
+ Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010'")
40009
+ },
40010
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
40011
+ };
39794
40012
  },
39795
40013
  getPatientsNoShowsNurse: function getPatientsNoShowsNurse(data) {
39796
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.start<=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end>=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30\",\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))}))})\"\n }");
40014
+ return {
40015
+ "db_name": dbName,
40016
+ "entity": "Appointment",
40017
+ "filter": "Appointment.activestatus==true && Appointment.start<=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end>=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30"),
40018
+ "return_fields": "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))}))})"
40019
+ };
39797
40020
  },
39798
40021
  getTriageDoneNurse: function getTriageDoneNurse(data) {
39799
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && lower(document(Practitioner.practitioner_type).display)=='nurse' && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='triaged'\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
40022
+ return {
40023
+ db_name: dbName,
40024
+ entity: "Practitioner,Encounter",
40025
+ filter: {
40026
+ Practitioner: "DOCUMENT(DOCUMENT(DOCUMENT(Practitioner.practitioner_role[*])[*].role)[0].coding)[*].code ANY =='PR023' && Practitioner.id==".concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
40027
+ Encounter: "Encounter.activestatus == true && Encounter.Organization_id == ".concat(data === null || data === void 0 ? void 0 : data.orgIdInt, " && DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY=='Triaged'")
40028
+ },
40029
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(for Appointment in Appointment filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
40030
+ };
39800
40031
  },
39801
40032
  //DOCTOR
39802
40033
  getPatientsNoShowsDoctor: function getPatientsNoShowsDoctor(data) {
39803
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Appointment\",\n \"filter\": \"Appointment.activestatus==true && Appointment.start<=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end>=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30\",\n \"return_fields\": \"merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))}))})\"\n }");
40034
+ return {
40035
+ "db_name": dbName,
40036
+ "entity": "Appointment",
40037
+ "filter": "Appointment.activestatus==true && Appointment.start<=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end>=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(Appointment.appstatus)=='booked' && ((DATE_TIMESTAMP(DATE_NOW()/1000)-Appointment.end)/60)>30"),
40038
+ "return_fields": "merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))}))})"
40039
+ };
39804
40040
  },
39805
40041
  getPatientsCheckedInDoctor: function getPatientsCheckedInDoctor(data) {
39806
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='checked-in'\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
40042
+ return {
40043
+ db_name: dbName,
40044
+ entity: "Appointment,Encounter",
40045
+ filter: {
40046
+ 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, "' "),
40047
+ Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
40048
+ },
40049
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
40050
+ };
39807
40051
  },
39808
40052
  getVisitCompletedDoctor: function getVisitCompletedDoctor(data) {
39809
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='finished'\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
40053
+ return {
40054
+ db_name: dbName,
40055
+ entity: "Appointment,Encounter",
40056
+ filter: {
40057
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' "),
40058
+ Encounter: "Appointment.id in Encounter.appointmentId && document(Encounter.statushistory[*].status)[*].code ANY =='ENCSTATUS0010'"
40059
+ },
40060
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
40061
+ };
39810
40062
  },
39811
40063
  getTriageDoneDoctor: function getTriageDoneDoctor(data) {
39812
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner,Encounter\",\n \"filter\": {\n \"Practitioner\": \"Practitioner.activestatus==true && Practitioner.id==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY =='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'\",\n \"Encounter\": \"Encounter.activestatus == true && Encounter.Organization_id == '").concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Encounter.participant[*].Practitioner_id any == Practitioner.id && Encounter.encounterdate>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Encounter.encounterdate<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && lower(document(Encounter.status).display)=='triaged'\"\n },\n \"return_fields\": \"merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))})\"\n }");
40064
+ return {
40065
+ db_name: dbName,
40066
+ entity: "Appointment,Encounter",
40067
+ filter: {
40068
+ Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' "),
40069
+ Encounter: "Appointment.id in Encounter.appointmentId && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Triaged'"
40070
+ },
40071
+ return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
40072
+ };
39813
40073
  }
39814
40074
  };
39815
40075
 
@@ -39839,21 +40099,25 @@ var GET_PATIENTS_CHECKED_IN = createAsyncThunk("currentVisitStatsApiSlice/getPat
39839
40099
  case 5:
39840
40100
  data = _context.sent;
39841
40101
  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 (_) {
39842
- var _$patient_id, _$patient_id$, _$practitioner_detail, _$practitioner_detail2, _$patient_id2, _$patient_id2$, _$type, _$type$;
40102
+ var _$appointmentId, _$appointmentId$, _$appointmentId$$Pers, _$appointmentId$$Pers2, _$appointmentId$$Pers3, _$appointmentId2, _$appointmentId2$, _$appointmentId2$$Per, _$appointmentId2$$Per2, _$appointmentId2$$Per3, _$patient_id, _$patient_id$, _$patient_id$$name, _$patient_id2, _$patient_id2$, _$appointmentId3, _$appointmentId3$, _$appointmentId4, _$appointmentId4$, _$appointmentId5, _$appointmentId5$, _$appointmentId6, _$appointmentId6$, _$appointmentId7, _$appointmentId7$, _$appointmentId7$$Spe, _$patient_id3, _$patient_id3$, _$patient_id4, _$patient_id4$, _$patient_id4$$teleco, _$patient_id4$$teleco2, _$status;
39843
40103
 
39844
40104
  return {
39845
- "img": 'https://www.fillmurray.com/640/360',
39846
- "name": 'Louis Barrett',
39847
- "mrn": _ === 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$.alias,
39848
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
39849
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
39850
- "speciality": _ === 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.speciality,
39851
- "ward": 'Ward 1',
39852
- "dob": _ === 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$.birthDate,
39853
- "contact": 'Contact',
39854
- "type": _ === null || _ === void 0 ? void 0 : (_$type = _.type) === null || _$type === void 0 ? void 0 : (_$type$ = _$type[0]) === null || _$type$ === void 0 ? void 0 : _$type$.display,
39855
- "encounterStatus": 'Pending',
39856
- "view": true
40105
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId = _.appointmentId) === null || _$appointmentId === void 0 ? void 0 : (_$appointmentId$ = _$appointmentId[0]) === null || _$appointmentId$ === void 0 ? void 0 : (_$appointmentId$$Pers = _$appointmentId$.PersonID) === null || _$appointmentId$$Pers === void 0 ? void 0 : (_$appointmentId$$Pers2 = _$appointmentId$$Pers[0]) === null || _$appointmentId$$Pers2 === void 0 ? void 0 : (_$appointmentId$$Pers3 = _$appointmentId$$Pers2.photo[0]) === null || _$appointmentId$$Pers3 === void 0 ? void 0 : _$appointmentId$$Pers3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId2 = _.appointmentId) === null || _$appointmentId2 === void 0 ? void 0 : (_$appointmentId2$ = _$appointmentId2[0]) === null || _$appointmentId2$ === void 0 ? void 0 : (_$appointmentId2$$Per = _$appointmentId2$.PersonID) === null || _$appointmentId2$$Per === void 0 ? void 0 : (_$appointmentId2$$Per2 = _$appointmentId2$$Per[0]) === null || _$appointmentId2$$Per2 === void 0 ? void 0 : (_$appointmentId2$$Per3 = _$appointmentId2$$Per2.photo[0]) === null || _$appointmentId2$$Per3 === void 0 ? void 0 : _$appointmentId2$$Per3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40106
+ 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]) || {}),
40107
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id2 = _.patient_id) === null || _$patient_id2 === void 0 ? void 0 : (_$patient_id2$ = _$patient_id2[0]) === null || _$patient_id2$ === void 0 ? void 0 : _$patient_id2$.MRN,
40108
+ orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : (_$appointmentId3$ = _$appointmentId3[0]) === null || _$appointmentId3$ === void 0 ? void 0 : _$appointmentId3$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : _$appointmentId4$.start).format("DD MMM,YYYY") : "",
40109
+ orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId5 = _.appointmentId) === null || _$appointmentId5 === void 0 ? void 0 : (_$appointmentId5$ = _$appointmentId5[0]) === null || _$appointmentId5$ === void 0 ? void 0 : _$appointmentId5$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId6 = _.appointmentId) === null || _$appointmentId6 === void 0 ? void 0 : (_$appointmentId6$ = _$appointmentId6[0]) === null || _$appointmentId6$ === void 0 ? void 0 : _$appointmentId6$.start).format("hh:mm A") : "",
40110
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId7 = _.appointmentId) === null || _$appointmentId7 === void 0 ? void 0 : (_$appointmentId7$ = _$appointmentId7[0]) === null || _$appointmentId7$ === void 0 ? void 0 : (_$appointmentId7$$Spe = _$appointmentId7$.SpecialtyID) === null || _$appointmentId7$$Spe === void 0 ? void 0 : _$appointmentId7$$Spe.map(function (spl) {
40111
+ var _spl$coding, _spl$coding$;
40112
+
40113
+ 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;
40114
+ }).join(", "),
40115
+ ward: "Ward 1",
40116
+ 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,
40117
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id4 = _.patient_id) === null || _$patient_id4 === void 0 ? void 0 : (_$patient_id4$ = _$patient_id4[0]) === null || _$patient_id4$ === void 0 ? void 0 : (_$patient_id4$$teleco = _$patient_id4$.telecom) === null || _$patient_id4$$teleco === void 0 ? void 0 : (_$patient_id4$$teleco2 = _$patient_id4$$teleco[0]) === null || _$patient_id4$$teleco2 === void 0 ? void 0 : _$patient_id4$$teleco2.value),
40118
+ type: _ === null || _ === void 0 ? void 0 : _.visit_type,
40119
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status = _.status) === null || _$status === void 0 ? void 0 : _$status.display,
40120
+ view: true
39857
40121
  };
39858
40122
  }) : [];
39859
40123
  return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39898,21 +40162,25 @@ var GET_TRAIGE_DONE = createAsyncThunk("currentVisitStatsApiSlice/getTriageDone"
39898
40162
  case 5:
39899
40163
  data = _context2.sent;
39900
40164
  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 (_) {
39901
- var _$patient_id3, _$patient_id3$, _$practitioner_detail3, _$practitioner_detail4, _$patient_id4, _$patient_id4$, _$type2, _$type2$;
40165
+ var _$appointmentId8, _$appointmentId8$, _$appointmentId8$$Per, _$appointmentId8$$Per2, _$appointmentId8$$Per3, _$appointmentId9, _$appointmentId9$, _$appointmentId9$$Per, _$appointmentId9$$Per2, _$appointmentId9$$Per3, _$patient_id5, _$patient_id5$, _$patient_id5$$name, _$patient_id6, _$patient_id6$, _$appointmentId10, _$appointmentId10$, _$appointmentId11, _$appointmentId11$, _$appointmentId12, _$appointmentId12$, _$appointmentId13, _$appointmentId13$, _$appointmentId14, _$appointmentId14$, _$appointmentId14$$Sp, _$patient_id7, _$patient_id7$, _$patient_id8, _$patient_id8$, _$patient_id8$$teleco, _$patient_id8$$teleco2, _$status2;
39902
40166
 
39903
40167
  return {
39904
- "img": 'https://www.fillmurray.com/640/360',
39905
- "name": 'Louis Barrett',
39906
- "mrn": _ === 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$.alias,
39907
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
39908
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
39909
- "speciality": _ === 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.speciality,
39910
- "ward": 'Ward 1',
39911
- "dob": _ === 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$.birthDate,
39912
- "contact": 'Contact',
39913
- "type": _ === null || _ === void 0 ? void 0 : (_$type2 = _.type) === null || _$type2 === void 0 ? void 0 : (_$type2$ = _$type2[0]) === null || _$type2$ === void 0 ? void 0 : _$type2$.display,
39914
- "encounterStatus": 'Pending',
39915
- "view": true
40168
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : (_$appointmentId8$$Per = _$appointmentId8$.PersonID) === null || _$appointmentId8$$Per === void 0 ? void 0 : (_$appointmentId8$$Per2 = _$appointmentId8$$Per[0]) === null || _$appointmentId8$$Per2 === void 0 ? void 0 : (_$appointmentId8$$Per3 = _$appointmentId8$$Per2.photo[0]) === null || _$appointmentId8$$Per3 === void 0 ? void 0 : _$appointmentId8$$Per3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : (_$appointmentId9$$Per = _$appointmentId9$.PersonID) === null || _$appointmentId9$$Per === void 0 ? void 0 : (_$appointmentId9$$Per2 = _$appointmentId9$$Per[0]) === null || _$appointmentId9$$Per2 === void 0 ? void 0 : (_$appointmentId9$$Per3 = _$appointmentId9$$Per2.photo[0]) === null || _$appointmentId9$$Per3 === void 0 ? void 0 : _$appointmentId9$$Per3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40169
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id5 = _.patient_id) === null || _$patient_id5 === void 0 ? void 0 : (_$patient_id5$ = _$patient_id5[0]) === null || _$patient_id5$ === void 0 ? void 0 : (_$patient_id5$$name = _$patient_id5$.name) === null || _$patient_id5$$name === void 0 ? void 0 : _$patient_id5$$name[0]) || {}),
40170
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id6 = _.patient_id) === null || _$patient_id6 === void 0 ? void 0 : (_$patient_id6$ = _$patient_id6[0]) === null || _$patient_id6$ === void 0 ? void 0 : _$patient_id6$.MRN,
40171
+ orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : _$appointmentId10$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId11 = _.appointmentId) === null || _$appointmentId11 === void 0 ? void 0 : (_$appointmentId11$ = _$appointmentId11[0]) === null || _$appointmentId11$ === void 0 ? void 0 : _$appointmentId11$.start).format("DD MMM,YYYY") : "",
40172
+ orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId12 = _.appointmentId) === null || _$appointmentId12 === void 0 ? void 0 : (_$appointmentId12$ = _$appointmentId12[0]) === null || _$appointmentId12$ === void 0 ? void 0 : _$appointmentId12$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId13 = _.appointmentId) === null || _$appointmentId13 === void 0 ? void 0 : (_$appointmentId13$ = _$appointmentId13[0]) === null || _$appointmentId13$ === void 0 ? void 0 : _$appointmentId13$.start).format("hh:mm A") : "",
40173
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId14 = _.appointmentId) === null || _$appointmentId14 === void 0 ? void 0 : (_$appointmentId14$ = _$appointmentId14[0]) === null || _$appointmentId14$ === void 0 ? void 0 : (_$appointmentId14$$Sp = _$appointmentId14$.SpecialtyID) === null || _$appointmentId14$$Sp === void 0 ? void 0 : _$appointmentId14$$Sp.map(function (spl) {
40174
+ var _spl$coding2, _spl$coding2$;
40175
+
40176
+ 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;
40177
+ }).join(", "),
40178
+ ward: "Ward 1",
40179
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id7 = _.patient_id) === null || _$patient_id7 === void 0 ? void 0 : (_$patient_id7$ = _$patient_id7[0]) === null || _$patient_id7$ === void 0 ? void 0 : _$patient_id7$.age,
40180
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id8 = _.patient_id) === null || _$patient_id8 === void 0 ? void 0 : (_$patient_id8$ = _$patient_id8[0]) === null || _$patient_id8$ === void 0 ? void 0 : (_$patient_id8$$teleco = _$patient_id8$.telecom) === null || _$patient_id8$$teleco === void 0 ? void 0 : (_$patient_id8$$teleco2 = _$patient_id8$$teleco[0]) === null || _$patient_id8$$teleco2 === void 0 ? void 0 : _$patient_id8$$teleco2.value),
40181
+ type: _ === null || _ === void 0 ? void 0 : _.visit_type,
40182
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status2 = _.status) === null || _$status2 === void 0 ? void 0 : _$status2.display,
40183
+ view: true
39916
40184
  };
39917
40185
  }) : [];
39918
40186
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39957,21 +40225,25 @@ var GET_VISIT_COMPLETED = createAsyncThunk("currentVisitStatsApiSlice/getVisitCo
39957
40225
  case 5:
39958
40226
  data = _context3.sent;
39959
40227
  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 (_) {
39960
- var _$patient_id5, _$patient_id5$, _$practitioner_detail5, _$practitioner_detail6, _$patient_id6, _$patient_id6$, _$type3, _$type3$;
40228
+ var _$appointmentId15, _$appointmentId15$, _$appointmentId15$$Pe, _$appointmentId15$$Pe2, _$appointmentId15$$Pe3, _$appointmentId16, _$appointmentId16$, _$appointmentId16$$Pe, _$appointmentId16$$Pe2, _$appointmentId16$$Pe3, _$patient_id9, _$patient_id9$, _$patient_id9$$name, _$patient_id10, _$patient_id10$, _$appointmentId17, _$appointmentId17$, _$appointmentId18, _$appointmentId18$, _$appointmentId19, _$appointmentId19$, _$appointmentId20, _$appointmentId20$, _$appointmentId21, _$appointmentId21$, _$appointmentId21$$Sp, _$patient_id11, _$patient_id11$, _$patient_id12, _$patient_id12$, _$patient_id12$$telec, _$patient_id12$$telec2, _$status3;
39961
40229
 
39962
40230
  return {
39963
- "img": 'https://www.fillmurray.com/640/360',
39964
- "name": 'Louis Barrett',
39965
- "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,
39966
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
39967
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
39968
- "speciality": _ === 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.speciality,
39969
- "ward": 'Ward 1',
39970
- "dob": _ === 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$.birthDate,
39971
- "contact": 'Contact',
39972
- "type": _ === null || _ === void 0 ? void 0 : (_$type3 = _.type) === null || _$type3 === void 0 ? void 0 : (_$type3$ = _$type3[0]) === null || _$type3$ === void 0 ? void 0 : _$type3$.display,
39973
- "encounterStatus": 'Pending',
39974
- "view": true
40231
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : (_$appointmentId15$$Pe = _$appointmentId15$.PersonID) === null || _$appointmentId15$$Pe === void 0 ? void 0 : (_$appointmentId15$$Pe2 = _$appointmentId15$$Pe[0]) === null || _$appointmentId15$$Pe2 === void 0 ? void 0 : (_$appointmentId15$$Pe3 = _$appointmentId15$$Pe2.photo[0]) === null || _$appointmentId15$$Pe3 === void 0 ? void 0 : _$appointmentId15$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : (_$appointmentId16$$Pe = _$appointmentId16$.PersonID) === null || _$appointmentId16$$Pe === void 0 ? void 0 : (_$appointmentId16$$Pe2 = _$appointmentId16$$Pe[0]) === null || _$appointmentId16$$Pe2 === void 0 ? void 0 : (_$appointmentId16$$Pe3 = _$appointmentId16$$Pe2.photo[0]) === null || _$appointmentId16$$Pe3 === void 0 ? void 0 : _$appointmentId16$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40232
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id9 = _.patient_id) === null || _$patient_id9 === void 0 ? void 0 : (_$patient_id9$ = _$patient_id9[0]) === null || _$patient_id9$ === void 0 ? void 0 : (_$patient_id9$$name = _$patient_id9$.name) === null || _$patient_id9$$name === void 0 ? void 0 : _$patient_id9$$name[0]) || {}),
40233
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id10 = _.patient_id) === null || _$patient_id10 === void 0 ? void 0 : (_$patient_id10$ = _$patient_id10[0]) === null || _$patient_id10$ === void 0 ? void 0 : _$patient_id10$.MRN,
40234
+ orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : _$appointmentId17$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : _$appointmentId18$.start).format("DD MMM,YYYY") : "",
40235
+ orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId19 = _.appointmentId) === null || _$appointmentId19 === void 0 ? void 0 : (_$appointmentId19$ = _$appointmentId19[0]) === null || _$appointmentId19$ === void 0 ? void 0 : _$appointmentId19$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId20 = _.appointmentId) === null || _$appointmentId20 === void 0 ? void 0 : (_$appointmentId20$ = _$appointmentId20[0]) === null || _$appointmentId20$ === void 0 ? void 0 : _$appointmentId20$.start).format("hh:mm A") : "",
40236
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId21 = _.appointmentId) === null || _$appointmentId21 === void 0 ? void 0 : (_$appointmentId21$ = _$appointmentId21[0]) === null || _$appointmentId21$ === void 0 ? void 0 : (_$appointmentId21$$Sp = _$appointmentId21$.SpecialtyID) === null || _$appointmentId21$$Sp === void 0 ? void 0 : _$appointmentId21$$Sp.map(function (spl) {
40237
+ var _spl$coding3, _spl$coding3$;
40238
+
40239
+ 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;
40240
+ }).join(", "),
40241
+ ward: "Ward 1",
40242
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id11 = _.patient_id) === null || _$patient_id11 === void 0 ? void 0 : (_$patient_id11$ = _$patient_id11[0]) === null || _$patient_id11$ === void 0 ? void 0 : _$patient_id11$.age,
40243
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id12 = _.patient_id) === null || _$patient_id12 === void 0 ? void 0 : (_$patient_id12$ = _$patient_id12[0]) === null || _$patient_id12$ === void 0 ? void 0 : (_$patient_id12$$telec = _$patient_id12$.telecom) === null || _$patient_id12$$telec === void 0 ? void 0 : (_$patient_id12$$telec2 = _$patient_id12$$telec[0]) === null || _$patient_id12$$telec2 === void 0 ? void 0 : _$patient_id12$$telec2.value),
40244
+ type: _ === null || _ === void 0 ? void 0 : _.visit_type,
40245
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status3 = _.status) === null || _$status3 === void 0 ? void 0 : _$status3.display,
40246
+ view: true
39975
40247
  };
39976
40248
  }) : [];
39977
40249
  return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40016,21 +40288,21 @@ var GET_PATIENTS_NO_SHOWS = createAsyncThunk("currentVisitStatsApiSlice/getPatie
40016
40288
  case 5:
40017
40289
  data = _context4.sent;
40018
40290
  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 (_) {
40019
- var _$patient_id$0$alias, _$patient_id7, _$patient_id7$, _$practitioner_detail7, _$practitioner_detail8, _$practitioner_detail9, _$patient_id$0$birthD, _$patient_id8, _$patient_id8$, _$type$0$display, _$type4, _$type4$;
40291
+ var _$patient_id$0$alias, _$patient_id13, _$patient_id13$, _$practitioner_detail, _$practitioner_detail2, _$practitioner_detail3, _$patient_id$0$birthD, _$patient_id14, _$patient_id14$, _$type$0$display, _$type, _$type$;
40020
40292
 
40021
40293
  return {
40022
- "img": 'https://www.fillmurray.com/640/360',
40023
- "name": 'Louis Barrett',
40024
- "mrn": (_$patient_id$0$alias = _ === 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) !== null && _$patient_id$0$alias !== void 0 ? _$patient_id$0$alias : '',
40025
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40026
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40027
- "speciality": (_$practitioner_detail7 = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail8 = _.practitioner_details) === null || _$practitioner_detail8 === void 0 ? void 0 : (_$practitioner_detail9 = _$practitioner_detail8[0]) === null || _$practitioner_detail9 === void 0 ? void 0 : _$practitioner_detail9.speciality) !== null && _$practitioner_detail7 !== void 0 ? _$practitioner_detail7 : '',
40028
- "ward": 'Ward 1',
40029
- "dob": (_$patient_id$0$birthD = _ === 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$.birthDate) !== null && _$patient_id$0$birthD !== void 0 ? _$patient_id$0$birthD : '',
40030
- "contact": 'Contact',
40031
- "type": (_$type$0$display = _ === null || _ === void 0 ? void 0 : (_$type4 = _.type) === null || _$type4 === void 0 ? void 0 : (_$type4$ = _$type4[0]) === null || _$type4$ === void 0 ? void 0 : _$type4$.display) !== null && _$type$0$display !== void 0 ? _$type$0$display : '',
40032
- "encounterStatus": 'Pending',
40033
- "view": true
40294
+ img: "https://www.fillmurray.com/640/360",
40295
+ name: "Louis Barrett",
40296
+ mrn: (_$patient_id$0$alias = _ === null || _ === void 0 ? void 0 : (_$patient_id13 = _.patient_id) === null || _$patient_id13 === void 0 ? void 0 : (_$patient_id13$ = _$patient_id13[0]) === null || _$patient_id13$ === void 0 ? void 0 : _$patient_id13$.alias) !== null && _$patient_id$0$alias !== void 0 ? _$patient_id$0$alias : "",
40297
+ orderDate: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
40298
+ orderTime: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
40299
+ speciality: (_$practitioner_detail = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail2 = _.practitioner_details) === null || _$practitioner_detail2 === void 0 ? void 0 : (_$practitioner_detail3 = _$practitioner_detail2[0]) === null || _$practitioner_detail3 === void 0 ? void 0 : _$practitioner_detail3.speciality) !== null && _$practitioner_detail !== void 0 ? _$practitioner_detail : "",
40300
+ ward: "Ward 1",
40301
+ dob: (_$patient_id$0$birthD = _ === null || _ === void 0 ? void 0 : (_$patient_id14 = _.patient_id) === null || _$patient_id14 === void 0 ? void 0 : (_$patient_id14$ = _$patient_id14[0]) === null || _$patient_id14$ === void 0 ? void 0 : _$patient_id14$.birthDate) !== null && _$patient_id$0$birthD !== void 0 ? _$patient_id$0$birthD : "",
40302
+ contact: "Contact",
40303
+ type: (_$type$0$display = _ === null || _ === void 0 ? void 0 : (_$type = _.type) === null || _$type === void 0 ? void 0 : (_$type$ = _$type[0]) === null || _$type$ === void 0 ? void 0 : _$type$.display) !== null && _$type$0$display !== void 0 ? _$type$0$display : "",
40304
+ encounterStatus: "Pending",
40305
+ view: true
40034
40306
  };
40035
40307
  }) : [];
40036
40308
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40070,30 +40342,34 @@ var GET_PATIENTS_CHECKED_IN_NURSE = createAsyncThunk("currentVisitStatsApiSlice/
40070
40342
  _context5.prev = 2;
40071
40343
  _context5.next = 5;
40072
40344
  return fetchData$3({
40073
- body: query$2.getPatientsCheckedInNurse(payload)
40345
+ body: JSON.stringify(query$2.getPatientsCheckedInNurse(payload))
40074
40346
  }, __readDocumentUrl__);
40075
40347
 
40076
40348
  case 5:
40077
40349
  data = _context5.sent;
40078
40350
  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 (_) {
40079
- var _$PersonID, _$PersonID$, _$PersonID$$name, _$PersonID$$name$, _$PersonID2, _$PersonID2$, _$type5, _$type5$, _$practitioner_detail10, _$practitioner_detail11;
40351
+ var _$appointmentId22, _$appointmentId22$, _$appointmentId22$$Pe, _$appointmentId22$$Pe2, _$appointmentId22$$Pe3, _$appointmentId23, _$appointmentId23$, _$appointmentId23$$Pe, _$appointmentId23$$Pe2, _$appointmentId23$$Pe3, _$patient_id15, _$patient_id15$, _$patient_id15$$name, _$patient_id16, _$patient_id16$, _$patient_id17, _$patient_id17$, _$patient_id18, _$patient_id18$, _$patient_id18$$gende, _$patient_id19, _$patient_id19$, _$patient_id19$$telec, _$patient_id19$$telec2, _$appointmentId24, _$appointmentId24$, _$appointmentId25, _$appointmentId25$, _$appointmentId26, _$appointmentId26$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$appointmentId29$$Sp, _$practitioner_detail4, _$practitioner_detail5, _$status4;
40080
40352
 
40081
40353
  return {
40082
- "img": 'https://www.fillmurray.com/640/360',
40083
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID = _.PersonID) === null || _$PersonID === void 0 ? void 0 : (_$PersonID$ = _$PersonID[0]) === null || _$PersonID$ === void 0 ? void 0 : (_$PersonID$$name = _$PersonID$.name) === null || _$PersonID$$name === void 0 ? void 0 : (_$PersonID$$name$ = _$PersonID$$name[0]) === null || _$PersonID$$name$ === void 0 ? void 0 : _$PersonID$$name$.given,
40084
- "mrn": 'MRN',
40085
- "age": 'Age',
40086
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID2 = _.PersonID) === null || _$PersonID2 === void 0 ? void 0 : (_$PersonID2$ = _$PersonID2[0]) === null || _$PersonID2$ === void 0 ? void 0 : _$PersonID2$.gender,
40087
- "contact": 'Contact',
40088
- "refNo": 'Ref No',
40089
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40090
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40091
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type5 = _.type) === null || _$type5 === void 0 ? void 0 : (_$type5$ = _$type5[0]) === null || _$type5$ === void 0 ? void 0 : _$type5$.display,
40092
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail10 = _.practitioner_details) === null || _$practitioner_detail10 === void 0 ? void 0 : (_$practitioner_detail11 = _$practitioner_detail10[0]) === null || _$practitioner_detail11 === void 0 ? void 0 : _$practitioner_detail11.speciality,
40093
- "clinic": 'Clinic',
40094
- "encounterStatus": 'Pending',
40354
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId22 = _.appointmentId) === null || _$appointmentId22 === void 0 ? void 0 : (_$appointmentId22$ = _$appointmentId22[0]) === null || _$appointmentId22$ === void 0 ? void 0 : (_$appointmentId22$$Pe = _$appointmentId22$.PersonID) === null || _$appointmentId22$$Pe === void 0 ? void 0 : (_$appointmentId22$$Pe2 = _$appointmentId22$$Pe[0]) === null || _$appointmentId22$$Pe2 === void 0 ? void 0 : (_$appointmentId22$$Pe3 = _$appointmentId22$$Pe2.photo[0]) === null || _$appointmentId22$$Pe3 === void 0 ? void 0 : _$appointmentId22$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId23 = _.appointmentId) === null || _$appointmentId23 === void 0 ? void 0 : (_$appointmentId23$ = _$appointmentId23[0]) === null || _$appointmentId23$ === void 0 ? void 0 : (_$appointmentId23$$Pe = _$appointmentId23$.PersonID) === null || _$appointmentId23$$Pe === void 0 ? void 0 : (_$appointmentId23$$Pe2 = _$appointmentId23$$Pe[0]) === null || _$appointmentId23$$Pe2 === void 0 ? void 0 : (_$appointmentId23$$Pe3 = _$appointmentId23$$Pe2.photo[0]) === null || _$appointmentId23$$Pe3 === void 0 ? void 0 : _$appointmentId23$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40355
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id15 = _.patient_id) === null || _$patient_id15 === void 0 ? void 0 : (_$patient_id15$ = _$patient_id15[0]) === null || _$patient_id15$ === void 0 ? void 0 : (_$patient_id15$$name = _$patient_id15$.name) === null || _$patient_id15$$name === void 0 ? void 0 : _$patient_id15$$name[0]) || {}),
40356
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id16 = _.patient_id) === null || _$patient_id16 === void 0 ? void 0 : (_$patient_id16$ = _$patient_id16[0]) === null || _$patient_id16$ === void 0 ? void 0 : _$patient_id16$.MRN,
40357
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id17 = _.patient_id) === null || _$patient_id17 === void 0 ? void 0 : (_$patient_id17$ = _$patient_id17[0]) === null || _$patient_id17$ === void 0 ? void 0 : _$patient_id17$.age,
40358
+ gender: _ === null || _ === void 0 ? void 0 : (_$patient_id18 = _.patient_id) === null || _$patient_id18 === void 0 ? void 0 : (_$patient_id18$ = _$patient_id18[0]) === null || _$patient_id18$ === void 0 ? void 0 : (_$patient_id18$$gende = _$patient_id18$.gender) === null || _$patient_id18$$gende === void 0 ? void 0 : _$patient_id18$$gende.display,
40359
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : (_$patient_id19$$telec = _$patient_id19$.telecom) === null || _$patient_id19$$telec === void 0 ? void 0 : (_$patient_id19$$telec2 = _$patient_id19$$telec[0]) === null || _$patient_id19$$telec2 === void 0 ? void 0 : _$patient_id19$$telec2.value),
40360
+ refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId24 = _.appointmentId) === null || _$appointmentId24 === void 0 ? void 0 : (_$appointmentId24$ = _$appointmentId24[0]) === null || _$appointmentId24$ === void 0 ? void 0 : _$appointmentId24$.appno,
40361
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId25 = _.appointmentId) === null || _$appointmentId25 === void 0 ? void 0 : (_$appointmentId25$ = _$appointmentId25[0]) === null || _$appointmentId25$ === void 0 ? void 0 : _$appointmentId25$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId26 = _.appointmentId) === null || _$appointmentId26 === void 0 ? void 0 : (_$appointmentId26$ = _$appointmentId26[0]) === null || _$appointmentId26$ === void 0 ? void 0 : _$appointmentId26$.start).format("DD MMM,YYYY") : "",
40362
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId27 = _.appointmentId) === null || _$appointmentId27 === void 0 ? void 0 : (_$appointmentId27$ = _$appointmentId27[0]) === null || _$appointmentId27$ === void 0 ? void 0 : _$appointmentId27$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId28 = _.appointmentId) === null || _$appointmentId28 === void 0 ? void 0 : (_$appointmentId28$ = _$appointmentId28[0]) === null || _$appointmentId28$ === void 0 ? void 0 : _$appointmentId28$.start).format("hh:mm A") : "",
40363
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
40364
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId29 = _.appointmentId) === null || _$appointmentId29 === void 0 ? void 0 : (_$appointmentId29$ = _$appointmentId29[0]) === null || _$appointmentId29$ === void 0 ? void 0 : (_$appointmentId29$$Sp = _$appointmentId29$.SpecialtyID) === null || _$appointmentId29$$Sp === void 0 ? void 0 : _$appointmentId29$$Sp.map(function (spl) {
40365
+ var _spl$coding4, _spl$coding4$;
40366
+
40367
+ 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;
40368
+ }).join(", "),
40369
+ clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail4 = _.practitioner_details) === null || _$practitioner_detail4 === void 0 ? void 0 : (_$practitioner_detail5 = _$practitioner_detail4[0]) === null || _$practitioner_detail5 === void 0 ? void 0 : _$practitioner_detail5.clinic) || "",
40370
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status4 = _.status) === null || _$status4 === void 0 ? void 0 : _$status4.display,
40095
40371
  "View Patient": true,
40096
- "Attend": true
40372
+ Attend: true
40097
40373
  };
40098
40374
  }) : [];
40099
40375
  return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40132,30 +40408,34 @@ var GET_VISIT_COMPLETED_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getV
40132
40408
  _context6.prev = 2;
40133
40409
  _context6.next = 5;
40134
40410
  return fetchData$3({
40135
- body: query$2.getVisitCompletedNurse(payload)
40411
+ body: JSON.stringify(query$2.getVisitCompletedNurse(payload))
40136
40412
  }, __readDocumentUrl__);
40137
40413
 
40138
40414
  case 5:
40139
40415
  data = _context6.sent;
40140
40416
  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 (_) {
40141
- var _$PersonID3, _$PersonID3$, _$PersonID3$$name, _$PersonID3$$name$, _$PersonID4, _$PersonID4$, _$type6, _$type6$, _$practitioner_detail12, _$practitioner_detail13;
40417
+ var _$appointmentId30, _$appointmentId30$, _$appointmentId30$$Pe, _$appointmentId30$$Pe2, _$appointmentId30$$Pe3, _$appointmentId31, _$appointmentId31$, _$appointmentId31$$Pe, _$appointmentId31$$Pe2, _$appointmentId31$$Pe3, _$patient_id20, _$patient_id20$, _$patient_id20$$name, _$patient_id21, _$patient_id21$, _$patient_id22, _$patient_id22$, _$patient_id23, _$patient_id23$, _$patient_id23$$gende, _$patient_id24, _$patient_id24$, _$patient_id24$$telec, _$patient_id24$$telec2, _$appointmentId32, _$appointmentId32$, _$appointmentId33, _$appointmentId33$, _$appointmentId34, _$appointmentId34$, _$appointmentId35, _$appointmentId35$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId37$$Sp, _$practitioner_detail6, _$practitioner_detail7, _$status5;
40142
40418
 
40143
40419
  return {
40144
- "img": 'https://www.fillmurray.com/640/360',
40145
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID3 = _.PersonID) === null || _$PersonID3 === void 0 ? void 0 : (_$PersonID3$ = _$PersonID3[0]) === null || _$PersonID3$ === void 0 ? void 0 : (_$PersonID3$$name = _$PersonID3$.name) === null || _$PersonID3$$name === void 0 ? void 0 : (_$PersonID3$$name$ = _$PersonID3$$name[0]) === null || _$PersonID3$$name$ === void 0 ? void 0 : _$PersonID3$$name$.given,
40146
- "mrn": 'MRN',
40147
- "age": 'Age',
40148
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID4 = _.PersonID) === null || _$PersonID4 === void 0 ? void 0 : (_$PersonID4$ = _$PersonID4[0]) === null || _$PersonID4$ === void 0 ? void 0 : _$PersonID4$.gender,
40149
- "contact": 'Contact',
40150
- "refNo": 'Ref No',
40151
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40152
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40153
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type6 = _.type) === null || _$type6 === void 0 ? void 0 : (_$type6$ = _$type6[0]) === null || _$type6$ === void 0 ? void 0 : _$type6$.display,
40154
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail12 = _.practitioner_details) === null || _$practitioner_detail12 === void 0 ? void 0 : (_$practitioner_detail13 = _$practitioner_detail12[0]) === null || _$practitioner_detail13 === void 0 ? void 0 : _$practitioner_detail13.speciality,
40155
- "clinic": 'Clinic',
40156
- "encounterStatus": 'Pending',
40420
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId30 = _.appointmentId) === null || _$appointmentId30 === void 0 ? void 0 : (_$appointmentId30$ = _$appointmentId30[0]) === null || _$appointmentId30$ === void 0 ? void 0 : (_$appointmentId30$$Pe = _$appointmentId30$.PersonID) === null || _$appointmentId30$$Pe === void 0 ? void 0 : (_$appointmentId30$$Pe2 = _$appointmentId30$$Pe[0]) === null || _$appointmentId30$$Pe2 === void 0 ? void 0 : (_$appointmentId30$$Pe3 = _$appointmentId30$$Pe2.photo[0]) === null || _$appointmentId30$$Pe3 === void 0 ? void 0 : _$appointmentId30$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId31 = _.appointmentId) === null || _$appointmentId31 === void 0 ? void 0 : (_$appointmentId31$ = _$appointmentId31[0]) === null || _$appointmentId31$ === void 0 ? void 0 : (_$appointmentId31$$Pe = _$appointmentId31$.PersonID) === null || _$appointmentId31$$Pe === void 0 ? void 0 : (_$appointmentId31$$Pe2 = _$appointmentId31$$Pe[0]) === null || _$appointmentId31$$Pe2 === void 0 ? void 0 : (_$appointmentId31$$Pe3 = _$appointmentId31$$Pe2.photo[0]) === null || _$appointmentId31$$Pe3 === void 0 ? void 0 : _$appointmentId31$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40421
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : (_$patient_id20$ = _$patient_id20[0]) === null || _$patient_id20$ === void 0 ? void 0 : (_$patient_id20$$name = _$patient_id20$.name) === null || _$patient_id20$$name === void 0 ? void 0 : _$patient_id20$$name[0]) || {}),
40422
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : _$patient_id21$.MRN,
40423
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id22 = _.patient_id) === null || _$patient_id22 === void 0 ? void 0 : (_$patient_id22$ = _$patient_id22[0]) === null || _$patient_id22$ === void 0 ? void 0 : _$patient_id22$.age,
40424
+ gender: _ === null || _ === void 0 ? void 0 : (_$patient_id23 = _.patient_id) === null || _$patient_id23 === void 0 ? void 0 : (_$patient_id23$ = _$patient_id23[0]) === null || _$patient_id23$ === void 0 ? void 0 : (_$patient_id23$$gende = _$patient_id23$.gender) === null || _$patient_id23$$gende === void 0 ? void 0 : _$patient_id23$$gende.display,
40425
+ 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),
40426
+ refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId32 = _.appointmentId) === null || _$appointmentId32 === void 0 ? void 0 : (_$appointmentId32$ = _$appointmentId32[0]) === null || _$appointmentId32$ === void 0 ? void 0 : _$appointmentId32$.appno,
40427
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId33 = _.appointmentId) === null || _$appointmentId33 === void 0 ? void 0 : (_$appointmentId33$ = _$appointmentId33[0]) === null || _$appointmentId33$ === void 0 ? void 0 : _$appointmentId33$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId34 = _.appointmentId) === null || _$appointmentId34 === void 0 ? void 0 : (_$appointmentId34$ = _$appointmentId34[0]) === null || _$appointmentId34$ === void 0 ? void 0 : _$appointmentId34$.start).format("DD MMM,YYYY") : "",
40428
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId35 = _.appointmentId) === null || _$appointmentId35 === void 0 ? void 0 : (_$appointmentId35$ = _$appointmentId35[0]) === null || _$appointmentId35$ === void 0 ? void 0 : _$appointmentId35$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : _$appointmentId36$.start).format("hh:mm A") : "",
40429
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
40430
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : (_$appointmentId37$$Sp = _$appointmentId37$.SpecialtyID) === null || _$appointmentId37$$Sp === void 0 ? void 0 : _$appointmentId37$$Sp.map(function (spl) {
40431
+ var _spl$coding5, _spl$coding5$;
40432
+
40433
+ 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;
40434
+ }).join(", "),
40435
+ clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail6 = _.practitioner_details) === null || _$practitioner_detail6 === void 0 ? void 0 : (_$practitioner_detail7 = _$practitioner_detail6[0]) === null || _$practitioner_detail7 === void 0 ? void 0 : _$practitioner_detail7.clinic) || "",
40436
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display,
40157
40437
  "View Patient": true,
40158
- "Attend": true
40438
+ Attend: true
40159
40439
  };
40160
40440
  }) : [];
40161
40441
  return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40194,30 +40474,30 @@ var GET_PATIENTS_NO_SHOWS_NURSE = createAsyncThunk("currentVisitStatsApiSlice/ge
40194
40474
  _context7.prev = 2;
40195
40475
  _context7.next = 5;
40196
40476
  return fetchData$3({
40197
- body: query$2.getPatientsNoShowsNurse(payload)
40477
+ body: JSON.stringify(query$2.getPatientsNoShowsNurse(payload))
40198
40478
  }, __readDocumentUrl__);
40199
40479
 
40200
40480
  case 5:
40201
40481
  data = _context7.sent;
40202
40482
  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 (_) {
40203
- var _$PersonID5, _$PersonID5$, _$PersonID5$$name, _$PersonID5$$name$, _$PersonID6, _$PersonID6$, _$type7, _$type7$, _$practitioner_detail14, _$practitioner_detail15;
40483
+ var _$PersonID, _$PersonID$, _$PersonID$$name, _$PersonID$$name$, _$PersonID2, _$PersonID2$, _$type2, _$type2$, _$practitioner_detail8, _$practitioner_detail9;
40204
40484
 
40205
40485
  return {
40206
- "img": 'https://www.fillmurray.com/640/360',
40207
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID5 = _.PersonID) === null || _$PersonID5 === void 0 ? void 0 : (_$PersonID5$ = _$PersonID5[0]) === null || _$PersonID5$ === void 0 ? void 0 : (_$PersonID5$$name = _$PersonID5$.name) === null || _$PersonID5$$name === void 0 ? void 0 : (_$PersonID5$$name$ = _$PersonID5$$name[0]) === null || _$PersonID5$$name$ === void 0 ? void 0 : _$PersonID5$$name$.given,
40208
- "mrn": 'MRN',
40209
- "age": 'Age',
40210
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID6 = _.PersonID) === null || _$PersonID6 === void 0 ? void 0 : (_$PersonID6$ = _$PersonID6[0]) === null || _$PersonID6$ === void 0 ? void 0 : _$PersonID6$.gender,
40211
- "contact": 'Contact',
40212
- "refNo": 'Ref No',
40213
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40214
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40215
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type7 = _.type) === null || _$type7 === void 0 ? void 0 : (_$type7$ = _$type7[0]) === null || _$type7$ === void 0 ? void 0 : _$type7$.display,
40216
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail14 = _.practitioner_details) === null || _$practitioner_detail14 === void 0 ? void 0 : (_$practitioner_detail15 = _$practitioner_detail14[0]) === null || _$practitioner_detail15 === void 0 ? void 0 : _$practitioner_detail15.speciality,
40217
- "clinic": 'Clinic',
40218
- "encounterStatus": 'Pending',
40486
+ img: "https://www.fillmurray.com/640/360",
40487
+ name: _ === null || _ === void 0 ? void 0 : (_$PersonID = _.PersonID) === null || _$PersonID === void 0 ? void 0 : (_$PersonID$ = _$PersonID[0]) === null || _$PersonID$ === void 0 ? void 0 : (_$PersonID$$name = _$PersonID$.name) === null || _$PersonID$$name === void 0 ? void 0 : (_$PersonID$$name$ = _$PersonID$$name[0]) === null || _$PersonID$$name$ === void 0 ? void 0 : _$PersonID$$name$.given,
40488
+ mrn: "MRN",
40489
+ age: "Age",
40490
+ gender: _ === null || _ === void 0 ? void 0 : (_$PersonID2 = _.PersonID) === null || _$PersonID2 === void 0 ? void 0 : (_$PersonID2$ = _$PersonID2[0]) === null || _$PersonID2$ === void 0 ? void 0 : _$PersonID2$.gender,
40491
+ contact: "Contact",
40492
+ refNo: "Ref No",
40493
+ date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
40494
+ time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
40495
+ visittype: _ === null || _ === void 0 ? void 0 : (_$type2 = _.type) === null || _$type2 === void 0 ? void 0 : (_$type2$ = _$type2[0]) === null || _$type2$ === void 0 ? void 0 : _$type2$.display,
40496
+ speciality: _ === null || _ === void 0 ? void 0 : (_$practitioner_detail8 = _.practitioner_details) === null || _$practitioner_detail8 === void 0 ? void 0 : (_$practitioner_detail9 = _$practitioner_detail8[0]) === null || _$practitioner_detail9 === void 0 ? void 0 : _$practitioner_detail9.speciality,
40497
+ clinic: "Clinic",
40498
+ encounterStatus: "Pending",
40219
40499
  "View Patient": true,
40220
- "Attend": true
40500
+ Attend: true
40221
40501
  };
40222
40502
  }) : [];
40223
40503
  return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40256,30 +40536,34 @@ var GET_TRAIGE_DONE_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getTriag
40256
40536
  _context8.prev = 2;
40257
40537
  _context8.next = 5;
40258
40538
  return fetchData$3({
40259
- body: query$2.getTriageDoneNurse(payload)
40539
+ body: JSON.stringify(query$2.getTriageDoneNurse(payload))
40260
40540
  }, __readDocumentUrl__);
40261
40541
 
40262
40542
  case 5:
40263
40543
  data = _context8.sent;
40264
40544
  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 (_) {
40265
- var _$PersonID7, _$PersonID7$, _$PersonID7$$name, _$PersonID7$$name$, _$PersonID8, _$PersonID8$, _$type8, _$type8$, _$practitioner_detail16, _$practitioner_detail17;
40545
+ var _$appointmentId38, _$appointmentId38$, _$appointmentId38$$Pe, _$appointmentId38$$Pe2, _$appointmentId38$$Pe3, _$appointmentId39, _$appointmentId39$, _$appointmentId39$$Pe, _$appointmentId39$$Pe2, _$appointmentId39$$Pe3, _$patient_id25, _$patient_id25$, _$patient_id25$$name, _$patient_id26, _$patient_id26$, _$patient_id27, _$patient_id27$, _$patient_id28, _$patient_id28$, _$patient_id28$$gende, _$patient_id29, _$patient_id29$, _$patient_id29$$telec, _$patient_id29$$telec2, _$appointmentId40, _$appointmentId40$, _$appointmentId41, _$appointmentId41$, _$appointmentId42, _$appointmentId42$, _$appointmentId43, _$appointmentId43$, _$appointmentId44, _$appointmentId44$, _$appointmentId45, _$appointmentId45$, _$appointmentId45$$Sp, _$practitioner_detail10, _$practitioner_detail11, _$status6;
40266
40546
 
40267
40547
  return {
40268
- "img": 'https://www.fillmurray.com/640/360',
40269
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID7 = _.PersonID) === null || _$PersonID7 === void 0 ? void 0 : (_$PersonID7$ = _$PersonID7[0]) === null || _$PersonID7$ === void 0 ? void 0 : (_$PersonID7$$name = _$PersonID7$.name) === null || _$PersonID7$$name === void 0 ? void 0 : (_$PersonID7$$name$ = _$PersonID7$$name[0]) === null || _$PersonID7$$name$ === void 0 ? void 0 : _$PersonID7$$name$.given,
40270
- "mrn": 'MRN',
40271
- "age": 'Age',
40272
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID8 = _.PersonID) === null || _$PersonID8 === void 0 ? void 0 : (_$PersonID8$ = _$PersonID8[0]) === null || _$PersonID8$ === void 0 ? void 0 : _$PersonID8$.gender,
40273
- "contact": 'Contact',
40274
- "refNo": 'Ref No',
40275
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40276
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40277
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type8 = _.type) === null || _$type8 === void 0 ? void 0 : (_$type8$ = _$type8[0]) === null || _$type8$ === void 0 ? void 0 : _$type8$.display,
40278
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail16 = _.practitioner_details) === null || _$practitioner_detail16 === void 0 ? void 0 : (_$practitioner_detail17 = _$practitioner_detail16[0]) === null || _$practitioner_detail17 === void 0 ? void 0 : _$practitioner_detail17.speciality,
40279
- "clinic": 'Clinic',
40280
- "encounterStatus": 'Pending',
40548
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : (_$appointmentId38$$Pe = _$appointmentId38$.PersonID) === null || _$appointmentId38$$Pe === void 0 ? void 0 : (_$appointmentId38$$Pe2 = _$appointmentId38$$Pe[0]) === null || _$appointmentId38$$Pe2 === void 0 ? void 0 : (_$appointmentId38$$Pe3 = _$appointmentId38$$Pe2.photo[0]) === null || _$appointmentId38$$Pe3 === void 0 ? void 0 : _$appointmentId38$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : (_$appointmentId39$$Pe = _$appointmentId39$.PersonID) === null || _$appointmentId39$$Pe === void 0 ? void 0 : (_$appointmentId39$$Pe2 = _$appointmentId39$$Pe[0]) === null || _$appointmentId39$$Pe2 === void 0 ? void 0 : (_$appointmentId39$$Pe3 = _$appointmentId39$$Pe2.photo[0]) === null || _$appointmentId39$$Pe3 === void 0 ? void 0 : _$appointmentId39$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40549
+ 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]) || {}),
40550
+ 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,
40551
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : _$patient_id27$.age,
40552
+ gender: _ === null || _ === void 0 ? void 0 : (_$patient_id28 = _.patient_id) === null || _$patient_id28 === void 0 ? void 0 : (_$patient_id28$ = _$patient_id28[0]) === null || _$patient_id28$ === void 0 ? void 0 : (_$patient_id28$$gende = _$patient_id28$.gender) === null || _$patient_id28$$gende === void 0 ? void 0 : _$patient_id28$$gende.display,
40553
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id29 = _.patient_id) === null || _$patient_id29 === void 0 ? void 0 : (_$patient_id29$ = _$patient_id29[0]) === null || _$patient_id29$ === void 0 ? void 0 : (_$patient_id29$$telec = _$patient_id29$.telecom) === null || _$patient_id29$$telec === void 0 ? void 0 : (_$patient_id29$$telec2 = _$patient_id29$$telec[0]) === null || _$patient_id29$$telec2 === void 0 ? void 0 : _$patient_id29$$telec2.value),
40554
+ refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : _$appointmentId40$.appno,
40555
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId41 = _.appointmentId) === null || _$appointmentId41 === void 0 ? void 0 : (_$appointmentId41$ = _$appointmentId41[0]) === null || _$appointmentId41$ === void 0 ? void 0 : _$appointmentId41$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : _$appointmentId42$.start).format("DD MMM,YYYY") : "",
40556
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId43 = _.appointmentId) === null || _$appointmentId43 === void 0 ? void 0 : (_$appointmentId43$ = _$appointmentId43[0]) === null || _$appointmentId43$ === void 0 ? void 0 : _$appointmentId43$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId44 = _.appointmentId) === null || _$appointmentId44 === void 0 ? void 0 : (_$appointmentId44$ = _$appointmentId44[0]) === null || _$appointmentId44$ === void 0 ? void 0 : _$appointmentId44$.start).format("hh:mm A") : "",
40557
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
40558
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : (_$appointmentId45$$Sp = _$appointmentId45$.SpecialtyID) === null || _$appointmentId45$$Sp === void 0 ? void 0 : _$appointmentId45$$Sp.map(function (spl) {
40559
+ var _spl$coding6, _spl$coding6$;
40560
+
40561
+ 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;
40562
+ }).join(", "),
40563
+ clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail10 = _.practitioner_details) === null || _$practitioner_detail10 === void 0 ? void 0 : (_$practitioner_detail11 = _$practitioner_detail10[0]) === null || _$practitioner_detail11 === void 0 ? void 0 : _$practitioner_detail11.clinic) || "",
40564
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display,
40281
40565
  "View Patient": true,
40282
- "Attend": true
40566
+ Attend: true
40283
40567
  };
40284
40568
  }) : [];
40285
40569
  return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40319,30 +40603,30 @@ var GET_PATIENTS_NO_SHOWS_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/g
40319
40603
  _context9.prev = 2;
40320
40604
  _context9.next = 5;
40321
40605
  return fetchData$3({
40322
- body: query$2.getPatientsNoShowsDoctor(payload)
40606
+ body: JSON.stringify(query$2.getPatientsNoShowsDoctor(payload))
40323
40607
  }, __readDocumentUrl__);
40324
40608
 
40325
40609
  case 5:
40326
40610
  data = _context9.sent;
40327
40611
  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 (_) {
40328
- var _$PersonID9, _$PersonID9$, _$PersonID9$$name, _$PersonID9$$name$, _$PersonID10, _$PersonID10$, _$type9, _$type9$, _$practitioner_detail18, _$practitioner_detail19;
40612
+ var _$PersonID3, _$PersonID3$, _$PersonID3$$name, _$PersonID3$$name$, _$PersonID4, _$PersonID4$, _$type3, _$type3$, _$practitioner_detail12, _$practitioner_detail13;
40329
40613
 
40330
40614
  return {
40331
- "img": 'https://www.fillmurray.com/640/360',
40332
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID9 = _.PersonID) === null || _$PersonID9 === void 0 ? void 0 : (_$PersonID9$ = _$PersonID9[0]) === null || _$PersonID9$ === void 0 ? void 0 : (_$PersonID9$$name = _$PersonID9$.name) === null || _$PersonID9$$name === void 0 ? void 0 : (_$PersonID9$$name$ = _$PersonID9$$name[0]) === null || _$PersonID9$$name$ === void 0 ? void 0 : _$PersonID9$$name$.given,
40333
- "mrn": 'MRN',
40334
- "age": 'Age',
40335
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID10 = _.PersonID) === null || _$PersonID10 === void 0 ? void 0 : (_$PersonID10$ = _$PersonID10[0]) === null || _$PersonID10$ === void 0 ? void 0 : _$PersonID10$.gender,
40336
- "contact": 'Contact',
40337
- "refNo": 'Ref No',
40338
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40339
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40340
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type9 = _.type) === null || _$type9 === void 0 ? void 0 : (_$type9$ = _$type9[0]) === null || _$type9$ === void 0 ? void 0 : _$type9$.display,
40341
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail18 = _.practitioner_details) === null || _$practitioner_detail18 === void 0 ? void 0 : (_$practitioner_detail19 = _$practitioner_detail18[0]) === null || _$practitioner_detail19 === void 0 ? void 0 : _$practitioner_detail19.speciality,
40342
- "clinic": 'Clinic',
40343
- "encounterStatus": 'Pending',
40615
+ img: "https://www.fillmurray.com/640/360",
40616
+ name: _ === null || _ === void 0 ? void 0 : (_$PersonID3 = _.PersonID) === null || _$PersonID3 === void 0 ? void 0 : (_$PersonID3$ = _$PersonID3[0]) === null || _$PersonID3$ === void 0 ? void 0 : (_$PersonID3$$name = _$PersonID3$.name) === null || _$PersonID3$$name === void 0 ? void 0 : (_$PersonID3$$name$ = _$PersonID3$$name[0]) === null || _$PersonID3$$name$ === void 0 ? void 0 : _$PersonID3$$name$.given,
40617
+ mrn: "MRN",
40618
+ age: "Age",
40619
+ gender: _ === null || _ === void 0 ? void 0 : (_$PersonID4 = _.PersonID) === null || _$PersonID4 === void 0 ? void 0 : (_$PersonID4$ = _$PersonID4[0]) === null || _$PersonID4$ === void 0 ? void 0 : _$PersonID4$.gender,
40620
+ contact: "Contact",
40621
+ refNo: "Ref No",
40622
+ date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
40623
+ time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
40624
+ visittype: _ === null || _ === void 0 ? void 0 : (_$type3 = _.type) === null || _$type3 === void 0 ? void 0 : (_$type3$ = _$type3[0]) === null || _$type3$ === void 0 ? void 0 : _$type3$.display,
40625
+ speciality: _ === null || _ === void 0 ? void 0 : (_$practitioner_detail12 = _.practitioner_details) === null || _$practitioner_detail12 === void 0 ? void 0 : (_$practitioner_detail13 = _$practitioner_detail12[0]) === null || _$practitioner_detail13 === void 0 ? void 0 : _$practitioner_detail13.speciality,
40626
+ clinic: "Clinic",
40627
+ encounterStatus: "Pending",
40344
40628
  "View Patient": true,
40345
- "Attend": true
40629
+ Attend: true
40346
40630
  };
40347
40631
  }) : [];
40348
40632
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40381,30 +40665,34 @@ var GET_PATIENTS_CHECKED_IN_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice
40381
40665
  _context10.prev = 2;
40382
40666
  _context10.next = 5;
40383
40667
  return fetchData$3({
40384
- body: query$2.getPatientsCheckedInDoctor(payload)
40668
+ body: JSON.stringify(query$2.getPatientsCheckedInDoctor(payload))
40385
40669
  }, __readDocumentUrl__);
40386
40670
 
40387
40671
  case 5:
40388
40672
  data = _context10.sent;
40389
40673
  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 (_) {
40390
- var _$PersonID11, _$PersonID11$, _$PersonID11$$name, _$PersonID11$$name$, _$PersonID12, _$PersonID12$, _$type10, _$type10$, _$practitioner_detail20, _$practitioner_detail21;
40674
+ var _$appointmentId46, _$appointmentId46$, _$appointmentId46$$Pe, _$appointmentId46$$Pe2, _$appointmentId46$$Pe3, _$appointmentId47, _$appointmentId47$, _$appointmentId47$$Pe, _$appointmentId47$$Pe2, _$appointmentId47$$Pe3, _$patient_id30, _$patient_id30$, _$patient_id30$$name, _$patient_id31, _$patient_id31$, _$patient_id32, _$patient_id32$, _$patient_id33, _$patient_id33$, _$patient_id33$$gende, _$patient_id34, _$patient_id34$, _$patient_id34$$telec, _$patient_id34$$telec2, _$appointmentId48, _$appointmentId48$, _$appointmentId49, _$appointmentId49$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$appointmentId53$$Sp, _$practitioner_detail14, _$practitioner_detail15, _$status7;
40391
40675
 
40392
40676
  return {
40393
- "img": 'https://www.fillmurray.com/640/360',
40394
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID11 = _.PersonID) === null || _$PersonID11 === void 0 ? void 0 : (_$PersonID11$ = _$PersonID11[0]) === null || _$PersonID11$ === void 0 ? void 0 : (_$PersonID11$$name = _$PersonID11$.name) === null || _$PersonID11$$name === void 0 ? void 0 : (_$PersonID11$$name$ = _$PersonID11$$name[0]) === null || _$PersonID11$$name$ === void 0 ? void 0 : _$PersonID11$$name$.given,
40395
- "mrn": 'MRN',
40396
- "age": 'Age',
40397
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID12 = _.PersonID) === null || _$PersonID12 === void 0 ? void 0 : (_$PersonID12$ = _$PersonID12[0]) === null || _$PersonID12$ === void 0 ? void 0 : _$PersonID12$.gender,
40398
- "contact": 'Contact',
40399
- "refNo": 'Ref No',
40400
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40401
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40402
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type10 = _.type) === null || _$type10 === void 0 ? void 0 : (_$type10$ = _$type10[0]) === null || _$type10$ === void 0 ? void 0 : _$type10$.display,
40403
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail20 = _.practitioner_details) === null || _$practitioner_detail20 === void 0 ? void 0 : (_$practitioner_detail21 = _$practitioner_detail20[0]) === null || _$practitioner_detail21 === void 0 ? void 0 : _$practitioner_detail21.speciality,
40404
- "clinic": 'Clinic',
40405
- "encounterStatus": 'Pending',
40677
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : (_$appointmentId46$$Pe = _$appointmentId46$.PersonID) === null || _$appointmentId46$$Pe === void 0 ? void 0 : (_$appointmentId46$$Pe2 = _$appointmentId46$$Pe[0]) === null || _$appointmentId46$$Pe2 === void 0 ? void 0 : (_$appointmentId46$$Pe3 = _$appointmentId46$$Pe2.photo[0]) === null || _$appointmentId46$$Pe3 === void 0 ? void 0 : _$appointmentId46$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : (_$appointmentId47$$Pe = _$appointmentId47$.PersonID) === null || _$appointmentId47$$Pe === void 0 ? void 0 : (_$appointmentId47$$Pe2 = _$appointmentId47$$Pe[0]) === null || _$appointmentId47$$Pe2 === void 0 ? void 0 : (_$appointmentId47$$Pe3 = _$appointmentId47$$Pe2.photo[0]) === null || _$appointmentId47$$Pe3 === void 0 ? void 0 : _$appointmentId47$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40678
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id30 = _.patient_id) === null || _$patient_id30 === void 0 ? void 0 : (_$patient_id30$ = _$patient_id30[0]) === null || _$patient_id30$ === void 0 ? void 0 : (_$patient_id30$$name = _$patient_id30$.name) === null || _$patient_id30$$name === void 0 ? void 0 : _$patient_id30$$name[0]) || {}),
40679
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id31 = _.patient_id) === null || _$patient_id31 === void 0 ? void 0 : (_$patient_id31$ = _$patient_id31[0]) === null || _$patient_id31$ === void 0 ? void 0 : _$patient_id31$.MRN,
40680
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id32 = _.patient_id) === null || _$patient_id32 === void 0 ? void 0 : (_$patient_id32$ = _$patient_id32[0]) === null || _$patient_id32$ === void 0 ? void 0 : _$patient_id32$.age,
40681
+ gender: _ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : (_$patient_id33$$gende = _$patient_id33$.gender) === null || _$patient_id33$$gende === void 0 ? void 0 : _$patient_id33$$gende.display,
40682
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id34 = _.patient_id) === null || _$patient_id34 === void 0 ? void 0 : (_$patient_id34$ = _$patient_id34[0]) === null || _$patient_id34$ === void 0 ? void 0 : (_$patient_id34$$telec = _$patient_id34$.telecom) === null || _$patient_id34$$telec === void 0 ? void 0 : (_$patient_id34$$telec2 = _$patient_id34$$telec[0]) === null || _$patient_id34$$telec2 === void 0 ? void 0 : _$patient_id34$$telec2.value),
40683
+ refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : _$appointmentId48$.appno,
40684
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : _$appointmentId49$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : _$appointmentId50$.start).format("DD MMM,YYYY") : "",
40685
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : _$appointmentId51$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : _$appointmentId52$.start).format("hh:mm A") : "",
40686
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
40687
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId53 = _.appointmentId) === null || _$appointmentId53 === void 0 ? void 0 : (_$appointmentId53$ = _$appointmentId53[0]) === null || _$appointmentId53$ === void 0 ? void 0 : (_$appointmentId53$$Sp = _$appointmentId53$.SpecialtyID) === null || _$appointmentId53$$Sp === void 0 ? void 0 : _$appointmentId53$$Sp.map(function (spl) {
40688
+ var _spl$coding7, _spl$coding7$;
40689
+
40690
+ 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;
40691
+ }).join(", "),
40692
+ clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail14 = _.practitioner_details) === null || _$practitioner_detail14 === void 0 ? void 0 : (_$practitioner_detail15 = _$practitioner_detail14[0]) === null || _$practitioner_detail15 === void 0 ? void 0 : _$practitioner_detail15.clinic) || "",
40693
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display,
40406
40694
  "View Patient": true,
40407
- "Attend": true
40695
+ Attend: true
40408
40696
  };
40409
40697
  }) : [];
40410
40698
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40443,30 +40731,34 @@ var GET_VISIT_COMPLETED_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/get
40443
40731
  _context11.prev = 2;
40444
40732
  _context11.next = 5;
40445
40733
  return fetchData$3({
40446
- body: query$2.getVisitCompletedDoctor(payload)
40734
+ body: JSON.stringify(query$2.getVisitCompletedDoctor(payload))
40447
40735
  }, __readDocumentUrl__);
40448
40736
 
40449
40737
  case 5:
40450
40738
  data = _context11.sent;
40451
40739
  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 (_) {
40452
- var _$PersonID13, _$PersonID13$, _$PersonID13$$name, _$PersonID13$$name$, _$PersonID14, _$PersonID14$, _$type11, _$type11$, _$practitioner_detail22, _$practitioner_detail23;
40740
+ var _$appointmentId54, _$appointmentId54$, _$appointmentId54$$Pe, _$appointmentId54$$Pe2, _$appointmentId54$$Pe3, _$appointmentId55, _$appointmentId55$, _$appointmentId55$$Pe, _$appointmentId55$$Pe2, _$appointmentId55$$Pe3, _$patient_id35, _$patient_id35$, _$patient_id35$$name, _$patient_id36, _$patient_id36$, _$patient_id37, _$patient_id37$, _$patient_id38, _$patient_id38$, _$patient_id38$$gende, _$patient_id39, _$patient_id39$, _$patient_id39$$telec, _$patient_id39$$telec2, _$appointmentId56, _$appointmentId56$, _$appointmentId57, _$appointmentId57$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$appointmentId60, _$appointmentId60$, _$appointmentId61, _$appointmentId61$, _$appointmentId61$$Sp, _$practitioner_detail16, _$practitioner_detail17, _$status8;
40453
40741
 
40454
40742
  return {
40455
- "img": 'https://www.fillmurray.com/640/360',
40456
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID13 = _.PersonID) === null || _$PersonID13 === void 0 ? void 0 : (_$PersonID13$ = _$PersonID13[0]) === null || _$PersonID13$ === void 0 ? void 0 : (_$PersonID13$$name = _$PersonID13$.name) === null || _$PersonID13$$name === void 0 ? void 0 : (_$PersonID13$$name$ = _$PersonID13$$name[0]) === null || _$PersonID13$$name$ === void 0 ? void 0 : _$PersonID13$$name$.given,
40457
- "mrn": 'MRN',
40458
- "age": 'Age',
40459
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID14 = _.PersonID) === null || _$PersonID14 === void 0 ? void 0 : (_$PersonID14$ = _$PersonID14[0]) === null || _$PersonID14$ === void 0 ? void 0 : _$PersonID14$.gender,
40460
- "contact": 'Contact',
40461
- "refNo": 'Ref No',
40462
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40463
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40464
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type11 = _.type) === null || _$type11 === void 0 ? void 0 : (_$type11$ = _$type11[0]) === null || _$type11$ === void 0 ? void 0 : _$type11$.display,
40465
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail22 = _.practitioner_details) === null || _$practitioner_detail22 === void 0 ? void 0 : (_$practitioner_detail23 = _$practitioner_detail22[0]) === null || _$practitioner_detail23 === void 0 ? void 0 : _$practitioner_detail23.speciality,
40466
- "clinic": 'Clinic',
40467
- "encounterStatus": 'Pending',
40743
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId54 = _.appointmentId) === null || _$appointmentId54 === void 0 ? void 0 : (_$appointmentId54$ = _$appointmentId54[0]) === null || _$appointmentId54$ === void 0 ? void 0 : (_$appointmentId54$$Pe = _$appointmentId54$.PersonID) === null || _$appointmentId54$$Pe === void 0 ? void 0 : (_$appointmentId54$$Pe2 = _$appointmentId54$$Pe[0]) === null || _$appointmentId54$$Pe2 === void 0 ? void 0 : (_$appointmentId54$$Pe3 = _$appointmentId54$$Pe2.photo[0]) === null || _$appointmentId54$$Pe3 === void 0 ? void 0 : _$appointmentId54$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : (_$appointmentId55$$Pe = _$appointmentId55$.PersonID) === null || _$appointmentId55$$Pe === void 0 ? void 0 : (_$appointmentId55$$Pe2 = _$appointmentId55$$Pe[0]) === null || _$appointmentId55$$Pe2 === void 0 ? void 0 : (_$appointmentId55$$Pe3 = _$appointmentId55$$Pe2.photo[0]) === null || _$appointmentId55$$Pe3 === void 0 ? void 0 : _$appointmentId55$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40744
+ name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : (_$patient_id35$ = _$patient_id35[0]) === null || _$patient_id35$ === void 0 ? void 0 : (_$patient_id35$$name = _$patient_id35$.name) === null || _$patient_id35$$name === void 0 ? void 0 : _$patient_id35$$name[0]) || {}),
40745
+ mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id36 = _.patient_id) === null || _$patient_id36 === void 0 ? void 0 : (_$patient_id36$ = _$patient_id36[0]) === null || _$patient_id36$ === void 0 ? void 0 : _$patient_id36$.MRN,
40746
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id37 = _.patient_id) === null || _$patient_id37 === void 0 ? void 0 : (_$patient_id37$ = _$patient_id37[0]) === null || _$patient_id37$ === void 0 ? void 0 : _$patient_id37$.age,
40747
+ gender: _ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$gende = _$patient_id38$.gender) === null || _$patient_id38$$gende === void 0 ? void 0 : _$patient_id38$$gende.display,
40748
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id39 = _.patient_id) === null || _$patient_id39 === void 0 ? void 0 : (_$patient_id39$ = _$patient_id39[0]) === null || _$patient_id39$ === void 0 ? void 0 : (_$patient_id39$$telec = _$patient_id39$.telecom) === null || _$patient_id39$$telec === void 0 ? void 0 : (_$patient_id39$$telec2 = _$patient_id39$$telec[0]) === null || _$patient_id39$$telec2 === void 0 ? void 0 : _$patient_id39$$telec2.value),
40749
+ refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : _$appointmentId56$.appno,
40750
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : _$appointmentId57$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId58 = _.appointmentId) === null || _$appointmentId58 === void 0 ? void 0 : (_$appointmentId58$ = _$appointmentId58[0]) === null || _$appointmentId58$ === void 0 ? void 0 : _$appointmentId58$.start).format("DD MMM,YYYY") : "",
40751
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId59 = _.appointmentId) === null || _$appointmentId59 === void 0 ? void 0 : (_$appointmentId59$ = _$appointmentId59[0]) === null || _$appointmentId59$ === void 0 ? void 0 : _$appointmentId59$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : _$appointmentId60$.start).format("hh:mm A") : "",
40752
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
40753
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : (_$appointmentId61$$Sp = _$appointmentId61$.SpecialtyID) === null || _$appointmentId61$$Sp === void 0 ? void 0 : _$appointmentId61$$Sp.map(function (spl) {
40754
+ var _spl$coding8, _spl$coding8$;
40755
+
40756
+ 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;
40757
+ }).join(", "),
40758
+ clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail16 = _.practitioner_details) === null || _$practitioner_detail16 === void 0 ? void 0 : (_$practitioner_detail17 = _$practitioner_detail16[0]) === null || _$practitioner_detail17 === void 0 ? void 0 : _$practitioner_detail17.clinic) || "",
40759
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display,
40468
40760
  "View Patient": true,
40469
- "Attend": true
40761
+ Attend: true
40470
40762
  };
40471
40763
  }) : [];
40472
40764
  return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40505,30 +40797,34 @@ var GET_TRAIGE_DONE_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/getTria
40505
40797
  _context12.prev = 2;
40506
40798
  _context12.next = 5;
40507
40799
  return fetchData$3({
40508
- body: query$2.getTriageDoneDoctor(payload)
40800
+ body: JSON.stringify(query$2.getTriageDoneDoctor(payload))
40509
40801
  }, __readDocumentUrl__);
40510
40802
 
40511
40803
  case 5:
40512
40804
  data = _context12.sent;
40513
40805
  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 (_) {
40514
- var _$PersonID15, _$PersonID15$, _$PersonID15$$name, _$PersonID15$$name$, _$PersonID16, _$PersonID16$, _$type12, _$type12$, _$practitioner_detail24, _$practitioner_detail25;
40806
+ var _$appointmentId62, _$appointmentId62$, _$appointmentId62$$Pe, _$appointmentId62$$Pe2, _$appointmentId62$$Pe3, _$appointmentId63, _$appointmentId63$, _$appointmentId63$$Pe, _$appointmentId63$$Pe2, _$appointmentId63$$Pe3, _$patient_id40, _$patient_id40$, _$patient_id40$$name, _$patient_id41, _$patient_id41$, _$patient_id42, _$patient_id42$, _$patient_id43, _$patient_id43$, _$patient_id43$$gende, _$patient_id44, _$patient_id44$, _$patient_id44$$telec, _$patient_id44$$telec2, _$appointmentId64, _$appointmentId64$, _$appointmentId65, _$appointmentId65$, _$appointmentId66, _$appointmentId66$, _$appointmentId67, _$appointmentId67$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$appointmentId69$$Sp, _$practitioner_detail18, _$practitioner_detail19, _$status9;
40515
40807
 
40516
40808
  return {
40517
- "img": 'https://www.fillmurray.com/640/360',
40518
- "name": _ === null || _ === void 0 ? void 0 : (_$PersonID15 = _.PersonID) === null || _$PersonID15 === void 0 ? void 0 : (_$PersonID15$ = _$PersonID15[0]) === null || _$PersonID15$ === void 0 ? void 0 : (_$PersonID15$$name = _$PersonID15$.name) === null || _$PersonID15$$name === void 0 ? void 0 : (_$PersonID15$$name$ = _$PersonID15$$name[0]) === null || _$PersonID15$$name$ === void 0 ? void 0 : _$PersonID15$$name$.given,
40519
- "mrn": 'MRN',
40520
- "age": 'Age',
40521
- "gender": _ === null || _ === void 0 ? void 0 : (_$PersonID16 = _.PersonID) === null || _$PersonID16 === void 0 ? void 0 : (_$PersonID16$ = _$PersonID16[0]) === null || _$PersonID16$ === void 0 ? void 0 : _$PersonID16$.gender,
40522
- "contact": 'Contact',
40523
- "refNo": 'Ref No',
40524
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40525
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40526
- "visittype": _ === null || _ === void 0 ? void 0 : (_$type12 = _.type) === null || _$type12 === void 0 ? void 0 : (_$type12$ = _$type12[0]) === null || _$type12$ === void 0 ? void 0 : _$type12$.display,
40527
- "speciality": _ === null || _ === void 0 ? void 0 : (_$practitioner_detail24 = _.practitioner_details) === null || _$practitioner_detail24 === void 0 ? void 0 : (_$practitioner_detail25 = _$practitioner_detail24[0]) === null || _$practitioner_detail25 === void 0 ? void 0 : _$practitioner_detail25.speciality,
40528
- "clinic": 'Clinic',
40529
- "encounterStatus": 'Pending',
40809
+ img: (_ === null || _ === void 0 ? void 0 : (_$appointmentId62 = _.appointmentId) === null || _$appointmentId62 === void 0 ? void 0 : (_$appointmentId62$ = _$appointmentId62[0]) === null || _$appointmentId62$ === void 0 ? void 0 : (_$appointmentId62$$Pe = _$appointmentId62$.PersonID) === null || _$appointmentId62$$Pe === void 0 ? void 0 : (_$appointmentId62$$Pe2 = _$appointmentId62$$Pe[0]) === null || _$appointmentId62$$Pe2 === void 0 ? void 0 : (_$appointmentId62$$Pe3 = _$appointmentId62$$Pe2.photo[0]) === null || _$appointmentId62$$Pe3 === void 0 ? void 0 : _$appointmentId62$$Pe3.fileid) ? getImgUrl(_ === null || _ === void 0 ? void 0 : (_$appointmentId63 = _.appointmentId) === null || _$appointmentId63 === void 0 ? void 0 : (_$appointmentId63$ = _$appointmentId63[0]) === null || _$appointmentId63$ === void 0 ? void 0 : (_$appointmentId63$$Pe = _$appointmentId63$.PersonID) === null || _$appointmentId63$$Pe === void 0 ? void 0 : (_$appointmentId63$$Pe2 = _$appointmentId63$$Pe[0]) === null || _$appointmentId63$$Pe2 === void 0 ? void 0 : (_$appointmentId63$$Pe3 = _$appointmentId63$$Pe2.photo[0]) === null || _$appointmentId63$$Pe3 === void 0 ? void 0 : _$appointmentId63$$Pe3.fileid) : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40810
+ 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]) || {}),
40811
+ 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,
40812
+ age: _ === null || _ === void 0 ? void 0 : (_$patient_id42 = _.patient_id) === null || _$patient_id42 === void 0 ? void 0 : (_$patient_id42$ = _$patient_id42[0]) === null || _$patient_id42$ === void 0 ? void 0 : _$patient_id42$.age,
40813
+ gender: _ === null || _ === void 0 ? void 0 : (_$patient_id43 = _.patient_id) === null || _$patient_id43 === void 0 ? void 0 : (_$patient_id43$ = _$patient_id43[0]) === null || _$patient_id43$ === void 0 ? void 0 : (_$patient_id43$$gende = _$patient_id43$.gender) === null || _$patient_id43$$gende === void 0 ? void 0 : _$patient_id43$$gende.display,
40814
+ contact: JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id44 = _.patient_id) === null || _$patient_id44 === void 0 ? void 0 : (_$patient_id44$ = _$patient_id44[0]) === null || _$patient_id44$ === void 0 ? void 0 : (_$patient_id44$$telec = _$patient_id44$.telecom) === null || _$patient_id44$$telec === void 0 ? void 0 : (_$patient_id44$$telec2 = _$patient_id44$$telec[0]) === null || _$patient_id44$$telec2 === void 0 ? void 0 : _$patient_id44$$telec2.value),
40815
+ refNo: _ === null || _ === void 0 ? void 0 : (_$appointmentId64 = _.appointmentId) === null || _$appointmentId64 === void 0 ? void 0 : (_$appointmentId64$ = _$appointmentId64[0]) === null || _$appointmentId64$ === void 0 ? void 0 : _$appointmentId64$.appno,
40816
+ date: (_ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : _$appointmentId65$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId66 = _.appointmentId) === null || _$appointmentId66 === void 0 ? void 0 : (_$appointmentId66$ = _$appointmentId66[0]) === null || _$appointmentId66$ === void 0 ? void 0 : _$appointmentId66$.start).format("DD MMM,YYYY") : "",
40817
+ time: (_ === null || _ === void 0 ? void 0 : (_$appointmentId67 = _.appointmentId) === null || _$appointmentId67 === void 0 ? void 0 : (_$appointmentId67$ = _$appointmentId67[0]) === null || _$appointmentId67$ === void 0 ? void 0 : _$appointmentId67$.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : (_$appointmentId68 = _.appointmentId) === null || _$appointmentId68 === void 0 ? void 0 : (_$appointmentId68$ = _$appointmentId68[0]) === null || _$appointmentId68$ === void 0 ? void 0 : _$appointmentId68$.start).format("hh:mm A") : "",
40818
+ visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
40819
+ speciality: _ === null || _ === void 0 ? void 0 : (_$appointmentId69 = _.appointmentId) === null || _$appointmentId69 === void 0 ? void 0 : (_$appointmentId69$ = _$appointmentId69[0]) === null || _$appointmentId69$ === void 0 ? void 0 : (_$appointmentId69$$Sp = _$appointmentId69$.SpecialtyID) === null || _$appointmentId69$$Sp === void 0 ? void 0 : _$appointmentId69$$Sp.map(function (spl) {
40820
+ var _spl$coding9, _spl$coding9$;
40821
+
40822
+ 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;
40823
+ }).join(", "),
40824
+ clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail18 = _.practitioner_details) === null || _$practitioner_detail18 === void 0 ? void 0 : (_$practitioner_detail19 = _$practitioner_detail18[0]) === null || _$practitioner_detail19 === void 0 ? void 0 : _$practitioner_detail19.clinic) || "",
40825
+ encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display,
40530
40826
  "View Patient": true,
40531
- "Attend": true
40827
+ Attend: true
40532
40828
  };
40533
40829
  }) : [];
40534
40830
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {