primary_care_admin_binder 0.1.80 → 0.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.
- package/dist/index.cjs.js +96 -22
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2276,6 +2276,7 @@ var __keyClockPractioner__ = "".concat(process.env.REACT_APP_KEY_CLOCK_API, "/ap
|
|
|
2276
2276
|
var __keyClockblockappointment__ = "".concat(process.env.REACT_APP_KEY_CLOCK_API, "/api/v1/BlockWithSchedule");
|
|
2277
2277
|
var refreshOrgToken = "".concat(__nifiUrl__, "/api/v1/refreshOrgAuthToken");
|
|
2278
2278
|
var refreshUserToken = "".concat(__nifiUrl__, "/api/v1/refreshAuthToken");
|
|
2279
|
+
var __TokenGeneration__ = "".concat(process.env.REACT_APP_TOKEN_URL, "/IDMJWTTokencreation");
|
|
2279
2280
|
|
|
2280
2281
|
var moment = createCommonjsModule(function (module, exports) {
|
|
2281
2282
|
(function (global, factory) {
|
|
@@ -8024,6 +8025,23 @@ var makeName = function makeName() {
|
|
|
8024
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) || "";
|
|
8025
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) || "";
|
|
8026
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);
|
|
8027
8045
|
}; // const getUtcTime = (date) => {
|
|
8028
8046
|
// let a = null
|
|
8029
8047
|
// if (date) {
|
|
@@ -28265,13 +28283,55 @@ var REFRESH_TOKEN = createAsyncThunk("signInApiSlice/getRefreshToken", /*#__PURE
|
|
|
28265
28283
|
}
|
|
28266
28284
|
}, _callee5, null, [[2, 15]]);
|
|
28267
28285
|
})));
|
|
28286
|
+
var GET_TOKEN = createAsyncThunk("signInApiSlice/getToken", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
28287
|
+
var payload,
|
|
28288
|
+
_ref11,
|
|
28289
|
+
rejectWithValue,
|
|
28290
|
+
params,
|
|
28291
|
+
data,
|
|
28292
|
+
_args6 = arguments;
|
|
28293
|
+
|
|
28294
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
28295
|
+
while (1) {
|
|
28296
|
+
switch (_context6.prev = _context6.next) {
|
|
28297
|
+
case 0:
|
|
28298
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
28299
|
+
_ref11 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
|
|
28300
|
+
_context6.prev = 2;
|
|
28301
|
+
params = payload.params;
|
|
28302
|
+
_context6.next = 6;
|
|
28303
|
+
return fetchData({
|
|
28304
|
+
body: JSON.stringify(params)
|
|
28305
|
+
}, __TokenGeneration__);
|
|
28306
|
+
|
|
28307
|
+
case 6:
|
|
28308
|
+
data = _context6.sent;
|
|
28309
|
+
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
28310
|
+
data: data
|
|
28311
|
+
}));
|
|
28312
|
+
|
|
28313
|
+
case 10:
|
|
28314
|
+
_context6.prev = 10;
|
|
28315
|
+
_context6.t0 = _context6["catch"](2);
|
|
28316
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
28317
|
+
message: _context6.t0.message
|
|
28318
|
+
})));
|
|
28319
|
+
|
|
28320
|
+
case 13:
|
|
28321
|
+
case "end":
|
|
28322
|
+
return _context6.stop();
|
|
28323
|
+
}
|
|
28324
|
+
}
|
|
28325
|
+
}, _callee6, null, [[2, 10]]);
|
|
28326
|
+
})));
|
|
28268
28327
|
var signInSlice = createSlice({
|
|
28269
28328
|
name: "signInApiSlice",
|
|
28270
28329
|
initialState: {
|
|
28271
28330
|
sign_in_read: _objectSpread2({}, defaultState.List),
|
|
28272
28331
|
getpermissiondata: _objectSpread2({}, defaultState.List),
|
|
28273
28332
|
SearchPractioner: _objectSpread2({}, defaultState.List),
|
|
28274
|
-
refreshToken: _objectSpread2({}, defaultState.Info)
|
|
28333
|
+
refreshToken: _objectSpread2({}, defaultState.Info),
|
|
28334
|
+
getToken: _objectSpread2({}, defaultState.Info)
|
|
28275
28335
|
},
|
|
28276
28336
|
extraReducers: (_extraReducers$n = {}, _defineProperty(_extraReducers$n, GET_PERMISSION_ROLE_DATA.fulfilled, function (state, action) {
|
|
28277
28337
|
state.getpermissiondata.loading = false, state.getpermissiondata.error = false, state.getpermissiondata = action.payload;
|
|
@@ -28301,13 +28361,24 @@ var signInSlice = createSlice({
|
|
|
28301
28361
|
var _action$payload2;
|
|
28302
28362
|
|
|
28303
28363
|
state.refreshToken = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
28364
|
+
}), _defineProperty(_extraReducers$n, GET_TOKEN.fulfilled, function (state, action) {
|
|
28365
|
+
var _action$payload3;
|
|
28366
|
+
|
|
28367
|
+
state.getToken = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
28368
|
+
}), _defineProperty(_extraReducers$n, GET_TOKEN.pending, function (state, action) {
|
|
28369
|
+
state.getToken.loading = true;
|
|
28370
|
+
}), _defineProperty(_extraReducers$n, GET_TOKEN.rejected, function (state, action) {
|
|
28371
|
+
var _action$payload4;
|
|
28372
|
+
|
|
28373
|
+
state.getToken = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
28304
28374
|
}), _extraReducers$n)
|
|
28305
28375
|
});
|
|
28306
28376
|
var signinActions = {
|
|
28307
28377
|
SIGN_IN_READ: SIGN_IN_READ,
|
|
28308
28378
|
GET_PERMISSION_ROLE_DATA: GET_PERMISSION_ROLE_DATA,
|
|
28309
28379
|
SEARCH_PRACTIONER: SEARCH_PRACTIONER,
|
|
28310
|
-
REFRESH_TOKEN: REFRESH_TOKEN
|
|
28380
|
+
REFRESH_TOKEN: REFRESH_TOKEN,
|
|
28381
|
+
GET_TOKEN: GET_TOKEN
|
|
28311
28382
|
};
|
|
28312
28383
|
var signInSlice$1 = signInSlice.reducer;
|
|
28313
28384
|
|
|
@@ -36586,7 +36657,7 @@ var query$1 = {
|
|
|
36586
36657
|
// },
|
|
36587
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)}) })) }))}"
|
|
36588
36659
|
// }`
|
|
36589
|
-
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)}) })) }))}"
|
|
36590
36661
|
},
|
|
36591
36662
|
getCancellationReason: function getCancellationReason(data) {
|
|
36592
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 }");
|
|
@@ -36709,11 +36780,11 @@ var GET_PRACTITIONER_AGAINST_SPECIALITY = createAsyncThunk("getPendingReschedule
|
|
|
36709
36780
|
rejectWithValue,
|
|
36710
36781
|
_data$result2,
|
|
36711
36782
|
_data$result2$,
|
|
36783
|
+
data,
|
|
36784
|
+
arr,
|
|
36712
36785
|
_data$result3,
|
|
36713
36786
|
_data$result3$,
|
|
36714
36787
|
_data$result3$$Practi,
|
|
36715
|
-
data,
|
|
36716
|
-
returnedData,
|
|
36717
36788
|
_args3 = arguments;
|
|
36718
36789
|
|
|
36719
36790
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -36730,36 +36801,39 @@ var GET_PRACTITIONER_AGAINST_SPECIALITY = createAsyncThunk("getPendingReschedule
|
|
|
36730
36801
|
|
|
36731
36802
|
case 5:
|
|
36732
36803
|
data = _context3.sent;
|
|
36733
|
-
|
|
36734
|
-
|
|
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
|
+
}
|
|
36735
36819
|
|
|
36736
|
-
return {
|
|
36737
|
-
label: makeName(_ === null || _ === void 0 ? void 0 : (_$name2 = _.name) === null || _$name2 === void 0 ? void 0 : _$name2[0]),
|
|
36738
|
-
//name
|
|
36739
|
-
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 : '',
|
|
36740
|
-
//role
|
|
36741
|
-
id: (_$id3 = _ === null || _ === void 0 ? void 0 : _.id) !== null && _$id3 !== void 0 ? _$id3 : '',
|
|
36742
|
-
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 : '',
|
|
36743
|
-
practitionerDetails: _
|
|
36744
|
-
};
|
|
36745
|
-
}) : [];
|
|
36746
36820
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
36747
|
-
data:
|
|
36821
|
+
data: arr
|
|
36748
36822
|
}));
|
|
36749
36823
|
|
|
36750
|
-
case
|
|
36751
|
-
_context3.prev =
|
|
36824
|
+
case 11:
|
|
36825
|
+
_context3.prev = 11;
|
|
36752
36826
|
_context3.t0 = _context3["catch"](2);
|
|
36753
36827
|
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
36754
36828
|
message: _context3.t0.message
|
|
36755
36829
|
})));
|
|
36756
36830
|
|
|
36757
|
-
case
|
|
36831
|
+
case 14:
|
|
36758
36832
|
case "end":
|
|
36759
36833
|
return _context3.stop();
|
|
36760
36834
|
}
|
|
36761
36835
|
}
|
|
36762
|
-
}, _callee3, null, [[2,
|
|
36836
|
+
}, _callee3, null, [[2, 11]]);
|
|
36763
36837
|
})));
|
|
36764
36838
|
var CANCELLATION_REASON = createAsyncThunk("getPendingRescheduleListApiSlice/getCancellationReason", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
36765
36839
|
var payload,
|