primary_care_admin_binder 0.1.61 → 0.1.64
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 +41 -19
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -29095,18 +29095,35 @@ var permissionSlice$1 = permissionSlice.reducer;
|
|
|
29095
29095
|
var permission_actions = _objectSpread2({}, permissionActions);
|
|
29096
29096
|
|
|
29097
29097
|
var queries$7 = {
|
|
29098
|
-
person_read: function person_read(
|
|
29099
|
-
|
|
29100
|
-
|
|
29101
|
-
|
|
29102
|
-
|
|
29103
|
-
|
|
29104
|
-
|
|
29105
|
-
|
|
29106
|
-
"
|
|
29107
|
-
|
|
29108
|
-
|
|
29109
|
-
|
|
29098
|
+
person_read: function person_read(withoutLimit) {
|
|
29099
|
+
var search = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
29100
|
+
var page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
29101
|
+
var perPage = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;
|
|
29102
|
+
var queryPayload = null;
|
|
29103
|
+
|
|
29104
|
+
if (withoutLimit) {
|
|
29105
|
+
queryPayload = {
|
|
29106
|
+
"db_name": dbName$1,
|
|
29107
|
+
"entity": "Person",
|
|
29108
|
+
"filter": "Person.activestatus==true",
|
|
29109
|
+
"sort": "Person.createddate",
|
|
29110
|
+
"return_fields": "merge(Person,{name:(for nam in HumanNameMaster filter nam._id in Person.name return merge(nam,{use:document(nam.use),suffix:document(nam.suffix),prefix:document(nam.prefix)}))},{gender:document(Person.gender)},{telecom:(for con in ContactPointMaster filter con._id in Person.telecom return merge(con,{use:document(con.use),rank:document(con.rank)}))},{photo:document(Person.photo)},{address:document(Person.address)},{identifier:(for iden in IdentifierMaster filter iden._id in Person.identifier return merge(iden,{user:document(iden.user),Type:document(iden.Type)}))},{OrgID:document(Person.OrgID)},{orgType:document(Person.orgType)})"
|
|
29111
|
+
};
|
|
29112
|
+
} else {
|
|
29113
|
+
queryPayload = {
|
|
29114
|
+
"db_name": dbName$1,
|
|
29115
|
+
"entity": "Person",
|
|
29116
|
+
"filter": "(LIKE(document(Person.name)[0].given,'%".concat(search !== null && search !== void 0 ? search : '', "%',true) || LIKE(document(Person.telecom)[0].value,'%").concat(search !== null && search !== void 0 ? search : '', "%',true)) && Person.activestatus==true"),
|
|
29117
|
+
"limit": {
|
|
29118
|
+
"offset": page,
|
|
29119
|
+
"count": perPage
|
|
29120
|
+
},
|
|
29121
|
+
"sort": "Person.createddate",
|
|
29122
|
+
"return_fields": "merge(Person,{TotalCount:count(( FOR prs IN Person FILTER ( LIKE(document(prs.name)[0].given,'%".concat(search !== null && search !== void 0 ? search : '', "%',true) || LIKE(document(prs.telecom)[0].value,'%").concat(search !== null && search !== void 0 ? search : '', "%',true) ) && prs.activestatus==true return prs._id )), name:(for nam in HumanNameMaster filter nam._id in Person.name return merge(nam,{use:document(nam.use),suffix:document(nam.suffix),prefix:document(nam.prefix)}))},{gender:document(Person.gender)},{telecom:(for con in ContactPointMaster filter con._id in Person.telecom return merge(con,{use:document(con.use),rank:document(con.rank)}))},{photo:document(Person.photo)},{address:document(Person.address)},{identifier:(for iden in IdentifierMaster filter iden._id in Person.identifier return merge(iden,{user:document(iden.user),Type:document(iden.Type)}))},{OrgID:document(Person.OrgID)},{orgType:document(Person.orgType)})")
|
|
29123
|
+
};
|
|
29124
|
+
}
|
|
29125
|
+
|
|
29126
|
+
return queryPayload;
|
|
29110
29127
|
},
|
|
29111
29128
|
person_delete: function person_delete(data) {
|
|
29112
29129
|
var filter = {};
|
|
@@ -29342,6 +29359,10 @@ var PERSON_READ = createAsyncThunk("personSlice/person_read", /*#__PURE__*/_asyn
|
|
|
29342
29359
|
var payload,
|
|
29343
29360
|
_ref6,
|
|
29344
29361
|
rejectWithValue,
|
|
29362
|
+
withoutLimit,
|
|
29363
|
+
search,
|
|
29364
|
+
page,
|
|
29365
|
+
perPage,
|
|
29345
29366
|
readqueries,
|
|
29346
29367
|
data,
|
|
29347
29368
|
_args3 = arguments;
|
|
@@ -29353,31 +29374,32 @@ var PERSON_READ = createAsyncThunk("personSlice/person_read", /*#__PURE__*/_asyn
|
|
|
29353
29374
|
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
29354
29375
|
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
29355
29376
|
_context3.prev = 2;
|
|
29356
|
-
|
|
29357
|
-
|
|
29377
|
+
withoutLimit = payload.withoutLimit, search = payload.search, page = payload.page, perPage = payload.perPage;
|
|
29378
|
+
readqueries = queries$7.person_read(withoutLimit ? withoutLimit : false, search, page, perPage);
|
|
29379
|
+
_context3.next = 7;
|
|
29358
29380
|
return fetchData({
|
|
29359
29381
|
body: JSON.stringify(readqueries)
|
|
29360
29382
|
}, __readDocumentUrl__);
|
|
29361
29383
|
|
|
29362
|
-
case
|
|
29384
|
+
case 7:
|
|
29363
29385
|
data = _context3.sent;
|
|
29364
29386
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
29365
29387
|
data: data.result
|
|
29366
29388
|
}));
|
|
29367
29389
|
|
|
29368
|
-
case
|
|
29369
|
-
_context3.prev =
|
|
29390
|
+
case 11:
|
|
29391
|
+
_context3.prev = 11;
|
|
29370
29392
|
_context3.t0 = _context3["catch"](2);
|
|
29371
29393
|
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject.List), {}, {
|
|
29372
29394
|
message: _context3.t0.message
|
|
29373
29395
|
})));
|
|
29374
29396
|
|
|
29375
|
-
case
|
|
29397
|
+
case 14:
|
|
29376
29398
|
case "end":
|
|
29377
29399
|
return _context3.stop();
|
|
29378
29400
|
}
|
|
29379
29401
|
}
|
|
29380
|
-
}, _callee3, null, [[2,
|
|
29402
|
+
}, _callee3, null, [[2, 11]]);
|
|
29381
29403
|
}))); //single read person
|
|
29382
29404
|
|
|
29383
29405
|
var SINGLE_PERSON_READ = createAsyncThunk("personSlice/single_read_person", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|