primary_care_admin_binder 0.1.81 → 0.1.84

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 +40 -20
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8025,6 +8025,23 @@ var makeName = function makeName() {
8025
8025
  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) || "";
8026
8026
  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) || "";
8027
8027
  return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(family && family + " ").concat(suffixVal && suffixVal);
8028
+ };
8029
+
8030
+ var makeName_ = function makeName_() {
8031
+ var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8032
+ var _nameObj$prefix2 = nameObj.prefix,
8033
+ prefix = _nameObj$prefix2 === void 0 ? "" : _nameObj$prefix2,
8034
+ _nameObj$given2 = nameObj.given,
8035
+ given = _nameObj$given2 === void 0 ? "" : _nameObj$given2,
8036
+ _nameObj$text2 = nameObj.text,
8037
+ text = _nameObj$text2 === void 0 ? "" : _nameObj$text2,
8038
+ _nameObj$suffix2 = nameObj.suffix,
8039
+ suffix = _nameObj$suffix2 === void 0 ? "" : _nameObj$suffix2,
8040
+ _nameObj$family2 = nameObj.family,
8041
+ family = _nameObj$family2 === void 0 ? "" : _nameObj$family2; // let prefixVal = prefix?.[0]?.coding?.[0]?.display || prefix?.coding?.[0]?.display || prefix?.[0]?.display || prefix?.display || "";
8042
+ // let suffixVal = suffix?.[0]?.coding?.[0]?.display || suffix?.coding?.[0]?.display || suffix?.[0]?.display || suffix?.display || "";
8043
+
8044
+ return "".concat(prefix && prefix + ".").concat(text && text + " ").concat(given && given + " ").concat(family && family + " ").concat(suffix && suffix);
8028
8045
  }; // const getUtcTime = (date) => {
8029
8046
  // let a = null
8030
8047
  // if (date) {
@@ -36640,7 +36657,7 @@ var query$1 = {
36640
36657
  // },
36641
36658
  // "return_fields": "{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN DOCUMENT(hn)) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}"
36642
36659
  // }`
36643
- return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"Appointment,Practitioner\",\n \"filter\": {\n \"Appointment\": \"Appointment.id==").concat(data === null || data === void 0 ? void 0 : data.appId, "\",\n \"Practitioner\": \"Practitioner.id == Document(Appointment.resourcecode).id \"\n },\n \"return_fields\": \"{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN DOCUMENT(hn)) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}\"\n }");
36660
+ return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"Appointment,Practitioner\",\n \"filter\": {\n \"Appointment\": \"Appointment.id==").concat(data === null || data === void 0 ? void 0 : data.appId, " && Appointment.activestatus==true\",\n \"Practitioner\": \"Practitioner.id == Document(Appointment.resourcecode).id && Practitioner.activestatus==true && Practitioner.status==true\"\n },\n \"return_fields\": \"{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role and pract.activestatus==true && pract.status==true RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN merge(DOCUMENT(hn),{prefix:contains(DOCUMENT(hn).prefix,'CodingMaster')?document(DOCUMENT(hn).prefix).display:DOCUMENT(hn).prefix},{suffix:contains(DOCUMENT(hn).suffix,'CodingMaster')?document(DOCUMENT(hn).suffix).display:DOCUMENT(hn).suffix})) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}\"\n }"); // "return_fields": "{ 'Practitioner':(FOR pract IN Practitioner FILTER Practitioner.id !=pract.id AND DOCUMENT(Practitioner.practitioner_role)[*].role ANY IN DOCUMENT(pract.practitioner_role)[*].role RETURN MERGE(pract,{name:(FOR hn IN TO_ARRAY(pract.name) RETURN DOCUMENT(hn)) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{role:MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).role).coding)}) ,SpecialtyID:MERGE(DOCUMENT(DOCUMENT(practrole).SpecialtyID),{coding:DOCUMENT(DOCUMENT(DOCUMENT(practrole).SpecialtyID).coding)}) })) }))}"
36644
36661
  },
36645
36662
  getCancellationReason: function getCancellationReason(data) {
36646
36663
  return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"ReasonMaster\",\n \"filter\": \"ReasonMaster.ReasonCode == '").concat(data === null || data === void 0 ? void 0 : data.code, "'\",\n \"return_fields\": \"ReasonMaster\"\n }");
@@ -36763,11 +36780,11 @@ var GET_PRACTITIONER_AGAINST_SPECIALITY = createAsyncThunk("getPendingReschedule
36763
36780
  rejectWithValue,
36764
36781
  _data$result2,
36765
36782
  _data$result2$,
36783
+ data,
36784
+ arr,
36766
36785
  _data$result3,
36767
36786
  _data$result3$,
36768
36787
  _data$result3$$Practi,
36769
- data,
36770
- returnedData,
36771
36788
  _args3 = arguments;
36772
36789
 
36773
36790
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -36784,36 +36801,39 @@ var GET_PRACTITIONER_AGAINST_SPECIALITY = createAsyncThunk("getPendingReschedule
36784
36801
 
36785
36802
  case 5:
36786
36803
  data = _context3.sent;
36787
- returnedData = data !== null && data !== void 0 && (_data$result2 = data.result) !== null && _data$result2 !== void 0 && (_data$result2$ = _data$result2[0]) !== null && _data$result2$ !== void 0 && _data$result2$.Practitioner ? 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$$Practi = _data$result3$.Practitioner) === null || _data$result3$$Practi === void 0 ? void 0 : _data$result3$$Practi.map(function (_) {
36788
- var _$name2, _$practitioner_role$c, _$practitioner_role, _$practitioner_role$c2, _$practitioner_role$c3, _$id3, _$practitioner_role$S, _$practitioner_role2, _$practitioner_role2$;
36804
+ arr = [];
36805
+
36806
+ if (Array.isArray(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$.Practitioner)) {
36807
+ 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$$Practi = _data$result3$.Practitioner) === null || _data$result3$$Practi === void 0 ? void 0 : _data$result3$$Practi.map(function (_) {
36808
+ var _$name2, _$name3, _$practitioner_role$, _$practitioner_role, _$practitioner_role$2, _$practitioner_role$3, _$practitioner_role$4, _$practitioner_role$5, _$id3, _$practitioner_role$6, _$practitioner_role2, _$practitioner_role2$, _$practitioner_role2$2;
36809
+
36810
+ arr.push({
36811
+ label: _ !== null && _ !== void 0 && (_$name2 = _.name) !== null && _$name2 !== void 0 && _$name2[0] ? makeName_(_ === null || _ === void 0 ? void 0 : (_$name3 = _.name) === null || _$name3 === void 0 ? void 0 : _$name3[0]) : "",
36812
+ value: (_$practitioner_role$ = _ === null || _ === void 0 ? void 0 : (_$practitioner_role = _.practitioner_role) === null || _$practitioner_role === void 0 ? void 0 : (_$practitioner_role$2 = _$practitioner_role[0]) === null || _$practitioner_role$2 === void 0 ? void 0 : (_$practitioner_role$3 = _$practitioner_role$2.role) === null || _$practitioner_role$3 === void 0 ? void 0 : (_$practitioner_role$4 = _$practitioner_role$3.coding) === null || _$practitioner_role$4 === void 0 ? void 0 : (_$practitioner_role$5 = _$practitioner_role$4[0]) === null || _$practitioner_role$5 === void 0 ? void 0 : _$practitioner_role$5.display) !== null && _$practitioner_role$ !== void 0 ? _$practitioner_role$ : '',
36813
+ id: (_$id3 = _ === null || _ === void 0 ? void 0 : _.id) !== null && _$id3 !== void 0 ? _$id3 : '',
36814
+ speciality: (_$practitioner_role$6 = _ === null || _ === void 0 ? void 0 : (_$practitioner_role2 = _.practitioner_role) === null || _$practitioner_role2 === void 0 ? void 0 : (_$practitioner_role2$ = _$practitioner_role2[0]) === null || _$practitioner_role2$ === void 0 ? void 0 : (_$practitioner_role2$2 = _$practitioner_role2$.SpecialtyID) === null || _$practitioner_role2$2 === void 0 ? void 0 : _$practitioner_role2$2.text) !== null && _$practitioner_role$6 !== void 0 ? _$practitioner_role$6 : '',
36815
+ practitionerDetails: _
36816
+ });
36817
+ });
36818
+ }
36789
36819
 
36790
- return {
36791
- label: makeName(_ === null || _ === void 0 ? void 0 : (_$name2 = _.name) === null || _$name2 === void 0 ? void 0 : _$name2[0]),
36792
- //name
36793
- value: (_$practitioner_role$c = _ === null || _ === void 0 ? void 0 : (_$practitioner_role = _.practitioner_role) === null || _$practitioner_role === void 0 ? void 0 : (_$practitioner_role$c2 = _$practitioner_role.coding) === null || _$practitioner_role$c2 === void 0 ? void 0 : (_$practitioner_role$c3 = _$practitioner_role$c2[0]) === null || _$practitioner_role$c3 === void 0 ? void 0 : _$practitioner_role$c3.display) !== null && _$practitioner_role$c !== void 0 ? _$practitioner_role$c : '',
36794
- //role
36795
- id: (_$id3 = _ === null || _ === void 0 ? void 0 : _.id) !== null && _$id3 !== void 0 ? _$id3 : '',
36796
- speciality: (_$practitioner_role$S = _ === null || _ === void 0 ? void 0 : (_$practitioner_role2 = _.practitioner_role) === null || _$practitioner_role2 === void 0 ? void 0 : (_$practitioner_role2$ = _$practitioner_role2.SpecialtyID) === null || _$practitioner_role2$ === void 0 ? void 0 : _$practitioner_role2$.text) !== null && _$practitioner_role$S !== void 0 ? _$practitioner_role$S : '',
36797
- practitionerDetails: _
36798
- };
36799
- }) : [];
36800
36820
  return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
36801
- data: returnedData
36821
+ data: arr
36802
36822
  }));
36803
36823
 
36804
- case 10:
36805
- _context3.prev = 10;
36824
+ case 11:
36825
+ _context3.prev = 11;
36806
36826
  _context3.t0 = _context3["catch"](2);
36807
36827
  return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
36808
36828
  message: _context3.t0.message
36809
36829
  })));
36810
36830
 
36811
- case 13:
36831
+ case 14:
36812
36832
  case "end":
36813
36833
  return _context3.stop();
36814
36834
  }
36815
36835
  }
36816
- }, _callee3, null, [[2, 10]]);
36836
+ }, _callee3, null, [[2, 11]]);
36817
36837
  })));
36818
36838
  var CANCELLATION_REASON = createAsyncThunk("getPendingRescheduleListApiSlice/getCancellationReason", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
36819
36839
  var payload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.81",
3
+ "version": "0.1.84",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",