primarycare-binder 1.1.12 → 1.1.16

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 +442 -117
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8016,7 +8016,7 @@ var query_ids = {
8016
8016
  "db_name": dbName,
8017
8017
  "entity": "Schedule",
8018
8018
  "filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
8019
- "return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment().unix(), " AND slt.activestatus==true sort slt._id asc RETURN slt)})")
8019
+ "return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment().unix(), " AND slt.activestatus==true sort slt._id asc RETURN merge(slt, {DayType: Document(slt.DayType)}))})")
8020
8020
  };
8021
8021
  } // query: ({ start, end, id }) => ({
8022
8022
  // "db_name": dbName,
@@ -8084,7 +8084,7 @@ var queries$a = {
8084
8084
  Encounter: "Encounter.appointmentId == [".concat(appointmentId, "]"),
8085
8085
  Patient: "Patient.id == Encounter.patient_id"
8086
8086
  },
8087
- "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)}))})"
8088
8088
  };
8089
8089
  },
8090
8090
  visitmodify: {
@@ -9534,6 +9534,141 @@ var getImgUrl = function getImgUrl(fileId) {
9534
9534
  return fileId ? "".concat(__imgdownloadBaseUrl__).concat(fileId) : "";
9535
9535
  };
9536
9536
 
9537
+ var deg2rad = function deg2rad(deg) {
9538
+ return deg * (Math.PI / 180);
9539
+ };
9540
+
9541
+ var getDisctanceFromLatLonInKm = function getDisctanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
9542
+ var R = 6371; // Radius of the earth in km
9543
+
9544
+ var dLat = deg2rad(lat2 - lat1); // deg2rad below
9545
+
9546
+ var dLon = deg2rad(lon2 - lon1);
9547
+ var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.sin(dLon / 2) * Math.sin(dLon / 2);
9548
+ var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
9549
+ var d = R * c; // Distance in km
9550
+
9551
+ return parseFloat(d).toFixed(2);
9552
+ };
9553
+
9554
+ var getLocation = function getLocation() {
9555
+ return new es6Promise.Promise(function (resolve, reject) {
9556
+ navigator.geolocation.getCurrentPosition(function (position) {
9557
+ var lat = position.coords.latitude;
9558
+ var _long = position.coords.longitude;
9559
+ resolve([false, {
9560
+ lat: lat,
9561
+ "long": _long
9562
+ }]);
9563
+ }, function (error) {
9564
+ resolve([true, error]);
9565
+ });
9566
+ });
9567
+ };
9568
+
9569
+ var getCurrentPosition = /*#__PURE__*/function () {
9570
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
9571
+ var permission, lat, _long2, _yield$getLocation, _yield$getLocation2, err, currLocation;
9572
+
9573
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
9574
+ while (1) {
9575
+ switch (_context2.prev = _context2.next) {
9576
+ case 0:
9577
+ _context2.next = 2;
9578
+ return navigator.permissions.query({
9579
+ name: 'geolocation'
9580
+ })["catch"](function (err) {
9581
+ return {
9582
+ state: 'denied'
9583
+ };
9584
+ });
9585
+
9586
+ case 2:
9587
+ permission = _context2.sent;
9588
+
9589
+ if (!(permission.state !== 'denied')) {
9590
+ _context2.next = 11;
9591
+ break;
9592
+ }
9593
+
9594
+ _context2.next = 6;
9595
+ return getLocation();
9596
+
9597
+ case 6:
9598
+ _yield$getLocation = _context2.sent;
9599
+ _yield$getLocation2 = _slicedToArray(_yield$getLocation, 2);
9600
+ err = _yield$getLocation2[0];
9601
+ currLocation = _yield$getLocation2[1];
9602
+
9603
+ if (!err) {
9604
+ lat = currLocation.lat;
9605
+ _long2 = currLocation["long"];
9606
+ }
9607
+
9608
+ case 11:
9609
+ return _context2.abrupt("return", {
9610
+ lat: lat,
9611
+ "long": _long2
9612
+ });
9613
+
9614
+ case 12:
9615
+ case "end":
9616
+ return _context2.stop();
9617
+ }
9618
+ }
9619
+ }, _callee2);
9620
+ }));
9621
+
9622
+ return function getCurrentPosition() {
9623
+ return _ref4.apply(this, arguments);
9624
+ };
9625
+ }();
9626
+
9627
+ var getLatLong = /*#__PURE__*/function () {
9628
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(city) {
9629
+ var _resp$results, _resp$results$, _resp$results$$geomet, _resp$results$$geomet2, _resp$results2, _resp$results2$, _resp$results2$$geome, _resp$results2$$geome2;
9630
+
9631
+ var url, data, resp, lat, _long3, _resp$results3, _resp$results3$, _resp$results3$$geome, _resp$results3$$geome2, _resp$results4, _resp$results4$, _resp$results4$$geome, _resp$results4$$geome2;
9632
+
9633
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
9634
+ while (1) {
9635
+ switch (_context3.prev = _context3.next) {
9636
+ case 0:
9637
+ url = "https://maps.googleapis.com/maps/api/geocode/json?address=".concat(city, "&key=AIzaSyBqeACJgp12OLU6EkHeUtFgya2naH1LhrU");
9638
+ _context3.next = 3;
9639
+ return fetch(url);
9640
+
9641
+ case 3:
9642
+ data = _context3.sent;
9643
+ _context3.next = 6;
9644
+ return data.json();
9645
+
9646
+ case 6:
9647
+ resp = _context3.sent;
9648
+
9649
+ if ((resp === null || resp === void 0 ? void 0 : (_resp$results = resp.results) === null || _resp$results === void 0 ? void 0 : (_resp$results$ = _resp$results[0]) === null || _resp$results$ === void 0 ? void 0 : (_resp$results$$geomet = _resp$results$.geometry) === null || _resp$results$$geomet === void 0 ? void 0 : (_resp$results$$geomet2 = _resp$results$$geomet.location) === null || _resp$results$$geomet2 === void 0 ? void 0 : _resp$results$$geomet2.lat) && (resp === null || resp === void 0 ? void 0 : (_resp$results2 = resp.results) === null || _resp$results2 === void 0 ? void 0 : (_resp$results2$ = _resp$results2[0]) === null || _resp$results2$ === void 0 ? void 0 : (_resp$results2$$geome = _resp$results2$.geometry) === null || _resp$results2$$geome === void 0 ? void 0 : (_resp$results2$$geome2 = _resp$results2$$geome.location) === null || _resp$results2$$geome2 === void 0 ? void 0 : _resp$results2$$geome2.lng)) {
9650
+ lat = resp === null || resp === void 0 ? void 0 : (_resp$results3 = resp.results) === null || _resp$results3 === void 0 ? void 0 : (_resp$results3$ = _resp$results3[0]) === null || _resp$results3$ === void 0 ? void 0 : (_resp$results3$$geome = _resp$results3$.geometry) === null || _resp$results3$$geome === void 0 ? void 0 : (_resp$results3$$geome2 = _resp$results3$$geome.location) === null || _resp$results3$$geome2 === void 0 ? void 0 : _resp$results3$$geome2.lat;
9651
+ _long3 = resp === null || resp === void 0 ? void 0 : (_resp$results4 = resp.results) === null || _resp$results4 === void 0 ? void 0 : (_resp$results4$ = _resp$results4[0]) === null || _resp$results4$ === void 0 ? void 0 : (_resp$results4$$geome = _resp$results4$.geometry) === null || _resp$results4$$geome === void 0 ? void 0 : (_resp$results4$$geome2 = _resp$results4$$geome.location) === null || _resp$results4$$geome2 === void 0 ? void 0 : _resp$results4$$geome2.lng;
9652
+ }
9653
+
9654
+ return _context3.abrupt("return", {
9655
+ lat: lat,
9656
+ "long": _long3
9657
+ });
9658
+
9659
+ case 9:
9660
+ case "end":
9661
+ return _context3.stop();
9662
+ }
9663
+ }
9664
+ }, _callee3);
9665
+ }));
9666
+
9667
+ return function getLatLong(_x2) {
9668
+ return _ref5.apply(this, arguments);
9669
+ };
9670
+ }();
9671
+
9537
9672
  var _extraReducers$C;
9538
9673
  var __options$8 = {
9539
9674
  method: "POST",
@@ -10636,7 +10771,7 @@ var APPOINTMENT_UPDATE = createAsyncThunk("appointmentReducer/updateAppointment"
10636
10771
  break;
10637
10772
  }
10638
10773
 
10639
- throw new Error(data.error && (typeof data.error === "string" ? data.error : data.message));
10774
+ throw new Error(data.error && (typeof data.error === "string" ? data.error : data.message || data.errorMessage));
10640
10775
 
10641
10776
  case 9:
10642
10777
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -13521,9 +13656,53 @@ var practitionerReducer$1 = practitionerReducer.reducer;
13521
13656
 
13522
13657
  var _extraReducers$x;
13523
13658
 
13524
- var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
13659
+ var getLocationInfo$1 = /*#__PURE__*/function () {
13660
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(myLocation, city) {
13661
+ var obj,
13662
+ lat,
13663
+ _long,
13664
+ info,
13665
+ _args = arguments;
13666
+
13667
+ return regeneratorRuntime.wrap(function _callee$(_context) {
13668
+ while (1) {
13669
+ switch (_context.prev = _context.next) {
13670
+ case 0:
13671
+ obj = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
13672
+
13673
+ if (obj[city]) {
13674
+ _context.next = 7;
13675
+ break;
13676
+ }
13677
+
13678
+ lat = myLocation.lat, _long = myLocation["long"];
13679
+ _context.next = 5;
13680
+ return getLatLong(city);
13681
+
13682
+ case 5:
13683
+ info = _context.sent;
13684
+
13685
+ if (info.lat && info["long"]) {
13686
+ obj[city] = getDisctanceFromLatLonInKm(info.lat, info["long"], lat, _long);
13687
+ }
13688
+
13689
+ case 7:
13690
+ case "end":
13691
+ return _context.stop();
13692
+ }
13693
+ }
13694
+ }, _callee);
13695
+ }));
13696
+
13697
+ return function getLocationInfo(_x, _x2) {
13698
+ return _ref.apply(this, arguments);
13699
+ };
13700
+ }(); // DOCTER_LISTING
13701
+
13702
+
13703
+ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
13525
13704
  var payload,
13526
- _ref2,
13705
+ _ref3,
13527
13706
  rejectWithValue,
13528
13707
  date,
13529
13708
  startTime,
@@ -13538,15 +13717,21 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13538
13717
  data,
13539
13718
  returnData,
13540
13719
  allLangs,
13541
- _args = arguments;
13720
+ allCities,
13721
+ _yield$getCurrentPosi,
13722
+ myLat,
13723
+ myLong,
13724
+ locationInfo,
13725
+ promArr,
13726
+ _args2 = arguments;
13542
13727
 
13543
- return regeneratorRuntime.wrap(function _callee$(_context) {
13728
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
13544
13729
  while (1) {
13545
- switch (_context.prev = _context.next) {
13730
+ switch (_context2.prev = _context2.next) {
13546
13731
  case 0:
13547
- payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
13548
- _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
13549
- _context.prev = 2;
13732
+ payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
13733
+ _ref3 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref3.rejectWithValue;
13734
+ _context2.prev = 2;
13550
13735
  date = new Date();
13551
13736
 
13552
13737
  if (payload.date) {
@@ -13597,15 +13782,16 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13597
13782
  // }
13598
13783
 
13599
13784
 
13600
- _context.next = 12;
13785
+ _context2.next = 12;
13601
13786
  return fetchData$3({
13602
13787
  body: JSON.stringify(body)
13603
13788
  });
13604
13789
 
13605
13790
  case 12:
13606
- data = _context.sent;
13791
+ data = _context2.sent;
13607
13792
  returnData = [];
13608
13793
  allLangs = new Set();
13794
+ allCities = new Set();
13609
13795
 
13610
13796
  if (Array.isArray(data) && Array.isArray(data[0])) {
13611
13797
  data[0].forEach(function (record) {
@@ -13617,7 +13803,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13617
13803
  restData = _objectWithoutProperties(record, ["OrgType", "id", "_id", "displayresource"]);
13618
13804
 
13619
13805
  if (displayresource) {
13620
- var _OrgType$some, _restData$locationID, _restData$hospital2, _OrgType$, _restData$hospital3, _restData$hospital3$O, _restData$hospital4;
13806
+ var _OrgType$some, _restData$address, _restData$address$cit, _restData$hospital2, _restData$hospital2$a, _restData$hospital2$a2, _restData$locationID, _restData$hospital3, _OrgType$, _restData$hospital4, _restData$hospital4$O, _restData$hospital5;
13621
13807
 
13622
13808
  var resourceInfo = {
13623
13809
  resourcetype: "",
@@ -13669,6 +13855,8 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13669
13855
  // isClinic,
13670
13856
  // );
13671
13857
 
13858
+ var city = (restData === null || restData === void 0 ? void 0 : (_restData$address = restData.address) === null || _restData$address === void 0 ? void 0 : (_restData$address$cit = _restData$address.city) === null || _restData$address$cit === void 0 ? void 0 : _restData$address$cit.geogLevelName) || (restData === null || restData === void 0 ? void 0 : (_restData$hospital2 = restData.hospital) === null || _restData$hospital2 === void 0 ? void 0 : (_restData$hospital2$a = _restData$hospital2.address) === null || _restData$hospital2$a === void 0 ? void 0 : (_restData$hospital2$a2 = _restData$hospital2$a.city) === null || _restData$hospital2$a2 === void 0 ? void 0 : _restData$hospital2$a2.geogLevelName) || "";
13859
+ allCities.add(city);
13672
13860
  var info = {
13673
13861
  clinicId: (restData === null || restData === void 0 ? void 0 : (_restData$locationID = restData.locationID) === null || _restData$locationID === void 0 ? void 0 : _restData$locationID.id) || 0,
13674
13862
  id: id,
@@ -13683,6 +13871,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13683
13871
  hospitalName: "",
13684
13872
  hospitalLocation: "",
13685
13873
  kms: "0 Kms",
13874
+ city: city,
13686
13875
  weekCalendar: payload.date && payload.date * 1000 || Date.now(),
13687
13876
  isAllSession: isClinic,
13688
13877
  allSession: allSession,
@@ -13696,15 +13885,15 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13696
13885
  resourceInfo: resourceInfo,
13697
13886
  specialities: [],
13698
13887
  healthCareId: healthCareId,
13699
- orgId: isClinic ? id : restData === null || restData === void 0 ? void 0 : (_restData$hospital2 = restData.hospital) === null || _restData$hospital2 === void 0 ? void 0 : _restData$hospital2.id,
13700
- orgType: isClinic ? OrgType === null || OrgType === void 0 ? void 0 : (_OrgType$ = OrgType[0]) === null || _OrgType$ === void 0 ? void 0 : _OrgType$._id : restData === null || restData === void 0 ? void 0 : (_restData$hospital3 = restData.hospital) === null || _restData$hospital3 === void 0 ? void 0 : (_restData$hospital3$O = _restData$hospital3.OrgType) === null || _restData$hospital3$O === void 0 ? void 0 : _restData$hospital3$O[0],
13701
- org_Id: isClinic ? _id : restData === null || restData === void 0 ? void 0 : (_restData$hospital4 = restData.hospital) === null || _restData$hospital4 === void 0 ? void 0 : _restData$hospital4._id,
13888
+ orgId: isClinic ? id : restData === null || restData === void 0 ? void 0 : (_restData$hospital3 = restData.hospital) === null || _restData$hospital3 === void 0 ? void 0 : _restData$hospital3.id,
13889
+ orgType: isClinic ? OrgType === null || OrgType === void 0 ? void 0 : (_OrgType$ = OrgType[0]) === null || _OrgType$ === void 0 ? void 0 : _OrgType$._id : restData === null || restData === void 0 ? void 0 : (_restData$hospital4 = restData.hospital) === null || _restData$hospital4 === void 0 ? void 0 : (_restData$hospital4$O = _restData$hospital4.OrgType) === null || _restData$hospital4$O === void 0 ? void 0 : _restData$hospital4$O[0],
13890
+ org_Id: isClinic ? _id : restData === null || restData === void 0 ? void 0 : (_restData$hospital5 = restData.hospital) === null || _restData$hospital5 === void 0 ? void 0 : _restData$hospital5._id,
13702
13891
  _id: isClinic ? _id : restData === null || restData === void 0 ? void 0 : restData._id,
13703
13892
  _key: restData === null || restData === void 0 ? void 0 : restData._key
13704
13893
  };
13705
13894
 
13706
13895
  if (isClinic) {
13707
- var _restData$clinics5, _restData$clinics5$, _s$Type, _restData$locationID2, _restData$address, _restData$address$, _restData$address2, _restData$address2$, _restData$Practitione, _restData$address3, _restData$address3$, _restData$locationID3, _restData$locationID4, _restData$locationID5;
13896
+ var _restData$clinics5, _restData$clinics5$, _s$Type, _restData$locationID2, _restData$address2, _restData$address2$, _restData$address3, _restData$address3$, _restData$Practitione, _restData$address4, _restData$address4$, _restData$locationID3, _restData$locationID4, _restData$locationID5;
13708
13897
 
13709
13898
  var s = restData === null || restData === void 0 ? void 0 : (_restData$clinics5 = restData.clinics) === null || _restData$clinics5 === void 0 ? void 0 : (_restData$clinics5$ = _restData$clinics5[0]) === null || _restData$clinics5$ === void 0 ? void 0 : _restData$clinics5$.Specialties;
13710
13899
 
@@ -13725,8 +13914,8 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13725
13914
 
13726
13915
  info["name"] = (restData === null || restData === void 0 ? void 0 : (_restData$locationID2 = restData.locationID) === null || _restData$locationID2 === void 0 ? void 0 : _restData$locationID2.shortdesc) || "";
13727
13916
  info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : restData.name) || "";
13728
- info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address = restData.address) === null || _restData$address === void 0 ? void 0 : (_restData$address$ = _restData$address[0]) === null || _restData$address$ === void 0 ? void 0 : _restData$address$.line) || "";
13729
- info["title"] = (restData === null || restData === void 0 ? void 0 : (_restData$address2 = restData.address) === null || _restData$address2 === void 0 ? void 0 : (_restData$address2$ = _restData$address2[0]) === null || _restData$address2$ === void 0 ? void 0 : _restData$address2$.line) || "";
13917
+ info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address2 = restData.address) === null || _restData$address2 === void 0 ? void 0 : (_restData$address2$ = _restData$address2[0]) === null || _restData$address2$ === void 0 ? void 0 : _restData$address2$.line) || "";
13918
+ info["title"] = (restData === null || restData === void 0 ? void 0 : (_restData$address3 = restData.address) === null || _restData$address3 === void 0 ? void 0 : (_restData$address3$ = _restData$address3[0]) === null || _restData$address3$ === void 0 ? void 0 : _restData$address3$.line) || "";
13730
13919
  info["gender"] = null;
13731
13920
  info["memberIncludes"] = restData === null || restData === void 0 ? void 0 : restData.member_count;
13732
13921
  info["memberIncludesImg"] = restData === null || restData === void 0 ? void 0 : (_restData$Practitione = restData.Practitioner) === null || _restData$Practitione === void 0 ? void 0 : _restData$Practitione.map(function (p) {
@@ -13738,11 +13927,11 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13738
13927
 
13739
13928
  return "";
13740
13929
  });
13741
- info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address3 = restData.address) === null || _restData$address3 === void 0 ? void 0 : (_restData$address3$ = _restData$address3[0]) === null || _restData$address3$ === void 0 ? void 0 : _restData$address3$.distance) ? "".concat(restData.address[0].distance) : "0";
13930
+ info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address4 = restData.address) === null || _restData$address4 === void 0 ? void 0 : (_restData$address4$ = _restData$address4[0]) === null || _restData$address4$ === void 0 ? void 0 : _restData$address4$.distance) ? "".concat(restData.address[0].distance) : "0";
13742
13931
  info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
13743
13932
  info["img"] = getImgUrl(restData === null || restData === void 0 ? void 0 : (_restData$locationID3 = restData.locationID) === null || _restData$locationID3 === void 0 ? void 0 : (_restData$locationID4 = _restData$locationID3.photo) === null || _restData$locationID4 === void 0 ? void 0 : (_restData$locationID5 = _restData$locationID4[0]) === null || _restData$locationID5 === void 0 ? void 0 : _restData$locationID5.fileid);
13744
13933
  } else {
13745
- var _restData$gender, _restData$gender$codi, _restData$gender$codi2, _restData$Specialties, _restData$communicati, _restData$hospital5, _restData$qualificati, _restData$qualificati2, _restData$qualificati3, _restData$hospital6, _restData$address4, _restData$address4$, _restData$name, _restData$photo, _restData$photo$, _restData$address5, _restData$address5$;
13934
+ var _restData$gender, _restData$gender$codi, _restData$gender$codi2, _restData$Specialties, _restData$communicati, _restData$hospital6, _restData$qualificati, _restData$qualificati2, _restData$qualificati3, _restData$hospital7, _restData$address5, _restData$address5$, _restData$name, _restData$photo, _restData$photo$, _restData$address6, _restData$address6$;
13746
13935
 
13747
13936
  var gender = (restData === null || restData === void 0 ? void 0 : (_restData$gender = restData.gender) === null || _restData$gender === void 0 ? void 0 : (_restData$gender$codi = _restData$gender.coding) === null || _restData$gender$codi === void 0 ? void 0 : (_restData$gender$codi2 = _restData$gender$codi[0]) === null || _restData$gender$codi2 === void 0 ? void 0 : _restData$gender$codi2.display) || "";
13748
13937
  var designation = "";
@@ -13782,17 +13971,17 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13782
13971
  });
13783
13972
  info["title"] = "".concat(gender).concat(gender && " | ").concat(designation);
13784
13973
  info["gender"] = gender;
13785
- info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital5 = restData.hospital) === null || _restData$hospital5 === void 0 ? void 0 : _restData$hospital5.id;
13974
+ info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : _restData$hospital6.id;
13786
13975
  info["subtext"] = (restData === null || restData === void 0 ? void 0 : (_restData$qualificati = restData.qualification) === null || _restData$qualificati === void 0 ? void 0 : (_restData$qualificati2 = _restData$qualificati.map) === null || _restData$qualificati2 === void 0 ? void 0 : (_restData$qualificati3 = _restData$qualificati2.call(_restData$qualificati, function (q) {
13787
13976
  return (q === null || q === void 0 ? void 0 : q.name) || "";
13788
13977
  })) === null || _restData$qualificati3 === void 0 ? void 0 : _restData$qualificati3.join(", ")) || "MBBS";
13789
13978
  info["language"] = languages.size > 0 ? _toConsumableArray(languages) : [];
13790
- info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : _restData$hospital6.name) || "";
13791
- info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address4 = restData.address) === null || _restData$address4 === void 0 ? void 0 : (_restData$address4$ = _restData$address4[0]) === null || _restData$address4$ === void 0 ? void 0 : _restData$address4$.line) || "";
13979
+ info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital7 = restData.hospital) === null || _restData$hospital7 === void 0 ? void 0 : _restData$hospital7.name) || "";
13980
+ info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address5 = restData.address) === null || _restData$address5 === void 0 ? void 0 : (_restData$address5$ = _restData$address5[0]) === null || _restData$address5$ === void 0 ? void 0 : _restData$address5$.line) || "";
13792
13981
  var nameObj = (restData === null || restData === void 0 ? void 0 : (_restData$name = restData.name) === null || _restData$name === void 0 ? void 0 : _restData$name[0]) || {};
13793
13982
  info["name"] = makeName(nameObj);
13794
13983
  info["img"] = getImgUrl(restData === null || restData === void 0 ? void 0 : (_restData$photo = restData.photo) === null || _restData$photo === void 0 ? void 0 : (_restData$photo$ = _restData$photo[0]) === null || _restData$photo$ === void 0 ? void 0 : _restData$photo$.fileid);
13795
- info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address5 = restData.address) === null || _restData$address5 === void 0 ? void 0 : (_restData$address5$ = _restData$address5[0]) === null || _restData$address5$ === void 0 ? void 0 : _restData$address5$.distance) ? "".concat(restData.address[0].distance) : "0";
13984
+ info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address6 = restData.address) === null || _restData$address6 === void 0 ? void 0 : (_restData$address6$ = _restData$address6[0]) === null || _restData$address6$ === void 0 ? void 0 : _restData$address6$.distance) ? "".concat(restData.address[0].distance) : "0";
13796
13985
  info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
13797
13986
  }
13798
13987
 
@@ -13802,25 +13991,56 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13802
13991
  });
13803
13992
  }
13804
13993
 
13805
- return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
13994
+ _context2.next = 19;
13995
+ return getCurrentPosition();
13996
+
13997
+ case 19:
13998
+ _yield$getCurrentPosi = _context2.sent;
13999
+ myLat = _yield$getCurrentPosi.lat;
14000
+ myLong = _yield$getCurrentPosi["long"];
14001
+ locationInfo = {};
14002
+
14003
+ if (!(myLat && myLong)) {
14004
+ _context2.next = 28;
14005
+ break;
14006
+ }
14007
+
14008
+ promArr = _toConsumableArray(allCities).filter(function (c) {
14009
+ return !!c;
14010
+ }).map(function (city) {
14011
+ return getLocationInfo$1({
14012
+ lat: myLat,
14013
+ "long": myLong
14014
+ }, city, locationInfo);
14015
+ });
14016
+ _context2.next = 27;
14017
+ return es6Promise.Promise.all(promArr);
14018
+
14019
+ case 27:
14020
+ returnData.forEach(function (d) {
14021
+ d.kms = locationInfo[d.city] || "0 Kms";
14022
+ });
14023
+
14024
+ case 28:
14025
+ return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
13806
14026
  data: returnData,
13807
14027
  allLangs: _toConsumableArray(allLangs)
13808
14028
  }));
13809
14029
 
13810
- case 19:
13811
- _context.prev = 19;
13812
- _context.t0 = _context["catch"](2);
13813
- console.log(_context.t0);
13814
- return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
13815
- message: _context.t0.message
14030
+ case 31:
14031
+ _context2.prev = 31;
14032
+ _context2.t0 = _context2["catch"](2);
14033
+ console.log(_context2.t0);
14034
+ return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
14035
+ message: _context2.t0.message
13816
14036
  })));
13817
14037
 
13818
- case 23:
14038
+ case 35:
13819
14039
  case "end":
13820
- return _context.stop();
14040
+ return _context2.stop();
13821
14041
  }
13822
14042
  }
13823
- }, _callee, null, [[2, 19]]);
14043
+ }, _callee2, null, [[2, 31]]);
13824
14044
  }))); // end
13825
14045
  // FUZZY SEARCH CREATE INITIALSTATE
13826
14046
 
@@ -14105,6 +14325,9 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
14105
14325
  location,
14106
14326
  body,
14107
14327
  data,
14328
+ _yield$getCurrentPosi,
14329
+ lat,
14330
+ _long,
14108
14331
  returnData,
14109
14332
  _args4 = arguments;
14110
14333
 
@@ -14115,7 +14338,7 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
14115
14338
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
14116
14339
  _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
14117
14340
  _context4.prev = 2;
14118
- _payload$city2 = payload.city, city = _payload$city2 === void 0 ? "" : _payload$city2, _payload$location = payload.location, location = _payload$location === void 0 ? "" : _payload$location;
14341
+ _payload$city2 = payload.city, city = _payload$city2 === void 0 ? "" : _payload$city2, _payload$location = payload.location, location = _payload$location === void 0 ? {} : _payload$location;
14119
14342
  body = {
14120
14343
  db_name: dbName,
14121
14344
  queryid: query_ids["searhcApiSlice/getHospitals"],
@@ -14133,6 +14356,13 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
14133
14356
 
14134
14357
  case 7:
14135
14358
  data = _context4.sent;
14359
+ _context4.next = 10;
14360
+ return getCurrentPosition();
14361
+
14362
+ case 10:
14363
+ _yield$getCurrentPosi = _context4.sent;
14364
+ lat = _yield$getCurrentPosi.lat;
14365
+ _long = _yield$getCurrentPosi["long"];
14136
14366
  returnData = [];
14137
14367
 
14138
14368
  if (Array.isArray(data)) {
@@ -14140,11 +14370,18 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
14140
14370
  if (hospInfo.id && hospInfo.name) {
14141
14371
  var _hospInfo$address, _hospInfo$address2;
14142
14372
 
14373
+ var distance = "";
14374
+
14375
+ if (lat && _long) {
14376
+ distance = getDisctanceFromLatLonInKm(lat, _long, location.latitude, location.longitude) + " KM";
14377
+ }
14378
+
14143
14379
  returnData.push({
14144
14380
  value: hospInfo.id,
14145
14381
  label: hospInfo.name,
14146
14382
  lat: hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address = hospInfo.address) === null || _hospInfo$address === void 0 ? void 0 : _hospInfo$address.latitude,
14147
- "long": hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address2 = hospInfo.address) === null || _hospInfo$address2 === void 0 ? void 0 : _hospInfo$address2.longitude
14383
+ "long": hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address2 = hospInfo.address) === null || _hospInfo$address2 === void 0 ? void 0 : _hospInfo$address2.longitude,
14384
+ distance: distance
14148
14385
  });
14149
14386
  }
14150
14387
  });
@@ -14154,19 +14391,19 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
14154
14391
  data: returnData
14155
14392
  }));
14156
14393
 
14157
- case 13:
14158
- _context4.prev = 13;
14394
+ case 18:
14395
+ _context4.prev = 18;
14159
14396
  _context4.t0 = _context4["catch"](2);
14160
14397
  return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
14161
14398
  message: _context4.t0.message
14162
14399
  })));
14163
14400
 
14164
- case 16:
14401
+ case 21:
14165
14402
  case "end":
14166
14403
  return _context4.stop();
14167
14404
  }
14168
14405
  }
14169
- }, _callee4, null, [[2, 13]]);
14406
+ }, _callee4, null, [[2, 18]]);
14170
14407
  })));
14171
14408
  var GET_SYMPTOMS = createAsyncThunk("searhcApiSlice/getSymptoms", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
14172
14409
  var payload,
@@ -14552,26 +14789,82 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
14552
14789
  }
14553
14790
  }, _callee10, null, [[2, 12]]);
14554
14791
  })));
14555
- var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
14792
+
14793
+ var getLocationInfo = /*#__PURE__*/function () {
14794
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
14795
+ var _hospInfo$address3, _hospInfo$address3$, _hospInfo$address3$$c;
14796
+
14797
+ var hospInfo,
14798
+ obj,
14799
+ city,
14800
+ info,
14801
+ _args11 = arguments;
14802
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
14803
+ while (1) {
14804
+ switch (_context11.prev = _context11.next) {
14805
+ case 0:
14806
+ hospInfo = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
14807
+ obj = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
14808
+ city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address3 = hospInfo.address) === null || _hospInfo$address3 === void 0 ? void 0 : (_hospInfo$address3$ = _hospInfo$address3[0]) === null || _hospInfo$address3$ === void 0 ? void 0 : (_hospInfo$address3$$c = _hospInfo$address3$.city) === null || _hospInfo$address3$$c === void 0 ? void 0 : _hospInfo$address3$$c.geogLevelName;
14809
+
14810
+ if (obj[city]) {
14811
+ _context11.next = 8;
14812
+ break;
14813
+ }
14814
+
14815
+ _context11.next = 6;
14816
+ return getLatLong(city);
14817
+
14818
+ case 6:
14819
+ info = _context11.sent;
14820
+ obj[city] = info;
14821
+
14822
+ case 8:
14823
+ case "end":
14824
+ return _context11.stop();
14825
+ }
14826
+ }
14827
+ }, _callee11);
14828
+ }));
14829
+
14830
+ return function getLocationInfo() {
14831
+ return _ref21.apply(this, arguments);
14832
+ };
14833
+ }();
14834
+
14835
+ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
14556
14836
  var payload,
14557
- _ref22,
14837
+ _ref23,
14558
14838
  rejectWithValue,
14559
14839
  _payload$practitioner,
14560
14840
  practitionerId,
14841
+ _yield$getCurrentPosi2,
14842
+ myLat,
14843
+ myLong,
14561
14844
  body,
14562
14845
  data,
14563
14846
  returnData,
14564
14847
  _data$result,
14565
- _args11 = arguments;
14848
+ _data$result2,
14849
+ cityMap,
14850
+ promArr,
14851
+ _args12 = arguments;
14566
14852
 
14567
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
14853
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
14568
14854
  while (1) {
14569
- switch (_context11.prev = _context11.next) {
14855
+ switch (_context12.prev = _context12.next) {
14570
14856
  case 0:
14571
- payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
14572
- _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
14573
- _context11.prev = 2;
14857
+ payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
14858
+ _ref23 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
14859
+ _context12.prev = 2;
14574
14860
  _payload$practitioner = payload.practitionerId, practitionerId = _payload$practitioner === void 0 ? "" : _payload$practitioner;
14861
+ _context12.next = 6;
14862
+ return getCurrentPosition();
14863
+
14864
+ case 6:
14865
+ _yield$getCurrentPosi2 = _context12.sent;
14866
+ myLat = _yield$getCurrentPosi2.lat;
14867
+ myLong = _yield$getCurrentPosi2["long"];
14575
14868
  body = {
14576
14869
  db_name: dbName,
14577
14870
  entity: "Practitioner,Organization",
@@ -14579,45 +14872,72 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
14579
14872
  Practitioner: "Practitioner.id==".concat(practitionerId),
14580
14873
  Organization: "document(Practitioner.practitioner_role)[*].OrgID any == Organization._id"
14581
14874
  },
14582
- return_fields: "{OrganizationName:Organization.name, OrgID:Organization.id}"
14875
+ return_fields: "{address: (let add = Document(Organization.address[0]) return merge(add, { city: Document(add.city) })), OrganizationName:Organization.name, OrgID:Organization.id}"
14583
14876
  };
14584
- _context11.next = 7;
14877
+ _context12.next = 12;
14585
14878
  return fetchData$3({
14586
14879
  body: JSON.stringify(body)
14587
14880
  }, __readDocumentUrl__);
14588
14881
 
14589
- case 7:
14590
- data = _context11.sent;
14882
+ case 12:
14883
+ data = _context12.sent;
14591
14884
  returnData = [];
14592
14885
 
14593
- if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
14594
- data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.forEach(function (hospInfo) {
14595
- returnData.push({
14596
- value: hospInfo.OrgID,
14597
- label: hospInfo.OrganizationName,
14598
- lat: 0,
14599
- "long": 0
14600
- });
14601
- });
14886
+ if (!Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
14887
+ _context12.next = 20;
14888
+ break;
14602
14889
  }
14603
14890
 
14604
- return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
14891
+ cityMap = {};
14892
+ promArr = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (hospInfo) {
14893
+ return getLocationInfo(hospInfo, cityMap);
14894
+ });
14895
+ _context12.next = 19;
14896
+ return es6Promise.Promise.all(promArr);
14897
+
14898
+ case 19:
14899
+ data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2.forEach(function (hospInfo) {
14900
+ var _hospInfo$address4, _hospInfo$address4$, _hospInfo$address4$$c;
14901
+
14902
+ var city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address4 = hospInfo.address) === null || _hospInfo$address4 === void 0 ? void 0 : (_hospInfo$address4$ = _hospInfo$address4[0]) === null || _hospInfo$address4$ === void 0 ? void 0 : (_hospInfo$address4$$c = _hospInfo$address4$.city) === null || _hospInfo$address4$$c === void 0 ? void 0 : _hospInfo$address4$$c.geogLevelName;
14903
+
14904
+ var _ref24 = cityMap[city] || {},
14905
+ lat = _ref24.lat,
14906
+ _long2 = _ref24["long"];
14907
+
14908
+ var distance = "";
14909
+
14910
+ if (myLat && myLong && lat && _long2) {
14911
+ distance = getDisctanceFromLatLonInKm(lat, _long2, myLat, myLong) + " KM";
14912
+ }
14913
+
14914
+ returnData.push({
14915
+ value: hospInfo.OrgID,
14916
+ label: hospInfo.OrganizationName,
14917
+ lat: 0,
14918
+ "long": 0,
14919
+ distance: distance
14920
+ });
14921
+ });
14922
+
14923
+ case 20:
14924
+ return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
14605
14925
  data: returnData
14606
14926
  }));
14607
14927
 
14608
- case 13:
14609
- _context11.prev = 13;
14610
- _context11.t0 = _context11["catch"](2);
14611
- return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
14612
- message: _context11.t0.message
14928
+ case 23:
14929
+ _context12.prev = 23;
14930
+ _context12.t0 = _context12["catch"](2);
14931
+ return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
14932
+ message: _context12.t0.message
14613
14933
  })));
14614
14934
 
14615
- case 16:
14935
+ case 26:
14616
14936
  case "end":
14617
- return _context11.stop();
14937
+ return _context12.stop();
14618
14938
  }
14619
14939
  }
14620
- }, _callee11, null, [[2, 13]]);
14940
+ }, _callee12, null, [[2, 23]]);
14621
14941
  })));
14622
14942
  var searhcApiSlice = createSlice({
14623
14943
  name: "searhcApiSlice",
@@ -18302,7 +18622,7 @@ var dashboardQuery = {
18302
18622
  entity: "Appointment,Encounter",
18303
18623
  filter: {
18304
18624
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
18305
- Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Checked-in'")
18625
+ Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
18306
18626
  },
18307
18627
  return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
18308
18628
  },
@@ -18311,7 +18631,7 @@ var dashboardQuery = {
18311
18631
  entity: "Appointment,Encounter",
18312
18632
  filter: {
18313
18633
  Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(start, " && Appointment.end<=").concat(end),
18314
- Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id && DOCUMENT(Encounter.statushistory[*].status)[*].display ANY =='Checked-in'")
18634
+ Encounter: "Encounter._key=='".concat(encounterKey, "' && Encounter.activestatus==true && Encounter.appointmentId[*] any == Appointment.id AND (lower(DOCUMENT(Encounter.status).display)==lower('Checked-in') or lower(DOCUMENT(Encounter.status).display)==lower('Triage In-Progress'))")
18315
18635
  },
18316
18636
  return_fields: "{Appointment:merge(keep(Appointment,'_id','_key','id','alias','start','appno','appointmentReason','consultationMode','SpecialtyID'),{SpecialtyID:(for c in CodeableConceptMaster filter c.id in Appointment.SpecialtyID return merge(c,{coding:document(c.coding)}))}),Encounter:merge(keep(Encounter,'_id','_key','id','encounter_no','visit_type','status','patient_id','participant','encounterdate','participantHistory','practitioner_details','reasonCode','reasonReference'),{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age,photo:document(pat.photo)})),status:document(Encounter.status)},{practitioner_details:(for pd in Encounter.practitioner_details return merge(pd,{speciality:(for cdd in CodeableConceptMaster filter cdd._id == pd.speciality return merge(cdd,{coding: document(cdd.coding)}))}))},{participant:(for par in Encounter.participant return merge(par,{Practitioner_id:(for prac in Practitioner filter prac.id == par.Practitioner_id return merge(keep(prac,'_id','_key','id','name','practitioner_role','practitioner_type'),{name:(for hnm in HumanNameMaster filter hnm._id in prac.name return merge(hnm,{use:(for cod in CodeableConceptMaster filter cod._id==hnm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id==hnm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id==hnm.suffix return document(cod.coding))}))},{practitioner_type:(for cod in CodeableConceptMaster filter cod._id ==par.practitioner_type return document(cod.coding) )},{practitioner_role:(for prcrole in PractitionerRole filter prcrole._id in prac.practitioner_role return merge(prcrole,{role:(for cd in CodeableConceptMaster filter cd._id==prcrole.role return merge(cd,{coding: document(cd.coding)}))},{SpecialtyID:(for cdd in CodeableConceptMaster filter cdd._id == prcrole.SpecialtyID return merge(cdd, {coding:document(cdd.coding)}))}))}))},{type:document(par.type)},{PractitionerRole_id:(for prid in PractitionerRole filter prid.id==par.PractitionerRole_id return merge(prid,{role:document(prid.role)}))}))},{reasonReference:document(Encounter.reasonReference)},{participantHistory:(for phy in to_array (Encounter.participantHistory) return merge(phy,{specialty:(for spe in Specialty filter spe._id == phy.specialty return merge(spe,{facilities:document(spe.facilities)}))},{practitionerId:keep(document(phy.practitionerId),'_id','_key','id','name')},{practroleId:document(phy.practroleId)},{participantType:document(phy.participantType)}))})}"
18317
18637
  }
@@ -18561,7 +18881,7 @@ var highPriorityPatientQuery = {
18561
18881
  1: {
18562
18882
  db_name: "primarycare",
18563
18883
  entity: "Encounter",
18564
- filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high'"),
18884
+ filter: "Encounter.participant[*].Practitioner_id ANY ==".concat(practionerId, " AND Encounter.encounterdate>=").concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " AND lower(DOCUMENT(Encounter.priority).display)=='high' AND (lower(DOCUMENT(Encounter.status).display)==lower('Triaged') or lower(DOCUMENT(Encounter.status).display)==lower('In-progress'))"),
18565
18885
  return_fields: "MERGE(Encounter,{patient_id:(FOR pat IN Patient FILTER pat.id==Encounter.patient_id RETURN MERGE(pat,{name:(FOR hn IN TO_ARRAY(pat.name) RETURN DOCUMENT(hn)),photo:(FOR ph IN TO_ARRAY(pat.photo) RETURN DOCUMENT(ph))})),priority:DOCUMENT(Encounter.priority),priorityreason:DOCUMENT(Encounter.priorityreason)},{appointmentId:(for app in Appointment filter app.id in Encounter.appointmentId return app)},{reasonReference:document(Encounter.reasonReference)})"
18566
18886
  },
18567
18887
  2: {
@@ -37437,7 +37757,7 @@ var query$4 = {
37437
37757
  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
37758
  Encounter: "Appointment.id in Encounter.appointmentId"
37439
37759
  },
37440
- return_fields: "merge(Encounter,{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)}))})"
37760
+ 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
37761
  };
37442
37762
  },
37443
37763
  getFirstVisitsNurse: function getFirstVisitsNurse(data) {
@@ -37449,7 +37769,7 @@ var query$4 = {
37449
37769
  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
37770
  Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
37451
37771
  },
37452
- return_fields: "merge(Encounter,{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)}))})"
37772
+ 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
37773
  };
37454
37774
  },
37455
37775
  getNewPatientsNurse: function getNewPatientsNurse(data) {
@@ -37461,7 +37781,7 @@ var query$4 = {
37461
37781
  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
37782
  Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
37463
37783
  },
37464
- return_fields: "merge(Encounter,{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)}))})"
37784
+ 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
37785
  };
37466
37786
  },
37467
37787
  getOtherVisitsNurse: function getOtherVisitsNurse(data) {
@@ -37473,7 +37793,7 @@ var query$4 = {
37473
37793
  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
37794
  Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
37475
37795
  },
37476
- return_fields: "merge(Encounter,{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)}))})"
37796
+ 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
37797
  };
37478
37798
  },
37479
37799
  getTodayVisitsNurse: function getTodayVisitsNurse(data) {
@@ -37484,7 +37804,7 @@ var query$4 = {
37484
37804
  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
37805
  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
37806
  },
37487
- 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)}))}))})"
37807
+ 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
37808
  };
37489
37809
  },
37490
37810
  getWalkInsNurse: function getWalkInsNurse(data) {
@@ -37496,7 +37816,7 @@ var query$4 = {
37496
37816
  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
37817
  Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
37498
37818
  },
37499
- return_fields: "merge(Encounter,{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)}))})"
37819
+ 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
37820
  };
37501
37821
  },
37502
37822
  //Doctor
@@ -37991,12 +38311,13 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
37991
38311
  case 5:
37992
38312
  data = _context7.sent;
37993
38313
  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 (_) {
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$, _$appointmentId3, _$appointmentId3$, _$appointmentId4, _$appointmentId4$, _$appointmentId5, _$appointmentId5$, _$appointmentId6, _$appointmentId6$, _$appointmentId7, _$appointmentId7$, _$visit_type, _$appointmentId8, _$appointmentId8$, _$appointmentId8$$Spe, _$practitioner_detail, _$practitioner_detail2, _$status;
38314
+ 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;
37995
38315
 
37996
38316
  return {
37997
38317
  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
38318
  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
38319
  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) || "",
38320
+ 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,
38000
38321
  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) || "",
38001
38322
  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") : "",
38002
38323
  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") : "",
@@ -38054,12 +38375,13 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
38054
38375
  case 5:
38055
38376
  data = _context8.sent;
38056
38377
  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 (_) {
38057
- var _$appointmentId9, _$appointmentId9$, _$appointmentId9$$Per, _$appointmentId9$$Per2, _$appointmentId9$$Per3, _$appointmentId9$$Per4, _$appointmentId10, _$appointmentId10$, _$appointmentId10$$Pe, _$appointmentId10$$Pe2, _$appointmentId10$$Pe3, _$appointmentId10$$Pe4, _$patient_id3, _$patient_id3$, _$patient_id3$$name, _$patient_id4, _$patient_id4$, _$appointmentId11, _$appointmentId11$, _$appointmentId12, _$appointmentId12$, _$appointmentId13, _$appointmentId13$, _$appointmentId14, _$appointmentId14$, _$appointmentId15, _$appointmentId15$, _$visit_type2, _$appointmentId16, _$appointmentId16$, _$appointmentId16$$Sp, _$practitioner_detail3, _$practitioner_detail4, _$status2;
38378
+ 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;
38058
38379
 
38059
38380
  return {
38060
38381
  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",
38061
- name: makeName((_ === 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$$name = _$patient_id3$.name) === null || _$patient_id3$$name === void 0 ? void 0 : _$patient_id3$$name[0]) || {}),
38062
- mrn: (_ === 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$.alias) || "",
38382
+ 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]) || {}),
38383
+ 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) || "",
38384
+ 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,
38063
38385
  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) || "",
38064
38386
  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") : "",
38065
38387
  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") : "",
@@ -38117,12 +38439,13 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
38117
38439
  case 5:
38118
38440
  data = _context9.sent;
38119
38441
  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 (_) {
38120
- var _$appointmentId17, _$appointmentId17$, _$appointmentId17$$Pe, _$appointmentId17$$Pe2, _$appointmentId17$$Pe3, _$appointmentId17$$Pe4, _$appointmentId18, _$appointmentId18$, _$appointmentId18$$Pe, _$appointmentId18$$Pe2, _$appointmentId18$$Pe3, _$appointmentId18$$Pe4, _$patient_id5, _$patient_id5$, _$patient_id5$$name, _$patient_id6, _$patient_id6$, _$appointmentId19, _$appointmentId19$, _$appointmentId20, _$appointmentId20$, _$appointmentId21, _$appointmentId21$, _$appointmentId22, _$appointmentId22$, _$appointmentId23, _$appointmentId23$, _$visit_type3, _$appointmentId24, _$appointmentId24$, _$appointmentId24$$Sp, _$practitioner_detail5, _$practitioner_detail6, _$status3;
38442
+ 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;
38121
38443
 
38122
38444
  return {
38123
38445
  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",
38124
- 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]) || {}),
38125
- 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$.alias) || "",
38446
+ 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]) || {}),
38447
+ 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) || "",
38448
+ 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,
38126
38449
  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) || "",
38127
38450
  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") : "",
38128
38451
  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") : "",
@@ -38180,12 +38503,13 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
38180
38503
  case 5:
38181
38504
  data = _context10.sent;
38182
38505
  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 (_) {
38183
- var _$appointmentId25, _$appointmentId25$, _$appointmentId25$$Pe, _$appointmentId25$$Pe2, _$appointmentId25$$Pe3, _$appointmentId25$$Pe4, _$appointmentId26, _$appointmentId26$, _$appointmentId26$$Pe, _$appointmentId26$$Pe2, _$appointmentId26$$Pe3, _$appointmentId26$$Pe4, _$patient_id7, _$patient_id7$, _$patient_id7$$name, _$patient_id8, _$patient_id8$, _$appointmentId27, _$appointmentId27$, _$appointmentId28, _$appointmentId28$, _$appointmentId29, _$appointmentId29$, _$appointmentId30, _$appointmentId30$, _$appointmentId31, _$appointmentId31$, _$visit_type4, _$appointmentId32, _$appointmentId32$, _$appointmentId32$$Sp, _$practitioner_detail7, _$practitioner_detail8, _$status4;
38506
+ 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;
38184
38507
 
38185
38508
  return {
38186
38509
  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",
38187
- 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]) || {}),
38188
- 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) || "",
38510
+ 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]) || {}),
38511
+ 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) || "",
38512
+ 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,
38189
38513
  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) || "",
38190
38514
  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") : "",
38191
38515
  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") : "",
@@ -38243,13 +38567,13 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38243
38567
  case 5:
38244
38568
  data = _context11.sent;
38245
38569
  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 (_) {
38246
- var _$appointmentId33, _$appointmentId33$, _$appointmentId33$$Pe, _$appointmentId33$$Pe2, _$appointmentId33$$Pe3, _$appointmentId34, _$appointmentId34$, _$appointmentId34$$Pe, _$appointmentId34$$Pe2, _$appointmentId34$$Pe3, _$patient_id9, _$patient_id9$, _$patient_id9$$name, _$patient_id10, _$patient_id10$, _$patient_id11, _$patient_id11$, _$appointmentId35, _$appointmentId35$, _$appointmentId36, _$appointmentId36$, _$appointmentId37, _$appointmentId37$, _$appointmentId38, _$appointmentId38$, _$appointmentId39, _$appointmentId39$, _$appointmentId39$$Sp, _$patient_id12, _$patient_id12$, _$patient_id12$$telec, _$patient_id12$$telec2, _$status5;
38570
+ 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;
38247
38571
 
38248
38572
  return {
38249
38573
  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",
38250
- 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]) || {}),
38251
- 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,
38252
- 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,
38574
+ 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]) || {}),
38575
+ 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,
38576
+ 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,
38253
38577
  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") : "",
38254
38578
  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") : "",
38255
38579
  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) {
@@ -38258,7 +38582,7 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
38258
38582
  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;
38259
38583
  }).join(", "),
38260
38584
  ward: "Ward 1",
38261
- 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),
38585
+ 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),
38262
38586
  visittype: (_ === null || _ === void 0 ? void 0 : _.visit_type) || "",
38263
38587
  encounterStatus: _ === null || _ === void 0 ? void 0 : (_$status5 = _.status) === null || _$status5 === void 0 ? void 0 : _$status5.display,
38264
38588
  view: true
@@ -38306,12 +38630,13 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
38306
38630
  case 5:
38307
38631
  data = _context12.sent;
38308
38632
  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 (_) {
38309
- var _$appointmentId40, _$appointmentId40$, _$appointmentId40$$Pe, _$appointmentId40$$Pe2, _$appointmentId40$$Pe3, _$appointmentId40$$Pe4, _$appointmentId41, _$appointmentId41$, _$appointmentId41$$Pe, _$appointmentId41$$Pe2, _$appointmentId41$$Pe3, _$appointmentId41$$Pe4, _$patient_id13, _$patient_id13$, _$patient_id13$$name, _$patient_id14, _$patient_id14$, _$appointmentId42, _$appointmentId42$, _$appointmentId43, _$appointmentId43$, _$appointmentId44, _$appointmentId44$, _$appointmentId45, _$appointmentId45$, _$appointmentId46, _$appointmentId46$, _$visit_type5, _$appointmentId47, _$appointmentId47$, _$appointmentId47$$Sp, _$practitioner_detail9, _$practitioner_detail10, _$status6;
38633
+ 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;
38310
38634
 
38311
38635
  return {
38312
38636
  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",
38313
- 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]) || {}),
38314
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id14 = _.patient_id) === null || _$patient_id14 === void 0 ? void 0 : (_$patient_id14$ = _$patient_id14[0]) === null || _$patient_id14$ === void 0 ? void 0 : _$patient_id14$.alias) || "",
38637
+ 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]) || {}),
38638
+ 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) || "",
38639
+ 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,
38315
38640
  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) || "",
38316
38641
  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") : "",
38317
38642
  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") : "",
@@ -38370,12 +38695,12 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
38370
38695
  case 5:
38371
38696
  data = _context13.sent;
38372
38697
  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 (_) {
38373
- var _$appointmentId48, _$appointmentId48$, _$appointmentId48$$Pe, _$appointmentId48$$Pe2, _$appointmentId48$$Pe3, _$appointmentId48$$Pe4, _$appointmentId49, _$appointmentId49$, _$appointmentId49$$Pe, _$appointmentId49$$Pe2, _$appointmentId49$$Pe3, _$appointmentId49$$Pe4, _$patient_id15, _$patient_id15$, _$patient_id15$$name, _$patient_id16, _$patient_id16$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$appointmentId54, _$appointmentId54$, _$visit_type6, _$appointmentId55, _$appointmentId55$, _$appointmentId55$$Sp, _$practitioner_detail11, _$practitioner_detail12, _$status7;
38698
+ 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;
38374
38699
 
38375
38700
  return {
38376
38701
  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",
38377
- 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]) || {}),
38378
- 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) || "",
38702
+ 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]) || {}),
38703
+ 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) || "",
38379
38704
  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) || "",
38380
38705
  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") : "",
38381
38706
  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") : "",
@@ -38433,12 +38758,12 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
38433
38758
  case 5:
38434
38759
  data = _context14.sent;
38435
38760
  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 (_) {
38436
- var _$appointmentId56, _$appointmentId56$, _$appointmentId56$$Pe, _$appointmentId56$$Pe2, _$appointmentId56$$Pe3, _$appointmentId56$$Pe4, _$appointmentId57, _$appointmentId57$, _$appointmentId57$$Pe, _$appointmentId57$$Pe2, _$appointmentId57$$Pe3, _$appointmentId57$$Pe4, _$patient_id17, _$patient_id17$, _$patient_id17$$name, _$patient_id18, _$patient_id18$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$appointmentId60, _$appointmentId60$, _$appointmentId61, _$appointmentId61$, _$appointmentId62, _$appointmentId62$, _$visit_type7, _$appointmentId63, _$appointmentId63$, _$appointmentId63$$Sp, _$practitioner_detail13, _$practitioner_detail14, _$status8;
38761
+ 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;
38437
38762
 
38438
38763
  return {
38439
38764
  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",
38440
- 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]) || {}),
38441
- 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$.MRN) || "",
38765
+ 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]) || {}),
38766
+ 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) || "",
38442
38767
  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) || "",
38443
38768
  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") : "",
38444
38769
  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") : "",
@@ -38496,12 +38821,12 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
38496
38821
  case 5:
38497
38822
  data = _context15.sent;
38498
38823
  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 (_) {
38499
- var _$appointmentId64, _$appointmentId64$, _$appointmentId64$$Pe, _$appointmentId64$$Pe2, _$appointmentId64$$Pe3, _$appointmentId64$$Pe4, _$appointmentId65, _$appointmentId65$, _$appointmentId65$$Pe, _$appointmentId65$$Pe2, _$appointmentId65$$Pe3, _$appointmentId65$$Pe4, _$patient_id19, _$patient_id19$, _$patient_id19$$name, _$patient_id20, _$patient_id20$, _$appointmentId66, _$appointmentId66$, _$appointmentId67, _$appointmentId67$, _$appointmentId68, _$appointmentId68$, _$appointmentId69, _$appointmentId69$, _$appointmentId70, _$appointmentId70$, _$visit_type8, _$appointmentId71, _$appointmentId71$, _$appointmentId71$$Sp, _$practitioner_detail15, _$practitioner_detail16, _$status9;
38824
+ 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;
38500
38825
 
38501
38826
  return {
38502
38827
  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",
38503
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : (_$patient_id19$$name = _$patient_id19$.name) === null || _$patient_id19$$name === void 0 ? void 0 : _$patient_id19$$name[0]) || {}),
38504
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : (_$patient_id20$ = _$patient_id20[0]) === null || _$patient_id20$ === void 0 ? void 0 : _$patient_id20$.MRN) || "",
38828
+ 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]) || {}),
38829
+ 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) || "",
38505
38830
  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) || "",
38506
38831
  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") : "",
38507
38832
  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") : "",
@@ -38559,12 +38884,12 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
38559
38884
  case 5:
38560
38885
  data = _context16.sent;
38561
38886
  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 (_) {
38562
- var _$appointmentId72, _$appointmentId72$, _$appointmentId72$$Pe, _$appointmentId72$$Pe2, _$appointmentId72$$Pe3, _$appointmentId72$$Pe4, _$appointmentId73, _$appointmentId73$, _$appointmentId73$$Pe, _$appointmentId73$$Pe2, _$appointmentId73$$Pe3, _$appointmentId73$$Pe4, _$patient_id21, _$patient_id21$, _$patient_id21$$name, _$patient_id22, _$patient_id22$, _$appointmentId74, _$appointmentId74$, _$appointmentId75, _$appointmentId75$, _$appointmentId76, _$appointmentId76$, _$appointmentId77, _$appointmentId77$, _$appointmentId78, _$appointmentId78$, _$visit_type9, _$appointmentId79, _$appointmentId79$, _$appointmentId79$$Sp, _$practitioner_detail17, _$practitioner_detail18, _$status10;
38887
+ 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;
38563
38888
 
38564
38889
  return {
38565
38890
  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",
38566
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : (_$patient_id21$$name = _$patient_id21$.name) === null || _$patient_id21$$name === void 0 ? void 0 : _$patient_id21$$name[0]) || {}),
38567
- mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id22 = _.patient_id) === null || _$patient_id22 === void 0 ? void 0 : (_$patient_id22$ = _$patient_id22[0]) === null || _$patient_id22$ === void 0 ? void 0 : _$patient_id22$.MRN) || "",
38891
+ 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]) || {}),
38892
+ 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) || "",
38568
38893
  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) || "",
38569
38894
  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") : "",
38570
38895
  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") : "",
@@ -38622,12 +38947,12 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
38622
38947
  case 5:
38623
38948
  data = _context17.sent;
38624
38949
  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 (_) {
38625
- var _$appointmentId80, _$appointmentId80$, _$appointmentId80$$Pe, _$appointmentId80$$Pe2, _$appointmentId80$$Pe3, _$appointmentId80$$Pe4, _$appointmentId81, _$appointmentId81$, _$appointmentId81$$Pe, _$appointmentId81$$Pe2, _$appointmentId81$$Pe3, _$appointmentId81$$Pe4, _$patient_id23, _$patient_id23$, _$patient_id23$$name, _$patient_id24, _$patient_id24$, _$appointmentId82, _$appointmentId82$, _$appointmentId83, _$appointmentId83$, _$appointmentId84, _$appointmentId84$, _$appointmentId85, _$appointmentId85$, _$appointmentId86, _$appointmentId86$, _$visit_type10, _$appointmentId87, _$appointmentId87$, _$appointmentId87$$Sp, _$practitioner_detail19, _$practitioner_detail20, _$status11;
38950
+ 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;
38626
38951
 
38627
38952
  return {
38628
38953
  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",
38629
- name: makeName((_ === 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$$name = _$patient_id23$.name) === null || _$patient_id23$$name === void 0 ? void 0 : _$patient_id23$$name[0]) || {}),
38630
- mrn: (_ === 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$.MRN) || "",
38954
+ 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]) || {}),
38955
+ 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) || "",
38631
38956
  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) || "",
38632
38957
  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") : "",
38633
38958
  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") : "",
@@ -38685,12 +39010,12 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
38685
39010
  case 5:
38686
39011
  data = _context18.sent;
38687
39012
  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 (_) {
38688
- var _$appointmentId88, _$appointmentId88$, _$appointmentId88$$Pe, _$appointmentId88$$Pe2, _$appointmentId88$$Pe3, _$appointmentId88$$Pe4, _$appointmentId89, _$appointmentId89$, _$appointmentId89$$Pe, _$appointmentId89$$Pe2, _$appointmentId89$$Pe3, _$appointmentId89$$Pe4, _$patient_id25, _$patient_id25$, _$patient_id25$$name, _$patient_id26, _$patient_id26$, _$appointmentId90, _$appointmentId90$, _$appointmentId91, _$appointmentId91$, _$appointmentId92, _$appointmentId92$, _$appointmentId93, _$appointmentId93$, _$appointmentId94, _$appointmentId94$, _$visit_type11, _$appointmentId95, _$appointmentId95$, _$appointmentId95$$Sp, _$practitioner_detail21, _$practitioner_detail22, _$status12;
39013
+ 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;
38689
39014
 
38690
39015
  return {
38691
39016
  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",
38692
- 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]) || {}),
38693
- 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) || "",
39017
+ 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]) || {}),
39018
+ 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) || "",
38694
39019
  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) || "",
38695
39020
  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") : "",
38696
39021
  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") : "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.12",
3
+ "version": "1.1.16",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",