primarycare-binder 1.1.121 → 1.1.122

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 +1188 -557
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8160,8 +8160,9 @@ var queries$b = {
8160
8160
  },
8161
8161
  codablemasterGetFinancial: {
8162
8162
  query: function query(patientId) {
8163
- return "Account.guarantor[0].patient_id==".concat(patientId);
8163
+ return "document(Account.linkidenvalue).id == ".concat(patientId, " && Account.activestatus==true");
8164
8164
  },
8165
+ // `Account.guarantor[0].patient_id==${patientId}`,
8165
8166
  // "filter": "Account.patient_id==@patient_id",
8166
8167
  returnFields: "Account"
8167
8168
  },
@@ -8359,6 +8360,9 @@ var __update__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").conca
8359
8360
  var __readDocumentUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/read_documents");
8360
8361
  var __deleteUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/delete_document");
8361
8362
  var __ruleBuilderUrl__ = "".concat(process.env.REACT_APP_RULE_BUILDER_URL, "/multi/rule-validate");
8363
+ var __OrderlinewithQueue__ = "".concat(process.env.REACT_APP_NIFI_API, "/api/v1/upsert/OrderlinewithQueue"); // export const __GetOrderStartDate__ = `${process.env.REACT_APP_NIFI_API}/api/ScheduleGeneration/GetOrderStartDate`;
8364
+
8365
+ var __GetOrderStartDate__ = "https://apiclmm.dev.ainqaplatform.in/api/ScheduleGeneration/GetOrderStartDate"; // export const __ruleBuilderUrl__ = `http://164.52.210.54:9090/multi/rule-validate`;
8362
8366
 
8363
8367
  var __seqNoGenerator__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/generate_sequence");
8364
8368
  var __insertRCMurl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, "/api/v1/insertCAOrderInRCMPatTrx");
@@ -8420,7 +8424,7 @@ var urls = (_urls = {
8420
8424
  get_hospitals_locality: "/api/v1/getHospitalBasedonLocality"
8421
8425
  }, _defineProperty(_urls, "get_cities", "/api/v1/getCityFromHospital"), _defineProperty(_urls, "get_symptoms", "/api/v1/getSymptoms"), _defineProperty(_urls, "get_speciality", "/api/v1/getSpeciality"), _defineProperty(_urls, "upsert_service", "/api/v1/upsertService"), _defineProperty(_urls, "read_service", "/api/v1/readService"), _defineProperty(_urls, "delete_service", "/api/v1/deleteService"), _defineProperty(_urls, "upsert_slot", "/api/v1/upsertSlot"), _defineProperty(_urls, "read_slot", "api/v1/readSlot"), _defineProperty(_urls, "delete_slot", "api/v1/deleteSlot"), _defineProperty(_urls, "slot_availability", "api/v1/readAvailibalityChecking"), _defineProperty(_urls, "upsert_task", "api/v1/upsertTask"), _defineProperty(_urls, "read_task", "api/v1/readTask"), _defineProperty(_urls, "delete_task", "api/v1/deleteTask"), _defineProperty(_urls, "upsert_schedule", "api/v1/upsertSchedule"), _defineProperty(_urls, "read_schedule", "api/v1/readSchedule"), _defineProperty(_urls, "delete_schedule", "api/v1/deleteSchedule"), _defineProperty(_urls, "upsert_person", "api/v1/upsertPerson"), _defineProperty(_urls, "read_person", "api/v1/readPerson"), _defineProperty(_urls, "delete_person", "api/v1/deletePerson"), _defineProperty(_urls, "upsert_practitioner_role", "api/v1/upsertPractitionerRole"), _defineProperty(_urls, "read_practitioner_role", "api/v1/readPractitionerRole"), _defineProperty(_urls, "delete_practitioner_role", "api/v1/deletePractitionerRole"), _defineProperty(_urls, "get_user_info", "api/v1/getUserInfo"), _defineProperty(_urls, "oraganization_registration", "api/v1/orgUserRegistration"), _defineProperty(_urls, "oraganization_siginIn", "".concat(__keyClockLogin__, "/api/v1/orgUserSignIn")), _defineProperty(_urls, "oraganization_registet_patient", "api/v1/upsert_document"), _urls);
8422
8426
 
8423
- var makeName = function makeName() {
8427
+ var makeName$1 = function makeName() {
8424
8428
  var _prefix$, _prefix$$coding, _prefix$$coding$, _prefix$coding, _prefix$coding$, _prefix$2, _suffix$, _suffix$$coding, _suffix$$coding$, _suffix$coding, _suffix$coding$, _suffix$2;
8425
8429
 
8426
8430
  var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10983,8 +10987,8 @@ var PATIENT_CITY_READ = createAsyncThunk("patientReducer/readPatientCity", /*#__
10983
10987
  var _val$name, _val$name2, _val$_id7;
10984
10988
 
10985
10989
  arr4.push({
10986
- label: makeName((_val$name = val === null || val === void 0 ? void 0 : val.name) !== null && _val$name !== void 0 ? _val$name : {}),
10987
- value: makeName((_val$name2 = val === null || val === void 0 ? void 0 : val.name) !== null && _val$name2 !== void 0 ? _val$name2 : {}),
10990
+ label: makeName$1((_val$name = val === null || val === void 0 ? void 0 : val.name) !== null && _val$name !== void 0 ? _val$name : {}),
10991
+ value: makeName$1((_val$name2 = val === null || val === void 0 ? void 0 : val.name) !== null && _val$name2 !== void 0 ? _val$name2 : {}),
10988
10992
  _id: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : ""
10989
10993
  });
10990
10994
  });
@@ -11861,7 +11865,7 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
11861
11865
  info["hospitalName"] = ((_practData$28 = practData[0]) === null || _practData$28 === void 0 ? void 0 : (_practData$28$practit = _practData$28.practitioner_role) === null || _practData$28$practit === void 0 ? void 0 : (_practData$28$practit2 = _practData$28$practit[0]) === null || _practData$28$practit2 === void 0 ? void 0 : (_practData$28$practit3 = _practData$28$practit2.OrgID) === null || _practData$28$practit3 === void 0 ? void 0 : _practData$28$practit3.name) || "";
11862
11866
  info["hospitalLocation"] = ((_practData$29 = practData[0]) === null || _practData$29 === void 0 ? void 0 : (_practData$29$address = _practData$29.address) === null || _practData$29$address === void 0 ? void 0 : (_practData$29$address2 = _practData$29$address[0]) === null || _practData$29$address2 === void 0 ? void 0 : _practData$29$address2.line) || "";
11863
11867
  nameObj = ((_practData$30 = practData[0]) === null || _practData$30 === void 0 ? void 0 : (_practData$30$name = _practData$30.name) === null || _practData$30$name === void 0 ? void 0 : _practData$30$name[0]) || {};
11864
- info["name"] = makeName(nameObj);
11868
+ info["name"] = makeName$1(nameObj);
11865
11869
  info["kms"] = kms;
11866
11870
  info["orgType"] = (_practData$31 = practData[0]) === null || _practData$31 === void 0 ? void 0 : (_practData$31$practit = _practData$31.practitioner_role) === null || _practData$31$practit === void 0 ? void 0 : (_practData$31$practit2 = _practData$31$practit[0]) === null || _practData$31$practit2 === void 0 ? void 0 : (_practData$31$practit3 = _practData$31$practit2.OrgID) === null || _practData$31$practit3 === void 0 ? void 0 : (_practData$31$practit4 = _practData$31$practit3.OrgType) === null || _practData$31$practit4 === void 0 ? void 0 : _practData$31$practit4[0];
11867
11871
  info["org_Id"] = (_practData$0$practiti = (_practData$32 = practData[0]) === null || _practData$32 === void 0 ? void 0 : (_practData$32$practit = _practData$32.practitioner_role) === null || _practData$32$practit === void 0 ? void 0 : (_practData$32$practit2 = _practData$32$practit[0]) === null || _practData$32$practit2 === void 0 ? void 0 : (_practData$32$practit3 = _practData$32$practit2.OrgID) === null || _practData$32$practit3 === void 0 ? void 0 : _practData$32$practit3._id) !== null && _practData$0$practiti !== void 0 ? _practData$0$practiti : (_practData$33 = practData[0]) === null || _practData$33 === void 0 ? void 0 : (_practData$33$practit = _practData$33.practitioner_role) === null || _practData$33$practit === void 0 ? void 0 : (_practData$33$practit2 = _practData$33$practit[0]) === null || _practData$33$practit2 === void 0 ? void 0 : _practData$33$practit2.EntityName;
@@ -14922,7 +14926,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
14922
14926
  info["hospitalName"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital8 = restData.hospital) === null || _restData$hospital8 === void 0 ? void 0 : _restData$hospital8.name) || "";
14923
14927
  info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$hospital9 = restData.hospital) === null || _restData$hospital9 === void 0 ? void 0 : (_restData$hospital9$a = _restData$hospital9.address) === null || _restData$hospital9$a === void 0 ? void 0 : (_restData$hospital9$a2 = _restData$hospital9$a.city) === null || _restData$hospital9$a2 === void 0 ? void 0 : _restData$hospital9$a2.geogLevelName) || "";
14924
14928
  var nameObj = (restData === null || restData === void 0 ? void 0 : (_restData$name = restData.name) === null || _restData$name === void 0 ? void 0 : _restData$name[0]) || {};
14925
- info["name"] = makeName(nameObj);
14929
+ info["name"] = makeName$1(nameObj);
14926
14930
  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);
14927
14931
  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";
14928
14932
  info["key"] = restData === null || restData === void 0 ? void 0 : restData._key;
@@ -16026,7 +16030,7 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
16026
16030
  var _spec$name, _spec$SPECIALTY, _spec$SPECIALTY$, _spec$SPECIALTY$$codi, _spec$SPECIALTY$$codi2;
16027
16031
 
16028
16032
  returnData.push({
16029
- label: makeName((_spec$name = spec.name) === null || _spec$name === void 0 ? void 0 : _spec$name[0]),
16033
+ label: makeName$1((_spec$name = spec.name) === null || _spec$name === void 0 ? void 0 : _spec$name[0]),
16030
16034
  value: spec.id,
16031
16035
  type: "Doctor",
16032
16036
  speciality: spec === null || spec === void 0 ? void 0 : (_spec$SPECIALTY = spec.SPECIALTY) === null || _spec$SPECIALTY === void 0 ? void 0 : (_spec$SPECIALTY$ = _spec$SPECIALTY[0]) === null || _spec$SPECIALTY$ === void 0 ? void 0 : (_spec$SPECIALTY$$codi = _spec$SPECIALTY$.coding) === null || _spec$SPECIALTY$$codi === void 0 ? void 0 : (_spec$SPECIALTY$$codi2 = _spec$SPECIALTY$$codi[0]) === null || _spec$SPECIALTY$$codi2 === void 0 ? void 0 : _spec$SPECIALTY$$codi2.display
@@ -17727,7 +17731,7 @@ var READ_PERSON = createAsyncThunk("personApiSlice/readPerson", /*#__PURE__*/_as
17727
17731
  id: (data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$ = _data$[0]) === null || _data$$ === void 0 ? void 0 : _data$$.Id) || 0,
17728
17732
  birthDay: (data === null || data === void 0 ? void 0 : (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$ = _data$2[0]) === null || _data$2$ === void 0 ? void 0 : _data$2$.birthDay) || "",
17729
17733
  gender: (data === null || data === void 0 ? void 0 : (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : (_data$3$ = _data$3[0]) === null || _data$3$ === void 0 ? void 0 : _data$3$.gender) || "",
17730
- name: makeName(data === null || data === void 0 ? void 0 : (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : (_data$4$ = _data$4[0]) === null || _data$4$ === void 0 ? void 0 : (_data$4$$names = _data$4$.names) === null || _data$4$$names === void 0 ? void 0 : _data$4$$names[0]) || "",
17734
+ name: makeName$1(data === null || data === void 0 ? void 0 : (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : (_data$4$ = _data$4[0]) === null || _data$4$ === void 0 ? void 0 : (_data$4$$names = _data$4$.names) === null || _data$4$$names === void 0 ? void 0 : _data$4$$names[0]) || "",
17731
17735
  pid: (data === null || data === void 0 ? void 0 : (_data$5 = data[0]) === null || _data$5 === void 0 ? void 0 : (_data$5$ = _data$5[0]) === null || _data$5$ === void 0 ? void 0 : (_data$5$$Patientname = _data$5$.Patientname) === null || _data$5$$Patientname === void 0 ? void 0 : (_data$5$$Patientname$ = _data$5$$Patientname[0]) === null || _data$5$$Patientname$ === void 0 ? void 0 : _data$5$$Patientname$._id) || "",
17732
17736
  mrn: (data === null || data === void 0 ? void 0 : (_data$6 = data[0]) === null || _data$6 === void 0 ? void 0 : (_data$6$ = _data$6[0]) === null || _data$6$ === void 0 ? void 0 : (_data$6$$Patientname = _data$6$.Patientname) === null || _data$6$$Patientname === void 0 ? void 0 : (_data$6$$Patientname$ = _data$6$$Patientname[0]) === null || _data$6$$Patientname$ === void 0 ? void 0 : _data$6$$Patientname$.alias) || "",
17733
17737
  username: phone,
@@ -18928,15 +18932,13 @@ var ORGANIZATION_FINANCIAL_REGISTRATION = createAsyncThunk("OrganizationRegister
18928
18932
  }
18929
18933
  }, _callee5, null, [[2, 15]]);
18930
18934
  })));
18931
- var GET_FACILITY_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfacility", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
18935
+ var GET_PATIENT__ID_BY_ID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPatient_id", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
18932
18936
  var payload,
18933
18937
  _ref12,
18934
18938
  rejectWithValue,
18935
- _payload$type,
18936
- type,
18939
+ patient_id,
18937
18940
  body,
18938
18941
  data,
18939
- returnData,
18940
18942
  _args6 = arguments;
18941
18943
 
18942
18944
  return regeneratorRuntime.wrap(function _callee6$(_context6) {
@@ -18946,12 +18948,12 @@ var GET_FACILITY_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
18946
18948
  payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
18947
18949
  _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
18948
18950
  _context6.prev = 2;
18949
- _payload$type = payload.type, type = _payload$type === void 0 ? "ORGTYPE" : _payload$type;
18951
+ patient_id = payload.patient_id;
18950
18952
  body = {
18951
- db_name: dbName,
18952
- entity: "CodeableConceptMaster",
18953
- filter: queries$b["codablemasterType"].query(type),
18954
- return_fields: queries$b["codablemasterType"].returnFields
18953
+ "db_name": dbName,
18954
+ "entity": "Patient",
18955
+ "filter": "Patient.id==".concat(patient_id, " && Patient.activestatus==true"),
18956
+ "return_fields": "Patient"
18955
18957
  };
18956
18958
  _context6.next = 7;
18957
18959
  return fetchData$3({
@@ -18960,36 +18962,30 @@ var GET_FACILITY_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
18960
18962
 
18961
18963
  case 7:
18962
18964
  data = _context6.sent;
18963
- returnData = [];
18964
-
18965
- if (Array.isArray(data.result)) {
18966
- returnData = data.result;
18967
- }
18968
-
18969
- return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18970
- data: returnData
18965
+ return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
18966
+ data: data
18971
18967
  }));
18972
18968
 
18973
- case 13:
18974
- _context6.prev = 13;
18969
+ case 11:
18970
+ _context6.prev = 11;
18975
18971
  _context6.t0 = _context6["catch"](2);
18976
18972
  return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18977
18973
  message: _context6.t0.message
18978
18974
  })));
18979
18975
 
18980
- case 16:
18976
+ case 14:
18981
18977
  case "end":
18982
18978
  return _context6.stop();
18983
18979
  }
18984
18980
  }
18985
- }, _callee6, null, [[2, 13]]);
18981
+ }, _callee6, null, [[2, 11]]);
18986
18982
  })));
18987
- var GET_FACILITY_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfacilitytype", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
18983
+ var GET_FACILITY_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfacility", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
18988
18984
  var payload,
18989
18985
  _ref14,
18990
18986
  rejectWithValue,
18991
- _payload$name,
18992
- name,
18987
+ _payload$type,
18988
+ type,
18993
18989
  body,
18994
18990
  data,
18995
18991
  returnData,
@@ -19002,12 +18998,12 @@ var GET_FACILITY_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
19002
18998
  payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
19003
18999
  _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
19004
19000
  _context7.prev = 2;
19005
- _payload$name = payload.name, name = _payload$name === void 0 ? "Hospital" : _payload$name;
19001
+ _payload$type = payload.type, type = _payload$type === void 0 ? "ORGTYPE" : _payload$type;
19006
19002
  body = {
19007
19003
  db_name: dbName,
19008
- entity: "Organization",
19009
- filter: queries$b["codablemasterName"].query(name),
19010
- return_fields: queries$b["codablemasterName"].returnFields
19004
+ entity: "CodeableConceptMaster",
19005
+ filter: queries$b["codablemasterType"].query(type),
19006
+ return_fields: queries$b["codablemasterType"].returnFields
19011
19007
  };
19012
19008
  _context7.next = 7;
19013
19009
  return fetchData$3({
@@ -19040,6 +19036,62 @@ var GET_FACILITY_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
19040
19036
  }
19041
19037
  }, _callee7, null, [[2, 13]]);
19042
19038
  })));
19039
+ var GET_FACILITY_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfacilitytype", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
19040
+ var payload,
19041
+ _ref16,
19042
+ rejectWithValue,
19043
+ _payload$name,
19044
+ name,
19045
+ body,
19046
+ data,
19047
+ returnData,
19048
+ _args8 = arguments;
19049
+
19050
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
19051
+ while (1) {
19052
+ switch (_context8.prev = _context8.next) {
19053
+ case 0:
19054
+ payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
19055
+ _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
19056
+ _context8.prev = 2;
19057
+ _payload$name = payload.name, name = _payload$name === void 0 ? "Hospital" : _payload$name;
19058
+ body = {
19059
+ db_name: dbName,
19060
+ entity: "Organization",
19061
+ filter: queries$b["codablemasterName"].query(name),
19062
+ return_fields: queries$b["codablemasterName"].returnFields
19063
+ };
19064
+ _context8.next = 7;
19065
+ return fetchData$3({
19066
+ body: JSON.stringify(body)
19067
+ }, __readDocumentUrl__);
19068
+
19069
+ case 7:
19070
+ data = _context8.sent;
19071
+ returnData = [];
19072
+
19073
+ if (Array.isArray(data.result)) {
19074
+ returnData = data.result;
19075
+ }
19076
+
19077
+ return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19078
+ data: returnData
19079
+ }));
19080
+
19081
+ case 13:
19082
+ _context8.prev = 13;
19083
+ _context8.t0 = _context8["catch"](2);
19084
+ return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19085
+ message: _context8.t0.message
19086
+ })));
19087
+
19088
+ case 16:
19089
+ case "end":
19090
+ return _context8.stop();
19091
+ }
19092
+ }
19093
+ }, _callee8, null, [[2, 13]]);
19094
+ })));
19043
19095
 
19044
19096
  var constructPractitonerType = function constructPractitonerType(data) {
19045
19097
  debugger;
@@ -19087,74 +19139,15 @@ var constructPractitonerName = function constructPractitonerName(data) {
19087
19139
  return arr;
19088
19140
  };
19089
19141
 
19090
- var GET_PRACTITIONER_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPractitionerType", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
19142
+ var GET_PRACTITIONER_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPractitionerType", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
19091
19143
  var payload,
19092
- _ref16,
19144
+ _ref18,
19093
19145
  rejectWithValue,
19094
19146
  _payload$OrgID,
19095
19147
  OrgID,
19096
19148
  body,
19097
19149
  data,
19098
19150
  returnData,
19099
- _args8 = arguments;
19100
-
19101
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
19102
- while (1) {
19103
- switch (_context8.prev = _context8.next) {
19104
- case 0:
19105
- payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
19106
- _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
19107
- _context8.prev = 2;
19108
- _payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? "" : _payload$OrgID;
19109
- body = {
19110
- db_name: dbName,
19111
- entity: "Practitioner",
19112
- filter: queries$b["codablemasterPractitionerType"].query(OrgID),
19113
- return_fields: queries$b["codablemasterPractitionerType"].returnFields
19114
- };
19115
- _context8.next = 7;
19116
- return fetchData$3({
19117
- body: JSON.stringify(body)
19118
- }, __readDocumentUrl__);
19119
-
19120
- case 7:
19121
- data = _context8.sent;
19122
- debugger;
19123
- returnData = [];
19124
-
19125
- if (Array.isArray(data.result)) {
19126
- returnData = constructPractitonerType(data.result);
19127
- }
19128
-
19129
- return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19130
- data: returnData
19131
- }));
19132
-
19133
- case 14:
19134
- _context8.prev = 14;
19135
- _context8.t0 = _context8["catch"](2);
19136
- return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19137
- message: _context8.t0.message
19138
- })));
19139
-
19140
- case 17:
19141
- case "end":
19142
- return _context8.stop();
19143
- }
19144
- }
19145
- }, _callee8, null, [[2, 14]]);
19146
- })));
19147
- var GET_PRACTITIONER_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPractitionerName", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
19148
- var payload,
19149
- _ref18,
19150
- rejectWithValue,
19151
- _payload$specialityID,
19152
- specialityID,
19153
- _payload$practitioner,
19154
- practitionerType,
19155
- body,
19156
- data,
19157
- returnData,
19158
19151
  _args9 = arguments;
19159
19152
 
19160
19153
  return regeneratorRuntime.wrap(function _callee9$(_context9) {
@@ -19164,12 +19157,12 @@ var GET_PRACTITIONER_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlic
19164
19157
  payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
19165
19158
  _ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
19166
19159
  _context9.prev = 2;
19167
- _payload$specialityID = payload.specialityID, specialityID = _payload$specialityID === void 0 ? "" : _payload$specialityID, _payload$practitioner = payload.practitionerType, practitionerType = _payload$practitioner === void 0 ? "" : _payload$practitioner;
19160
+ _payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? "" : _payload$OrgID;
19168
19161
  body = {
19169
19162
  db_name: dbName,
19170
19163
  entity: "Practitioner",
19171
- filter: queries$b["codablemasterPractitionerName"].query(specialityID, practitionerType),
19172
- return_fields: queries$b["codablemasterPractitionerName"].returnFields
19164
+ filter: queries$b["codablemasterPractitionerType"].query(OrgID),
19165
+ return_fields: queries$b["codablemasterPractitionerType"].returnFields
19173
19166
  };
19174
19167
  _context9.next = 7;
19175
19168
  return fetchData$3({
@@ -19182,7 +19175,7 @@ var GET_PRACTITIONER_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlic
19182
19175
  returnData = [];
19183
19176
 
19184
19177
  if (Array.isArray(data.result)) {
19185
- returnData = constructPractitonerName(data.result);
19178
+ returnData = constructPractitonerType(data.result);
19186
19179
  }
19187
19180
 
19188
19181
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
@@ -19203,12 +19196,14 @@ var GET_PRACTITIONER_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlic
19203
19196
  }
19204
19197
  }, _callee9, null, [[2, 14]]);
19205
19198
  })));
19206
- var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
19199
+ var GET_PRACTITIONER_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPractitionerName", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
19207
19200
  var payload,
19208
19201
  _ref20,
19209
19202
  rejectWithValue,
19210
- _payload$OrgID2,
19211
- OrgID,
19203
+ _payload$specialityID,
19204
+ specialityID,
19205
+ _payload$practitioner,
19206
+ practitionerType,
19212
19207
  body,
19213
19208
  data,
19214
19209
  returnData,
@@ -19221,12 +19216,12 @@ var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
19221
19216
  payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
19222
19217
  _ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
19223
19218
  _context10.prev = 2;
19224
- _payload$OrgID2 = payload.OrgID, OrgID = _payload$OrgID2 === void 0 ? "" : _payload$OrgID2;
19219
+ _payload$specialityID = payload.specialityID, specialityID = _payload$specialityID === void 0 ? "" : _payload$specialityID, _payload$practitioner = payload.practitionerType, practitionerType = _payload$practitioner === void 0 ? "" : _payload$practitioner;
19225
19220
  body = {
19226
19221
  db_name: dbName,
19227
- entity: "Practitioner,PractitionerRole",
19228
- filter: queries$b["codablemasterPractitioner"].query(OrgID),
19229
- return_fields: queries$b["codablemasterPractitioner"].returnFields
19222
+ entity: "Practitioner",
19223
+ filter: queries$b["codablemasterPractitionerName"].query(specialityID, practitionerType),
19224
+ return_fields: queries$b["codablemasterPractitionerName"].returnFields
19230
19225
  };
19231
19226
  _context10.next = 7;
19232
19227
  return fetchData$3({
@@ -19235,35 +19230,36 @@ var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
19235
19230
 
19236
19231
  case 7:
19237
19232
  data = _context10.sent;
19233
+ debugger;
19238
19234
  returnData = [];
19239
19235
 
19240
19236
  if (Array.isArray(data.result)) {
19241
- returnData = data.result;
19237
+ returnData = constructPractitonerName(data.result);
19242
19238
  }
19243
19239
 
19244
19240
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19245
19241
  data: returnData
19246
19242
  }));
19247
19243
 
19248
- case 13:
19249
- _context10.prev = 13;
19244
+ case 14:
19245
+ _context10.prev = 14;
19250
19246
  _context10.t0 = _context10["catch"](2);
19251
19247
  return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19252
19248
  message: _context10.t0.message
19253
19249
  })));
19254
19250
 
19255
- case 16:
19251
+ case 17:
19256
19252
  case "end":
19257
19253
  return _context10.stop();
19258
19254
  }
19259
19255
  }
19260
- }, _callee10, null, [[2, 13]]);
19256
+ }, _callee10, null, [[2, 14]]);
19261
19257
  })));
19262
- var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitioners", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
19258
+ var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
19263
19259
  var payload,
19264
19260
  _ref22,
19265
19261
  rejectWithValue,
19266
- _payload$OrgID3,
19262
+ _payload$OrgID2,
19267
19263
  OrgID,
19268
19264
  body,
19269
19265
  data,
@@ -19277,12 +19273,12 @@ var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
19277
19273
  payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
19278
19274
  _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
19279
19275
  _context11.prev = 2;
19280
- _payload$OrgID3 = payload.OrgID, OrgID = _payload$OrgID3 === void 0 ? "" : _payload$OrgID3;
19276
+ _payload$OrgID2 = payload.OrgID, OrgID = _payload$OrgID2 === void 0 ? "" : _payload$OrgID2;
19281
19277
  body = {
19282
19278
  db_name: dbName,
19283
- entity: "Practitioner",
19284
- filter: "document(Practitioner.practitioner_role)[*].SpecialtyID any == '" + OrgID + "'",
19285
- return_fields: "merge(Practitioner,{name:(let n = document(Practitioner.name)[0] return merge(n, { prefix: (for p in CodeableConceptMaster filter p._id == n.prefix return Document(p.coding)[0])[0], suffix: (for s in CodeableConceptMaster filter s._id == n.suffix return Document(s.coding)[0])[0] }))},{practitioner_role:(for PractitionerRole in PractitionerRole filter Practitioner.practitioner_role any == PractitionerRole._id return merge(PractitionerRole,{role:(for CodeableConceptMaster in CodeableConceptMaster filter CodeableConceptMaster._id == PractitionerRole.role return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}))}, {SpecialtyID:(for CodeableConceptMaster in CodeableConceptMaster filter PractitionerRole.SpecialtyID == CodeableConceptMaster._id return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}) ) } ) )}, {practitioner_type:(for CodeableConceptMaster in CodeableConceptMaster filter CodeableConceptMaster._id == Practitioner.practitioner_type return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}))})"
19279
+ entity: "Practitioner,PractitionerRole",
19280
+ filter: queries$b["codablemasterPractitioner"].query(OrgID),
19281
+ return_fields: queries$b["codablemasterPractitioner"].returnFields
19286
19282
  };
19287
19283
  _context11.next = 7;
19288
19284
  return fetchData$3({
@@ -19315,11 +19311,11 @@ var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
19315
19311
  }
19316
19312
  }, _callee11, null, [[2, 13]]);
19317
19313
  })));
19318
- var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitionerRole", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
19314
+ var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitioners", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
19319
19315
  var payload,
19320
19316
  _ref24,
19321
19317
  rejectWithValue,
19322
- _payload$OrgID4,
19318
+ _payload$OrgID3,
19323
19319
  OrgID,
19324
19320
  body,
19325
19321
  data,
@@ -19333,12 +19329,12 @@ var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlic
19333
19329
  payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
19334
19330
  _ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
19335
19331
  _context12.prev = 2;
19336
- _payload$OrgID4 = payload.OrgID, OrgID = _payload$OrgID4 === void 0 ? "" : _payload$OrgID4;
19332
+ _payload$OrgID3 = payload.OrgID, OrgID = _payload$OrgID3 === void 0 ? "" : _payload$OrgID3;
19337
19333
  body = {
19338
19334
  db_name: dbName,
19339
- entity: "Practitioner,PractitionerRole,CodeableConceptMaster",
19340
- filter: queries$b["codablemasterPractitionerRole"].query(OrgID),
19341
- return_fields: queries$b["codablemasterPractitionerRole"].returnFields
19335
+ entity: "Practitioner",
19336
+ filter: "document(Practitioner.practitioner_role)[*].SpecialtyID any == '" + OrgID + "'",
19337
+ return_fields: "merge(Practitioner,{name:(let n = document(Practitioner.name)[0] return merge(n, { prefix: (for p in CodeableConceptMaster filter p._id == n.prefix return Document(p.coding)[0])[0], suffix: (for s in CodeableConceptMaster filter s._id == n.suffix return Document(s.coding)[0])[0] }))},{practitioner_role:(for PractitionerRole in PractitionerRole filter Practitioner.practitioner_role any == PractitionerRole._id return merge(PractitionerRole,{role:(for CodeableConceptMaster in CodeableConceptMaster filter CodeableConceptMaster._id == PractitionerRole.role return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}))}, {SpecialtyID:(for CodeableConceptMaster in CodeableConceptMaster filter PractitionerRole.SpecialtyID == CodeableConceptMaster._id return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}) ) } ) )}, {practitioner_type:(for CodeableConceptMaster in CodeableConceptMaster filter CodeableConceptMaster._id == Practitioner.practitioner_type return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}))})"
19342
19338
  };
19343
19339
  _context12.next = 7;
19344
19340
  return fetchData$3({
@@ -19371,18 +19367,15 @@ var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlic
19371
19367
  }
19372
19368
  }, _callee12, null, [[2, 13]]);
19373
19369
  })));
19374
- var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/getspeciality", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
19370
+ var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitionerRole", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
19375
19371
  var payload,
19376
19372
  _ref26,
19377
19373
  rejectWithValue,
19378
- _payload$id,
19379
- id,
19374
+ _payload$OrgID4,
19375
+ OrgID,
19380
19376
  body,
19381
19377
  data,
19382
19378
  returnData,
19383
- _data$result$0$specia,
19384
- _data$result,
19385
- _data$result$,
19386
19379
  _args13 = arguments;
19387
19380
 
19388
19381
  return regeneratorRuntime.wrap(function _callee13$(_context13) {
@@ -19392,12 +19385,12 @@ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/
19392
19385
  payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
19393
19386
  _ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
19394
19387
  _context13.prev = 2;
19395
- _payload$id = payload.id, id = _payload$id === void 0 ? "" : _payload$id;
19388
+ _payload$OrgID4 = payload.OrgID, OrgID = _payload$OrgID4 === void 0 ? "" : _payload$OrgID4;
19396
19389
  body = {
19397
19390
  db_name: dbName,
19398
- entity: "Organization",
19399
- filter: "Organization.id==".concat(id, " && Organization.activestatus==true"),
19400
- return_fields: "{specialty:DOCUMENT(Organization.specialtyDetails[*].specialty)}"
19391
+ entity: "Practitioner,PractitionerRole,CodeableConceptMaster",
19392
+ filter: queries$b["codablemasterPractitionerRole"].query(OrgID),
19393
+ return_fields: queries$b["codablemasterPractitionerRole"].returnFields
19401
19394
  };
19402
19395
  _context13.next = 7;
19403
19396
  return fetchData$3({
@@ -19409,7 +19402,7 @@ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/
19409
19402
  returnData = [];
19410
19403
 
19411
19404
  if (Array.isArray(data.result)) {
19412
- returnData = (_data$result$0$specia = (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$ = _data$result[0]) === null || _data$result$ === void 0 ? void 0 : _data$result$.specialty) !== null && _data$result$0$specia !== void 0 ? _data$result$0$specia : [];
19405
+ returnData = data.result;
19413
19406
  }
19414
19407
 
19415
19408
  return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
@@ -19430,15 +19423,18 @@ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/
19430
19423
  }
19431
19424
  }, _callee13, null, [[2, 13]]);
19432
19425
  })));
19433
- var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfinancial", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
19426
+ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/getspeciality", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
19434
19427
  var payload,
19435
19428
  _ref28,
19436
19429
  rejectWithValue,
19437
- _payload$patientId2,
19438
- patientId,
19430
+ _payload$id,
19431
+ id,
19439
19432
  body,
19440
19433
  data,
19441
19434
  returnData,
19435
+ _data$result$0$specia,
19436
+ _data$result,
19437
+ _data$result$,
19442
19438
  _args14 = arguments;
19443
19439
 
19444
19440
  return regeneratorRuntime.wrap(function _callee14$(_context14) {
@@ -19448,12 +19444,12 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
19448
19444
  payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
19449
19445
  _ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
19450
19446
  _context14.prev = 2;
19451
- _payload$patientId2 = payload.patientId, patientId = _payload$patientId2 === void 0 ? "" : _payload$patientId2;
19447
+ _payload$id = payload.id, id = _payload$id === void 0 ? "" : _payload$id;
19452
19448
  body = {
19453
19449
  db_name: dbName,
19454
- entity: "Account",
19455
- filter: queries$b["codablemasterGetFinancial"].query(patientId),
19456
- return_fields: queries$b["codablemasterGetFinancial"].returnFields
19450
+ entity: "Organization",
19451
+ filter: "Organization.id==".concat(id, " && Organization.activestatus==true"),
19452
+ return_fields: "{specialty:DOCUMENT(Organization.specialtyDetails[*].specialty)}"
19457
19453
  };
19458
19454
  _context14.next = 7;
19459
19455
  return fetchData$3({
@@ -19465,7 +19461,7 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
19465
19461
  returnData = [];
19466
19462
 
19467
19463
  if (Array.isArray(data.result)) {
19468
- returnData = data.result;
19464
+ returnData = (_data$result$0$specia = (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$ = _data$result[0]) === null || _data$result$ === void 0 ? void 0 : _data$result$.specialty) !== null && _data$result$0$specia !== void 0 ? _data$result$0$specia : [];
19469
19465
  }
19470
19466
 
19471
19467
  return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
@@ -19486,13 +19482,12 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
19486
19482
  }
19487
19483
  }, _callee14, null, [[2, 13]]);
19488
19484
  })));
19489
- var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterHeader", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
19485
+ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfinancial", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
19490
19486
  var payload,
19491
19487
  _ref30,
19492
19488
  rejectWithValue,
19493
- _payload$patientId3,
19489
+ _payload$patientId2,
19494
19490
  patientId,
19495
- encounterId,
19496
19491
  body,
19497
19492
  data,
19498
19493
  returnData,
@@ -19505,13 +19500,12 @@ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice
19505
19500
  payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
19506
19501
  _ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
19507
19502
  _context15.prev = 2;
19508
- _payload$patientId3 = payload.patientId, patientId = _payload$patientId3 === void 0 ? "" : _payload$patientId3, encounterId = payload.encounterId;
19503
+ _payload$patientId2 = payload.patientId, patientId = _payload$patientId2 === void 0 ? "" : _payload$patientId2;
19509
19504
  body = {
19510
19505
  db_name: dbName,
19511
- entity: "Encounter",
19512
- filter: "Encounter.patient_id == ".concat(patientId, " && Encounter.id==").concat(encounterId, " && Encounter.activestatus == true"),
19513
- return_fields: "merge({id:adqolcEncounter.id},{_id:adqolcEncounter._id},{_key:adqolcEncounter._key},{encounterdate:adqolcEncounter.encounterdate},{encounter_no:adqolcEncounter.encounter_no},{type:document(adqolcEncounter.type)[*].display},{visit_type:adqolcEncounter.visit_type},{location:(for doc in adqolcEncounter.location for loc in LocationMaster filter loc._id == doc.location_id return document(document(loc.locationType).coding))},{Practitioner_id:(for part in adqolcEncounter.participant for practId in Practitioner filter practId.id == part.Practitioner_id return {name:(for doc in HumanNameMaster filter doc._id in practId.name return merge(doc,{use:(document(document(doc.use).coding)),prefix:(document(document(doc.prefix).coding)),suffix:(document(document(doc.suffix).coding))})),communication:document(practId.communication)[*]} )},{PractitionerRole_id:(for part in adqolcEncounter.participant for practRole in PractitionerRole filter practRole.id == part.PractitionerRole_id return document(document(practRole.role).coding) )})",
19514
- sort: "Encounter.encounterdate desc"
19506
+ entity: "Account",
19507
+ filter: queries$b["codablemasterGetFinancial"].query(patientId),
19508
+ return_fields: queries$b["codablemasterGetFinancial"].returnFields
19515
19509
  };
19516
19510
  _context15.next = 7;
19517
19511
  return fetchData$3({
@@ -19544,10 +19538,68 @@ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice
19544
19538
  }
19545
19539
  }, _callee15, null, [[2, 13]]);
19546
19540
  })));
19547
- var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
19541
+ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterHeader", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
19548
19542
  var payload,
19549
19543
  _ref32,
19550
19544
  rejectWithValue,
19545
+ _payload$patientId3,
19546
+ patientId,
19547
+ encounterId,
19548
+ body,
19549
+ data,
19550
+ returnData,
19551
+ _args16 = arguments;
19552
+
19553
+ return regeneratorRuntime.wrap(function _callee16$(_context16) {
19554
+ while (1) {
19555
+ switch (_context16.prev = _context16.next) {
19556
+ case 0:
19557
+ payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
19558
+ _ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
19559
+ _context16.prev = 2;
19560
+ _payload$patientId3 = payload.patientId, patientId = _payload$patientId3 === void 0 ? "" : _payload$patientId3, encounterId = payload.encounterId;
19561
+ body = {
19562
+ db_name: dbName,
19563
+ entity: "Encounter",
19564
+ filter: "Encounter.patient_id == ".concat(patientId, " && Encounter.id==").concat(encounterId, " && Encounter.activestatus == true"),
19565
+ return_fields: "merge({id:adqolcEncounter.id},{_id:adqolcEncounter._id},{_key:adqolcEncounter._key},{encounterdate:adqolcEncounter.encounterdate},{encounter_no:adqolcEncounter.encounter_no},{type:document(adqolcEncounter.type)[*].display},{visit_type:adqolcEncounter.visit_type},{location:(for doc in adqolcEncounter.location for loc in LocationMaster filter loc._id == doc.location_id return document(document(loc.locationType).coding))},{Practitioner_id:(for part in adqolcEncounter.participant for practId in Practitioner filter practId.id == part.Practitioner_id return {name:(for doc in HumanNameMaster filter doc._id in practId.name return merge(doc,{use:(document(document(doc.use).coding)),prefix:(document(document(doc.prefix).coding)),suffix:(document(document(doc.suffix).coding))})),communication:document(practId.communication)[*]} )},{PractitionerRole_id:(for part in adqolcEncounter.participant for practRole in PractitionerRole filter practRole.id == part.PractitionerRole_id return document(document(practRole.role).coding) )})",
19566
+ sort: "Encounter.encounterdate desc"
19567
+ };
19568
+ _context16.next = 7;
19569
+ return fetchData$3({
19570
+ body: JSON.stringify(body)
19571
+ }, __readDocumentUrl__);
19572
+
19573
+ case 7:
19574
+ data = _context16.sent;
19575
+ returnData = [];
19576
+
19577
+ if (Array.isArray(data.result)) {
19578
+ returnData = data.result;
19579
+ }
19580
+
19581
+ return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19582
+ data: returnData
19583
+ }));
19584
+
19585
+ case 13:
19586
+ _context16.prev = 13;
19587
+ _context16.t0 = _context16["catch"](2);
19588
+ return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19589
+ message: _context16.t0.message
19590
+ })));
19591
+
19592
+ case 16:
19593
+ case "end":
19594
+ return _context16.stop();
19595
+ }
19596
+ }
19597
+ }, _callee16, null, [[2, 13]]);
19598
+ })));
19599
+ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
19600
+ var payload,
19601
+ _ref34,
19602
+ rejectWithValue,
19551
19603
  _payload$patientid,
19552
19604
  patientid,
19553
19605
  _payload$reffId,
@@ -19586,15 +19638,15 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
19586
19638
  _returnData15,
19587
19639
  _returnData15$,
19588
19640
  info,
19589
- _args16 = arguments;
19641
+ _args17 = arguments;
19590
19642
 
19591
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
19643
+ return regeneratorRuntime.wrap(function _callee17$(_context17) {
19592
19644
  while (1) {
19593
- switch (_context16.prev = _context16.next) {
19645
+ switch (_context17.prev = _context17.next) {
19594
19646
  case 0:
19595
- payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
19596
- _ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
19597
- _context16.prev = 2;
19647
+ payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
19648
+ _ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
19649
+ _context17.prev = 2;
19598
19650
  _payload$patientid = payload.patientid, patientid = _payload$patientid === void 0 ? "" : _payload$patientid, _payload$reffId = payload.reffId, reffId = _payload$reffId === void 0 ? "" : _payload$reffId;
19599
19651
  body = {
19600
19652
  db_name: dbName,
@@ -19602,13 +19654,13 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
19602
19654
  filter: queries$b["codablemasterGetReferral"].query(patientid, reffId),
19603
19655
  return_fields: queries$b["codablemasterGetReferral"].returnFields
19604
19656
  };
19605
- _context16.next = 7;
19657
+ _context17.next = 7;
19606
19658
  return fetchData$3({
19607
19659
  body: JSON.stringify(body)
19608
19660
  }, __readDocumentUrl__);
19609
19661
 
19610
19662
  case 7:
19611
- data = _context16.sent;
19663
+ data = _context17.sent;
19612
19664
  returnData = [];
19613
19665
 
19614
19666
  if (Array.isArray(data.result)) {
@@ -19641,42 +19693,42 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
19641
19693
  returnData[0] = _objectSpread2(_objectSpread2({}, returnData[0]), info);
19642
19694
  }
19643
19695
 
19644
- return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19696
+ return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19645
19697
  data: returnData
19646
19698
  }));
19647
19699
 
19648
19700
  case 13:
19649
- _context16.prev = 13;
19650
- _context16.t0 = _context16["catch"](2);
19651
- return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19652
- message: _context16.t0.message
19701
+ _context17.prev = 13;
19702
+ _context17.t0 = _context17["catch"](2);
19703
+ return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19704
+ message: _context17.t0.message
19653
19705
  })));
19654
19706
 
19655
19707
  case 16:
19656
19708
  case "end":
19657
- return _context16.stop();
19709
+ return _context17.stop();
19658
19710
  }
19659
19711
  }
19660
- }, _callee16, null, [[2, 13]]);
19712
+ }, _callee17, null, [[2, 13]]);
19661
19713
  })));
19662
- var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
19714
+ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
19663
19715
  var payload,
19664
- _ref34,
19716
+ _ref36,
19665
19717
  rejectWithValue,
19666
19718
  _payload$appointmentI,
19667
19719
  appointmentId,
19668
19720
  body,
19669
19721
  data,
19670
19722
  returnData,
19671
- _args17 = arguments;
19723
+ _args18 = arguments;
19672
19724
 
19673
- return regeneratorRuntime.wrap(function _callee17$(_context17) {
19725
+ return regeneratorRuntime.wrap(function _callee18$(_context18) {
19674
19726
  while (1) {
19675
- switch (_context17.prev = _context17.next) {
19727
+ switch (_context18.prev = _context18.next) {
19676
19728
  case 0:
19677
- payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
19678
- _ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
19679
- _context17.prev = 2;
19729
+ payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
19730
+ _ref36 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
19731
+ _context18.prev = 2;
19680
19732
  _payload$appointmentI = payload.appointmentId, appointmentId = _payload$appointmentI === void 0 ? "" : _payload$appointmentI;
19681
19733
  body = {
19682
19734
  db_name: dbName,
@@ -19684,40 +19736,40 @@ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSl
19684
19736
  filter: queries$b["codablemasterGetAppointment"].query(appointmentId),
19685
19737
  return_fields: queries$b["codablemasterGetAppointment"].returnFields
19686
19738
  };
19687
- _context17.next = 7;
19739
+ _context18.next = 7;
19688
19740
  return fetchData$3({
19689
19741
  body: JSON.stringify(body)
19690
19742
  }, __readDocumentUrl__);
19691
19743
 
19692
19744
  case 7:
19693
- data = _context17.sent;
19745
+ data = _context18.sent;
19694
19746
  returnData = [];
19695
19747
 
19696
19748
  if (Array.isArray(data.result)) {
19697
19749
  returnData = data.result;
19698
19750
  }
19699
19751
 
19700
- return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19752
+ return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19701
19753
  data: returnData
19702
19754
  }));
19703
19755
 
19704
19756
  case 13:
19705
- _context17.prev = 13;
19706
- _context17.t0 = _context17["catch"](2);
19707
- return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19708
- message: _context17.t0.message
19757
+ _context18.prev = 13;
19758
+ _context18.t0 = _context18["catch"](2);
19759
+ return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19760
+ message: _context18.t0.message
19709
19761
  })));
19710
19762
 
19711
19763
  case 16:
19712
19764
  case "end":
19713
- return _context17.stop();
19765
+ return _context18.stop();
19714
19766
  }
19715
19767
  }
19716
- }, _callee17, null, [[2, 13]]);
19768
+ }, _callee18, null, [[2, 13]]);
19717
19769
  })));
19718
- var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
19770
+ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
19719
19771
  var payload,
19720
- _ref36,
19772
+ _ref38,
19721
19773
  rejectWithValue,
19722
19774
  _patientName$split,
19723
19775
  _patientName$split2,
@@ -19730,15 +19782,15 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
19730
19782
  body,
19731
19783
  data,
19732
19784
  returnData,
19733
- _args18 = arguments;
19785
+ _args19 = arguments;
19734
19786
 
19735
- return regeneratorRuntime.wrap(function _callee18$(_context18) {
19787
+ return regeneratorRuntime.wrap(function _callee19$(_context19) {
19736
19788
  while (1) {
19737
- switch (_context18.prev = _context18.next) {
19789
+ switch (_context19.prev = _context19.next) {
19738
19790
  case 0:
19739
- payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
19740
- _ref36 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
19741
- _context18.prev = 2;
19791
+ payload = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
19792
+ _ref38 = _args19.length > 1 ? _args19[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
19793
+ _context19.prev = 2;
19742
19794
  _payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
19743
19795
  firstName = (_patientName$split = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 1)) !== null && _patientName$split !== void 0 ? _patientName$split : "";
19744
19796
  secondName = (_patientName$split2 = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 2)) !== null && _patientName$split2 !== void 0 ? _patientName$split2 : "";
@@ -19754,40 +19806,40 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
19754
19806
  }),
19755
19807
  return_fields: queries$b["codablemasterGetPatientname"].returnFields
19756
19808
  };
19757
- _context18.next = 11;
19809
+ _context19.next = 11;
19758
19810
  return fetchData$3({
19759
19811
  body: JSON.stringify(body)
19760
19812
  }, __readDocumentUrl__);
19761
19813
 
19762
19814
  case 11:
19763
- data = _context18.sent;
19815
+ data = _context19.sent;
19764
19816
  returnData = [];
19765
19817
 
19766
19818
  if (Array.isArray(data.result)) {
19767
19819
  returnData = data.result;
19768
19820
  }
19769
19821
 
19770
- return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19822
+ return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19771
19823
  data: returnData
19772
19824
  }));
19773
19825
 
19774
19826
  case 17:
19775
- _context18.prev = 17;
19776
- _context18.t0 = _context18["catch"](2);
19777
- return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19778
- message: _context18.t0.message
19827
+ _context19.prev = 17;
19828
+ _context19.t0 = _context19["catch"](2);
19829
+ return _context19.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19830
+ message: _context19.t0.message
19779
19831
  })));
19780
19832
 
19781
19833
  case 20:
19782
19834
  case "end":
19783
- return _context18.stop();
19835
+ return _context19.stop();
19784
19836
  }
19785
19837
  }
19786
- }, _callee18, null, [[2, 17]]);
19838
+ }, _callee19, null, [[2, 17]]);
19787
19839
  })));
19788
- var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
19840
+ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
19789
19841
  var payload,
19790
- _ref38,
19842
+ _ref40,
19791
19843
  rejectWithValue,
19792
19844
  _payload$idnumber,
19793
19845
  idnumber,
@@ -19795,84 +19847,84 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
19795
19847
  idsourcecode,
19796
19848
  body,
19797
19849
  data,
19798
- _args19 = arguments;
19850
+ _args20 = arguments;
19799
19851
 
19800
- return regeneratorRuntime.wrap(function _callee19$(_context19) {
19852
+ return regeneratorRuntime.wrap(function _callee20$(_context20) {
19801
19853
  while (1) {
19802
- switch (_context19.prev = _context19.next) {
19854
+ switch (_context20.prev = _context20.next) {
19803
19855
  case 0:
19804
- payload = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
19805
- _ref38 = _args19.length > 1 ? _args19[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
19806
- _context19.prev = 2;
19856
+ payload = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
19857
+ _ref40 = _args20.length > 1 ? _args20[1] : undefined, rejectWithValue = _ref40.rejectWithValue;
19858
+ _context20.prev = 2;
19807
19859
  _payload$idnumber = payload.idnumber, idnumber = _payload$idnumber === void 0 ? "" : _payload$idnumber, _payload$idsourcecode = payload.idsourcecode, idsourcecode = _payload$idsourcecode === void 0 ? "" : _payload$idsourcecode;
19808
19860
  body = {
19809
19861
  db_name: dbName,
19810
19862
  filter: JSON.parse("{\n \"idnumber\":\"".concat(idnumber, "\",\"idsourcecode\":\"").concat(idsourcecode, "\"\n }")),
19811
19863
  queryid: "8ffac13e-b147-4568-a13e-ecf9c07c0d92"
19812
19864
  };
19813
- _context19.next = 7;
19865
+ _context20.next = 7;
19814
19866
  return fetchData$3({
19815
19867
  body: JSON.stringify(body)
19816
19868
  }, __baseUrl__);
19817
19869
 
19818
19870
  case 7:
19819
- data = _context19.sent;
19820
- return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19871
+ data = _context20.sent;
19872
+ return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19821
19873
  data: data
19822
19874
  }));
19823
19875
 
19824
19876
  case 11:
19825
- _context19.prev = 11;
19826
- _context19.t0 = _context19["catch"](2);
19827
- return _context19.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19828
- message: _context19.t0.message
19877
+ _context20.prev = 11;
19878
+ _context20.t0 = _context20["catch"](2);
19879
+ return _context20.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19880
+ message: _context20.t0.message
19829
19881
  })));
19830
19882
 
19831
19883
  case 14:
19832
19884
  case "end":
19833
- return _context19.stop();
19885
+ return _context20.stop();
19834
19886
  }
19835
19887
  }
19836
- }, _callee19, null, [[2, 11]]);
19888
+ }, _callee20, null, [[2, 11]]);
19837
19889
  })));
19838
- var GET_ENCOUNTER_STATUS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
19890
+ var GET_ENCOUNTER_STATUS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21() {
19839
19891
  var payload,
19840
- _ref40,
19892
+ _ref42,
19841
19893
  rejectWithValue,
19842
19894
  data,
19843
- _args20 = arguments;
19895
+ _args21 = arguments;
19844
19896
 
19845
- return regeneratorRuntime.wrap(function _callee20$(_context20) {
19897
+ return regeneratorRuntime.wrap(function _callee21$(_context21) {
19846
19898
  while (1) {
19847
- switch (_context20.prev = _context20.next) {
19899
+ switch (_context21.prev = _context21.next) {
19848
19900
  case 0:
19849
- payload = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
19850
- _ref40 = _args20.length > 1 ? _args20[1] : undefined, rejectWithValue = _ref40.rejectWithValue;
19851
- _context20.prev = 2;
19852
- _context20.next = 5;
19901
+ payload = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
19902
+ _ref42 = _args21.length > 1 ? _args21[1] : undefined, rejectWithValue = _ref42.rejectWithValue;
19903
+ _context21.prev = 2;
19904
+ _context21.next = 5;
19853
19905
  return fetchData$3({
19854
19906
  body: JSON.stringify(registerQuery.statusRead())
19855
19907
  }, __readDocumentUrl__);
19856
19908
 
19857
19909
  case 5:
19858
- data = _context20.sent;
19859
- return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19910
+ data = _context21.sent;
19911
+ return _context21.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
19860
19912
  data: data.result
19861
19913
  }));
19862
19914
 
19863
19915
  case 9:
19864
- _context20.prev = 9;
19865
- _context20.t0 = _context20["catch"](2);
19866
- return _context20.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19867
- message: _context20.t0.message
19916
+ _context21.prev = 9;
19917
+ _context21.t0 = _context21["catch"](2);
19918
+ return _context21.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
19919
+ message: _context21.t0.message
19868
19920
  })));
19869
19921
 
19870
19922
  case 12:
19871
19923
  case "end":
19872
- return _context20.stop();
19924
+ return _context21.stop();
19873
19925
  }
19874
19926
  }
19875
- }, _callee20, null, [[2, 9]]);
19927
+ }, _callee21, null, [[2, 9]]);
19876
19928
  })));
19877
19929
  var OrganizationRegisterPatientApiSlice = createSlice({
19878
19930
  name: "OrganizationRegisterPatientApiSlice",
@@ -19896,208 +19948,219 @@ var OrganizationRegisterPatientApiSlice = createSlice({
19896
19948
  getEncounterHeader: _objectSpread2({}, defaultState.Info),
19897
19949
  getEncounterStatus: _objectSpread2({}, defaultState.Info),
19898
19950
  getPractitionerType: _objectSpread2({}, defaultState.Info),
19899
- getPractitionerName: _objectSpread2({}, defaultState.Info)
19951
+ getPractitionerName: _objectSpread2({}, defaultState.Info),
19952
+ getPatient_id: _objectSpread2({}, defaultState.Info)
19900
19953
  },
19901
- extraReducers: (_extraReducers$r = {}, _defineProperty(_extraReducers$r, GET_PRACTITIONER_TYPE.fulfilled, function (state, action) {
19954
+ extraReducers: (_extraReducers$r = {}, _defineProperty(_extraReducers$r, GET_PATIENT__ID_BY_ID.fulfilled, function (state, action) {
19902
19955
  var _action$payload;
19903
19956
 
19904
- state.getPractitionerType = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
19957
+ state.getPatient_id = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
19958
+ }), _defineProperty(_extraReducers$r, GET_PATIENT__ID_BY_ID.pending, function (state, action) {
19959
+ state.getPatient_id.loading = true;
19960
+ }), _defineProperty(_extraReducers$r, GET_PATIENT__ID_BY_ID.rejected, function (state, action) {
19961
+ var _action$payload2;
19962
+
19963
+ state.getPatient_id = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
19964
+ }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_TYPE.fulfilled, function (state, action) {
19965
+ var _action$payload3;
19966
+
19967
+ state.getPractitionerType = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
19905
19968
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_TYPE.pending, function (state, action) {
19906
19969
  state.getPractitionerType.loading = true;
19907
19970
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_TYPE.rejected, function (state, action) {
19908
- var _action$payload2;
19971
+ var _action$payload4;
19909
19972
 
19910
- state.getPractitionerType = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
19973
+ state.getPractitionerType = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
19911
19974
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_NAME.fulfilled, function (state, action) {
19912
- var _action$payload3;
19975
+ var _action$payload5;
19913
19976
 
19914
- state.getPractitionerName = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
19977
+ state.getPractitionerName = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
19915
19978
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_NAME.pending, function (state, action) {
19916
19979
  state.getPractitionerName.loading = true;
19917
19980
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_NAME.rejected, function (state, action) {
19918
- var _action$payload4;
19981
+ var _action$payload6;
19919
19982
 
19920
- state.getPractitionerName = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
19983
+ state.getPractitionerName = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
19921
19984
  }), _defineProperty(_extraReducers$r, GET_PATIENT_NAME.fulfilled, function (state, action) {
19922
- var _action$payload5;
19985
+ var _action$payload7;
19923
19986
 
19924
- state.getpatientname = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
19987
+ state.getpatientname = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
19925
19988
  }), _defineProperty(_extraReducers$r, GET_PATIENT_NAME.pending, function (state, action) {
19926
19989
  state.getpatientname.loading = true;
19927
19990
  }), _defineProperty(_extraReducers$r, GET_PATIENT_NAME.rejected, function (state, action) {
19928
- var _action$payload6;
19991
+ var _action$payload8;
19929
19992
 
19930
- state.getpatientname = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
19993
+ state.getpatientname = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
19931
19994
  }), _defineProperty(_extraReducers$r, GET_PATIENT_APPOINTMENT.fulfilled, function (state, action) {
19932
- var _action$payload7;
19995
+ var _action$payload9;
19933
19996
 
19934
- state.getappointment = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
19997
+ state.getappointment = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
19935
19998
  }), _defineProperty(_extraReducers$r, GET_PATIENT_APPOINTMENT.pending, function (state, action) {
19936
19999
  state.getappointment.loading = true;
19937
20000
  }), _defineProperty(_extraReducers$r, GET_PATIENT_APPOINTMENT.rejected, function (state, action) {
19938
- var _action$payload8;
20001
+ var _action$payload10;
19939
20002
 
19940
- state.getappointment = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
20003
+ state.getappointment = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
19941
20004
  }), _defineProperty(_extraReducers$r, GET_FERERRAL.fulfilled, function (state, action) {
19942
- var _action$payload9;
20005
+ var _action$payload11;
19943
20006
 
19944
- state.getreferral = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
20007
+ state.getreferral = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
19945
20008
  }), _defineProperty(_extraReducers$r, GET_FERERRAL.pending, function (state, action) {
19946
20009
  state.getreferral.loading = true;
19947
20010
  }), _defineProperty(_extraReducers$r, GET_FERERRAL.rejected, function (state, action) {
19948
- var _action$payload10;
20011
+ var _action$payload12;
19949
20012
 
19950
- state.getreferral = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
20013
+ state.getreferral = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
19951
20014
  }), _defineProperty(_extraReducers$r, ORGANIZATION_REGISTER_PATIENT.fulfilled, function (state, action) {
19952
- var _action$payload11;
20015
+ var _action$payload13;
19953
20016
 
19954
- state.oraganizationRegisterPatient = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
20017
+ state.oraganizationRegisterPatient = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
19955
20018
  }), _defineProperty(_extraReducers$r, ORGANIZATION_REGISTER_PATIENT.pending, function (state, action) {
19956
20019
  state.oraganizationRegisterPatient.loading = true;
19957
20020
  }), _defineProperty(_extraReducers$r, ORGANIZATION_REGISTER_PATIENT.rejected, function (state, action) {
19958
- var _action$payload12;
20021
+ var _action$payload14;
19959
20022
 
19960
- state.oraganizationRegisterPatient = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
20023
+ state.oraganizationRegisterPatient = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
19961
20024
  }), _defineProperty(_extraReducers$r, ORGANIZATION_VISIT_REGISTRATION.fulfilled, function (state, action) {
19962
- var _action$payload13;
20025
+ var _action$payload15;
19963
20026
 
19964
- state.oraganizationvisitRegister = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
20027
+ state.oraganizationvisitRegister = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
19965
20028
  }), _defineProperty(_extraReducers$r, ORGANIZATION_VISIT_REGISTRATION.pending, function (state, action) {
19966
20029
  state.oraganizationvisitRegister.loading = true;
19967
20030
  }), _defineProperty(_extraReducers$r, ORGANIZATION_VISIT_REGISTRATION.rejected, function (state, action) {
19968
- var _action$payload14;
20031
+ var _action$payload16;
19969
20032
 
19970
- state.oraganizationvisitRegister = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
20033
+ state.oraganizationvisitRegister = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
19971
20034
  }), _defineProperty(_extraReducers$r, ORGANIZATION_REFERRAL_REGISTRATION.fulfilled, function (state, action) {
19972
- var _action$payload15;
20035
+ var _action$payload17;
19973
20036
 
19974
- state.oraganizationreferralRegister = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
20037
+ state.oraganizationreferralRegister = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
19975
20038
  }), _defineProperty(_extraReducers$r, ORGANIZATION_REFERRAL_REGISTRATION.pending, function (state, action) {
19976
20039
  state.oraganizationreferralRegister.loading = true;
19977
20040
  }), _defineProperty(_extraReducers$r, ORGANIZATION_REFERRAL_REGISTRATION.rejected, function (state, action) {
19978
- var _action$payload16;
20041
+ var _action$payload18;
19979
20042
 
19980
- state.oraganizationreferralRegister = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
20043
+ state.oraganizationreferralRegister = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
19981
20044
  }), _defineProperty(_extraReducers$r, ORGANIZATION_FILTER_BY_PATIENT.fulfilled, function (state, action) {
19982
- var _action$payload17;
20045
+ var _action$payload19;
19983
20046
 
19984
- state.oraganizationfilterbypatient = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
20047
+ state.oraganizationfilterbypatient = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
19985
20048
  }), _defineProperty(_extraReducers$r, ORGANIZATION_FILTER_BY_PATIENT.pending, function (state, action) {
19986
20049
  state.oraganizationfilterbypatient.loading = true;
19987
20050
  }), _defineProperty(_extraReducers$r, ORGANIZATION_FILTER_BY_PATIENT.rejected, function (state, action) {
19988
- var _action$payload18;
20051
+ var _action$payload20;
19989
20052
 
19990
- state.oraganizationfilterbypatient = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
20053
+ state.oraganizationfilterbypatient = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
19991
20054
  }), _defineProperty(_extraReducers$r, ORGANIZATION_FINANCIAL_REGISTRATION.fulfilled, function (state, action) {
19992
- var _action$payload19;
20055
+ var _action$payload21;
19993
20056
 
19994
- state.oraganizationfinancialregister = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
20057
+ state.oraganizationfinancialregister = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
19995
20058
  }), _defineProperty(_extraReducers$r, ORGANIZATION_FINANCIAL_REGISTRATION.pending, function (state, action) {
19996
20059
  state.oraganizationfinancialregister.loading = true;
19997
20060
  }), _defineProperty(_extraReducers$r, ORGANIZATION_FINANCIAL_REGISTRATION.rejected, function (state, action) {
19998
- var _action$payload20;
20061
+ var _action$payload22;
19999
20062
 
20000
- state.oraganizationfinancialregister = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
20063
+ state.oraganizationfinancialregister = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
20001
20064
  }), _defineProperty(_extraReducers$r, GET_FACILITY_TYPE.fulfilled, function (state, action) {
20002
- var _action$payload21;
20065
+ var _action$payload23;
20003
20066
 
20004
- state.specilitytype = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
20067
+ state.specilitytype = (_action$payload23 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload23 !== void 0 ? _action$payload23 : {};
20005
20068
  }), _defineProperty(_extraReducers$r, GET_FACILITY_TYPE.pending, function (state, action) {
20006
20069
  state.specilitytype.loading = true;
20007
20070
  }), _defineProperty(_extraReducers$r, GET_FACILITY_TYPE.rejected, function (state, action) {
20008
- var _action$payload22;
20071
+ var _action$payload24;
20009
20072
 
20010
- state.specilitytype = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
20073
+ state.specilitytype = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : {};
20011
20074
  }), _defineProperty(_extraReducers$r, GET_FACILITY_NAME.fulfilled, function (state, action) {
20012
- var _action$payload23;
20075
+ var _action$payload25;
20013
20076
 
20014
- state.specilityname = (_action$payload23 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload23 !== void 0 ? _action$payload23 : {};
20077
+ state.specilityname = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : {};
20015
20078
  }), _defineProperty(_extraReducers$r, GET_FACILITY_NAME.pending, function (state, action) {
20016
20079
  state.specilityname.loading = true;
20017
20080
  }), _defineProperty(_extraReducers$r, GET_FACILITY_NAME.rejected, function (state, action) {
20018
- var _action$payload24;
20081
+ var _action$payload26;
20019
20082
 
20020
- state.specilityname = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : {};
20083
+ state.specilityname = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : {};
20021
20084
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER.fulfilled, function (state, action) {
20022
- var _action$payload25;
20085
+ var _action$payload27;
20023
20086
 
20024
- state.practitioner = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : {};
20087
+ state.practitioner = (_action$payload27 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload27 !== void 0 ? _action$payload27 : {};
20025
20088
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER.pending, function (state, action) {
20026
20089
  state.practitioner.loading = true;
20027
20090
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER.rejected, function (state, action) {
20028
- var _action$payload26;
20091
+ var _action$payload28;
20029
20092
 
20030
- state.practitioner = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : {};
20093
+ state.practitioner = (_action$payload28 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload28 !== void 0 ? _action$payload28 : {};
20031
20094
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONERS.fulfilled, function (state, action) {
20032
- var _action$payload27;
20095
+ var _action$payload29;
20033
20096
 
20034
- state.practitioners = (_action$payload27 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload27 !== void 0 ? _action$payload27 : {};
20097
+ state.practitioners = (_action$payload29 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload29 !== void 0 ? _action$payload29 : {};
20035
20098
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONERS.pending, function (state, action) {
20036
20099
  state.practitioners.loading = true;
20037
20100
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONERS.rejected, function (state, action) {
20038
- var _action$payload28;
20101
+ var _action$payload30;
20039
20102
 
20040
- state.practitioners = (_action$payload28 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload28 !== void 0 ? _action$payload28 : {};
20103
+ state.practitioners = (_action$payload30 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload30 !== void 0 ? _action$payload30 : {};
20041
20104
  }), _defineProperty(_extraReducers$r, GET_SPECIALITY_DATA.fulfilled, function (state, action) {
20042
- var _action$payload29;
20105
+ var _action$payload31;
20043
20106
 
20044
- state.speciality = (_action$payload29 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload29 !== void 0 ? _action$payload29 : {};
20107
+ state.speciality = (_action$payload31 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload31 !== void 0 ? _action$payload31 : {};
20045
20108
  }), _defineProperty(_extraReducers$r, GET_SPECIALITY_DATA.pending, function (state, action) {
20046
20109
  state.speciality.loading = true;
20047
20110
  }), _defineProperty(_extraReducers$r, GET_SPECIALITY_DATA.rejected, function (state, action) {
20048
- var _action$payload30;
20111
+ var _action$payload32;
20049
20112
 
20050
- state.speciality = (_action$payload30 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload30 !== void 0 ? _action$payload30 : {};
20113
+ state.speciality = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
20051
20114
  }), _defineProperty(_extraReducers$r, GET_FINANCIAL.fulfilled, function (state, action) {
20052
- var _action$payload31;
20115
+ var _action$payload33;
20053
20116
 
20054
- state.getfinancial = (_action$payload31 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload31 !== void 0 ? _action$payload31 : {};
20117
+ state.getfinancial = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
20055
20118
  }), _defineProperty(_extraReducers$r, GET_FINANCIAL.pending, function (state, action) {
20056
20119
  state.getfinancial.loading = true;
20057
20120
  }), _defineProperty(_extraReducers$r, GET_FINANCIAL.rejected, function (state, action) {
20058
- var _action$payload32;
20121
+ var _action$payload34;
20059
20122
 
20060
- state.getfinancial = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
20123
+ state.getfinancial = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
20061
20124
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_ROLE.fulfilled, function (state, action) {
20062
- var _action$payload33;
20125
+ var _action$payload35;
20063
20126
 
20064
- state.getpractitionerrole = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
20127
+ state.getpractitionerrole = (_action$payload35 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload35 !== void 0 ? _action$payload35 : {};
20065
20128
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_ROLE.pending, function (state, action) {
20066
20129
  state.getpractitionerrole.loading = true;
20067
20130
  }), _defineProperty(_extraReducers$r, GET_PRACTITIONER_ROLE.rejected, function (state, action) {
20068
- var _action$payload34;
20131
+ var _action$payload36;
20069
20132
 
20070
- state.getpractitionerrole = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
20133
+ state.getpractitionerrole = (_action$payload36 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload36 !== void 0 ? _action$payload36 : {};
20071
20134
  }), _defineProperty(_extraReducers$r, GET_PATIENT_TYPEID.fulfilled, function (state, action) {
20072
- var _action$payload35;
20135
+ var _action$payload37;
20073
20136
 
20074
- state.getpatientid = (_action$payload35 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload35 !== void 0 ? _action$payload35 : {};
20137
+ state.getpatientid = (_action$payload37 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload37 !== void 0 ? _action$payload37 : {};
20075
20138
  }), _defineProperty(_extraReducers$r, GET_PATIENT_TYPEID.pending, function (state, action) {
20076
20139
  state.getpatientid.loading = true;
20077
20140
  }), _defineProperty(_extraReducers$r, GET_PATIENT_TYPEID.rejected, function (state, action) {
20078
- var _action$payload36;
20141
+ var _action$payload38;
20079
20142
 
20080
- state.getpatientid = (_action$payload36 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload36 !== void 0 ? _action$payload36 : {};
20143
+ state.getpatientid = (_action$payload38 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload38 !== void 0 ? _action$payload38 : {};
20081
20144
  }), _defineProperty(_extraReducers$r, GET_ENCOUNTER_HEADER.fulfilled, function (state, action) {
20082
- var _action$payload37;
20145
+ var _action$payload39;
20083
20146
 
20084
- state.getEncounterHeader = (_action$payload37 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload37 !== void 0 ? _action$payload37 : {};
20147
+ state.getEncounterHeader = (_action$payload39 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload39 !== void 0 ? _action$payload39 : {};
20085
20148
  }), _defineProperty(_extraReducers$r, GET_ENCOUNTER_HEADER.pending, function (state, action) {
20086
20149
  state.getEncounterHeader.loading = true;
20087
20150
  }), _defineProperty(_extraReducers$r, GET_ENCOUNTER_HEADER.rejected, function (state, action) {
20088
- var _action$payload38;
20151
+ var _action$payload40;
20089
20152
 
20090
- state.getEncounterHeader = (_action$payload38 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload38 !== void 0 ? _action$payload38 : {};
20153
+ state.getEncounterHeader = (_action$payload40 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload40 !== void 0 ? _action$payload40 : {};
20091
20154
  }), _defineProperty(_extraReducers$r, GET_ENCOUNTER_STATUS.fulfilled, function (state, action) {
20092
- var _action$payload39;
20155
+ var _action$payload41;
20093
20156
 
20094
- state.getEncounterStatus = (_action$payload39 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload39 !== void 0 ? _action$payload39 : {};
20157
+ state.getEncounterStatus = (_action$payload41 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload41 !== void 0 ? _action$payload41 : {};
20095
20158
  }), _defineProperty(_extraReducers$r, GET_ENCOUNTER_STATUS.pending, function (state, action) {
20096
20159
  state.getEncounterStatus.loading = true;
20097
20160
  }), _defineProperty(_extraReducers$r, GET_ENCOUNTER_STATUS.rejected, function (state, action) {
20098
- var _action$payload40;
20161
+ var _action$payload42;
20099
20162
 
20100
- state.getEncounterStatus = (_action$payload40 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload40 !== void 0 ? _action$payload40 : {};
20163
+ state.getEncounterStatus = (_action$payload42 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload42 !== void 0 ? _action$payload42 : {};
20101
20164
  }), _extraReducers$r)
20102
20165
  });
20103
20166
  var oraganizationRegisterPatientActions = {
@@ -20120,7 +20183,8 @@ var oraganizationRegisterPatientActions = {
20120
20183
  GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER,
20121
20184
  GET_ENCOUNTER_STATUS: GET_ENCOUNTER_STATUS,
20122
20185
  GET_PRACTITIONER_TYPE: GET_PRACTITIONER_TYPE,
20123
- GET_PRACTITIONER_NAME: GET_PRACTITIONER_NAME
20186
+ GET_PRACTITIONER_NAME: GET_PRACTITIONER_NAME,
20187
+ GET_PATIENT__ID_BY_ID: GET_PATIENT__ID_BY_ID
20124
20188
  };
20125
20189
  var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
20126
20190
 
@@ -21524,7 +21588,7 @@ var HIGH_PRIORITY_PATIENT = createAsyncThunk("dashboardApiSlice/highPriorityPati
21524
21588
 
21525
21589
  arr.push(_objectSpread2({
21526
21590
  profile_pic: item === null || item === void 0 ? void 0 : (_item$patient_id$ = item.patient_id[0]) === null || _item$patient_id$ === void 0 ? void 0 : (_item$patient_id$$pho = _item$patient_id$.photo[0]) === null || _item$patient_id$$pho === void 0 ? void 0 : _item$patient_id$$pho.url,
21527
- name: makeName((item === null || item === void 0 ? void 0 : (_item$patient_id = item.patient_id) === null || _item$patient_id === void 0 ? void 0 : (_item$patient_id$2 = _item$patient_id[0]) === null || _item$patient_id$2 === void 0 ? void 0 : (_item$patient_id$2$na = _item$patient_id$2.name) === null || _item$patient_id$2$na === void 0 ? void 0 : _item$patient_id$2$na[0]) || {}),
21591
+ name: makeName$1((item === null || item === void 0 ? void 0 : (_item$patient_id = item.patient_id) === null || _item$patient_id === void 0 ? void 0 : (_item$patient_id$2 = _item$patient_id[0]) === null || _item$patient_id$2 === void 0 ? void 0 : (_item$patient_id$2$na = _item$patient_id$2.name) === null || _item$patient_id$2$na === void 0 ? void 0 : _item$patient_id$2$na[0]) || {}),
21528
21592
  reasonValue: item === null || item === void 0 ? void 0 : (_item$priorityreason = item.priorityreason) === null || _item$priorityreason === void 0 ? void 0 : _item$priorityreason.ReasonDesc,
21529
21593
  isEmergency: true,
21530
21594
  patientPriority: {
@@ -21963,7 +22027,7 @@ var generateReadJSON = function generateReadJSON(data) {
21963
22027
  }) : "",
21964
22028
  //PATIENT DEATAIL
21965
22029
  patientPhoto: (_data$Encounter$patie = data === null || data === void 0 ? void 0 : (_data$Encounter5 = data.Encounter) === null || _data$Encounter5 === void 0 ? void 0 : (_data$Encounter5$pati = _data$Encounter5.patient_id) === null || _data$Encounter5$pati === void 0 ? void 0 : (_data$Encounter5$pati2 = _data$Encounter5$pati[0]) === null || _data$Encounter5$pati2 === void 0 ? void 0 : (_data$Encounter5$pati3 = _data$Encounter5$pati2.photo) === null || _data$Encounter5$pati3 === void 0 ? void 0 : _data$Encounter5$pati3[0]) !== null && _data$Encounter$patie !== void 0 ? _data$Encounter$patie : "",
21966
- patientName: makeName(data === null || data === void 0 ? void 0 : (_data$Encounter6 = data.Encounter) === null || _data$Encounter6 === void 0 ? void 0 : (_data$Encounter6$pati = _data$Encounter6.patient_id) === null || _data$Encounter6$pati === void 0 ? void 0 : (_data$Encounter6$pati2 = _data$Encounter6$pati[0].name) === null || _data$Encounter6$pati2 === void 0 ? void 0 : _data$Encounter6$pati2[0]) || "",
22030
+ patientName: makeName$1(data === null || data === void 0 ? void 0 : (_data$Encounter6 = data.Encounter) === null || _data$Encounter6 === void 0 ? void 0 : (_data$Encounter6$pati = _data$Encounter6.patient_id) === null || _data$Encounter6$pati === void 0 ? void 0 : (_data$Encounter6$pati2 = _data$Encounter6$pati[0].name) === null || _data$Encounter6$pati2 === void 0 ? void 0 : _data$Encounter6$pati2[0]) || "",
21967
22031
  patientAge: (_data$Encounter$patie2 = data === null || data === void 0 ? void 0 : (_data$Encounter7 = data.Encounter) === null || _data$Encounter7 === void 0 ? void 0 : (_data$Encounter7$pati = _data$Encounter7.patient_id) === null || _data$Encounter7$pati === void 0 ? void 0 : (_data$Encounter7$pati2 = _data$Encounter7$pati[0]) === null || _data$Encounter7$pati2 === void 0 ? void 0 : _data$Encounter7$pati2.age) !== null && _data$Encounter$patie2 !== void 0 ? _data$Encounter$patie2 : "",
21968
22032
  patientGender: (data === null || data === void 0 ? void 0 : (_data$Encounter8 = data.Encounter) === null || _data$Encounter8 === void 0 ? void 0 : (_data$Encounter8$pati = _data$Encounter8.patient_id) === null || _data$Encounter8$pati === void 0 ? void 0 : (_data$Encounter8$pati2 = _data$Encounter8$pati[0]) === null || _data$Encounter8$pati2 === void 0 ? void 0 : (_data$Encounter8$pati3 = _data$Encounter8$pati2.gender) === null || _data$Encounter8$pati3 === void 0 ? void 0 : (_data$Encounter8$pati4 = _data$Encounter8$pati3.display) === null || _data$Encounter8$pati4 === void 0 ? void 0 : _data$Encounter8$pati4.toLowerCase()) === "male" ? "M" : (data === null || data === void 0 ? void 0 : (_data$Encounter9 = data.Encounter) === null || _data$Encounter9 === void 0 ? void 0 : (_data$Encounter9$pati = _data$Encounter9.patient_id) === null || _data$Encounter9$pati === void 0 ? void 0 : (_data$Encounter9$pati2 = _data$Encounter9$pati[0]) === null || _data$Encounter9$pati2 === void 0 ? void 0 : (_data$Encounter9$pati3 = _data$Encounter9$pati2.gender) === null || _data$Encounter9$pati3 === void 0 ? void 0 : (_data$Encounter9$pati4 = _data$Encounter9$pati3.display) === null || _data$Encounter9$pati4 === void 0 ? void 0 : _data$Encounter9$pati4.toLowerCase()) === "other" ? "O" : (data === null || data === void 0 ? void 0 : (_data$Encounter10 = data.Encounter) === null || _data$Encounter10 === void 0 ? void 0 : (_data$Encounter10$pat = _data$Encounter10.patient_id) === null || _data$Encounter10$pat === void 0 ? void 0 : (_data$Encounter10$pat2 = _data$Encounter10$pat[0]) === null || _data$Encounter10$pat2 === void 0 ? void 0 : (_data$Encounter10$pat3 = _data$Encounter10$pat2.gender) === null || _data$Encounter10$pat3 === void 0 ? void 0 : (_data$Encounter10$pat4 = _data$Encounter10$pat3.display) === null || _data$Encounter10$pat4 === void 0 ? void 0 : _data$Encounter10$pat4.toLowerCase()) === "female" ? "F" : "",
21969
22033
  patientMRN: (_data$Encounter$patie3 = data === null || data === void 0 ? void 0 : (_data$Encounter11 = data.Encounter) === null || _data$Encounter11 === void 0 ? void 0 : (_data$Encounter11$pat = _data$Encounter11.patient_id) === null || _data$Encounter11$pat === void 0 ? void 0 : (_data$Encounter11$pat2 = _data$Encounter11$pat[0]) === null || _data$Encounter11$pat2 === void 0 ? void 0 : _data$Encounter11$pat2.MRN) !== null && _data$Encounter$patie3 !== void 0 ? _data$Encounter$patie3 : "",
@@ -21974,7 +22038,7 @@ var generateReadJSON = function generateReadJSON(data) {
21974
22038
  practitionerType: // data?.Encounter?.participant?.[0]?.type?.[0]?.display ?? "",
21975
22039
  (_data$Encounter$pract2 = data === null || data === void 0 ? void 0 : (_data$Encounter16 = data.Encounter) === null || _data$Encounter16 === void 0 ? void 0 : (_data$Encounter16$pra = _data$Encounter16.practitioner_details) === null || _data$Encounter16$pra === void 0 ? void 0 : (_data$Encounter16$pra2 = _data$Encounter16$pra[0]) === null || _data$Encounter16$pra2 === void 0 ? void 0 : _data$Encounter16$pra2.type) !== null && _data$Encounter$pract2 !== void 0 ? _data$Encounter$pract2 : "",
21976
22040
  practitionerRole: (_data$Encounter$parti = data === null || data === void 0 ? void 0 : (_data$Encounter17 = data.Encounter) === null || _data$Encounter17 === void 0 ? void 0 : (_data$Encounter17$par = _data$Encounter17.participant) === null || _data$Encounter17$par === void 0 ? void 0 : (_data$Encounter17$par2 = _data$Encounter17$par[0]) === null || _data$Encounter17$par2 === void 0 ? void 0 : (_data$Encounter17$par3 = _data$Encounter17$par2.Practitioner_id) === null || _data$Encounter17$par3 === void 0 ? void 0 : (_data$Encounter17$par4 = _data$Encounter17$par3[0]) === null || _data$Encounter17$par4 === void 0 ? void 0 : (_data$Encounter17$par5 = _data$Encounter17$par4.practitioner_role) === null || _data$Encounter17$par5 === void 0 ? void 0 : (_data$Encounter17$par6 = _data$Encounter17$par5[0]) === null || _data$Encounter17$par6 === void 0 ? void 0 : (_data$Encounter17$par7 = _data$Encounter17$par6.role) === null || _data$Encounter17$par7 === void 0 ? void 0 : (_data$Encounter17$par8 = _data$Encounter17$par7[0].coding) === null || _data$Encounter17$par8 === void 0 ? void 0 : (_data$Encounter17$par9 = _data$Encounter17$par8[0]) === null || _data$Encounter17$par9 === void 0 ? void 0 : _data$Encounter17$par9.display) !== null && _data$Encounter$parti !== void 0 ? _data$Encounter$parti : "",
21977
- practitioner: makeName(data === null || data === void 0 ? void 0 : (_data$Encounter18 = data.Encounter) === null || _data$Encounter18 === void 0 ? void 0 : (_data$Encounter18$par = _data$Encounter18.participant) === null || _data$Encounter18$par === void 0 ? void 0 : (_data$Encounter18$par2 = _data$Encounter18$par[0]) === null || _data$Encounter18$par2 === void 0 ? void 0 : (_data$Encounter18$par3 = _data$Encounter18$par2.Practitioner_id) === null || _data$Encounter18$par3 === void 0 ? void 0 : (_data$Encounter18$par4 = _data$Encounter18$par3[0]) === null || _data$Encounter18$par4 === void 0 ? void 0 : (_data$Encounter18$par5 = _data$Encounter18$par4.name) === null || _data$Encounter18$par5 === void 0 ? void 0 : _data$Encounter18$par5[0]) || "",
22041
+ practitioner: makeName$1(data === null || data === void 0 ? void 0 : (_data$Encounter18 = data.Encounter) === null || _data$Encounter18 === void 0 ? void 0 : (_data$Encounter18$par = _data$Encounter18.participant) === null || _data$Encounter18$par === void 0 ? void 0 : (_data$Encounter18$par2 = _data$Encounter18$par[0]) === null || _data$Encounter18$par2 === void 0 ? void 0 : (_data$Encounter18$par3 = _data$Encounter18$par2.Practitioner_id) === null || _data$Encounter18$par3 === void 0 ? void 0 : (_data$Encounter18$par4 = _data$Encounter18$par3[0]) === null || _data$Encounter18$par4 === void 0 ? void 0 : (_data$Encounter18$par5 = _data$Encounter18$par4.name) === null || _data$Encounter18$par5 === void 0 ? void 0 : _data$Encounter18$par5[0]) || "",
21978
22042
  //FOR ASSIGN QUERY
21979
22043
  practroleId: (_data$Encounter$parti2 = data === null || data === void 0 ? void 0 : (_data$Encounter19 = data.Encounter) === null || _data$Encounter19 === void 0 ? void 0 : (_data$Encounter19$par = _data$Encounter19.participant) === null || _data$Encounter19$par === void 0 ? void 0 : (_data$Encounter19$par2 = _data$Encounter19$par[0]) === null || _data$Encounter19$par2 === void 0 ? void 0 : (_data$Encounter19$par3 = _data$Encounter19$par2.Practitioner_id) === null || _data$Encounter19$par3 === void 0 ? void 0 : (_data$Encounter19$par4 = _data$Encounter19$par3[0]) === null || _data$Encounter19$par4 === void 0 ? void 0 : (_data$Encounter19$par5 = _data$Encounter19$par4.practitioner_role) === null || _data$Encounter19$par5 === void 0 ? void 0 : (_data$Encounter19$par6 = _data$Encounter19$par5[0]) === null || _data$Encounter19$par6 === void 0 ? void 0 : _data$Encounter19$par6._id) !== null && _data$Encounter$parti2 !== void 0 ? _data$Encounter$parti2 : "",
21980
22044
  practitionerId: (_data$Encounter$parti3 = data === null || data === void 0 ? void 0 : (_data$Encounter20 = data.Encounter) === null || _data$Encounter20 === void 0 ? void 0 : (_data$Encounter20$par = _data$Encounter20.participant) === null || _data$Encounter20$par === void 0 ? void 0 : (_data$Encounter20$par2 = _data$Encounter20$par[0]) === null || _data$Encounter20$par2 === void 0 ? void 0 : (_data$Encounter20$par3 = _data$Encounter20$par2.Practitioner_id) === null || _data$Encounter20$par3 === void 0 ? void 0 : _data$Encounter20$par3[0]._id) !== null && _data$Encounter$parti3 !== void 0 ? _data$Encounter$parti3 : "",
@@ -22053,7 +22117,7 @@ var generateReadJSON_Reassign = function generateReadJSON_Reassign(data) {
22053
22117
  }) : "",
22054
22118
  //PATIENT DEATAIL
22055
22119
  patientPhoto: (_data$Encounter$patie5 = data === null || data === void 0 ? void 0 : (_data$Encounter26 = data.Encounter) === null || _data$Encounter26 === void 0 ? void 0 : (_data$Encounter26$pat = _data$Encounter26.patient_id) === null || _data$Encounter26$pat === void 0 ? void 0 : (_data$Encounter26$pat2 = _data$Encounter26$pat[0]) === null || _data$Encounter26$pat2 === void 0 ? void 0 : (_data$Encounter26$pat3 = _data$Encounter26$pat2.photo) === null || _data$Encounter26$pat3 === void 0 ? void 0 : _data$Encounter26$pat3[0]) !== null && _data$Encounter$patie5 !== void 0 ? _data$Encounter$patie5 : "",
22056
- patientName: makeName(data === null || data === void 0 ? void 0 : (_data$Encounter27 = data.Encounter) === null || _data$Encounter27 === void 0 ? void 0 : (_data$Encounter27$pat = _data$Encounter27.patient_id) === null || _data$Encounter27$pat === void 0 ? void 0 : (_data$Encounter27$pat2 = _data$Encounter27$pat[0].name) === null || _data$Encounter27$pat2 === void 0 ? void 0 : _data$Encounter27$pat2[0]) || "",
22120
+ patientName: makeName$1(data === null || data === void 0 ? void 0 : (_data$Encounter27 = data.Encounter) === null || _data$Encounter27 === void 0 ? void 0 : (_data$Encounter27$pat = _data$Encounter27.patient_id) === null || _data$Encounter27$pat === void 0 ? void 0 : (_data$Encounter27$pat2 = _data$Encounter27$pat[0].name) === null || _data$Encounter27$pat2 === void 0 ? void 0 : _data$Encounter27$pat2[0]) || "",
22057
22121
  patientAge: (_data$Encounter$patie6 = data === null || data === void 0 ? void 0 : (_data$Encounter28 = data.Encounter) === null || _data$Encounter28 === void 0 ? void 0 : (_data$Encounter28$pat = _data$Encounter28.patient_id) === null || _data$Encounter28$pat === void 0 ? void 0 : (_data$Encounter28$pat2 = _data$Encounter28$pat[0]) === null || _data$Encounter28$pat2 === void 0 ? void 0 : _data$Encounter28$pat2.age) !== null && _data$Encounter$patie6 !== void 0 ? _data$Encounter$patie6 : "",
22058
22122
  patientGender: (data === null || data === void 0 ? void 0 : (_data$Encounter29 = data.Encounter) === null || _data$Encounter29 === void 0 ? void 0 : (_data$Encounter29$pat = _data$Encounter29.patient_id) === null || _data$Encounter29$pat === void 0 ? void 0 : (_data$Encounter29$pat2 = _data$Encounter29$pat[0]) === null || _data$Encounter29$pat2 === void 0 ? void 0 : (_data$Encounter29$pat3 = _data$Encounter29$pat2.gender) === null || _data$Encounter29$pat3 === void 0 ? void 0 : (_data$Encounter29$pat4 = _data$Encounter29$pat3.display) === null || _data$Encounter29$pat4 === void 0 ? void 0 : _data$Encounter29$pat4.toLowerCase()) === "male" ? "M" : (data === null || data === void 0 ? void 0 : (_data$Encounter30 = data.Encounter) === null || _data$Encounter30 === void 0 ? void 0 : (_data$Encounter30$pat = _data$Encounter30.patient_id) === null || _data$Encounter30$pat === void 0 ? void 0 : (_data$Encounter30$pat2 = _data$Encounter30$pat[0]) === null || _data$Encounter30$pat2 === void 0 ? void 0 : (_data$Encounter30$pat3 = _data$Encounter30$pat2.gender) === null || _data$Encounter30$pat3 === void 0 ? void 0 : (_data$Encounter30$pat4 = _data$Encounter30$pat3.display) === null || _data$Encounter30$pat4 === void 0 ? void 0 : _data$Encounter30$pat4.toLowerCase()) === "other" ? "O" : (data === null || data === void 0 ? void 0 : (_data$Encounter31 = data.Encounter) === null || _data$Encounter31 === void 0 ? void 0 : (_data$Encounter31$pat = _data$Encounter31.patient_id) === null || _data$Encounter31$pat === void 0 ? void 0 : (_data$Encounter31$pat2 = _data$Encounter31$pat[0]) === null || _data$Encounter31$pat2 === void 0 ? void 0 : (_data$Encounter31$pat3 = _data$Encounter31$pat2.gender) === null || _data$Encounter31$pat3 === void 0 ? void 0 : (_data$Encounter31$pat4 = _data$Encounter31$pat3.display) === null || _data$Encounter31$pat4 === void 0 ? void 0 : _data$Encounter31$pat4.toLowerCase()) === "female" ? "F" : "",
22059
22123
  patientMRN: (_data$Encounter$patie7 = data === null || data === void 0 ? void 0 : (_data$Encounter32 = data.Encounter) === null || _data$Encounter32 === void 0 ? void 0 : (_data$Encounter32$pat = _data$Encounter32.patient_id) === null || _data$Encounter32$pat === void 0 ? void 0 : (_data$Encounter32$pat2 = _data$Encounter32$pat[0]) === null || _data$Encounter32$pat2 === void 0 ? void 0 : _data$Encounter32$pat2.MRN) !== null && _data$Encounter$patie7 !== void 0 ? _data$Encounter$patie7 : "",
@@ -22064,7 +22128,7 @@ var generateReadJSON_Reassign = function generateReadJSON_Reassign(data) {
22064
22128
  practitionerType: // data?.Encounter?.participant?.[0]?.type?.[0]?.display ?? "",
22065
22129
  (_data$Encounter$pract5 = data === null || data === void 0 ? void 0 : (_data$Encounter37 = data.Encounter) === null || _data$Encounter37 === void 0 ? void 0 : (_data$Encounter37$pra = _data$Encounter37.practitioner_details) === null || _data$Encounter37$pra === void 0 ? void 0 : (_data$Encounter37$pra2 = _data$Encounter37$pra[0]) === null || _data$Encounter37$pra2 === void 0 ? void 0 : _data$Encounter37$pra2.type) !== null && _data$Encounter$pract5 !== void 0 ? _data$Encounter$pract5 : "",
22066
22130
  practitionerRole: (_data$Encounter$parti4 = data === null || data === void 0 ? void 0 : (_data$Encounter38 = data.Encounter) === null || _data$Encounter38 === void 0 ? void 0 : (_data$Encounter38$par = _data$Encounter38.participant) === null || _data$Encounter38$par === void 0 ? void 0 : (_data$Encounter38$par2 = _data$Encounter38$par[0]) === null || _data$Encounter38$par2 === void 0 ? void 0 : (_data$Encounter38$par3 = _data$Encounter38$par2.Practitioner_id) === null || _data$Encounter38$par3 === void 0 ? void 0 : (_data$Encounter38$par4 = _data$Encounter38$par3[0]) === null || _data$Encounter38$par4 === void 0 ? void 0 : (_data$Encounter38$par5 = _data$Encounter38$par4.practitioner_role) === null || _data$Encounter38$par5 === void 0 ? void 0 : (_data$Encounter38$par6 = _data$Encounter38$par5[0]) === null || _data$Encounter38$par6 === void 0 ? void 0 : (_data$Encounter38$par7 = _data$Encounter38$par6.role) === null || _data$Encounter38$par7 === void 0 ? void 0 : (_data$Encounter38$par8 = _data$Encounter38$par7[0]) === null || _data$Encounter38$par8 === void 0 ? void 0 : (_data$Encounter38$par9 = _data$Encounter38$par8.coding) === null || _data$Encounter38$par9 === void 0 ? void 0 : (_data$Encounter38$par10 = _data$Encounter38$par9[0]) === null || _data$Encounter38$par10 === void 0 ? void 0 : _data$Encounter38$par10.display) !== null && _data$Encounter$parti4 !== void 0 ? _data$Encounter$parti4 : "",
22067
- practitioner: makeName(data === null || data === void 0 ? void 0 : (_data$Encounter39 = data.Encounter) === null || _data$Encounter39 === void 0 ? void 0 : (_data$Encounter39$par = _data$Encounter39.participant) === null || _data$Encounter39$par === void 0 ? void 0 : (_data$Encounter39$par2 = _data$Encounter39$par[0]) === null || _data$Encounter39$par2 === void 0 ? void 0 : (_data$Encounter39$par3 = _data$Encounter39$par2.Practitioner_id) === null || _data$Encounter39$par3 === void 0 ? void 0 : (_data$Encounter39$par4 = _data$Encounter39$par3[0]) === null || _data$Encounter39$par4 === void 0 ? void 0 : (_data$Encounter39$par5 = _data$Encounter39$par4.name) === null || _data$Encounter39$par5 === void 0 ? void 0 : _data$Encounter39$par5[0]) || "",
22131
+ practitioner: makeName$1(data === null || data === void 0 ? void 0 : (_data$Encounter39 = data.Encounter) === null || _data$Encounter39 === void 0 ? void 0 : (_data$Encounter39$par = _data$Encounter39.participant) === null || _data$Encounter39$par === void 0 ? void 0 : (_data$Encounter39$par2 = _data$Encounter39$par[0]) === null || _data$Encounter39$par2 === void 0 ? void 0 : (_data$Encounter39$par3 = _data$Encounter39$par2.Practitioner_id) === null || _data$Encounter39$par3 === void 0 ? void 0 : (_data$Encounter39$par4 = _data$Encounter39$par3[0]) === null || _data$Encounter39$par4 === void 0 ? void 0 : (_data$Encounter39$par5 = _data$Encounter39$par4.name) === null || _data$Encounter39$par5 === void 0 ? void 0 : _data$Encounter39$par5[0]) || "",
22068
22132
  //FOR ASSIGN QUERY
22069
22133
  practroleId: (_data$Encounter$parti5 = data === null || data === void 0 ? void 0 : (_data$Encounter40 = data.Encounter) === null || _data$Encounter40 === void 0 ? void 0 : (_data$Encounter40$par = _data$Encounter40.participant) === null || _data$Encounter40$par === void 0 ? void 0 : (_data$Encounter40$par2 = _data$Encounter40$par[0]) === null || _data$Encounter40$par2 === void 0 ? void 0 : (_data$Encounter40$par3 = _data$Encounter40$par2.Practitioner_id) === null || _data$Encounter40$par3 === void 0 ? void 0 : (_data$Encounter40$par4 = _data$Encounter40$par3[0]) === null || _data$Encounter40$par4 === void 0 ? void 0 : (_data$Encounter40$par5 = _data$Encounter40$par4.practitioner_role) === null || _data$Encounter40$par5 === void 0 ? void 0 : (_data$Encounter40$par6 = _data$Encounter40$par5[0]) === null || _data$Encounter40$par6 === void 0 ? void 0 : _data$Encounter40$par6._id) !== null && _data$Encounter$parti5 !== void 0 ? _data$Encounter$parti5 : "",
22070
22134
  practitionerId: (_data$Encounter$parti6 = data === null || data === void 0 ? void 0 : (_data$Encounter41 = data.Encounter) === null || _data$Encounter41 === void 0 ? void 0 : (_data$Encounter41$par = _data$Encounter41.participant) === null || _data$Encounter41$par === void 0 ? void 0 : (_data$Encounter41$par2 = _data$Encounter41$par[0]) === null || _data$Encounter41$par2 === void 0 ? void 0 : (_data$Encounter41$par3 = _data$Encounter41$par2.Practitioner_id) === null || _data$Encounter41$par3 === void 0 ? void 0 : _data$Encounter41$par3[0]._id) !== null && _data$Encounter$parti6 !== void 0 ? _data$Encounter$parti6 : "",
@@ -22090,7 +22154,7 @@ var generateReadJSON_colseConsultation = function generateReadJSON_colseConsulta
22090
22154
  //PATIENT DEATAIL
22091
22155
  patientPhoto: (_data$patient_id$0$ph = data === null || data === void 0 ? void 0 : (_data$patient_id = data.patient_id) === null || _data$patient_id === void 0 ? void 0 : (_data$patient_id$ = _data$patient_id[0]) === null || _data$patient_id$ === void 0 ? void 0 : (_data$patient_id$$pho = _data$patient_id$.photo) === null || _data$patient_id$$pho === void 0 ? void 0 : _data$patient_id$$pho[0]) !== null && _data$patient_id$0$ph !== void 0 ? _data$patient_id$0$ph : "",
22092
22156
  // need to expand
22093
- patientName: makeName(data === null || data === void 0 ? void 0 : (_data$patient_id2 = data.patient_id) === null || _data$patient_id2 === void 0 ? void 0 : (_data$patient_id2$0$n = _data$patient_id2[0].name) === null || _data$patient_id2$0$n === void 0 ? void 0 : _data$patient_id2$0$n[0]) || "",
22157
+ patientName: makeName$1(data === null || data === void 0 ? void 0 : (_data$patient_id2 = data.patient_id) === null || _data$patient_id2 === void 0 ? void 0 : (_data$patient_id2$0$n = _data$patient_id2[0].name) === null || _data$patient_id2$0$n === void 0 ? void 0 : _data$patient_id2$0$n[0]) || "",
22094
22158
  patientAge: (_data$patient_id$0$ag = data === null || data === void 0 ? void 0 : (_data$patient_id3 = data.patient_id) === null || _data$patient_id3 === void 0 ? void 0 : (_data$patient_id3$ = _data$patient_id3[0]) === null || _data$patient_id3$ === void 0 ? void 0 : _data$patient_id3$.age) !== null && _data$patient_id$0$ag !== void 0 ? _data$patient_id$0$ag : "",
22095
22159
  patientGender: (data === null || data === void 0 ? void 0 : (_data$patient_id4 = data.patient_id) === null || _data$patient_id4 === void 0 ? void 0 : (_data$patient_id4$ = _data$patient_id4[0]) === null || _data$patient_id4$ === void 0 ? void 0 : (_data$patient_id4$$ge = _data$patient_id4$.gender) === null || _data$patient_id4$$ge === void 0 ? void 0 : (_data$patient_id4$$ge2 = _data$patient_id4$$ge.display) === null || _data$patient_id4$$ge2 === void 0 ? void 0 : _data$patient_id4$$ge2.toLowerCase()) === "male" ? "M" : (data === null || data === void 0 ? void 0 : (_data$patient_id5 = data.patient_id) === null || _data$patient_id5 === void 0 ? void 0 : (_data$patient_id5$ = _data$patient_id5[0]) === null || _data$patient_id5$ === void 0 ? void 0 : (_data$patient_id5$$ge = _data$patient_id5$.gender) === null || _data$patient_id5$$ge === void 0 ? void 0 : (_data$patient_id5$$ge2 = _data$patient_id5$$ge.display) === null || _data$patient_id5$$ge2 === void 0 ? void 0 : _data$patient_id5$$ge2.toLowerCase()) === "other" ? "O" : (data === null || data === void 0 ? void 0 : (_data$patient_id6 = data.patient_id) === null || _data$patient_id6 === void 0 ? void 0 : (_data$patient_id6$ = _data$patient_id6[0]) === null || _data$patient_id6$ === void 0 ? void 0 : (_data$patient_id6$$ge = _data$patient_id6$.gender) === null || _data$patient_id6$$ge === void 0 ? void 0 : (_data$patient_id6$$ge2 = _data$patient_id6$$ge.display) === null || _data$patient_id6$$ge2 === void 0 ? void 0 : _data$patient_id6$$ge2.toLowerCase()) === "female" ? "F" : "",
22096
22160
  patientMRN: (_data$patient_id$0$al = data === null || data === void 0 ? void 0 : (_data$patient_id7 = data.patient_id) === null || _data$patient_id7 === void 0 ? void 0 : (_data$patient_id7$ = _data$patient_id7[0]) === null || _data$patient_id7$ === void 0 ? void 0 : _data$patient_id7$.alias) !== null && _data$patient_id$0$al !== void 0 ? _data$patient_id$0$al : "",
@@ -22304,7 +22368,7 @@ var ASSIGN_PRACTITIONER_LIST = createAsyncThunk("dashboardApiSlice/assignPractit
22304
22368
  var _makeName, _val$name, _val$photo$, _val$photo, _val$_id6, _val$_key, _val$id, _val$assignedpatient, _val$id2, _val$practitioner_rol, _val$practitioner_rol2, _val$practitioner_rol3, _val$_id7, _val$practitioner_rol4, _val$practitioner_rol5, _val$practitioner_rol6;
22305
22369
 
22306
22370
  arry.push({
22307
- name: (_makeName = makeName(val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : _val$name[0])) !== null && _makeName !== void 0 ? _makeName : "",
22371
+ name: (_makeName = makeName$1(val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : _val$name[0])) !== null && _makeName !== void 0 ? _makeName : "",
22308
22372
  photo: (_val$photo$ = val === null || val === void 0 ? void 0 : (_val$photo = val.photo) === null || _val$photo === void 0 ? void 0 : _val$photo[0]) !== null && _val$photo$ !== void 0 ? _val$photo$ : "",
22309
22373
  _id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
22310
22374
  _key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
@@ -23997,6 +24061,7 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
23997
24061
 
23998
24062
  case 6:
23999
24063
  data = _context12.sent;
24064
+ debugger;
24000
24065
  arr = [];
24001
24066
  data.result.map(function (val) {
24002
24067
  var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$practitioner_det4, _val$practitioner_det5, _val$Patient2, _val$Patient2$, _val$Patient2$$name, _val$Patient3, _val$Patient3$, _val$Patient4, _val$Patient4$, _val$Patient5, _val$Patient5$, _val$Patient6, _val$Patient6$, _val$Patient6$$gender, _val$Patient7, _val$Patient7$, _val$Patient$0$pident, _val$Patient8, _val$Patient8$, _val$Patient8$$pident, _val$Patient8$$pident2, _lang, _val$Patient9, _val$Patient9$, _val$Patient9$$person, _val$Patient9$$person2, _val$Patient9$$person3, _val$Patient9$$person4, _val$Patient10, _val$Patient10$, _val$Patient10$$photo, _val$Patient10$$photo2, _val$practitioner_det6, _val$practitioner_det7, _val$practitioner_det8;
@@ -24005,7 +24070,7 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
24005
24070
  return val.display;
24006
24071
  });
24007
24072
  lang = lang ? lang : null;
24008
- arr.push({
24073
+ arr.push(_objectSpread2(_objectSpread2({}, val), {}, {
24009
24074
  Organization_id: val.Organization_id,
24010
24075
  id: "EN-" + (val === null || val === void 0 ? void 0 : (_val$_id = val._id) === null || _val$_id === void 0 ? void 0 : (_val$_id$split = _val$_id.split("/")) === null || _val$_id$split === void 0 ? void 0 : _val$_id$split[1]),
24011
24076
  eId: val === null || val === void 0 ? void 0 : val._id,
@@ -24013,7 +24078,7 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
24013
24078
  speciality: ((_val$practitioner_det = val.practitioner_details) === null || _val$practitioner_det === void 0 ? void 0 : (_val$practitioner_det2 = _val$practitioner_det[0]) === null || _val$practitioner_det2 === void 0 ? void 0 : (_val$practitioner_det3 = _val$practitioner_det2.speciality) === null || _val$practitioner_det3 === void 0 ? void 0 : (_val$practitioner_det4 = _val$practitioner_det3.coding) === null || _val$practitioner_det4 === void 0 ? void 0 : (_val$practitioner_det5 = _val$practitioner_det4[0]) === null || _val$practitioner_det5 === void 0 ? void 0 : _val$practitioner_det5.display) || "",
24014
24079
  createdAt: val.createddate,
24015
24080
  // name: val?.Patient?.[0]?.name?.[0]?.text ?? "",
24016
- name: makeName(val === null || val === void 0 ? void 0 : (_val$Patient2 = val.Patient) === null || _val$Patient2 === void 0 ? void 0 : (_val$Patient2$ = _val$Patient2[0]) === null || _val$Patient2$ === void 0 ? void 0 : (_val$Patient2$$name = _val$Patient2$.name) === null || _val$Patient2$$name === void 0 ? void 0 : _val$Patient2$$name[0]),
24081
+ name: makeName$1(val === null || val === void 0 ? void 0 : (_val$Patient2 = val.Patient) === null || _val$Patient2 === void 0 ? void 0 : (_val$Patient2$ = _val$Patient2[0]) === null || _val$Patient2$ === void 0 ? void 0 : (_val$Patient2$$name = _val$Patient2$.name) === null || _val$Patient2$$name === void 0 ? void 0 : _val$Patient2$$name[0]),
24017
24082
  pID: val === null || val === void 0 ? void 0 : (_val$Patient3 = val.Patient) === null || _val$Patient3 === void 0 ? void 0 : (_val$Patient3$ = _val$Patient3[0]) === null || _val$Patient3$ === void 0 ? void 0 : _val$Patient3$._id,
24018
24083
  patientid: val === null || val === void 0 ? void 0 : (_val$Patient4 = val.Patient) === null || _val$Patient4 === void 0 ? void 0 : (_val$Patient4$ = _val$Patient4[0]) === null || _val$Patient4$ === void 0 ? void 0 : _val$Patient4$.id,
24019
24084
  mrn: val === null || val === void 0 ? void 0 : (_val$Patient5 = val.Patient) === null || _val$Patient5 === void 0 ? void 0 : (_val$Patient5$ = _val$Patient5[0]) === null || _val$Patient5$ === void 0 ? void 0 : _val$Patient5$.alias,
@@ -24023,26 +24088,26 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
24023
24088
  lang: (_lang = lang) === null || _lang === void 0 ? void 0 : _lang.join(", "),
24024
24089
  img: getImgUrl(val === null || val === void 0 ? void 0 : (_val$Patient9 = val.Patient) === null || _val$Patient9 === void 0 ? void 0 : (_val$Patient9$ = _val$Patient9[0]) === null || _val$Patient9$ === void 0 ? void 0 : (_val$Patient9$$person = _val$Patient9$.personInfo) === null || _val$Patient9$$person === void 0 ? void 0 : (_val$Patient9$$person2 = _val$Patient9$$person[0]) === null || _val$Patient9$$person2 === void 0 ? void 0 : (_val$Patient9$$person3 = _val$Patient9$$person2.photo) === null || _val$Patient9$$person3 === void 0 ? void 0 : (_val$Patient9$$person4 = _val$Patient9$$person3[0]) === null || _val$Patient9$$person4 === void 0 ? void 0 : _val$Patient9$$person4.fileid) || getImgUrl(val === null || val === void 0 ? void 0 : (_val$Patient10 = val.Patient) === null || _val$Patient10 === void 0 ? void 0 : (_val$Patient10$ = _val$Patient10[0]) === null || _val$Patient10$ === void 0 ? void 0 : (_val$Patient10$$photo = _val$Patient10$.photo) === null || _val$Patient10$$photo === void 0 ? void 0 : (_val$Patient10$$photo2 = _val$Patient10$$photo[0]) === null || _val$Patient10$$photo2 === void 0 ? void 0 : _val$Patient10$$photo2.fileid),
24025
24090
  facilityName: (_val$practitioner_det6 = (_val$practitioner_det7 = val.practitioner_details) === null || _val$practitioner_det7 === void 0 ? void 0 : (_val$practitioner_det8 = _val$practitioner_det7[0]) === null || _val$practitioner_det8 === void 0 ? void 0 : _val$practitioner_det8.clinic) !== null && _val$practitioner_det6 !== void 0 ? _val$practitioner_det6 : ""
24026
- });
24091
+ }));
24027
24092
  });
24028
24093
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
24029
24094
  data: (_arr$ = arr[0]) !== null && _arr$ !== void 0 ? _arr$ : {}
24030
24095
  }));
24031
24096
 
24032
- case 12:
24033
- _context12.prev = 12;
24097
+ case 13:
24098
+ _context12.prev = 13;
24034
24099
  _context12.t0 = _context12["catch"](2);
24035
24100
  alert(_context12.t0.message);
24036
24101
  return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
24037
24102
  message: _context12.t0.message
24038
24103
  })));
24039
24104
 
24040
- case 16:
24105
+ case 17:
24041
24106
  case "end":
24042
24107
  return _context12.stop();
24043
24108
  }
24044
24109
  }
24045
- }, _callee12, null, [[2, 12]]);
24110
+ }, _callee12, null, [[2, 13]]);
24046
24111
  })));
24047
24112
  var chiefCompilenceMastersSlice = createSlice({
24048
24113
  name: "chiefCompilenceMastersApiSlice",
@@ -25649,7 +25714,7 @@ var radOrderActions = _objectSpread2({}, actionInfo$3);
25649
25714
  var radOrderSlice$1 = radOrderSlice.reducer;
25650
25715
 
25651
25716
  var generateJSON$6 = function generateJSON(payload, orgId) {
25652
- var _payload$patientid, _payload$encountertyp, _payload$encounterid, _payload$prescription, _payload$Prescription, _payload$name$drugTyp, _payload$name, _payload$presNature$v, _payload$presNature, _payload$presMode$val, _payload$presMode, _payload$priority$val, _payload$priority, _payload$status, _payload$statusreason, _payload$intent, _payload$orderPrivile, _payload$privilegeAle, _payload$workFlowStat, _payload$name$value, _payload$name2, _payload$formCode, _payload$DefaultRoute, _payload$DefaultRoute2, _payload$dosageTypeIn, _payload$unitValue$va, _payload$unitValue, _payload$drug_categor, _payload$drug_categor2, _payload$dispensing_p, _payload$dispensing_p2, _payload$IVDosageDura, _payload$IVDosageDura2, _payload$unitsTypes$v, _payload$unitsTypes, _payload$ivInfusionRa, _payload$ivInfusionRa2, _payload$doseOption$v, _payload$doseOption, _payload$occurStartDa, _payload$occurEndDate, _payload$totPresQtyUO, _payload$totPresQtyUO2, _payload$totDispQty, _payload$totDispQtyUO, _payload$totBilledQty, _payload$totBilledQty2, _payload$totReturnedQ, _payload$PRNYN, _payload$prnComment, _payload$direction, _payload$diagnosis, _payload$reasonCode, _payload$indication$v, _payload$indication, _payload$patientInstr, _payload$patientInstr2, _payload$patientInstr3, _payload$notes, _payload$parentPresId, _payload$presGroupRef, _payload$noofRefillsA, _payload$initialDispe, _payload$refillDispen, _payload$maxRefillDis, _payload$pendingRefil, _payload$prescription2, _payload$substitution, _payload$substitution2, _payload$substituteRe, _payload$broughtFromH, _payload$IVIngredient, _payload$createdby, _payload$updatedby, _payload$statushistor, _payload$statusperiod;
25717
+ var _payload$patientid, _payload$encountertyp, _payload$encounterid, _payload$prescription, _payload$Prescription, _payload$name$drugTyp, _payload$name, _payload$presNature$v, _payload$presNature, _payload$presMode$val, _payload$presMode, _payload$priority$val, _payload$priority, _payload$status, _payload$statusreason, _payload$intent, _payload$orderPrivile, _payload$privilegeAle, _payload$workFlowStat, _payload$name$value, _payload$name2, _payload$formCode, _payload$DefaultRoute, _payload$DefaultRoute2, _payload$dosageTypeIn, _payload$unitValue$va, _payload$unitValue, _payload$drug_categor, _payload$drug_categor2, _payload$dispensing_p, _payload$dispensing_p2, _payload$IVDosageDura, _payload$IVDosageDura2, _payload$unitsTypes$v, _payload$unitsTypes, _payload$ivInfusionRa, _payload$ivInfusionRa2, _payload$doseOption$v, _payload$doseOption, _payload$occurStartDa, _payload$occurEndDate, _payload$totPresQtyUO, _payload$totPresQtyUO2, _payload$totDispQty, _payload$totDispQtyUO, _payload$totBilledQty, _payload$totBilledQty2, _payload$totReturnedQ, _payload$PRNYN, _payload$prnComment, _payload$direction, _payload$diagnosis, _payload$reasonCode, _payload$indication$v, _payload$indication, _payload$patientInstr, _payload$patientInstr2, _payload$patientInstr3, _payload$notes, _payload$parentPresId, _payload$presGroupRef, _payload$noofRefillsA, _payload$initialDispe, _payload$refillDispen, _payload$maxRefillDis, _payload$pendingRefil, _payload$prescription2, _payload$substitution, _payload$substitution2, _payload$substituteRe, _payload$broughtFromH, _payload$IVIngredient, _payload$createdby, _payload$updatedby, _payload$statushistor, _payload$statusperiod, _payload$name$nameLab, _payload$name3;
25653
25718
 
25654
25719
  var filter = {};
25655
25720
 
@@ -25742,10 +25807,157 @@ var generateJSON$6 = function generateJSON(payload, orgId) {
25742
25807
  "updatedby": (_payload$updatedby = payload.updatedby) !== null && _payload$updatedby !== void 0 ? _payload$updatedby : "",
25743
25808
  "statushistory": (_payload$statushistor = payload.statushistory) !== null && _payload$statushistor !== void 0 ? _payload$statushistor : [],
25744
25809
  "statusperiod": (_payload$statusperiod = payload.statusperiod) !== null && _payload$statusperiod !== void 0 ? _payload$statusperiod : 0,
25745
- "components": payload.additiveDetails ? getComponent$1(payload.additiveDetails) : []
25810
+ "components": payload.additiveDetails ? getComponent$1(payload.additiveDetails) : [],
25811
+ //new key
25812
+ "isfirststatorder": false,
25813
+ "SlidingScaleDose": "",
25814
+ "addtictive": [],
25815
+ "id": 0,
25816
+ "orgEntityType": "",
25817
+ "prescriptionType": "",
25818
+ "orderdescription": (_payload$name$nameLab = (_payload$name3 = payload.name) === null || _payload$name3 === void 0 ? void 0 : _payload$name3.nameLabel) !== null && _payload$name$nameLab !== void 0 ? _payload$name$nameLab : "",
25819
+ "ivInfusionTime": 0,
25820
+ "ivInfusionTimeUom": "",
25821
+ "FreqDetls": []
25746
25822
  }
25747
25823
  })];
25748
25824
  };
25825
+ var generate_NIFI_JSON = function generate_NIFI_JSON(payload) {
25826
+ var _payload$ORGID, _payload$patientid2, _payload$encountertyp2, _payload$encounterid2, _payload$prescription3, _payload$Prescription2, _payload$name$drugTyp2, _payload$name4, _payload$presNature$v2, _payload$presNature2, _payload$presMode$val2, _payload$presMode2, _payload$priority$val2, _payload$priority2, _payload$status2, _payload$statusreason2, _payload$intent2, _payload$orderPrivile2, _payload$privilegeAle2, _payload$workFlowStat2, _payload$name$value2, _payload$name5, _payload$formCode2, _payload$DefaultRoute3, _payload$DefaultRoute4, _payload$dosageTypeIn2, _payload$unitValue$va2, _payload$unitValue2, _payload$drug_categor3, _payload$drug_categor4, _payload$dispensing_p3, _payload$dispensing_p4, _payload$IVDosageDura3, _payload$IVDosageDura4, _payload$unitsTypes$v2, _payload$unitsTypes2, _payload$ivInfusionRa3, _payload$ivInfusionRa4, _payload$doseOption$v2, _payload$doseOption2, _payload$name$nameLab2, _payload$name6, _payload$orderStartDa, _payload$orderEndDate, _payload$indication$v2, _payload$indication2, _payload$patientInstr4, _payload$patientInstr5, _payload$patientInstr6, _payload$notes2, _payload$parentPresId2, _payload$presGroupRef2, _payload$noofRefillsA2, _payload$initialDispe2, _payload$refillDispen2, _payload$maxRefillDis2, _payload$pendingRefil2, _payload$prescription4, _payload$substitution3, _payload$substitution4, _payload$substituteRe2, _payload$broughtFromH2, _payload$IVIngredient2, _payload$statusperiod2, _payload$unitsTypes$F, _payload$unitsTypes3;
25827
+
25828
+ debugger;
25829
+ return [{
25830
+ "db_name": dbName,
25831
+ "entity": "PH_OrderLine",
25832
+ "is_metadata": true,
25833
+ "metadataId": "04ecb73d-f048-44ce-8563-c9be015812dd",
25834
+ "doc": {
25835
+ "isfirststatorder": false,
25836
+ "SlidingScaleDose": "",
25837
+ "org_Id": (_payload$ORGID = payload === null || payload === void 0 ? void 0 : payload.ORGID) !== null && _payload$ORGID !== void 0 ? _payload$ORGID : "",
25838
+ "addtictive": [],
25839
+ "id": 0,
25840
+ "orgEntityType": "",
25841
+ "patient_Id": (_payload$patientid2 = payload.patientid) !== null && _payload$patientid2 !== void 0 ? _payload$patientid2 : "",
25842
+ "encountertype": (_payload$encountertyp2 = payload.encountertype) !== null && _payload$encountertyp2 !== void 0 ? _payload$encountertyp2 : "",
25843
+ "encounter_Id": (_payload$encounterid2 = payload.encounterid) !== null && _payload$encounterid2 !== void 0 ? _payload$encounterid2 : "",
25844
+ "prescriptionType": "",
25845
+ //"CodingMaster/11035"
25846
+ "prescriptionId": (_payload$prescription3 = payload.prescriptionId) !== null && _payload$prescription3 !== void 0 ? _payload$prescription3 : "",
25847
+ "PrescriptionDate": (_payload$Prescription2 = payload.PrescriptionDate) !== null && _payload$Prescription2 !== void 0 ? _payload$Prescription2 : 0,
25848
+ "drugType": (_payload$name$drugTyp2 = payload === null || payload === void 0 ? void 0 : (_payload$name4 = payload.name) === null || _payload$name4 === void 0 ? void 0 : _payload$name4.drugTypeId) !== null && _payload$name$drugTyp2 !== void 0 ? _payload$name$drugTyp2 : "",
25849
+ "presNature": (_payload$presNature$v2 = (_payload$presNature2 = payload.presNature) === null || _payload$presNature2 === void 0 ? void 0 : _payload$presNature2.value) !== null && _payload$presNature$v2 !== void 0 ? _payload$presNature$v2 : "",
25850
+ "presMode": (_payload$presMode$val2 = (_payload$presMode2 = payload.presMode) === null || _payload$presMode2 === void 0 ? void 0 : _payload$presMode2.value) !== null && _payload$presMode$val2 !== void 0 ? _payload$presMode$val2 : "",
25851
+ "priority": (_payload$priority$val2 = (_payload$priority2 = payload.priority) === null || _payload$priority2 === void 0 ? void 0 : _payload$priority2.value) !== null && _payload$priority$val2 !== void 0 ? _payload$priority$val2 : "",
25852
+ "status": (_payload$status2 = payload.status) !== null && _payload$status2 !== void 0 ? _payload$status2 : "",
25853
+ "statusreason": (_payload$statusreason2 = payload.statusreason) !== null && _payload$statusreason2 !== void 0 ? _payload$statusreason2 : "",
25854
+ "intent": (_payload$intent2 = payload.intent) !== null && _payload$intent2 !== void 0 ? _payload$intent2 : "",
25855
+ "orderPrivilegeLevel": (_payload$orderPrivile2 = payload.orderPrivilegeLevel) !== null && _payload$orderPrivile2 !== void 0 ? _payload$orderPrivile2 : "",
25856
+ "privilegeAlertMessageTxt": (_payload$privilegeAle2 = payload.privilegeAlertMessageTxt) !== null && _payload$privilegeAle2 !== void 0 ? _payload$privilegeAle2 : "",
25857
+ "workFlowStatus": (_payload$workFlowStat2 = payload.workFlowStatus) !== null && _payload$workFlowStat2 !== void 0 ? _payload$workFlowStat2 : "",
25858
+ "drugCode": (_payload$name$value2 = (_payload$name5 = payload.name) === null || _payload$name5 === void 0 ? void 0 : _payload$name5.value) !== null && _payload$name$value2 !== void 0 ? _payload$name$value2 : "",
25859
+ "formCode": (_payload$formCode2 = payload.formCode) !== null && _payload$formCode2 !== void 0 ? _payload$formCode2 : "",
25860
+ "routeCode": (_payload$DefaultRoute3 = payload === null || payload === void 0 ? void 0 : (_payload$DefaultRoute4 = payload.DefaultRouteCode) === null || _payload$DefaultRoute4 === void 0 ? void 0 : _payload$DefaultRoute4.value) !== null && _payload$DefaultRoute3 !== void 0 ? _payload$DefaultRoute3 : "",
25861
+ "dosageTypeIndicator": (_payload$dosageTypeIn2 = payload.dosageTypeIndicator) !== null && _payload$dosageTypeIn2 !== void 0 ? _payload$dosageTypeIn2 : "",
25862
+ "dosageValue": payload.doseMeasurementValue ? parseInt(payload.doseMeasurementValue) : 0,
25863
+ "dosageUOM": (_payload$unitValue$va2 = (_payload$unitValue2 = payload.unitValue) === null || _payload$unitValue2 === void 0 ? void 0 : _payload$unitValue2.value) !== null && _payload$unitValue$va2 !== void 0 ? _payload$unitValue$va2 : "",
25864
+ "drug_category": (_payload$drug_categor3 = (_payload$drug_categor4 = payload.drug_category) === null || _payload$drug_categor4 === void 0 ? void 0 : _payload$drug_categor4.value) !== null && _payload$drug_categor3 !== void 0 ? _payload$drug_categor3 : "",
25865
+ "dispensing_pharmacy": (_payload$dispensing_p3 = (_payload$dispensing_p4 = payload.dispensing_pharmacy) === null || _payload$dispensing_p4 === void 0 ? void 0 : _payload$dispensing_p4.value) !== null && _payload$dispensing_p3 !== void 0 ? _payload$dispensing_p3 : "",
25866
+ "IVDosageDurationValue": payload.IVDosageDurationValue ? parseInt(payload.IVDosageDurationValue) : 0,
25867
+ "IVDosageDurationUOM": (_payload$IVDosageDura3 = (_payload$IVDosageDura4 = payload.IVDosageDurationUOM) === null || _payload$IVDosageDura4 === void 0 ? void 0 : _payload$IVDosageDura4.value) !== null && _payload$IVDosageDura3 !== void 0 ? _payload$IVDosageDura3 : "",
25868
+ "dosageFreqCode": (_payload$unitsTypes$v2 = (_payload$unitsTypes2 = payload.unitsTypes) === null || _payload$unitsTypes2 === void 0 ? void 0 : _payload$unitsTypes2.value) !== null && _payload$unitsTypes$v2 !== void 0 ? _payload$unitsTypes$v2 : "",
25869
+ "ivInfusionRateValue": payload.ivInfusionRateValue ? parseInt(payload.ivInfusionRateValue) : 0,
25870
+ "ivInfusionRateUOM": (_payload$ivInfusionRa3 = (_payload$ivInfusionRa4 = payload.ivInfusionRateUOM) === null || _payload$ivInfusionRa4 === void 0 ? void 0 : _payload$ivInfusionRa4.value) !== null && _payload$ivInfusionRa3 !== void 0 ? _payload$ivInfusionRa3 : "",
25871
+ "dosageDurationValue": payload.dosetime ? parseInt(payload.dosetime) : 0,
25872
+ "dosageDurationUOM": (_payload$doseOption$v2 = (_payload$doseOption2 = payload.doseOption) === null || _payload$doseOption2 === void 0 ? void 0 : _payload$doseOption2.value) !== null && _payload$doseOption$v2 !== void 0 ? _payload$doseOption$v2 : "",
25873
+ "orderdescription": (_payload$name$nameLab2 = (_payload$name6 = payload.name) === null || _payload$name6 === void 0 ? void 0 : _payload$name6.nameLabel) !== null && _payload$name$nameLab2 !== void 0 ? _payload$name$nameLab2 : "",
25874
+ "ivInfusionTime": 0,
25875
+ "ivInfusionTimeUom": "",
25876
+ "useAsSlidingScaleDose": [],
25877
+ "occurStartDateTime": (_payload$orderStartDa = payload === null || payload === void 0 ? void 0 : payload.orderStartDate) !== null && _payload$orderStartDa !== void 0 ? _payload$orderStartDa : 0,
25878
+ "occurEndDateTime": (_payload$orderEndDate = payload === null || payload === void 0 ? void 0 : payload.orderEndDate) !== null && _payload$orderEndDate !== void 0 ? _payload$orderEndDate : 0,
25879
+ "totPresQty": 0,
25880
+ "totPresQtyUOM": "",
25881
+ "totDispQty": 0,
25882
+ "totDispQtyUOM": "",
25883
+ "totBilledQty": 0,
25884
+ "totBilledQtyUOM": "",
25885
+ "totReturnedQty": 0,
25886
+ "PRNYN": false,
25887
+ "prnComment": "",
25888
+ "direction": "",
25889
+ "diagnosis": [],
25890
+ "reasonCode": "",
25891
+ "indication": (_payload$indication$v2 = (_payload$indication2 = payload.indication) === null || _payload$indication2 === void 0 ? void 0 : _payload$indication2.value) !== null && _payload$indication$v2 !== void 0 ? _payload$indication$v2 : "",
25892
+ //"CodingMaster/10794",
25893
+ "patientInstruction": (_payload$patientInstr4 = (_payload$patientInstr5 = payload.patientInstruction) === null || _payload$patientInstr5 === void 0 ? void 0 : _payload$patientInstr5.value) !== null && _payload$patientInstr4 !== void 0 ? _payload$patientInstr4 : "",
25894
+ //"CodingMaster/10700"
25895
+ "patientInstructiondesc": (_payload$patientInstr6 = payload.patientInstructiondesc) !== null && _payload$patientInstr6 !== void 0 ? _payload$patientInstr6 : "",
25896
+ "notes": (_payload$notes2 = payload.notes) !== null && _payload$notes2 !== void 0 ? _payload$notes2 : "",
25897
+ "parentPresId": (_payload$parentPresId2 = payload.parentPresId) !== null && _payload$parentPresId2 !== void 0 ? _payload$parentPresId2 : "",
25898
+ "presGroupRefId": (_payload$presGroupRef2 = payload.presGroupRefId) !== null && _payload$presGroupRef2 !== void 0 ? _payload$presGroupRef2 : "",
25899
+ "requestor": payload.requestor ? getrequestor$1(payload.requestor) : [],
25900
+ "performer": payload.performer ? getPerformer$1(payload.performer) : [],
25901
+ "noofRefillsAllowed": (_payload$noofRefillsA2 = payload.noofRefillsAllowed) !== null && _payload$noofRefillsA2 !== void 0 ? _payload$noofRefillsA2 : 0,
25902
+ "initialDispenseDurn": (_payload$initialDispe2 = payload.initialDispenseDurn) !== null && _payload$initialDispe2 !== void 0 ? _payload$initialDispe2 : 0,
25903
+ "refillDispenseIntervalDays": (_payload$refillDispen2 = payload.refillDispenseIntervalDays) !== null && _payload$refillDispen2 !== void 0 ? _payload$refillDispen2 : 0,
25904
+ "maxRefillDispenseDurn": (_payload$maxRefillDis2 = payload.maxRefillDispenseDurn) !== null && _payload$maxRefillDis2 !== void 0 ? _payload$maxRefillDis2 : 0,
25905
+ "pendingRefillCount": (_payload$pendingRefil2 = payload.pendingRefillCount) !== null && _payload$pendingRefil2 !== void 0 ? _payload$pendingRefil2 : "",
25906
+ "prescriptionValidityPeriodDays": (_payload$prescription4 = payload.prescriptionValidityPeriodDays) !== null && _payload$prescription4 !== void 0 ? _payload$prescription4 : 0,
25907
+ "substitutionAllowed": (_payload$substitution3 = payload.substitutionAllowed) !== null && _payload$substitution3 !== void 0 ? _payload$substitution3 : false,
25908
+ "substitutionAllowedTypes": (_payload$substitution4 = payload.substitutionAllowedTypes) !== null && _payload$substitution4 !== void 0 ? _payload$substitution4 : "",
25909
+ "substituteReasonCode": (_payload$substituteRe2 = payload.substituteReasonCode) !== null && _payload$substituteRe2 !== void 0 ? _payload$substituteRe2 : "",
25910
+ "broughtFromHome": (_payload$broughtFromH2 = payload.broughtFromHome) !== null && _payload$broughtFromH2 !== void 0 ? _payload$broughtFromH2 : false,
25911
+ "IVIngredientDescription": (_payload$IVIngredient2 = payload.IVIngredientDescription) !== null && _payload$IVIngredient2 !== void 0 ? _payload$IVIngredient2 : "",
25912
+ "statushistory": [],
25913
+ "statusperiod": (_payload$statusperiod2 = payload.statusperiod) !== null && _payload$statusperiod2 !== void 0 ? _payload$statusperiod2 : 0,
25914
+ "components": payload.additiveDetails ? getComponent$1(payload.additiveDetails) : [],
25915
+ // "FreqDetls": [
25916
+ // {
25917
+ // "remarks": "Morning",
25918
+ // "dose": "",
25919
+ // "time": "08:00",
25920
+ // "baseFreq": "",
25921
+ // "weekDay": "",
25922
+ // "day": 0,
25923
+ // "fromDay": 0,
25924
+ // "toDay": 0,
25925
+ // "fromDate": 0,
25926
+ // "toDate": 0,
25927
+ // "adminDosageInstruction": ""
25928
+ // },
25929
+ // {
25930
+ // "remarks": "Noon",
25931
+ // "dose": "",
25932
+ // "time": "12:00",
25933
+ // "baseFreq": "",
25934
+ // "weekDay": "",
25935
+ // "day": 0,
25936
+ // "fromDay": 0,
25937
+ // "toDay": 0,
25938
+ // "fromDate": 0,
25939
+ // "toDate": 0,
25940
+ // "adminDosageInstruction": ""
25941
+ // },
25942
+ // {
25943
+ // "remarks": "Night",
25944
+ // "dose": "",
25945
+ // "time": "20:00",
25946
+ // "baseFreq": "",
25947
+ // "weekDay": "",
25948
+ // "day": 0,
25949
+ // "fromDay": 0,
25950
+ // "toDay": 0,
25951
+ // "fromDate": 0,
25952
+ // "toDate": 0,
25953
+ // "adminDosageInstruction": ""
25954
+ // }
25955
+ // ],
25956
+ "FreqDetls": (_payload$unitsTypes$F = payload === null || payload === void 0 ? void 0 : (_payload$unitsTypes3 = payload.unitsTypes) === null || _payload$unitsTypes3 === void 0 ? void 0 : _payload$unitsTypes3.FreqDetls) !== null && _payload$unitsTypes$F !== void 0 ? _payload$unitsTypes$F : [],
25957
+ "nextrefilldate": 0
25958
+ }
25959
+ }];
25960
+ };
25749
25961
 
25750
25962
  var getuseAsSlidingScaleDose$1 = function getuseAsSlidingScaleDose(list) {
25751
25963
  var arr = [];
@@ -29693,7 +29905,7 @@ var generateResJson$3 = function generateResJson(dataList, arr) {
29693
29905
  orderBy: {
29694
29906
  value: (_val$Requestor$0$prac6 = val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.id) !== null && _val$Requestor$0$prac6 !== void 0 ? _val$Requestor$0$prac6 : "",
29695
29907
  practitioner_id: (_val$Requestor$0$prac7 = val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.practitioner_id) !== null && _val$Requestor$0$prac7 !== void 0 ? _val$Requestor$0$prac7 : "",
29696
- label: (_makeName = makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})) !== null && _makeName !== void 0 ? _makeName : ""
29908
+ label: (_makeName = makeName$1((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})) !== null && _makeName !== void 0 ? _makeName : ""
29697
29909
  }
29698
29910
  },
29699
29911
  indication: {
@@ -29868,7 +30080,7 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
29868
30080
  orderBy: {
29869
30081
  value: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.id,
29870
30082
  practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.practitioner_id,
29871
- label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
30083
+ label: makeName$1((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
29872
30084
  }
29873
30085
  },
29874
30086
  indication: {
@@ -31364,7 +31576,7 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
31364
31576
  // val.name[0]?.suffix[0]?.coding.display
31365
31577
  // ) {
31366
31578
  arr2.push({
31367
- label: makeName((val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : _val$name2[0]) || {}),
31579
+ label: makeName$1((val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : _val$name2[0]) || {}),
31368
31580
  value: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : "",
31369
31581
  practitioner_id: (_val$practitioner_id = val === null || val === void 0 ? void 0 : val.practitioner_id) !== null && _val$practitioner_id !== void 0 ? _val$practitioner_id : ""
31370
31582
  }); // }
@@ -32148,8 +32360,9 @@ var queries$5 = {
32148
32360
  // "return_fields": "MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})"
32149
32361
  // }`,
32150
32362
  drugMaster: function drugMaster(input_text) {
32151
- return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"filter\":\"(like(DrugMaster.ShortDesc,'%").concat(input_text, "%',true) || like(DrugMaster.LongDesc,'%").concat(input_text, "%',true) || like(DrugMaster.DrugCode,'%").concat(input_text, "%',true)) && DrugMaster.activestatus==true\",\n \"limit\":{\n \"count\":100,\n \"offset\":0\n },\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})\"\n }");
32363
+ return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"filter\":\"(like(DrugMaster.ShortDesc,'%").concat(input_text, "%',true) || like(DrugMaster.LongDesc,'%").concat(input_text, "%',true) || like(DrugMaster.DrugCode,'%").concat(input_text, "%',true)) && DrugMaster.activestatus==true\",\n \"limit\":{\n \"count\":100,\n \"offset\":0\n },\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode),FrequencyRules:(for freq in TO_ARRAY(DrugMaster.FrequencyRules) return merge(document(freq),{freqcode:document(document(freq).freqcode),doseUOM:document(document(freq).doseUOM),durnUOM:document(document(freq).durnUOM),InfuseRateUom:document(document(freq).InfuseRateUom),InfuseOverDurType:document(document(freq).InfuseOverDurType)}))})\"\n }");
32152
32364
  },
32365
+ // "return_fields": "MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})"
32153
32366
  getMedications: function getMedications(id) {
32154
32367
  return "{\n \"db_name\": \"".concat(dbName, "\",\n \"filter\": \"PH_OrderLine.patient_Id=='").concat(id, "'\",\n \"entity\": \"PH_OrderLine\",\n \"return_fields\": \"MERGE(PH_OrderLine, { patient_Id:(FOR pname IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).name) RETURN MERGE(DOCUMENT(PH_OrderLine.patient_Id), { name:DOCUMENT(pname), telecom:(FOR ptel IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).telecom) RETURN DOCUMENT(ptel)), martialStatus:(FOR mstatus IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).martialStatus) RETURN DOCUMENT(mstatus)) } ) ) ,org_Id:MERGE(DOCUMENT(PH_OrderLine.org_Id), { telecom:(FOR otel IN TO_ARRAY(DOCUMENT(PH_OrderLine.org_Id).telecom) RETURN DOCUMENT(otel) ), address:(FOR oadd IN TO_ARRAY(DOCUMENT(PH_OrderLine.org_Id).address) RETURN DOCUMENT(oadd) ) }) ,encounter_Id:DOCUMENT(PH_OrderLine.encounter_Id) ,dosageDurationUOM:DOCUMENT(PH_OrderLine.dosageDurationUOM) ,dosageFreqCode:DOCUMENT(PH_OrderLine.dosageFreqCode) ,dosageUOM:DOCUMENT(PH_OrderLine.dosageUOM) ,drugCode:DOCUMENT(PH_OrderLine.drugCode) ,drugType:DOCUMENT(PH_OrderLine.drugType) , createdby:(FOR hn IN TO_ARRAY(DOCUMENT(PH_OrderLine.createdby).name) RETURN MERGE(DOCUMENT(PH_OrderLine.createdby),{name:DOCUMENT(hn)})) , updatedby:(FOR hn IN TO_ARRAY(DOCUMENT(PH_OrderLine.updatedby).name) RETURN MERGE(DOCUMENT(PH_OrderLine.updatedby),{name:DOCUMENT(hn)})) , statushistory:(FOR sth IN TO_ARRAY(PH_OrderLine.statushistory) RETURN MERGE(sth,{PersonID:(FOR hn IN TO_ARRAY(DOCUMENT(sth.PersonID).name) RETURN MERGE(DOCUMENT(sth.PersonID),{name:DOCUMENT(hn)}))})) } )\"\n }");
32155
32368
  },
@@ -32342,7 +32555,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
32342
32555
  data = _context2.sent;
32343
32556
  arr = [];
32344
32557
  data.result.map(function (val) {
32345
- var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid, _val$LongDesc, _val$DrugCategory, _val$DefaultRouteCode;
32558
+ var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid, _val$LongDesc, _val$DrugCategory, _val$DefaultRouteCode, _val$FrequencyRules$, _val$FrequencyRules, _val$FrequencyRules$2, _val$FrequencyRules$3, _val$FrequencyRules2, _val$FrequencyRules2$, _val$FrequencyRules3, _val$FrequencyRules3$, _val$FrequencyRules3$2, _val$FrequencyRules4, _val$FrequencyRules4$, _val$FrequencyRules4$2, _val$FrequencyRules5, _val$FrequencyRules5$, _val$FrequencyRules5$2, _val$FrequencyRules6, _val$FrequencyRules6$, _val$FrequencyRules6$2, _val$FrequencyRules7, _val$FrequencyRules7$, _val$FrequencyRules7$2, _val$FrequencyRules8, _val$FrequencyRules8$, _val$FrequencyRules8$2, _val$FrequencyRules9, _val$FrequencyRules9$, _val$FrequencyRules9$2, _val$FrequencyRules10, _val$FrequencyRules11, _val$FrequencyRules12, _val$FrequencyRules13, _val$FrequencyRules14, _val$FrequencyRules15, _val$FrequencyRules16, _val$FrequencyRules17, _val$FrequencyRules18, _val$FrequencyRules19, _val$FrequencyRules20, _val$FrequencyRules21, _val$FrequencyRules22, _val$FrequencyRules23, _val$FrequencyRules24, _val$FrequencyRules25, _val$FrequencyRules26, _val$FrequencyRules27, _val$FrequencyRules28, _val$FrequencyRules29, _val$FrequencyRules30, _val$FrequencyRules$4, _val$FrequencyRules31, _val$FrequencyRules32, _val$FrequencyRules33, _val$FrequencyRules34, _val$FrequencyRules35, _val$FrequencyRules36;
32346
32559
 
32347
32560
  var json = {
32348
32561
  value: val === null || val === void 0 ? void 0 : val._id,
@@ -32359,15 +32572,46 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
32359
32572
  LongDesc_: (_val$LongDesc = val === null || val === void 0 ? void 0 : val.LongDesc) !== null && _val$LongDesc !== void 0 ? _val$LongDesc : "",
32360
32573
  DrugCode_: val === null || val === void 0 ? void 0 : val.DrugCode,
32361
32574
  DrugCategory: (_val$DrugCategory = val === null || val === void 0 ? void 0 : val.DrugCategory) !== null && _val$DrugCategory !== void 0 ? _val$DrugCategory : "",
32362
- DefaultRouteCode: (_val$DefaultRouteCode = val === null || val === void 0 ? void 0 : val.DefaultRouteCode) !== null && _val$DefaultRouteCode !== void 0 ? _val$DefaultRouteCode : "" // formValue
32575
+ DefaultRouteCode: (_val$DefaultRouteCode = val === null || val === void 0 ? void 0 : val.DefaultRouteCode) !== null && _val$DefaultRouteCode !== void 0 ? _val$DefaultRouteCode : "",
32576
+ //new values
32577
+ doseVal: (_val$FrequencyRules$ = val === null || val === void 0 ? void 0 : (_val$FrequencyRules = val.FrequencyRules) === null || _val$FrequencyRules === void 0 ? void 0 : (_val$FrequencyRules$2 = _val$FrequencyRules[0]) === null || _val$FrequencyRules$2 === void 0 ? void 0 : _val$FrequencyRules$2.doseval) !== null && _val$FrequencyRules$ !== void 0 ? _val$FrequencyRules$ : "",
32578
+ durationcode: (_val$FrequencyRules$3 = val === null || val === void 0 ? void 0 : (_val$FrequencyRules2 = val.FrequencyRules) === null || _val$FrequencyRules2 === void 0 ? void 0 : (_val$FrequencyRules2$ = _val$FrequencyRules2[0]) === null || _val$FrequencyRules2$ === void 0 ? void 0 : _val$FrequencyRules2$.durationcode) !== null && _val$FrequencyRules$3 !== void 0 ? _val$FrequencyRules$3 : "",
32579
+ doseUOM: {
32580
+ id: val === null || val === void 0 ? void 0 : (_val$FrequencyRules3 = val.FrequencyRules) === null || _val$FrequencyRules3 === void 0 ? void 0 : (_val$FrequencyRules3$ = _val$FrequencyRules3[0]) === null || _val$FrequencyRules3$ === void 0 ? void 0 : (_val$FrequencyRules3$2 = _val$FrequencyRules3$.doseUOM) === null || _val$FrequencyRules3$2 === void 0 ? void 0 : _val$FrequencyRules3$2._key,
32581
+ label: (val === null || val === void 0 ? void 0 : (_val$FrequencyRules4 = val.FrequencyRules) === null || _val$FrequencyRules4 === void 0 ? void 0 : (_val$FrequencyRules4$ = _val$FrequencyRules4[0]) === null || _val$FrequencyRules4$ === void 0 ? void 0 : (_val$FrequencyRules4$2 = _val$FrequencyRules4$.doseUOM) === null || _val$FrequencyRules4$2 === void 0 ? void 0 : _val$FrequencyRules4$2.UOM) && (val === null || val === void 0 ? void 0 : (_val$FrequencyRules5 = val.FrequencyRules) === null || _val$FrequencyRules5 === void 0 ? void 0 : (_val$FrequencyRules5$ = _val$FrequencyRules5[0]) === null || _val$FrequencyRules5$ === void 0 ? void 0 : (_val$FrequencyRules5$2 = _val$FrequencyRules5$.doseUOM) === null || _val$FrequencyRules5$2 === void 0 ? void 0 : _val$FrequencyRules5$2.shortdesc) ? (val === null || val === void 0 ? void 0 : (_val$FrequencyRules6 = val.FrequencyRules) === null || _val$FrequencyRules6 === void 0 ? void 0 : (_val$FrequencyRules6$ = _val$FrequencyRules6[0]) === null || _val$FrequencyRules6$ === void 0 ? void 0 : (_val$FrequencyRules6$2 = _val$FrequencyRules6$.doseUOM) === null || _val$FrequencyRules6$2 === void 0 ? void 0 : _val$FrequencyRules6$2.UOM) + " - " + (val === null || val === void 0 ? void 0 : (_val$FrequencyRules7 = val.FrequencyRules) === null || _val$FrequencyRules7 === void 0 ? void 0 : (_val$FrequencyRules7$ = _val$FrequencyRules7[0]) === null || _val$FrequencyRules7$ === void 0 ? void 0 : (_val$FrequencyRules7$2 = _val$FrequencyRules7$.doseUOM) === null || _val$FrequencyRules7$2 === void 0 ? void 0 : _val$FrequencyRules7$2.shortdesc) : "",
32582
+ value: val === null || val === void 0 ? void 0 : (_val$FrequencyRules8 = val.FrequencyRules) === null || _val$FrequencyRules8 === void 0 ? void 0 : (_val$FrequencyRules8$ = _val$FrequencyRules8[0]) === null || _val$FrequencyRules8$ === void 0 ? void 0 : (_val$FrequencyRules8$2 = _val$FrequencyRules8$.doseUOM) === null || _val$FrequencyRules8$2 === void 0 ? void 0 : _val$FrequencyRules8$2._id
32583
+ },
32584
+ freqCode: {
32585
+ id: val === null || val === void 0 ? void 0 : (_val$FrequencyRules9 = val.FrequencyRules) === null || _val$FrequencyRules9 === void 0 ? void 0 : (_val$FrequencyRules9$ = _val$FrequencyRules9[0]) === null || _val$FrequencyRules9$ === void 0 ? void 0 : (_val$FrequencyRules9$2 = _val$FrequencyRules9$.freqcode) === null || _val$FrequencyRules9$2 === void 0 ? void 0 : _val$FrequencyRules9$2._key,
32586
+ label: (val === null || val === void 0 ? void 0 : (_val$FrequencyRules10 = val.FrequencyRules) === null || _val$FrequencyRules10 === void 0 ? void 0 : (_val$FrequencyRules11 = _val$FrequencyRules10[0]) === null || _val$FrequencyRules11 === void 0 ? void 0 : (_val$FrequencyRules12 = _val$FrequencyRules11.freqcode) === null || _val$FrequencyRules12 === void 0 ? void 0 : _val$FrequencyRules12.freqcode) && (val === null || val === void 0 ? void 0 : (_val$FrequencyRules13 = val.FrequencyRules) === null || _val$FrequencyRules13 === void 0 ? void 0 : (_val$FrequencyRules14 = _val$FrequencyRules13[0]) === null || _val$FrequencyRules14 === void 0 ? void 0 : (_val$FrequencyRules15 = _val$FrequencyRules14.freqcode) === null || _val$FrequencyRules15 === void 0 ? void 0 : _val$FrequencyRules15.shortdesc) ? (val === null || val === void 0 ? void 0 : (_val$FrequencyRules16 = val.FrequencyRules) === null || _val$FrequencyRules16 === void 0 ? void 0 : (_val$FrequencyRules17 = _val$FrequencyRules16[0]) === null || _val$FrequencyRules17 === void 0 ? void 0 : (_val$FrequencyRules18 = _val$FrequencyRules17.freqcode) === null || _val$FrequencyRules18 === void 0 ? void 0 : _val$FrequencyRules18.freqcode) + " - " + (val === null || val === void 0 ? void 0 : (_val$FrequencyRules19 = val.FrequencyRules) === null || _val$FrequencyRules19 === void 0 ? void 0 : (_val$FrequencyRules20 = _val$FrequencyRules19[0]) === null || _val$FrequencyRules20 === void 0 ? void 0 : (_val$FrequencyRules21 = _val$FrequencyRules20.freqcode) === null || _val$FrequencyRules21 === void 0 ? void 0 : _val$FrequencyRules21.shortdesc) : "",
32587
+ value: val === null || val === void 0 ? void 0 : (_val$FrequencyRules22 = val.FrequencyRules) === null || _val$FrequencyRules22 === void 0 ? void 0 : (_val$FrequencyRules23 = _val$FrequencyRules22[0]) === null || _val$FrequencyRules23 === void 0 ? void 0 : (_val$FrequencyRules24 = _val$FrequencyRules23.freqcode) === null || _val$FrequencyRules24 === void 0 ? void 0 : _val$FrequencyRules24._id,
32588
+ freqCode: val === null || val === void 0 ? void 0 : (_val$FrequencyRules25 = val.FrequencyRules) === null || _val$FrequencyRules25 === void 0 ? void 0 : (_val$FrequencyRules26 = _val$FrequencyRules25[0]) === null || _val$FrequencyRules26 === void 0 ? void 0 : (_val$FrequencyRules27 = _val$FrequencyRules26.freqcode) === null || _val$FrequencyRules27 === void 0 ? void 0 : _val$FrequencyRules27.freqcode
32589
+ },
32590
+ durationCode: {
32591
+ id: val === null || val === void 0 ? void 0 : (_val$FrequencyRules28 = val.FrequencyRules) === null || _val$FrequencyRules28 === void 0 ? void 0 : (_val$FrequencyRules29 = _val$FrequencyRules28[0]) === null || _val$FrequencyRules29 === void 0 ? void 0 : (_val$FrequencyRules30 = _val$FrequencyRules29.durnUOM) === null || _val$FrequencyRules30 === void 0 ? void 0 : _val$FrequencyRules30._key,
32592
+ label: (_val$FrequencyRules$4 = val === null || val === void 0 ? void 0 : (_val$FrequencyRules31 = val.FrequencyRules) === null || _val$FrequencyRules31 === void 0 ? void 0 : (_val$FrequencyRules32 = _val$FrequencyRules31[0]) === null || _val$FrequencyRules32 === void 0 ? void 0 : (_val$FrequencyRules33 = _val$FrequencyRules32.durnUOM) === null || _val$FrequencyRules33 === void 0 ? void 0 : _val$FrequencyRules33.shortdesc) !== null && _val$FrequencyRules$4 !== void 0 ? _val$FrequencyRules$4 : "",
32593
+ value: val === null || val === void 0 ? void 0 : (_val$FrequencyRules34 = val.FrequencyRules) === null || _val$FrequencyRules34 === void 0 ? void 0 : (_val$FrequencyRules35 = _val$FrequencyRules34[0]) === null || _val$FrequencyRules35 === void 0 ? void 0 : (_val$FrequencyRules36 = _val$FrequencyRules35.durnUOM) === null || _val$FrequencyRules36 === void 0 ? void 0 : _val$FrequencyRules36._id
32594
+ } // formValue
32363
32595
 
32364
32596
  };
32365
- arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
32366
- name: val === null || val === void 0 ? void 0 : val.ShortDesc,
32367
- label: (val === null || val === void 0 ? void 0 : val.DrugCode) + " - " + (val === null || val === void 0 ? void 0 : val.ShortDesc) + " - " + (val === null || val === void 0 ? void 0 : val.LongDesc) // label: val?.ShortDesc
32368
- // label: `${val.ShortDesc ?? ""} - ${json.StrengthValues} ${json.StrengthUOM}`,
32369
32597
 
32370
- }));
32598
+ if ((val === null || val === void 0 ? void 0 : val.ShortDesc) === (val === null || val === void 0 ? void 0 : val.LongDesc)) {
32599
+ arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
32600
+ name: val === null || val === void 0 ? void 0 : val.ShortDesc,
32601
+ label: (val === null || val === void 0 ? void 0 : val.DrugCode) + " - " + (val === null || val === void 0 ? void 0 : val.ShortDesc),
32602
+ nameLabel: val === null || val === void 0 ? void 0 : val.ShortDesc // label: val?.ShortDesc
32603
+ // label: `${val.ShortDesc ?? ""} - ${json.StrengthValues} ${json.StrengthUOM}`,
32604
+
32605
+ }));
32606
+ } else {
32607
+ arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
32608
+ name: val === null || val === void 0 ? void 0 : val.ShortDesc,
32609
+ label: (val === null || val === void 0 ? void 0 : val.DrugCode) + " - " + (val === null || val === void 0 ? void 0 : val.ShortDesc) + " - " + (val === null || val === void 0 ? void 0 : val.LongDesc),
32610
+ nameLabel: val === null || val === void 0 ? void 0 : val.ShortDesc // label: val?.ShortDesc
32611
+ // label: `${val.ShortDesc ?? ""} - ${json.StrengthValues} ${json.StrengthUOM}`,
32612
+
32613
+ }));
32614
+ }
32371
32615
  });
32372
32616
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
32373
32617
  data: arr
@@ -32463,12 +32707,10 @@ var STRENGTHUOM_MASTER = createAsyncThunk("MedicationMastersSlice/strengthUom_ma
32463
32707
  data = _context4.sent;
32464
32708
  arr = [];
32465
32709
  data.result.map(function (val) {
32466
- var _val$UOM;
32467
-
32468
32710
  arr.push({
32469
- value: val._id,
32470
- label: (_val$UOM = val.UOM) !== null && _val$UOM !== void 0 ? _val$UOM : "",
32471
- id: val.id
32711
+ value: val === null || val === void 0 ? void 0 : val._id,
32712
+ label: (val === null || val === void 0 ? void 0 : val.UOM) && (val === null || val === void 0 ? void 0 : val.shortdesc) ? (val === null || val === void 0 ? void 0 : val.UOM) + " - " + (val === null || val === void 0 ? void 0 : val.shortdesc) : "",
32713
+ id: val === null || val === void 0 ? void 0 : val.id
32472
32714
  });
32473
32715
  });
32474
32716
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -32840,6 +33082,34 @@ var DOSAGEFORM_MASTER = createAsyncThunk("MedicationMastersSlice/DosageForm_mast
32840
33082
  }
32841
33083
  }, _callee11, null, [[2, 11]]);
32842
33084
  })));
33085
+
33086
+ var constructFreqDetls = function constructFreqDetls(data) {
33087
+ debugger;
33088
+ var arr = [];
33089
+
33090
+ if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
33091
+ data.map(function (val) {
33092
+ var _val$basefreq, _val$day;
33093
+
33094
+ arr.push({
33095
+ remarks: val === null || val === void 0 ? void 0 : val.remarks,
33096
+ dose: "",
33097
+ time: "",
33098
+ baseFreq: val === null || val === void 0 ? void 0 : (_val$basefreq = val.basefreq) === null || _val$basefreq === void 0 ? void 0 : _val$basefreq._key,
33099
+ weekDay: "",
33100
+ day: val === null || val === void 0 ? void 0 : (_val$day = val.day) === null || _val$day === void 0 ? void 0 : _val$day.id,
33101
+ fromDay: 0,
33102
+ toDay: 0,
33103
+ fromDate: 0,
33104
+ toDate: 0,
33105
+ adminDosageInstruction: ""
33106
+ });
33107
+ });
33108
+ }
33109
+
33110
+ return arr;
33111
+ };
33112
+
32843
33113
  var FREQUENCYMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/FrequencyMaster_masters", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
32844
33114
  var payload,
32845
33115
  _ref24,
@@ -32864,12 +33134,14 @@ var FREQUENCYMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/FrequencyM
32864
33134
  data = _context12.sent;
32865
33135
  arr = [];
32866
33136
  data.result.map(function (val) {
32867
- var _val$shortdesc7;
33137
+ var _val$scheduleline;
32868
33138
 
32869
33139
  arr.push({
32870
- value: val._id,
32871
- label: (_val$shortdesc7 = val.shortdesc) !== null && _val$shortdesc7 !== void 0 ? _val$shortdesc7 : "",
32872
- id: val.id
33140
+ value: val === null || val === void 0 ? void 0 : val._id,
33141
+ label: (val === null || val === void 0 ? void 0 : val.freqcode) && (val === null || val === void 0 ? void 0 : val.shortdesc) ? (val === null || val === void 0 ? void 0 : val.freqcode) + " - " + (val === null || val === void 0 ? void 0 : val.shortdesc) : "",
33142
+ id: val === null || val === void 0 ? void 0 : val.id,
33143
+ freqCode: val === null || val === void 0 ? void 0 : val.freqcode,
33144
+ FreqDetls: constructFreqDetls((_val$scheduleline = val === null || val === void 0 ? void 0 : val.scheduleline) !== null && _val$scheduleline !== void 0 ? _val$scheduleline : [])
32873
33145
  });
32874
33146
  });
32875
33147
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -32914,12 +33186,12 @@ var DURATIONTYPE_MASTER = createAsyncThunk("MedicationMastersSlice/DurationType_
32914
33186
  data = _context13.sent;
32915
33187
  arr = [];
32916
33188
  data.result.map(function (val) {
32917
- var _val$shortdesc8, _val$shortdesc$, _val$shortdesc9;
33189
+ var _val$shortdesc7, _val$shortdesc$, _val$shortdesc8;
32918
33190
 
32919
33191
  arr.push({
32920
33192
  value: val._id,
32921
- label: (_val$shortdesc8 = val.shortdesc) !== null && _val$shortdesc8 !== void 0 ? _val$shortdesc8 : "",
32922
- type: (_val$shortdesc$ = (_val$shortdesc9 = val.shortdesc) === null || _val$shortdesc9 === void 0 ? void 0 : _val$shortdesc9[0]) !== null && _val$shortdesc$ !== void 0 ? _val$shortdesc$ : "",
33193
+ label: (_val$shortdesc7 = val.shortdesc) !== null && _val$shortdesc7 !== void 0 ? _val$shortdesc7 : "",
33194
+ type: (_val$shortdesc$ = (_val$shortdesc8 = val.shortdesc) === null || _val$shortdesc8 === void 0 ? void 0 : _val$shortdesc8[0]) !== null && _val$shortdesc$ !== void 0 ? _val$shortdesc$ : "",
32923
33195
  id: val.id
32924
33196
  });
32925
33197
  });
@@ -33016,11 +33288,11 @@ var DRUGCATEGORY_MASTER = createAsyncThunk("MedicationMastersSlice/DrugCategory_
33016
33288
  data = _context15.sent;
33017
33289
  arr = [];
33018
33290
  data.result.map(function (val) {
33019
- var _val$shortdesc10;
33291
+ var _val$shortdesc9;
33020
33292
 
33021
33293
  arr.push({
33022
33294
  value: val._id,
33023
- label: (_val$shortdesc10 = val.shortdesc) !== null && _val$shortdesc10 !== void 0 ? _val$shortdesc10 : "",
33295
+ label: (_val$shortdesc9 = val.shortdesc) !== null && _val$shortdesc9 !== void 0 ? _val$shortdesc9 : "",
33024
33296
  id: val.id
33025
33297
  });
33026
33298
  });
@@ -33567,11 +33839,11 @@ var INFUSIONRATEUOM_MASTER = createAsyncThunk("MedicationMastersSlice/InfusionRa
33567
33839
  data = _context26.sent;
33568
33840
  arr = [];
33569
33841
  data.result.map(function (val) {
33570
- var _val$shortdesc11;
33842
+ var _val$shortdesc10;
33571
33843
 
33572
33844
  arr.push({
33573
33845
  value: val._id,
33574
- label: (_val$shortdesc11 = val.shortdesc) !== null && _val$shortdesc11 !== void 0 ? _val$shortdesc11 : "",
33846
+ label: (_val$shortdesc10 = val.shortdesc) !== null && _val$shortdesc10 !== void 0 ? _val$shortdesc10 : "",
33575
33847
  id: val.id
33576
33848
  });
33577
33849
  });
@@ -33617,11 +33889,11 @@ var TOTALVOLUMEUOM_MASTER = createAsyncThunk("MedicationMastersSlice/TotalVolume
33617
33889
  data = _context27.sent;
33618
33890
  arr = [];
33619
33891
  data.result.map(function (val) {
33620
- var _val$shortdesc12;
33892
+ var _val$shortdesc11;
33621
33893
 
33622
33894
  arr.push({
33623
33895
  value: val._id,
33624
- label: (_val$shortdesc12 = val.shortdesc) !== null && _val$shortdesc12 !== void 0 ? _val$shortdesc12 : "",
33896
+ label: (_val$shortdesc11 = val.shortdesc) !== null && _val$shortdesc11 !== void 0 ? _val$shortdesc11 : "",
33625
33897
  id: val.id
33626
33898
  });
33627
33899
  });
@@ -33717,11 +33989,11 @@ var BASESCHEDULE_MASTER = createAsyncThunk("MedicationMastersSlice/BaseSchedule_
33717
33989
  data = _context29.sent;
33718
33990
  arr = [];
33719
33991
  data.result.map(function (val) {
33720
- var _val$shortdesc13;
33992
+ var _val$shortdesc12;
33721
33993
 
33722
33994
  arr.push({
33723
33995
  value: val._id,
33724
- label: (_val$shortdesc13 = val.shortdesc) !== null && _val$shortdesc13 !== void 0 ? _val$shortdesc13 : "",
33996
+ label: (_val$shortdesc12 = val.shortdesc) !== null && _val$shortdesc12 !== void 0 ? _val$shortdesc12 : "",
33725
33997
  id: val.id
33726
33998
  });
33727
33999
  });
@@ -34220,7 +34492,7 @@ var ALERT_CODES = createAsyncThunk("medicationsSlice/alert_codes", /*#__PURE__*/
34220
34492
  var payload,
34221
34493
  _ref2,
34222
34494
  rejectWithValue,
34223
- list,
34495
+ _list,
34224
34496
  data,
34225
34497
  code,
34226
34498
  _args = arguments;
@@ -34232,10 +34504,10 @@ var ALERT_CODES = createAsyncThunk("medicationsSlice/alert_codes", /*#__PURE__*/
34232
34504
  payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
34233
34505
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
34234
34506
  _context.prev = 2;
34235
- list = payload.list;
34507
+ _list = payload.list;
34236
34508
  _context.next = 6;
34237
34509
  return fetchData$3({
34238
- body: JSON.stringify(codeQuery.AllergyCodes(list))
34510
+ body: JSON.stringify(codeQuery.AllergyCodes(_list))
34239
34511
  }, __readDocumentUrl__);
34240
34512
 
34241
34513
  case 6:
@@ -34267,7 +34539,7 @@ var DRUG_CODES = createAsyncThunk("medicationsSlice/drug_codes", /*#__PURE__*/_a
34267
34539
  var payload,
34268
34540
  _ref4,
34269
34541
  rejectWithValue,
34270
- list,
34542
+ _list2,
34271
34543
  data,
34272
34544
  code,
34273
34545
  _args2 = arguments;
@@ -34279,10 +34551,10 @@ var DRUG_CODES = createAsyncThunk("medicationsSlice/drug_codes", /*#__PURE__*/_a
34279
34551
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
34280
34552
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
34281
34553
  _context2.prev = 2;
34282
- list = payload.list;
34554
+ _list2 = payload.list;
34283
34555
  _context2.next = 6;
34284
34556
  return fetchData$3({
34285
- body: JSON.stringify(codeQuery.DrugCodes(list))
34557
+ body: JSON.stringify(codeQuery.DrugCodes(_list2))
34286
34558
  }, __readDocumentUrl__);
34287
34559
 
34288
34560
  case 6:
@@ -34318,7 +34590,15 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
34318
34590
  _data$Result$,
34319
34591
  _data$Result$$propert,
34320
34592
  _data$Result$$propert2,
34321
- list,
34593
+ _data$Result2,
34594
+ _data$Result2$,
34595
+ _data$Result2$$proper,
34596
+ _data$Result2$$proper2,
34597
+ _data$Result3,
34598
+ _data$Result3$,
34599
+ _data$Result3$$proper,
34600
+ _data$Result3$$proper2,
34601
+ _list3,
34322
34602
  orgData,
34323
34603
  body,
34324
34604
  data,
@@ -34331,7 +34611,7 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
34331
34611
  payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
34332
34612
  _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
34333
34613
  _context3.prev = 2;
34334
- list = payload;
34614
+ _list3 = payload;
34335
34615
  _context3.next = 6;
34336
34616
  return fetchData$3({
34337
34617
  body: queries$5.getOrganizationId(payload.orgId)
@@ -34339,7 +34619,7 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
34339
34619
 
34340
34620
  case 6:
34341
34621
  orgData = _context3.sent;
34342
- body = generateJSON$6(list, orgData.result[0]);
34622
+ body = generateJSON$6(_list3, orgData.result[0]);
34343
34623
  _context3.next = 10;
34344
34624
  return fetchData$3({
34345
34625
  body: JSON.stringify(body)
@@ -34348,7 +34628,11 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
34348
34628
  case 10:
34349
34629
  data = _context3.sent;
34350
34630
  return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34351
- data: data === null || data === void 0 ? void 0 : (_data$Result = data.Result) === null || _data$Result === void 0 ? void 0 : (_data$Result$ = _data$Result[0]) === null || _data$Result$ === void 0 ? void 0 : (_data$Result$$propert = _data$Result$.properties) === null || _data$Result$$propert === void 0 ? void 0 : (_data$Result$$propert2 = _data$Result$$propert.doc) === null || _data$Result$$propert2 === void 0 ? void 0 : _data$Result$$propert2._id
34631
+ data: {
34632
+ orderId: data === null || data === void 0 ? void 0 : (_data$Result = data.Result) === null || _data$Result === void 0 ? void 0 : (_data$Result$ = _data$Result[0]) === null || _data$Result$ === void 0 ? void 0 : (_data$Result$$propert = _data$Result$.properties) === null || _data$Result$$propert === void 0 ? void 0 : (_data$Result$$propert2 = _data$Result$$propert.doc) === null || _data$Result$$propert2 === void 0 ? void 0 : _data$Result$$propert2._id,
34633
+ drugCode: data === null || data === void 0 ? void 0 : (_data$Result2 = data.Result) === null || _data$Result2 === void 0 ? void 0 : (_data$Result2$ = _data$Result2[0]) === null || _data$Result2$ === void 0 ? void 0 : (_data$Result2$$proper = _data$Result2$.properties) === null || _data$Result2$$proper === void 0 ? void 0 : (_data$Result2$$proper2 = _data$Result2$$proper.doc) === null || _data$Result2$$proper2 === void 0 ? void 0 : _data$Result2$$proper2.drugCode,
34634
+ _key: data === null || data === void 0 ? void 0 : (_data$Result3 = data.Result) === null || _data$Result3 === void 0 ? void 0 : (_data$Result3$ = _data$Result3[0]) === null || _data$Result3$ === void 0 ? void 0 : (_data$Result3$$proper = _data$Result3$.properties) === null || _data$Result3$$proper === void 0 ? void 0 : (_data$Result3$$proper2 = _data$Result3$$proper.doc) === null || _data$Result3$$proper2 === void 0 ? void 0 : _data$Result3$$proper2._key
34635
+ }
34352
34636
  }));
34353
34637
 
34354
34638
  case 14:
@@ -34366,16 +34650,10 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
34366
34650
  }
34367
34651
  }, _callee3, null, [[2, 14]]);
34368
34652
  })));
34369
- var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
34653
+ var SAVE_NIFI_MEDICATIONS = createAsyncThunk("medicationsSlice/save_nifi_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
34370
34654
  var payload,
34371
34655
  _ref8,
34372
34656
  rejectWithValue,
34373
- _list$status,
34374
- _data$Result2,
34375
- _data$Result2$,
34376
- _data$Result2$$proper,
34377
- _data$Result2$$proper2,
34378
- list,
34379
34657
  body,
34380
34658
  data,
34381
34659
  _args4 = arguments;
@@ -34387,17 +34665,130 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
34387
34665
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
34388
34666
  _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
34389
34667
  _context4.prev = 2;
34390
- list = payload; // const states = getState();
34668
+ debugger;
34669
+ body = generate_NIFI_JSON(payload);
34670
+ debugger;
34671
+ _context4.next = 8;
34672
+ return fetchData$3({
34673
+ body: JSON.stringify(body)
34674
+ }, __OrderlinewithQueue__);
34675
+
34676
+ case 8:
34677
+ data = _context4.sent;
34678
+ debugger;
34679
+ return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34680
+ data: data
34681
+ }));
34682
+
34683
+ case 13:
34684
+ _context4.prev = 13;
34685
+ _context4.t0 = _context4["catch"](2);
34686
+ console.log(_context4.t0);
34687
+ return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34688
+ message: _context4.t0.message
34689
+ })));
34690
+
34691
+ case 17:
34692
+ case "end":
34693
+ return _context4.stop();
34694
+ }
34695
+ }
34696
+ }, _callee4, null, [[2, 13]]);
34697
+ })));
34698
+ var BULK_SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/bulk_save_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
34699
+ var payload,
34700
+ _ref10,
34701
+ rejectWithValue,
34702
+ getState,
34703
+ _data$Result4,
34704
+ _data$Result4$,
34705
+ _data$Result4$$proper,
34706
+ _data$Result4$$proper2,
34707
+ _key,
34708
+ drugCode,
34709
+ dataJson,
34710
+ data,
34711
+ _args5 = arguments;
34712
+
34713
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
34714
+ while (1) {
34715
+ switch (_context5.prev = _context5.next) {
34716
+ case 0:
34717
+ payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
34718
+ _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue, getState = _ref10.getState;
34719
+ _context5.prev = 2;
34720
+ _key = payload._key, drugCode = payload.drugCode;
34721
+ dataJson = [{
34722
+ "db_name": dbName,
34723
+ "entity": "PH_OrderLine",
34724
+ "is_metadata": true,
34725
+ "metadataId": "04ecb73d-f048-44ce-8563-c9be015812dd",
34726
+ "filter": {
34727
+ "_key": _key !== null && _key !== void 0 ? _key : ''
34728
+ },
34729
+ "doc": {
34730
+ "status": "CodingMaster/10704",
34731
+ "drugCode": drugCode !== null && drugCode !== void 0 ? drugCode : ''
34732
+ }
34733
+ }];
34734
+ _context5.next = 7;
34735
+ return fetchData$3({
34736
+ body: JSON.stringify(dataJson)
34737
+ }, __OrderlinewithQueue__);
34738
+
34739
+ case 7:
34740
+ data = _context5.sent;
34741
+ return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34742
+ data: list.isAdd ? !(data === null || data === void 0 ? void 0 : data.error) : data === null || data === void 0 ? void 0 : (_data$Result4 = data.Result) === null || _data$Result4 === void 0 ? void 0 : (_data$Result4$ = _data$Result4[0]) === null || _data$Result4$ === void 0 ? void 0 : (_data$Result4$$proper = _data$Result4$.properties) === null || _data$Result4$$proper === void 0 ? void 0 : (_data$Result4$$proper2 = _data$Result4$$proper.doc) === null || _data$Result4$$proper2 === void 0 ? void 0 : _data$Result4$$proper2._id
34743
+ }));
34744
+
34745
+ case 11:
34746
+ _context5.prev = 11;
34747
+ _context5.t0 = _context5["catch"](2);
34748
+ console.log(_context5.t0);
34749
+ return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34750
+ message: _context5.t0.message
34751
+ })));
34752
+
34753
+ case 15:
34754
+ case "end":
34755
+ return _context5.stop();
34756
+ }
34757
+ }
34758
+ }, _callee5, null, [[2, 11]]);
34759
+ })));
34760
+ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
34761
+ var payload,
34762
+ _ref12,
34763
+ rejectWithValue,
34764
+ _list4$status,
34765
+ _data$Result5,
34766
+ _data$Result5$,
34767
+ _data$Result5$$proper,
34768
+ _data$Result5$$proper2,
34769
+ _list4,
34770
+ body,
34771
+ data,
34772
+ _args6 = arguments;
34773
+
34774
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
34775
+ while (1) {
34776
+ switch (_context6.prev = _context6.next) {
34777
+ case 0:
34778
+ payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
34779
+ _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
34780
+ _context6.prev = 2;
34781
+ _list4 = payload; // const states = getState();
34391
34782
 
34392
34783
  body = [{
34393
34784
  db_name: dbName,
34394
34785
  entity: "PH_OrderLine",
34395
- filter: "PH_OrderLine._id=='".concat(list.id, "'"),
34786
+ filter: "PH_OrderLine._id=='".concat(_list4.id, "'"),
34396
34787
  doc: {
34397
- status: (_list$status = list.status) === null || _list$status === void 0 ? void 0 : _list$status.value,
34398
- statusreason: list.statusReason,
34399
- statusperiod: list.statusperiod,
34400
- statushistory: list.statushistory
34788
+ status: (_list4$status = _list4.status) === null || _list4$status === void 0 ? void 0 : _list4$status.value,
34789
+ statusreason: _list4.statusReason,
34790
+ statusperiod: _list4.statusperiod,
34791
+ statushistory: _list4.statushistory
34401
34792
  }
34402
34793
  }]; // if (list.status?.label === "Complete") {
34403
34794
  // let flowStatusList = [];
@@ -34410,76 +34801,76 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
34410
34801
  // ))
34411
34802
  // }
34412
34803
 
34413
- _context4.next = 7;
34804
+ _context6.next = 7;
34414
34805
  return fetchData$3({
34415
34806
  body: JSON.stringify(body)
34416
34807
  }, __update__);
34417
34808
 
34418
34809
  case 7:
34419
- data = _context4.sent;
34420
- return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34421
- data: data === null || data === void 0 ? void 0 : (_data$Result2 = data.Result) === null || _data$Result2 === void 0 ? void 0 : (_data$Result2$ = _data$Result2[0]) === null || _data$Result2$ === void 0 ? void 0 : (_data$Result2$$proper = _data$Result2$.properties) === null || _data$Result2$$proper === void 0 ? void 0 : (_data$Result2$$proper2 = _data$Result2$$proper.doc) === null || _data$Result2$$proper2 === void 0 ? void 0 : _data$Result2$$proper2._id
34810
+ data = _context6.sent;
34811
+ return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34812
+ data: data === null || data === void 0 ? void 0 : (_data$Result5 = data.Result) === null || _data$Result5 === void 0 ? void 0 : (_data$Result5$ = _data$Result5[0]) === null || _data$Result5$ === void 0 ? void 0 : (_data$Result5$$proper = _data$Result5$.properties) === null || _data$Result5$$proper === void 0 ? void 0 : (_data$Result5$$proper2 = _data$Result5$$proper.doc) === null || _data$Result5$$proper2 === void 0 ? void 0 : _data$Result5$$proper2._id
34422
34813
  }));
34423
34814
 
34424
34815
  case 11:
34425
- _context4.prev = 11;
34426
- _context4.t0 = _context4["catch"](2);
34427
- console.log(_context4.t0);
34428
- return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34429
- message: _context4.t0.message
34816
+ _context6.prev = 11;
34817
+ _context6.t0 = _context6["catch"](2);
34818
+ console.log(_context6.t0);
34819
+ return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34820
+ message: _context6.t0.message
34430
34821
  })));
34431
34822
 
34432
34823
  case 15:
34433
34824
  case "end":
34434
- return _context4.stop();
34825
+ return _context6.stop();
34435
34826
  }
34436
34827
  }
34437
- }, _callee4, null, [[2, 11]]);
34828
+ }, _callee6, null, [[2, 11]]);
34438
34829
  })));
34439
- var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
34830
+ var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
34440
34831
  var payload,
34441
- _ref10,
34832
+ _ref14,
34442
34833
  rejectWithValue,
34443
34834
  id,
34444
34835
  data,
34445
- _args5 = arguments;
34836
+ _args7 = arguments;
34446
34837
 
34447
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
34838
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
34448
34839
  while (1) {
34449
- switch (_context5.prev = _context5.next) {
34840
+ switch (_context7.prev = _context7.next) {
34450
34841
  case 0:
34451
- payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
34452
- _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
34453
- _context5.prev = 2;
34842
+ payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
34843
+ _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
34844
+ _context7.prev = 2;
34454
34845
  id = payload.id;
34455
- _context5.next = 6;
34846
+ _context7.next = 6;
34456
34847
  return fetchData$3({
34457
34848
  body: queries$5.getMedications(id)
34458
34849
  }, __readDocumentUrl__);
34459
34850
 
34460
34851
  case 6:
34461
- data = _context5.sent;
34462
- return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34852
+ data = _context7.sent;
34853
+ return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34463
34854
  data: data === null || data === void 0 ? void 0 : data.result
34464
34855
  }));
34465
34856
 
34466
34857
  case 10:
34467
- _context5.prev = 10;
34468
- _context5.t0 = _context5["catch"](2);
34469
- return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34470
- message: _context5.t0.message
34858
+ _context7.prev = 10;
34859
+ _context7.t0 = _context7["catch"](2);
34860
+ return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34861
+ message: _context7.t0.message
34471
34862
  })));
34472
34863
 
34473
34864
  case 13:
34474
34865
  case "end":
34475
- return _context5.stop();
34866
+ return _context7.stop();
34476
34867
  }
34477
34868
  }
34478
- }, _callee5, null, [[2, 10]]);
34869
+ }, _callee7, null, [[2, 10]]);
34479
34870
  })));
34480
- var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
34871
+ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
34481
34872
  var payload,
34482
- _ref12,
34873
+ _ref16,
34483
34874
  rejectWithValue,
34484
34875
  getState,
34485
34876
  personId,
@@ -34492,15 +34883,15 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
34492
34883
  arr,
34493
34884
  data,
34494
34885
  PH_PresWorkflowStatusTrx,
34495
- _args6 = arguments;
34886
+ _args8 = arguments;
34496
34887
 
34497
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
34888
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
34498
34889
  while (1) {
34499
- switch (_context6.prev = _context6.next) {
34890
+ switch (_context8.prev = _context8.next) {
34500
34891
  case 0:
34501
- payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
34502
- _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue, getState = _ref12.getState;
34503
- _context6.prev = 2;
34892
+ payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
34893
+ _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue, getState = _ref16.getState;
34894
+ _context8.prev = 2;
34504
34895
  personId = payload.personId;
34505
34896
  states = getState();
34506
34897
  flowStatus = states.MedicationMastersSlice.workflow_status_masters.data.filter(function (val) {
@@ -34537,128 +34928,172 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
34537
34928
  }
34538
34929
  };
34539
34930
  });
34540
- _context6.next = 13;
34931
+ _context8.next = 13;
34541
34932
  return fetchData$3({
34542
34933
  body: JSON.stringify(arr)
34543
34934
  }, __update__);
34544
34935
 
34545
34936
  case 13:
34546
- data = _context6.sent;
34547
- _context6.next = 16;
34937
+ data = _context8.sent;
34938
+ _context8.next = 16;
34548
34939
  return fetchData$3({
34549
34940
  body: JSON.stringify(flowStatusList)
34550
34941
  }, __uspsertUrl__);
34551
34942
 
34552
34943
  case 16:
34553
- PH_PresWorkflowStatusTrx = _context6.sent;
34554
- return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34944
+ PH_PresWorkflowStatusTrx = _context8.sent;
34945
+ return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34555
34946
  data: data,
34556
34947
  PH_PresWorkflowStatusTrx: PH_PresWorkflowStatusTrx
34557
34948
  }));
34558
34949
 
34559
34950
  case 20:
34560
- _context6.prev = 20;
34561
- _context6.t0 = _context6["catch"](2);
34562
- console.log(_context6.t0);
34563
- return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34564
- message: _context6.t0.message
34951
+ _context8.prev = 20;
34952
+ _context8.t0 = _context8["catch"](2);
34953
+ console.log(_context8.t0);
34954
+ return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34955
+ message: _context8.t0.message
34565
34956
  })));
34566
34957
 
34567
34958
  case 24:
34568
34959
  case "end":
34569
- return _context6.stop();
34960
+ return _context8.stop();
34570
34961
  }
34571
34962
  }
34572
- }, _callee6, null, [[2, 20]]);
34963
+ }, _callee8, null, [[2, 20]]);
34573
34964
  })));
34574
- var PATIENT_BANNER = createAsyncThunk("medicationsSlice/patient_banner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
34965
+ var PATIENT_BANNER = createAsyncThunk("medicationsSlice/patient_banner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
34575
34966
  var payload,
34576
- _ref14,
34967
+ _ref18,
34577
34968
  rejectWithValue,
34578
34969
  id,
34579
34970
  data,
34580
- _args7 = arguments;
34971
+ _args9 = arguments;
34581
34972
 
34582
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
34973
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
34583
34974
  while (1) {
34584
- switch (_context7.prev = _context7.next) {
34975
+ switch (_context9.prev = _context9.next) {
34585
34976
  case 0:
34586
- payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
34587
- _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
34588
- _context7.prev = 2;
34977
+ payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
34978
+ _ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
34979
+ _context9.prev = 2;
34589
34980
  id = payload.id;
34590
- _context7.next = 6;
34981
+ _context9.next = 6;
34591
34982
  return fetchData$3({
34592
34983
  body: JSON.stringify(queries$5.PharmacyFramework_Patientbanner(id))
34593
34984
  }, __readDocumentUrl__);
34594
34985
 
34595
34986
  case 6:
34596
- data = _context7.sent;
34597
- return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34987
+ data = _context9.sent;
34988
+ return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34598
34989
  data: data.result
34599
34990
  }));
34600
34991
 
34601
34992
  case 10:
34602
- _context7.prev = 10;
34603
- _context7.t0 = _context7["catch"](2);
34604
- return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34605
- message: _context7.t0.message
34993
+ _context9.prev = 10;
34994
+ _context9.t0 = _context9["catch"](2);
34995
+ return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34996
+ message: _context9.t0.message
34606
34997
  })));
34607
34998
 
34608
34999
  case 13:
34609
35000
  case "end":
34610
- return _context7.stop();
35001
+ return _context9.stop();
34611
35002
  }
34612
35003
  }
34613
- }, _callee7, null, [[2, 10]]);
35004
+ }, _callee9, null, [[2, 10]]);
34614
35005
  })));
34615
- var ENCOUNTER_BANNER = createAsyncThunk("medicationsSlice/Encounterbanner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
35006
+ var ENCOUNTER_BANNER = createAsyncThunk("medicationsSlice/Encounterbanner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
34616
35007
  var payload,
34617
- _ref16,
35008
+ _ref20,
34618
35009
  rejectWithValue,
34619
35010
  getState,
34620
35011
  patientId,
34621
35012
  facilityId,
34622
35013
  data,
34623
- _args8 = arguments;
35014
+ _args10 = arguments;
34624
35015
 
34625
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
35016
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
34626
35017
  while (1) {
34627
- switch (_context8.prev = _context8.next) {
35018
+ switch (_context10.prev = _context10.next) {
34628
35019
  case 0:
34629
- payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
34630
- _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue, getState = _ref16.getState;
34631
- _context8.prev = 2;
35020
+ payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
35021
+ _ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue, getState = _ref20.getState;
35022
+ _context10.prev = 2;
34632
35023
  patientId = payload.patientId, facilityId = payload.facilityId;
34633
- _context8.next = 6;
35024
+ _context10.next = 6;
34634
35025
  return fetchData$3({
34635
35026
  body: JSON.stringify(queries$5.PharmacyFramework_Encounterbanner(patientId, facilityId))
34636
35027
  }, __readDocumentUrl__);
34637
35028
 
34638
35029
  case 6:
34639
- data = _context8.sent;
34640
- return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
35030
+ data = _context10.sent;
35031
+ return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34641
35032
  data: data.result
34642
35033
  }));
34643
35034
 
34644
35035
  case 10:
34645
- _context8.prev = 10;
34646
- _context8.t0 = _context8["catch"](2);
34647
- return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34648
- message: _context8.t0.message
35036
+ _context10.prev = 10;
35037
+ _context10.t0 = _context10["catch"](2);
35038
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
35039
+ message: _context10.t0.message
34649
35040
  })));
34650
35041
 
34651
35042
  case 13:
34652
35043
  case "end":
34653
- return _context8.stop();
35044
+ return _context10.stop();
34654
35045
  }
34655
35046
  }
34656
- }, _callee8, null, [[2, 10]]);
35047
+ }, _callee10, null, [[2, 10]]);
35048
+ })));
35049
+ var GET_ORDER_DATE = createAsyncThunk("medicationsSlice/get_orderDate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
35050
+ var payload,
35051
+ _ref22,
35052
+ rejectWithValue,
35053
+ _list5,
35054
+ data,
35055
+ _args11 = arguments;
35056
+
35057
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
35058
+ while (1) {
35059
+ switch (_context11.prev = _context11.next) {
35060
+ case 0:
35061
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
35062
+ _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
35063
+ _context11.prev = 2;
35064
+ _list5 = payload;
35065
+ _context11.next = 6;
35066
+ return fetchData$3({
35067
+ body: JSON.stringify(_list5)
35068
+ }, __GetOrderStartDate__);
35069
+
35070
+ case 6:
35071
+ data = _context11.sent;
35072
+ return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
35073
+ data: data
35074
+ }));
35075
+
35076
+ case 10:
35077
+ _context11.prev = 10;
35078
+ _context11.t0 = _context11["catch"](2);
35079
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
35080
+ message: _context11.t0.message
35081
+ })));
35082
+
35083
+ case 13:
35084
+ case "end":
35085
+ return _context11.stop();
35086
+ }
35087
+ }
35088
+ }, _callee11, null, [[2, 10]]);
34657
35089
  })));
34658
35090
  var medicationsSlice = createSlice({
34659
35091
  name: "medicationsSlice",
34660
35092
  initialState: {
35093
+ getOrderDate: _objectSpread2({}, defaultState.Info),
34661
35094
  save_medication: _objectSpread2({}, defaultState.Info),
35095
+ save_nifi_medication: _objectSpread2({}, defaultState.Info),
35096
+ bulk_save_medication: _objectSpread2({}, defaultState.Info),
34662
35097
  update_medication: _objectSpread2({}, defaultState.Info),
34663
35098
  update_workflow_status: _objectSpread2({}, defaultState.Info),
34664
35099
  medication_list: _objectSpread2({}, defaultState.List),
@@ -34667,97 +35102,130 @@ var medicationsSlice = createSlice({
34667
35102
  patientBanner: _objectSpread2({}, defaultState.List),
34668
35103
  Encounterbanner: _objectSpread2({}, defaultState.List)
34669
35104
  },
34670
- extraReducers: (_extraReducers$h = {}, _defineProperty(_extraReducers$h, PATIENT_BANNER.fulfilled, function (state, action) {
35105
+ extraReducers: (_extraReducers$h = {}, _defineProperty(_extraReducers$h, GET_ORDER_DATE.fulfilled, function (state, action) {
34671
35106
  var _action$payload;
34672
35107
 
34673
- state.patientBanner = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
35108
+ state.getOrderDate = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
35109
+ }), _defineProperty(_extraReducers$h, GET_ORDER_DATE.pending, function (state, action) {
35110
+ state.getOrderDate.loading = true;
35111
+ }), _defineProperty(_extraReducers$h, GET_ORDER_DATE.rejected, function (state, action) {
35112
+ var _action$payload2;
35113
+
35114
+ state.getOrderDate = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
35115
+ }), _defineProperty(_extraReducers$h, PATIENT_BANNER.fulfilled, function (state, action) {
35116
+ var _action$payload3;
35117
+
35118
+ state.patientBanner = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
34674
35119
  }), _defineProperty(_extraReducers$h, PATIENT_BANNER.pending, function (state, action) {
34675
35120
  state.patientBanner.loading = true;
34676
35121
  }), _defineProperty(_extraReducers$h, PATIENT_BANNER.rejected, function (state, action) {
34677
- var _action$payload2;
35122
+ var _action$payload4;
34678
35123
 
34679
- state.patientBanner = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
35124
+ state.patientBanner = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
34680
35125
  }), _defineProperty(_extraReducers$h, ALERT_CODES.fulfilled, function (state, action) {
34681
- var _action$payload3;
35126
+ var _action$payload5;
34682
35127
 
34683
- state.alert_codes.loading = false, state.alert_codes.error = false, state.alert_codes = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
35128
+ state.alert_codes.loading = false, state.alert_codes.error = false, state.alert_codes = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
34684
35129
  }), _defineProperty(_extraReducers$h, ALERT_CODES.pending, function (state, action) {
34685
35130
  state.alert_codes.error = false, state.alert_codes.loading = true;
34686
35131
  }), _defineProperty(_extraReducers$h, ALERT_CODES.rejected, function (state, action) {
34687
- var _action$payload4;
35132
+ var _action$payload6;
34688
35133
 
34689
- state.alert_codes.loading = false, state.alert_codes.error = true, state.alert_codes = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
35134
+ state.alert_codes.loading = false, state.alert_codes.error = true, state.alert_codes = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
34690
35135
  }), _defineProperty(_extraReducers$h, DRUG_CODES.fulfilled, function (state, action) {
34691
- var _action$payload5;
35136
+ var _action$payload7;
34692
35137
 
34693
- state.drug_codes.loading = false, state.drug_codes.error = false, state.drug_codes = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
35138
+ state.drug_codes.loading = false, state.drug_codes.error = false, state.drug_codes = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
34694
35139
  }), _defineProperty(_extraReducers$h, DRUG_CODES.pending, function (state, action) {
34695
35140
  state.drug_codes.error = false, state.drug_codes.loading = true;
34696
35141
  }), _defineProperty(_extraReducers$h, DRUG_CODES.rejected, function (state, action) {
34697
- var _action$payload6;
35142
+ var _action$payload8;
34698
35143
 
34699
- state.drug_codes.loading = false, state.drug_codes.error = true, state.drug_codes = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
35144
+ state.drug_codes.loading = false, state.drug_codes.error = true, state.drug_codes = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
34700
35145
  }), _defineProperty(_extraReducers$h, SAVE_MEDICATIONS.fulfilled, function (state, action) {
34701
- var _action$payload7;
35146
+ var _action$payload9;
34702
35147
 
34703
- state.save_medication.loading = false, state.save_medication.error = false, state.save_medication = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
35148
+ state.save_medication.loading = false, state.save_medication.error = false, state.save_medication = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
34704
35149
  }), _defineProperty(_extraReducers$h, SAVE_MEDICATIONS.pending, function (state, action) {
34705
35150
  state.save_medication.error = false, state.save_medication.loading = true;
34706
35151
  }), _defineProperty(_extraReducers$h, SAVE_MEDICATIONS.rejected, function (state, action) {
34707
- var _action$payload8;
35152
+ var _action$payload10;
35153
+
35154
+ state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
35155
+ }), _defineProperty(_extraReducers$h, SAVE_NIFI_MEDICATIONS.fulfilled, function (state, action) {
35156
+ var _action$payload11;
35157
+
35158
+ state.save_nifi_medication.loading = false, state.save_nifi_medication.error = false, state.save_nifi_medication = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
35159
+ }), _defineProperty(_extraReducers$h, SAVE_NIFI_MEDICATIONS.pending, function (state, action) {
35160
+ state.save_nifi_medication.error = false, state.save_nifi_medication.loading = true;
35161
+ }), _defineProperty(_extraReducers$h, SAVE_NIFI_MEDICATIONS.rejected, function (state, action) {
35162
+ var _action$payload12;
35163
+
35164
+ state.save_nifi_medication.loading = false, state.save_nifi_medication.error = true, state.save_nifi_medication = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
35165
+ }), _defineProperty(_extraReducers$h, BULK_SAVE_MEDICATIONS.fulfilled, function (state, action) {
35166
+ var _action$payload13;
34708
35167
 
34709
- state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
35168
+ state.bulk_save_medication.loading = false, state.bulk_save_medication.error = false, state.bulk_save_medication = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
35169
+ }), _defineProperty(_extraReducers$h, BULK_SAVE_MEDICATIONS.pending, function (state, action) {
35170
+ state.bulk_save_medication.error = false, state.bulk_save_medication.loading = true;
35171
+ }), _defineProperty(_extraReducers$h, BULK_SAVE_MEDICATIONS.rejected, function (state, action) {
35172
+ var _action$payload14;
35173
+
35174
+ state.bulk_save_medication.loading = false, state.bulk_save_medication.error = true, state.bulk_save_medication = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
34710
35175
  }), _defineProperty(_extraReducers$h, UPDATE_MEDICATIONS.fulfilled, function (state, action) {
34711
- var _action$payload9;
35176
+ var _action$payload15;
34712
35177
 
34713
- state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
35178
+ state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
34714
35179
  }), _defineProperty(_extraReducers$h, UPDATE_MEDICATIONS.pending, function (state, action) {
34715
35180
  state.update_medication.error = false, state.update_medication.loading = true;
34716
35181
  }), _defineProperty(_extraReducers$h, UPDATE_MEDICATIONS.rejected, function (state, action) {
34717
- var _action$payload10;
35182
+ var _action$payload16;
34718
35183
 
34719
- state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
35184
+ state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
34720
35185
  }), _defineProperty(_extraReducers$h, GET_MEDICATIONS.fulfilled, function (state, action) {
34721
- var _action$payload11;
35186
+ var _action$payload17;
34722
35187
 
34723
- state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
35188
+ state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
34724
35189
  }), _defineProperty(_extraReducers$h, GET_MEDICATIONS.pending, function (state, action) {
34725
35190
  state.medication_list.error = false, state.medication_list.loading = true;
34726
35191
  }), _defineProperty(_extraReducers$h, GET_MEDICATIONS.rejected, function (state, action) {
34727
- var _action$payload12;
35192
+ var _action$payload18;
34728
35193
 
34729
- state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
35194
+ state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
34730
35195
  }), _defineProperty(_extraReducers$h, UPDATE_ALL_WORKFLOW_STATUS.fulfilled, function (state, action) {
34731
- var _action$payload13;
35196
+ var _action$payload19;
34732
35197
 
34733
- state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
35198
+ state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
34734
35199
  }), _defineProperty(_extraReducers$h, UPDATE_ALL_WORKFLOW_STATUS.pending, function (state, action) {
34735
35200
  state.update_workflow_status.error = false, state.update_workflow_status.loading = true;
34736
35201
  }), _defineProperty(_extraReducers$h, UPDATE_ALL_WORKFLOW_STATUS.rejected, function (state, action) {
34737
- var _action$payload14;
35202
+ var _action$payload20;
34738
35203
 
34739
- state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
35204
+ state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
34740
35205
  }), _defineProperty(_extraReducers$h, ENCOUNTER_BANNER.fulfilled, function (state, action) {
34741
- var _action$payload15;
35206
+ var _action$payload21;
34742
35207
 
34743
- state.Encounterbanner = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
35208
+ state.Encounterbanner = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
34744
35209
  }), _defineProperty(_extraReducers$h, ENCOUNTER_BANNER.pending, function (state, action) {
34745
35210
  state.Encounterbanner.loading = true;
34746
35211
  }), _defineProperty(_extraReducers$h, ENCOUNTER_BANNER.rejected, function (state, action) {
34747
- var _action$payload16;
35212
+ var _action$payload22;
34748
35213
 
34749
- state.Encounterbanner = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
35214
+ state.Encounterbanner = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
34750
35215
  }), _extraReducers$h)
34751
35216
  });
34752
35217
  var medicationsActions = {
34753
35218
  SAVE_MEDICATIONS: SAVE_MEDICATIONS,
35219
+ BULK_SAVE_MEDICATIONS: BULK_SAVE_MEDICATIONS,
34754
35220
  GET_MEDICATIONS: GET_MEDICATIONS,
34755
35221
  UPDATE_MEDICATIONS: UPDATE_MEDICATIONS,
34756
35222
  UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS,
34757
35223
  ALERT_CODES: ALERT_CODES,
34758
35224
  DRUG_CODES: DRUG_CODES,
34759
35225
  PATIENT_BANNER: PATIENT_BANNER,
34760
- ENCOUNTER_BANNER: ENCOUNTER_BANNER
35226
+ ENCOUNTER_BANNER: ENCOUNTER_BANNER,
35227
+ GET_ORDER_DATE: GET_ORDER_DATE,
35228
+ SAVE_NIFI_MEDICATIONS: SAVE_NIFI_MEDICATIONS
34761
35229
  };
34762
35230
  var medicationsSlice$1 = medicationsSlice.reducer;
34763
35231
 
@@ -35176,7 +35644,7 @@ var generateResJson$2 = function generateResJson(dataList, arr) {
35176
35644
  orderBy: {
35177
35645
  practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.practitioner_id,
35178
35646
  value: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.id,
35179
- label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
35647
+ label: makeName$1((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
35180
35648
  }
35181
35649
  },
35182
35650
  indication: {
@@ -35325,7 +35793,7 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
35325
35793
  orderBy: {
35326
35794
  practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.practitioner_id,
35327
35795
  value: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.id,
35328
- label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
35796
+ label: makeName$1((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
35329
35797
  }
35330
35798
  },
35331
35799
  indication: {
@@ -37113,7 +37581,7 @@ var generateResJson$1 = function generateResJson(dataList, arr) {
37113
37581
  orderBy: {
37114
37582
  practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.practitioner_id,
37115
37583
  value: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.id,
37116
- label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
37584
+ label: makeName$1((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
37117
37585
  }
37118
37586
  },
37119
37587
  indication: {
@@ -37266,7 +37734,7 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
37266
37734
  orderBy: {
37267
37735
  practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.practitioner_id,
37268
37736
  value: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.id,
37269
- label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
37737
+ label: makeName$1((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
37270
37738
  }
37271
37739
  },
37272
37740
  indication: {
@@ -39623,7 +40091,7 @@ var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
39623
40091
  title: element.practitionerid.length > 0 ? element === null || element === void 0 ? void 0 : (_element$practitioner = element.practitionerid[0]) === null || _element$practitioner === void 0 ? void 0 : (_element$practitioner2 = _element$practitioner.practitioner_role) === null || _element$practitioner2 === void 0 ? void 0 : (_element$practitioner3 = _element$practitioner2[0]) === null || _element$practitioner3 === void 0 ? void 0 : (_element$practitioner4 = _element$practitioner3.role) === null || _element$practitioner4 === void 0 ? void 0 : (_element$practitioner5 = _element$practitioner4.coding[0]) === null || _element$practitioner5 === void 0 ? void 0 : _element$practitioner5.display : "",
39624
40092
  //title: "Role",
39625
40093
  date: utcTOLocal$1(element.updatedate, "MMMM Do h:mm a"),
39626
- name: element.practitionerid.length > 0 ? makeName(((_element$practitioner6 = element.practitionerid[0]) === null || _element$practitioner6 === void 0 ? void 0 : _element$practitioner6.name[0]) || {}) : "Dummy"
40094
+ name: element.practitionerid.length > 0 ? makeName$1(((_element$practitioner6 = element.practitionerid[0]) === null || _element$practitioner6 === void 0 ? void 0 : _element$practitioner6.name[0]) || {}) : "Dummy"
39627
40095
  }, element);
39628
40096
 
39629
40097
  var childObj = {
@@ -39651,7 +40119,7 @@ var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
39651
40119
  var _userObj = _objectSpread2({
39652
40120
  title: element.practitionerid.length > 0 ? element === null || element === void 0 ? void 0 : (_element$practitioner7 = element.practitionerid[0]) === null || _element$practitioner7 === void 0 ? void 0 : (_element$practitioner8 = _element$practitioner7.practitioner_role) === null || _element$practitioner8 === void 0 ? void 0 : (_element$practitioner9 = _element$practitioner8[0]) === null || _element$practitioner9 === void 0 ? void 0 : (_element$practitioner10 = _element$practitioner9.role) === null || _element$practitioner10 === void 0 ? void 0 : (_element$practitioner11 = _element$practitioner10.coding[0]) === null || _element$practitioner11 === void 0 ? void 0 : _element$practitioner11.display : "",
39653
40121
  date: utcTOLocal$1(element.updatedate, "MMMM Do h:mm:ss a"),
39654
- name: element.practitionerid.length > 0 ? makeName(((_element$practitioner12 = element.practitionerid[0]) === null || _element$practitioner12 === void 0 ? void 0 : _element$practitioner12.name[0]) || {}) : "Dummy"
40122
+ name: element.practitionerid.length > 0 ? makeName$1(((_element$practitioner12 = element.practitionerid[0]) === null || _element$practitioner12 === void 0 ? void 0 : _element$practitioner12.name[0]) || {}) : "Dummy"
39655
40123
  }, element);
39656
40124
 
39657
40125
  var childObj = {
@@ -39676,7 +40144,7 @@ var generatePractitoner = function generatePractitoner(data) {
39676
40144
  var userObj = _objectSpread2({
39677
40145
  title: element.practitionerid.length > 0 ? element === null || element === void 0 ? void 0 : (_element$practitioner13 = element.practitionerid[0]) === null || _element$practitioner13 === void 0 ? void 0 : (_element$practitioner14 = _element$practitioner13.practitioner_role[0]) === null || _element$practitioner14 === void 0 ? void 0 : (_element$practitioner15 = _element$practitioner14.role) === null || _element$practitioner15 === void 0 ? void 0 : (_element$practitioner16 = _element$practitioner15.coding[0]) === null || _element$practitioner16 === void 0 ? void 0 : _element$practitioner16.display : "",
39678
40146
  date: utcTOLocal$1(element.updatedate, "MMMM Do h:mm a"),
39679
- name: element.practitionerid.length > 0 ? makeName(((_element$practitioner17 = element.practitionerid[0]) === null || _element$practitioner17 === void 0 ? void 0 : _element$practitioner17.name[0]) || {}) : "Dummy"
40147
+ name: element.practitionerid.length > 0 ? makeName$1(((_element$practitioner17 = element.practitionerid[0]) === null || _element$practitioner17 === void 0 ? void 0 : _element$practitioner17.name[0]) || {}) : "Dummy"
39680
40148
  }, element);
39681
40149
 
39682
40150
  arr.push(userObj);
@@ -40653,7 +41121,7 @@ var config$1 = [{
40653
41121
  _id: _id,
40654
41122
  id: id,
40655
41123
  value: _id,
40656
- label: makeName((name === null || name === void 0 ? void 0 : name[0]) || {}),
41124
+ label: makeName$1((name === null || name === void 0 ? void 0 : name[0]) || {}),
40657
41125
  _key: _key
40658
41126
  };
40659
41127
  });
@@ -40885,12 +41353,21 @@ var highPriorityQueveQueries = {
40885
41353
  return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN TO_ARRAY(CodeableConceptMaster.coding) RETURN DOCUMENT(cod))})"
40886
41354
  };
40887
41355
  },
41356
+ // reasonDropDown: () => {
41357
+ // return{
41358
+ // db_name: dbName,
41359
+ // entity: "ReasonMaster",
41360
+ // filter: "ReasonMaster.activestatus==true",
41361
+ // return_fields: "{_id:ReasonMaster._id,key:ReasonMaster._key,id:ReasonMaster.id,ReasonCode:ReasonMaster.ReasonCode,ReasonDesc:ReasonMaster.ReasonDesc}"
41362
+ // }
41363
+ // }
40888
41364
  reasonDropDown: function reasonDropDown() {
40889
41365
  return {
40890
- db_name: dbName,
40891
- entity: "ReasonMaster",
40892
- filter: "ReasonMaster.activestatus==true",
40893
- return_fields: "{_id:ReasonMaster._id,key:ReasonMaster._key,id:ReasonMaster.id,ReasonCode:ReasonMaster.ReasonCode,ReasonDesc:ReasonMaster.ReasonDesc}"
41366
+ "db_name": dbName,
41367
+ "entity": "CodingMaster",
41368
+ "filter": "CodingMaster.Type=='PRIORITYREASON' && CodingMaster.activestatus==true && CodingMaster.status==true",
41369
+ "return_fields": "KEEP(CodingMaster,'_id','id','_key','code','display','Type')",
41370
+ "Sort": "CodingMaster.Createddate"
40894
41371
  };
40895
41372
  }
40896
41373
  };
@@ -40986,8 +41463,11 @@ var PRIORITY_REASON_DROPDOWN = createAsyncThunk("highPriorityApiSlice/priorityRe
40986
41463
  data = _context2.sent;
40987
41464
  obj = [];
40988
41465
  data.result.map(function (val) {
41466
+ var _val$display;
41467
+
40989
41468
  obj.push({
40990
- value: val === null || val === void 0 ? void 0 : val.ReasonDesc,
41469
+ // value:val?.ReasonDesc,
41470
+ value: (_val$display = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display !== void 0 ? _val$display : "",
40991
41471
  label: val === null || val === void 0 ? void 0 : val._id
40992
41472
  });
40993
41473
  });
@@ -41361,7 +41841,7 @@ var GET_APPOINTMENTS = createAsyncThunk("appointmentStatsApiSlice/getAppointment
41361
41841
  // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
41362
41842
  // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
41363
41843
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
41364
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment = _.Appointment) === null || _$Appointment === void 0 ? void 0 : (_$Appointment$PersonI = _$Appointment.PersonID) === null || _$Appointment$PersonI === void 0 ? void 0 : (_$Appointment$PersonI2 = _$Appointment$PersonI[0]) === null || _$Appointment$PersonI2 === void 0 ? void 0 : (_$Appointment$PersonI3 = _$Appointment$PersonI2.name) === null || _$Appointment$PersonI3 === void 0 ? void 0 : _$Appointment$PersonI3[0]) || {}),
41844
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Appointment = _.Appointment) === null || _$Appointment === void 0 ? void 0 : (_$Appointment$PersonI = _$Appointment.PersonID) === null || _$Appointment$PersonI === void 0 ? void 0 : (_$Appointment$PersonI2 = _$Appointment$PersonI[0]) === null || _$Appointment$PersonI2 === void 0 ? void 0 : (_$Appointment$PersonI3 = _$Appointment$PersonI2.name) === null || _$Appointment$PersonI3 === void 0 ? void 0 : _$Appointment$PersonI3[0]) || {}),
41365
41845
  mrn: ((_$Appointment2 = _.Appointment) === null || _$Appointment2 === void 0 ? void 0 : (_$Appointment2$Person = _$Appointment2.PersonID) === null || _$Appointment2$Person === void 0 ? void 0 : (_$Appointment2$Person2 = _$Appointment2$Person[0]) === null || _$Appointment2$Person2 === void 0 ? void 0 : (_$Appointment2$Person3 = _$Appointment2$Person2.MRN) === null || _$Appointment2$Person3 === void 0 ? void 0 : _$Appointment2$Person3[0]) || "",
41366
41846
  // enId: _.Encounter.id,
41367
41847
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment3 = _.Appointment) === null || _$Appointment3 === void 0 ? void 0 : (_$Appointment3$Person = _$Appointment3.PersonID) === null || _$Appointment3$Person === void 0 ? void 0 : (_$Appointment3$Person2 = _$Appointment3$Person[0]) === null || _$Appointment3$Person2 === void 0 ? void 0 : _$Appointment3$Person2.birthDay),
@@ -41469,7 +41949,7 @@ var GET_FIRST_VISITS = createAsyncThunk("appointmentStatsApiSlice/getFirstVisits
41469
41949
  // "Modify Appointment": true,
41470
41950
  // "Cancel Appointment": true,
41471
41951
  // "View Profile": true,
41472
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter = _.Encounter) === null || _$Encounter === void 0 ? void 0 : (_$Encounter$patient_i = _$Encounter.patient_id) === null || _$Encounter$patient_i === void 0 ? void 0 : (_$Encounter$patient_i2 = _$Encounter$patient_i[0]) === null || _$Encounter$patient_i2 === void 0 ? void 0 : (_$Encounter$patient_i3 = _$Encounter$patient_i2.name) === null || _$Encounter$patient_i3 === void 0 ? void 0 : _$Encounter$patient_i3[0]) || {}),
41952
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter = _.Encounter) === null || _$Encounter === void 0 ? void 0 : (_$Encounter$patient_i = _$Encounter.patient_id) === null || _$Encounter$patient_i === void 0 ? void 0 : (_$Encounter$patient_i2 = _$Encounter$patient_i[0]) === null || _$Encounter$patient_i2 === void 0 ? void 0 : (_$Encounter$patient_i3 = _$Encounter$patient_i2.name) === null || _$Encounter$patient_i3 === void 0 ? void 0 : _$Encounter$patient_i3[0]) || {}),
41473
41953
  mrn: (_ === null || _ === void 0 ? void 0 : (_$Encounter2 = _.Encounter) === null || _$Encounter2 === void 0 ? void 0 : (_$Encounter2$patient_ = _$Encounter2.patient_id) === null || _$Encounter2$patient_ === void 0 ? void 0 : (_$Encounter2$patient_2 = _$Encounter2$patient_[0]) === null || _$Encounter2$patient_2 === void 0 ? void 0 : _$Encounter2$patient_2.MRN) || "",
41474
41954
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment13 = _.Appointment) === null || _$Appointment13 === void 0 ? void 0 : (_$Appointment13$Perso = _$Appointment13.PersonID) === null || _$Appointment13$Perso === void 0 ? void 0 : (_$Appointment13$Perso2 = _$Appointment13$Perso[0]) === null || _$Appointment13$Perso2 === void 0 ? void 0 : _$Appointment13$Perso2.birthDay),
41475
41955
  date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment14 = _.Appointment) === null || _$Appointment14 === void 0 ? void 0 : _$Appointment14.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment15 = _.Appointment) === null || _$Appointment15 === void 0 ? void 0 : _$Appointment15.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment16 = _.Appointment) === null || _$Appointment16 === void 0 ? void 0 : _$Appointment16.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment17 = _.Appointment) === null || _$Appointment17 === void 0 ? void 0 : _$Appointment17.start, "hh:mm A") : ""),
@@ -41573,7 +42053,7 @@ var GET_OTHER_VISITS = createAsyncThunk("appointmentStatsApiSlice/getOtherVisits
41573
42053
  // "Modify Appointment": true,
41574
42054
  // "Cancel Appointment": true,
41575
42055
  // "View Profile": true,
41576
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter8 = _.Encounter) === null || _$Encounter8 === void 0 ? void 0 : (_$Encounter8$patient_ = _$Encounter8.patient_id) === null || _$Encounter8$patient_ === void 0 ? void 0 : (_$Encounter8$patient_2 = _$Encounter8$patient_[0]) === null || _$Encounter8$patient_2 === void 0 ? void 0 : (_$Encounter8$patient_3 = _$Encounter8$patient_2.name) === null || _$Encounter8$patient_3 === void 0 ? void 0 : _$Encounter8$patient_3[0]) || {}),
42056
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter8 = _.Encounter) === null || _$Encounter8 === void 0 ? void 0 : (_$Encounter8$patient_ = _$Encounter8.patient_id) === null || _$Encounter8$patient_ === void 0 ? void 0 : (_$Encounter8$patient_2 = _$Encounter8$patient_[0]) === null || _$Encounter8$patient_2 === void 0 ? void 0 : (_$Encounter8$patient_3 = _$Encounter8$patient_2.name) === null || _$Encounter8$patient_3 === void 0 ? void 0 : _$Encounter8$patient_3[0]) || {}),
41577
42057
  mrn: (_ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$patient_ = _$Encounter9.patient_id) === null || _$Encounter9$patient_ === void 0 ? void 0 : (_$Encounter9$patient_2 = _$Encounter9$patient_[0]) === null || _$Encounter9$patient_2 === void 0 ? void 0 : _$Encounter9$patient_2.MRN) || "",
41578
42058
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment20 = _.Appointment) === null || _$Appointment20 === void 0 ? void 0 : (_$Appointment20$Perso = _$Appointment20.PersonID) === null || _$Appointment20$Perso === void 0 ? void 0 : (_$Appointment20$Perso2 = _$Appointment20$Perso[0]) === null || _$Appointment20$Perso2 === void 0 ? void 0 : _$Appointment20$Perso2.birthDay),
41579
42059
  date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment21 = _.Appointment) === null || _$Appointment21 === void 0 ? void 0 : _$Appointment21.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment22 = _.Appointment) === null || _$Appointment22 === void 0 ? void 0 : _$Appointment22.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment23 = _.Appointment) === null || _$Appointment23 === void 0 ? void 0 : _$Appointment23.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment24 = _.Appointment) === null || _$Appointment24 === void 0 ? void 0 : _$Appointment24.start, "hh:mm A") : ""),
@@ -41677,7 +42157,7 @@ var GET_WALK_INS = createAsyncThunk("appointmentStatsApiSlice/getWalkIns", /*#__
41677
42157
  // "Modify Appointment": true,
41678
42158
  // "Cancel Appointment": true,
41679
42159
  // "View Profile": true,
41680
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter15 = _.Encounter) === null || _$Encounter15 === void 0 ? void 0 : (_$Encounter15$patient = _$Encounter15.patient_id) === null || _$Encounter15$patient === void 0 ? void 0 : (_$Encounter15$patient2 = _$Encounter15$patient[0]) === null || _$Encounter15$patient2 === void 0 ? void 0 : (_$Encounter15$patient3 = _$Encounter15$patient2.name) === null || _$Encounter15$patient3 === void 0 ? void 0 : _$Encounter15$patient3[0]) || {}),
42160
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter15 = _.Encounter) === null || _$Encounter15 === void 0 ? void 0 : (_$Encounter15$patient = _$Encounter15.patient_id) === null || _$Encounter15$patient === void 0 ? void 0 : (_$Encounter15$patient2 = _$Encounter15$patient[0]) === null || _$Encounter15$patient2 === void 0 ? void 0 : (_$Encounter15$patient3 = _$Encounter15$patient2.name) === null || _$Encounter15$patient3 === void 0 ? void 0 : _$Encounter15$patient3[0]) || {}),
41681
42161
  mrn: (_ === null || _ === void 0 ? void 0 : (_$Encounter16 = _.Encounter) === null || _$Encounter16 === void 0 ? void 0 : (_$Encounter16$patient = _$Encounter16.patient_id) === null || _$Encounter16$patient === void 0 ? void 0 : (_$Encounter16$patient2 = _$Encounter16$patient[0]) === null || _$Encounter16$patient2 === void 0 ? void 0 : _$Encounter16$patient2.MRN) || "",
41682
42162
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment27 = _.Appointment) === null || _$Appointment27 === void 0 ? void 0 : (_$Appointment27$Perso = _$Appointment27.PersonID) === null || _$Appointment27$Perso === void 0 ? void 0 : (_$Appointment27$Perso2 = _$Appointment27$Perso[0]) === null || _$Appointment27$Perso2 === void 0 ? void 0 : _$Appointment27$Perso2.birthDay),
41683
42163
  date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment28 = _.Appointment) === null || _$Appointment28 === void 0 ? void 0 : _$Appointment28.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment29 = _.Appointment) === null || _$Appointment29 === void 0 ? void 0 : _$Appointment29.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment30 = _.Appointment) === null || _$Appointment30 === void 0 ? void 0 : _$Appointment30.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment31 = _.Appointment) === null || _$Appointment31 === void 0 ? void 0 : _$Appointment31.start, "hh:mm A") : ""),
@@ -41781,7 +42261,7 @@ var GET_NEW_PATIENTS = createAsyncThunk("appointmentStatsApiSlice/getNewPatients
41781
42261
  // "Modify Appointment": true,
41782
42262
  // "Cancel Appointment": true,
41783
42263
  // "View Profile": true,
41784
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter22 = _.Encounter) === null || _$Encounter22 === void 0 ? void 0 : (_$Encounter22$patient = _$Encounter22.patient_id) === null || _$Encounter22$patient === void 0 ? void 0 : (_$Encounter22$patient2 = _$Encounter22$patient[0]) === null || _$Encounter22$patient2 === void 0 ? void 0 : (_$Encounter22$patient3 = _$Encounter22$patient2.name) === null || _$Encounter22$patient3 === void 0 ? void 0 : _$Encounter22$patient3[0]) || {}),
42264
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter22 = _.Encounter) === null || _$Encounter22 === void 0 ? void 0 : (_$Encounter22$patient = _$Encounter22.patient_id) === null || _$Encounter22$patient === void 0 ? void 0 : (_$Encounter22$patient2 = _$Encounter22$patient[0]) === null || _$Encounter22$patient2 === void 0 ? void 0 : (_$Encounter22$patient3 = _$Encounter22$patient2.name) === null || _$Encounter22$patient3 === void 0 ? void 0 : _$Encounter22$patient3[0]) || {}),
41785
42265
  mrn: (_ === null || _ === void 0 ? void 0 : (_$Encounter23 = _.Encounter) === null || _$Encounter23 === void 0 ? void 0 : (_$Encounter23$patient = _$Encounter23.patient_id) === null || _$Encounter23$patient === void 0 ? void 0 : (_$Encounter23$patient2 = _$Encounter23$patient[0]) === null || _$Encounter23$patient2 === void 0 ? void 0 : _$Encounter23$patient2.MRN) || "",
41786
42266
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment34 = _.Appointment) === null || _$Appointment34 === void 0 ? void 0 : (_$Appointment34$Perso = _$Appointment34.PersonID) === null || _$Appointment34$Perso === void 0 ? void 0 : (_$Appointment34$Perso2 = _$Appointment34$Perso[0]) === null || _$Appointment34$Perso2 === void 0 ? void 0 : _$Appointment34$Perso2.birthDay),
41787
42267
  date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment35 = _.Appointment) === null || _$Appointment35 === void 0 ? void 0 : _$Appointment35.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment36 = _.Appointment) === null || _$Appointment36 === void 0 ? void 0 : _$Appointment36.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment37 = _.Appointment) === null || _$Appointment37 === void 0 ? void 0 : _$Appointment37.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment38 = _.Appointment) === null || _$Appointment38 === void 0 ? void 0 : _$Appointment38.start, "hh:mm A") : ""),
@@ -41886,7 +42366,7 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
41886
42366
  // "Modify Appointment": true,
41887
42367
  // "Cancel Appointment": true,
41888
42368
  // "View Profile": true,
41889
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter29 = _.Encounter) === null || _$Encounter29 === void 0 ? void 0 : (_$Encounter29$patient = _$Encounter29.patient_id) === null || _$Encounter29$patient === void 0 ? void 0 : (_$Encounter29$patient2 = _$Encounter29$patient[0]) === null || _$Encounter29$patient2 === void 0 ? void 0 : (_$Encounter29$patient3 = _$Encounter29$patient2.name) === null || _$Encounter29$patient3 === void 0 ? void 0 : _$Encounter29$patient3[0]) || {}),
42369
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter29 = _.Encounter) === null || _$Encounter29 === void 0 ? void 0 : (_$Encounter29$patient = _$Encounter29.patient_id) === null || _$Encounter29$patient === void 0 ? void 0 : (_$Encounter29$patient2 = _$Encounter29$patient[0]) === null || _$Encounter29$patient2 === void 0 ? void 0 : (_$Encounter29$patient3 = _$Encounter29$patient2.name) === null || _$Encounter29$patient3 === void 0 ? void 0 : _$Encounter29$patient3[0]) || {}),
41890
42370
  mrn: (_ === null || _ === void 0 ? void 0 : (_$Encounter30 = _.Encounter) === null || _$Encounter30 === void 0 ? void 0 : (_$Encounter30$patient = _$Encounter30.patient_id) === null || _$Encounter30$patient === void 0 ? void 0 : (_$Encounter30$patient2 = _$Encounter30$patient[0]) === null || _$Encounter30$patient2 === void 0 ? void 0 : _$Encounter30$patient2.MRN) || "",
41891
42371
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment41 = _.Appointment) === null || _$Appointment41 === void 0 ? void 0 : (_$Appointment41$Perso = _$Appointment41.PersonID) === null || _$Appointment41$Perso === void 0 ? void 0 : (_$Appointment41$Perso2 = _$Appointment41$Perso[0]) === null || _$Appointment41$Perso2 === void 0 ? void 0 : _$Appointment41$Perso2.birthDay),
41892
42372
  date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment42 = _.Appointment) === null || _$Appointment42 === void 0 ? void 0 : _$Appointment42.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment43 = _.Appointment) === null || _$Appointment43 === void 0 ? void 0 : _$Appointment43.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment44 = _.Appointment) === null || _$Appointment44 === void 0 ? void 0 : _$Appointment44.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment45 = _.Appointment) === null || _$Appointment45 === void 0 ? void 0 : _$Appointment45.start, "hh:mm A") : ""),
@@ -41967,7 +42447,7 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
41967
42447
  // _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
41968
42448
  // )
41969
42449
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
41970
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : (_$Appointment48$Perso = _$Appointment48.PersonID) === null || _$Appointment48$Perso === void 0 ? void 0 : (_$Appointment48$Perso2 = _$Appointment48$Perso[0]) === null || _$Appointment48$Perso2 === void 0 ? void 0 : (_$Appointment48$Perso3 = _$Appointment48$Perso2.name) === null || _$Appointment48$Perso3 === void 0 ? void 0 : _$Appointment48$Perso3[0]) || {}),
42450
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : (_$Appointment48$Perso = _$Appointment48.PersonID) === null || _$Appointment48$Perso === void 0 ? void 0 : (_$Appointment48$Perso2 = _$Appointment48$Perso[0]) === null || _$Appointment48$Perso2 === void 0 ? void 0 : (_$Appointment48$Perso3 = _$Appointment48$Perso2.name) === null || _$Appointment48$Perso3 === void 0 ? void 0 : _$Appointment48$Perso3[0]) || {}),
41971
42451
  mrn: ((_$Appointment49 = _.Appointment) === null || _$Appointment49 === void 0 ? void 0 : (_$Appointment49$Perso = _$Appointment49.PersonID) === null || _$Appointment49$Perso === void 0 ? void 0 : (_$Appointment49$Perso2 = _$Appointment49$Perso[0]) === null || _$Appointment49$Perso2 === void 0 ? void 0 : (_$Appointment49$Perso3 = _$Appointment49$Perso2.MRN) === null || _$Appointment49$Perso3 === void 0 ? void 0 : _$Appointment49$Perso3[0]) || "",
41972
42452
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment50 = _.Appointment) === null || _$Appointment50 === void 0 ? void 0 : (_$Appointment50$Perso = _$Appointment50.PersonID) === null || _$Appointment50$Perso === void 0 ? void 0 : (_$Appointment50$Perso2 = _$Appointment50$Perso[0]) === null || _$Appointment50$Perso2 === void 0 ? void 0 : _$Appointment50$Perso2.birthDay),
41973
42453
  // genderData: "M",
@@ -41984,7 +42464,7 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
41984
42464
  // }),
41985
42465
  // clinic: _?.practitioner_details?.[0]?.clinic || "",
41986
42466
  visitType: (_$Encounter$0$visit_t = _ === null || _ === void 0 ? void 0 : (_$Encounter36 = _.Encounter) === null || _$Encounter36 === void 0 ? void 0 : (_$Encounter36$ = _$Encounter36[0]) === null || _$Encounter36$ === void 0 ? void 0 : _$Encounter36$.visit_type) !== null && _$Encounter$0$visit_t !== void 0 ? _$Encounter$0$visit_t : "",
41987
- practitionerName: makeName(_ === null || _ === void 0 ? void 0 : (_$Appointment58 = _.Appointment) === null || _$Appointment58 === void 0 ? void 0 : (_$Appointment58$resou = _$Appointment58.resourcecode) === null || _$Appointment58$resou === void 0 ? void 0 : _$Appointment58$resou.name),
42467
+ practitionerName: makeName$1(_ === null || _ === void 0 ? void 0 : (_$Appointment58 = _.Appointment) === null || _$Appointment58 === void 0 ? void 0 : (_$Appointment58$resou = _$Appointment58.resourcecode) === null || _$Appointment58$resou === void 0 ? void 0 : _$Appointment58$resou.name),
41988
42468
  speciality: (_ === null || _ === void 0 ? void 0 : (_$Appointment59 = _.Appointment) === null || _$Appointment59 === void 0 ? void 0 : (_$Appointment59$Speci = _$Appointment59.SpecialtyID) === null || _$Appointment59$Speci === void 0 ? void 0 : (_$Appointment59$Speci2 = _$Appointment59$Speci[0]) === null || _$Appointment59$Speci2 === void 0 ? void 0 : (_$Appointment59$Speci3 = _$Appointment59$Speci2.coding) === null || _$Appointment59$Speci3 === void 0 ? void 0 : (_$Appointment59$Speci4 = _$Appointment59$Speci3[0]) === null || _$Appointment59$Speci4 === void 0 ? void 0 : _$Appointment59$Speci4.display) || "",
41989
42469
  clinic: (_ === null || _ === void 0 ? void 0 : (_$Appointment60 = _.Appointment) === null || _$Appointment60 === void 0 ? void 0 : (_$Appointment60$orgid = _$Appointment60.orgid) === null || _$Appointment60$orgid === void 0 ? void 0 : _$Appointment60$orgid.name) || "",
41990
42470
  appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment61 = _.Appointment) === null || _$Appointment61 === void 0 ? void 0 : _$Appointment61.appstatus) || "",
@@ -42078,7 +42558,7 @@ var GET_FIRST_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getFirst
42078
42558
  // // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender,
42079
42559
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? "",
42080
42560
  // pId: _?.patient_id?.id ?? "",
42081
- 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]) || {}),
42561
+ name: makeName$1((_ === 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]) || {}),
42082
42562
  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) || "",
42083
42563
  age: getAge(_ === 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$$Pers2.birthDay),
42084
42564
  contact: (_$patient_id$0$teleco = _ === null || _ === void 0 ? void 0 : (_$patient_id3 = _.patient_id) === null || _$patient_id3 === void 0 ? void 0 : (_$patient_id3$ = _$patient_id3[0]) === null || _$patient_id3$ === void 0 ? void 0 : (_$patient_id3$$teleco = _$patient_id3$.telecom) === null || _$patient_id3$$teleco === void 0 ? void 0 : (_$patient_id3$$teleco2 = _$patient_id3$$teleco[0]) === null || _$patient_id3$$teleco2 === void 0 ? void 0 : _$patient_id3$$teleco2.value) !== null && _$patient_id$0$teleco !== void 0 ? _$patient_id$0$teleco : "",
@@ -42189,7 +42669,7 @@ var GET_NEW_PATIENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getNewPa
42189
42669
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42190
42670
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42191
42671
  // }),
42192
- 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]) || {}),
42672
+ name: makeName$1((_ === 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]) || {}),
42193
42673
  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) || "",
42194
42674
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : (_$appointmentId8$$Per = _$appointmentId8$.PersonID) === null || _$appointmentId8$$Per === void 0 ? void 0 : (_$appointmentId8$$Per2 = _$appointmentId8$$Per[0]) === null || _$appointmentId8$$Per2 === void 0 ? void 0 : _$appointmentId8$$Per2.birthDay),
42195
42675
  contact: (_$patient_id$0$teleco2 = _ === null || _ === void 0 ? void 0 : (_$patient_id6 = _.patient_id) === null || _$patient_id6 === void 0 ? void 0 : (_$patient_id6$ = _$patient_id6[0]) === null || _$patient_id6$ === void 0 ? void 0 : (_$patient_id6$$teleco = _$patient_id6$.telecom) === null || _$patient_id6$$teleco === void 0 ? void 0 : (_$patient_id6$$teleco2 = _$patient_id6$$teleco[0]) === null || _$patient_id6$$teleco2 === void 0 ? void 0 : _$patient_id6$$teleco2.value) !== null && _$patient_id$0$teleco2 !== void 0 ? _$patient_id$0$teleco2 : "",
@@ -42300,7 +42780,7 @@ var GET_OTHER_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getOther
42300
42780
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42301
42781
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42302
42782
  // }),
42303
- 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]) || {}),
42783
+ name: makeName$1((_ === 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]) || {}),
42304
42784
  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) || "",
42305
42785
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : (_$appointmentId15$$Pe = _$appointmentId15$.PersonID) === null || _$appointmentId15$$Pe === void 0 ? void 0 : (_$appointmentId15$$Pe2 = _$appointmentId15$$Pe[0]) === null || _$appointmentId15$$Pe2 === void 0 ? void 0 : _$appointmentId15$$Pe2.birthDay),
42306
42786
  contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id9 = _.patient_id) === null || _$patient_id9 === void 0 ? void 0 : (_$patient_id9$ = _$patient_id9[0]) === null || _$patient_id9$ === void 0 ? void 0 : (_$patient_id9$$teleco = _$patient_id9$.telecom) === null || _$patient_id9$$teleco === void 0 ? void 0 : (_$patient_id9$$teleco2 = _$patient_id9$$teleco[0]) === null || _$patient_id9$$teleco2 === void 0 ? void 0 : _$patient_id9$$teleco2.value) ? JSON.stringify(_ === 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$$telec = _$patient_id10$.telecom) === null || _$patient_id10$$telec === void 0 ? void 0 : (_$patient_id10$$telec2 = _$patient_id10$$telec[0]) === null || _$patient_id10$$telec2 === void 0 ? void 0 : _$patient_id10$$telec2.value) : "",
@@ -42408,7 +42888,7 @@ var GET_TODAY_VISITS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getToday
42408
42888
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42409
42889
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42410
42890
  // }),
42411
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id11 = _.patient_id) === null || _$patient_id11 === void 0 ? void 0 : (_$patient_id11$ = _$patient_id11[0]) === null || _$patient_id11$ === void 0 ? void 0 : (_$patient_id11$$name = _$patient_id11$.name) === null || _$patient_id11$$name === void 0 ? void 0 : _$patient_id11$$name[0]) || {}),
42891
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id11 = _.patient_id) === null || _$patient_id11 === void 0 ? void 0 : (_$patient_id11$ = _$patient_id11[0]) === null || _$patient_id11$ === void 0 ? void 0 : (_$patient_id11$$name = _$patient_id11$.name) === null || _$patient_id11$$name === void 0 ? void 0 : _$patient_id11$$name[0]) || {}),
42412
42892
  mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id12 = _.patient_id) === null || _$patient_id12 === void 0 ? void 0 : (_$patient_id12$ = _$patient_id12[0]) === null || _$patient_id12$ === void 0 ? void 0 : _$patient_id12$.MRN) || "",
42413
42893
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId22 = _.appointmentId) === null || _$appointmentId22 === void 0 ? void 0 : (_$appointmentId22$ = _$appointmentId22[0]) === null || _$appointmentId22$ === void 0 ? void 0 : (_$appointmentId22$$Pe = _$appointmentId22$.PersonID) === null || _$appointmentId22$$Pe === void 0 ? void 0 : (_$appointmentId22$$Pe2 = _$appointmentId22$$Pe[0]) === null || _$appointmentId22$$Pe2 === void 0 ? void 0 : _$appointmentId22$$Pe2.birthDay),
42414
42894
  contact: (_ === 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$$telec = _$patient_id13$.telecom) === null || _$patient_id13$$telec === void 0 ? void 0 : (_$patient_id13$$telec2 = _$patient_id13$$telec[0]) === null || _$patient_id13$$telec2 === void 0 ? void 0 : _$patient_id13$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id14 = _.patient_id) === null || _$patient_id14 === void 0 ? void 0 : (_$patient_id14$ = _$patient_id14[0]) === null || _$patient_id14$ === void 0 ? void 0 : (_$patient_id14$$telec = _$patient_id14$.telecom) === null || _$patient_id14$$telec === void 0 ? void 0 : (_$patient_id14$$telec2 = _$patient_id14$$telec[0]) === null || _$patient_id14$$telec2 === void 0 ? void 0 : _$patient_id14$$telec2.value) : "",
@@ -42514,7 +42994,7 @@ var GET_WALK_INS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getWalkInsNu
42514
42994
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42515
42995
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42516
42996
  // }),
42517
- 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]) || {}),
42997
+ name: makeName$1((_ === 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]) || {}),
42518
42998
  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$.alias) || "",
42519
42999
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId29 = _.appointmentId) === null || _$appointmentId29 === void 0 ? void 0 : (_$appointmentId29$ = _$appointmentId29[0]) === null || _$appointmentId29$ === void 0 ? void 0 : (_$appointmentId29$$Pe = _$appointmentId29$.PersonID) === null || _$appointmentId29$$Pe === void 0 ? void 0 : (_$appointmentId29$$Pe2 = _$appointmentId29$$Pe[0]) === null || _$appointmentId29$$Pe2 === void 0 ? void 0 : _$appointmentId29$$Pe2.birthDay),
42520
43000
  contact: (_ === 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$$telec = _$patient_id17$.telecom) === null || _$patient_id17$$telec === void 0 ? void 0 : (_$patient_id17$$telec2 = _$patient_id17$$telec[0]) === null || _$patient_id17$$telec2 === void 0 ? void 0 : _$patient_id17$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id18 = _.patient_id) === null || _$patient_id18 === void 0 ? void 0 : (_$patient_id18$ = _$patient_id18[0]) === null || _$patient_id18$ === void 0 ? void 0 : (_$patient_id18$$telec = _$patient_id18$.telecom) === null || _$patient_id18$$telec === void 0 ? void 0 : (_$patient_id18$$telec2 = _$patient_id18$$telec[0]) === null || _$patient_id18$$telec2 === void 0 ? void 0 : _$patient_id18$$telec2.value) : "",
@@ -42601,7 +43081,7 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
42601
43081
  // // genderData: "M",
42602
43082
  // contact: _.Appointment?.PersonID?.[0]?.telecom?.[0]?.value ?? ""
42603
43083
  // }),
42604
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment62 = _.Appointment) === null || _$Appointment62 === void 0 ? void 0 : (_$Appointment62$Perso = _$Appointment62.PersonID) === null || _$Appointment62$Perso === void 0 ? void 0 : (_$Appointment62$Perso2 = _$Appointment62$Perso[0]) === null || _$Appointment62$Perso2 === void 0 ? void 0 : (_$Appointment62$Perso3 = _$Appointment62$Perso2.name) === null || _$Appointment62$Perso3 === void 0 ? void 0 : _$Appointment62$Perso3[0]) || {}),
43084
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Appointment62 = _.Appointment) === null || _$Appointment62 === void 0 ? void 0 : (_$Appointment62$Perso = _$Appointment62.PersonID) === null || _$Appointment62$Perso === void 0 ? void 0 : (_$Appointment62$Perso2 = _$Appointment62$Perso[0]) === null || _$Appointment62$Perso2 === void 0 ? void 0 : (_$Appointment62$Perso3 = _$Appointment62$Perso2.name) === null || _$Appointment62$Perso3 === void 0 ? void 0 : _$Appointment62$Perso3[0]) || {}),
42605
43085
  mrn: ((_$Appointment63 = _.Appointment) === null || _$Appointment63 === void 0 ? void 0 : (_$Appointment63$Perso = _$Appointment63.PersonID) === null || _$Appointment63$Perso === void 0 ? void 0 : (_$Appointment63$Perso2 = _$Appointment63$Perso[0]) === null || _$Appointment63$Perso2 === void 0 ? void 0 : (_$Appointment63$Perso3 = _$Appointment63$Perso2.MRN) === null || _$Appointment63$Perso3 === void 0 ? void 0 : _$Appointment63$Perso3[0]) || "",
42606
43086
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment64 = _.Appointment) === null || _$Appointment64 === void 0 ? void 0 : (_$Appointment64$Perso = _$Appointment64.PersonID) === null || _$Appointment64$Perso === void 0 ? void 0 : (_$Appointment64$Perso2 = _$Appointment64$Perso[0]) === null || _$Appointment64$Perso2 === void 0 ? void 0 : _$Appointment64$Perso2.birthDay),
42607
43087
  contact: (_ === null || _ === void 0 ? void 0 : (_$Appointment65 = _.Appointment) === null || _$Appointment65 === void 0 ? void 0 : (_$Appointment65$Perso = _$Appointment65.PersonID) === null || _$Appointment65$Perso === void 0 ? void 0 : (_$Appointment65$Perso2 = _$Appointment65$Perso[0]) === null || _$Appointment65$Perso2 === void 0 ? void 0 : (_$Appointment65$Perso3 = _$Appointment65$Perso2.telecom) === null || _$Appointment65$Perso3 === void 0 ? void 0 : (_$Appointment65$Perso4 = _$Appointment65$Perso3[0]) === null || _$Appointment65$Perso4 === void 0 ? void 0 : _$Appointment65$Perso4.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Appointment66 = _.Appointment) === null || _$Appointment66 === void 0 ? void 0 : (_$Appointment66$Perso = _$Appointment66.PersonID) === null || _$Appointment66$Perso === void 0 ? void 0 : (_$Appointment66$Perso2 = _$Appointment66$Perso[0]) === null || _$Appointment66$Perso2 === void 0 ? void 0 : (_$Appointment66$Perso3 = _$Appointment66$Perso2.telecom) === null || _$Appointment66$Perso3 === void 0 ? void 0 : (_$Appointment66$Perso4 = _$Appointment66$Perso3[0]) === null || _$Appointment66$Perso4 === void 0 ? void 0 : _$Appointment66$Perso4.value) : "",
@@ -42626,7 +43106,7 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
42626
43106
  // }).join(", ") ?? "",
42627
43107
  // clinic: _?.Appointment?.orgid?.name ?? ""
42628
43108
  // }),
42629
- practitionerName: makeName(_ === null || _ === void 0 ? void 0 : (_$Appointment72 = _.Appointment) === null || _$Appointment72 === void 0 ? void 0 : (_$Appointment72$resou = _$Appointment72.resourcecode) === null || _$Appointment72$resou === void 0 ? void 0 : _$Appointment72$resou.name),
43109
+ practitionerName: makeName$1(_ === null || _ === void 0 ? void 0 : (_$Appointment72 = _.Appointment) === null || _$Appointment72 === void 0 ? void 0 : (_$Appointment72$resou = _$Appointment72.resourcecode) === null || _$Appointment72$resou === void 0 ? void 0 : _$Appointment72$resou.name),
42630
43110
  speciality: (_ === null || _ === void 0 ? void 0 : (_$Appointment73 = _.Appointment) === null || _$Appointment73 === void 0 ? void 0 : (_$Appointment73$Speci = _$Appointment73.SpecialtyID) === null || _$Appointment73$Speci === void 0 ? void 0 : (_$Appointment73$Speci2 = _$Appointment73$Speci[0]) === null || _$Appointment73$Speci2 === void 0 ? void 0 : (_$Appointment73$Speci3 = _$Appointment73$Speci2.coding) === null || _$Appointment73$Speci3 === void 0 ? void 0 : (_$Appointment73$Speci4 = _$Appointment73$Speci3[0]) === null || _$Appointment73$Speci4 === void 0 ? void 0 : _$Appointment73$Speci4.display) || "",
42631
43111
  clinic: (_ === null || _ === void 0 ? void 0 : (_$Appointment74 = _.Appointment) === null || _$Appointment74 === void 0 ? void 0 : (_$Appointment74$orgid = _$Appointment74.orgid) === null || _$Appointment74$orgid === void 0 ? void 0 : _$Appointment74$orgid.name) || "",
42632
43112
  appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment75 = _.Appointment) === null || _$Appointment75 === void 0 ? void 0 : _$Appointment75.appstatus) || "",
@@ -42725,7 +43205,7 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
42725
43205
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42726
43206
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42727
43207
  // }),
42728
- 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]) || {}),
43208
+ name: makeName$1((_ === 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]) || {}),
42729
43209
  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) || "",
42730
43210
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : (_$appointmentId36$$Pe = _$appointmentId36$.PersonID) === null || _$appointmentId36$$Pe === void 0 ? void 0 : (_$appointmentId36$$Pe2 = _$appointmentId36$$Pe[0]) === null || _$appointmentId36$$Pe2 === void 0 ? void 0 : _$appointmentId36$$Pe2.birthDay),
42731
43211
  contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : (_$patient_id21$$telec = _$patient_id21$.telecom) === null || _$patient_id21$$telec === void 0 ? void 0 : (_$patient_id21$$telec2 = _$patient_id21$$telec[0]) === null || _$patient_id21$$telec2 === void 0 ? void 0 : _$patient_id21$$telec2.value) ? JSON.stringify(_ === 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$$telec = _$patient_id22$.telecom) === null || _$patient_id22$$telec === void 0 ? void 0 : (_$patient_id22$$telec2 = _$patient_id22$$telec[0]) === null || _$patient_id22$$telec2 === void 0 ? void 0 : _$patient_id22$$telec2.value) : "",
@@ -42836,7 +43316,7 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
42836
43316
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42837
43317
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42838
43318
  // }),
42839
- 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]) || {}),
43319
+ name: makeName$1((_ === 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]) || {}),
42840
43320
  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) || "",
42841
43321
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : (_$appointmentId42$$Pe = _$appointmentId42$.PersonID) === null || _$appointmentId42$$Pe === void 0 ? void 0 : (_$appointmentId42$$Pe2 = _$appointmentId42$$Pe[0]) === null || _$appointmentId42$$Pe2 === void 0 ? void 0 : _$appointmentId42$$Pe2.birthDay),
42842
43322
  contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id25 = _.patient_id) === null || _$patient_id25 === void 0 ? void 0 : (_$patient_id25$ = _$patient_id25[0]) === null || _$patient_id25$ === void 0 ? void 0 : (_$patient_id25$$telec = _$patient_id25$.telecom) === null || _$patient_id25$$telec === void 0 ? void 0 : (_$patient_id25$$telec2 = _$patient_id25$$telec[0]) === null || _$patient_id25$$telec2 === void 0 ? void 0 : _$patient_id25$$telec2.value) ? JSON.stringify(_ === 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$$telec = _$patient_id26$.telecom) === null || _$patient_id26$$telec === void 0 ? void 0 : (_$patient_id26$$telec2 = _$patient_id26$$telec[0]) === null || _$patient_id26$$telec2 === void 0 ? void 0 : _$patient_id26$$telec2.value) : "",
@@ -42946,7 +43426,7 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
42946
43426
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
42947
43427
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
42948
43428
  // }),
42949
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : (_$patient_id27$$name = _$patient_id27$.name) === null || _$patient_id27$$name === void 0 ? void 0 : _$patient_id27$$name[0]) || {}),
43429
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : (_$patient_id27$$name = _$patient_id27$.name) === null || _$patient_id27$$name === void 0 ? void 0 : _$patient_id27$$name[0]) || {}),
42950
43430
  mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id28 = _.patient_id) === null || _$patient_id28 === void 0 ? void 0 : (_$patient_id28$ = _$patient_id28[0]) === null || _$patient_id28$ === void 0 ? void 0 : _$patient_id28$.MRN) || "",
42951
43431
  age: getAge(_ === 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$$Pe2.birthDay),
42952
43432
  contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id29 = _.patient_id) === null || _$patient_id29 === void 0 ? void 0 : (_$patient_id29$ = _$patient_id29[0]) === null || _$patient_id29$ === void 0 ? void 0 : (_$patient_id29$$telec = _$patient_id29$.telecom) === null || _$patient_id29$$telec === void 0 ? void 0 : (_$patient_id29$$telec2 = _$patient_id29$$telec[0]) === null || _$patient_id29$$telec2 === void 0 ? void 0 : _$patient_id29$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id30 = _.patient_id) === null || _$patient_id30 === void 0 ? void 0 : (_$patient_id30$ = _$patient_id30[0]) === null || _$patient_id30$ === void 0 ? void 0 : (_$patient_id30$$telec = _$patient_id30$.telecom) === null || _$patient_id30$$telec === void 0 ? void 0 : (_$patient_id30$$telec2 = _$patient_id30$$telec[0]) === null || _$patient_id30$$telec2 === void 0 ? void 0 : _$patient_id30$$telec2.value) : "",
@@ -43056,7 +43536,7 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
43056
43536
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
43057
43537
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
43058
43538
  // }),
43059
- name: makeName((_ === 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$$name = _$patient_id31$.name) === null || _$patient_id31$$name === void 0 ? void 0 : _$patient_id31$$name[0]) || {}),
43539
+ name: makeName$1((_ === 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$$name = _$patient_id31$.name) === null || _$patient_id31$$name === void 0 ? void 0 : _$patient_id31$$name[0]) || {}),
43060
43540
  mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id32 = _.patient_id) === null || _$patient_id32 === void 0 ? void 0 : (_$patient_id32$ = _$patient_id32[0]) === null || _$patient_id32$ === void 0 ? void 0 : _$patient_id32$.MRN) || "",
43061
43541
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId54 = _.appointmentId) === null || _$appointmentId54 === void 0 ? void 0 : (_$appointmentId54$ = _$appointmentId54[0]) === null || _$appointmentId54$ === void 0 ? void 0 : (_$appointmentId54$$Pe = _$appointmentId54$.PersonID) === null || _$appointmentId54$$Pe === void 0 ? void 0 : (_$appointmentId54$$Pe2 = _$appointmentId54$$Pe[0]) === null || _$appointmentId54$$Pe2 === void 0 ? void 0 : _$appointmentId54$$Pe2.birthDay),
43062
43542
  contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : (_$patient_id33$$telec = _$patient_id33$.telecom) === null || _$patient_id33$$telec === void 0 ? void 0 : (_$patient_id33$$telec2 = _$patient_id33$$telec[0]) === null || _$patient_id33$$telec2 === void 0 ? void 0 : _$patient_id33$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id34 = _.patient_id) === null || _$patient_id34 === void 0 ? void 0 : (_$patient_id34$ = _$patient_id34[0]) === null || _$patient_id34$ === void 0 ? void 0 : (_$patient_id34$$telec = _$patient_id34$.telecom) === null || _$patient_id34$$telec === void 0 ? void 0 : (_$patient_id34$$telec2 = _$patient_id34$$telec[0]) === null || _$patient_id34$$telec2 === void 0 ? void 0 : _$patient_id34$$telec2.value) : "",
@@ -43166,7 +43646,7 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
43166
43646
  // gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
43167
43647
  // contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
43168
43648
  // }),
43169
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : (_$patient_id35$ = _$patient_id35[0]) === null || _$patient_id35$ === void 0 ? void 0 : (_$patient_id35$$name = _$patient_id35$.name) === null || _$patient_id35$$name === void 0 ? void 0 : _$patient_id35$$name[0]) || {}),
43649
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : (_$patient_id35$ = _$patient_id35[0]) === null || _$patient_id35$ === void 0 ? void 0 : (_$patient_id35$$name = _$patient_id35$.name) === null || _$patient_id35$$name === void 0 ? void 0 : _$patient_id35$$name[0]) || {}),
43170
43650
  mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id36 = _.patient_id) === null || _$patient_id36 === void 0 ? void 0 : (_$patient_id36$ = _$patient_id36[0]) === null || _$patient_id36$ === void 0 ? void 0 : _$patient_id36$.MRN) || "",
43171
43651
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : (_$appointmentId60$$Pe = _$appointmentId60$.PersonID) === null || _$appointmentId60$$Pe === void 0 ? void 0 : (_$appointmentId60$$Pe2 = _$appointmentId60$$Pe[0]) === null || _$appointmentId60$$Pe2 === void 0 ? void 0 : _$appointmentId60$$Pe2.birthDay),
43172
43652
  contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id37 = _.patient_id) === null || _$patient_id37 === void 0 ? void 0 : (_$patient_id37$ = _$patient_id37[0]) === null || _$patient_id37$ === void 0 ? void 0 : (_$patient_id37$$telec = _$patient_id37$.telecom) === null || _$patient_id37$$telec === void 0 ? void 0 : (_$patient_id37$$telec2 = _$patient_id37$$telec[0]) === null || _$patient_id37$$telec2 === void 0 ? void 0 : _$patient_id37$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$telec = _$patient_id38$.telecom) === null || _$patient_id38$$telec === void 0 ? void 0 : (_$patient_id38$$telec2 = _$patient_id38$$telec[0]) === null || _$patient_id38$$telec2 === void 0 ? void 0 : _$patient_id38$$telec2.value) : "",
@@ -44173,7 +44653,7 @@ var DAY_BASED_PRACTITIONER_LIST = createAsyncThunk("dayEndProcessSlice/dayBasedP
44173
44653
  arr = data.result.map(function (val) {
44174
44654
  var _val$encounterid, _val$encounterid$pati, _val$encounterid$pati2, _val$encounterid$pati3, _val$appointmentid, _val$appointmentid$Pa, _val$appointmentid$Pa2, _val$appointmentid$Pa3, _val$appointmentid2, _val$appointmentid2$P, _val$appointmentid2$P2, _val$appointmentid2$P3, _val$encounterid2, _val$encounterid2$pat, _val$encounterid2$pat2, _val$appointmentid3, _val$appointmentid3$P, _val$appointmentid3$P2, _val$encounterid3, _val$encounterid3$pat, _val$encounterid3$pat2, _val$appointmentid4, _val$appointmentid4$P, _val$appointmentid4$P2, _val$appointmentid5, _val$appointmentid5$P, _val$appointmentid5$P2, _val$appointmentid6, _val$encounterid4, _val$encounterid5, _val$appointmentid7;
44175
44655
 
44176
- var name = makeName(val === null || val === void 0 ? void 0 : (_val$encounterid = val.encounterid) === null || _val$encounterid === void 0 ? void 0 : (_val$encounterid$pati = _val$encounterid.patient_id) === null || _val$encounterid$pati === void 0 ? void 0 : (_val$encounterid$pati2 = _val$encounterid$pati[0]) === null || _val$encounterid$pati2 === void 0 ? void 0 : (_val$encounterid$pati3 = _val$encounterid$pati2.name) === null || _val$encounterid$pati3 === void 0 ? void 0 : _val$encounterid$pati3[0]) || makeName(val === null || val === void 0 ? void 0 : (_val$appointmentid = val.appointmentid) === null || _val$appointmentid === void 0 ? void 0 : (_val$appointmentid$Pa = _val$appointmentid.PatientID) === null || _val$appointmentid$Pa === void 0 ? void 0 : (_val$appointmentid$Pa2 = _val$appointmentid$Pa[0]) === null || _val$appointmentid$Pa2 === void 0 ? void 0 : (_val$appointmentid$Pa3 = _val$appointmentid$Pa2.name) === null || _val$appointmentid$Pa3 === void 0 ? void 0 : _val$appointmentid$Pa3[0]) || makeName(val === null || val === void 0 ? void 0 : (_val$appointmentid2 = val.appointmentid) === null || _val$appointmentid2 === void 0 ? void 0 : (_val$appointmentid2$P = _val$appointmentid2.Person) === null || _val$appointmentid2$P === void 0 ? void 0 : (_val$appointmentid2$P2 = _val$appointmentid2$P[0]) === null || _val$appointmentid2$P2 === void 0 ? void 0 : (_val$appointmentid2$P3 = _val$appointmentid2$P2.name) === null || _val$appointmentid2$P3 === void 0 ? void 0 : _val$appointmentid2$P3[0]);
44656
+ var name = makeName$1(val === null || val === void 0 ? void 0 : (_val$encounterid = val.encounterid) === null || _val$encounterid === void 0 ? void 0 : (_val$encounterid$pati = _val$encounterid.patient_id) === null || _val$encounterid$pati === void 0 ? void 0 : (_val$encounterid$pati2 = _val$encounterid$pati[0]) === null || _val$encounterid$pati2 === void 0 ? void 0 : (_val$encounterid$pati3 = _val$encounterid$pati2.name) === null || _val$encounterid$pati3 === void 0 ? void 0 : _val$encounterid$pati3[0]) || makeName$1(val === null || val === void 0 ? void 0 : (_val$appointmentid = val.appointmentid) === null || _val$appointmentid === void 0 ? void 0 : (_val$appointmentid$Pa = _val$appointmentid.PatientID) === null || _val$appointmentid$Pa === void 0 ? void 0 : (_val$appointmentid$Pa2 = _val$appointmentid$Pa[0]) === null || _val$appointmentid$Pa2 === void 0 ? void 0 : (_val$appointmentid$Pa3 = _val$appointmentid$Pa2.name) === null || _val$appointmentid$Pa3 === void 0 ? void 0 : _val$appointmentid$Pa3[0]) || makeName$1(val === null || val === void 0 ? void 0 : (_val$appointmentid2 = val.appointmentid) === null || _val$appointmentid2 === void 0 ? void 0 : (_val$appointmentid2$P = _val$appointmentid2.Person) === null || _val$appointmentid2$P === void 0 ? void 0 : (_val$appointmentid2$P2 = _val$appointmentid2$P[0]) === null || _val$appointmentid2$P2 === void 0 ? void 0 : (_val$appointmentid2$P3 = _val$appointmentid2$P2.name) === null || _val$appointmentid2$P3 === void 0 ? void 0 : _val$appointmentid2$P3[0]);
44177
44657
  var MRN = (val === null || val === void 0 ? void 0 : (_val$encounterid2 = val.encounterid) === null || _val$encounterid2 === void 0 ? void 0 : (_val$encounterid2$pat = _val$encounterid2.patient_id) === null || _val$encounterid2$pat === void 0 ? void 0 : (_val$encounterid2$pat2 = _val$encounterid2$pat[0]) === null || _val$encounterid2$pat2 === void 0 ? void 0 : _val$encounterid2$pat2.MRN) || (val === null || val === void 0 ? void 0 : (_val$appointmentid3 = val.appointmentid) === null || _val$appointmentid3 === void 0 ? void 0 : (_val$appointmentid3$P = _val$appointmentid3.PatientID) === null || _val$appointmentid3$P === void 0 ? void 0 : (_val$appointmentid3$P2 = _val$appointmentid3$P[0]) === null || _val$appointmentid3$P2 === void 0 ? void 0 : _val$appointmentid3$P2.alias) || "----";
44178
44658
  var age = getAge(val === null || val === void 0 ? void 0 : (_val$encounterid3 = val.encounterid) === null || _val$encounterid3 === void 0 ? void 0 : (_val$encounterid3$pat = _val$encounterid3.patient_id) === null || _val$encounterid3$pat === void 0 ? void 0 : (_val$encounterid3$pat2 = _val$encounterid3$pat[0]) === null || _val$encounterid3$pat2 === void 0 ? void 0 : _val$encounterid3$pat2.birthDate) || getAge(val === null || val === void 0 ? void 0 : (_val$appointmentid4 = val.appointmentid) === null || _val$appointmentid4 === void 0 ? void 0 : (_val$appointmentid4$P = _val$appointmentid4.PatientID) === null || _val$appointmentid4$P === void 0 ? void 0 : (_val$appointmentid4$P2 = _val$appointmentid4$P[0]) === null || _val$appointmentid4$P2 === void 0 ? void 0 : _val$appointmentid4$P2.birthDate) || getAge(val === null || val === void 0 ? void 0 : (_val$appointmentid5 = val.appointmentid) === null || _val$appointmentid5 === void 0 ? void 0 : (_val$appointmentid5$P = _val$appointmentid5.Person) === null || _val$appointmentid5$P === void 0 ? void 0 : (_val$appointmentid5$P2 = _val$appointmentid5$P[0]) === null || _val$appointmentid5$P2 === void 0 ? void 0 : _val$appointmentid5$P2.birthDate);
44179
44659
  return {
@@ -45036,7 +45516,7 @@ var PRACTITIONER_DROPDOWN = createAsyncThunk("orderSetApiSlice/practitionerDropD
45036
45516
  obj = data.result.map(function (val) {
45037
45517
  var _val$name;
45038
45518
 
45039
- var name = makeName((val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : _val$name[0]) || {});
45519
+ var name = makeName$1((val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : _val$name[0]) || {});
45040
45520
  return {
45041
45521
  value: val === null || val === void 0 ? void 0 : val._id,
45042
45522
  label: name
@@ -45510,7 +45990,7 @@ var searchCodeDesc = function searchCodeDesc(patientId, encounterId, search) {
45510
45990
  return {
45511
45991
  db_name: "primarycare",
45512
45992
  entity: "RCM_PatientChargeTrx",
45513
- filter: "RCM_PatientChargeTrx.patientid=='".concat(patientId, "' && RCM_PatientChargeTrx.encounterid=='").concat(encounterId, "' && RCM_PatientChargeTrx.activestatus==true && (like(document(document(RCM_PatientChargeTrx.orderrefid).drugCode).ShortDesc,'%").concat(search, "%',true) || like(document(document(RCM_PatientChargeTrx.orderrefid).drugCode).DrugCode,'%").concat(search, "%',true)) && (false==true ? RCM_PatientChargeTrx.billstatus == false: RCM_PatientChargeTrx.billstatus == RCM_PatientChargeTrx.billstatus)"),
45993
+ filter: "RCM_PatientChargeTrx.patientid=='".concat(patientId, "' && RCM_PatientChargeTrx.encounterid=='").concat(encounterId, "' && RCM_PatientChargeTrx.activestatus==true && (like(document(document(RCM_PatientChargeTrx.orderrefid).drugCode).ShortDesc,'%").concat(search, "%',true) || like(document(document(RCM_PatientChargeTrx.orderrefid).drugCode).DrugCode,'%").concat(search, "%',true) || like(document(document(RCM_PatientChargeTrx.orderrefid).orderCatalog).ordercatalog,'%").concat(search, "%',true) ||like(document(document(RCM_PatientChargeTrx.orderrefid).orderCatalog).shortdesc,'%").concat(search, "%',true)) && (false==true ? RCM_PatientChargeTrx.billstatus == false: RCM_PatientChargeTrx.billstatus == RCM_PatientChargeTrx.billstatus)"),
45514
45994
  return_fields: "merge(RCM_PatientChargeTrx,{service:contains(RCM_PatientChargeTrx.orderrefid,'PH_OrderLine')?document(document(RCM_PatientChargeTrx.orderrefid).drugCode).DrugCode:contains(RCM_PatientChargeTrx.orderrefid,'CA_OrderLine')?document(document(RCM_PatientChargeTrx.orderrefid).orderCatalog).ordercatalog:false,servicedesc:contains(RCM_PatientChargeTrx.orderrefid,'PH_OrderLine')?document(document(RCM_PatientChargeTrx.orderrefid).drugCode).ShortDesc:contains(RCM_PatientChargeTrx.orderrefid,'CA_OrderLine')?document(document(RCM_PatientChargeTrx.orderrefid).orderCatalog).shortdesc:false,orderref:contains(RCM_PatientChargeTrx.orderrefid,'PH_OrderLine')?document(RCM_PatientChargeTrx.orderrefid).prescriptionId:contains(RCM_PatientChargeTrx.orderrefid,'CA_OrderLine')?document(RCM_PatientChargeTrx.orderrefid).order_Id:false,ordcatordrugclass:contains(RCM_PatientChargeTrx.orderrefid,'PH_OrderLine')?document(document(document(RCM_PatientChargeTrx.orderrefid).drugCode).DrugCategory).shortdesc:contains(RCM_PatientChargeTrx.orderrefid,'CA_OrderLine')?document(document(document(RCM_PatientChargeTrx.orderrefid).orderCatalog).ordercategory).ordercategory:false,chargeuom:document(RCM_PatientChargeTrx.chargeuom).UOM},{orderdatetime:contains(RCM_PatientChargeTrx.orderrefid,'PH_OrderLine')?document(RCM_PatientChargeTrx.orderrefid).PrescriptionDate:contains(RCM_PatientChargeTrx.orderrefid,'CA_OrderLine')?document(RCM_PatientChargeTrx.orderrefid).orderDateTime:false})"
45515
45995
  };
45516
45996
  };
@@ -45598,7 +46078,8 @@ var saveBill = {
45598
46078
  totnetamt: billHeaderSave.totnetamt,
45599
46079
  totpatientshare: billHeaderSave.totpatientshare,
45600
46080
  totpayershare: billHeaderSave.totpayershare,
45601
- billhstatus: billHeaderSave.billhstatus
46081
+ billhstatus: billHeaderSave.billhstatus,
46082
+ payerid: billHeaderSave === null || billHeaderSave === void 0 ? void 0 : billHeaderSave.payerid
45602
46083
  }
45603
46084
  }];
45604
46085
  },
@@ -45630,21 +46111,113 @@ var saveBill = {
45630
46111
  paidamt: paymentPayload === null || paymentPayload === void 0 ? void 0 : paymentPayload.paidamt,
45631
46112
  balamt: paymentPayload === null || paymentPayload === void 0 ? void 0 : paymentPayload.balamt,
45632
46113
  paymentdtls: paymentPayload === null || paymentPayload === void 0 ? void 0 : paymentPayload.paymentdtls,
45633
- settlenow: paymentPayload === null || paymentPayload === void 0 ? void 0 : paymentPayload.settlenow
46114
+ settlenow: paymentPayload === null || paymentPayload === void 0 ? void 0 : paymentPayload.settlenow,
46115
+ roundoffamt: Number(paymentPayload === null || paymentPayload === void 0 ? void 0 : paymentPayload.roundoffamt)
45634
46116
  }
45635
46117
  }];
45636
46118
  },
45637
46119
  billStatusSave: function billStatusSave(billIds) {
45638
46120
  return {
45639
- db_name: "primarycare",
46121
+ db_name: dbName,
45640
46122
  queryid: "b9d07f67-4f09-4c31-b9fd-981bc1decf0c",
45641
46123
  filter: {
45642
46124
  RCM_PatientChargeTrx_id: billIds
45643
46125
  }
45644
46126
  };
46127
+ },
46128
+ billRecieptRead: function billRecieptRead(billHeaderId) {
46129
+ return {
46130
+ db_name: dbName,
46131
+ filter: {
46132
+ biihdr_id: "".concat(billHeaderId)
46133
+ },
46134
+ queryid: "ea55c1ff-ef78-43a8-aecf-4aa0784514eb"
46135
+ };
45645
46136
  }
45646
46137
  };
45647
46138
 
46139
+ var makeName = function makeName() {
46140
+ var _prefix$, _prefix$$coding, _prefix$$coding$, _prefix$coding, _prefix$coding$, _prefix$2, _suffix$, _suffix$$coding, _suffix$$coding$, _suffix$coding, _suffix$coding$, _suffix$2;
46141
+
46142
+ var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
46143
+ var _nameObj$prefix = nameObj.prefix,
46144
+ prefix = _nameObj$prefix === void 0 ? "" : _nameObj$prefix,
46145
+ _nameObj$given = nameObj.given,
46146
+ given = _nameObj$given === void 0 ? "" : _nameObj$given,
46147
+ _nameObj$text = nameObj.text,
46148
+ text = _nameObj$text === void 0 ? "" : _nameObj$text,
46149
+ _nameObj$suffix = nameObj.suffix,
46150
+ suffix = _nameObj$suffix === void 0 ? "" : _nameObj$suffix,
46151
+ _nameObj$family = nameObj.family,
46152
+ family = _nameObj$family === void 0 ? "" : _nameObj$family;
46153
+ var prefixVal = (prefix === null || prefix === void 0 ? void 0 : (_prefix$ = prefix[0]) === null || _prefix$ === void 0 ? void 0 : (_prefix$$coding = _prefix$.coding) === null || _prefix$$coding === void 0 ? void 0 : (_prefix$$coding$ = _prefix$$coding[0]) === null || _prefix$$coding$ === void 0 ? void 0 : _prefix$$coding$.display) || (prefix === null || prefix === void 0 ? void 0 : (_prefix$coding = prefix.coding) === null || _prefix$coding === void 0 ? void 0 : (_prefix$coding$ = _prefix$coding[0]) === null || _prefix$coding$ === void 0 ? void 0 : _prefix$coding$.display) || (prefix === null || prefix === void 0 ? void 0 : (_prefix$2 = prefix[0]) === null || _prefix$2 === void 0 ? void 0 : _prefix$2.display) || (prefix === null || prefix === void 0 ? void 0 : prefix.display) || "";
46154
+ var suffixVal = (suffix === null || suffix === void 0 ? void 0 : (_suffix$ = suffix[0]) === null || _suffix$ === void 0 ? void 0 : (_suffix$$coding = _suffix$.coding) === null || _suffix$$coding === void 0 ? void 0 : (_suffix$$coding$ = _suffix$$coding[0]) === null || _suffix$$coding$ === void 0 ? void 0 : _suffix$$coding$.display) || (suffix === null || suffix === void 0 ? void 0 : (_suffix$coding = suffix.coding) === null || _suffix$coding === void 0 ? void 0 : (_suffix$coding$ = _suffix$coding[0]) === null || _suffix$coding$ === void 0 ? void 0 : _suffix$coding$.display) || (suffix === null || suffix === void 0 ? void 0 : (_suffix$2 = suffix[0]) === null || _suffix$2 === void 0 ? void 0 : _suffix$2.display) || (suffix === null || suffix === void 0 ? void 0 : suffix.display) || "";
46155
+ return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(family && family + " ").concat(suffixVal && suffixVal);
46156
+ };
46157
+
46158
+ var createDate = function createDate(date) {
46159
+ return moment$1.unix(date).format("DD/MM/YYYY HH:mm");
46160
+ };
46161
+
46162
+ var constructReciept = function constructReciept(data) {
46163
+ var _data$encounterid, _data$encounterid$Org, _data$encounterid2, _data$encounterid2$Or, _data$encounterid3, _data$encounterid3$Or, _data$encounterid4, _data$encounterid4$Or, _data$encounterid4$Or2, _data$encounterid4$Or3, _data$encounterid5, _data$encounterid5$Or, _data$encounterid5$Or2, _data$encounterid5$Or3, _data$patientid, _data$patientid2, _data$patientid3, _data$patientid3$gend, _data$patientid4, _data$encounterid6, _data$encounterid7, _data$encounterid8, _data$encounterid8$pr, _data$encounterid8$pr2, _data$encounterid8$pr3, _data$encounterid9, _data$encounterid9$pr, _data$encounterid9$pr2, _data$encounterid10, _data$encounterid10$p, _data$encounterid10$p2, _data$payerid, _data$totgrossamt, _data$totdiscamt, _data$totnetamt, _data$totpatientshare, _data$totpayershare, _data$paymentdtls, _data$paymentdtls$, _data$paymentdtls$$bi, _data$paymentdtls2, _data$paymentdtls2$, _data$paymentdtls2$$b, _data$paymentdtls3, _data$paymentdtls3$, _data$paymentdtls3$$p, _data$glNo, _data$glDate, _data$guarantor, _data$plan, _data$sponsor;
46164
+
46165
+ debugger;
46166
+ var pinCode = data === null || data === void 0 ? void 0 : (_data$encounterid = data.encounterid) === null || _data$encounterid === void 0 ? void 0 : (_data$encounterid$Org = _data$encounterid.Organization_id) === null || _data$encounterid$Org === void 0 ? void 0 : _data$encounterid$Org.address;
46167
+ return {
46168
+ address: {
46169
+ name: data === null || data === void 0 ? void 0 : (_data$encounterid2 = data.encounterid) === null || _data$encounterid2 === void 0 ? void 0 : (_data$encounterid2$Or = _data$encounterid2.Organization_id) === null || _data$encounterid2$Or === void 0 ? void 0 : _data$encounterid2$Or.name,
46170
+ addressName: pinCode === null || pinCode === void 0 ? void 0 : pinCode.substring(0, pinCode.length - 8),
46171
+ postBox: pinCode === null || pinCode === void 0 ? void 0 : pinCode.slice(-6),
46172
+ logo: data === null || data === void 0 ? void 0 : (_data$encounterid3 = data.encounterid) === null || _data$encounterid3 === void 0 ? void 0 : (_data$encounterid3$Or = _data$encounterid3.Organization_id) === null || _data$encounterid3$Or === void 0 ? void 0 : _data$encounterid3$Or.logo,
46173
+ telecom: (data === null || data === void 0 ? void 0 : (_data$encounterid4 = data.encounterid) === null || _data$encounterid4 === void 0 ? void 0 : (_data$encounterid4$Or = _data$encounterid4.Organization_id) === null || _data$encounterid4$Or === void 0 ? void 0 : (_data$encounterid4$Or2 = _data$encounterid4$Or.telecom) === null || _data$encounterid4$Or2 === void 0 ? void 0 : (_data$encounterid4$Or3 = _data$encounterid4$Or2[0]) === null || _data$encounterid4$Or3 === void 0 ? void 0 : _data$encounterid4$Or3.valueprefix) + " " + (data === null || data === void 0 ? void 0 : (_data$encounterid5 = data.encounterid) === null || _data$encounterid5 === void 0 ? void 0 : (_data$encounterid5$Or = _data$encounterid5.Organization_id) === null || _data$encounterid5$Or === void 0 ? void 0 : (_data$encounterid5$Or2 = _data$encounterid5$Or.telecom) === null || _data$encounterid5$Or2 === void 0 ? void 0 : (_data$encounterid5$Or3 = _data$encounterid5$Or2[0]) === null || _data$encounterid5$Or3 === void 0 ? void 0 : _data$encounterid5$Or3.value)
46174
+ },
46175
+ patient: {
46176
+ name: makeName(data === null || data === void 0 ? void 0 : (_data$patientid = data.patientid) === null || _data$patientid === void 0 ? void 0 : _data$patientid.name[0]),
46177
+ age: data === null || data === void 0 ? void 0 : (_data$patientid2 = data.patientid) === null || _data$patientid2 === void 0 ? void 0 : _data$patientid2.age,
46178
+ gender: data === null || data === void 0 ? void 0 : (_data$patientid3 = data.patientid) === null || _data$patientid3 === void 0 ? void 0 : (_data$patientid3$gend = _data$patientid3.gender) === null || _data$patientid3$gend === void 0 ? void 0 : _data$patientid3$gend.display,
46179
+ mrn: data === null || data === void 0 ? void 0 : (_data$patientid4 = data.patientid) === null || _data$patientid4 === void 0 ? void 0 : _data$patientid4.alias
46180
+ },
46181
+ encounterStartDate: createDate(data === null || data === void 0 ? void 0 : (_data$encounterid6 = data.encounterid) === null || _data$encounterid6 === void 0 ? void 0 : _data$encounterid6.encounterdate),
46182
+ encounterEndDate: createDate(data === null || data === void 0 ? void 0 : (_data$encounterid7 = data.encounterid) === null || _data$encounterid7 === void 0 ? void 0 : _data$encounterid7.encounterenddate),
46183
+ practitioner: {
46184
+ speciality: data === null || data === void 0 ? void 0 : (_data$encounterid8 = data.encounterid) === null || _data$encounterid8 === void 0 ? void 0 : (_data$encounterid8$pr = _data$encounterid8.practitioner_details) === null || _data$encounterid8$pr === void 0 ? void 0 : (_data$encounterid8$pr2 = _data$encounterid8$pr[0]) === null || _data$encounterid8$pr2 === void 0 ? void 0 : (_data$encounterid8$pr3 = _data$encounterid8$pr2.speciality) === null || _data$encounterid8$pr3 === void 0 ? void 0 : _data$encounterid8$pr3.display,
46185
+ name: data === null || data === void 0 ? void 0 : (_data$encounterid9 = data.encounterid) === null || _data$encounterid9 === void 0 ? void 0 : (_data$encounterid9$pr = _data$encounterid9.practitioner_details) === null || _data$encounterid9$pr === void 0 ? void 0 : (_data$encounterid9$pr2 = _data$encounterid9$pr[0]) === null || _data$encounterid9$pr2 === void 0 ? void 0 : _data$encounterid9$pr2.id_name,
46186
+ location: data === null || data === void 0 ? void 0 : (_data$encounterid10 = data.encounterid) === null || _data$encounterid10 === void 0 ? void 0 : (_data$encounterid10$p = _data$encounterid10.practitioner_details) === null || _data$encounterid10$p === void 0 ? void 0 : (_data$encounterid10$p2 = _data$encounterid10$p[0]) === null || _data$encounterid10$p2 === void 0 ? void 0 : _data$encounterid10$p2.clinic
46187
+ },
46188
+ billNo: data === null || data === void 0 ? void 0 : data.billno,
46189
+ billdate: createDate(data === null || data === void 0 ? void 0 : data.billdate),
46190
+ payerid: (_data$payerid = data === null || data === void 0 ? void 0 : data.payerid) !== null && _data$payerid !== void 0 ? _data$payerid : "-",
46191
+ billDetails: data === null || data === void 0 ? void 0 : data.billdetails.map(function (val) {
46192
+ var _val$patchargetrxid, _val$patchargetrxid2, _val$patchargetrxid2$, _val$patchargetrxid3, _val$grossamt, _val$discamt, _val$netamt, _val$patientshare, _val$payershare;
46193
+
46194
+ return {
46195
+ itemCode: val === null || val === void 0 ? void 0 : (_val$patchargetrxid = val.patchargetrxid) === null || _val$patchargetrxid === void 0 ? void 0 : _val$patchargetrxid.orderrefid,
46196
+ rate: val === null || val === void 0 ? void 0 : (_val$patchargetrxid2 = val.patchargetrxid) === null || _val$patchargetrxid2 === void 0 ? void 0 : (_val$patchargetrxid2$ = _val$patchargetrxid2.rate) === null || _val$patchargetrxid2$ === void 0 ? void 0 : _val$patchargetrxid2$.toFixed(2),
46197
+ qty: val === null || val === void 0 ? void 0 : (_val$patchargetrxid3 = val.patchargetrxid) === null || _val$patchargetrxid3 === void 0 ? void 0 : _val$patchargetrxid3.qty,
46198
+ grossAmt: val === null || val === void 0 ? void 0 : (_val$grossamt = val.grossamt) === null || _val$grossamt === void 0 ? void 0 : _val$grossamt.toFixed(2),
46199
+ discount: val === null || val === void 0 ? void 0 : (_val$discamt = val.discamt) === null || _val$discamt === void 0 ? void 0 : _val$discamt.toFixed(2),
46200
+ netAmt: val === null || val === void 0 ? void 0 : (_val$netamt = val.netamt) === null || _val$netamt === void 0 ? void 0 : _val$netamt.toFixed(2),
46201
+ patientShare: val === null || val === void 0 ? void 0 : (_val$patientshare = val.patientshare) === null || _val$patientshare === void 0 ? void 0 : _val$patientshare.toFixed(2),
46202
+ creditShare: val === null || val === void 0 ? void 0 : (_val$payershare = val.payershare) === null || _val$payershare === void 0 ? void 0 : _val$payershare.toFixed(2)
46203
+ };
46204
+ }),
46205
+ totgrossamt: data === null || data === void 0 ? void 0 : (_data$totgrossamt = data.totgrossamt) === null || _data$totgrossamt === void 0 ? void 0 : _data$totgrossamt.toFixed(2),
46206
+ totdiscamt: data === null || data === void 0 ? void 0 : (_data$totdiscamt = data.totdiscamt) === null || _data$totdiscamt === void 0 ? void 0 : _data$totdiscamt.toFixed(2),
46207
+ totnetamt: data === null || data === void 0 ? void 0 : (_data$totnetamt = data.totnetamt) === null || _data$totnetamt === void 0 ? void 0 : _data$totnetamt.toFixed(2),
46208
+ totpatientshare: data === null || data === void 0 ? void 0 : (_data$totpatientshare = data.totpatientshare) === null || _data$totpatientshare === void 0 ? void 0 : _data$totpatientshare.toFixed(2),
46209
+ totpayershare: data === null || data === void 0 ? void 0 : (_data$totpayershare = data.totpayershare) === null || _data$totpayershare === void 0 ? void 0 : _data$totpayershare.toFixed(2),
46210
+ billamt: data === null || data === void 0 ? void 0 : (_data$paymentdtls = data.paymentdtls) === null || _data$paymentdtls === void 0 ? void 0 : (_data$paymentdtls$ = _data$paymentdtls[0]) === null || _data$paymentdtls$ === void 0 ? void 0 : (_data$paymentdtls$$bi = _data$paymentdtls$.billamt) === null || _data$paymentdtls$$bi === void 0 ? void 0 : _data$paymentdtls$$bi.toFixed(2),
46211
+ balamt: data === null || data === void 0 ? void 0 : (_data$paymentdtls2 = data.paymentdtls) === null || _data$paymentdtls2 === void 0 ? void 0 : (_data$paymentdtls2$ = _data$paymentdtls2[0]) === null || _data$paymentdtls2$ === void 0 ? void 0 : (_data$paymentdtls2$$b = _data$paymentdtls2$.balamt) === null || _data$paymentdtls2$$b === void 0 ? void 0 : _data$paymentdtls2$$b.toFixed(2),
46212
+ paidamt: data === null || data === void 0 ? void 0 : (_data$paymentdtls3 = data.paymentdtls) === null || _data$paymentdtls3 === void 0 ? void 0 : (_data$paymentdtls3$ = _data$paymentdtls3[0]) === null || _data$paymentdtls3$ === void 0 ? void 0 : (_data$paymentdtls3$$p = _data$paymentdtls3$.paidamt) === null || _data$paymentdtls3$$p === void 0 ? void 0 : _data$paymentdtls3$$p.toFixed(2),
46213
+ glNo: (_data$glNo = data === null || data === void 0 ? void 0 : data.glNo) !== null && _data$glNo !== void 0 ? _data$glNo : "-",
46214
+ glDate: (_data$glDate = data === null || data === void 0 ? void 0 : data.glDate) !== null && _data$glDate !== void 0 ? _data$glDate : "-",
46215
+ guarantor: (_data$guarantor = data === null || data === void 0 ? void 0 : data.guarantor) !== null && _data$guarantor !== void 0 ? _data$guarantor : "-",
46216
+ plan: (_data$plan = data === null || data === void 0 ? void 0 : data.plan) !== null && _data$plan !== void 0 ? _data$plan : "-",
46217
+ sponsor: (_data$sponsor = data === null || data === void 0 ? void 0 : data.sponsor) !== null && _data$sponsor !== void 0 ? _data$sponsor : "-"
46218
+ };
46219
+ };
46220
+
45648
46221
  var _extraReducers$3;
45649
46222
  var SEARCH_VIA_NAME = createAsyncThunk("billSettlementSlice/searchViaName", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
45650
46223
  var payload,
@@ -46412,6 +46985,52 @@ var BILL_STATUS_SAVE = createAsyncThunk("billSettlementSlice/paymentSave", /*#__
46412
46985
  }
46413
46986
  }, _callee17, null, [[2, 10]]);
46414
46987
  })));
46988
+ var BILL_RECEIPT_READ = createAsyncThunk("billSettlementSlice/billReceiptRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
46989
+ var payload,
46990
+ _ref37,
46991
+ rejectWithValue,
46992
+ billHeaderId,
46993
+ data,
46994
+ resultData,
46995
+ _args18 = arguments;
46996
+
46997
+ return regeneratorRuntime.wrap(function _callee18$(_context18) {
46998
+ while (1) {
46999
+ switch (_context18.prev = _context18.next) {
47000
+ case 0:
47001
+ payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
47002
+ _ref37 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref37.rejectWithValue;
47003
+ debugger;
47004
+ _context18.prev = 3;
47005
+ billHeaderId = payload.billHeaderId;
47006
+ _context18.next = 7;
47007
+ return fetchData$3({
47008
+ body: JSON.stringify(saveBill.billRecieptRead(billHeaderId))
47009
+ }, __baseUrl__);
47010
+
47011
+ case 7:
47012
+ data = _context18.sent;
47013
+ resultData = constructReciept(data[0]);
47014
+ debugger;
47015
+ console.log("resultData", resultData);
47016
+ return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
47017
+ data: resultData
47018
+ }));
47019
+
47020
+ case 14:
47021
+ _context18.prev = 14;
47022
+ _context18.t0 = _context18["catch"](3);
47023
+ return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
47024
+ message: _context18.t0.message
47025
+ })));
47026
+
47027
+ case 17:
47028
+ case "end":
47029
+ return _context18.stop();
47030
+ }
47031
+ }
47032
+ }, _callee18, null, [[3, 14]]);
47033
+ })));
46415
47034
  var billSettlementSlice = createSlice({
46416
47035
  name: "billSettlementSlice",
46417
47036
  initialState: {
@@ -46431,7 +47050,8 @@ var billSettlementSlice = createSlice({
46431
47050
  bill_details_save: _objectSpread2({}, defaultState.Info),
46432
47051
  payment_save: _objectSpread2({}, defaultState.Info),
46433
47052
  payment_dropDown: _objectSpread2({}, defaultState.Info),
46434
- billing_status_save: _objectSpread2({}, defaultState.Info)
47053
+ billing_status_save: _objectSpread2({}, defaultState.Info),
47054
+ bill_reciept_read: _objectSpread2({}, defaultState.Info)
46435
47055
  },
46436
47056
  extraReducers: (_extraReducers$3 = {}, _defineProperty(_extraReducers$3, SEARCH_VIA_NAME.fulfilled, function (state, action) {
46437
47057
  var _action$payload;
@@ -46603,6 +47223,16 @@ var billSettlementSlice = createSlice({
46603
47223
  var _action$payload34;
46604
47224
 
46605
47225
  state.billing_status_save = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
47226
+ }), _defineProperty(_extraReducers$3, BILL_RECEIPT_READ.fulfilled, function (state, action) {
47227
+ var _action$payload35;
47228
+
47229
+ state.bill_reciept_read = (_action$payload35 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload35 !== void 0 ? _action$payload35 : {};
47230
+ }), _defineProperty(_extraReducers$3, BILL_RECEIPT_READ.pending, function (state, action) {
47231
+ state.bill_reciept_read.loading = true;
47232
+ }), _defineProperty(_extraReducers$3, BILL_RECEIPT_READ.rejected, function (state, action) {
47233
+ var _action$payload36;
47234
+
47235
+ state.bill_reciept_read = (_action$payload36 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload36 !== void 0 ? _action$payload36 : {};
46606
47236
  }), _extraReducers$3)
46607
47237
  });
46608
47238
  var billSettlementActions = {
@@ -46622,7 +47252,8 @@ var billSettlementActions = {
46622
47252
  BILL_DETAILS_SAVE: BILL_DETAILS_SAVE,
46623
47253
  PAYMENT_SAVE: PAYMENT_SAVE,
46624
47254
  PAYMENT_DROPDOWN: PAYMENT_DROPDOWN,
46625
- BILL_STATUS_SAVE: BILL_STATUS_SAVE
47255
+ BILL_STATUS_SAVE: BILL_STATUS_SAVE,
47256
+ BILL_RECEIPT_READ: BILL_RECEIPT_READ
46626
47257
  };
46627
47258
  var billSettlementSlice$1 = billSettlementSlice.reducer;
46628
47259
 
@@ -46820,7 +47451,7 @@ var GET_PATIENTS_CHECKED_IN = createAsyncThunk("currentVisitStatsApiSlice/getPat
46820
47451
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
46821
47452
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
46822
47453
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
46823
- 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]) || {}),
47454
+ name: makeName$1((_ === 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]) || {}),
46824
47455
  mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id2 = _.patient_id) === null || _$patient_id2 === void 0 ? void 0 : (_$patient_id2$ = _$patient_id2[0]) === null || _$patient_id2$ === void 0 ? void 0 : _$patient_id2$.MRN,
46825
47456
  orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId = _.appointmentId) === null || _$appointmentId === void 0 ? void 0 : (_$appointmentId$ = _$appointmentId[0]) === null || _$appointmentId$ === void 0 ? void 0 : _$appointmentId$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId2 = _.appointmentId) === null || _$appointmentId2 === void 0 ? void 0 : (_$appointmentId2$ = _$appointmentId2[0]) === null || _$appointmentId2$ === void 0 ? void 0 : _$appointmentId2$.start, "DD MMM,YYYY") : "",
46826
47457
  orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId3 = _.appointmentId) === null || _$appointmentId3 === void 0 ? void 0 : (_$appointmentId3$ = _$appointmentId3[0]) === null || _$appointmentId3$ === void 0 ? void 0 : _$appointmentId3$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId4 = _.appointmentId) === null || _$appointmentId4 === void 0 ? void 0 : (_$appointmentId4$ = _$appointmentId4[0]) === null || _$appointmentId4$ === void 0 ? void 0 : _$appointmentId4$.start, "hh:mm A") : "",
@@ -46891,7 +47522,7 @@ var GET_TRAIGE_DONE = createAsyncThunk("currentVisitStatsApiSlice/getTriageDone"
46891
47522
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
46892
47523
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
46893
47524
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
46894
- 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]) || {}),
47525
+ name: makeName$1((_ === 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]) || {}),
46895
47526
  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$.MRN,
46896
47527
  orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId8 = _.appointmentId) === null || _$appointmentId8 === void 0 ? void 0 : (_$appointmentId8$ = _$appointmentId8[0]) === null || _$appointmentId8$ === void 0 ? void 0 : _$appointmentId8$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId9 = _.appointmentId) === null || _$appointmentId9 === void 0 ? void 0 : (_$appointmentId9$ = _$appointmentId9[0]) === null || _$appointmentId9$ === void 0 ? void 0 : _$appointmentId9$.start, "DD MMM,YYYY") : "",
46897
47528
  orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId10 = _.appointmentId) === null || _$appointmentId10 === void 0 ? void 0 : (_$appointmentId10$ = _$appointmentId10[0]) === null || _$appointmentId10$ === void 0 ? void 0 : _$appointmentId10$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId11 = _.appointmentId) === null || _$appointmentId11 === void 0 ? void 0 : (_$appointmentId11$ = _$appointmentId11[0]) === null || _$appointmentId11$ === void 0 ? void 0 : _$appointmentId11$.start, "hh:mm A") : "",
@@ -46962,7 +47593,7 @@ var GET_VISIT_COMPLETED = createAsyncThunk("currentVisitStatsApiSlice/getVisitCo
46962
47593
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
46963
47594
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
46964
47595
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
46965
- 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]) || {}),
47596
+ name: makeName$1((_ === 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]) || {}),
46966
47597
  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,
46967
47598
  orderDate: (_ === null || _ === void 0 ? void 0 : (_$appointmentId15 = _.appointmentId) === null || _$appointmentId15 === void 0 ? void 0 : (_$appointmentId15$ = _$appointmentId15[0]) === null || _$appointmentId15$ === void 0 ? void 0 : _$appointmentId15$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId16 = _.appointmentId) === null || _$appointmentId16 === void 0 ? void 0 : (_$appointmentId16$ = _$appointmentId16[0]) === null || _$appointmentId16$ === void 0 ? void 0 : _$appointmentId16$.start, "DD MMM,YYYY") : "",
46968
47599
  orderTime: (_ === null || _ === void 0 ? void 0 : (_$appointmentId17 = _.appointmentId) === null || _$appointmentId17 === void 0 ? void 0 : (_$appointmentId17$ = _$appointmentId17[0]) === null || _$appointmentId17$ === void 0 ? void 0 : _$appointmentId17$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId18 = _.appointmentId) === null || _$appointmentId18 === void 0 ? void 0 : (_$appointmentId18$ = _$appointmentId18[0]) === null || _$appointmentId18$ === void 0 ? void 0 : _$appointmentId18$.start, "hh:mm A") : "",
@@ -47099,7 +47730,7 @@ var GET_PATIENTS_CHECKED_IN_NURSE = createAsyncThunk("currentVisitStatsApiSlice/
47099
47730
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
47100
47731
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
47101
47732
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
47102
- 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]) || {}),
47733
+ name: makeName$1((_ === 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]) || {}),
47103
47734
  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,
47104
47735
  age: _ === 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$.age,
47105
47736
  gender: _ === 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$$gende = _$patient_id26$.gender) === null || _$patient_id26$$gende === void 0 ? void 0 : _$patient_id26$$gende.display,
@@ -47167,7 +47798,7 @@ var GET_VISIT_COMPLETED_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getV
47167
47798
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
47168
47799
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
47169
47800
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
47170
- 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]) || {}),
47801
+ name: makeName$1((_ === 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]) || {}),
47171
47802
  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,
47172
47803
  age: _ === 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$.age,
47173
47804
  gender: _ === 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$$gende = _$patient_id31$.gender) === null || _$patient_id31$$gende === void 0 ? void 0 : _$patient_id31$$gende.display,
@@ -47299,7 +47930,7 @@ var GET_TRAIGE_DONE_NURSE = createAsyncThunk("currentVisitStatsApiSlice/getTriag
47299
47930
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
47300
47931
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
47301
47932
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
47302
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : (_$patient_id33$$name = _$patient_id33$.name) === null || _$patient_id33$$name === void 0 ? void 0 : _$patient_id33$$name[0]) || {}),
47933
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : (_$patient_id33$$name = _$patient_id33$.name) === null || _$patient_id33$$name === void 0 ? void 0 : _$patient_id33$$name[0]) || {}),
47303
47934
  mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id34 = _.patient_id) === null || _$patient_id34 === void 0 ? void 0 : (_$patient_id34$ = _$patient_id34[0]) === null || _$patient_id34$ === void 0 ? void 0 : _$patient_id34$.MRN,
47304
47935
  age: _ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : (_$patient_id35$ = _$patient_id35[0]) === null || _$patient_id35$ === void 0 ? void 0 : _$patient_id35$.age,
47305
47936
  gender: _ === null || _ === void 0 ? void 0 : (_$patient_id36 = _.patient_id) === null || _$patient_id36 === void 0 ? void 0 : (_$patient_id36$ = _$patient_id36[0]) === null || _$patient_id36$ === void 0 ? void 0 : (_$patient_id36$$gende = _$patient_id36$.gender) === null || _$patient_id36$$gende === void 0 ? void 0 : _$patient_id36$$gende.display,
@@ -47432,7 +48063,7 @@ var GET_PATIENTS_CHECKED_IN_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice
47432
48063
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
47433
48064
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
47434
48065
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
47435
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$name = _$patient_id38$.name) === null || _$patient_id38$$name === void 0 ? void 0 : _$patient_id38$$name[0]) || {}),
48066
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$name = _$patient_id38$.name) === null || _$patient_id38$$name === void 0 ? void 0 : _$patient_id38$$name[0]) || {}),
47436
48067
  mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id39 = _.patient_id) === null || _$patient_id39 === void 0 ? void 0 : (_$patient_id39$ = _$patient_id39[0]) === null || _$patient_id39$ === void 0 ? void 0 : _$patient_id39$.MRN,
47437
48068
  age: _ === null || _ === void 0 ? void 0 : (_$patient_id40 = _.patient_id) === null || _$patient_id40 === void 0 ? void 0 : (_$patient_id40$ = _$patient_id40[0]) === null || _$patient_id40$ === void 0 ? void 0 : _$patient_id40$.age,
47438
48069
  gender: _ === null || _ === void 0 ? void 0 : (_$patient_id41 = _.patient_id) === null || _$patient_id41 === void 0 ? void 0 : (_$patient_id41$ = _$patient_id41[0]) === null || _$patient_id41$ === void 0 ? void 0 : (_$patient_id41$$gende = _$patient_id41$.gender) === null || _$patient_id41$$gende === void 0 ? void 0 : _$patient_id41$$gende.display,
@@ -47501,7 +48132,7 @@ var GET_VISIT_COMPLETED_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/get
47501
48132
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
47502
48133
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
47503
48134
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
47504
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id43 = _.patient_id) === null || _$patient_id43 === void 0 ? void 0 : (_$patient_id43$ = _$patient_id43[0]) === null || _$patient_id43$ === void 0 ? void 0 : (_$patient_id43$$name = _$patient_id43$.name) === null || _$patient_id43$$name === void 0 ? void 0 : _$patient_id43$$name[0]) || {}),
48135
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id43 = _.patient_id) === null || _$patient_id43 === void 0 ? void 0 : (_$patient_id43$ = _$patient_id43[0]) === null || _$patient_id43$ === void 0 ? void 0 : (_$patient_id43$$name = _$patient_id43$.name) === null || _$patient_id43$$name === void 0 ? void 0 : _$patient_id43$$name[0]) || {}),
47505
48136
  mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id44 = _.patient_id) === null || _$patient_id44 === void 0 ? void 0 : (_$patient_id44$ = _$patient_id44[0]) === null || _$patient_id44$ === void 0 ? void 0 : _$patient_id44$.MRN,
47506
48137
  age: _ === null || _ === void 0 ? void 0 : (_$patient_id45 = _.patient_id) === null || _$patient_id45 === void 0 ? void 0 : (_$patient_id45$ = _$patient_id45[0]) === null || _$patient_id45$ === void 0 ? void 0 : _$patient_id45$.age,
47507
48138
  gender: _ === null || _ === void 0 ? void 0 : (_$patient_id46 = _.patient_id) === null || _$patient_id46 === void 0 ? void 0 : (_$patient_id46$ = _$patient_id46[0]) === null || _$patient_id46$ === void 0 ? void 0 : (_$patient_id46$$gende = _$patient_id46$.gender) === null || _$patient_id46$$gende === void 0 ? void 0 : _$patient_id46$$gende.display,
@@ -47570,7 +48201,7 @@ var GET_TRAIGE_DONE_DOCTOR = createAsyncThunk("currentVisitStatsApiSlice/getTria
47570
48201
  // img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid
47571
48202
  // ? getImgUrl(_?.appointmentId?.[0]?.PersonID?.[0]?.photo[0]?.fileid)
47572
48203
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
47573
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id48 = _.patient_id) === null || _$patient_id48 === void 0 ? void 0 : (_$patient_id48$ = _$patient_id48[0]) === null || _$patient_id48$ === void 0 ? void 0 : (_$patient_id48$$name = _$patient_id48$.name) === null || _$patient_id48$$name === void 0 ? void 0 : _$patient_id48$$name[0]) || {}),
48204
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$patient_id48 = _.patient_id) === null || _$patient_id48 === void 0 ? void 0 : (_$patient_id48$ = _$patient_id48[0]) === null || _$patient_id48$ === void 0 ? void 0 : (_$patient_id48$$name = _$patient_id48$.name) === null || _$patient_id48$$name === void 0 ? void 0 : _$patient_id48$$name[0]) || {}),
47574
48205
  mrn: _ === null || _ === void 0 ? void 0 : (_$patient_id49 = _.patient_id) === null || _$patient_id49 === void 0 ? void 0 : (_$patient_id49$ = _$patient_id49[0]) === null || _$patient_id49$ === void 0 ? void 0 : _$patient_id49$.MRN,
47575
48206
  age: _ === null || _ === void 0 ? void 0 : (_$patient_id50 = _.patient_id) === null || _$patient_id50 === void 0 ? void 0 : (_$patient_id50$ = _$patient_id50[0]) === null || _$patient_id50$ === void 0 ? void 0 : _$patient_id50$.age,
47576
48207
  gender: _ === null || _ === void 0 ? void 0 : (_$patient_id51 = _.patient_id) === null || _$patient_id51 === void 0 ? void 0 : (_$patient_id51$ = _$patient_id51[0]) === null || _$patient_id51$ === void 0 ? void 0 : (_$patient_id51$$gende = _$patient_id51$.gender) === null || _$patient_id51$$gende === void 0 ? void 0 : _$patient_id51$$gende.display,
@@ -47976,7 +48607,7 @@ var GET_ASSIGN_PRACTITIONER_LIST = createAsyncThunk("workListApiSlice/getAssignP
47976
48607
  var _$Encounter, _$Encounter$patient_i, _$Encounter$patient_i2, _$Encounter$patient_i3, _$Encounter2, _$Encounter2$patient_, _$Encounter2$patient_2, _$Encounter3, _$Encounter3$patient_, _$Encounter3$patient_2, _$Encounter4, _$Encounter4$patient_, _$Encounter4$patient_2, _$Encounter4$patient_3, _$Encounter4$patient_4, _$Appointment, _$Appointment2, _$Appointment3, _$Encounter5, _$Encounter6, _$Encounter7, _$Encounter7$status;
47977
48608
 
47978
48609
  return {
47979
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter = _.Encounter) === null || _$Encounter === void 0 ? void 0 : (_$Encounter$patient_i = _$Encounter.patient_id) === null || _$Encounter$patient_i === void 0 ? void 0 : (_$Encounter$patient_i2 = _$Encounter$patient_i[0]) === null || _$Encounter$patient_i2 === void 0 ? void 0 : (_$Encounter$patient_i3 = _$Encounter$patient_i2.name) === null || _$Encounter$patient_i3 === void 0 ? void 0 : _$Encounter$patient_i3[0]) || {}),
48610
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter = _.Encounter) === null || _$Encounter === void 0 ? void 0 : (_$Encounter$patient_i = _$Encounter.patient_id) === null || _$Encounter$patient_i === void 0 ? void 0 : (_$Encounter$patient_i2 = _$Encounter$patient_i[0]) === null || _$Encounter$patient_i2 === void 0 ? void 0 : (_$Encounter$patient_i3 = _$Encounter$patient_i2.name) === null || _$Encounter$patient_i3 === void 0 ? void 0 : _$Encounter$patient_i3[0]) || {}),
47980
48611
  mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter2 = _.Encounter) === null || _$Encounter2 === void 0 ? void 0 : (_$Encounter2$patient_ = _$Encounter2.patient_id) === null || _$Encounter2$patient_ === void 0 ? void 0 : (_$Encounter2$patient_2 = _$Encounter2$patient_[0]) === null || _$Encounter2$patient_2 === void 0 ? void 0 : _$Encounter2$patient_2.MRN,
47981
48612
  age: _ === null || _ === void 0 ? void 0 : (_$Encounter3 = _.Encounter) === null || _$Encounter3 === void 0 ? void 0 : (_$Encounter3$patient_ = _$Encounter3.patient_id) === null || _$Encounter3$patient_ === void 0 ? void 0 : (_$Encounter3$patient_2 = _$Encounter3$patient_[0]) === null || _$Encounter3$patient_2 === void 0 ? void 0 : _$Encounter3$patient_2.age,
47982
48613
  mobileNo: _ === null || _ === void 0 ? void 0 : (_$Encounter4 = _.Encounter) === null || _$Encounter4 === void 0 ? void 0 : (_$Encounter4$patient_ = _$Encounter4.patient_id) === null || _$Encounter4$patient_ === void 0 ? void 0 : (_$Encounter4$patient_2 = _$Encounter4$patient_[0]) === null || _$Encounter4$patient_2 === void 0 ? void 0 : (_$Encounter4$patient_3 = _$Encounter4$patient_2.telecom) === null || _$Encounter4$patient_3 === void 0 ? void 0 : (_$Encounter4$patient_4 = _$Encounter4$patient_3[0]) === null || _$Encounter4$patient_4 === void 0 ? void 0 : _$Encounter4$patient_4.value,
@@ -48036,8 +48667,8 @@ var GET_REASSIGN_PRACTITIONER_LIST = createAsyncThunk("workListApiSlice/getReAss
48036
48667
  var _$Encounter8, _$Encounter8$patient_, _$Encounter8$patient_2, _$Encounter8$patient_3, _$Encounter9, _$Encounter9$particip, _$Encounter9$particip2, _$Encounter9$particip3, _$Encounter9$particip4, _$Encounter9$particip5, _$Encounter10, _$Encounter10$patient, _$Encounter10$patient2, _$Encounter11, _$Encounter11$patient, _$Encounter11$patient2, _$Encounter12, _$Encounter12$patient, _$Encounter12$patient2, _$Encounter12$patient3, _$Encounter12$patient4, _$Appointment4, _$Appointment5, _$Appointment6, _$Encounter13, _$Encounter14, _$Encounter15, _$Encounter15$status;
48037
48668
 
48038
48669
  return {
48039
- name: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter8 = _.Encounter) === null || _$Encounter8 === void 0 ? void 0 : (_$Encounter8$patient_ = _$Encounter8.patient_id) === null || _$Encounter8$patient_ === void 0 ? void 0 : (_$Encounter8$patient_2 = _$Encounter8$patient_[0]) === null || _$Encounter8$patient_2 === void 0 ? void 0 : (_$Encounter8$patient_3 = _$Encounter8$patient_2.name) === null || _$Encounter8$patient_3 === void 0 ? void 0 : _$Encounter8$patient_3[0]) || {}),
48040
- assignedPractitioner: makeName((_ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$particip = _$Encounter9.participant) === null || _$Encounter9$particip === void 0 ? void 0 : (_$Encounter9$particip2 = _$Encounter9$particip[0]) === null || _$Encounter9$particip2 === void 0 ? void 0 : (_$Encounter9$particip3 = _$Encounter9$particip2.Practitioner_id) === null || _$Encounter9$particip3 === void 0 ? void 0 : (_$Encounter9$particip4 = _$Encounter9$particip3[0]) === null || _$Encounter9$particip4 === void 0 ? void 0 : (_$Encounter9$particip5 = _$Encounter9$particip4.name) === null || _$Encounter9$particip5 === void 0 ? void 0 : _$Encounter9$particip5[0]) || {}),
48670
+ name: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter8 = _.Encounter) === null || _$Encounter8 === void 0 ? void 0 : (_$Encounter8$patient_ = _$Encounter8.patient_id) === null || _$Encounter8$patient_ === void 0 ? void 0 : (_$Encounter8$patient_2 = _$Encounter8$patient_[0]) === null || _$Encounter8$patient_2 === void 0 ? void 0 : (_$Encounter8$patient_3 = _$Encounter8$patient_2.name) === null || _$Encounter8$patient_3 === void 0 ? void 0 : _$Encounter8$patient_3[0]) || {}),
48671
+ assignedPractitioner: makeName$1((_ === null || _ === void 0 ? void 0 : (_$Encounter9 = _.Encounter) === null || _$Encounter9 === void 0 ? void 0 : (_$Encounter9$particip = _$Encounter9.participant) === null || _$Encounter9$particip === void 0 ? void 0 : (_$Encounter9$particip2 = _$Encounter9$particip[0]) === null || _$Encounter9$particip2 === void 0 ? void 0 : (_$Encounter9$particip3 = _$Encounter9$particip2.Practitioner_id) === null || _$Encounter9$particip3 === void 0 ? void 0 : (_$Encounter9$particip4 = _$Encounter9$particip3[0]) === null || _$Encounter9$particip4 === void 0 ? void 0 : (_$Encounter9$particip5 = _$Encounter9$particip4.name) === null || _$Encounter9$particip5 === void 0 ? void 0 : _$Encounter9$particip5[0]) || {}),
48041
48672
  mrn: _ === null || _ === void 0 ? void 0 : (_$Encounter10 = _.Encounter) === null || _$Encounter10 === void 0 ? void 0 : (_$Encounter10$patient = _$Encounter10.patient_id) === null || _$Encounter10$patient === void 0 ? void 0 : (_$Encounter10$patient2 = _$Encounter10$patient[0]) === null || _$Encounter10$patient2 === void 0 ? void 0 : _$Encounter10$patient2.MRN,
48042
48673
  age: _ === null || _ === void 0 ? void 0 : (_$Encounter11 = _.Encounter) === null || _$Encounter11 === void 0 ? void 0 : (_$Encounter11$patient = _$Encounter11.patient_id) === null || _$Encounter11$patient === void 0 ? void 0 : (_$Encounter11$patient2 = _$Encounter11$patient[0]) === null || _$Encounter11$patient2 === void 0 ? void 0 : _$Encounter11$patient2.age,
48043
48674
  mobileNo: _ === null || _ === void 0 ? void 0 : (_$Encounter12 = _.Encounter) === null || _$Encounter12 === void 0 ? void 0 : (_$Encounter12$patient = _$Encounter12.patient_id) === null || _$Encounter12$patient === void 0 ? void 0 : (_$Encounter12$patient2 = _$Encounter12$patient[0]) === null || _$Encounter12$patient2 === void 0 ? void 0 : (_$Encounter12$patient3 = _$Encounter12$patient2.telecom) === null || _$Encounter12$patient3 === void 0 ? void 0 : (_$Encounter12$patient4 = _$Encounter12$patient3[0]) === null || _$Encounter12$patient4 === void 0 ? void 0 : _$Encounter12$patient4.value,
@@ -48096,7 +48727,7 @@ var GET_CLOSE_PRACTITIONER_LIST = createAsyncThunk("workListApiSlice/getClosePra
48096
48727
  var _makeName, _$patient_id, _$patient_id$, _$patient_id$$name, _$practitioner_detail, _$practitioner_detail2, _$practitioner_detail3, _$patient_id$0$alias, _$patient_id2, _$patient_id2$, _$patient_id$0$age, _$patient_id3, _$patient_id3$, _$patient_id4, _$patient_id4$, _$patient_id4$$teleco, _$patient_id4$$teleco2, _$patient_id5, _$patient_id5$, _$patient_id5$$teleco, _$patient_id5$$teleco2, _$appointmentId$appno, _$appointmentId, _$appointmentId2, _$appointmentId3, _ref7, _$visit_type, _$status$display, _$status;
48097
48728
 
48098
48729
  return {
48099
- name: (_makeName = 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])) !== null && _makeName !== void 0 ? _makeName : "",
48730
+ name: (_makeName = makeName$1(_ === 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])) !== null && _makeName !== void 0 ? _makeName : "",
48100
48731
  assignedPractitioner: (_$practitioner_detail = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail2 = _.practitioner_details) === null || _$practitioner_detail2 === void 0 ? void 0 : (_$practitioner_detail3 = _$practitioner_detail2[0]) === null || _$practitioner_detail3 === void 0 ? void 0 : _$practitioner_detail3.id_name) !== null && _$practitioner_detail !== void 0 ? _$practitioner_detail : "",
48101
48732
  mrn: (_$patient_id$0$alias = _ === null || _ === void 0 ? void 0 : (_$patient_id2 = _.patient_id) === null || _$patient_id2 === void 0 ? void 0 : (_$patient_id2$ = _$patient_id2[0]) === null || _$patient_id2$ === void 0 ? void 0 : _$patient_id2$.alias) !== null && _$patient_id$0$alias !== void 0 ? _$patient_id$0$alias : "",
48102
48733
  age: (_$patient_id$0$age = _ === null || _ === void 0 ? void 0 : (_$patient_id3 = _.patient_id) === null || _$patient_id3 === void 0 ? void 0 : (_$patient_id3$ = _$patient_id3[0]) === null || _$patient_id3$ === void 0 ? void 0 : _$patient_id3$.age) !== null && _$patient_id$0$age !== void 0 ? _$patient_id$0$age : "",