primary_care_admin_binder 0.1.166 → 0.1.167
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 +154 -90
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -12167,6 +12167,8 @@ var getLocationSort = function getLocationSort(sort) {
|
|
|
12167
12167
|
switch (sort) {
|
|
12168
12168
|
case "Facilities":
|
|
12169
12169
|
return "managingorgname";
|
|
12170
|
+
case "Long Description":
|
|
12171
|
+
return 'longdesc';
|
|
12170
12172
|
case "Short Description":
|
|
12171
12173
|
return "shortdesc";
|
|
12172
12174
|
case "Location Type":
|
|
@@ -12283,7 +12285,7 @@ var workday_timeslotList = function workday_timeslotList(data) {
|
|
|
12283
12285
|
return timeslot_Lists;
|
|
12284
12286
|
};
|
|
12285
12287
|
var generateJSON = function generateJSON(data, _key) {
|
|
12286
|
-
var _data$overRideCard, _data$operationalStat, _data$operationalStat2, _data$locationType$la, _data$locationType, _data$locationRoleTyp, _data$locationRoleTyp2, _data$parentLocationI, _data$parentLocationI2, _data$speciality$labe, _data$speciality, _data$entityType$labe, _data$entityType, _data$formid$label, _data$formid, _data$typeofcare$labe, _data$typeofcare, _data$clinicalInstruc, _data$clinicDetails;
|
|
12288
|
+
var _data$overRideCard, _data$operationalStat, _data$operationalStat2, _data$locationType$la, _data$locationType, _data$entityName$valu, _data$entityName, _data$locationRoleTyp, _data$locationRoleTyp2, _data$parentLocationI, _data$parentLocationI2, _data$speciality$labe, _data$speciality, _data$entityType$labe, _data$entityType, _data$formid$label, _data$formid, _data$typeofcare$labe, _data$typeofcare, _data$clinicalInstruc, _data$clinicDetails, _data$photo$0$fileNam, _data$photo, _data$photo$0$fileid, _data$photo2, _data$photo$0$filetyp, _data$photo3, _data$photo$0$objecti, _data$photo4;
|
|
12287
12289
|
var filter = {};
|
|
12288
12290
|
if (_key) {
|
|
12289
12291
|
filter = {
|
|
@@ -12401,7 +12403,7 @@ var generateJSON = function generateJSON(data, _key) {
|
|
|
12401
12403
|
latitude: data.latitude,
|
|
12402
12404
|
altitude: data.altitude
|
|
12403
12405
|
}],
|
|
12404
|
-
managingOrgID: data.entityName.value,
|
|
12406
|
+
managingOrgID: (_data$entityName$valu = (_data$entityName = data.entityName) === null || _data$entityName === void 0 ? void 0 : _data$entityName.value) !== null && _data$entityName$valu !== void 0 ? _data$entityName$valu : null,
|
|
12405
12407
|
id: 0,
|
|
12406
12408
|
locationRoletype: (_data$locationRoleTyp = data === null || data === void 0 || (_data$locationRoleTyp2 = data.locationRoleType) === null || _data$locationRoleTyp2 === void 0 ? void 0 : _data$locationRoleTyp2.label) !== null && _data$locationRoleTyp !== void 0 ? _data$locationRoleTyp : null,
|
|
12407
12409
|
locationID: data.locationId,
|
|
@@ -12417,20 +12419,20 @@ var generateJSON = function generateJSON(data, _key) {
|
|
|
12417
12419
|
photo: [{
|
|
12418
12420
|
date: "",
|
|
12419
12421
|
url: "",
|
|
12420
|
-
fileName: data.photo[0].fileName,
|
|
12421
|
-
fileid: data.photo[0].fileid,
|
|
12422
|
-
filetype: data.photo[0].filetype,
|
|
12423
|
-
objectid: data.photo[0].objectid
|
|
12422
|
+
fileName: (_data$photo$0$fileNam = (_data$photo = data.photo) === null || _data$photo === void 0 || (_data$photo = _data$photo[0]) === null || _data$photo === void 0 ? void 0 : _data$photo.fileName) !== null && _data$photo$0$fileNam !== void 0 ? _data$photo$0$fileNam : "",
|
|
12423
|
+
fileid: (_data$photo$0$fileid = (_data$photo2 = data.photo) === null || _data$photo2 === void 0 || (_data$photo2 = _data$photo2[0]) === null || _data$photo2 === void 0 ? void 0 : _data$photo2.fileid) !== null && _data$photo$0$fileid !== void 0 ? _data$photo$0$fileid : "",
|
|
12424
|
+
filetype: (_data$photo$0$filetyp = (_data$photo3 = data.photo) === null || _data$photo3 === void 0 || (_data$photo3 = _data$photo3[0]) === null || _data$photo3 === void 0 ? void 0 : _data$photo3.filetype) !== null && _data$photo$0$filetyp !== void 0 ? _data$photo$0$filetyp : "",
|
|
12425
|
+
objectid: (_data$photo$0$objecti = (_data$photo4 = data.photo) === null || _data$photo4 === void 0 || (_data$photo4 = _data$photo4[0]) === null || _data$photo4 === void 0 ? void 0 : _data$photo4.objectid) !== null && _data$photo$0$objecti !== void 0 ? _data$photo$0$objecti : ""
|
|
12424
12426
|
}],
|
|
12425
12427
|
pharmacy: [{
|
|
12426
|
-
maxdaysforRtn: parseInt(data.maxDaysForReturn)
|
|
12428
|
+
maxdaysforRtn: data.maxDaysForReturn ? parseInt(data.maxDaysForReturn) : null
|
|
12427
12429
|
}]
|
|
12428
12430
|
}
|
|
12429
12431
|
})];
|
|
12430
12432
|
return json;
|
|
12431
12433
|
};
|
|
12432
12434
|
|
|
12433
|
-
var LOCATION_READ = createAsyncThunk("
|
|
12435
|
+
var LOCATION_READ = createAsyncThunk("locationApiSlice/locationlist", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
12434
12436
|
var payload,
|
|
12435
12437
|
_ref2,
|
|
12436
12438
|
rejectWithValue,
|
|
@@ -12453,13 +12455,12 @@ var LOCATION_READ = createAsyncThunk("locationSlice/locationlist", /*#__PURE__*/
|
|
|
12453
12455
|
type = payload.type, page = payload.page, perPage = payload.perPage, search = payload.search, sort = payload.sort, direction = payload.direction;
|
|
12454
12456
|
_context.n = 2;
|
|
12455
12457
|
return fetchData({
|
|
12456
|
-
body: JSON.stringify(queries$n.locationlist(type, page, perPage, search ? search :
|
|
12458
|
+
body: JSON.stringify(queries$n.locationlist(type, page, perPage, search ? search : "", sort ? sort : "", direction ? direction : "DESC"))
|
|
12457
12459
|
}, __baseUrl__$1);
|
|
12458
12460
|
case 2:
|
|
12459
12461
|
data = _context.v;
|
|
12460
12462
|
arry = [];
|
|
12461
|
-
|
|
12462
|
-
return data.map(function (val) {
|
|
12463
|
+
data.map(function (val) {
|
|
12463
12464
|
var _val$locationType$, _val$locationType$2, _val$locationType, _val$locationType2, _val$locationType3, _val$locationType4, _val$managingOrgID, _val$managingOrgID2;
|
|
12464
12465
|
arry.push({
|
|
12465
12466
|
location_id: val.locationID,
|
|
@@ -12480,20 +12481,19 @@ var LOCATION_READ = createAsyncThunk("locationSlice/locationlist", /*#__PURE__*/
|
|
|
12480
12481
|
totalCount: val === null || val === void 0 ? void 0 : val.TotalCount
|
|
12481
12482
|
});
|
|
12482
12483
|
});
|
|
12483
|
-
case 3:
|
|
12484
12484
|
return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12485
12485
|
data: arry
|
|
12486
12486
|
}));
|
|
12487
|
-
case
|
|
12488
|
-
_context.p =
|
|
12487
|
+
case 3:
|
|
12488
|
+
_context.p = 3;
|
|
12489
12489
|
_t = _context.v;
|
|
12490
12490
|
return _context.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12491
12491
|
message: _t.message
|
|
12492
12492
|
})));
|
|
12493
12493
|
}
|
|
12494
|
-
}, _callee, null, [[1,
|
|
12494
|
+
}, _callee, null, [[1, 3]]);
|
|
12495
12495
|
})));
|
|
12496
|
-
var LOCATION_LIST_UPSERT = createAsyncThunk("
|
|
12496
|
+
var LOCATION_LIST_UPSERT = createAsyncThunk("locationApiSlice/locationlistupsert", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
12497
12497
|
var payload,
|
|
12498
12498
|
_ref4,
|
|
12499
12499
|
rejectWithValue,
|
|
@@ -12575,25 +12575,55 @@ var locationSlice = createSlice({
|
|
|
12575
12575
|
location_list_upsert: _objectSpread2({}, defaultState.List),
|
|
12576
12576
|
location_insert: _objectSpread2({}, defaultState.List)
|
|
12577
12577
|
},
|
|
12578
|
-
extraReducers:
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12578
|
+
extraReducers: function extraReducers(builder) {
|
|
12579
|
+
// LOCATION MASTER READ
|
|
12580
|
+
builder.addCase(LOCATION_READ.fulfilled, function (state, action) {
|
|
12581
|
+
state.location_list.loading = false;
|
|
12582
|
+
state.location_list.error = false;
|
|
12583
|
+
state.location_list = action.payload;
|
|
12584
|
+
});
|
|
12585
|
+
builder.addCase(LOCATION_READ.pending, function (state) {
|
|
12586
|
+
state.location_list.loading = true;
|
|
12587
|
+
state.location_list.error = false;
|
|
12588
|
+
});
|
|
12589
|
+
builder.addCase(LOCATION_READ.rejected, function (state, action) {
|
|
12590
|
+
state.location_list.loading = false;
|
|
12591
|
+
state.location_list.error = true;
|
|
12592
|
+
state.location_list = action.payload;
|
|
12593
|
+
});
|
|
12594
|
+
|
|
12595
|
+
// LOCATION MASTER STATUS CHANGE
|
|
12596
|
+
builder.addCase(LOCATION_LIST_UPSERT.fulfilled, function (state, action) {
|
|
12597
|
+
state.location_list_upsert.loading = false;
|
|
12598
|
+
state.location_list_upsert.error = false;
|
|
12599
|
+
state.location_list_upsert = action.payload;
|
|
12600
|
+
});
|
|
12601
|
+
builder.addCase(LOCATION_LIST_UPSERT.pending, function (state) {
|
|
12602
|
+
state.location_list_upsert.loading = true;
|
|
12603
|
+
state.location_list_upsert.error = false;
|
|
12604
|
+
});
|
|
12605
|
+
builder.addCase(LOCATION_LIST_UPSERT.rejected, function (state, action) {
|
|
12606
|
+
state.location_list_upsert.loading = false;
|
|
12607
|
+
state.location_list_upsert.error = true;
|
|
12608
|
+
state.location_list_upsert = action.payload;
|
|
12609
|
+
});
|
|
12610
|
+
|
|
12611
|
+
// LOCATION MASTER INSERT / UPDATE
|
|
12612
|
+
builder.addCase(LOCATION_MASTER_INSERT.fulfilled, function (state, action) {
|
|
12613
|
+
state.location_insert.loading = false;
|
|
12614
|
+
state.location_insert.error = false;
|
|
12615
|
+
state.location_insert = action.payload;
|
|
12616
|
+
});
|
|
12617
|
+
builder.addCase(LOCATION_MASTER_INSERT.pending, function (state) {
|
|
12618
|
+
state.location_insert.loading = true;
|
|
12619
|
+
state.location_insert.error = false;
|
|
12620
|
+
});
|
|
12621
|
+
builder.addCase(LOCATION_MASTER_INSERT.rejected, function (state, action) {
|
|
12622
|
+
state.location_insert.loading = false;
|
|
12623
|
+
state.location_insert.error = true;
|
|
12624
|
+
state.location_insert = action.payload;
|
|
12625
|
+
});
|
|
12626
|
+
}
|
|
12597
12627
|
});
|
|
12598
12628
|
var locationActions$1 = {
|
|
12599
12629
|
LOCATION_READ: LOCATION_READ,
|
|
@@ -29618,7 +29648,6 @@ var scheduleManagementSlice$1 = scheduleManagementSlice.reducer;
|
|
|
29618
29648
|
|
|
29619
29649
|
var availability_management_actions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, availabilityManagementActions$1), holidayActions), resourceByAppointmentTypes), timeTableActions), scheduleManagementActions);
|
|
29620
29650
|
|
|
29621
|
-
// import { dbName } from "../../qdm_query_ids";
|
|
29622
29651
|
var queries$d = {
|
|
29623
29652
|
getTreeStuct: function getTreeStuct(type) {
|
|
29624
29653
|
return {
|
|
@@ -29654,14 +29683,6 @@ var queries$d = {
|
|
|
29654
29683
|
};
|
|
29655
29684
|
},
|
|
29656
29685
|
getParentEntity: function getParentEntity(type) {
|
|
29657
|
-
// return {
|
|
29658
|
-
// appcode: dbName,
|
|
29659
|
-
// entity: "Organization",
|
|
29660
|
-
// sort: "Organization.name",
|
|
29661
|
-
// filter: `Organization.activestatus==true AND Organization.active==true && Organization.isExternal==${type.isexternal} && Organization.OrgType === '${type.entityType}'`,
|
|
29662
|
-
// return_fields:
|
|
29663
|
-
// "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}",
|
|
29664
|
-
// };
|
|
29665
29686
|
return {
|
|
29666
29687
|
db_name: dbName,
|
|
29667
29688
|
entity: "Organization",
|
|
@@ -29718,16 +29739,6 @@ var queries$d = {
|
|
|
29718
29739
|
}
|
|
29719
29740
|
};
|
|
29720
29741
|
},
|
|
29721
|
-
//GET PARENT ORG NAME BY ID
|
|
29722
|
-
// getParentOrgNameById: (_key) => {
|
|
29723
|
-
// return {
|
|
29724
|
-
// appcode: dbName,
|
|
29725
|
-
// entity: "Organization",
|
|
29726
|
-
// filter: `Organization.id == ${_key}`,
|
|
29727
|
-
// return_fields:
|
|
29728
|
-
// "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,parentorgid:Organization.ParentOrgID}",
|
|
29729
|
-
// };
|
|
29730
|
-
// },
|
|
29731
29742
|
getParentOrgNameById: function getParentOrgNameById(_key) {
|
|
29732
29743
|
return {
|
|
29733
29744
|
appcode: dbName,
|
|
@@ -29744,7 +29755,7 @@ var queries$d = {
|
|
|
29744
29755
|
upsertSatus: function upsertSatus(key, status) {
|
|
29745
29756
|
return [{
|
|
29746
29757
|
appcode: dbName,
|
|
29747
|
-
|
|
29758
|
+
collection: "Organization",
|
|
29748
29759
|
is_metadata: true,
|
|
29749
29760
|
metadata_dbname: metaDatadbName$1,
|
|
29750
29761
|
metadataId: metaDataId$1,
|
|
@@ -29951,8 +29962,6 @@ var facilityObj = function facilityObj(data) {
|
|
|
29951
29962
|
return arry;
|
|
29952
29963
|
};
|
|
29953
29964
|
|
|
29954
|
-
//JSON CONSTRUCTION FOR GET TREE DETAIL
|
|
29955
|
-
|
|
29956
29965
|
var getpersondetails = function getpersondetails(contactlist) {
|
|
29957
29966
|
var dataList = [];
|
|
29958
29967
|
if ((contactlist === null || contactlist === void 0 ? void 0 : contactlist.length) > 0) {
|
|
@@ -30000,7 +30009,7 @@ var getaliasdetails = function getaliasdetails(getaliaslist) {
|
|
|
30000
30009
|
return dataList;
|
|
30001
30010
|
};
|
|
30002
30011
|
var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
|
|
30003
|
-
var _data$specialtyDetail, _data$contactsettings, _data$
|
|
30012
|
+
var _data$specialtyDetail, _data$contactsettings, _ref3, _data$nurseavailabili, _data$address$, _data$address, _addr$city, _addr$district, _addr$state, _addr$postalCode, _addr$country, _data$contact$0$name$, _data$contact, _contactNameObj$prefi, _contactNameObj$suffi, _data$name, _data$entitycode, _data$ParentOrgID, _data$levelofcareid$d, _data$levelofcareid, _data$levelofcareid$l, _data$levelofcareid2, _data$gstcode, _data$contact$0$desig, _data$contact2, _getContact, _data$telecom, _data$active, _data$logo$0$fileid, _data$logo, _getpersondetails, _data$contact3, _data$isExternal, _data$OrgType$0$code, _data$OrgType, _getaliasdetails, _data$alias;
|
|
30004
30013
|
// Early return if data is falsy
|
|
30005
30014
|
if (!data) {
|
|
30006
30015
|
return {};
|
|
@@ -30030,15 +30039,19 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
|
|
|
30030
30039
|
});
|
|
30031
30040
|
|
|
30032
30041
|
// Process nurse availability details
|
|
30033
|
-
var nurseavailabityArr = ((_data$
|
|
30042
|
+
var nurseavailabityArr = ((_ref3 = (_data$nurseavailabili = data.nurseavailability) !== null && _data$nurseavailabili !== void 0 ? _data$nurseavailabili : data.nurseavailabity) !== null && _ref3 !== void 0 ? _ref3 : []).map(function (val) {
|
|
30034
30043
|
var _val$remarks;
|
|
30035
30044
|
var effFrom = val !== null && val !== void 0 && val.effFrom ? moment.unix(val.effFrom).local() : null;
|
|
30036
30045
|
var effTo = val !== null && val !== void 0 && val.effTo ? moment.unix(val.effTo).local() : null;
|
|
30046
|
+
var statusObj = null;
|
|
30047
|
+
if (val !== null && val !== void 0 && val.status && _typeof(val.status) === 'object') {
|
|
30048
|
+
statusObj = {
|
|
30049
|
+
label: val.status.shortdesc,
|
|
30050
|
+
value: val.status._id
|
|
30051
|
+
};
|
|
30052
|
+
}
|
|
30037
30053
|
return {
|
|
30038
|
-
status:
|
|
30039
|
-
label: val.status,
|
|
30040
|
-
value: val.status
|
|
30041
|
-
} : null,
|
|
30054
|
+
status: statusObj,
|
|
30042
30055
|
effFrom: effFrom ? effFrom.format("DD-MM-YYYY HH:mm") : "",
|
|
30043
30056
|
effTo: effTo ? effTo.format("DD-MM-YYYY HH:mm") : "",
|
|
30044
30057
|
remarks: (_val$remarks = val === null || val === void 0 ? void 0 : val.remarks) !== null && _val$remarks !== void 0 ? _val$remarks : "",
|
|
@@ -30080,7 +30093,7 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
|
|
|
30080
30093
|
orgEntityCode: (_data$OrgType$0$code = (_data$OrgType = data.OrgType) === null || _data$OrgType === void 0 || (_data$OrgType = _data$OrgType[0]) === null || _data$OrgType === void 0 ? void 0 : _data$OrgType.code) !== null && _data$OrgType$0$code !== void 0 ? _data$OrgType$0$code : '',
|
|
30081
30094
|
alias: (_getaliasdetails = getaliasdetails(((_data$alias = data.alias) === null || _data$alias === void 0 ? void 0 : _data$alias.length) > 0 ? data.alias : null)) !== null && _getaliasdetails !== void 0 ? _getaliasdetails : null,
|
|
30082
30095
|
contactsettings: settingsArr,
|
|
30083
|
-
|
|
30096
|
+
nurseavailability: nurseavailabityArr
|
|
30084
30097
|
};
|
|
30085
30098
|
return obj;
|
|
30086
30099
|
};
|
|
@@ -30149,7 +30162,7 @@ var generateJson$8 = {
|
|
|
30149
30162
|
var contactpersondetailsArr = data === null || data === void 0 || (_data$ContactPersonDe = data.ContactPersonDetails) === null || _data$ContactPersonDe === void 0 ? void 0 : _data$ContactPersonDe.map(function (val, i) {
|
|
30150
30163
|
var _val$point, _val$use3, _val$prefix, _val$suffix, _val$designation;
|
|
30151
30164
|
var telecomArr = [];
|
|
30152
|
-
val === null || val === void 0 || (_val$point = val.point) === null || _val$point === void 0
|
|
30165
|
+
val === null || val === void 0 || (_val$point = val.point) === null || _val$point === void 0 || _val$point.map(function (v, i) {
|
|
30153
30166
|
var _v$use3, _v$mode;
|
|
30154
30167
|
if (v !== null && v !== void 0 && (_v$use3 = v.use) !== null && _v$use3 !== void 0 && _v$use3.value && v !== null && v !== void 0 && (_v$mode = v.mode) !== null && _v$mode !== void 0 && _v$mode.value && v !== null && v !== void 0 && v.number) {
|
|
30155
30168
|
var _v$mode2, _v$use4, _v$priority, _v$code;
|
|
@@ -30275,7 +30288,7 @@ var unixToLocalDate = function unixToLocalDate(unixTimestamp) {
|
|
|
30275
30288
|
};
|
|
30276
30289
|
var generateReadJson$2 = {
|
|
30277
30290
|
read_json: function read_json(data) {
|
|
30278
|
-
var _data$identifier, _data$alias, _data$address, _data$telecom, _data$contact, _data$specialtyDetail2, _data$contactsettings, _data$ParentOrgID, _data$logo, _data$logo$0$fileid, _data$logo$0$filetype, _data$logo$0$objectid, _data$logo$0$fileName, _data$nurseavailabili2, _data$active, _data$OrgType, _data$OrgType$0$displ, _data$OrgType$0$_id, _data$OrgType$0$code, _data$levelofcareid$d, _data$levelofcareid$_, _data$entitycode, _data$name, _data$gstcode, _data$isExternal;
|
|
30291
|
+
var _data$identifier, _data$alias, _data$address, _data$telecom, _data$contact, _data$specialtyDetail2, _data$contactsettings, _data$ParentOrgID, _data$logo, _data$logo$0$fileid, _data$logo$0$filetype, _data$logo$0$objectid, _data$logo$0$fileName, _ref2, _data$nurseavailabili2, _data$active, _data$OrgType, _data$OrgType$0$displ, _data$OrgType$0$_id, _data$OrgType$0$code, _data$levelofcareid$d, _data$levelofcareid$_, _data$entitycode, _data$name, _data$gstcode, _data$isExternal;
|
|
30279
30292
|
var Parentget = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
30280
30293
|
if (!data) {
|
|
30281
30294
|
return {};
|
|
@@ -30498,12 +30511,18 @@ var generateReadJson$2 = {
|
|
|
30498
30511
|
}] : null;
|
|
30499
30512
|
|
|
30500
30513
|
// --- Nurse Availability ---
|
|
30501
|
-
var nurseavailabityArr = ((_data$nurseavailabili2 = data.nurseavailability) !== null && _data$nurseavailabili2 !== void 0 ? _data$nurseavailabili2 : []).map(function (val) {
|
|
30502
|
-
var _val$
|
|
30514
|
+
var nurseavailabityArr = ((_ref2 = (_data$nurseavailabili2 = data.nurseavailability) !== null && _data$nurseavailabili2 !== void 0 ? _data$nurseavailabili2 : data.nurseavailabity) !== null && _ref2 !== void 0 ? _ref2 : []).map(function (val) {
|
|
30515
|
+
var _val$remarks2;
|
|
30503
30516
|
var effFrom = unixToLocalDate(val === null || val === void 0 ? void 0 : val.effFrom);
|
|
30504
30517
|
var effTo = unixToLocalDate(val === null || val === void 0 ? void 0 : val.effTo);
|
|
30518
|
+
if (val !== null && val !== void 0 && val.status && _typeof(val.status) === "object") {
|
|
30519
|
+
({
|
|
30520
|
+
label: val.status.shortdesc,
|
|
30521
|
+
value: val.status._id
|
|
30522
|
+
});
|
|
30523
|
+
}
|
|
30505
30524
|
return {
|
|
30506
|
-
status: (
|
|
30525
|
+
status: _typeof(val === null || val === void 0 ? void 0 : val.status) === "object" ? val.status._id : "",
|
|
30507
30526
|
effFrom: effFrom ? moment(effFrom).format("DD-MM-YYYY HH:mm") : "",
|
|
30508
30527
|
effTo: effTo ? moment(effTo).format("DD-MM-YYYY HH:mm") : "",
|
|
30509
30528
|
remarks: (_val$remarks2 = val === null || val === void 0 ? void 0 : val.remarks) !== null && _val$remarks2 !== void 0 ? _val$remarks2 : "",
|
|
@@ -30563,9 +30582,7 @@ var ORGANIZATION_TREE_READ = createAsyncThunk("organizationSlice/organizationTre
|
|
|
30563
30582
|
_context.n = 2;
|
|
30564
30583
|
return fetchData({
|
|
30565
30584
|
body: JSON.stringify(queries$d.getTreeStuct(type))
|
|
30566
|
-
},
|
|
30567
|
-
// __readDocumentUrl__
|
|
30568
|
-
__baseUrl__$1);
|
|
30585
|
+
}, __baseUrl__$1);
|
|
30569
30586
|
case 2:
|
|
30570
30587
|
data = _context.v;
|
|
30571
30588
|
getJson = ReadTreeJson(data);
|
|
@@ -30936,9 +30953,7 @@ var ORGANIZATION_READ_DETAILS = createAsyncThunk("organizationSlice/organization
|
|
|
30936
30953
|
_context9.n = 2;
|
|
30937
30954
|
return fetchData({
|
|
30938
30955
|
body: JSON.stringify(queries$d.getTreeDetails(_key))
|
|
30939
|
-
},
|
|
30940
|
-
// __readDocumentUrl__
|
|
30941
|
-
__baseUrl__$1);
|
|
30956
|
+
}, __baseUrl__$1);
|
|
30942
30957
|
case 2:
|
|
30943
30958
|
data = _context9.v;
|
|
30944
30959
|
parentOrgId = data === null || data === void 0 || (_data$5 = data[0]) === null || _data$5 === void 0 || (_data$5 = _data$5.ParentOrgID) === null || _data$5 === void 0 ? void 0 : _data$5[0];
|
|
@@ -30950,9 +30965,7 @@ var ORGANIZATION_READ_DETAILS = createAsyncThunk("organizationSlice/organization
|
|
|
30950
30965
|
_context9.n = 3;
|
|
30951
30966
|
return fetchData({
|
|
30952
30967
|
body: JSON.stringify(queries$d.getParentOrgNameById(parentOrgId))
|
|
30953
|
-
},
|
|
30954
|
-
// __readDocumentUrl__
|
|
30955
|
-
__baseUrl__$1);
|
|
30968
|
+
}, __baseUrl__$1);
|
|
30956
30969
|
case 3:
|
|
30957
30970
|
parentOrgName = _context9.v;
|
|
30958
30971
|
case 4:
|
|
@@ -31868,9 +31881,7 @@ var ORG_FROM_GET = createAsyncThunk("organizationSlice/getOrganization", /*#__PU
|
|
|
31868
31881
|
_context26.n = 2;
|
|
31869
31882
|
return fetchData({
|
|
31870
31883
|
body: JSON.stringify(queries$d.getParentEntityFull())
|
|
31871
|
-
},
|
|
31872
|
-
// __readDocumentUrl__
|
|
31873
|
-
__baseUrl__$1);
|
|
31884
|
+
}, __baseUrl__$1);
|
|
31874
31885
|
case 2:
|
|
31875
31886
|
getParentEntityData = _context26.v;
|
|
31876
31887
|
result = [];
|
|
@@ -31885,13 +31896,10 @@ var ORG_FROM_GET = createAsyncThunk("organizationSlice/getOrganization", /*#__PU
|
|
|
31885
31896
|
_context26.n = 3;
|
|
31886
31897
|
return fetchData({
|
|
31887
31898
|
body: JSON.stringify(queries$d.getTreeDetails(key))
|
|
31888
|
-
},
|
|
31889
|
-
// __readDocumentUrl__
|
|
31890
|
-
__baseUrl__$1);
|
|
31899
|
+
}, __baseUrl__$1);
|
|
31891
31900
|
case 3:
|
|
31892
31901
|
data = _context26.v;
|
|
31893
31902
|
queriesjson = generateReadJson$2.read_json(data === null || data === void 0 ? void 0 : data[0], result);
|
|
31894
|
-
console.log("queriesjson get treedetails", queriesjson);
|
|
31895
31903
|
return _context26.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
31896
31904
|
data: queriesjson
|
|
31897
31905
|
}));
|
|
@@ -32002,6 +32010,54 @@ var ORGANIZATION_GET_CONTACTDETAILROUNDOFFMODE = createAsyncThunk("organizationS
|
|
|
32002
32010
|
}
|
|
32003
32011
|
}, _callee28, null, [[1, 3]]);
|
|
32004
32012
|
})));
|
|
32013
|
+
var ORG_NURSE_STATUS = createAsyncThunk("organizationSlice/orgNurseStatus", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee29() {
|
|
32014
|
+
var _ref60,
|
|
32015
|
+
rejectWithValue,
|
|
32016
|
+
body,
|
|
32017
|
+
data,
|
|
32018
|
+
arry,
|
|
32019
|
+
_args29 = arguments,
|
|
32020
|
+
_t29;
|
|
32021
|
+
return _regenerator().w(function (_context29) {
|
|
32022
|
+
while (1) switch (_context29.p = _context29.n) {
|
|
32023
|
+
case 0:
|
|
32024
|
+
_ref60 = _args29.length > 1 ? _args29[1] : undefined, rejectWithValue = _ref60.rejectWithValue;
|
|
32025
|
+
_context29.p = 1;
|
|
32026
|
+
body = {
|
|
32027
|
+
appcode: dbName,
|
|
32028
|
+
filter: {
|
|
32029
|
+
type: "NURSEAVAILABILITY",
|
|
32030
|
+
status: true,
|
|
32031
|
+
code: "",
|
|
32032
|
+
sort: "shortdesc"
|
|
32033
|
+
},
|
|
32034
|
+
requestid: "b283129b-9841-419b-bdfc-de5105ebbad7"
|
|
32035
|
+
};
|
|
32036
|
+
_context29.n = 2;
|
|
32037
|
+
return fetchData({
|
|
32038
|
+
body: JSON.stringify(body)
|
|
32039
|
+
}, __baseUrl__$1);
|
|
32040
|
+
case 2:
|
|
32041
|
+
data = _context29.v;
|
|
32042
|
+
arry = [];
|
|
32043
|
+
data === null || data === void 0 || data.map(function (item) {
|
|
32044
|
+
return arry.push(_objectSpread2({
|
|
32045
|
+
label: item.shortdesc,
|
|
32046
|
+
value: item._id
|
|
32047
|
+
}, item));
|
|
32048
|
+
});
|
|
32049
|
+
return _context29.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
32050
|
+
data: arry
|
|
32051
|
+
}));
|
|
32052
|
+
case 3:
|
|
32053
|
+
_context29.p = 3;
|
|
32054
|
+
_t29 = _context29.v;
|
|
32055
|
+
return _context29.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
32056
|
+
message: _t29.message
|
|
32057
|
+
})));
|
|
32058
|
+
}
|
|
32059
|
+
}, _callee29, null, [[1, 3]]);
|
|
32060
|
+
})));
|
|
32005
32061
|
var organizationSlice = createSlice({
|
|
32006
32062
|
name: "organizationSlice",
|
|
32007
32063
|
initialState: {
|
|
@@ -32034,7 +32090,8 @@ var organizationSlice = createSlice({
|
|
|
32034
32090
|
orgSettingsTenant: _objectSpread2({}, defaultState.List),
|
|
32035
32091
|
orgSettingsCurrency: _objectSpread2({}, defaultState.List),
|
|
32036
32092
|
orgSettingsTimezone: _objectSpread2({}, defaultState.List),
|
|
32037
|
-
orgContactDetailRoundoffmode: _objectSpread2({}, defaultState.List)
|
|
32093
|
+
orgContactDetailRoundoffmode: _objectSpread2({}, defaultState.List),
|
|
32094
|
+
orgNurseStatus: _objectSpread2({}, defaultState.List)
|
|
32038
32095
|
},
|
|
32039
32096
|
extraReducers: (_extraReducers$m = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$m, ORGANIZATION_TREE_READ.fulfilled, function (state, action) {
|
|
32040
32097
|
state.organizationTreeList.loading = false, state.organizationTreeList.error = false, state.organizationTreeList = action.payload;
|
|
@@ -32216,6 +32273,12 @@ var organizationSlice = createSlice({
|
|
|
32216
32273
|
state.orgContactDetailRoundoffmode.loading = true, state.orgContactDetailRoundoffmode.error = false, state.orgContactDetailRoundoffmode.loading = true;
|
|
32217
32274
|
}), ORGANIZATION_GET_CONTACTDETAILROUNDOFFMODE.rejected, function (state, action) {
|
|
32218
32275
|
state.orgContactDetailRoundoffmode.loading = false, state.orgContactDetailRoundoffmode.error = true, state.orgContactDetailRoundoffmode = action.payload;
|
|
32276
|
+
}), _defineProperty(_defineProperty(_defineProperty(_extraReducers$m, ORG_NURSE_STATUS.fulfilled, function (state, action) {
|
|
32277
|
+
state.orgNurseStatus.loading = false, state.orgNurseStatus.error = false, state.orgNurseStatus = action.payload;
|
|
32278
|
+
}), ORG_NURSE_STATUS.pending, function (state, action) {
|
|
32279
|
+
state.orgNurseStatus.loading = true, state.orgNurseStatus.error = false, state.orgNurseStatus.loading = true;
|
|
32280
|
+
}), ORG_NURSE_STATUS.rejected, function (state, action) {
|
|
32281
|
+
state.orgNurseStatus.loading = false, state.orgNurseStatus.error = true, state.orgNurseStatus = action.payload;
|
|
32219
32282
|
}))
|
|
32220
32283
|
});
|
|
32221
32284
|
var organizationActions = {
|
|
@@ -32248,7 +32311,8 @@ var organizationActions = {
|
|
|
32248
32311
|
ORGANIZATION_GET_CONTACTTENANT: ORGANIZATION_GET_CONTACTTENANT,
|
|
32249
32312
|
ORGANIZATION_GET_CURRENCY: ORGANIZATION_GET_CURRENCY,
|
|
32250
32313
|
ORGANIZATION_GET_TIMEZONE: ORGANIZATION_GET_TIMEZONE,
|
|
32251
|
-
ORGANIZATION_GET_CONTACTDETAILROUNDOFFMODE: ORGANIZATION_GET_CONTACTDETAILROUNDOFFMODE
|
|
32314
|
+
ORGANIZATION_GET_CONTACTDETAILROUNDOFFMODE: ORGANIZATION_GET_CONTACTDETAILROUNDOFFMODE,
|
|
32315
|
+
ORG_NURSE_STATUS: ORG_NURSE_STATUS
|
|
32252
32316
|
};
|
|
32253
32317
|
var organizationSlice$1 = organizationSlice.reducer;
|
|
32254
32318
|
|
|
@@ -46459,7 +46523,7 @@ var drugUpsert = createAsyncThunk("drugReducer/upsert", /*#__PURE__*/function ()
|
|
|
46459
46523
|
var _v$facility, _v$locationType;
|
|
46460
46524
|
return {
|
|
46461
46525
|
appcode: dbName,
|
|
46462
|
-
|
|
46526
|
+
collection: "CA_PerformingLocationforOrdLocn",
|
|
46463
46527
|
is_metadata: true,
|
|
46464
46528
|
metadataId: "88b23ef1-7199-4503-b631-2de82ace6e03",
|
|
46465
46529
|
doc: {
|
|
@@ -46533,7 +46597,7 @@ var drugUpdate = createAsyncThunk("drugReducer/update", /*#__PURE__*/function ()
|
|
|
46533
46597
|
var _v$facility2, _v$locationType2;
|
|
46534
46598
|
var Json = {
|
|
46535
46599
|
appcode: dbName,
|
|
46536
|
-
|
|
46600
|
+
collection: "CA_PerformingLocationforOrdLocn",
|
|
46537
46601
|
is_metadata: true,
|
|
46538
46602
|
metadataId: "88b23ef1-7199-4503-b631-2de82ace6e03",
|
|
46539
46603
|
doc: {
|
|
@@ -46610,7 +46674,7 @@ var sigleRead = createAsyncThunk("drugReducer/singleread", /*#__PURE__*/function
|
|
|
46610
46674
|
body = {};
|
|
46611
46675
|
body = JSON.stringify({
|
|
46612
46676
|
db_name: dbName,
|
|
46613
|
-
|
|
46677
|
+
collection: "CA_PerformingLocationforOrdLocn",
|
|
46614
46678
|
filter: "CA_PerformingLocationforOrdLocn.performing_location_code == '".concat(LocationMasterId, "' && CA_PerformingLocationforOrdLocn.activestatus==true "),
|
|
46615
46679
|
return_fields: "merge(CA_PerformingLocationforOrdLocn,{ordering_org:DOCUMENT(CA_PerformingLocationforOrdLocn.ordering_org)},{ordering_source_type:DOCUMENT(CA_PerformingLocationforOrdLocn.ordering_source_type)},{ordering_source_code:DOCUMENT(CA_PerformingLocationforOrdLocn.ordering_source_code)},{service_applicability:DOCUMENT(CA_PerformingLocationforOrdLocn.service_applicability)},{performing_org:DOCUMENT(CA_PerformingLocationforOrdLocn.performing_org)},{performing_location_role_type:DOCUMENT(CA_PerformingLocationforOrdLocn.performing_location_role_type)},{ performing_location_code:(for performing_location_code in document(TO_ARRAY(CA_PerformingLocationforOrdLocn.performing_location_code)) return merge(performing_location_code,{operationalStatus:(for operationalStatus in document(TO_ARRAY(performing_location_code.operationalStatus)) return merge(operationalStatus,{coding:document(operationalStatus.coding)}))},{specialty:(for specialty in document(TO_ARRAY(performing_location_code.specialty)) return merge(specialty,{coding:document(specialty.coding)}))}) ) })"
|
|
46616
46680
|
});
|