primarycare-binder 1.1.80 → 1.1.83

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 +202 -97
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8041,6 +8041,8 @@ var query_ids = {
8041
8041
  practioner: "177fc273-9a6c-4088-a5dd-8f85aeff4319",
8042
8042
  clinic: "177fc273-9a6c-4088-a5dd-8f85aeff4319"
8043
8043
  },
8044
+ "appointmentReducer/queueManagementDoctor": "d1c4d868-c413-44b9-b821-867b3b668c95",
8045
+ "appointmentReducer/queueManagementNurse": "025fd258-5e30-4bd6-9076-f5bd019ce95d",
8044
8046
  "appointmentReducer/queueManagement": "3a756831-94f1-4b24-8ea7-4700b0b0be31",
8045
8047
  "searhcApiSlice/masterSearch": "0f0e1609-e0ca-4757-b922-538491e3334a",
8046
8048
  "appointmentReducer/updateAppointmentStatus": "",
@@ -8163,7 +8165,7 @@ var queries$b = {
8163
8165
  query: function query(appointmentId) {
8164
8166
  return "Person.Id in Appointment.PersonID && Appointment.appno like '%".concat(appointmentId, "%'");
8165
8167
  },
8166
- returnFields: "{AppointmentID:Appointment.id,_id:Appointment._id,status:Appointment.status,avc:Appointment.avc,appnumber:Appointment.appno,end:Appointment.end,start:Appointment.start,createddate:Appointment.createddate,updatedate:Appointment.updatedate, personId:Appointment.PersonID, patient:(FOR adqolcPatient IN Patient FILTER adqolcPatient.personID IN Appointment.PersonID RETURN merge(adqolcPatient,{identifier:document(adqolcPatient.identifier)},{martialStatus:document(adqolcPatient.martialStatus)},{name:document(adqolcPatient.name)},{telecom:document(adqolcPatient.telecom)},{photo:document(adqolcPatient.photo)},{personID:(for pid in Person filter pid.Id == adqolcPatient.personID return pid)},{address:document(adqolcPatient.address)},{activereason:(DOCUMENT(adqolcPatient.activereason)),deceasedreason:(DOCUMENT(adqolcPatient.deceasedreason))},{isdeceased:(for doc in CodeableConceptMaster filter doc._id==adqolcPatient.isdeceased return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod)}))})) ,Person:MERGE(Person,{name:(FOR hn IN TO_ARRAY(Person.name) RETURN DOCUMENT(hn)),telecom:(FOR tel IN TO_ARRAY(Person.telecom) RETURN DOCUMENT(tel) ),photo:document(Person.photo)})}"
8168
+ returnFields: "{AppointmentID:Appointment.id,_id:Appointment._id,status:Appointment.status,appStatus:first(for en in Encounter filter Appointment.id in en.appointmentId return document(en.status)),avc:Appointment.avc,appnumber:Appointment.appno,end:Appointment.end,start:Appointment.start,createddate:Appointment.createddate,updatedate:Appointment.updatedate, personId:Appointment.PersonID, patient:(FOR adqolcPatient IN Patient FILTER adqolcPatient.personID IN Appointment.PersonID RETURN merge(adqolcPatient,{identifier:document(adqolcPatient.identifier)},{martialStatus:document(adqolcPatient.martialStatus)},{name:document(adqolcPatient.name)},{telecom:document(adqolcPatient.telecom)},{photo:document(adqolcPatient.photo)},{personID:(for pid in Person filter pid.Id == adqolcPatient.personID return pid)},{address:document(adqolcPatient.address)},{activereason:(DOCUMENT(adqolcPatient.activereason)),deceasedreason:(DOCUMENT(adqolcPatient.deceasedreason))},{isdeceased:(for doc in CodeableConceptMaster filter doc._id==adqolcPatient.isdeceased return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod)}))})) ,Person:MERGE(Person,{name:(FOR hn IN TO_ARRAY(Person.name) RETURN DOCUMENT(hn)),telecom:(FOR tel IN TO_ARRAY(Person.telecom) RETURN DOCUMENT(tel) ),photo:document(Person.photo)})}"
8167
8169
  },
8168
8170
  codablemasterGetPatientname: {
8169
8171
  query: function query(patientName) {
@@ -10832,6 +10834,12 @@ var APPOINTMENT_CREATE = createAsyncThunk("appointmentReducer/upsertAppointment"
10832
10834
  var payload,
10833
10835
  _ref2,
10834
10836
  rejectWithValue,
10837
+ getState,
10838
+ _state$authSlice,
10839
+ _state$authSlice$logg,
10840
+ _authData$persondata,
10841
+ _authData$persondata$,
10842
+ _authData$persondata$2,
10835
10843
  _payload$slotId,
10836
10844
  slotId,
10837
10845
  _payload$slotStart,
@@ -10870,6 +10878,8 @@ var APPOINTMENT_CREATE = createAsyncThunk("appointmentReducer/upsertAppointment"
10870
10878
  orgType,
10871
10879
  _payload$patientInstr,
10872
10880
  patientInstruction,
10881
+ state,
10882
+ authData,
10873
10883
  body,
10874
10884
  data,
10875
10885
  _args = arguments;
@@ -10879,9 +10889,11 @@ var APPOINTMENT_CREATE = createAsyncThunk("appointmentReducer/upsertAppointment"
10879
10889
  switch (_context.prev = _context.next) {
10880
10890
  case 0:
10881
10891
  payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
10882
- _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
10892
+ _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue, getState = _ref2.getState;
10883
10893
  _context.prev = 2;
10884
10894
  _payload$slotId = payload.slotId, slotId = _payload$slotId === void 0 ? [] : _payload$slotId, _payload$slotStart = payload.slotStart, slotStart = _payload$slotStart === void 0 ? 0 : _payload$slotStart, _payload$slotEnd = payload.slotEnd, slotEnd = _payload$slotEnd === void 0 ? 0 : _payload$slotEnd, _payload$info = payload.info, info = _payload$info === void 0 ? [] : _payload$info, _payload$specialtyID = payload.specialtyID, specialtyID = _payload$specialtyID === void 0 ? [] : _payload$specialtyID, _payload$personID = payload.personID, personID = _payload$personID === void 0 ? [] : _payload$personID, _payload$practitioner = payload.practitionerId, practitionerId = _payload$practitioner === void 0 ? [] : _payload$practitioner, _payload$mobile = payload.mobile, mobile = _payload$mobile === void 0 ? "" : _payload$mobile, _payload$email = payload.email, email = _payload$email === void 0 ? "" : _payload$email, _payload$consultation = payload.consultationMode, consultationMode = _payload$consultation === void 0 ? "" : _payload$consultation, _payload$healthCareId = payload.healthCareId, healthCareId = _payload$healthCareId === void 0 ? [] : _payload$healthCareId, _payload$report_docs = payload.report_docs, report_docs = _payload$report_docs === void 0 ? [] : _payload$report_docs, _payload$appointmentT = payload.appointmentType, appointmentType = _payload$appointmentT === void 0 ? "general" : _payload$appointmentT, _payload$resourcetype = payload.resourcetype, resourcetype = _payload$resourcetype === void 0 ? "" : _payload$resourcetype, _payload$resourcerole = payload.resourcerole, resourcerole = _payload$resourcerole === void 0 ? "" : _payload$resourcerole, _payload$resourcecode = payload.resourcecode, resourcecode = _payload$resourcecode === void 0 ? "" : _payload$resourcecode, _payload$orgId = payload.orgId, orgId = _payload$orgId === void 0 ? "" : _payload$orgId, _payload$orgType = payload.orgType, orgType = _payload$orgType === void 0 ? "" : _payload$orgType, _payload$patientInstr = payload.patientInstruction, patientInstruction = _payload$patientInstr === void 0 ? "" : _payload$patientInstr;
10895
+ state = getState();
10896
+ authData = state === null || state === void 0 ? void 0 : (_state$authSlice = state.authSlice) === null || _state$authSlice === void 0 ? void 0 : (_state$authSlice$logg = _state$authSlice.loggedUserInfo) === null || _state$authSlice$logg === void 0 ? void 0 : _state$authSlice$logg.data;
10885
10897
  body = [{
10886
10898
  db_name: dbName,
10887
10899
  entity: "Appointment",
@@ -10936,22 +10948,23 @@ var APPOINTMENT_CREATE = createAsyncThunk("appointmentReducer/upsertAppointment"
10936
10948
  mobile: mobile,
10937
10949
  patientEmail: email
10938
10950
  }],
10939
- appointmentType: appointmentType
10951
+ appointmentType: appointmentType,
10952
+ bookedby: (authData === null || authData === void 0 ? void 0 : authData.practioner_id) || (authData === null || authData === void 0 ? void 0 : (_authData$persondata = authData.persondata) === null || _authData$persondata === void 0 ? void 0 : (_authData$persondata$ = _authData$persondata.payload) === null || _authData$persondata$ === void 0 ? void 0 : (_authData$persondata$2 = _authData$persondata$.data) === null || _authData$persondata$2 === void 0 ? void 0 : _authData$persondata$2.pid) || ""
10940
10953
  }
10941
10954
  }];
10942
- _context.next = 7;
10955
+ _context.next = 9;
10943
10956
  return fetchData$3({
10944
10957
  body: JSON.stringify(body)
10945
10958
  }, __bookAppointmentUrl__);
10946
10959
 
10947
- case 7:
10960
+ case 9:
10948
10961
  data = _context.sent;
10949
10962
  return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
10950
10963
  data: data
10951
10964
  }));
10952
10965
 
10953
- case 11:
10954
- _context.prev = 11;
10966
+ case 13:
10967
+ _context.prev = 13;
10955
10968
  _context.t0 = _context["catch"](2);
10956
10969
  return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
10957
10970
  data: {
@@ -10959,12 +10972,12 @@ var APPOINTMENT_CREATE = createAsyncThunk("appointmentReducer/upsertAppointment"
10959
10972
  }
10960
10973
  })));
10961
10974
 
10962
- case 14:
10975
+ case 16:
10963
10976
  case "end":
10964
10977
  return _context.stop();
10965
10978
  }
10966
10979
  }
10967
- }, _callee, null, [[2, 11]]);
10980
+ }, _callee, null, [[2, 13]]);
10968
10981
  }))); // end
10969
10982
  // APPOINTMENT_UPDATE
10970
10983
 
@@ -11445,7 +11458,7 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
11445
11458
  s === null || s === void 0 ? void 0 : (_s$coding = s.coding) === null || _s$coding === void 0 ? void 0 : _s$coding.forEach(function (val) {
11446
11459
  if (val === null || val === void 0 ? void 0 : val.display) {
11447
11460
  if (designation) {
11448
- designation += ', ';
11461
+ designation += ", ";
11449
11462
  }
11450
11463
 
11451
11464
  designation += val === null || val === void 0 ? void 0 : val.display;
@@ -11474,7 +11487,7 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
11474
11487
  info["_id"] = (_practData$34 = practData[0]) === null || _practData$34 === void 0 ? void 0 : _practData$34._id;
11475
11488
  info["_key"] = (_practData$35 = practData[0]) === null || _practData$35 === void 0 ? void 0 : _practData$35._key;
11476
11489
  info["img"] = getImgUrl((_practData$36 = practData[0]) === null || _practData$36 === void 0 ? void 0 : (_practData$36$photo = _practData$36.photo) === null || _practData$36$photo === void 0 ? void 0 : (_practData$36$photo$ = _practData$36$photo[0]) === null || _practData$36$photo$ === void 0 ? void 0 : _practData$36$photo$.fileid);
11477
- info["bio"] = ((_practData$37 = practData[0]) === null || _practData$37 === void 0 ? void 0 : (_practData$37$biograp = _practData$37.biography) === null || _practData$37$biograp === void 0 ? void 0 : (_practData$37$biograp2 = _practData$37$biograp[0]) === null || _practData$37$biograp2 === void 0 ? void 0 : _practData$37$biograp2.biography_description) || '';
11490
+ info["bio"] = ((_practData$37 = practData[0]) === null || _practData$37 === void 0 ? void 0 : (_practData$37$biograp = _practData$37.biography) === null || _practData$37$biograp === void 0 ? void 0 : (_practData$37$biograp2 = _practData$37$biograp[0]) === null || _practData$37$biograp2 === void 0 ? void 0 : _practData$37$biograp2.biography_description) || "";
11478
11491
  info["experience"] = calculationExp((_practData$38 = practData[0]) === null || _practData$38 === void 0 ? void 0 : _practData$38.job_experience);
11479
11492
  info["hospitalLocation"] = ((_practData$39 = practData[0]) === null || _practData$39 === void 0 ? void 0 : (_practData$39$practit = _practData$39.practitioner_role) === null || _practData$39$practit === void 0 ? void 0 : (_practData$39$practit2 = _practData$39$practit[0]) === null || _practData$39$practit2 === void 0 ? void 0 : (_practData$39$practit3 = _practData$39$practit2.OrgID) === null || _practData$39$practit3 === void 0 ? void 0 : (_practData$39$practit4 = _practData$39$practit3.address) === null || _practData$39$practit4 === void 0 ? void 0 : (_practData$39$practit5 = _practData$39$practit4[0]) === null || _practData$39$practit5 === void 0 ? void 0 : (_practData$39$practit6 = _practData$39$practit5.city) === null || _practData$39$practit6 === void 0 ? void 0 : _practData$39$practit6.geogLevelName) || "";
11480
11493
  }
@@ -11983,6 +11996,16 @@ var QUEUE_MANAGEMENT = createAsyncThunk("appointmentReducer/queueManagement", /*
11983
11996
  end,
11984
11997
  _payload$OrgID,
11985
11998
  OrgID,
11999
+ _payload$login,
12000
+ login,
12001
+ _payload$specialtyId,
12002
+ specialtyId,
12003
+ _payload$isDoctor,
12004
+ isDoctor,
12005
+ _payload$isNurse,
12006
+ isNurse,
12007
+ _payload$isFrontDesk,
12008
+ isFrontDesk,
11986
12009
  body,
11987
12010
  data,
11988
12011
  returnData,
@@ -11995,8 +12018,26 @@ var QUEUE_MANAGEMENT = createAsyncThunk("appointmentReducer/queueManagement", /*
11995
12018
  payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
11996
12019
  _ref25 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
11997
12020
  _context12.prev = 2;
11998
- _payload$start2 = payload.start, start = _payload$start2 === void 0 ? 0 : _payload$start2, _payload$end = payload.end, end = _payload$end === void 0 ? 0 : _payload$end, _payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? 0 : _payload$OrgID;
11999
- body = {
12021
+ _payload$start2 = payload.start, start = _payload$start2 === void 0 ? 0 : _payload$start2, _payload$end = payload.end, end = _payload$end === void 0 ? 0 : _payload$end, _payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? 0 : _payload$OrgID, _payload$login = payload.login, login = _payload$login === void 0 ? 0 : _payload$login, _payload$specialtyId = payload.specialtyId, specialtyId = _payload$specialtyId === void 0 ? 0 : _payload$specialtyId, _payload$isDoctor = payload.isDoctor, isDoctor = _payload$isDoctor === void 0 ? false : _payload$isDoctor, _payload$isNurse = payload.isNurse, isNurse = _payload$isNurse === void 0 ? false : _payload$isNurse, _payload$isFrontDesk = payload.isFrontDesk, isFrontDesk = _payload$isFrontDesk === void 0 ? false : _payload$isFrontDesk;
12022
+ body = isDoctor ? {
12023
+ db_name: dbName,
12024
+ queryid: query_ids["appointmentReducer/queueManagementDoctor"],
12025
+ filter: {
12026
+ start: start,
12027
+ end: end,
12028
+ OrgID: OrgID,
12029
+ login: login
12030
+ }
12031
+ } : isNurse ? {
12032
+ db_name: dbName,
12033
+ queryid: query_ids["appointmentReducer/queueManagementNurse"],
12034
+ filter: {
12035
+ start: start,
12036
+ end: end,
12037
+ OrgID: OrgID,
12038
+ specialtyId: specialtyId
12039
+ }
12040
+ } : {
12000
12041
  db_name: dbName,
12001
12042
  queryid: query_ids["appointmentReducer/queueManagement"],
12002
12043
  filter: {
@@ -12035,11 +12076,61 @@ var QUEUE_MANAGEMENT = createAsyncThunk("appointmentReducer/queueManagement", /*
12035
12076
  }
12036
12077
  }
12037
12078
  }, _callee12, null, [[2, 13]]);
12079
+ })));
12080
+ var GET_SPECIALITY_ID_BY_PRCTITIONER_ID = createAsyncThunk("appointmentReducer/getSpecialityIdByPractitionerId", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
12081
+ var payload,
12082
+ _ref27,
12083
+ rejectWithValue,
12084
+ _payload$practitioner2,
12085
+ practitionerId,
12086
+ body,
12087
+ data,
12088
+ _args13 = arguments;
12089
+
12090
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
12091
+ while (1) {
12092
+ switch (_context13.prev = _context13.next) {
12093
+ case 0:
12094
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
12095
+ _ref27 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref27.rejectWithValue;
12096
+ _context13.prev = 2;
12097
+ _payload$practitioner2 = payload.practitionerId, practitionerId = _payload$practitioner2 === void 0 ? 0 : _payload$practitioner2;
12098
+ body = {
12099
+ db_name: dbName,
12100
+ entity: "Practitioner",
12101
+ filter: "Practitioner.id == ".concat(practitionerId),
12102
+ return_fields: "document(first(DOCUMENT(Practitioner.practitioner_role[*])[*]).SpecialtyID).id"
12103
+ };
12104
+ _context13.next = 7;
12105
+ return fetchData$3({
12106
+ body: JSON.stringify(body)
12107
+ }, __readDocumentUrl__);
12108
+
12109
+ case 7:
12110
+ data = _context13.sent;
12111
+ debugger;
12112
+ return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12113
+ data: data
12114
+ }));
12115
+
12116
+ case 12:
12117
+ _context13.prev = 12;
12118
+ _context13.t0 = _context13["catch"](2);
12119
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12120
+ message: _context13.t0.message
12121
+ })));
12122
+
12123
+ case 15:
12124
+ case "end":
12125
+ return _context13.stop();
12126
+ }
12127
+ }
12128
+ }, _callee13, null, [[2, 12]]);
12038
12129
  }))); // RECCURANCE_APPOINTMENT
12039
12130
 
12040
- var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
12131
+ var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
12041
12132
  var payload,
12042
- _ref27,
12133
+ _ref29,
12043
12134
  rejectWithValue,
12044
12135
  _payload$start3,
12045
12136
  start,
@@ -12052,15 +12143,15 @@ var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppo
12052
12143
  queryId,
12053
12144
  body,
12054
12145
  data,
12055
- _args13 = arguments;
12146
+ _args14 = arguments;
12056
12147
 
12057
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
12148
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
12058
12149
  while (1) {
12059
- switch (_context13.prev = _context13.next) {
12150
+ switch (_context14.prev = _context14.next) {
12060
12151
  case 0:
12061
- payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
12062
- _ref27 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref27.rejectWithValue;
12063
- _context13.prev = 2;
12152
+ payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
12153
+ _ref29 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
12154
+ _context14.prev = 2;
12064
12155
  _payload$start3 = payload.start, start = _payload$start3 === void 0 ? [] : _payload$start3, _payload$practionerid = payload.practionerid, practionerid = _payload$practionerid === void 0 ? 0 : _payload$practionerid, _payload$clinicid = payload.clinicid, clinicid = _payload$clinicid === void 0 ? 0 : _payload$clinicid;
12065
12156
  date = start.map(function (d) {
12066
12157
  var startDate = new Date();
@@ -12091,35 +12182,35 @@ var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppo
12091
12182
  date: date
12092
12183
  })
12093
12184
  };
12094
- _context13.next = 11;
12185
+ _context14.next = 11;
12095
12186
  return fetchData$3({
12096
12187
  body: JSON.stringify(body)
12097
12188
  });
12098
12189
 
12099
12190
  case 11:
12100
- data = _context13.sent;
12101
- return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12191
+ data = _context14.sent;
12192
+ return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12102
12193
  data: data
12103
12194
  }));
12104
12195
 
12105
12196
  case 15:
12106
- _context13.prev = 15;
12107
- _context13.t0 = _context13["catch"](2);
12108
- return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12109
- message: _context13.t0.message
12197
+ _context14.prev = 15;
12198
+ _context14.t0 = _context14["catch"](2);
12199
+ return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12200
+ message: _context14.t0.message
12110
12201
  })));
12111
12202
 
12112
12203
  case 18:
12113
12204
  case "end":
12114
- return _context13.stop();
12205
+ return _context14.stop();
12115
12206
  }
12116
12207
  }
12117
- }, _callee13, null, [[2, 15]]);
12208
+ }, _callee14, null, [[2, 15]]);
12118
12209
  }))); // UPDATE_APPOINTMENT_STATUS
12119
12210
 
12120
- var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
12211
+ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
12121
12212
  var payload,
12122
- _ref29,
12213
+ _ref31,
12123
12214
  rejectWithValue,
12124
12215
  _payload$appointmentI2,
12125
12216
  appointmentId,
@@ -12134,7 +12225,7 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12134
12225
  _encounterInfo$result,
12135
12226
  encounterCode,
12136
12227
  encounterInfo,
12137
- _ref30,
12228
+ _ref32,
12138
12229
  _id,
12139
12230
  _key,
12140
12231
  statushistory,
@@ -12142,15 +12233,15 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12142
12233
  appInfo,
12143
12234
  body,
12144
12235
  data,
12145
- _args14 = arguments;
12236
+ _args15 = arguments;
12146
12237
 
12147
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
12238
+ return regeneratorRuntime.wrap(function _callee15$(_context15) {
12148
12239
  while (1) {
12149
- switch (_context14.prev = _context14.next) {
12240
+ switch (_context15.prev = _context15.next) {
12150
12241
  case 0:
12151
- payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
12152
- _ref29 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
12153
- _context14.prev = 2;
12242
+ payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
12243
+ _ref31 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref31.rejectWithValue;
12244
+ _context15.prev = 2;
12154
12245
  _payload$appointmentI2 = payload.appointmentId, appointmentId = _payload$appointmentI2 === void 0 ? 0 : _payload$appointmentI2, _payload$status = payload.status, status = _payload$status === void 0 ? "" : _payload$status, _payload$isCompleted = payload.isCompleted, isCompleted = _payload$isCompleted === void 0 ? false : _payload$isCompleted; // const appBody = {
12155
12246
  // db_name: dbName,
12156
12247
  // queryid: query_ids["appointmentReducer/readAppointment"],
@@ -12177,11 +12268,11 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12177
12268
  }
12178
12269
 
12179
12270
  if (!encounterStatus) {
12180
- _context14.next = 20;
12271
+ _context15.next = 20;
12181
12272
  break;
12182
12273
  }
12183
12274
 
12184
- _context14.next = 8;
12275
+ _context15.next = 8;
12185
12276
  return fetchData$3({
12186
12277
  body: JSON.stringify({
12187
12278
  db_name: dbName,
@@ -12192,9 +12283,9 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12192
12283
  }, __readDocumentUrl__);
12193
12284
 
12194
12285
  case 8:
12195
- encounterCode = _context14.sent;
12286
+ encounterCode = _context15.sent;
12196
12287
  encounterStatus = (_encounterCode$result = encounterCode === null || encounterCode === void 0 ? void 0 : (_encounterCode$result2 = encounterCode.result) === null || _encounterCode$result2 === void 0 ? void 0 : (_encounterCode$result3 = _encounterCode$result2[0]) === null || _encounterCode$result3 === void 0 ? void 0 : _encounterCode$result3._id) !== null && _encounterCode$result !== void 0 ? _encounterCode$result : "";
12197
- _context14.next = 12;
12288
+ _context15.next = 12;
12198
12289
  return fetchData$3({
12199
12290
  body: JSON.stringify({
12200
12291
  db_name: dbName,
@@ -12205,11 +12296,11 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12205
12296
  }, __readDocumentUrl__);
12206
12297
 
12207
12298
  case 12:
12208
- encounterInfo = _context14.sent;
12209
- _ref30 = (encounterInfo === null || encounterInfo === void 0 ? void 0 : (_encounterInfo$result = encounterInfo.result) === null || _encounterInfo$result === void 0 ? void 0 : _encounterInfo$result[0]) || {}, _id = _ref30._id, _key = _ref30._key, statushistory = _ref30.statushistory;
12299
+ encounterInfo = _context15.sent;
12300
+ _ref32 = (encounterInfo === null || encounterInfo === void 0 ? void 0 : (_encounterInfo$result = encounterInfo.result) === null || _encounterInfo$result === void 0 ? void 0 : _encounterInfo$result[0]) || {}, _id = _ref32._id, _key = _ref32._key, statushistory = _ref32.statushistory;
12210
12301
 
12211
12302
  if (!(_id && _key && statushistory && Array.isArray(statushistory))) {
12212
- _context14.next = 20;
12303
+ _context15.next = 20;
12213
12304
  break;
12214
12305
  }
12215
12306
 
@@ -12246,7 +12337,7 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12246
12337
  status: encounterStatus
12247
12338
  }
12248
12339
  }];
12249
- _context14.next = 20;
12340
+ _context15.next = 20;
12250
12341
  return fetchData$3({
12251
12342
  body: JSON.stringify(updateData)
12252
12343
  }, __uspsertUrl__);
@@ -12272,34 +12363,34 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
12272
12363
  id: appointmentId
12273
12364
  }
12274
12365
  }];
12275
- _context14.next = 26;
12366
+ _context15.next = 26;
12276
12367
  return fetchData$3({
12277
12368
  body: JSON.stringify(body)
12278
12369
  }, __uspsertUrl__);
12279
12370
 
12280
12371
  case 26:
12281
- data = _context14.sent;
12282
- return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12372
+ data = _context15.sent;
12373
+ return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12283
12374
  data: data
12284
12375
  }));
12285
12376
 
12286
12377
  case 30:
12287
- _context14.prev = 30;
12288
- _context14.t0 = _context14["catch"](2);
12289
- return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12290
- message: _context14.t0.message
12378
+ _context15.prev = 30;
12379
+ _context15.t0 = _context15["catch"](2);
12380
+ return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12381
+ message: _context15.t0.message
12291
12382
  })));
12292
12383
 
12293
12384
  case 33:
12294
12385
  case "end":
12295
- return _context14.stop();
12386
+ return _context15.stop();
12296
12387
  }
12297
12388
  }
12298
- }, _callee14, null, [[2, 30]]);
12389
+ }, _callee15, null, [[2, 30]]);
12299
12390
  })));
12300
- var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApoointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
12391
+ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApoointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
12301
12392
  var payload,
12302
- _ref32,
12393
+ _ref34,
12303
12394
  rejectWithValue,
12304
12395
  _appData$,
12305
12396
  _payload$appointmentI3,
@@ -12312,15 +12403,15 @@ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApooi
12312
12403
  insertObject,
12313
12404
  body,
12314
12405
  data,
12315
- _args15 = arguments;
12406
+ _args16 = arguments;
12316
12407
 
12317
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
12408
+ return regeneratorRuntime.wrap(function _callee16$(_context16) {
12318
12409
  while (1) {
12319
- switch (_context15.prev = _context15.next) {
12410
+ switch (_context16.prev = _context16.next) {
12320
12411
  case 0:
12321
- payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
12322
- _ref32 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
12323
- _context15.prev = 2;
12412
+ payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
12413
+ _ref34 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
12414
+ _context16.prev = 2;
12324
12415
  _payload$appointmentI3 = payload.appointmentId, appointmentId = _payload$appointmentI3 === void 0 ? 0 : _payload$appointmentI3, _payload$reason = payload.reason, reason = _payload$reason === void 0 ? "" : _payload$reason;
12325
12416
  appBody = {
12326
12417
  db_name: dbName,
@@ -12329,17 +12420,17 @@ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApooi
12329
12420
  appointment_id: appointmentId
12330
12421
  }
12331
12422
  };
12332
- _context15.next = 7;
12423
+ _context16.next = 7;
12333
12424
  return fetchData$3({
12334
12425
  body: JSON.stringify(appBody)
12335
12426
  });
12336
12427
 
12337
12428
  case 7:
12338
- appData = _context15.sent;
12429
+ appData = _context16.sent;
12339
12430
  appInfo = (appData === null || appData === void 0 ? void 0 : (_appData$ = appData[0]) === null || _appData$ === void 0 ? void 0 : _appData$[0]) || {};
12340
12431
 
12341
12432
  if (!(Object.keys(appInfo).length > 0)) {
12342
- _context15.next = 19;
12433
+ _context16.next = 19;
12343
12434
  break;
12344
12435
  }
12345
12436
 
@@ -12360,53 +12451,53 @@ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApooi
12360
12451
  id: appointmentId
12361
12452
  }
12362
12453
  }];
12363
- _context15.next = 17;
12454
+ _context16.next = 17;
12364
12455
  return fetchData$3({
12365
12456
  body: JSON.stringify(body)
12366
12457
  }, __uspsertUrl__);
12367
12458
 
12368
12459
  case 17:
12369
- data = _context15.sent;
12370
- return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12460
+ data = _context16.sent;
12461
+ return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12371
12462
  data: data
12372
12463
  }));
12373
12464
 
12374
12465
  case 19:
12375
- _context15.next = 24;
12466
+ _context16.next = 24;
12376
12467
  break;
12377
12468
 
12378
12469
  case 21:
12379
- _context15.prev = 21;
12380
- _context15.t0 = _context15["catch"](2);
12381
- return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12382
- message: _context15.t0.message
12470
+ _context16.prev = 21;
12471
+ _context16.t0 = _context16["catch"](2);
12472
+ return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12473
+ message: _context16.t0.message
12383
12474
  })));
12384
12475
 
12385
12476
  case 24:
12386
12477
  case "end":
12387
- return _context15.stop();
12478
+ return _context16.stop();
12388
12479
  }
12389
12480
  }
12390
- }, _callee15, null, [[2, 21]]);
12481
+ }, _callee16, null, [[2, 21]]);
12391
12482
  }))); // REASON_FOR_APPT_CANCEL_MODIFY
12392
12483
 
12393
- var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonForApptCancelModify", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
12484
+ var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonForApptCancelModify", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
12394
12485
  var payload,
12395
- _ref34,
12486
+ _ref36,
12396
12487
  rejectWithValue,
12397
12488
  body,
12398
12489
  data,
12399
12490
  returnData,
12400
12491
  _data$result3,
12401
- _args16 = arguments;
12492
+ _args17 = arguments;
12402
12493
 
12403
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
12494
+ return regeneratorRuntime.wrap(function _callee17$(_context17) {
12404
12495
  while (1) {
12405
- switch (_context16.prev = _context16.next) {
12496
+ switch (_context17.prev = _context17.next) {
12406
12497
  case 0:
12407
- payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
12408
- _ref34 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
12409
- _context16.prev = 2;
12498
+ payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
12499
+ _ref36 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
12500
+ _context17.prev = 2;
12410
12501
  body = {
12411
12502
  db_name: dbName,
12412
12503
  entity: "CodingMaster",
@@ -12414,13 +12505,13 @@ var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonF
12414
12505
  sort: "CodingMaster.display ASC",
12415
12506
  return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type')"
12416
12507
  };
12417
- _context16.next = 6;
12508
+ _context17.next = 6;
12418
12509
  return fetchData$3({
12419
12510
  body: JSON.stringify(body)
12420
12511
  }, __readDocumentUrl__);
12421
12512
 
12422
12513
  case 6:
12423
- data = _context16.sent;
12514
+ data = _context17.sent;
12424
12515
  returnData = [];
12425
12516
 
12426
12517
  if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
@@ -12435,23 +12526,23 @@ var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonF
12435
12526
  });
12436
12527
  }
12437
12528
 
12438
- return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12529
+ return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
12439
12530
  data: returnData
12440
12531
  }));
12441
12532
 
12442
12533
  case 12:
12443
- _context16.prev = 12;
12444
- _context16.t0 = _context16["catch"](2);
12445
- return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12446
- message: _context16.t0.message
12534
+ _context17.prev = 12;
12535
+ _context17.t0 = _context17["catch"](2);
12536
+ return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
12537
+ message: _context17.t0.message
12447
12538
  })));
12448
12539
 
12449
12540
  case 15:
12450
12541
  case "end":
12451
- return _context16.stop();
12542
+ return _context17.stop();
12452
12543
  }
12453
12544
  }
12454
- }, _callee16, null, [[2, 12]]);
12545
+ }, _callee17, null, [[2, 12]]);
12455
12546
  }))); // APPOINTMENT CREATE INITIALSTATE
12456
12547
 
12457
12548
  var appointmentReducer = createSlice({
@@ -12475,7 +12566,8 @@ var appointmentReducer = createSlice({
12475
12566
  cancelupdateappintment: _objectSpread2({}, defaultState.Info),
12476
12567
  follow_up_appintment: _objectSpread2({}, defaultState.Info),
12477
12568
  reasonForApptCancelModify: _objectSpread2({}, defaultState.Info),
12478
- getReferralLocation: _objectSpread2({}, defaultState.List)
12569
+ getReferralLocation: _objectSpread2({}, defaultState.List),
12570
+ getSpecialityIdByPractitionerId: _objectSpread2({}, defaultState.Info)
12479
12571
  },
12480
12572
  extraReducers: (_extraReducers$D = {}, _defineProperty(_extraReducers$D, APPOINTMENT_CREATE.fulfilled, function (state, action) {
12481
12573
  var _action$payload;
@@ -12637,6 +12729,16 @@ var appointmentReducer = createSlice({
12637
12729
  var _action$payload32;
12638
12730
 
12639
12731
  state.getReferralLocation = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : [];
12732
+ }), _defineProperty(_extraReducers$D, GET_SPECIALITY_ID_BY_PRCTITIONER_ID.fulfilled, function (state, action) {
12733
+ var _action$payload33;
12734
+
12735
+ state.getSpecialityIdByPractitionerId = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : [];
12736
+ }), _defineProperty(_extraReducers$D, GET_SPECIALITY_ID_BY_PRCTITIONER_ID.pending, function (state, action) {
12737
+ state.getSpecialityIdByPractitionerId.loading = true;
12738
+ }), _defineProperty(_extraReducers$D, GET_SPECIALITY_ID_BY_PRCTITIONER_ID.rejected, function (state, action) {
12739
+ var _action$payload34;
12740
+
12741
+ state.getSpecialityIdByPractitionerId = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : [];
12640
12742
  }), _extraReducers$D)
12641
12743
  }); // end
12642
12744
  // APPOINTMENT ACTION LISTS
@@ -12657,7 +12759,8 @@ var appointmentActions = {
12657
12759
  CANCEL_APPOINTMENT_STATUS: CANCEL_APPOINTMENT_STATUS,
12658
12760
  GET__FOLLOW_UP_APPOINTMENT: GET__FOLLOW_UP_APPOINTMENT,
12659
12761
  REASON_FOR_APPT_CANCEL_MODIFY: REASON_FOR_APPT_CANCEL_MODIFY,
12660
- GET_REFERRAL_LOCATION: GET_REFERRAL_LOCATION
12762
+ GET_REFERRAL_LOCATION: GET_REFERRAL_LOCATION,
12763
+ GET_SPECIALITY_ID_BY_PRCTITIONER_ID: GET_SPECIALITY_ID_BY_PRCTITIONER_ID
12661
12764
  }; // end
12662
12765
  var appointmentReducer$1 = appointmentReducer.reducer;
12663
12766
 
@@ -25500,7 +25603,9 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
25500
25603
  var _val$obscode, _val$obscode2;
25501
25604
 
25502
25605
  if ((val === null || val === void 0 ? void 0 : (_val$obscode = val.obscode) === null || _val$obscode === void 0 ? void 0 : _val$obscode.VitalsCodesReferenceRanges.length) > 0 && (val === null || val === void 0 ? void 0 : (_val$obscode2 = val.obscode) === null || _val$obscode2 === void 0 ? void 0 : _val$obscode2.vitalscode)) {
25503
- return val.obscode;
25606
+ return _objectSpread2(_objectSpread2({}, val.obscode), {}, {
25607
+ mandatory: val.mandatoryYN
25608
+ });
25504
25609
  }
25505
25610
  });
25506
25611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.80",
3
+ "version": "1.1.83",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",