primarycare-binder 1.1.10 → 1.1.14

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 +781 -498
  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",
@@ -8078,7 +8084,7 @@ var queries$a = {
8078
8084
  Encounter: "Encounter.appointmentId == [".concat(appointmentId, "]"),
8079
8085
  Patient: "Patient.id == Encounter.patient_id"
8080
8086
  },
8081
- "return_fields": "merge(Encounter,{patient_id:(for p in Patient.identifier return merge(Patient,{identifier:document(p),name:document(Patient.name),telecom:document(Patient.telecom),photo:document(Patient.photo),martialStatus:document(Patient.maritalstatus)}))})"
8087
+ return_fields: "merge(Encounter,{statusexpand:document(Encounter.status),patient_id:(for p in Patient.identifier return merge(Patient,{identifier:document(p),name:document(Patient.name),telecom:document(Patient.telecom),photo:document(Patient.photo),martialStatus:document(Patient.maritalstatus)}))})"
8082
8088
  };
8083
8089
  },
8084
8090
  visitmodify: {
@@ -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 AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
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 AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
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
  },
@@ -18555,7 +18561,7 @@ var highPriorityPatientQuery = {
18555
18561
  1: {
18556
18562
  db_name: "primarycare",
18557
18563
  entity: "Encounter",
18558
- filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'"),
18564
+ filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high' AND (lower(DOCUMENT(Encounter.status).display)==lower('Triaged') or lower(DOCUMENT(Encounter.status).display)==lower('In-progress'))"),
18559
18565
  return_fields: "MERGE(Encounter,{patient_id:(FOR pat IN Patient FILTER pat.id==Encounter.patient_id RETURN MERGE(pat,{name:(FOR hn IN TO_ARRAY(pat.name) RETURN DOCUMENT(hn)),photo:(FOR ph IN TO_ARRAY(pat.photo) RETURN DOCUMENT(ph))})),priority:DOCUMENT(Encounter.priority),priorityreason:DOCUMENT(Encounter.priorityreason)},{appointmentId:(for app in Appointment filter app.id in Encounter.appointmentId return app)},{reasonReference:document(Encounter.reasonReference)})"
18560
18566
  },
18561
18567
  2: {
@@ -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
@@ -37355,9 +37364,12 @@ var query$4 = {
37355
37364
  getAppointments: function getAppointments(data) {
37356
37365
  return {
37357
37366
  db_name: dbName,
37358
- entity: "Appointment",
37359
- 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, "'"),
37360
- 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))}))})}"
37361
37373
  };
37362
37374
  },
37363
37375
  getFirstVisits: function getFirstVisits(data) {
@@ -37365,10 +37377,10 @@ var query$4 = {
37365
37377
  db_name: dbName,
37366
37378
  entity: "Appointment,Encounter",
37367
37379
  filter: {
37368
- "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, "'"),
37369
- "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')"
37370
37382
  },
37371
- "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))}))})}"
37372
37384
  };
37373
37385
  },
37374
37386
  getOtherVisits: function getOtherVisits(data) {
@@ -37376,10 +37388,10 @@ var query$4 = {
37376
37388
  db_name: dbName,
37377
37389
  entity: "Appointment,Encounter",
37378
37390
  filter: {
37379
- "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, "'"),
37380
- "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')"
37381
37393
  },
37382
- "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))}))})}"
37383
37395
  };
37384
37396
  },
37385
37397
  getWalkIns: function getWalkIns(data) {
@@ -37387,10 +37399,10 @@ var query$4 = {
37387
37399
  db_name: dbName,
37388
37400
  entity: "Appointment,Encounter",
37389
37401
  filter: {
37390
- "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, "'"),
37391
- "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')"
37392
37404
  },
37393
- "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))}))})}"
37394
37406
  };
37395
37407
  },
37396
37408
  getNewPatients: function getNewPatients(data) {
@@ -37398,10 +37410,10 @@ var query$4 = {
37398
37410
  db_name: dbName,
37399
37411
  entity: "Appointment,Encounter",
37400
37412
  filter: {
37401
- "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, "'"),
37402
- "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')"
37403
37415
  },
37404
- "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))}))})}"
37405
37417
  };
37406
37418
  },
37407
37419
  getTodayVisits: function getTodayVisits(data) {
@@ -37412,46 +37424,147 @@ var query$4 = {
37412
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, "'"),
37413
37425
  Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in' "
37414
37426
  },
37415
- 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))}))})}"
37416
37428
  };
37417
37429
  },
37418
37430
  // NURSE
37419
37431
  getAppointmentsNurse: function getAppointmentsNurse(data) {
37420
- 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
+ };
37421
37442
  },
37422
37443
  getFirstVisitsNurse: function getFirstVisitsNurse(data) {
37423
- 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
+ };
37424
37454
  },
37425
37455
  getNewPatientsNurse: function getNewPatientsNurse(data) {
37426
- 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
+ };
37427
37466
  },
37428
37467
  getOtherVisitsNurse: function getOtherVisitsNurse(data) {
37429
- 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
+ };
37430
37478
  },
37431
37479
  getTodayVisitsNurse: function getTodayVisitsNurse(data) {
37432
- 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
+ };
37433
37489
  },
37434
37490
  getWalkInsNurse: function getWalkInsNurse(data) {
37435
- 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
+ };
37436
37501
  },
37437
37502
  //Doctor
37438
37503
  getAppointmentsDoctor: function getAppointmentsDoctor(data) {
37439
- 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
+ };
37440
37513
  },
37441
37514
  getFirstVisitsDoctor: function getFirstVisitsDoctor(data) {
37442
- 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
+ };
37443
37524
  },
37444
37525
  getNewPatientsDoctor: function getNewPatientsDoctor(data) {
37445
- 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
+ };
37446
37535
  },
37447
37536
  getOtherVisitsDoctor: function getOtherVisitsDoctor(data) {
37448
- 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
+ };
37449
37546
  },
37450
37547
  getTodayVisitsDoctor: function getTodayVisitsDoctor(data) {
37451
- 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
+ };
37452
37557
  },
37453
37558
  getWalkInsDoctor: function getWalkInsDoctor(data) {
37454
- 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
+ };
37455
37568
  }
37456
37569
  };
37457
37570
 
@@ -37481,20 +37594,24 @@ var GET_APPOINTMENTS = createAsyncThunk("appointmentStatsApiSlice/getAppointment
37481
37594
  case 5:
37482
37595
  data = _context.sent;
37483
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 (_) {
37484
- 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;
37485
37598
 
37486
37599
  return {
37487
- "img": 'https://www.fillmurray.com/640/360',
37488
- "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,
37489
- "mrn": 'MRN',
37490
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37491
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37492
- "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 : "",
37493
- "clinic": 'Clinic',
37494
- "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,
37495
- "contact": 'Contact',
37496
- "visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
37497
- "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,
37498
37615
  "Register Visit": true,
37499
37616
  "Modify Appointment": true,
37500
37617
  "Cancel Appointment": true,
@@ -37543,20 +37660,24 @@ var GET_FIRST_VISITS = createAsyncThunk("appointmentStatsApiSlice/getFirstVisits
37543
37660
  case 5:
37544
37661
  data = _context2.sent;
37545
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 (_) {
37546
- 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;
37547
37664
 
37548
37665
  return {
37549
- img: "https://www.fillmurray.com/640/360",
37550
- 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,
37551
- mrn: "MRN",
37552
- date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
37553
- time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
37554
- 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 : "",
37555
- clinic: "Clinic",
37556
- 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,
37557
- contact: "Contact",
37558
- visitType: _ === null || _ === void 0 ? void 0 : _.appointmentType,
37559
- 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,
37560
37681
  "Register Visit": true,
37561
37682
  "Modify Appointment": true,
37562
37683
  "Cancel Appointment": true,
@@ -37605,20 +37726,24 @@ var GET_OTHER_VISITS = createAsyncThunk("appointmentStatsApiSlice/getOtherVisits
37605
37726
  case 5:
37606
37727
  data = _context3.sent;
37607
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 (_) {
37608
- 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;
37609
37730
 
37610
37731
  return {
37611
- img: "https://www.fillmurray.com/640/360",
37612
- 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,
37613
- mrn: "MRN",
37614
- date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
37615
- time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
37616
- 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 : "",
37617
- clinic: "Clinic",
37618
- 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,
37619
- contact: "Contact",
37620
- visitType: _ === null || _ === void 0 ? void 0 : _.appointmentType,
37621
- 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,
37622
37747
  "Register Visit": true,
37623
37748
  "Modify Appointment": true,
37624
37749
  "Cancel Appointment": true,
@@ -37667,20 +37792,24 @@ var GET_WALK_INS = createAsyncThunk("appointmentStatsApiSlice/getWalkIns", /*#__
37667
37792
  case 5:
37668
37793
  data = _context4.sent;
37669
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 (_) {
37670
- 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;
37671
37796
 
37672
37797
  return {
37673
- "img": 'https://www.fillmurray.com/640/360',
37674
- "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,
37675
- "mrn": 'MRN',
37676
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37677
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37678
- "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 : "",
37679
- "clinic": 'Clinic',
37680
- "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,
37681
- "contact": 'Contact',
37682
- "visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
37683
- "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,
37684
37813
  "Register Visit": true,
37685
37814
  "Modify Appointment": true,
37686
37815
  "Cancel Appointment": true,
@@ -37729,20 +37858,24 @@ var GET_NEW_PATIENTS = createAsyncThunk("appointmentStatsApiSlice/getNewPatients
37729
37858
  case 5:
37730
37859
  data = _context5.sent;
37731
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 (_) {
37732
- 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;
37733
37862
 
37734
37863
  return {
37735
- "img": 'https://www.fillmurray.com/640/360',
37736
- "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,
37737
- "mrn": 'MRN',
37738
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37739
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37740
- "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 : "",
37741
- "clinic": 'Clinic',
37742
- "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,
37743
- "contact": 'Contact',
37744
- "visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
37745
- "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,
37746
37879
  "Register Visit": true,
37747
37880
  "Modify Appointment": true,
37748
37881
  "Cancel Appointment": true,
@@ -37791,20 +37924,24 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
37791
37924
  case 5:
37792
37925
  data = _context6.sent;
37793
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 (_) {
37794
- 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;
37795
37928
 
37796
37929
  return {
37797
- img: "https://www.fillmurray.com/640/360",
37798
- 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,
37799
- mrn: "MRN",
37800
- date: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("DD MMM,YYYY") : "",
37801
- time: (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format("hh:mm A") : "",
37802
- 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 : "",
37803
- clinic: "Clinic",
37804
- 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,
37805
- contact: "Contact",
37806
- visitType: _ === null || _ === void 0 ? void 0 : _.appointmentType,
37807
- 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,
37808
37945
  "Register Visit": true,
37809
37946
  "Modify Appointment": true,
37810
37947
  "Cancel Appointment": true,
@@ -37848,27 +37985,32 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
37848
37985
  _context7.prev = 2;
37849
37986
  _context7.next = 5;
37850
37987
  return fetchData$3({
37851
- body: query$4.getAppointmentsNurse(payload)
37988
+ body: JSON.stringify(query$4.getAppointmentsNurse(payload))
37852
37989
  }, __readDocumentUrl__);
37853
37990
 
37854
37991
  case 5:
37855
37992
  data = _context7.sent;
37856
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 (_) {
37857
- 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;
37858
37995
 
37859
37996
  return {
37860
- "img": 'https://www.fillmurray.com/640/360',
37861
- "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,
37862
- "mrn": 'MRN',
37863
- "refNo": "Ref No",
37864
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37865
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37866
- "visitType": (_$appointmentType = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType !== void 0 ? _$appointmentType : '',
37867
- "speciality": 'Speciality',
37868
- "clinic": 'Clinic',
37869
- "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) || "",
37870
38012
  "View Patient": true,
37871
- "Attend": true
38013
+ Attend: true
37872
38014
  };
37873
38015
  }) : [];
37874
38016
  return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -37907,27 +38049,32 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
37907
38049
  _context8.prev = 2;
37908
38050
  _context8.next = 5;
37909
38051
  return fetchData$3({
37910
- body: query$4.getFirstVisitsNurse(payload)
38052
+ body: JSON.stringify(query$4.getFirstVisitsNurse(payload))
37911
38053
  }, __readDocumentUrl__);
37912
38054
 
37913
38055
  case 5:
37914
38056
  data = _context8.sent;
37915
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 (_) {
37916
- 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;
37917
38059
 
37918
38060
  return {
37919
- "img": 'https://www.fillmurray.com/640/360',
37920
- "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,
37921
- "mrn": 'MRN',
37922
- "refNo": "Ref No",
37923
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37924
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37925
- "visitType": (_$appointmentType2 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType2 !== void 0 ? _$appointmentType2 : '',
37926
- "speciality": 'Speciality',
37927
- "clinic": 'Clinic',
37928
- "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) || "",
37929
38076
  "View Patient": true,
37930
- "Attend": true
38077
+ Attend: true
37931
38078
  };
37932
38079
  }) : [];
37933
38080
  return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -37966,27 +38113,32 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
37966
38113
  _context9.prev = 2;
37967
38114
  _context9.next = 5;
37968
38115
  return fetchData$3({
37969
- body: query$4.getNewPatientsNurse(payload)
38116
+ body: JSON.stringify(query$4.getNewPatientsNurse(payload))
37970
38117
  }, __readDocumentUrl__);
37971
38118
 
37972
38119
  case 5:
37973
38120
  data = _context9.sent;
37974
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 (_) {
37975
- 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;
37976
38123
 
37977
38124
  return {
37978
- "img": 'https://www.fillmurray.com/640/360',
37979
- "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,
37980
- "mrn": 'MRN',
37981
- "refNo": "Ref No",
37982
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
37983
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
37984
- "visitType": (_$appointmentType3 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType3 !== void 0 ? _$appointmentType3 : '',
37985
- "speciality": 'Speciality',
37986
- "clinic": 'Clinic',
37987
- "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) || "",
37988
38140
  "View Patient": true,
37989
- "Attend": true
38141
+ Attend: true
37990
38142
  };
37991
38143
  }) : [];
37992
38144
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38025,27 +38177,32 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
38025
38177
  _context10.prev = 2;
38026
38178
  _context10.next = 5;
38027
38179
  return fetchData$3({
38028
- body: query$4.getOtherVisitsNurse(payload)
38180
+ body: JSON.stringify(query$4.getOtherVisitsNurse(payload))
38029
38181
  }, __readDocumentUrl__);
38030
38182
 
38031
38183
  case 5:
38032
38184
  data = _context10.sent;
38033
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 (_) {
38034
- 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;
38035
38187
 
38036
38188
  return {
38037
- "img": 'https://www.fillmurray.com/640/360',
38038
- "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,
38039
- "mrn": 'MRN',
38040
- "refNo": "Ref No",
38041
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38042
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38043
- "visitType": (_$appointmentType4 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType4 !== void 0 ? _$appointmentType4 : '',
38044
- "speciality": 'Speciality',
38045
- "clinic": 'Clinic',
38046
- "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) || "",
38047
38204
  "View Patient": true,
38048
- "Attend": true
38205
+ Attend: true
38049
38206
  };
38050
38207
  }) : [];
38051
38208
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38084,27 +38241,31 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38084
38241
  _context11.prev = 2;
38085
38242
  _context11.next = 5;
38086
38243
  return fetchData$3({
38087
- body: query$4.getTodayVisitsNurse(payload)
38244
+ body: JSON.stringify(query$4.getTodayVisitsNurse(payload))
38088
38245
  }, __readDocumentUrl__);
38089
38246
 
38090
38247
  case 5:
38091
38248
  data = _context11.sent;
38092
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 (_) {
38093
- 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;
38094
38251
 
38095
38252
  return {
38096
- "img": 'https://www.fillmurray.com/640/360',
38097
- "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,
38098
- "mrn": 'MRN',
38099
- "refNo": "Ref No",
38100
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38101
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38102
- "visitType": (_$appointmentType5 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType5 !== void 0 ? _$appointmentType5 : '',
38103
- "speciality": 'Speciality',
38104
- "clinic": 'Clinic',
38105
- "appointmentStatus": 'Status',
38106
- "View Patient": true,
38107
- "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
38108
38269
  };
38109
38270
  }) : [];
38110
38271
  return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38143,27 +38304,32 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
38143
38304
  _context12.prev = 2;
38144
38305
  _context12.next = 5;
38145
38306
  return fetchData$3({
38146
- body: query$4.getWalkInsNurse(payload)
38307
+ body: JSON.stringify(query$4.getWalkInsNurse(payload))
38147
38308
  }, __readDocumentUrl__);
38148
38309
 
38149
38310
  case 5:
38150
38311
  data = _context12.sent;
38151
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 (_) {
38152
- 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;
38153
38314
 
38154
38315
  return {
38155
- "img": 'https://www.fillmurray.com/640/360',
38156
- "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,
38157
- "mrn": 'MRN',
38158
- "refNo": "Ref No",
38159
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38160
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38161
- "visitType": (_$appointmentType6 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType6 !== void 0 ? _$appointmentType6 : '',
38162
- "speciality": 'Speciality',
38163
- "clinic": 'Clinic',
38164
- "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) || "",
38165
38331
  "View Patient": true,
38166
- "Attend": true
38332
+ Attend: true
38167
38333
  };
38168
38334
  }) : [];
38169
38335
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38203,27 +38369,31 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
38203
38369
  _context13.prev = 2;
38204
38370
  _context13.next = 5;
38205
38371
  return fetchData$3({
38206
- body: query$4.getAppointmentsDoctor(payload)
38372
+ body: JSON.stringify(query$4.getAppointmentsDoctor(payload))
38207
38373
  }, __readDocumentUrl__);
38208
38374
 
38209
38375
  case 5:
38210
38376
  data = _context13.sent;
38211
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 (_) {
38212
- 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;
38213
38379
 
38214
38380
  return {
38215
- "img": 'https://www.fillmurray.com/640/360',
38216
- "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,
38217
- "mrn": 'MRN',
38218
- "refNo": "Ref No",
38219
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38220
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38221
- "visitType": (_$appointmentType7 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType7 !== void 0 ? _$appointmentType7 : '',
38222
- "speciality": 'Speciality',
38223
- "clinic": 'Clinic',
38224
- "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) || "",
38225
38395
  "View Patient": true,
38226
- "Attend": true
38396
+ Attend: true
38227
38397
  };
38228
38398
  }) : [];
38229
38399
  return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38262,27 +38432,31 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
38262
38432
  _context14.prev = 2;
38263
38433
  _context14.next = 5;
38264
38434
  return fetchData$3({
38265
- body: query$4.getFirstVisitsDoctor(payload)
38435
+ body: JSON.stringify(query$4.getFirstVisitsDoctor(payload))
38266
38436
  }, __readDocumentUrl__);
38267
38437
 
38268
38438
  case 5:
38269
38439
  data = _context14.sent;
38270
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 (_) {
38271
- 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;
38272
38442
 
38273
38443
  return {
38274
- "img": 'https://www.fillmurray.com/640/360',
38275
- "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,
38276
- "mrn": 'MRN',
38277
- "refNo": "Ref No",
38278
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38279
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38280
- "visitType": (_$appointmentType8 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType8 !== void 0 ? _$appointmentType8 : '',
38281
- "speciality": 'Speciality',
38282
- "clinic": 'Clinic',
38283
- "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) || "",
38284
38458
  "View Patient": true,
38285
- "Attend": true
38459
+ Attend: true
38286
38460
  };
38287
38461
  }) : [];
38288
38462
  return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38321,27 +38495,31 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
38321
38495
  _context15.prev = 2;
38322
38496
  _context15.next = 5;
38323
38497
  return fetchData$3({
38324
- body: query$4.getNewPatientsDoctor(payload)
38498
+ body: JSON.stringify(query$4.getNewPatientsDoctor(payload))
38325
38499
  }, __readDocumentUrl__);
38326
38500
 
38327
38501
  case 5:
38328
38502
  data = _context15.sent;
38329
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 (_) {
38330
- 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;
38331
38505
 
38332
38506
  return {
38333
- "img": 'https://www.fillmurray.com/640/360',
38334
- "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,
38335
- "mrn": 'MRN',
38336
- "refNo": "Ref No",
38337
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38338
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38339
- "visitType": (_$appointmentType9 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType9 !== void 0 ? _$appointmentType9 : '',
38340
- "speciality": 'Speciality',
38341
- "clinic": 'Clinic',
38342
- "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) || "",
38343
38521
  "View Patient": true,
38344
- "Attend": true
38522
+ Attend: true
38345
38523
  };
38346
38524
  }) : [];
38347
38525
  return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38380,27 +38558,31 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
38380
38558
  _context16.prev = 2;
38381
38559
  _context16.next = 5;
38382
38560
  return fetchData$3({
38383
- body: query$4.getOtherVisitsDoctor(payload)
38561
+ body: JSON.stringify(query$4.getOtherVisitsDoctor(payload))
38384
38562
  }, __readDocumentUrl__);
38385
38563
 
38386
38564
  case 5:
38387
38565
  data = _context16.sent;
38388
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 (_) {
38389
- 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;
38390
38568
 
38391
38569
  return {
38392
- "img": 'https://www.fillmurray.com/640/360',
38393
- "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,
38394
- "mrn": 'MRN',
38395
- "refNo": "Ref No",
38396
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38397
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38398
- "visitType": (_$appointmentType10 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType10 !== void 0 ? _$appointmentType10 : '',
38399
- "speciality": 'Speciality',
38400
- "clinic": 'Clinic',
38401
- "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) || "",
38402
38584
  "View Patient": true,
38403
- "Attend": true
38585
+ Attend: true
38404
38586
  };
38405
38587
  }) : [];
38406
38588
  return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38439,27 +38621,31 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
38439
38621
  _context17.prev = 2;
38440
38622
  _context17.next = 5;
38441
38623
  return fetchData$3({
38442
- body: query$4.getTodayVisitsDoctor(payload)
38624
+ body: JSON.stringify(query$4.getTodayVisitsDoctor(payload))
38443
38625
  }, __readDocumentUrl__);
38444
38626
 
38445
38627
  case 5:
38446
38628
  data = _context17.sent;
38447
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 (_) {
38448
- 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;
38449
38631
 
38450
38632
  return {
38451
- "img": 'https://www.fillmurray.com/640/360',
38452
- "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,
38453
- "mrn": 'MRN',
38454
- "refNo": "Ref No",
38455
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38456
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38457
- "visitType": (_$appointmentType11 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType11 !== void 0 ? _$appointmentType11 : '',
38458
- "speciality": 'Speciality',
38459
- "clinic": 'Clinic',
38460
- "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) || "",
38461
38647
  "View Patient": true,
38462
- "Attend": true
38648
+ Attend: true
38463
38649
  };
38464
38650
  }) : [];
38465
38651
  return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -38498,27 +38684,31 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
38498
38684
  _context18.prev = 2;
38499
38685
  _context18.next = 5;
38500
38686
  return fetchData$3({
38501
- body: query$4.getWalkInsDoctor(payload)
38687
+ body: JSON.stringify(query$4.getWalkInsDoctor(payload))
38502
38688
  }, __readDocumentUrl__);
38503
38689
 
38504
38690
  case 5:
38505
38691
  data = _context18.sent;
38506
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 (_) {
38507
- 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;
38508
38694
 
38509
38695
  return {
38510
- "img": 'https://www.fillmurray.com/640/360',
38511
- "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,
38512
- "mrn": 'MRN',
38513
- "refNo": "Ref No",
38514
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
38515
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
38516
- "visitType": (_$appointmentType12 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType12 !== void 0 ? _$appointmentType12 : '',
38517
- "speciality": 'Speciality',
38518
- "clinic": 'Clinic',
38519
- "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) || "",
38520
38710
  "View Patient": true,
38521
- "Attend": true
38711
+ Attend: true
38522
38712
  };
38523
38713
  }) : [];
38524
38714
  return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39019,12 +39209,11 @@ var ALERT_INTERACTIONS_UPERT = createAsyncThunk("alertIntractionsSlice/alertInte
39019
39209
  case 11:
39020
39210
  _context2.prev = 11;
39021
39211
  _context2.t0 = _context2["catch"](2);
39022
- debugger;
39023
39212
  return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
39024
39213
  message: _context2.t0.message
39025
39214
  })));
39026
39215
 
39027
- case 15:
39216
+ case 14:
39028
39217
  case "end":
39029
39218
  return _context2.stop();
39030
39219
  }
@@ -39787,42 +39976,100 @@ var consultActions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2
39787
39976
  var query$2 = {
39788
39977
  //FRONTDESK
39789
39978
  getPatientsCheckedIn: function getPatientsCheckedIn(data) {
39790
- 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 }");
39791
39980
  },
39792
39981
  getTriageDone: function getTriageDone(data) {
39793
- 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 }");
39794
39983
  },
39795
39984
  getVisitCompleted: function getVisitCompleted(data) {
39796
- 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 }");
39797
39986
  },
39798
39987
  getPatientsNoShows: function getPatientsNoShows(data) {
39799
- 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 }");
39800
39989
  },
39801
39990
  //NURSE
39802
39991
  getPatientsCheckedInNurse: function getPatientsCheckedInNurse(data) {
39803
- 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
+ };
39804
40001
  },
39805
40002
  getVisitCompletedNurse: function getVisitCompletedNurse(data) {
39806
- 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
+ };
39807
40012
  },
39808
40013
  getPatientsNoShowsNurse: function getPatientsNoShowsNurse(data) {
39809
- 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
+ };
39810
40020
  },
39811
40021
  getTriageDoneNurse: function getTriageDoneNurse(data) {
39812
- 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
+ };
39813
40031
  },
39814
40032
  //DOCTOR
39815
40033
  getPatientsNoShowsDoctor: function getPatientsNoShowsDoctor(data) {
39816
- 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
+ };
39817
40040
  },
39818
40041
  getPatientsCheckedInDoctor: function getPatientsCheckedInDoctor(data) {
39819
- 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
+ };
39820
40051
  },
39821
40052
  getVisitCompletedDoctor: function getVisitCompletedDoctor(data) {
39822
- 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
+ };
39823
40062
  },
39824
40063
  getTriageDoneDoctor: function getTriageDoneDoctor(data) {
39825
- 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
+ };
39826
40073
  }
39827
40074
  };
39828
40075
 
@@ -39852,21 +40099,25 @@ var GET_PATIENTS_CHECKED_IN = createAsyncThunk("currentVisitStatsApiSlice/getPat
39852
40099
  case 5:
39853
40100
  data = _context.sent;
39854
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 (_) {
39855
- 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;
39856
40103
 
39857
40104
  return {
39858
- "img": 'https://www.fillmurray.com/640/360',
39859
- "name": 'Louis Barrett',
39860
- "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,
39861
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
39862
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
39863
- "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,
39864
- "ward": 'Ward 1',
39865
- "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,
39866
- "contact": 'Contact',
39867
- "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,
39868
- "encounterStatus": 'Pending',
39869
- "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
39870
40121
  };
39871
40122
  }) : [];
39872
40123
  return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39911,21 +40162,25 @@ var GET_TRAIGE_DONE = createAsyncThunk("currentVisitStatsApiSlice/getTriageDone"
39911
40162
  case 5:
39912
40163
  data = _context2.sent;
39913
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 (_) {
39914
- 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;
39915
40166
 
39916
40167
  return {
39917
- "img": 'https://www.fillmurray.com/640/360',
39918
- "name": 'Louis Barrett',
39919
- "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,
39920
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
39921
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
39922
- "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,
39923
- "ward": 'Ward 1',
39924
- "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,
39925
- "contact": 'Contact',
39926
- "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,
39927
- "encounterStatus": 'Pending',
39928
- "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
39929
40184
  };
39930
40185
  }) : [];
39931
40186
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -39970,21 +40225,25 @@ var GET_VISIT_COMPLETED = createAsyncThunk("currentVisitStatsApiSlice/getVisitCo
39970
40225
  case 5:
39971
40226
  data = _context3.sent;
39972
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 (_) {
39973
- 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;
39974
40229
 
39975
40230
  return {
39976
- "img": 'https://www.fillmurray.com/640/360',
39977
- "name": 'Louis Barrett',
39978
- "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,
39979
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
39980
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
39981
- "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,
39982
- "ward": 'Ward 1',
39983
- "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,
39984
- "contact": 'Contact',
39985
- "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,
39986
- "encounterStatus": 'Pending',
39987
- "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
39988
40247
  };
39989
40248
  }) : [];
39990
40249
  return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40029,21 +40288,21 @@ var GET_PATIENTS_NO_SHOWS = createAsyncThunk("currentVisitStatsApiSlice/getPatie
40029
40288
  case 5:
40030
40289
  data = _context4.sent;
40031
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 (_) {
40032
- 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$;
40033
40292
 
40034
40293
  return {
40035
- "img": 'https://www.fillmurray.com/640/360',
40036
- "name": 'Louis Barrett',
40037
- "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 : '',
40038
- "orderDate": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40039
- "orderTime": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40040
- "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 : '',
40041
- "ward": 'Ward 1',
40042
- "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 : '',
40043
- "contact": 'Contact',
40044
- "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 : '',
40045
- "encounterStatus": 'Pending',
40046
- "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
40047
40306
  };
40048
40307
  }) : [];
40049
40308
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40083,30 +40342,34 @@ var GET_PATIENTS_CHECKED_IN_NURSE = createAsyncThunk("currentVisitStatsApiSlice/
40083
40342
  _context5.prev = 2;
40084
40343
  _context5.next = 5;
40085
40344
  return fetchData$3({
40086
- body: query$2.getPatientsCheckedInNurse(payload)
40345
+ body: JSON.stringify(query$2.getPatientsCheckedInNurse(payload))
40087
40346
  }, __readDocumentUrl__);
40088
40347
 
40089
40348
  case 5:
40090
40349
  data = _context5.sent;
40091
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 (_) {
40092
- 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;
40093
40352
 
40094
40353
  return {
40095
- "img": 'https://www.fillmurray.com/640/360',
40096
- "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,
40097
- "mrn": 'MRN',
40098
- "age": 'Age',
40099
- "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,
40100
- "contact": 'Contact',
40101
- "refNo": 'Ref No',
40102
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40103
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40104
- "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,
40105
- "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,
40106
- "clinic": 'Clinic',
40107
- "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,
40108
40371
  "View Patient": true,
40109
- "Attend": true
40372
+ Attend: true
40110
40373
  };
40111
40374
  }) : [];
40112
40375
  return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40145,30 +40408,34 @@ var GET_VISIT_COMPLETED_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getV
40145
40408
  _context6.prev = 2;
40146
40409
  _context6.next = 5;
40147
40410
  return fetchData$3({
40148
- body: query$2.getVisitCompletedNurse(payload)
40411
+ body: JSON.stringify(query$2.getVisitCompletedNurse(payload))
40149
40412
  }, __readDocumentUrl__);
40150
40413
 
40151
40414
  case 5:
40152
40415
  data = _context6.sent;
40153
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 (_) {
40154
- 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;
40155
40418
 
40156
40419
  return {
40157
- "img": 'https://www.fillmurray.com/640/360',
40158
- "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,
40159
- "mrn": 'MRN',
40160
- "age": 'Age',
40161
- "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,
40162
- "contact": 'Contact',
40163
- "refNo": 'Ref No',
40164
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40165
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40166
- "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,
40167
- "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,
40168
- "clinic": 'Clinic',
40169
- "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,
40170
40437
  "View Patient": true,
40171
- "Attend": true
40438
+ Attend: true
40172
40439
  };
40173
40440
  }) : [];
40174
40441
  return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40207,30 +40474,30 @@ var GET_PATIENTS_NO_SHOWS_NURSE = createAsyncThunk("currentVisitStatsApiSlice/ge
40207
40474
  _context7.prev = 2;
40208
40475
  _context7.next = 5;
40209
40476
  return fetchData$3({
40210
- body: query$2.getPatientsNoShowsNurse(payload)
40477
+ body: JSON.stringify(query$2.getPatientsNoShowsNurse(payload))
40211
40478
  }, __readDocumentUrl__);
40212
40479
 
40213
40480
  case 5:
40214
40481
  data = _context7.sent;
40215
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 (_) {
40216
- 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;
40217
40484
 
40218
40485
  return {
40219
- "img": 'https://www.fillmurray.com/640/360',
40220
- "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,
40221
- "mrn": 'MRN',
40222
- "age": 'Age',
40223
- "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,
40224
- "contact": 'Contact',
40225
- "refNo": 'Ref No',
40226
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40227
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40228
- "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,
40229
- "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,
40230
- "clinic": 'Clinic',
40231
- "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",
40232
40499
  "View Patient": true,
40233
- "Attend": true
40500
+ Attend: true
40234
40501
  };
40235
40502
  }) : [];
40236
40503
  return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40269,30 +40536,34 @@ var GET_TRAIGE_DONE_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getTriag
40269
40536
  _context8.prev = 2;
40270
40537
  _context8.next = 5;
40271
40538
  return fetchData$3({
40272
- body: query$2.getTriageDoneNurse(payload)
40539
+ body: JSON.stringify(query$2.getTriageDoneNurse(payload))
40273
40540
  }, __readDocumentUrl__);
40274
40541
 
40275
40542
  case 5:
40276
40543
  data = _context8.sent;
40277
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 (_) {
40278
- 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;
40279
40546
 
40280
40547
  return {
40281
- "img": 'https://www.fillmurray.com/640/360',
40282
- "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,
40283
- "mrn": 'MRN',
40284
- "age": 'Age',
40285
- "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,
40286
- "contact": 'Contact',
40287
- "refNo": 'Ref No',
40288
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40289
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40290
- "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,
40291
- "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,
40292
- "clinic": 'Clinic',
40293
- "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,
40294
40565
  "View Patient": true,
40295
- "Attend": true
40566
+ Attend: true
40296
40567
  };
40297
40568
  }) : [];
40298
40569
  return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40332,30 +40603,30 @@ var GET_PATIENTS_NO_SHOWS_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/g
40332
40603
  _context9.prev = 2;
40333
40604
  _context9.next = 5;
40334
40605
  return fetchData$3({
40335
- body: query$2.getPatientsNoShowsDoctor(payload)
40606
+ body: JSON.stringify(query$2.getPatientsNoShowsDoctor(payload))
40336
40607
  }, __readDocumentUrl__);
40337
40608
 
40338
40609
  case 5:
40339
40610
  data = _context9.sent;
40340
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 (_) {
40341
- 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;
40342
40613
 
40343
40614
  return {
40344
- "img": 'https://www.fillmurray.com/640/360',
40345
- "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,
40346
- "mrn": 'MRN',
40347
- "age": 'Age',
40348
- "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,
40349
- "contact": 'Contact',
40350
- "refNo": 'Ref No',
40351
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40352
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40353
- "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,
40354
- "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,
40355
- "clinic": 'Clinic',
40356
- "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",
40357
40628
  "View Patient": true,
40358
- "Attend": true
40629
+ Attend: true
40359
40630
  };
40360
40631
  }) : [];
40361
40632
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40394,30 +40665,34 @@ var GET_PATIENTS_CHECKED_IN_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice
40394
40665
  _context10.prev = 2;
40395
40666
  _context10.next = 5;
40396
40667
  return fetchData$3({
40397
- body: query$2.getPatientsCheckedInDoctor(payload)
40668
+ body: JSON.stringify(query$2.getPatientsCheckedInDoctor(payload))
40398
40669
  }, __readDocumentUrl__);
40399
40670
 
40400
40671
  case 5:
40401
40672
  data = _context10.sent;
40402
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 (_) {
40403
- 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;
40404
40675
 
40405
40676
  return {
40406
- "img": 'https://www.fillmurray.com/640/360',
40407
- "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,
40408
- "mrn": 'MRN',
40409
- "age": 'Age',
40410
- "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,
40411
- "contact": 'Contact',
40412
- "refNo": 'Ref No',
40413
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40414
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40415
- "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,
40416
- "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,
40417
- "clinic": 'Clinic',
40418
- "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,
40419
40694
  "View Patient": true,
40420
- "Attend": true
40695
+ Attend: true
40421
40696
  };
40422
40697
  }) : [];
40423
40698
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40456,30 +40731,34 @@ var GET_VISIT_COMPLETED_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/get
40456
40731
  _context11.prev = 2;
40457
40732
  _context11.next = 5;
40458
40733
  return fetchData$3({
40459
- body: query$2.getVisitCompletedDoctor(payload)
40734
+ body: JSON.stringify(query$2.getVisitCompletedDoctor(payload))
40460
40735
  }, __readDocumentUrl__);
40461
40736
 
40462
40737
  case 5:
40463
40738
  data = _context11.sent;
40464
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 (_) {
40465
- 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;
40466
40741
 
40467
40742
  return {
40468
- "img": 'https://www.fillmurray.com/640/360',
40469
- "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,
40470
- "mrn": 'MRN',
40471
- "age": 'Age',
40472
- "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,
40473
- "contact": 'Contact',
40474
- "refNo": 'Ref No',
40475
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40476
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40477
- "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,
40478
- "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,
40479
- "clinic": 'Clinic',
40480
- "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,
40481
40760
  "View Patient": true,
40482
- "Attend": true
40761
+ Attend: true
40483
40762
  };
40484
40763
  }) : [];
40485
40764
  return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -40518,30 +40797,34 @@ var GET_TRAIGE_DONE_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/getTria
40518
40797
  _context12.prev = 2;
40519
40798
  _context12.next = 5;
40520
40799
  return fetchData$3({
40521
- body: query$2.getTriageDoneDoctor(payload)
40800
+ body: JSON.stringify(query$2.getTriageDoneDoctor(payload))
40522
40801
  }, __readDocumentUrl__);
40523
40802
 
40524
40803
  case 5:
40525
40804
  data = _context12.sent;
40526
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 (_) {
40527
- 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;
40528
40807
 
40529
40808
  return {
40530
- "img": 'https://www.fillmurray.com/640/360',
40531
- "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,
40532
- "mrn": 'MRN',
40533
- "age": 'Age',
40534
- "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,
40535
- "contact": 'Contact',
40536
- "refNo": 'Ref No',
40537
- "date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
40538
- "time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
40539
- "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,
40540
- "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,
40541
- "clinic": 'Clinic',
40542
- "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,
40543
40826
  "View Patient": true,
40544
- "Attend": true
40827
+ Attend: true
40545
40828
  };
40546
40829
  }) : [];
40547
40830
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {