primary_care_admin_binder 0.1.56 → 0.1.59
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 +689 -340
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8072,12 +8072,16 @@ var utcTOLocal = function utcTOLocal(date, format) {
|
|
|
8072
8072
|
};
|
|
8073
8073
|
|
|
8074
8074
|
var queries$n = {
|
|
8075
|
-
rolelist: function rolelist(type) {
|
|
8075
|
+
rolelist: function rolelist(type, page, perPage, search) {
|
|
8076
8076
|
return {
|
|
8077
8077
|
db_name: dbName$1,
|
|
8078
8078
|
entity: "CodeableConceptMaster",
|
|
8079
|
-
filter: "CodeableConceptMaster.Type=='".concat(type, "'"),
|
|
8080
|
-
|
|
8079
|
+
filter: "CodeableConceptMaster.Type=='".concat(type, "' && (like(document(CodeableConceptMaster.coding[0]).code,'%").concat(search, "%',true) || like(document(CodeableConceptMaster.coding[0]).shortdesc,'%").concat(search, "%',true) || like(document(CodeableConceptMaster.coding[0]).display,'%").concat(search, "%',true)) && CodeableConceptMaster.activestatus==true"),
|
|
8080
|
+
limit: {
|
|
8081
|
+
"offset": page,
|
|
8082
|
+
"count": perPage
|
|
8083
|
+
},
|
|
8084
|
+
return_fields: "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='".concat(type, "' RETURN cnt._key), coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"),
|
|
8081
8085
|
sort: "CodeableConceptMaster.createddate"
|
|
8082
8086
|
};
|
|
8083
8087
|
},
|
|
@@ -8138,7 +8142,22 @@ var queries$n = {
|
|
|
8138
8142
|
return_fields: "merge(Practitioner,{identifier:(for doc in IdentifierMaster filter doc._id in Practitioner.identifier return merge(doc,{period:(for cod in doc.period return document(cod))})),address:(for a in Practitioner.address return document(a)),communication:( FOR cod IN CodeableConceptMaster filter cod._id in Practitioner.communication RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),marital_status:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.marital_status RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),name:(for a in Practitioner.name return document(a)),nationality:(FOR cod IN SMGeographicMaster filter cod._id==Practitioner.nationality RETURN cod),photo:(for a in Practitioner.photo return document(a)),position:(for pt in CodeableConceptMaster filter pt._id==Practitioner.position return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),practitioner_type:(for pt in CodeableConceptMaster filter pt._id==Practitioner.practitioner_type return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),telecom:(for a in Practitioner.telecom return document(a)),job_experience:(for c in Practitioner.job_experience RETURN merge(c,{jobexperience_contact_details:(for con in c.jobexperience_contact_details return document(con)), jobexperience_address:(for add in c.jobexperience_address return document(add))})),training_details:(for c in Practitioner.training_details RETURN merge(c,{training_contact_details:(for con in c.training_contact_details return document(con)), training_address:(for add in c.training_address return document(add))})),practitioner_role:(for doc in PractitionerRole filter doc._id IN Practitioner.practitioner_role return MERGE(doc,{telecom:(for rol in ContactPointMaster filter rol._id in doc.telecom return rol),role:(for cod in CodeableConceptMaster filter cod._id==doc.role return merge(cod,{coding:(for code in CodingMaster filter code._id in cod.coding return code)})),period:(for per in periodMaster filter per._id in doc.period return per)})),gender:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.gender RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),employee_status:(for pt in CodeableConceptMaster filter pt._id==Practitioner.employee_status return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))}))})"
|
|
8139
8143
|
};
|
|
8140
8144
|
},
|
|
8141
|
-
practitioner_list:
|
|
8145
|
+
practitioner_list: function practitioner_list() {
|
|
8146
|
+
var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
8147
|
+
var perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
8148
|
+
var search = arguments.length > 2 ? arguments[2] : undefined;
|
|
8149
|
+
return {
|
|
8150
|
+
db_name: dbName$1,
|
|
8151
|
+
entity: "Practitioner",
|
|
8152
|
+
sort: "Practitioner.createddate",
|
|
8153
|
+
filter: "(like(document(first(Practitioner.name)).text,'%".concat(search, "%',true) || like(document(first(document(Practitioner.practitioner_type).coding)).display,'%").concat(search, "%',true) || like(document(document(document(Practitioner.practitioner_role[0]).SpecialtyID).coding[0]).display,'%").concat(search, "%',true)) && Practitioner.activestatus==true"),
|
|
8154
|
+
limit: {
|
|
8155
|
+
"offset": page,
|
|
8156
|
+
"count": perPage
|
|
8157
|
+
},
|
|
8158
|
+
return_fields: "{TotalCount:COUNT(FOR cnt IN Practitioner RETURN cnt._key), id:Practitioner.id,name:(FOR nam IN TO_ARRAY(Practitioner.name) RETURN DOCUMENT(nam).text)[0],type: (for t in CodeableConceptMaster filter t._id == Practitioner.practitioner_type return merge(t,{coding:(for cod in CodingMaster filter cod._id in t.coding return cod.display)})),_key:Practitioner._key,status:Practitioner.status,Practitionerrole:(for pr in PractitionerRole filter pr._id in Practitioner.practitioner_role && pr.primary_specialty==true return merge(pr,{SpecialtyID:(for spe in CodeableConceptMaster filter spe._id ==pr.SpecialtyID return merge(spe,{coding:(for cod in CodingMaster filter cod._id in spe.coding return cod.display)}))}))}"
|
|
8159
|
+
};
|
|
8160
|
+
},
|
|
8142
8161
|
status_update_practitioner: function status_update_practitioner(data) {
|
|
8143
8162
|
return [{
|
|
8144
8163
|
db_name: dbName$1,
|
|
@@ -8571,6 +8590,9 @@ var PRACTITIONER_ROLE_READ = createAsyncThunk("practitionerSlice/practitionerlis
|
|
|
8571
8590
|
_ref2,
|
|
8572
8591
|
rejectWithValue,
|
|
8573
8592
|
type,
|
|
8593
|
+
page,
|
|
8594
|
+
perPage,
|
|
8595
|
+
search,
|
|
8574
8596
|
data,
|
|
8575
8597
|
arry,
|
|
8576
8598
|
_args = arguments;
|
|
@@ -8582,10 +8604,10 @@ var PRACTITIONER_ROLE_READ = createAsyncThunk("practitionerSlice/practitionerlis
|
|
|
8582
8604
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
8583
8605
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
8584
8606
|
_context.prev = 2;
|
|
8585
|
-
type = payload.type;
|
|
8607
|
+
type = payload.type, page = payload.page, perPage = payload.perPage, search = payload.search;
|
|
8586
8608
|
_context.next = 6;
|
|
8587
8609
|
return fetchData({
|
|
8588
|
-
body: JSON.stringify(queries$n.rolelist(type))
|
|
8610
|
+
body: JSON.stringify(queries$n.rolelist(type, page, perPage, search ? search : ''))
|
|
8589
8611
|
}, __readDocumentUrl__);
|
|
8590
8612
|
|
|
8591
8613
|
case 6:
|
|
@@ -8596,6 +8618,7 @@ var PRACTITIONER_ROLE_READ = createAsyncThunk("practitionerSlice/practitionerlis
|
|
|
8596
8618
|
var _val$coding$0$_key;
|
|
8597
8619
|
|
|
8598
8620
|
arry.push({
|
|
8621
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
8599
8622
|
"code_type": val.coding[0].code,
|
|
8600
8623
|
"description": val.coding[0].display,
|
|
8601
8624
|
"coding_key": (_val$coding$0$_key = val.coding[0]._key) !== null && _val$coding$0$_key !== void 0 ? _val$coding$0$_key : null,
|
|
@@ -8676,7 +8699,8 @@ var PRACTITIONER_ROLE_UPSERT = createAsyncThunk("practitionerSlice/practitionerR
|
|
|
8676
8699
|
}, _callee2, null, [[2, 11]]);
|
|
8677
8700
|
})));
|
|
8678
8701
|
var PRACTITIONER_LIST_READ = createAsyncThunk("practitionerSlice/practitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
8679
|
-
var
|
|
8702
|
+
var payload,
|
|
8703
|
+
_ref6,
|
|
8680
8704
|
rejectWithValue,
|
|
8681
8705
|
data,
|
|
8682
8706
|
arry,
|
|
@@ -8686,11 +8710,12 @@ var PRACTITIONER_LIST_READ = createAsyncThunk("practitionerSlice/practitioner",
|
|
|
8686
8710
|
while (1) {
|
|
8687
8711
|
switch (_context3.prev = _context3.next) {
|
|
8688
8712
|
case 0:
|
|
8713
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
8689
8714
|
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
8690
8715
|
_context3.prev = 2;
|
|
8691
8716
|
_context3.next = 5;
|
|
8692
8717
|
return fetchData({
|
|
8693
|
-
body: queries$n.practitioner_list
|
|
8718
|
+
body: JSON.stringify(queries$n.practitioner_list(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
8694
8719
|
}, __readDocumentUrl__);
|
|
8695
8720
|
|
|
8696
8721
|
case 5:
|
|
@@ -8699,6 +8724,7 @@ var PRACTITIONER_LIST_READ = createAsyncThunk("practitionerSlice/practitioner",
|
|
|
8699
8724
|
data.result.map(function (val) {
|
|
8700
8725
|
// if(val.name){
|
|
8701
8726
|
arry.push({
|
|
8727
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
8702
8728
|
"name": val.name ? val.name : "-",
|
|
8703
8729
|
"primaryspeciality": val.Practitionerrole[0] && val.Practitionerrole[0].SpecialtyID[0] ? val.Practitionerrole[0].SpecialtyID[0].coding.join() : "-",
|
|
8704
8730
|
"type": val.type[0] ? val.type[0].coding.join() : "-",
|
|
@@ -10040,7 +10066,9 @@ var query$c = {
|
|
|
10040
10066
|
// "entity": "AgeRanges",
|
|
10041
10067
|
// "return_fields": "MERGE(AgeRanges, {AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )"
|
|
10042
10068
|
// }`,
|
|
10043
|
-
getAgeRange:
|
|
10069
|
+
getAgeRange: function getAgeRange(page, perPage, search) {
|
|
10070
|
+
return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"AgeRanges\",\n \"filter\": \"(LIKE(AgeRanges.agerangecode,'%").concat(search, "%',true) || LIKE(AgeRanges.longdesc,'%").concat(search, "%',true) || LIKE(AgeRanges.shortdesc,'%").concat(search, "%',true)) && AgeRanges.activestatus == true\",\n \"limit\" : { \"offset\" : ").concat(page, ", \"count\": ").concat(perPage, "},\n \"return_fields\": \"MERGE(AgeRanges, {TotalCount:COUNT(").concat(search ? "FOR cnt IN AgeRanges filter UPPER(cnt.agerangecode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN AgeRanges RETURN cnt._key", "), AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )\",\n \"sort\":\"AgeRanges.createddate\"\n }");
|
|
10071
|
+
}
|
|
10044
10072
|
};
|
|
10045
10073
|
|
|
10046
10074
|
var generateJson$c = function generateJson(data) {
|
|
@@ -10234,7 +10262,8 @@ var UNIT_UOM = createAsyncThunk("ageRangeMasterApiSlice/unit_uom_list", /*#__PUR
|
|
|
10234
10262
|
}, _callee3, null, [[2, 11]]);
|
|
10235
10263
|
})));
|
|
10236
10264
|
var GET_AGE_RANGE_MASTER = createAsyncThunk("ageRangeMasterApiSlice/age_range_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
10237
|
-
var
|
|
10265
|
+
var payload,
|
|
10266
|
+
_ref8,
|
|
10238
10267
|
rejectWithValue,
|
|
10239
10268
|
data,
|
|
10240
10269
|
_args4 = arguments;
|
|
@@ -10243,32 +10272,34 @@ var GET_AGE_RANGE_MASTER = createAsyncThunk("ageRangeMasterApiSlice/age_range_li
|
|
|
10243
10272
|
while (1) {
|
|
10244
10273
|
switch (_context4.prev = _context4.next) {
|
|
10245
10274
|
case 0:
|
|
10275
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
10246
10276
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
10247
|
-
|
|
10248
|
-
_context4.
|
|
10277
|
+
debugger;
|
|
10278
|
+
_context4.prev = 3;
|
|
10279
|
+
_context4.next = 6;
|
|
10249
10280
|
return fetchData({
|
|
10250
|
-
body: query$c.getAgeRange
|
|
10281
|
+
body: query$c.getAgeRange(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '')
|
|
10251
10282
|
}, __readDocumentUrl__);
|
|
10252
10283
|
|
|
10253
|
-
case
|
|
10284
|
+
case 6:
|
|
10254
10285
|
data = _context4.sent;
|
|
10255
10286
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
10256
10287
|
data: data.result
|
|
10257
10288
|
}));
|
|
10258
10289
|
|
|
10259
|
-
case
|
|
10260
|
-
_context4.prev =
|
|
10261
|
-
_context4.t0 = _context4["catch"](
|
|
10290
|
+
case 10:
|
|
10291
|
+
_context4.prev = 10;
|
|
10292
|
+
_context4.t0 = _context4["catch"](3);
|
|
10262
10293
|
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
10263
10294
|
message: _context4.t0.message
|
|
10264
10295
|
})));
|
|
10265
10296
|
|
|
10266
|
-
case
|
|
10297
|
+
case 13:
|
|
10267
10298
|
case "end":
|
|
10268
10299
|
return _context4.stop();
|
|
10269
10300
|
}
|
|
10270
10301
|
}
|
|
10271
|
-
}, _callee4, null, [[
|
|
10302
|
+
}, _callee4, null, [[3, 10]]);
|
|
10272
10303
|
})));
|
|
10273
10304
|
var ageRangeMasterSlice = createSlice({
|
|
10274
10305
|
name: "ageRangeMasterApiSlice",
|
|
@@ -10313,7 +10344,21 @@ var ageRangeMasterActions = {
|
|
|
10313
10344
|
var ageRangeMasterSlice$1 = ageRangeMasterSlice.reducer;
|
|
10314
10345
|
|
|
10315
10346
|
var query$b = {
|
|
10316
|
-
getList:
|
|
10347
|
+
getList: function getList(page, perPage, search) {
|
|
10348
|
+
return {
|
|
10349
|
+
db_name: dbName$1,
|
|
10350
|
+
entity: "VitalsMeasureCodes",
|
|
10351
|
+
sort: "VitalsMeasureCodes.createddate",
|
|
10352
|
+
limit: {
|
|
10353
|
+
offset: page,
|
|
10354
|
+
count: perPage
|
|
10355
|
+
},
|
|
10356
|
+
filter: {
|
|
10357
|
+
"VitalsMeasureCodes": "VitalsMeasureCodes.activestatus==true ".concat(search ? "&& UPPER(VitalsMeasureCodes.ObsValMeasCode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(VitalsMeasureCodes.ResourceType.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(VitalsMeasureCodes.ResourceRole.shortdesc) LIKE '%").concat(search.toUpperCase(), "%'") : "")
|
|
10358
|
+
},
|
|
10359
|
+
return_fields: "MERGE(VitalsMeasureCodes, {TotalCount: count(FOR cnt IN VitalsMeasureCodes FILTER (LIKE(cnt.ObsValMeasCode,'%".concat(search, "%',true) || LIKE(cnt.VitalsMeasureCodes.ResourceType.longdesc,'%").concat(search, "%',true) || LIKE(cnt.VitalsMeasureCodes.ResourceRole.shortdesc,'%").concat(search, "%',true)) && cnt.activestatus==true return cnt._key)})")
|
|
10360
|
+
};
|
|
10361
|
+
}
|
|
10317
10362
|
};
|
|
10318
10363
|
|
|
10319
10364
|
var generateJson$b = function generateJson(data) {
|
|
@@ -10344,8 +10389,10 @@ var generateJson$b = function generateJson(data) {
|
|
|
10344
10389
|
|
|
10345
10390
|
var _extraReducers$H;
|
|
10346
10391
|
var GET_VITALS_MEASURE_CODE = createAsyncThunk("measureCodeApiSlice/age_range_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
10347
|
-
var
|
|
10392
|
+
var payload,
|
|
10393
|
+
_ref2,
|
|
10348
10394
|
rejectWithValue,
|
|
10395
|
+
search,
|
|
10349
10396
|
data,
|
|
10350
10397
|
TableData,
|
|
10351
10398
|
_args = arguments;
|
|
@@ -10354,14 +10401,16 @@ var GET_VITALS_MEASURE_CODE = createAsyncThunk("measureCodeApiSlice/age_range_li
|
|
|
10354
10401
|
while (1) {
|
|
10355
10402
|
switch (_context.prev = _context.next) {
|
|
10356
10403
|
case 0:
|
|
10404
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
10357
10405
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
10358
10406
|
_context.prev = 2;
|
|
10359
|
-
|
|
10407
|
+
search = payload.search;
|
|
10408
|
+
_context.next = 6;
|
|
10360
10409
|
return fetchData({
|
|
10361
|
-
body: query$b.getList
|
|
10410
|
+
body: JSON.stringify(query$b.getList(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, search ? search : ''))
|
|
10362
10411
|
}, __readDocumentUrl__);
|
|
10363
10412
|
|
|
10364
|
-
case
|
|
10413
|
+
case 6:
|
|
10365
10414
|
data = _context.sent;
|
|
10366
10415
|
TableData = data.result.sort(function (a, b) {
|
|
10367
10416
|
return (a === null || a === void 0 ? void 0 : a.createddate) - (b === null || b === void 0 ? void 0 : b.createddate);
|
|
@@ -10370,19 +10419,19 @@ var GET_VITALS_MEASURE_CODE = createAsyncThunk("measureCodeApiSlice/age_range_li
|
|
|
10370
10419
|
data: TableData
|
|
10371
10420
|
}));
|
|
10372
10421
|
|
|
10373
|
-
case
|
|
10374
|
-
_context.prev =
|
|
10422
|
+
case 11:
|
|
10423
|
+
_context.prev = 11;
|
|
10375
10424
|
_context.t0 = _context["catch"](2);
|
|
10376
10425
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
10377
10426
|
message: _context.t0.message
|
|
10378
10427
|
})));
|
|
10379
10428
|
|
|
10380
|
-
case
|
|
10429
|
+
case 14:
|
|
10381
10430
|
case "end":
|
|
10382
10431
|
return _context.stop();
|
|
10383
10432
|
}
|
|
10384
10433
|
}
|
|
10385
|
-
}, _callee, null, [[2,
|
|
10434
|
+
}, _callee, null, [[2, 11]]);
|
|
10386
10435
|
})));
|
|
10387
10436
|
var UPSERT_MEASURE_CODE = createAsyncThunk("measureCodeApiSlice/save_measure_code", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
10388
10437
|
var payload,
|
|
@@ -10560,7 +10609,19 @@ var query$a = {
|
|
|
10560
10609
|
return_fields: "DOCUMENT( AgeRanges.AgeCategory)"
|
|
10561
10610
|
};
|
|
10562
10611
|
},
|
|
10563
|
-
VitalApplicableRead:
|
|
10612
|
+
VitalApplicableRead: function VitalApplicableRead(page, perPage, search) {
|
|
10613
|
+
return {
|
|
10614
|
+
db_name: dbName$1,
|
|
10615
|
+
entity: "VitalsApplbyPatAtrrib",
|
|
10616
|
+
sort: "VitalsApplbyPatAtrrib.createddate",
|
|
10617
|
+
filter: "VitalsApplbyPatAtrrib.activestatus==true ".concat(search ? "&& UPPER(VitalsApplbyPatAtrrib.spltycode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(VitalsApplbyPatAtrrib.diagcode.icdname) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
10618
|
+
limit: {
|
|
10619
|
+
offset: page,
|
|
10620
|
+
count: perPage
|
|
10621
|
+
},
|
|
10622
|
+
return_fields: "merge(VitalsApplbyPatAtrrib,{TotalCount:COUNT(".concat(search ? "FOR cnt IN VitalsApplbyPatAtrrib filter UPPER(cnt.spltycode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.diagcode.icdname) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN VitalsApplbyPatAtrrib RETURN cnt._key", "),organization_id:(document(VitalsApplbyPatAtrrib.organization_id)),gender:(FOR cod IN CodeableConceptMaster filter cod._id==VitalsApplbyPatAtrrib.gender RETURN MERGE(cod,{coding:(FOR d IN TO_ARRAY(cod.coding) RETURN DOCUMENT(d).display)})),spltycode:(FOR cod IN CodeableConceptMaster filter cod._id==VitalsApplbyPatAtrrib.spltycode RETURN MERGE(cod,{coding:(FOR d IN TO_ARRAY(cod.coding) RETURN DOCUMENT(d))})),diagcode:(document(VitalsApplbyPatAtrrib.diagcode)),agecategorycode:(document(VitalsApplbyPatAtrrib.agecategorycode)),agerangecode:(document(VitalsApplbyPatAtrrib.agerangecode)),orgEntityType:(document(VitalsApplbyPatAtrrib.orgEntityType))})")
|
|
10623
|
+
};
|
|
10624
|
+
},
|
|
10564
10625
|
editVitalApplicable: function editVitalApplicable(id) {
|
|
10565
10626
|
return {
|
|
10566
10627
|
db_name: dbName$1,
|
|
@@ -10637,6 +10698,7 @@ var generateApplicableResJson = function generateApplicableResJson(data, state)
|
|
|
10637
10698
|
});
|
|
10638
10699
|
var list = TableData.map(function (val) {
|
|
10639
10700
|
return {
|
|
10701
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
10640
10702
|
specialCode: val.spltycode.length > 0 ? val.spltycode[0].coding[0].display : "",
|
|
10641
10703
|
diagnosisGroup: GetDiagnosis(val.diagcode),
|
|
10642
10704
|
gender: val.gender.length > 0 ? val.gender[0].coding[0] : "",
|
|
@@ -11207,9 +11269,11 @@ var SAVE_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/savevitala
|
|
|
11207
11269
|
}, _callee10, null, [[2, 11]]);
|
|
11208
11270
|
})));
|
|
11209
11271
|
var READ_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/vitalsapplicableread", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
11210
|
-
var
|
|
11272
|
+
var payload,
|
|
11273
|
+
_ref22,
|
|
11211
11274
|
rejectWithValue,
|
|
11212
11275
|
getState,
|
|
11276
|
+
search,
|
|
11213
11277
|
data,
|
|
11214
11278
|
res,
|
|
11215
11279
|
_args11 = arguments;
|
|
@@ -11218,38 +11282,40 @@ var READ_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/vitalsappl
|
|
|
11218
11282
|
while (1) {
|
|
11219
11283
|
switch (_context11.prev = _context11.next) {
|
|
11220
11284
|
case 0:
|
|
11285
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
11221
11286
|
_ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue, getState = _ref22.getState;
|
|
11222
11287
|
_context11.prev = 2;
|
|
11288
|
+
search = payload.search;
|
|
11223
11289
|
getState();
|
|
11224
11290
|
// { body: query.diagnosis },
|
|
11225
11291
|
// __readDocumentUrl__
|
|
11226
11292
|
// );
|
|
11227
11293
|
|
|
11228
|
-
_context11.next =
|
|
11294
|
+
_context11.next = 8;
|
|
11229
11295
|
return fetchData({
|
|
11230
|
-
body: query$a.VitalApplicableRead
|
|
11296
|
+
body: JSON.stringify(query$a.VitalApplicableRead(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, search))
|
|
11231
11297
|
}, __readDocumentUrl__);
|
|
11232
11298
|
|
|
11233
|
-
case
|
|
11299
|
+
case 8:
|
|
11234
11300
|
data = _context11.sent;
|
|
11235
11301
|
res = generateApplicableResJson(data.result);
|
|
11236
11302
|
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
11237
11303
|
data: res
|
|
11238
11304
|
}));
|
|
11239
11305
|
|
|
11240
|
-
case
|
|
11241
|
-
_context11.prev =
|
|
11306
|
+
case 13:
|
|
11307
|
+
_context11.prev = 13;
|
|
11242
11308
|
_context11.t0 = _context11["catch"](2);
|
|
11243
11309
|
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
11244
11310
|
message: _context11.t0.message
|
|
11245
11311
|
})));
|
|
11246
11312
|
|
|
11247
|
-
case
|
|
11313
|
+
case 16:
|
|
11248
11314
|
case "end":
|
|
11249
11315
|
return _context11.stop();
|
|
11250
11316
|
}
|
|
11251
11317
|
}
|
|
11252
|
-
}, _callee11, null, [[2,
|
|
11318
|
+
}, _callee11, null, [[2, 13]]);
|
|
11253
11319
|
})));
|
|
11254
11320
|
var UPDATE_VITAL_APPLICABLE_STATUS = createAsyncThunk("vitalApplicableApiSlice/vitalsApplicableUpdate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
11255
11321
|
var payload,
|
|
@@ -11547,7 +11613,19 @@ var query$9 = {
|
|
|
11547
11613
|
return_fields: "VitalsMeasureCodes"
|
|
11548
11614
|
};
|
|
11549
11615
|
},
|
|
11550
|
-
VitalRead:
|
|
11616
|
+
VitalRead: function VitalRead(page, perPage, search) {
|
|
11617
|
+
return {
|
|
11618
|
+
db_name: dbName$1,
|
|
11619
|
+
entity: "VitalsCodes",
|
|
11620
|
+
sort: "VitalsCodes.createddate",
|
|
11621
|
+
filter: "VitalsCodes.activestatus==true ".concat(search ? "&& UPPER(VitalsCodes.vitalscode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(VitalsCodes.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(VitalsCodes.shortdesc) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
11622
|
+
limit: {
|
|
11623
|
+
offset: page,
|
|
11624
|
+
count: perPage
|
|
11625
|
+
},
|
|
11626
|
+
return_fields: "MERGE(VitalsCodes,{TotalCount:COUNT(".concat(search ? "FOR cnt IN VitalsCodes filter UPPER(cnt.vitalscode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN VitalsCodes RETURN cnt._key", "), VitalsCodesReferenceRanges:(FOR cod IN VitalsCodes.VitalsCodesReferenceRanges RETURN DOCUMENT(cod))})")
|
|
11627
|
+
};
|
|
11628
|
+
},
|
|
11551
11629
|
deleteVitalMaster: function deleteVitalMaster(id) {
|
|
11552
11630
|
return {
|
|
11553
11631
|
db_name: dbName$1,
|
|
@@ -12089,8 +12167,10 @@ var SAVE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/savevitalm
|
|
|
12089
12167
|
}, _callee7, null, [[2, 11]]);
|
|
12090
12168
|
})));
|
|
12091
12169
|
var READ_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMasterread", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
12092
|
-
var
|
|
12170
|
+
var payload,
|
|
12171
|
+
_ref16,
|
|
12093
12172
|
rejectWithValue,
|
|
12173
|
+
search,
|
|
12094
12174
|
data,
|
|
12095
12175
|
res,
|
|
12096
12176
|
_args8 = arguments;
|
|
@@ -12099,33 +12179,37 @@ var READ_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMast
|
|
|
12099
12179
|
while (1) {
|
|
12100
12180
|
switch (_context8.prev = _context8.next) {
|
|
12101
12181
|
case 0:
|
|
12182
|
+
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
12102
12183
|
_ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
|
|
12103
12184
|
_context8.prev = 2;
|
|
12104
|
-
|
|
12185
|
+
search = payload.search; // let state = getState();
|
|
12186
|
+
// let ccState = state.DiagnosisMasterSlice;
|
|
12187
|
+
|
|
12188
|
+
_context8.next = 6;
|
|
12105
12189
|
return fetchData({
|
|
12106
|
-
body: query$9.VitalRead
|
|
12190
|
+
body: JSON.stringify(query$9.VitalRead(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, search))
|
|
12107
12191
|
}, __readDocumentUrl__);
|
|
12108
12192
|
|
|
12109
|
-
case
|
|
12193
|
+
case 6:
|
|
12110
12194
|
data = _context8.sent;
|
|
12111
12195
|
res = generateResJson$1(data.result);
|
|
12112
12196
|
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12113
12197
|
data: res
|
|
12114
12198
|
}));
|
|
12115
12199
|
|
|
12116
|
-
case
|
|
12117
|
-
_context8.prev =
|
|
12200
|
+
case 11:
|
|
12201
|
+
_context8.prev = 11;
|
|
12118
12202
|
_context8.t0 = _context8["catch"](2);
|
|
12119
12203
|
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12120
12204
|
message: _context8.t0.message
|
|
12121
12205
|
})));
|
|
12122
12206
|
|
|
12123
|
-
case
|
|
12207
|
+
case 14:
|
|
12124
12208
|
case "end":
|
|
12125
12209
|
return _context8.stop();
|
|
12126
12210
|
}
|
|
12127
12211
|
}
|
|
12128
|
-
}, _callee8, null, [[2,
|
|
12212
|
+
}, _callee8, null, [[2, 11]]);
|
|
12129
12213
|
})));
|
|
12130
12214
|
var UPDATE_VITAL_MASTER_STATUS = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMasterUpdate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
12131
12215
|
var payload,
|
|
@@ -12374,13 +12458,20 @@ var queries$m = {
|
|
|
12374
12458
|
// "LocationMaster,LocationMaster_CodeableConceptMaster_E,CodeableConceptMaster_CodingMaster_E,LocationMaster_LocationRoleType_E,LocationMaster_Organization_E,Organization_CodeableConceptMaster_E,LocationMaster_ContactPointMaster_E,LocationMaster_AddressMaster_E,LocationMaster_AttachmentMaster_E",
|
|
12375
12459
|
// filter: "LocationMaster.activestatus==true",
|
|
12376
12460
|
// isTraversal: "true",
|
|
12377
|
-
// sort: "LocationMaster.createddate",
|
|
12461
|
+
// sort: "LocationMaster.createddate",
|
|
12378
12462
|
// return_fields: "{vertices:v,orginatedata:LocationMaster}",
|
|
12379
12463
|
// };
|
|
12380
12464
|
return {
|
|
12381
12465
|
db_name: dbName$1,
|
|
12382
12466
|
entity: "LocationMaster",
|
|
12383
|
-
|
|
12467
|
+
limit: {
|
|
12468
|
+
"offset": page,
|
|
12469
|
+
"count": perPage
|
|
12470
|
+
},
|
|
12471
|
+
filter: "LocationMaster.activestatus==true",
|
|
12472
|
+
return_fields: "merge(LocationMaster,{TotalCount:COUNT(FOR cnt IN LocationMaster RETURN cnt._key) , operationalStatus:(for ops in CodeableConceptMaster filter ops._id==LocationMaster.operationalStatus return merge(ops,{coding:document(ops.coding)}))},{managingOrgEntityType:(for moe in CodeableConceptMaster filter moe._id==LocationMaster.managingOrgEntityType return merge(moe,{coding:document(moe.coding)}))}, {parentLocationID_desc:document(to_array(LocationMaster.parentLocationID_desc))},{address:document(LocationMaster.address)},{locationType:(for lt in CodeableConceptMaster filter lt._id==LocationMaster.locationType return (merge(lt,{coding:document(lt.coding)})))},{managingOrgID:document(to_array(LocationMaster.managingOrgID))},{locationRoletype:document(to_array(LocationMaster.locationRoletype))},{specialty:document(to_array(LocationMaster.specialty))},{photo:document(LocationMaster.photo)}, {pharmacy:(for ph in LocationMaster.pharmacy return merge(ph,{inventorySubStore:document(ph.inventorySubStore)}))}, {telecom:(for tel in document(LocationMaster.telecom) return merge(tel,{use:document(tel.use)},{rank:document(tel.rank)},{system:document(tel.system)}))})" // return_fields: "merge(keep(LocationMaster,'locationID','_key','_id','id','activestatus','status','longdesc','shortdesc'),{locationType:(for cod in document(to_array(LocationMaster.locationType)) return merge(cod,{coding:document(cod.coding)}))})"
|
|
12473
|
+
// return_fields: "merge(LocationMaster,{operationalStatus:(for ops in CodeableConceptMaster filter ops._id==LocationMaster.operationalStatus return merge(ops,{coding:document(ops.coding)}))},{managingOrgEntityType:(for moe in CodeableConceptMaster filter moe._id==LocationMaster.managingOrgEntityType return merge(moe,{coding:document(moe.coding)}))}, {parentLocationID_desc:document(to_array(LocationMaster.parentLocationID_desc))},{address:document(LocationMaster.address)},{locationType:(for lt in CodeableConceptMaster filter lt._id==LocationMaster.locationType return (merge(lt,{coding:document(lt.coding)})))},{managingOrgID:document(to_array(LocationMaster.managingOrgID))},{locationRoletype:document(to_array(LocationMaster.locationRoletype))},{specialty:document(to_array(LocationMaster.specialty))},{photo:document(LocationMaster.photo)}, {pharmacy:(for ph in LocationMaster.pharmacy return merge(ph,{inventorySubStore:document(ph.inventorySubStore)}))}, {telecom:(for tel in document(LocationMaster.telecom) return merge(tel,{use:document(tel.use)},{rank:document(tel.rank)},{system:document(tel.system)}))})"
|
|
12474
|
+
|
|
12384
12475
|
};
|
|
12385
12476
|
},
|
|
12386
12477
|
locationlistupsert: function locationlistupsert(data) {
|
|
@@ -12698,6 +12789,8 @@ var LOCATION_READ = createAsyncThunk("locationSlice/locationlist", /*#__PURE__*/
|
|
|
12698
12789
|
_ref2,
|
|
12699
12790
|
rejectWithValue,
|
|
12700
12791
|
type,
|
|
12792
|
+
page,
|
|
12793
|
+
perPage,
|
|
12701
12794
|
data,
|
|
12702
12795
|
arry,
|
|
12703
12796
|
_args = arguments;
|
|
@@ -12709,27 +12802,29 @@ var LOCATION_READ = createAsyncThunk("locationSlice/locationlist", /*#__PURE__*/
|
|
|
12709
12802
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
12710
12803
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
12711
12804
|
_context.prev = 2;
|
|
12712
|
-
type = payload.type;
|
|
12805
|
+
type = payload.type, page = payload.page, perPage = payload.perPage;
|
|
12713
12806
|
_context.next = 6;
|
|
12714
12807
|
return fetchData({
|
|
12715
|
-
body: JSON.stringify(queries$m.locationlist(type))
|
|
12808
|
+
body: JSON.stringify(queries$m.locationlist(type, page, perPage))
|
|
12716
12809
|
}, __readDocumentUrl__);
|
|
12717
12810
|
|
|
12718
12811
|
case 6:
|
|
12719
12812
|
data = _context.sent;
|
|
12813
|
+
debugger;
|
|
12720
12814
|
arry = [];
|
|
12721
|
-
|
|
12815
|
+
console.log("data", data.result);
|
|
12816
|
+
_context.next = 12;
|
|
12722
12817
|
return data.result.map(function (val) {
|
|
12723
12818
|
if (val.locationID) {
|
|
12724
|
-
var _val$locationType, _val$locationType$, _val$
|
|
12819
|
+
var _val$locationType, _val$locationType$, _val$locationType2, _val$locationType2$, _val$locationType2$$c, _val$locationType2$$c2, _val$locationType3, _val$locationType3$, _val$locationType4, _val$locationType4$, _val$locationType4$$c, _val$locationType4$$c2, _val$locationType5, _val$locationType5$, _val$locationType5$$c, _val$locationType5$$c2, _val$locationType6, _val$locationType6$, _val$locationType6$$c, _val$locationType6$$c2, _val$locationType7, _val$locationType7$, _val$locationType7$$c, _val$locationType7$$c2, _val$locationType8, _val$locationType8$, _val$locationType8$$c, _val$locationType8$$c2;
|
|
12725
12820
|
|
|
12726
12821
|
arry.push({
|
|
12727
12822
|
location_id: val.locationID,
|
|
12728
|
-
location_type: ((_val$locationType = val.locationType) === null || _val$locationType === void 0 ? void 0 : (_val$locationType$ = _val$locationType[0]) === null || _val$locationType$ === void 0 ? void 0 : (_val$locationType$$
|
|
12729
|
-
location_type_code: (_val$
|
|
12730
|
-
location_type_name: (_val$
|
|
12731
|
-
location_type_id: (_val$
|
|
12732
|
-
location_type_key: (_val$
|
|
12823
|
+
location_type: val.locationType.length > 0 ? (((_val$locationType = val.locationType) === null || _val$locationType === void 0 ? void 0 : (_val$locationType$ = _val$locationType[0]) === null || _val$locationType$ === void 0 ? void 0 : _val$locationType$.coding) !== null ? (_val$locationType2 = val.locationType) === null || _val$locationType2 === void 0 ? void 0 : (_val$locationType2$ = _val$locationType2[0]) === null || _val$locationType2$ === void 0 ? void 0 : (_val$locationType2$$c = _val$locationType2$.coding) === null || _val$locationType2$$c === void 0 ? void 0 : (_val$locationType2$$c2 = _val$locationType2$$c[0]) === null || _val$locationType2$$c2 === void 0 ? void 0 : _val$locationType2$$c2.code : "") + " - " + (((_val$locationType3 = val.locationType) === null || _val$locationType3 === void 0 ? void 0 : (_val$locationType3$ = _val$locationType3[0]) === null || _val$locationType3$ === void 0 ? void 0 : _val$locationType3$.coding) !== null ? (_val$locationType4 = val.locationType) === null || _val$locationType4 === void 0 ? void 0 : (_val$locationType4$ = _val$locationType4[0]) === null || _val$locationType4$ === void 0 ? void 0 : (_val$locationType4$$c = _val$locationType4$.coding) === null || _val$locationType4$$c === void 0 ? void 0 : (_val$locationType4$$c2 = _val$locationType4$$c[0]) === null || _val$locationType4$$c2 === void 0 ? void 0 : _val$locationType4$$c2.Type : "") : "-",
|
|
12824
|
+
location_type_code: (_val$locationType5 = val.locationType) === null || _val$locationType5 === void 0 ? void 0 : (_val$locationType5$ = _val$locationType5[0]) === null || _val$locationType5$ === void 0 ? void 0 : (_val$locationType5$$c = _val$locationType5$.coding) === null || _val$locationType5$$c === void 0 ? void 0 : (_val$locationType5$$c2 = _val$locationType5$$c[0]) === null || _val$locationType5$$c2 === void 0 ? void 0 : _val$locationType5$$c2.code,
|
|
12825
|
+
location_type_name: (_val$locationType6 = val.locationType) === null || _val$locationType6 === void 0 ? void 0 : (_val$locationType6$ = _val$locationType6[0]) === null || _val$locationType6$ === void 0 ? void 0 : (_val$locationType6$$c = _val$locationType6$.coding) === null || _val$locationType6$$c === void 0 ? void 0 : (_val$locationType6$$c2 = _val$locationType6$$c[0]) === null || _val$locationType6$$c2 === void 0 ? void 0 : _val$locationType6$$c2.Type,
|
|
12826
|
+
location_type_id: (_val$locationType7 = val.locationType) === null || _val$locationType7 === void 0 ? void 0 : (_val$locationType7$ = _val$locationType7[0]) === null || _val$locationType7$ === void 0 ? void 0 : (_val$locationType7$$c = _val$locationType7$.coding) === null || _val$locationType7$$c === void 0 ? void 0 : (_val$locationType7$$c2 = _val$locationType7$$c[0]) === null || _val$locationType7$$c2 === void 0 ? void 0 : _val$locationType7$$c2._id,
|
|
12827
|
+
location_type_key: (_val$locationType8 = val.locationType) === null || _val$locationType8 === void 0 ? void 0 : (_val$locationType8$ = _val$locationType8[0]) === null || _val$locationType8$ === void 0 ? void 0 : (_val$locationType8$$c = _val$locationType8$.coding) === null || _val$locationType8$$c === void 0 ? void 0 : (_val$locationType8$$c2 = _val$locationType8$$c[0]) === null || _val$locationType8$$c2 === void 0 ? void 0 : _val$locationType8$$c2._key,
|
|
12733
12828
|
long_description: val.longdesc,
|
|
12734
12829
|
short_description: val.shortdesc,
|
|
12735
12830
|
_key: val._key,
|
|
@@ -12741,24 +12836,24 @@ var LOCATION_READ = createAsyncThunk("locationSlice/locationlist", /*#__PURE__*/
|
|
|
12741
12836
|
}
|
|
12742
12837
|
});
|
|
12743
12838
|
|
|
12744
|
-
case
|
|
12839
|
+
case 12:
|
|
12745
12840
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12746
12841
|
data: arry
|
|
12747
12842
|
}));
|
|
12748
12843
|
|
|
12749
|
-
case
|
|
12750
|
-
_context.prev =
|
|
12844
|
+
case 15:
|
|
12845
|
+
_context.prev = 15;
|
|
12751
12846
|
_context.t0 = _context["catch"](2);
|
|
12752
12847
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12753
12848
|
message: _context.t0.message
|
|
12754
12849
|
})));
|
|
12755
12850
|
|
|
12756
|
-
case
|
|
12851
|
+
case 18:
|
|
12757
12852
|
case "end":
|
|
12758
12853
|
return _context.stop();
|
|
12759
12854
|
}
|
|
12760
12855
|
}
|
|
12761
|
-
}, _callee, null, [[2,
|
|
12856
|
+
}, _callee, null, [[2, 15]]);
|
|
12762
12857
|
})));
|
|
12763
12858
|
var LOCATION_LIST_UPSERT = createAsyncThunk("locationSlice/locationlistupsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
12764
12859
|
var payload,
|
|
@@ -12825,32 +12920,33 @@ var LOCATION_MASTER_INSERT = createAsyncThunk("locationApiSlice/locationinsert",
|
|
|
12825
12920
|
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
12826
12921
|
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
12827
12922
|
_context3.prev = 2;
|
|
12923
|
+
debugger;
|
|
12828
12924
|
data = payload.data, _key = payload._key;
|
|
12829
12925
|
queriesjson = generateJSON(data, _key);
|
|
12830
|
-
_context3.next =
|
|
12926
|
+
_context3.next = 8;
|
|
12831
12927
|
return fetchData({
|
|
12832
12928
|
body: JSON.stringify(queriesjson)
|
|
12833
12929
|
}, __uspsertUrl__);
|
|
12834
12930
|
|
|
12835
|
-
case
|
|
12931
|
+
case 8:
|
|
12836
12932
|
dataRes = _context3.sent;
|
|
12837
12933
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12838
12934
|
data: dataRes
|
|
12839
12935
|
}));
|
|
12840
12936
|
|
|
12841
|
-
case
|
|
12842
|
-
_context3.prev =
|
|
12937
|
+
case 12:
|
|
12938
|
+
_context3.prev = 12;
|
|
12843
12939
|
_context3.t0 = _context3["catch"](2);
|
|
12844
12940
|
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12845
12941
|
message: _context3.t0.message
|
|
12846
12942
|
})));
|
|
12847
12943
|
|
|
12848
|
-
case
|
|
12944
|
+
case 15:
|
|
12849
12945
|
case "end":
|
|
12850
12946
|
return _context3.stop();
|
|
12851
12947
|
}
|
|
12852
12948
|
}
|
|
12853
|
-
}, _callee3, null, [[2,
|
|
12949
|
+
}, _callee3, null, [[2, 12]]);
|
|
12854
12950
|
})));
|
|
12855
12951
|
var locationSlice = createSlice({
|
|
12856
12952
|
name: "locationApiSlice",
|
|
@@ -14095,13 +14191,17 @@ var locationMasterSlice$1 = locationMasterSlice.reducer;
|
|
|
14095
14191
|
|
|
14096
14192
|
// import { dbName } from "../../qdm_query_ids";
|
|
14097
14193
|
var queries$l = {
|
|
14098
|
-
fullread: function fullread(
|
|
14194
|
+
fullread: function fullread(page, perPage, search) {
|
|
14099
14195
|
return {
|
|
14100
14196
|
db_name: dbName$1,
|
|
14101
14197
|
entity: "OrderType",
|
|
14102
14198
|
sort: "OrderType.createddate",
|
|
14103
|
-
filter: "OrderType.activestatus == true",
|
|
14104
|
-
|
|
14199
|
+
filter: "(LIKE(OrderType.ordertype,'%".concat(search, "%',true) || LIKE(OrderType.shortdesc,'%").concat(search, "%',true) || LIKE(OrderType.longdesc,'%").concat(search, "%',true) ) && OrderType.activestatus == true"),
|
|
14200
|
+
limit: {
|
|
14201
|
+
offset: page,
|
|
14202
|
+
count: perPage
|
|
14203
|
+
},
|
|
14204
|
+
return_fields: "MERGE(OrderType,{TotalCount:COUNT(FOR cnt IN OrderType RETURN cnt._key),ordercategory:(DOCUMENT(OrderType.ordercategory))})"
|
|
14105
14205
|
};
|
|
14106
14206
|
},
|
|
14107
14207
|
OrderCategory: function OrderCategory() {
|
|
@@ -14176,7 +14276,8 @@ var queries$l = {
|
|
|
14176
14276
|
|
|
14177
14277
|
var _extraReducers$C;
|
|
14178
14278
|
var ORDERTYPEREAD = createAsyncThunk("ordertypeSlice/ordertypeRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
14179
|
-
var
|
|
14279
|
+
var payload,
|
|
14280
|
+
_ref2,
|
|
14180
14281
|
rejectWithValue,
|
|
14181
14282
|
queriesjson,
|
|
14182
14283
|
data,
|
|
@@ -14187,9 +14288,10 @@ var ORDERTYPEREAD = createAsyncThunk("ordertypeSlice/ordertypeRead", /*#__PURE__
|
|
|
14187
14288
|
while (1) {
|
|
14188
14289
|
switch (_context.prev = _context.next) {
|
|
14189
14290
|
case 0:
|
|
14291
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
14190
14292
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
14191
14293
|
_context.prev = 2;
|
|
14192
|
-
queriesjson = queries$l.fullread();
|
|
14294
|
+
queriesjson = queries$l.fullread(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '');
|
|
14193
14295
|
_context.next = 6;
|
|
14194
14296
|
return fetchData({
|
|
14195
14297
|
body: JSON.stringify(queriesjson)
|
|
@@ -14205,6 +14307,7 @@ var ORDERTYPEREAD = createAsyncThunk("ordertypeSlice/ordertypeRead", /*#__PURE__
|
|
|
14205
14307
|
var _val$ordercategory3, _val$ordercategory4, _val$ordercategory5, _val$ordercategory6;
|
|
14206
14308
|
|
|
14207
14309
|
arry.push({
|
|
14310
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
14208
14311
|
code: val === null || val === void 0 ? void 0 : (_val$ordercategory3 = val.ordercategory) === null || _val$ordercategory3 === void 0 ? void 0 : _val$ordercategory3.ordercategory,
|
|
14209
14312
|
"short": val === null || val === void 0 ? void 0 : val.shortdesc,
|
|
14210
14313
|
"long": val === null || val === void 0 ? void 0 : val.longdesc,
|
|
@@ -14467,13 +14570,18 @@ var ordertypeSlice$1 = ordertypeSlice.reducer;
|
|
|
14467
14570
|
|
|
14468
14571
|
// import { dbName } from "../../qdm_query_ids";
|
|
14469
14572
|
var queries$k = {
|
|
14470
|
-
fullread: function fullread(
|
|
14573
|
+
fullread: function fullread(page, perPage, search) {
|
|
14574
|
+
debugger;
|
|
14471
14575
|
return {
|
|
14472
14576
|
db_name: dbName$1,
|
|
14473
14577
|
entity: "CodeableConceptMaster",
|
|
14474
14578
|
sort: "CodeableConceptMaster.createddate",
|
|
14475
|
-
filter: "CodeableConceptMaster.
|
|
14476
|
-
|
|
14579
|
+
filter: "CodeableConceptMaster.Type == 'ORDERNATURE' && (LIKE(CodeableConceptMaster.shortdesc,'%".concat(search, "%',true)|| LIKE(CodeableConceptMaster.longdesc,'%").concat(search, "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true"),
|
|
14580
|
+
limit: {
|
|
14581
|
+
offset: page,
|
|
14582
|
+
count: perPage
|
|
14583
|
+
},
|
|
14584
|
+
return_fields: "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.activestatus==true && cnt.Type=='ORDERNATURE' RETURN cnt._key), coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
|
|
14477
14585
|
};
|
|
14478
14586
|
},
|
|
14479
14587
|
Insert: function Insert(data) {
|
|
@@ -14545,22 +14653,22 @@ var queries$k = {
|
|
|
14545
14653
|
// },
|
|
14546
14654
|
// ];
|
|
14547
14655
|
return [{
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
|
|
14559
|
-
|
|
14560
|
-
|
|
14656
|
+
db_name: dbName$1,
|
|
14657
|
+
entity: "CodingMaster",
|
|
14658
|
+
is_metadata: true,
|
|
14659
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
14660
|
+
doc: {
|
|
14661
|
+
system: "",
|
|
14662
|
+
version: "1",
|
|
14663
|
+
code: data === null || data === void 0 ? void 0 : data.code,
|
|
14664
|
+
display: data === null || data === void 0 ? void 0 : data.longdesc,
|
|
14665
|
+
userSelected: true,
|
|
14666
|
+
id: 1,
|
|
14667
|
+
Type: "ORDERNATURE",
|
|
14668
|
+
shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc
|
|
14561
14669
|
},
|
|
14562
|
-
|
|
14563
|
-
|
|
14670
|
+
filter: {
|
|
14671
|
+
_key: data === null || data === void 0 ? void 0 : data._key
|
|
14564
14672
|
}
|
|
14565
14673
|
}];
|
|
14566
14674
|
}
|
|
@@ -14568,7 +14676,8 @@ var queries$k = {
|
|
|
14568
14676
|
|
|
14569
14677
|
var _extraReducers$B;
|
|
14570
14678
|
var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
14571
|
-
var
|
|
14679
|
+
var payload,
|
|
14680
|
+
_ref2,
|
|
14572
14681
|
rejectWithValue,
|
|
14573
14682
|
queriesjson,
|
|
14574
14683
|
data,
|
|
@@ -14579,9 +14688,10 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
14579
14688
|
while (1) {
|
|
14580
14689
|
switch (_context.prev = _context.next) {
|
|
14581
14690
|
case 0:
|
|
14691
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
14582
14692
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
14583
14693
|
_context.prev = 2;
|
|
14584
|
-
queriesjson = queries$k.fullread();
|
|
14694
|
+
queriesjson = queries$k.fullread(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '');
|
|
14585
14695
|
_context.next = 6;
|
|
14586
14696
|
return fetchData({
|
|
14587
14697
|
body: JSON.stringify(queriesjson)
|
|
@@ -14597,6 +14707,7 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
14597
14707
|
var _val$coding$3, _val$coding$4, _val$coding$5;
|
|
14598
14708
|
|
|
14599
14709
|
arry.push(_objectSpread2({
|
|
14710
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
14600
14711
|
code: val === null || val === void 0 ? void 0 : (_val$coding$3 = val.coding[0]) === null || _val$coding$3 === void 0 ? void 0 : _val$coding$3.code,
|
|
14601
14712
|
"short": val === null || val === void 0 ? void 0 : (_val$coding$4 = val.coding[0]) === null || _val$coding$4 === void 0 ? void 0 : _val$coding$4.shortdesc,
|
|
14602
14713
|
"long": val === null || val === void 0 ? void 0 : val.coding[0].display,
|
|
@@ -14800,12 +14911,21 @@ var queries$j = {
|
|
|
14800
14911
|
var _ref$isSingle = _ref.isSingle,
|
|
14801
14912
|
isSingle = _ref$isSingle === void 0 ? false : _ref$isSingle,
|
|
14802
14913
|
_ref$key = _ref.key,
|
|
14803
|
-
key = _ref$key === void 0 ? "" : _ref$key
|
|
14914
|
+
key = _ref$key === void 0 ? "" : _ref$key,
|
|
14915
|
+
_ref$page = _ref.page,
|
|
14916
|
+
page = _ref$page === void 0 ? 0 : _ref$page,
|
|
14917
|
+
_ref$perPage = _ref.perPage,
|
|
14918
|
+
perPage = _ref$perPage === void 0 ? 10 : _ref$perPage,
|
|
14919
|
+
search = _ref.search;
|
|
14804
14920
|
var obj = {
|
|
14805
14921
|
db_name: dbName$1,
|
|
14806
14922
|
entity: "OrderCategory",
|
|
14807
|
-
filter: "OrderCategory.activestatus == true",
|
|
14808
|
-
|
|
14923
|
+
filter: "OrderCategory.activestatus == true ".concat(search ? "&& UPPER(OrderCategory.ordercategory) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(OrderCategory.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(OrderCategory.shortdesc) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
14924
|
+
limit: {
|
|
14925
|
+
offset: page,
|
|
14926
|
+
count: perPage
|
|
14927
|
+
},
|
|
14928
|
+
return_fields: "MERGE(OrderCategory, {TotalCount:COUNT(".concat(search ? "FOR cnt IN OrderCategory filter UPPER(cnt.ordercategory) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN OrderCategory RETURN cnt._key", ")})"),
|
|
14809
14929
|
sort: "OrderCategory.createddate ASC"
|
|
14810
14930
|
};
|
|
14811
14931
|
|
|
@@ -14875,12 +14995,21 @@ var queries$j = {
|
|
|
14875
14995
|
var _ref4$isSingle = _ref4.isSingle,
|
|
14876
14996
|
isSingle = _ref4$isSingle === void 0 ? false : _ref4$isSingle,
|
|
14877
14997
|
_ref4$key = _ref4.key,
|
|
14878
|
-
key = _ref4$key === void 0 ? "" : _ref4$key
|
|
14998
|
+
key = _ref4$key === void 0 ? "" : _ref4$key,
|
|
14999
|
+
_ref4$page = _ref4.page,
|
|
15000
|
+
page = _ref4$page === void 0 ? 0 : _ref4$page,
|
|
15001
|
+
_ref4$perPage = _ref4.perPage,
|
|
15002
|
+
perPage = _ref4$perPage === void 0 ? 10 : _ref4$perPage,
|
|
15003
|
+
search = _ref4.search;
|
|
14879
15004
|
var obj = {
|
|
14880
15005
|
db_name: dbName$1,
|
|
14881
15006
|
entity: "CodeableConceptMaster",
|
|
14882
|
-
filter: "CodeableConceptMaster.
|
|
14883
|
-
|
|
15007
|
+
filter: "CodeableConceptMaster.Type == 'ORDERMODE' && (LIKE(CodeableConceptMaster.shortdesc,'%".concat(search ? search : '', "%',true)|| LIKE(CodeableConceptMaster.longdesc,'%").concat(search ? search : '', "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true"),
|
|
15008
|
+
limit: {
|
|
15009
|
+
offset: page,
|
|
15010
|
+
count: perPage
|
|
15011
|
+
},
|
|
15012
|
+
return_fields: "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.activestatus==true && cnt.Type=='ORDERMODE' RETURN cnt._key), coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
|
|
14884
15013
|
};
|
|
14885
15014
|
|
|
14886
15015
|
if (isSingle) {
|
|
@@ -14934,21 +15063,21 @@ var queries$j = {
|
|
|
14934
15063
|
// _key: key,
|
|
14935
15064
|
// };
|
|
14936
15065
|
newData = [{
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
15066
|
+
db_name: dbName$1,
|
|
15067
|
+
entity: "CodingMaster",
|
|
15068
|
+
is_metadata: true,
|
|
15069
|
+
filter: {
|
|
15070
|
+
_key: key
|
|
14942
15071
|
},
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
15072
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
15073
|
+
doc: {
|
|
15074
|
+
system: "",
|
|
15075
|
+
version: "1",
|
|
15076
|
+
code: code,
|
|
15077
|
+
display: longdesc,
|
|
15078
|
+
userSelected: true,
|
|
15079
|
+
id: coding_id,
|
|
15080
|
+
Type: "ORDERMODE",
|
|
14952
15081
|
shortdesc: shortdesc
|
|
14953
15082
|
}
|
|
14954
15083
|
}];
|
|
@@ -15011,7 +15140,8 @@ var modeActions = [{
|
|
|
15011
15140
|
id: id,
|
|
15012
15141
|
coding_id: coding_id,
|
|
15013
15142
|
key: key,
|
|
15014
|
-
codeable: codeable
|
|
15143
|
+
codeable: codeable,
|
|
15144
|
+
total_count: codeable === null || codeable === void 0 ? void 0 : codeable.TotalCount
|
|
15015
15145
|
};
|
|
15016
15146
|
});
|
|
15017
15147
|
}
|
|
@@ -15098,8 +15228,10 @@ var categoryActions = [{
|
|
|
15098
15228
|
longdesc = _ref.longdesc,
|
|
15099
15229
|
id = _ref.id,
|
|
15100
15230
|
_key = _ref._key,
|
|
15101
|
-
status = _ref.status
|
|
15231
|
+
status = _ref.status,
|
|
15232
|
+
TotalCount = _ref.TotalCount;
|
|
15102
15233
|
return {
|
|
15234
|
+
total_count: TotalCount,
|
|
15103
15235
|
category: ordercategory,
|
|
15104
15236
|
shortdesc: shortdesc,
|
|
15105
15237
|
longdesc: longdesc,
|
|
@@ -15237,29 +15369,29 @@ var orderMasterSlice$1 = orderMasterSlice.reducer;
|
|
|
15237
15369
|
var queries$i = {
|
|
15238
15370
|
status_update_practitioner: function status_update_practitioner(data) {
|
|
15239
15371
|
return [{
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15372
|
+
db_name: dbName$1,
|
|
15373
|
+
entity: "CodeableConceptMaster",
|
|
15374
|
+
filter: {
|
|
15375
|
+
_key: data._key
|
|
15244
15376
|
},
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15377
|
+
is_metadata: true,
|
|
15378
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
15379
|
+
doc: {
|
|
15380
|
+
status: data.status
|
|
15249
15381
|
}
|
|
15250
15382
|
}];
|
|
15251
15383
|
},
|
|
15252
15384
|
status_update_holiday: function status_update_holiday(data) {
|
|
15253
15385
|
return [{
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15257
|
-
|
|
15386
|
+
db_name: dbName$1,
|
|
15387
|
+
entity: "Holiday",
|
|
15388
|
+
filter: {
|
|
15389
|
+
_key: data._key
|
|
15258
15390
|
},
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15391
|
+
is_metadata: true,
|
|
15392
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
15393
|
+
doc: {
|
|
15394
|
+
status: data.status
|
|
15263
15395
|
}
|
|
15264
15396
|
}];
|
|
15265
15397
|
},
|
|
@@ -15297,50 +15429,69 @@ var queries$i = {
|
|
|
15297
15429
|
}
|
|
15298
15430
|
|
|
15299
15431
|
return [_objectSpread2(_objectSpread2({
|
|
15300
|
-
|
|
15301
|
-
|
|
15302
|
-
|
|
15432
|
+
db_name: dbName$1,
|
|
15433
|
+
entity: "Holiday",
|
|
15434
|
+
is_metadata: true
|
|
15303
15435
|
}, filter), {}, {
|
|
15304
|
-
|
|
15305
|
-
|
|
15436
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
15437
|
+
doc: _objectSpread2(_objectSpread2({
|
|
15306
15438
|
// "_id": "string",
|
|
15307
15439
|
// "CalYear": "number",
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15440
|
+
CalDate: data.date ? getUtcTime(moment(data.date)) : null,
|
|
15441
|
+
CalDay: data.date ? moment(data.date).format("dddd") : "",
|
|
15442
|
+
HolidayType: data.holiday_type,
|
|
15443
|
+
HoidayReason: data.holiday_reason,
|
|
15312
15444
|
// "active": "boolean",
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
|
|
15445
|
+
id: 0,
|
|
15446
|
+
repeat_every_year: data.repeat,
|
|
15447
|
+
status: data.status
|
|
15316
15448
|
}, organization_id), entitytype)
|
|
15317
15449
|
})];
|
|
15318
15450
|
},
|
|
15319
15451
|
holiday_read: function holiday_read(data) {
|
|
15452
|
+
// alert(JSON.stringify(data))
|
|
15453
|
+
var dataSearched = data.search ? data.search : '';
|
|
15320
15454
|
var filter = {
|
|
15321
|
-
|
|
15455
|
+
filter: "Holiday.activestatus == true"
|
|
15456
|
+
};
|
|
15457
|
+
var limit = {
|
|
15458
|
+
limit: {
|
|
15459
|
+
offset: 0,
|
|
15460
|
+
count: 10
|
|
15461
|
+
}
|
|
15322
15462
|
};
|
|
15323
15463
|
|
|
15324
|
-
if (data.
|
|
15464
|
+
if (data.search) {
|
|
15325
15465
|
filter = {
|
|
15326
|
-
|
|
15466
|
+
filter: "( LIKe(Holiday.HoidayReason,'%".concat(data.search, "%',true) || LIKE(Holiday.HolidayType,'%").concat(data.search, "%',true) ) && Holiday.activestatus == true")
|
|
15327
15467
|
};
|
|
15328
15468
|
}
|
|
15329
15469
|
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15470
|
+
if (data !== null && data !== void 0 && data.page && data !== null && data !== void 0 && data.perPage) {
|
|
15471
|
+
limit = {
|
|
15472
|
+
"limit": {
|
|
15473
|
+
offset: data === null || data === void 0 ? void 0 : data.page,
|
|
15474
|
+
count: data === null || data === void 0 ? void 0 : data.perPage
|
|
15475
|
+
}
|
|
15476
|
+
};
|
|
15477
|
+
}
|
|
15478
|
+
|
|
15479
|
+
return _objectSpread2(_objectSpread2(_objectSpread2({
|
|
15480
|
+
db_name: dbName$1,
|
|
15481
|
+
entity: "Holiday"
|
|
15482
|
+
}, filter), limit), {}, {
|
|
15483
|
+
sort: "Holiday.CalDate",
|
|
15484
|
+
return_fields: "merge(Holiday,{TotalCount:count(FOR cnt IN Holiday FILTER (LIKE(cnt.HoidayReason,'%".concat(dataSearched, "%',true) || LIKE(cnt.HolidayType,'%").concat(dataSearched, "%',true) ) return cnt._key) ,organization_id:(return document(Holiday.organization_id))},{entitytype:(FOR cod IN CodeableConceptMaster filter cod._id == Holiday.entitytype RETURN MERGE(cod,{coding:(FOR d IN to_array(cod.coding) RETURN DOCUMENT(d).display)}))},{HolidayType:(FOR cod IN CodeableConceptMaster filter cod._id == Holiday.HolidayType RETURN MERGE(cod,{coding:(FOR d IN to_array(cod.coding) RETURN DOCUMENT(d).display)}))})")
|
|
15336
15485
|
});
|
|
15337
15486
|
},
|
|
15338
15487
|
holiday_master: {
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
|
|
15488
|
+
holiday_type: "{\n \"db_name\":\"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='HOLIDAYTYPE' && CodeableConceptMaster.status==true && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
15489
|
+
entity_name: "{\n \"db_name\":\"".concat(dbName$1, "\",\n \"entity\": \"Organization\",\n \"sort\":\"Organization.name\",\n \"filter\": \"'Hospital' IN Organization.OrgType\",\n \"return_fields\": \"{OrgID:Organization.id,name:Organization.name,_id:Organization._id,OrgType:Organization.OrgType}\"\n }"),
|
|
15490
|
+
entity_type: "{\n \"db_name\":\"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ORGTYPE' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }")
|
|
15491
|
+
},
|
|
15492
|
+
appointment_type_read: function appointment_type_read(page, perPage, search) {
|
|
15493
|
+
return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type == 'APPTYPE' && (LIKE(CodeableConceptMaster.shortdesc,'%").concat(search, "%',true) || LIKE(CodeableConceptMaster.code,'%").concat(search, "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true\",\n \"limit\" : { \"offset\" : ").concat(page, ", \"count\": ").concat(perPage, "},\n \"return_fields\": \"MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.activestatus==true && cnt.Type=='APPTYPE' RETURN cnt._key) ,coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }");
|
|
15342
15494
|
},
|
|
15343
|
-
appointment_type_read: "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.activestatus==true && CodeableConceptMaster.Type=='APPTYPE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
15344
15495
|
upsert: function upsert(data) {
|
|
15345
15496
|
var filter = {};
|
|
15346
15497
|
var metadata = {};
|
|
@@ -15367,25 +15518,25 @@ var queries$i = {
|
|
|
15367
15518
|
}
|
|
15368
15519
|
|
|
15369
15520
|
return [_objectSpread2(_objectSpread2({
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15521
|
+
db_name: dbName$1,
|
|
15522
|
+
entity: "CodeableConceptMaster",
|
|
15523
|
+
is_metadata: true,
|
|
15524
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
15374
15525
|
}, filter), {}, {
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
|
|
15526
|
+
doc: {
|
|
15527
|
+
text: "",
|
|
15528
|
+
coding: [_objectSpread2(_objectSpread2({
|
|
15529
|
+
system: "",
|
|
15530
|
+
version: "1",
|
|
15531
|
+
code: data.code,
|
|
15532
|
+
display: data.description,
|
|
15533
|
+
userSelected: true,
|
|
15534
|
+
id: 0,
|
|
15535
|
+
Type: data.type
|
|
15385
15536
|
}, metadata), coding_key)],
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15537
|
+
Type: data.type,
|
|
15538
|
+
id: 0,
|
|
15539
|
+
status: true
|
|
15389
15540
|
}
|
|
15390
15541
|
})];
|
|
15391
15542
|
}
|
|
@@ -15439,7 +15590,8 @@ var CODEABLE_CONCEPT_MASTER_STATUS_CHANGE = createAsyncThunk("availabilityManage
|
|
|
15439
15590
|
}, _callee, null, [[2, 11]]);
|
|
15440
15591
|
})));
|
|
15441
15592
|
var APPOINTMENT_TYPE_READ = createAsyncThunk("availabilityManagementSlice/appointment_type_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
15442
|
-
var
|
|
15593
|
+
var payload,
|
|
15594
|
+
_ref4,
|
|
15443
15595
|
rejectWithValue,
|
|
15444
15596
|
data,
|
|
15445
15597
|
arry,
|
|
@@ -15449,11 +15601,12 @@ var APPOINTMENT_TYPE_READ = createAsyncThunk("availabilityManagementSlice/appoin
|
|
|
15449
15601
|
while (1) {
|
|
15450
15602
|
switch (_context2.prev = _context2.next) {
|
|
15451
15603
|
case 0:
|
|
15604
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
15452
15605
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
15453
15606
|
_context2.prev = 2;
|
|
15454
15607
|
_context2.next = 5;
|
|
15455
15608
|
return fetchData({
|
|
15456
|
-
body: queries$i.appointment_type_read
|
|
15609
|
+
body: queries$i.appointment_type_read(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '')
|
|
15457
15610
|
}, __readDocumentUrl__);
|
|
15458
15611
|
|
|
15459
15612
|
case 5:
|
|
@@ -15464,6 +15617,7 @@ var APPOINTMENT_TYPE_READ = createAsyncThunk("availabilityManagementSlice/appoin
|
|
|
15464
15617
|
var _val$coding$0$_key, _val$coding, _val$coding$;
|
|
15465
15618
|
|
|
15466
15619
|
arry.push({
|
|
15620
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
15467
15621
|
"code": val.coding[0].code ? val.coding[0].code : "",
|
|
15468
15622
|
"description": val.coding[0].display ? val.coding[0].display : "",
|
|
15469
15623
|
"id": val.coding[0].id ? val.coding[0].id : 0,
|
|
@@ -15747,6 +15901,8 @@ var HOLIDAY_READ = createAsyncThunk("holidaySlice/holidy_list", /*#__PURE__*/_as
|
|
|
15747
15901
|
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
15748
15902
|
_ref7 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
|
|
15749
15903
|
_context5.prev = 2;
|
|
15904
|
+
// console.clear()
|
|
15905
|
+
// alert(JSON.stringify(payload));
|
|
15750
15906
|
readqueries = queries$i.holiday_read(payload);
|
|
15751
15907
|
_context5.next = 6;
|
|
15752
15908
|
return fetchData({
|
|
@@ -15759,6 +15915,7 @@ var HOLIDAY_READ = createAsyncThunk("holidaySlice/holidy_list", /*#__PURE__*/_as
|
|
|
15759
15915
|
data.result.map(function (val) {
|
|
15760
15916
|
if (val._key) {
|
|
15761
15917
|
arry.push({
|
|
15918
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
15762
15919
|
"date": val.CalDate ? utcTOLocal(val.CalDate, "DD-MM-YY") : null,
|
|
15763
15920
|
"CalDate": val.CalDate ? val.CalDate : null,
|
|
15764
15921
|
"day": val.CalDay ? val.CalDay : "",
|
|
@@ -15950,12 +16107,19 @@ var queries$h = {
|
|
|
15950
16107
|
};
|
|
15951
16108
|
},
|
|
15952
16109
|
res_table_data: function res_table_data(entityType, entityName) {
|
|
16110
|
+
var page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
16111
|
+
var perpage = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;
|
|
15953
16112
|
return {
|
|
15954
16113
|
db_name: dbName$1,
|
|
15955
16114
|
entity: "ResourcebyApptType",
|
|
15956
16115
|
// filter: "ResourcebyApptType.activestatus==true AND DOCUMENT(ResourcebyApptType.entityType).display=='Hospital' AND DOCUMENT(ResourcebyApptType.organization_id).name=='KMCH Hospital'",
|
|
15957
16116
|
filter: "ResourcebyApptType.activestatus==true ".concat(entityType, " ").concat(entityName),
|
|
15958
|
-
|
|
16117
|
+
// filter: `ResourcebyApptType.organization_id == '${entityType}'&& ResourcebyApptType.entityType== '${entityName}' && (LIKE(ResourcebyApptType.ApptTypeCode,'%Please bring referral letter while coming for consultation%',true) || LIKE(first((ResourcebyApptType.generalInstruction)[*].description),'%Please bring referral letter while coming for consultation%',true) ) && ResourcebyApptType.activestatus == true`,
|
|
16118
|
+
limit: {
|
|
16119
|
+
offset: page,
|
|
16120
|
+
count: perpage
|
|
16121
|
+
},
|
|
16122
|
+
return_fields: "MERGE(ResourcebyApptType,{TotalCount:COUNT(FOR cnt IN ResourcebyApptType RETURN cnt._key) , ApptTypeCode:DOCUMENT(ResourcebyApptType.ApptTypeCode) ,TotNoOfResourcesRequired:(FOR tnr IN ResourcebyApptType.TotNoOfResourcesRequired RETURN MERGE(tnr,{ResourceType:DOCUMENT(tnr.ResourceType),ResourceRole:DOCUMENT(tnr.ResourceRole),DurnUOM:DOCUMENT(tnr.DurnUOM)} )) ,ApptInstructions:(FOR appins IN ResourcebyApptType.ApptInstructions RETURN MERGE(appins,{AppInstructionCriteria:DOCUMENT(appins.AppInstructionCriteria),Appcode:DOCUMENT(appins.Appcode)} )) ,generalInstruction:(FOR gins IN ResourcebyApptType.generalInstruction RETURN MERGE(gins,{fcode:DOCUMENT(gins.fcode)})) ,entityType:DOCUMENT(ResourcebyApptType.entityType) ,organization_id:DOCUMENT(ResourcebyApptType.organization_id) })"
|
|
15959
16123
|
};
|
|
15960
16124
|
},
|
|
15961
16125
|
resource_type_drop_down: function resource_type_drop_down() {
|
|
@@ -16339,7 +16503,7 @@ var RESOURCE_BY_TABLE_DATA = createAsyncThunk("resourceByAppointmentTypesSlice/r
|
|
|
16339
16503
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
16340
16504
|
_context4.prev = 2;
|
|
16341
16505
|
// let { entityTypeQ, entityNameQ } = payload;
|
|
16342
|
-
queriesjson = queries$h.res_table_data(payload.entityTypeQ, payload.entityNameQ);
|
|
16506
|
+
queriesjson = queries$h.res_table_data(payload.entityTypeQ, payload.entityNameQ, payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload === null || payload === void 0 ? void 0 : payload.search);
|
|
16343
16507
|
_context4.next = 6;
|
|
16344
16508
|
return fetchData({
|
|
16345
16509
|
body: JSON.stringify(queriesjson)
|
|
@@ -16355,7 +16519,8 @@ var RESOURCE_BY_TABLE_DATA = createAsyncThunk("resourceByAppointmentTypesSlice/r
|
|
|
16355
16519
|
code: val.ApptTypeCode.code,
|
|
16356
16520
|
resources: val.TotNoOfResourcesRequired.length,
|
|
16357
16521
|
status: val.status,
|
|
16358
|
-
allData: val
|
|
16522
|
+
allData: val,
|
|
16523
|
+
total_count: val.TotalCount
|
|
16359
16524
|
});
|
|
16360
16525
|
}
|
|
16361
16526
|
});
|
|
@@ -16882,9 +17047,44 @@ var resourceByAppointmentTypes = {
|
|
|
16882
17047
|
var resourceByAppointmentTypesSlice$1 = resourceByAppointmentTypesSlice.reducer;
|
|
16883
17048
|
|
|
16884
17049
|
var queries$g = {
|
|
16885
|
-
drug_category_read:
|
|
16886
|
-
|
|
16887
|
-
|
|
17050
|
+
drug_category_read: function drug_category_read(page, perPage, search) {
|
|
17051
|
+
return {
|
|
17052
|
+
db_name: dbName$1,
|
|
17053
|
+
entity: "DrugCategory",
|
|
17054
|
+
filter: "(LIKE(DrugCategory.drugcategory,'%".concat(search, "%',true) || LIKE(DrugCategory.shortdesc,'%").concat(search, "%',true) || LIKE(DrugCategory.longdesc,'%").concat(search, "%',true)) && DrugCategory.activestatus == true"),
|
|
17055
|
+
limit: {
|
|
17056
|
+
offset: page,
|
|
17057
|
+
count: perPage
|
|
17058
|
+
},
|
|
17059
|
+
return_fields: "MERGE(DrugCategory, {TotalCount:COUNT(FOR cnt IN DrugCategory RETURN cnt._key)})"
|
|
17060
|
+
};
|
|
17061
|
+
},
|
|
17062
|
+
drug_type_read: function drug_type_read(page, perPage, search) {
|
|
17063
|
+
return {
|
|
17064
|
+
db_name: dbName$1,
|
|
17065
|
+
entity: "DrugType",
|
|
17066
|
+
filter: "(LIKE(DrugType.drugtype,'%".concat(search, "%',true) || LIKE(DrugType.shortdesc,'%").concat(search, "%',true) || LIKE(DrugType.longdesc,'%").concat(search, "%',true)) && DrugType.activestatus == true"),
|
|
17067
|
+
limit: {
|
|
17068
|
+
offset: page,
|
|
17069
|
+
count: perPage
|
|
17070
|
+
},
|
|
17071
|
+
sort: "DrugType.id",
|
|
17072
|
+
return_fields: "MERGE(DrugType, {TotalCount:COUNT(FOR cnt IN DrugType RETURN cnt._key)})"
|
|
17073
|
+
};
|
|
17074
|
+
},
|
|
17075
|
+
drug_dosage: function drug_dosage(page, perPage, search) {
|
|
17076
|
+
return {
|
|
17077
|
+
db_name: dbName$1,
|
|
17078
|
+
entity: "DosageForm",
|
|
17079
|
+
sort: "DosageForm.dosageform",
|
|
17080
|
+
filter: "(LIKE(DosageForm.dosageform,'%".concat(search, "%',true) || LIKE(DosageForm.UOM,'%").concat(search, "%',true) || LIKE(DosageForm.longdesc,'%").concat(search, "%',true)) && DosageForm.activestatus == true"),
|
|
17081
|
+
limit: {
|
|
17082
|
+
offset: page,
|
|
17083
|
+
count: perPage
|
|
17084
|
+
},
|
|
17085
|
+
return_fields: "MERGE(DosageForm, {TotalCount:COUNT(FOR cnt IN DosageForm RETURN cnt._key)})"
|
|
17086
|
+
};
|
|
17087
|
+
},
|
|
16888
17088
|
drug_dosage_upsert: function drug_dosage_upsert(data) {
|
|
16889
17089
|
var filter = {};
|
|
16890
17090
|
|
|
@@ -16897,35 +17097,47 @@ var queries$g = {
|
|
|
16897
17097
|
}
|
|
16898
17098
|
|
|
16899
17099
|
return [_objectSpread2(_objectSpread2({
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
17100
|
+
db_name: dbName$1,
|
|
17101
|
+
entity: "DosageForm",
|
|
17102
|
+
is_metadata: true
|
|
16903
17103
|
}, filter), {}, {
|
|
16904
|
-
|
|
16905
|
-
|
|
17104
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17105
|
+
doc: {
|
|
16906
17106
|
// "id":0,
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
16910
|
-
|
|
17107
|
+
dosageform: data.drug_dosage ? data.drug_dosage : "",
|
|
17108
|
+
shortdesc: data.short_description ? data.short_description : "",
|
|
17109
|
+
longdesc: data.long_description ? data.long_description : "",
|
|
17110
|
+
status: data.status ? data.status : false
|
|
16911
17111
|
}
|
|
16912
17112
|
})];
|
|
16913
17113
|
},
|
|
16914
17114
|
status_update_drug_dosage: function status_update_drug_dosage(data) {
|
|
16915
17115
|
return [{
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
17116
|
+
db_name: dbName$1,
|
|
17117
|
+
entity: "DosageForm",
|
|
17118
|
+
filter: {
|
|
17119
|
+
_key: data._key
|
|
16920
17120
|
},
|
|
16921
|
-
|
|
16922
|
-
|
|
16923
|
-
|
|
16924
|
-
|
|
17121
|
+
is_metadata: true,
|
|
17122
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17123
|
+
doc: {
|
|
17124
|
+
status: data.status
|
|
16925
17125
|
}
|
|
16926
17126
|
}];
|
|
16927
17127
|
},
|
|
16928
|
-
drug_class:
|
|
17128
|
+
drug_class: function drug_class(page, perPage, search) {
|
|
17129
|
+
return {
|
|
17130
|
+
db_name: dbName$1,
|
|
17131
|
+
entity: "DrugClass",
|
|
17132
|
+
filter: "(LIKE(DrugClass.drugclass,'%".concat(search, "%',true) || LIKE(DrugClass.longdesc,'%").concat(search, "%',true) || LIKE(DrugClass.shortdesc,'%").concat(search, "%',true)) && DrugClass.activestatus == true"),
|
|
17133
|
+
limit: {
|
|
17134
|
+
offset: page,
|
|
17135
|
+
count: perPage
|
|
17136
|
+
},
|
|
17137
|
+
sort: "DrugClass.drugclass",
|
|
17138
|
+
return_fields: "MERGE(DrugClass, {TotalCount:COUNT(FOR cnt IN DrugClass RETURN cnt._key)})"
|
|
17139
|
+
};
|
|
17140
|
+
},
|
|
16929
17141
|
drug_class_upsert: function drug_class_upsert(data) {
|
|
16930
17142
|
var filter = {};
|
|
16931
17143
|
|
|
@@ -16938,46 +17150,58 @@ var queries$g = {
|
|
|
16938
17150
|
}
|
|
16939
17151
|
|
|
16940
17152
|
return [_objectSpread2(_objectSpread2({
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
17153
|
+
db_name: dbName$1,
|
|
17154
|
+
entity: "DrugClass",
|
|
17155
|
+
is_metadata: true
|
|
16944
17156
|
}, filter), {}, {
|
|
16945
|
-
|
|
16946
|
-
|
|
17157
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17158
|
+
doc: {
|
|
16947
17159
|
// "id":0,
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
17160
|
+
drugclass: data.drug_class ? data.drug_class : "",
|
|
17161
|
+
shortdesc: data.short_description ? data.short_description : "",
|
|
17162
|
+
longdesc: data.long_description ? data.long_description : "",
|
|
17163
|
+
status: data.status ? data.status : false
|
|
16952
17164
|
}
|
|
16953
17165
|
})];
|
|
16954
17166
|
},
|
|
16955
17167
|
status_update_drug_class: function status_update_drug_class(data) {
|
|
16956
17168
|
return [{
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
17169
|
+
db_name: dbName$1,
|
|
17170
|
+
entity: "DrugClass",
|
|
17171
|
+
filter: {
|
|
17172
|
+
_key: data._key
|
|
16961
17173
|
},
|
|
16962
|
-
|
|
16963
|
-
|
|
16964
|
-
|
|
16965
|
-
|
|
17174
|
+
is_metadata: true,
|
|
17175
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17176
|
+
doc: {
|
|
17177
|
+
status: data.status
|
|
16966
17178
|
}
|
|
16967
17179
|
}];
|
|
16968
17180
|
},
|
|
16969
|
-
drug_routes:
|
|
17181
|
+
drug_routes: function drug_routes(page, perPage, search) {
|
|
17182
|
+
return {
|
|
17183
|
+
db_name: dbName$1,
|
|
17184
|
+
entity: "DrugRoutes",
|
|
17185
|
+
sort: "DrugRoutes.routecode",
|
|
17186
|
+
filter: "(LIKE(DrugRoutes.routecode,'%".concat(search, "%',true) || LIKE(DrugRoutes.UOM,'%").concat(search, "%',true) || LIKE(DrugRoutes.longdesc,'%").concat(search, "%',true)) && DrugRoutes.activestatus == true"),
|
|
17187
|
+
limit: {
|
|
17188
|
+
"offset": page,
|
|
17189
|
+
"count": perPage
|
|
17190
|
+
},
|
|
17191
|
+
return_fields: "MERGE(DrugRoutes, {TotalCount:COUNT(FOR cnt IN DrugRoutes RETURN cnt._key)})"
|
|
17192
|
+
};
|
|
17193
|
+
},
|
|
16970
17194
|
status_update_drug_routes: function status_update_drug_routes(data) {
|
|
16971
17195
|
return [{
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
17196
|
+
db_name: dbName$1,
|
|
17197
|
+
entity: "DrugRoutes",
|
|
17198
|
+
filter: {
|
|
17199
|
+
_key: data._key
|
|
16976
17200
|
},
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
17201
|
+
is_metadata: true,
|
|
17202
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17203
|
+
doc: {
|
|
17204
|
+
status: data.status
|
|
16981
17205
|
}
|
|
16982
17206
|
}];
|
|
16983
17207
|
},
|
|
@@ -16993,18 +17217,18 @@ var queries$g = {
|
|
|
16993
17217
|
}
|
|
16994
17218
|
|
|
16995
17219
|
return [_objectSpread2(_objectSpread2({
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
17220
|
+
db_name: dbName$1,
|
|
17221
|
+
entity: "DrugRoutes",
|
|
17222
|
+
is_metadata: true
|
|
16999
17223
|
}, filter), {}, {
|
|
17000
|
-
|
|
17001
|
-
|
|
17224
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17225
|
+
doc: {
|
|
17002
17226
|
// "id":0,
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17227
|
+
routecode: data.drug_routes ? data.drug_routes : "",
|
|
17228
|
+
routeadverb: data.route_adverb ? data.route_adverb : "",
|
|
17229
|
+
shortdesc: data.short_description ? data.short_description : "",
|
|
17230
|
+
longdesc: data.long_description ? data.long_description : "",
|
|
17231
|
+
status: data.status ? data.status : false
|
|
17008
17232
|
}
|
|
17009
17233
|
})];
|
|
17010
17234
|
}
|
|
@@ -17012,7 +17236,8 @@ var queries$g = {
|
|
|
17012
17236
|
|
|
17013
17237
|
var _extraReducers$x;
|
|
17014
17238
|
var DRUG_CATEGORY_READ = createAsyncThunk("drugCategorySlice/drug_category_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
17015
|
-
var
|
|
17239
|
+
var payload,
|
|
17240
|
+
_ref2,
|
|
17016
17241
|
rejectWithValue,
|
|
17017
17242
|
data,
|
|
17018
17243
|
arry,
|
|
@@ -17022,11 +17247,12 @@ var DRUG_CATEGORY_READ = createAsyncThunk("drugCategorySlice/drug_category_list"
|
|
|
17022
17247
|
while (1) {
|
|
17023
17248
|
switch (_context.prev = _context.next) {
|
|
17024
17249
|
case 0:
|
|
17250
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
17025
17251
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
17026
17252
|
_context.prev = 2;
|
|
17027
17253
|
_context.next = 5;
|
|
17028
17254
|
return fetchData({
|
|
17029
|
-
body: queries$g.drug_category_read
|
|
17255
|
+
body: JSON.stringify(queries$g.drug_category_read(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
17030
17256
|
}, __readDocumentUrl__);
|
|
17031
17257
|
|
|
17032
17258
|
case 5:
|
|
@@ -17035,6 +17261,7 @@ var DRUG_CATEGORY_READ = createAsyncThunk("drugCategorySlice/drug_category_list"
|
|
|
17035
17261
|
data.result.map(function (val) {
|
|
17036
17262
|
if (val._key) {
|
|
17037
17263
|
arry.push({
|
|
17264
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
17038
17265
|
"drug_category": val.drugcategory ? val.drugcategory : "",
|
|
17039
17266
|
"short_description": val.shortdesc ? val.shortdesc : "",
|
|
17040
17267
|
"long_description": val.longdesc ? val.longdesc : "",
|
|
@@ -17061,7 +17288,8 @@ var DRUG_CATEGORY_READ = createAsyncThunk("drugCategorySlice/drug_category_list"
|
|
|
17061
17288
|
}, _callee, null, [[2, 11]]);
|
|
17062
17289
|
})));
|
|
17063
17290
|
var DRUG_TYPE_READ = createAsyncThunk("drugCategorySlice/drug_type_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
17064
|
-
var
|
|
17291
|
+
var payload,
|
|
17292
|
+
_ref4,
|
|
17065
17293
|
rejectWithValue,
|
|
17066
17294
|
data,
|
|
17067
17295
|
arry,
|
|
@@ -17071,11 +17299,12 @@ var DRUG_TYPE_READ = createAsyncThunk("drugCategorySlice/drug_type_list", /*#__P
|
|
|
17071
17299
|
while (1) {
|
|
17072
17300
|
switch (_context2.prev = _context2.next) {
|
|
17073
17301
|
case 0:
|
|
17302
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
17074
17303
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
17075
17304
|
_context2.prev = 2;
|
|
17076
17305
|
_context2.next = 5;
|
|
17077
17306
|
return fetchData({
|
|
17078
|
-
body: queries$g.drug_type_read
|
|
17307
|
+
body: JSON.stringify(queries$g.drug_type_read(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
17079
17308
|
}, __readDocumentUrl__);
|
|
17080
17309
|
|
|
17081
17310
|
case 5:
|
|
@@ -17084,6 +17313,7 @@ var DRUG_TYPE_READ = createAsyncThunk("drugCategorySlice/drug_type_list", /*#__P
|
|
|
17084
17313
|
data.result.map(function (val) {
|
|
17085
17314
|
if (val._key) {
|
|
17086
17315
|
arry.push({
|
|
17316
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
17087
17317
|
"drug_type": val.drugtype ? val.drugtype : "",
|
|
17088
17318
|
"short_description": val.shortdesc ? val.shortdesc : "",
|
|
17089
17319
|
"long_description": val.longdesc ? val.longdesc : "",
|
|
@@ -17137,7 +17367,8 @@ var drugCategorySlice$1 = drugCategorySlice.reducer;
|
|
|
17137
17367
|
|
|
17138
17368
|
var _extraReducers$w;
|
|
17139
17369
|
var DRUG_DOSAGE_READ = createAsyncThunk("drugDosageSlice/drug_dosage_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
17140
|
-
var
|
|
17370
|
+
var payload,
|
|
17371
|
+
_ref2,
|
|
17141
17372
|
rejectWithValue,
|
|
17142
17373
|
data,
|
|
17143
17374
|
arry,
|
|
@@ -17147,11 +17378,12 @@ var DRUG_DOSAGE_READ = createAsyncThunk("drugDosageSlice/drug_dosage_list", /*#_
|
|
|
17147
17378
|
while (1) {
|
|
17148
17379
|
switch (_context.prev = _context.next) {
|
|
17149
17380
|
case 0:
|
|
17381
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
17150
17382
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
17151
17383
|
_context.prev = 2;
|
|
17152
17384
|
_context.next = 5;
|
|
17153
17385
|
return fetchData({
|
|
17154
|
-
body: queries$g.drug_dosage
|
|
17386
|
+
body: JSON.stringify(queries$g.drug_dosage(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
17155
17387
|
}, __readDocumentUrl__);
|
|
17156
17388
|
|
|
17157
17389
|
case 5:
|
|
@@ -17160,6 +17392,7 @@ var DRUG_DOSAGE_READ = createAsyncThunk("drugDosageSlice/drug_dosage_list", /*#_
|
|
|
17160
17392
|
data.result.map(function (val) {
|
|
17161
17393
|
if (val._key) {
|
|
17162
17394
|
arry.push(_objectSpread2(_objectSpread2({}, val), {}, {
|
|
17395
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
17163
17396
|
"drug_dosage": val.dosageform ? val.dosageform : "",
|
|
17164
17397
|
"short_description": val.shortdesc ? val.shortdesc : "",
|
|
17165
17398
|
"long_description": val.longdesc ? val.longdesc : "",
|
|
@@ -17317,7 +17550,8 @@ var drugDosageSlice$1 = drugDosageSlice.reducer;
|
|
|
17317
17550
|
|
|
17318
17551
|
var _extraReducers$v;
|
|
17319
17552
|
var DRUG_CLASS_READ = createAsyncThunk("drugClassSlice/drug_class_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
17320
|
-
var
|
|
17553
|
+
var payload,
|
|
17554
|
+
_ref2,
|
|
17321
17555
|
rejectWithValue,
|
|
17322
17556
|
data,
|
|
17323
17557
|
arry,
|
|
@@ -17327,11 +17561,12 @@ var DRUG_CLASS_READ = createAsyncThunk("drugClassSlice/drug_class_list", /*#__PU
|
|
|
17327
17561
|
while (1) {
|
|
17328
17562
|
switch (_context.prev = _context.next) {
|
|
17329
17563
|
case 0:
|
|
17564
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
17330
17565
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
17331
17566
|
_context.prev = 2;
|
|
17332
17567
|
_context.next = 5;
|
|
17333
17568
|
return fetchData({
|
|
17334
|
-
body: queries$g.drug_class
|
|
17569
|
+
body: JSON.stringify(queries$g.drug_class(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
17335
17570
|
}, __readDocumentUrl__);
|
|
17336
17571
|
|
|
17337
17572
|
case 5:
|
|
@@ -17340,6 +17575,7 @@ var DRUG_CLASS_READ = createAsyncThunk("drugClassSlice/drug_class_list", /*#__PU
|
|
|
17340
17575
|
data.result.map(function (val) {
|
|
17341
17576
|
if (val._key) {
|
|
17342
17577
|
arry.push(_objectSpread2(_objectSpread2({}, val), {}, {
|
|
17578
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
17343
17579
|
"drug_class": val.drugclass ? val.drugclass : "",
|
|
17344
17580
|
"short_description": val.shortdesc ? val.shortdesc : "",
|
|
17345
17581
|
"long_description": val.longdesc ? val.longdesc : "",
|
|
@@ -17497,7 +17733,8 @@ var drugClassSlice$1 = drugClassSlice.reducer;
|
|
|
17497
17733
|
|
|
17498
17734
|
var _extraReducers$u;
|
|
17499
17735
|
var DRUG_ROUTES_READ = createAsyncThunk("drugRoutesSlice/drug_routes_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
17500
|
-
var
|
|
17736
|
+
var payload,
|
|
17737
|
+
_ref2,
|
|
17501
17738
|
rejectWithValue,
|
|
17502
17739
|
data,
|
|
17503
17740
|
arry,
|
|
@@ -17507,11 +17744,12 @@ var DRUG_ROUTES_READ = createAsyncThunk("drugRoutesSlice/drug_routes_list", /*#_
|
|
|
17507
17744
|
while (1) {
|
|
17508
17745
|
switch (_context.prev = _context.next) {
|
|
17509
17746
|
case 0:
|
|
17747
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
17510
17748
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
17511
17749
|
_context.prev = 2;
|
|
17512
17750
|
_context.next = 5;
|
|
17513
17751
|
return fetchData({
|
|
17514
|
-
body: queries$g.drug_routes
|
|
17752
|
+
body: JSON.stringify(queries$g.drug_routes(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
17515
17753
|
}, __readDocumentUrl__);
|
|
17516
17754
|
|
|
17517
17755
|
case 5:
|
|
@@ -17520,6 +17758,7 @@ var DRUG_ROUTES_READ = createAsyncThunk("drugRoutesSlice/drug_routes_list", /*#_
|
|
|
17520
17758
|
data.result.map(function (val) {
|
|
17521
17759
|
if (val._key) {
|
|
17522
17760
|
arry.push(_objectSpread2(_objectSpread2({}, val), {}, {
|
|
17761
|
+
"total_count": val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
17523
17762
|
"drug_routes": val.routecode ? val.routecode : "-",
|
|
17524
17763
|
"short_description": val.shortdesc ? val.shortdesc : "-",
|
|
17525
17764
|
"long_description": val.longdesc ? val.longdesc : "-",
|
|
@@ -20374,7 +20613,7 @@ var drugMasterSlice$1 = drugMasterSlice.reducer;
|
|
|
20374
20613
|
|
|
20375
20614
|
// import { dbName } from "../../qdm_query_ids";
|
|
20376
20615
|
var queries$e = {
|
|
20377
|
-
fullread: function fullread(
|
|
20616
|
+
fullread: function fullread(page, perPage, search) {
|
|
20378
20617
|
// return {
|
|
20379
20618
|
// db_name: dbName,
|
|
20380
20619
|
// entity: "DrugRouteDirection",
|
|
@@ -20387,8 +20626,12 @@ var queries$e = {
|
|
|
20387
20626
|
"db_name": dbName$1,
|
|
20388
20627
|
"entity": "DrugRouteDirection",
|
|
20389
20628
|
"sort": "DrugRouteDirection.RouteDirectionCode",
|
|
20390
|
-
"filter": "DrugRouteDirection.activestatus == true
|
|
20391
|
-
"
|
|
20629
|
+
"filter": "(LIKE(DrugRouteDirection.RouteDirectionCode,'%".concat(search, "%',true) || LIKE(DrugRouteDirection.UOM,'%").concat(search, "%',true) || LIKE(DrugRouteDirection.longdesc,'%").concat(search, "%',true)) && DrugRouteDirection.activestatus == true"),
|
|
20630
|
+
"limit": {
|
|
20631
|
+
"offset": page,
|
|
20632
|
+
"count": perPage
|
|
20633
|
+
},
|
|
20634
|
+
"return_fields": "merge(DrugRouteDirection,{TotalCount:COUNT(FOR cnt IN DrugRouteDirection RETURN cnt._key),DoseForm:DOCUMENT(DrugRouteDirection.DoseForm),Action:DOCUMENT(DrugRouteDirection.Action)})"
|
|
20392
20635
|
};
|
|
20393
20636
|
},
|
|
20394
20637
|
DosageFormDropDown: function DosageFormDropDown() {
|
|
@@ -20461,7 +20704,8 @@ var queries$e = {
|
|
|
20461
20704
|
|
|
20462
20705
|
var _extraReducers$s;
|
|
20463
20706
|
var DRUG_ROUTES_DIRECTION_READ = createAsyncThunk("drugRoutesSlice/drug_routes_direction_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
20464
|
-
var
|
|
20707
|
+
var payload,
|
|
20708
|
+
_ref2,
|
|
20465
20709
|
rejectWithValue,
|
|
20466
20710
|
queriesjson,
|
|
20467
20711
|
data,
|
|
@@ -20472,9 +20716,10 @@ var DRUG_ROUTES_DIRECTION_READ = createAsyncThunk("drugRoutesSlice/drug_routes_d
|
|
|
20472
20716
|
while (1) {
|
|
20473
20717
|
switch (_context.prev = _context.next) {
|
|
20474
20718
|
case 0:
|
|
20719
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
20475
20720
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
20476
20721
|
_context.prev = 2;
|
|
20477
|
-
queriesjson = queries$e.fullread();
|
|
20722
|
+
queriesjson = queries$e.fullread(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '');
|
|
20478
20723
|
_context.next = 6;
|
|
20479
20724
|
return fetchData({
|
|
20480
20725
|
body: JSON.stringify(queriesjson)
|
|
@@ -20489,6 +20734,7 @@ var DRUG_ROUTES_DIRECTION_READ = createAsyncThunk("drugRoutesSlice/drug_routes_d
|
|
|
20489
20734
|
var _val$DoseForm, _val$DoseForm2;
|
|
20490
20735
|
|
|
20491
20736
|
arry.push({
|
|
20737
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
20492
20738
|
code: val === null || val === void 0 ? void 0 : val.RouteDirectionCode,
|
|
20493
20739
|
// action_id: val?.Action?._id,
|
|
20494
20740
|
// action: val?.Action?.display,
|
|
@@ -22385,7 +22631,8 @@ var UPSERT_PERFORMINGLOCATION = createAsyncThunk("performLocationSlice/save_perf
|
|
|
22385
22631
|
}, _callee5, null, [[2, 12]]);
|
|
22386
22632
|
})));
|
|
22387
22633
|
var READ_PERFORMINGLOCATION = createAsyncThunk("performLocationSlice/performingLocationRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
22388
|
-
var
|
|
22634
|
+
var payload,
|
|
22635
|
+
_ref12,
|
|
22389
22636
|
rejectWithValue,
|
|
22390
22637
|
read,
|
|
22391
22638
|
data,
|
|
@@ -22395,14 +22642,19 @@ var READ_PERFORMINGLOCATION = createAsyncThunk("performLocationSlice/performingL
|
|
|
22395
22642
|
while (1) {
|
|
22396
22643
|
switch (_context6.prev = _context6.next) {
|
|
22397
22644
|
case 0:
|
|
22645
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
22398
22646
|
_ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
|
|
22399
22647
|
_context6.prev = 2;
|
|
22400
22648
|
read = {
|
|
22401
22649
|
"db_name": dbName$1,
|
|
22402
22650
|
"entity": "CA_PerformingLocationforOrdLocn",
|
|
22403
22651
|
"sort": "CA_PerformingLocationforOrdLocn.createddate",
|
|
22404
|
-
"filter": "CA_PerformingLocationforOrdLocn.activestatus==true",
|
|
22405
|
-
"
|
|
22652
|
+
"filter": "(LIKE(CA_PerformingLocationforOrdLocn.ordering_source_code,'%".concat(payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '', "%',true) || LIKE(CA_PerformingLocationforOrdLocn.service_applicability,'%").concat(payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '', "%',true) || LIKE(CA_PerformingLocationforOrdLocn.ordering_org,'%").concat(payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '', "%',true) ) && CA_PerformingLocationforOrdLocn.activestatus==true"),
|
|
22653
|
+
"limit": {
|
|
22654
|
+
"offset": payload === null || payload === void 0 ? void 0 : payload.page,
|
|
22655
|
+
"count": payload === null || payload === void 0 ? void 0 : payload.perPage
|
|
22656
|
+
},
|
|
22657
|
+
"return_fields": "MERGE(CA_PerformingLocationforOrdLocn,{TotalCount:COUNT(FOR cnt IN CA_PerformingLocationforOrdLocn RETURN cnt._key), 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_details:(FOR perdet IN TO_ARRAY(CA_PerformingLocationforOrdLocn.performing_details) RETURN MERGE(perdet,{performing_org:DOCUMENT(perdet.performing_org),performing_location_role_type:DOCUMENT(perdet.performing_location_role_type),performing_location_code:DOCUMENT(perdet.performing_location_code)}))})"
|
|
22406
22658
|
};
|
|
22407
22659
|
_context6.next = 6;
|
|
22408
22660
|
return fetchData({
|
|
@@ -22601,8 +22853,24 @@ var query$8 = {
|
|
|
22601
22853
|
},
|
|
22602
22854
|
readQuery: function readQuery(_ref2) {
|
|
22603
22855
|
var entity_type = _ref2.entity_type,
|
|
22604
|
-
entity_name = _ref2.entity_name
|
|
22605
|
-
|
|
22856
|
+
entity_name = _ref2.entity_name,
|
|
22857
|
+
_ref2$page = _ref2.page,
|
|
22858
|
+
page = _ref2$page === void 0 ? 0 : _ref2$page,
|
|
22859
|
+
_ref2$perPage = _ref2.perPage,
|
|
22860
|
+
perPage = _ref2$perPage === void 0 ? 10 : _ref2$perPage,
|
|
22861
|
+
_ref2$search = _ref2.search,
|
|
22862
|
+
search = _ref2$search === void 0 ? "" : _ref2$search;
|
|
22863
|
+
return JSON.stringify({
|
|
22864
|
+
db_name: dbName$1,
|
|
22865
|
+
entity: "ResourceTimeTable",
|
|
22866
|
+
filter: "ResourceTimeTable.activestatus==true ".concat(entity_type ? "&& ResourceTimeTable.entityType=='".concat(entity_type.value, "'") : "", " ").concat(entity_name ? "&& ResourceTimeTable.organization_id=='".concat(entity_name.value, "'") : "", " ").concat(search ? "&& UPPER(ResourceTimeTable.timetable_title) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(ResourceTimeTable.ResourceType.display) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(ResourceTimeTable.ResourceRole.display) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
22867
|
+
limit: {
|
|
22868
|
+
offset: page,
|
|
22869
|
+
count: perPage
|
|
22870
|
+
},
|
|
22871
|
+
sort: "ResourceTimeTable.createddate",
|
|
22872
|
+
return_fields: "MERGE(ResourceTimeTable,{TotalCount:COUNT(".concat(search ? "FOR cnt IN ResourceTimeTable filter UPPER(cnt.timetable_title) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.ResourceType.display) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.ResourceRole.display) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN ResourceTimeTable RETURN cnt._key", ") ,organization_id:DOCUMENT(ResourceTimeTable.organization_id),ResourceRole:DOCUMENT(ResourceTimeTable.ResourceRole) ,ResourceType:DOCUMENT(ResourceTimeTable.ResourceType) ,applicable_app_type:(FOR apptype IN TO_ARRAY(ResourceTimeTable.applicable_app_type) RETURN DOCUMENT(apptype)) ,AppointmentDuration:(FOR appdur IN TO_ARRAY(ResourceTimeTable.AppointmentDuration) RETURN MERGE(appdur, {DayType:DOCUMENT(appdur.DayType),consultType:DOCUMENT(appdur.consultType)} )) })")
|
|
22873
|
+
});
|
|
22606
22874
|
},
|
|
22607
22875
|
readGroup: function readGroup() {
|
|
22608
22876
|
return "{\n \"db_name\": \"".concat(ruleDBName, "\",\n \"entity\": \"Groups\",\n \"filter\": \"Groups.activestatus==true\",\n \"return_fields\": \"{label : Groups.name, value:Groups.id}\"\n }");
|
|
@@ -22617,11 +22885,11 @@ var query$8 = {
|
|
|
22617
22885
|
},
|
|
22618
22886
|
applicableAppTypes_: function applicableAppTypes_() {
|
|
22619
22887
|
return {
|
|
22620
|
-
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
|
|
22624
|
-
|
|
22888
|
+
db_name: "primarycare",
|
|
22889
|
+
entity: "CodingMaster",
|
|
22890
|
+
filter: "CodingMaster.Type == 'APPTYPE' && CodingMaster.status == true && CodingMaster.activestatus == true",
|
|
22891
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status','activestatus')",
|
|
22892
|
+
sort: "CodingMaster.display"
|
|
22625
22893
|
};
|
|
22626
22894
|
}
|
|
22627
22895
|
};
|
|
@@ -22841,6 +23109,7 @@ var makeJson = function makeJson(data) {
|
|
|
22841
23109
|
var _val$ResourceType, _val$ResourceRole$dis, _val$ResourceRole, _val$ResourceRole2;
|
|
22842
23110
|
|
|
22843
23111
|
return _objectSpread2(_objectSpread2({}, val), {}, {
|
|
23112
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
22844
23113
|
start_date: utcTOLocal(val.EffectiveFrom, "DD-MM-YYYY"),
|
|
22845
23114
|
end_date: val.EffectiveTo ? utcTOLocal(val.EffectiveTo, "DD-MM-YYYY") : "",
|
|
22846
23115
|
resource_type: val === null || val === void 0 ? void 0 : (_val$ResourceType = val.ResourceType) === null || _val$ResourceType === void 0 ? void 0 : _val$ResourceType.display,
|
|
@@ -22957,6 +23226,9 @@ var actionsList = [{
|
|
|
22957
23226
|
queryName: "readQuery",
|
|
22958
23227
|
type: "List",
|
|
22959
23228
|
url: __readDocumentUrl__,
|
|
23229
|
+
// makePayload: (payload) => {
|
|
23230
|
+
// alert(JSON.stringify(payload))
|
|
23231
|
+
// },
|
|
22960
23232
|
makeReturnData: makeJson
|
|
22961
23233
|
}, {
|
|
22962
23234
|
name: "READ_GROUPS",
|
|
@@ -26066,20 +26338,28 @@ var organizationSlice$1 = organizationSlice.reducer;
|
|
|
26066
26338
|
var organization_role_actions = _objectSpread2({}, organizationActions);
|
|
26067
26339
|
|
|
26068
26340
|
var queries$b = {
|
|
26069
|
-
careTypeRead: function careTypeRead() {
|
|
26341
|
+
careTypeRead: function careTypeRead(page, perPage, search) {
|
|
26070
26342
|
return {
|
|
26071
26343
|
db_name: dbName$1,
|
|
26072
26344
|
entity: "CareType",
|
|
26073
|
-
filter: "CareType.activestatus==true",
|
|
26074
|
-
|
|
26345
|
+
filter: "(LIKE(CareType.careType,'%".concat(search, "%',true) || LIKE(CareType.description,'%").concat(search, "%',true) ) && CareType.activestatus==true"),
|
|
26346
|
+
limit: {
|
|
26347
|
+
"offset": page,
|
|
26348
|
+
"count": perPage
|
|
26349
|
+
},
|
|
26350
|
+
return_fields: "{TotalCount:count(FOR crtype IN CareType FILTER (LIKE(crtype.crtype,'%".concat(search, "%',true) || LIKE(crtype.description,'%").concat(search, "%',true) ) && crtype.activestatus==true return crtype._id), id:CareType.id,_id:CareType._id,careType:CareType.careType,description:CareType.description,carelevelRank:CareType.carelevelRank}")
|
|
26075
26351
|
};
|
|
26076
26352
|
},
|
|
26077
|
-
levelOfCareRead: function levelOfCareRead() {
|
|
26353
|
+
levelOfCareRead: function levelOfCareRead(page, perPage, search) {
|
|
26078
26354
|
return {
|
|
26079
26355
|
db_name: dbName$1,
|
|
26080
26356
|
entity: "LevelOfCare",
|
|
26081
|
-
filter: "LevelOfCare.activestatus==true",
|
|
26082
|
-
|
|
26357
|
+
filter: "(LIKE(LevelOfCare.levelofcareCode,'%".concat(search, "%',true) || LIKE(LevelOfCare.careType,'%").concat(search, "%',true) || LIKE(LevelOfCare.description,'%").concat(search, "%',true)) && LevelOfCare.activestatus==true"),
|
|
26358
|
+
limit: {
|
|
26359
|
+
"offset": page,
|
|
26360
|
+
"count": perPage
|
|
26361
|
+
},
|
|
26362
|
+
return_fields: "{TotalCount:count(FOR lvlofcare IN LevelOfCare FILTER (LIKE(lvlofcare.levelofcareCode,'%".concat(search, "%',true) || LIKE(lvlofcare.careType,'%").concat(search, "%',true) || LIKE(lvlofcare.description,'%").concat(search, "%',true)) && lvlofcare.activestatus==true return lvlofcare._id), id:LevelOfCare.id,_id:LevelOfCare._id,levelofcareCode:LevelOfCare.levelofcareCode,description:LevelOfCare.description,careType:document(LevelOfCare.careType),active:LevelOfCare.active,key:LevelOfCare._key}"),
|
|
26083
26363
|
sort: "LevelOfCare.createddate"
|
|
26084
26364
|
};
|
|
26085
26365
|
},
|
|
@@ -26132,12 +26412,16 @@ var queries$b = {
|
|
|
26132
26412
|
})];
|
|
26133
26413
|
},
|
|
26134
26414
|
//HEALTH CARE SERVICE READ
|
|
26135
|
-
healthCareServiceRead: function healthCareServiceRead() {
|
|
26415
|
+
healthCareServiceRead: function healthCareServiceRead(page, perPage, search) {
|
|
26136
26416
|
return {
|
|
26137
26417
|
db_name: dbName$1,
|
|
26138
26418
|
entity: "HealthcareService",
|
|
26139
|
-
filter: "HealthcareService.activestatus==true",
|
|
26140
|
-
|
|
26419
|
+
filter: "(LIKE(HealthcareService.healthcareservicecode,'%".concat(search, "%',true) || LIKE(HealthcareService.category,'%").concat(search, "%',true) || LIKE(HealthcareService.Type,'%").concat(search, "%',true)) && HealthcareService.activestatus==true"),
|
|
26420
|
+
limit: {
|
|
26421
|
+
"offset": page,
|
|
26422
|
+
"count": perPage
|
|
26423
|
+
},
|
|
26424
|
+
return_fields: "{TotalCount:count(FOR hs IN HealthcareService FILTER (LIKE(hs.healthcareservicecode,'%".concat(search, "%',true) || LIKE(hs.category,'%").concat(search, "%',true) || LIKE(hs.Type,'%").concat(search, "%',true) || LIKE(hs.name,'%").concat(search, "%',true)) && hs.activestatus==true return hs._id), id:HealthcareService.id,_id:HealthcareService._id,_key:HealthcareService._key,active:HealthcareService.active,comment:HealthcareService.comment,SpecialtyID:document(HealthcareService.SpecialtyID),healthcareservicecode:HealthcareService.healthcareservicecode,name:HealthcareService.name,notes:HealthcareService.notes,category:document(HealthcareService.category),Type:document(HealthcareService.Type),applicablefacilities:HealthcareService.applicablefacilities ==null?null :(for hs in TO_ARRAY( HealthcareService.applicablefacilities) return {facility:document(hs.facility),locationtype:document(hs.locationtype),locationid:document(hs.locationid)})}"),
|
|
26141
26425
|
sort: "HealthcareService.createddate"
|
|
26142
26426
|
};
|
|
26143
26427
|
},
|
|
@@ -26453,7 +26737,8 @@ var _extraReducers$n;
|
|
|
26453
26737
|
//CARE TYPE READ
|
|
26454
26738
|
|
|
26455
26739
|
var CARE_TYPE_READ = createAsyncThunk("organizationConfigApiSlice/careTypeRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
26456
|
-
var
|
|
26740
|
+
var payload,
|
|
26741
|
+
_ref2,
|
|
26457
26742
|
rejectWithValue,
|
|
26458
26743
|
data,
|
|
26459
26744
|
arry,
|
|
@@ -26463,11 +26748,12 @@ var CARE_TYPE_READ = createAsyncThunk("organizationConfigApiSlice/careTypeRead",
|
|
|
26463
26748
|
while (1) {
|
|
26464
26749
|
switch (_context.prev = _context.next) {
|
|
26465
26750
|
case 0:
|
|
26751
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
26466
26752
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
26467
26753
|
_context.prev = 2;
|
|
26468
26754
|
_context.next = 5;
|
|
26469
26755
|
return fetchData({
|
|
26470
|
-
body: JSON.stringify(queries$b.careTypeRead())
|
|
26756
|
+
body: JSON.stringify(queries$b.careTypeRead(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
26471
26757
|
}, __readDocumentUrl__);
|
|
26472
26758
|
|
|
26473
26759
|
case 5:
|
|
@@ -26477,6 +26763,7 @@ var CARE_TYPE_READ = createAsyncThunk("organizationConfigApiSlice/careTypeRead",
|
|
|
26477
26763
|
if (data.result) {
|
|
26478
26764
|
data.result.map(function (val) {
|
|
26479
26765
|
arry.push({
|
|
26766
|
+
total_count: val.TotalCount,
|
|
26480
26767
|
id: val.id,
|
|
26481
26768
|
_id: val._id,
|
|
26482
26769
|
careType: val.careType,
|
|
@@ -26506,7 +26793,8 @@ var CARE_TYPE_READ = createAsyncThunk("organizationConfigApiSlice/careTypeRead",
|
|
|
26506
26793
|
}))); //LEVEL OF CARE READ
|
|
26507
26794
|
|
|
26508
26795
|
var LEVEL_OF_CARE_READ = createAsyncThunk("organizationConfigApiSlice/levelOfCareRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
26509
|
-
var
|
|
26796
|
+
var payload,
|
|
26797
|
+
_ref4,
|
|
26510
26798
|
rejectWithValue,
|
|
26511
26799
|
data,
|
|
26512
26800
|
arry,
|
|
@@ -26516,11 +26804,12 @@ var LEVEL_OF_CARE_READ = createAsyncThunk("organizationConfigApiSlice/levelOfCar
|
|
|
26516
26804
|
while (1) {
|
|
26517
26805
|
switch (_context2.prev = _context2.next) {
|
|
26518
26806
|
case 0:
|
|
26807
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
26519
26808
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
26520
26809
|
_context2.prev = 2;
|
|
26521
26810
|
_context2.next = 5;
|
|
26522
26811
|
return fetchData({
|
|
26523
|
-
body: JSON.stringify(queries$b.levelOfCareRead())
|
|
26812
|
+
body: JSON.stringify(queries$b.levelOfCareRead(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
26524
26813
|
}, __readDocumentUrl__);
|
|
26525
26814
|
|
|
26526
26815
|
case 5:
|
|
@@ -26532,6 +26821,7 @@ var LEVEL_OF_CARE_READ = createAsyncThunk("organizationConfigApiSlice/levelOfCar
|
|
|
26532
26821
|
var _val$id, _val$_id, _val$key, _val$levelofcareCode, _val$description, _val$careType$descrip, _val$careType$_id, _val$active;
|
|
26533
26822
|
|
|
26534
26823
|
arry.push({
|
|
26824
|
+
total_count: val.TotalCount,
|
|
26535
26825
|
id: (_val$id = val.id) !== null && _val$id !== void 0 ? _val$id : "",
|
|
26536
26826
|
_id: (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
|
|
26537
26827
|
key: (_val$key = val.key) !== null && _val$key !== void 0 ? _val$key : "",
|
|
@@ -26698,7 +26988,8 @@ var LEVEL_OF_CARE_INSERT = createAsyncThunk("organizationConfigApiSlice/levelOfC
|
|
|
26698
26988
|
}))); //HEALTH CARE SERVICE READ
|
|
26699
26989
|
|
|
26700
26990
|
var HEALTH_CARE_SERVICE_READ = createAsyncThunk("organizationConfigApiSlice/healthCareServiceRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
26701
|
-
var
|
|
26991
|
+
var payload,
|
|
26992
|
+
_ref12,
|
|
26702
26993
|
rejectWithValue,
|
|
26703
26994
|
data,
|
|
26704
26995
|
arry,
|
|
@@ -26708,11 +26999,12 @@ var HEALTH_CARE_SERVICE_READ = createAsyncThunk("organizationConfigApiSlice/heal
|
|
|
26708
26999
|
while (1) {
|
|
26709
27000
|
switch (_context6.prev = _context6.next) {
|
|
26710
27001
|
case 0:
|
|
27002
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
26711
27003
|
_ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
|
|
26712
27004
|
_context6.prev = 2;
|
|
26713
27005
|
_context6.next = 5;
|
|
26714
27006
|
return fetchData({
|
|
26715
|
-
body: JSON.stringify(queries$b.healthCareServiceRead())
|
|
27007
|
+
body: JSON.stringify(queries$b.healthCareServiceRead(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
26716
27008
|
}, __readDocumentUrl__);
|
|
26717
27009
|
|
|
26718
27010
|
case 5:
|
|
@@ -26724,6 +27016,7 @@ var HEALTH_CARE_SERVICE_READ = createAsyncThunk("organizationConfigApiSlice/heal
|
|
|
26724
27016
|
var _val$id2, _val$_id2, _val$_key, _val$healthcareservic, _val$name, _val$category$display, _val$category, _val$Type$display, _val$Type, _val$active2;
|
|
26725
27017
|
|
|
26726
27018
|
arry.push({
|
|
27019
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
26727
27020
|
id: (_val$id2 = val.id) !== null && _val$id2 !== void 0 ? _val$id2 : "",
|
|
26728
27021
|
_id: (_val$_id2 = val._id) !== null && _val$_id2 !== void 0 ? _val$_id2 : "",
|
|
26729
27022
|
_key: (_val$_key = val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
|
|
@@ -28804,9 +29097,13 @@ var queries$7 = {
|
|
|
28804
29097
|
return {
|
|
28805
29098
|
"db_name": dbName$1,
|
|
28806
29099
|
"entity": "Person",
|
|
28807
|
-
"filter": "Person.activestatus==true",
|
|
29100
|
+
"filter": "(LIKE(document(Person.name)[0].given,'%".concat(data.search ? data.search : '', "%',true) || LIKE(document(Person.telecom)[0].value,'%").concat(data.search ? data.search : '', "%',true)) && Person.activestatus==true"),
|
|
28808
29101
|
"sort": "Person.createddate",
|
|
28809
|
-
"
|
|
29102
|
+
"limit": {
|
|
29103
|
+
"offset": data === null || data === void 0 ? void 0 : data.page,
|
|
29104
|
+
"count": data === null || data === void 0 ? void 0 : data.perPage
|
|
29105
|
+
},
|
|
29106
|
+
"return_fields": "merge(Person,{TotalCount:COUNT(FOR cnt IN Person RETURN cnt._key), 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)})"
|
|
28810
29107
|
};
|
|
28811
29108
|
},
|
|
28812
29109
|
person_delete: function person_delete(data) {
|
|
@@ -29739,9 +30036,12 @@ var queries$6 = {
|
|
|
29739
30036
|
practitioner_by_id: function practitioner_by_id(data) {
|
|
29740
30037
|
return {
|
|
29741
30038
|
"db_name": dbName$1,
|
|
29742
|
-
"entity": "Practitioner",
|
|
29743
|
-
"
|
|
29744
|
-
|
|
30039
|
+
// "entity": "Practitioner",
|
|
30040
|
+
"entity": "Person",
|
|
30041
|
+
// "filter": `Practitioner.PersonID==${data.id} && Practitioner.activestatus==true`,
|
|
30042
|
+
"filter": "Person._id =='".concat(data.id, "' && Person.activestatus == true "),
|
|
30043
|
+
// "return_fields": "merge(Practitioner,{identifier:(for doc in IdentifierMaster filter doc._id in Practitioner.identifier return merge(doc,{period:(for cod in doc.period return document(cod))})),address:(for a in Practitioner.address return document(a)),communication:( FOR cod IN CodeableConceptMaster filter cod._id in Practitioner.communication RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),marital_status:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.marital_status RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),name:(for a in Practitioner.name return MERGE(document(a),{period:DOCUMENT(document(a).period)})),nationality:(FOR cod IN SMGeographicMaster filter cod._id==Practitioner.nationality RETURN cod),photo:(for a in Practitioner.photo return document(a)),position:(for pt in CodeableConceptMaster filter pt._id==Practitioner.position return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),practitioner_type:(for pt in CodeableConceptMaster filter pt._id==Practitioner.practitioner_type return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),telecom:(for a in Practitioner.telecom return document(a)),job_experience:(for c in Practitioner.job_experience RETURN merge(c,{jobexperience_contact_details:(for con in c.jobexperience_contact_details return document(con)), jobexperience_address:(for add in c.jobexperience_address return document(add))})),training_details:(for c in Practitioner.training_details RETURN merge(c,{training_contact_details:(for con in c.training_contact_details return document(con)), training_address:(for add in c.training_address return document(add))})),practitioner_role:(for doc in PractitionerRole filter doc._id IN Practitioner.practitioner_role return MERGE(doc,{telecom:(for rol in ContactPointMaster filter rol._id in doc.telecom return rol),role:(for cod in CodeableConceptMaster filter cod._id==doc.role return merge(cod,{coding:(for code in CodingMaster filter code._id in cod.coding return code)})),period:(for per in periodMaster filter per._id in doc.period return per)})),gender:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.gender RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),employee_status:(for pt in CodeableConceptMaster filter pt._id==Practitioner.employee_status return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))}))})"
|
|
30044
|
+
"return_fields": "merge(Person,{OrgID: document(Person.OrgID)},{address: document(Person.address)},{gender: document(Person.gender)},{orgType: document(Person.orgType)},{name: (for doc in document(Person.name) return merge(doc,{period: document(doc.period)},{ use: document(doc.use)},{prefix: document(doc.prefix)},{ suffix: document(doc.suffix)}))},{identifier: (for ide in document(Person.identifier)return merge(ide,{ period: document(ide.period)}))},{ telecom: (for doc in document(Person.telecom) return merge(doc, { system: document(doc.system)},{use: document(document(doc.use).coding)},{ period: document(Person.Person)},{ valueprefix: document(doc.valueprefix) }, {rank: document(document(doc.rank).coding)}))})"
|
|
29745
30045
|
};
|
|
29746
30046
|
}
|
|
29747
30047
|
};
|
|
@@ -30231,7 +30531,8 @@ var GET_ALL_MASTER = createAsyncThunk("alertRestictionsMasterSlice/get_all_maste
|
|
|
30231
30531
|
}, _callee3, null, [[2, 36]]);
|
|
30232
30532
|
})));
|
|
30233
30533
|
var READ_ALERT = createAsyncThunk("orderCatalogApiSlice/orderCatalogRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
30234
|
-
var
|
|
30534
|
+
var payload,
|
|
30535
|
+
_ref8,
|
|
30235
30536
|
rejectWithValue,
|
|
30236
30537
|
read,
|
|
30237
30538
|
data,
|
|
@@ -30241,14 +30542,19 @@ var READ_ALERT = createAsyncThunk("orderCatalogApiSlice/orderCatalogRead", /*#__
|
|
|
30241
30542
|
while (1) {
|
|
30242
30543
|
switch (_context4.prev = _context4.next) {
|
|
30243
30544
|
case 0:
|
|
30545
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
30244
30546
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
30245
30547
|
_context4.prev = 2;
|
|
30246
30548
|
read = {
|
|
30247
30549
|
"db_name": dbName$1,
|
|
30248
30550
|
"entity": "CA_OrderCatalogPrivilegeLevel",
|
|
30249
30551
|
"sort": "CA_OrderCatalogPrivilegeLevel.createddate",
|
|
30250
|
-
"filter": "CA_OrderCatalogPrivilegeLevel.activestatus==true",
|
|
30251
|
-
"
|
|
30552
|
+
"filter": "(LIKE(CA_OrderCatalogPrivilegeLevel.service_applicablity,'%".concat(payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '', "%',true) || LIKE(CA_OrderCatalogPrivilegeLevel.orgn_code,'%").concat(payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '', "%',true)) && CA_OrderCatalogPrivilegeLevel.activestatus==true"),
|
|
30553
|
+
"limit": {
|
|
30554
|
+
"offset": payload === null || payload === void 0 ? void 0 : payload.page,
|
|
30555
|
+
"count": payload === null || payload === void 0 ? void 0 : payload.perPage
|
|
30556
|
+
},
|
|
30557
|
+
"return_fields": "MERGE(CA_OrderCatalogPrivilegeLevel,{TotalCount:COUNT(FOR cnt IN CA_OrderCatalogPrivilegeLevel RETURN cnt._key), orgn_code:document(CA_OrderCatalogPrivilegeLevel.orgn_code),service_applicablity:document(CA_OrderCatalogPrivilegeLevel.service_applicablity),rule_type:document(CA_OrderCatalogPrivilegeLevel.rule_type),privilege_type:document(CA_OrderCatalogPrivilegeLevel.privilege_type),appr_leveles:(for i in TO_ARRAY(CA_OrderCatalogPrivilegeLevel.appr_leveles) return merge(i,{appr_level:document(i.appr_level)}))})"
|
|
30252
30558
|
};
|
|
30253
30559
|
_context4.next = 6;
|
|
30254
30560
|
return fetchData({
|
|
@@ -30323,13 +30629,17 @@ var vitalsMasters = _objectSpread2(_objectSpread2(_objectSpread2({}, vitalsMeasu
|
|
|
30323
30629
|
|
|
30324
30630
|
// import { dbName } from "../../qdm_query_ids";
|
|
30325
30631
|
var queries$5 = {
|
|
30326
|
-
fullread: function fullread() {
|
|
30632
|
+
fullread: function fullread(page, perPage, search) {
|
|
30327
30633
|
return {
|
|
30328
30634
|
db_name: dbName$1,
|
|
30329
30635
|
entity: "DrugUOM",
|
|
30330
|
-
filter: "DrugUOM.activestatus == true",
|
|
30636
|
+
filter: "(LIKE(document(DrugUOM.UOMType).display,'%".concat(search, "%',true) || LIKE(DrugUOM.UOM,'%").concat(search, "%',true) || LIKE(DrugUOM.longdesc,'%").concat(search, "%',true) || LIKE(DrugUOM.shortdesc,'%").concat(search, "%',true) ) && DrugUOM.activestatus == true"),
|
|
30637
|
+
limit: {
|
|
30638
|
+
offset: page,
|
|
30639
|
+
count: perPage
|
|
30640
|
+
},
|
|
30331
30641
|
sort: "DrugUOM.createddate",
|
|
30332
|
-
return_fields: "merge(DrugUOM,{UOMType:(for i in CodingMaster filter i._id == DrugUOM.UOMType return merge(i,{coding:document(i.coding)}))})"
|
|
30642
|
+
return_fields: "merge(DrugUOM,{TotalCount:COUNT(FOR cnt IN DrugUOM RETURN cnt._key), UOMType:(for i in CodingMaster filter i._id == DrugUOM.UOMType return merge(i,{coding:document(i.coding)}))})"
|
|
30333
30643
|
};
|
|
30334
30644
|
},
|
|
30335
30645
|
DRUG_UOM_TYPE: function DRUG_UOM_TYPE() {
|
|
@@ -30351,10 +30661,10 @@ var queries$5 = {
|
|
|
30351
30661
|
// "MERGE(CodeableConceptMaster,{coding: DOCUMENT(CodeableConceptMaster.coding)})",
|
|
30352
30662
|
// };
|
|
30353
30663
|
return {
|
|
30354
|
-
|
|
30355
|
-
|
|
30356
|
-
|
|
30357
|
-
|
|
30664
|
+
db_name: dbName$1,
|
|
30665
|
+
entity: "DrugUOM",
|
|
30666
|
+
filter: "DrugUOM.activestatus == true && DrugUOM.UOMType == '".concat(id, "' && LOWER(DrugUOM.UOM) !=LOWER('").concat(type, "') && DrugUOM.status==true"),
|
|
30667
|
+
return_fields: "{id:DrugUOM.id, _id:DrugUOM._id, UOM:DrugUOM.UOM, longdesc:DrugUOM.longdesc, shortdesc:DrugUOM.shortdesc}"
|
|
30358
30668
|
};
|
|
30359
30669
|
},
|
|
30360
30670
|
To_UOM_Read_line: function To_UOM_Read_line(key) {
|
|
@@ -30481,7 +30791,8 @@ var generateReadJson$1 = {
|
|
|
30481
30791
|
|
|
30482
30792
|
var _extraReducers$e;
|
|
30483
30793
|
var DRUG_UOM_READ = createAsyncThunk("drugRoutesSlice/drug_uom_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
30484
|
-
var
|
|
30794
|
+
var payload,
|
|
30795
|
+
_ref2,
|
|
30485
30796
|
rejectWithValue,
|
|
30486
30797
|
queriesjson,
|
|
30487
30798
|
data,
|
|
@@ -30492,9 +30803,10 @@ var DRUG_UOM_READ = createAsyncThunk("drugRoutesSlice/drug_uom_list", /*#__PURE_
|
|
|
30492
30803
|
while (1) {
|
|
30493
30804
|
switch (_context.prev = _context.next) {
|
|
30494
30805
|
case 0:
|
|
30806
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
30495
30807
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
30496
30808
|
_context.prev = 2;
|
|
30497
|
-
queriesjson = queries$5.fullread();
|
|
30809
|
+
queriesjson = queries$5.fullread(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '');
|
|
30498
30810
|
_context.next = 6;
|
|
30499
30811
|
return fetchData({
|
|
30500
30812
|
body: JSON.stringify(queriesjson)
|
|
@@ -30508,6 +30820,7 @@ var DRUG_UOM_READ = createAsyncThunk("drugRoutesSlice/drug_uom_list", /*#__PURE_
|
|
|
30508
30820
|
var _val$UOMType$;
|
|
30509
30821
|
|
|
30510
30822
|
arry.push({
|
|
30823
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
30511
30824
|
type: val === null || val === void 0 ? void 0 : (_val$UOMType$ = val.UOMType[0]) === null || _val$UOMType$ === void 0 ? void 0 : _val$UOMType$.display,
|
|
30512
30825
|
longDesc: val === null || val === void 0 ? void 0 : val.longdesc,
|
|
30513
30826
|
shortDesc: val === null || val === void 0 ? void 0 : val.shortdesc,
|
|
@@ -30836,12 +31149,17 @@ var drugMasterUOMSlice$1 = drugMasterUOMSlice.reducer;
|
|
|
30836
31149
|
|
|
30837
31150
|
// import { dbName } from "../../qdm_query_ids";
|
|
30838
31151
|
var queries$4 = {
|
|
30839
|
-
fullread: function fullread(
|
|
31152
|
+
fullread: function fullread(page, perPage, search) {
|
|
30840
31153
|
return {
|
|
30841
31154
|
db_name: dbName$1,
|
|
30842
31155
|
entity: "FrequencyMaster",
|
|
30843
31156
|
sort: "FrequencyMaster.freqcode",
|
|
30844
|
-
|
|
31157
|
+
filter: "(LIKE(FrequencyMaster.freqcode,".concat(search, ",true) || LIKE(FrequencyMaster.UOM,").concat(search, ",true) || LIKE(FrequencyMaster.longdesc,").concat(search, ",true)) && FrequencyMaster.activestatus == true"),
|
|
31158
|
+
limit: {
|
|
31159
|
+
offset: page,
|
|
31160
|
+
count: perPage
|
|
31161
|
+
},
|
|
31162
|
+
return_fields: "MERGE(FrequencyMaster,{TotalCount:COUNT(FOR cnt IN FrequencyMaster RETURN cnt._key), scheduleby:DOCUMENT(FrequencyMaster.scheduleby),dosefreqrateUOM:DOCUMENT(FrequencyMaster.dosefreqrateUOM),dosefreqvalUOM:DOCUMENT(FrequencyMaster.dosefreqvalUOM),fixeddurationtype:DOCUMENT(FrequencyMaster.fixeddurationtype),frequencytype:DOCUMENT(FrequencyMaster.frequencytype),startday:DOCUMENT(FrequencyMaster.startday)})"
|
|
30845
31163
|
};
|
|
30846
31164
|
},
|
|
30847
31165
|
SCHEDULEBY: function SCHEDULEBY() {
|
|
@@ -31025,7 +31343,8 @@ var generateReadJson = {
|
|
|
31025
31343
|
|
|
31026
31344
|
var _extraReducers$d;
|
|
31027
31345
|
var DRUG_FREQUENCY_READ = createAsyncThunk("drugMasterFREQUENCYSlice/drug_frequncy_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
31028
|
-
var
|
|
31346
|
+
var payload,
|
|
31347
|
+
_ref2,
|
|
31029
31348
|
rejectWithValue,
|
|
31030
31349
|
queriesjson,
|
|
31031
31350
|
data,
|
|
@@ -31036,9 +31355,10 @@ var DRUG_FREQUENCY_READ = createAsyncThunk("drugMasterFREQUENCYSlice/drug_frequn
|
|
|
31036
31355
|
while (1) {
|
|
31037
31356
|
switch (_context.prev = _context.next) {
|
|
31038
31357
|
case 0:
|
|
31358
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
31039
31359
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
31040
31360
|
_context.prev = 2;
|
|
31041
|
-
queriesjson = queries$4.fullread();
|
|
31361
|
+
queriesjson = queries$4.fullread(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '');
|
|
31042
31362
|
_context.next = 6;
|
|
31043
31363
|
return fetchData({
|
|
31044
31364
|
body: JSON.stringify(queriesjson)
|
|
@@ -31050,6 +31370,7 @@ var DRUG_FREQUENCY_READ = createAsyncThunk("drugMasterFREQUENCYSlice/drug_frequn
|
|
|
31050
31370
|
data.result.map(function (val) {
|
|
31051
31371
|
if (val !== null && val !== void 0 && val._key && val !== null && val !== void 0 && val.longdesc) {
|
|
31052
31372
|
arry.push({
|
|
31373
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
31053
31374
|
code: val === null || val === void 0 ? void 0 : val.freqcode,
|
|
31054
31375
|
longDesc: val === null || val === void 0 ? void 0 : val.longdesc,
|
|
31055
31376
|
shortDesc: val === null || val === void 0 ? void 0 : val.shortdesc,
|
|
@@ -31545,12 +31866,16 @@ var drugFrequencySlice = drugMasterFREQUENCYSlice.reducer;
|
|
|
31545
31866
|
var drug_actions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, drugCategoryActions), drugDosageActions), drugClassActions), drugRoutesActions), drugDirectionRoutesActions), drugMasterUomActions), drugMasterActions), drugMasterFrequencyActions);
|
|
31546
31867
|
|
|
31547
31868
|
var query$5 = {
|
|
31548
|
-
orderSetList: function orderSetList() {
|
|
31869
|
+
orderSetList: function orderSetList(page, perPage, search) {
|
|
31549
31870
|
return {
|
|
31550
31871
|
db_name: "".concat(dbName$1),
|
|
31551
31872
|
entity: "CA_OrderSet",
|
|
31552
|
-
filter: "CA_OrderSet.activestatus == true",
|
|
31553
|
-
|
|
31873
|
+
filter: "CA_OrderSet.activestatus == true ".concat(search ? "&& UPPER(CA_OrderSet.orderSetCode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(CA_OrderSet.shortDesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(CA_OrderSet.longDesc) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
31874
|
+
limit: {
|
|
31875
|
+
"offset": page,
|
|
31876
|
+
"count": perPage
|
|
31877
|
+
},
|
|
31878
|
+
return_fields: "MERGE(keep(CA_OrderSet,'id','_key','_id','longDesc','shortDesc','orderSetCode','status'),{TotalCount:COUNT(".concat(search ? "FOR cnt IN CA_OrderSet filter UPPER(cnt.orderSetCode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.shortDesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.longDesc) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN CA_OrderSet RETURN cnt._key", ")})"),
|
|
31554
31879
|
sort: "CA_OrderSet.createddate"
|
|
31555
31880
|
};
|
|
31556
31881
|
},
|
|
@@ -32107,7 +32432,8 @@ var fetchMaster$3 = function fetchMaster(name, query) {
|
|
|
32107
32432
|
|
|
32108
32433
|
|
|
32109
32434
|
var GET_ORDER_SET_LIST = createAsyncThunk("orderSetMasterApiSlice/order_set_master_lis", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
32110
|
-
var
|
|
32435
|
+
var payload,
|
|
32436
|
+
_ref5,
|
|
32111
32437
|
rejectWithValue,
|
|
32112
32438
|
data,
|
|
32113
32439
|
_args4 = arguments;
|
|
@@ -32116,32 +32442,33 @@ var GET_ORDER_SET_LIST = createAsyncThunk("orderSetMasterApiSlice/order_set_mast
|
|
|
32116
32442
|
while (1) {
|
|
32117
32443
|
switch (_context4.prev = _context4.next) {
|
|
32118
32444
|
case 0:
|
|
32445
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
32119
32446
|
_ref5 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
|
|
32120
32447
|
_context4.prev = 2;
|
|
32121
|
-
_context4.next =
|
|
32448
|
+
_context4.next = 6;
|
|
32122
32449
|
return fetchData({
|
|
32123
|
-
body: JSON.stringify(query$5.orderSetList())
|
|
32450
|
+
body: JSON.stringify(query$5.orderSetList(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ''))
|
|
32124
32451
|
}, __readDocumentUrl__);
|
|
32125
32452
|
|
|
32126
|
-
case
|
|
32453
|
+
case 6:
|
|
32127
32454
|
data = _context4.sent;
|
|
32128
32455
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
32129
32456
|
data: data.result
|
|
32130
32457
|
}));
|
|
32131
32458
|
|
|
32132
|
-
case
|
|
32133
|
-
_context4.prev =
|
|
32459
|
+
case 10:
|
|
32460
|
+
_context4.prev = 10;
|
|
32134
32461
|
_context4.t0 = _context4["catch"](2);
|
|
32135
32462
|
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
32136
32463
|
message: _context4.t0.message
|
|
32137
32464
|
})));
|
|
32138
32465
|
|
|
32139
|
-
case
|
|
32466
|
+
case 13:
|
|
32140
32467
|
case "end":
|
|
32141
32468
|
return _context4.stop();
|
|
32142
32469
|
}
|
|
32143
32470
|
}
|
|
32144
|
-
}, _callee4, null, [[2,
|
|
32471
|
+
}, _callee4, null, [[2, 10]]);
|
|
32145
32472
|
}))); //ORDER_SET_MASTER_STATUS_CHANGE
|
|
32146
32473
|
|
|
32147
32474
|
var ORDER_SET_MASTER_STATUS_CHANGE = createAsyncThunk("orderSetMasterApiSlice/order_set_master_status_chang", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
@@ -33644,16 +33971,16 @@ var orderSetApplicabilityActions = {
|
|
|
33644
33971
|
var orderSetApplicabilitySlice$1 = orderSetApplicabilitySlice.reducer;
|
|
33645
33972
|
|
|
33646
33973
|
var query$3 = {
|
|
33647
|
-
getList: function getList(page, perpage) {
|
|
33974
|
+
getList: function getList(page, perpage, search) {
|
|
33648
33975
|
return {
|
|
33649
33976
|
db_name: "".concat(dbName$1),
|
|
33650
33977
|
entity: "AllergyMaster",
|
|
33651
|
-
filter: "AllergyMaster.activestatus == true",
|
|
33978
|
+
filter: "AllergyMaster.activestatus == true ".concat(search ? "&& UPPER(AllergyMaster.code) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(AllergyMaster.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(AllergyMaster.longdesc) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
33652
33979
|
limit: {
|
|
33653
33980
|
offset: page,
|
|
33654
33981
|
count: perpage
|
|
33655
33982
|
},
|
|
33656
|
-
return_fields: "{TotalCount:
|
|
33983
|
+
return_fields: "{TotalCount:count(FOR cnt IN AllergyMaster FILTER (LIKE(AllergyMaster.code,'%".concat(search, "%',true) || LIKE(AllergyMaster.shortdesc,'%").concat(search, "%',true) || LIKE(AllergyMaster.longdesc,'%").concat(search, "%',true) ) && cnt.activestatus==true return cnt._key),AllergyMaster:merge(AllergyMaster,{extsystemsourceid:document(AllergyMaster.extsystemsourceid)},{conceptidtype:document(AllergyMaster.conceptidtype)},{allergytypeind:document(AllergyMaster.allergytypeind)})}"),
|
|
33657
33984
|
sort: "AllergyMaster.shortdesc"
|
|
33658
33985
|
};
|
|
33659
33986
|
}
|
|
@@ -33842,6 +34169,7 @@ var GET_ALLERGEN_MASTER = createAsyncThunk("allergenMasterApiSlice/allergen_mast
|
|
|
33842
34169
|
rejectWithValue,
|
|
33843
34170
|
_page,
|
|
33844
34171
|
_perpage,
|
|
34172
|
+
_search,
|
|
33845
34173
|
data,
|
|
33846
34174
|
readJSON,
|
|
33847
34175
|
_args4 = arguments;
|
|
@@ -33852,14 +34180,15 @@ var GET_ALLERGEN_MASTER = createAsyncThunk("allergenMasterApiSlice/allergen_mast
|
|
|
33852
34180
|
case 0:
|
|
33853
34181
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {
|
|
33854
34182
|
page: page,
|
|
33855
|
-
perpage: perpage
|
|
34183
|
+
perpage: perpage,
|
|
34184
|
+
search: search
|
|
33856
34185
|
};
|
|
33857
34186
|
_ref5 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
|
|
33858
34187
|
_context4.prev = 2;
|
|
33859
|
-
_page = payload.page, _perpage = payload.perpage;
|
|
34188
|
+
_page = payload.page, _perpage = payload.perpage, _search = payload.search;
|
|
33860
34189
|
_context4.next = 6;
|
|
33861
34190
|
return fetchData({
|
|
33862
|
-
body: JSON.stringify(query$3.getList(_page, _perpage))
|
|
34191
|
+
body: JSON.stringify(query$3.getList(_page, _perpage, _search ? _search : ''))
|
|
33863
34192
|
}, __readDocumentUrl__);
|
|
33864
34193
|
|
|
33865
34194
|
case 6:
|
|
@@ -34074,7 +34403,7 @@ var flexQuery = {
|
|
|
34074
34403
|
offset: page,
|
|
34075
34404
|
count: perpage
|
|
34076
34405
|
},
|
|
34077
|
-
return_fields: "merge(CA_OrderAttribMaster,{TotalCount:COUNT(FOR cnt IN CA_OrderAttribMaster
|
|
34406
|
+
return_fields: "merge(CA_OrderAttribMaster,{TotalCount:COUNT(FOR cnt IN CA_OrderAttribMaster FILTER (LIKE(cnt.attribcode,'%".concat(search, "%',true) ) && cnt.activestatus==true return cnt._id),attribtype:document(CA_OrderAttribMaster.attribtype).display},{attribnumUOM:to_array(document(CA_OrderAttribMaster.attribnumUOM).display)})"),
|
|
34078
34407
|
sort: "CA_OrderAttribMaster.createddate desc"
|
|
34079
34408
|
};
|
|
34080
34409
|
},
|
|
@@ -34313,7 +34642,7 @@ var FLEX_ATTRIBUTE_READ = createAsyncThunk("flexAttributeApiSlice/flexFullRead",
|
|
|
34313
34642
|
page = payload.page, perpage = payload.perpage, search = payload.search;
|
|
34314
34643
|
_context3.next = 6;
|
|
34315
34644
|
return fetchData({
|
|
34316
|
-
body: JSON.stringify(flexQuery.flexAttrFullRead(page, perpage, search))
|
|
34645
|
+
body: JSON.stringify(flexQuery.flexAttrFullRead(page, perpage, search ? search : ''))
|
|
34317
34646
|
}, __readDocumentUrl__);
|
|
34318
34647
|
|
|
34319
34648
|
case 6:
|
|
@@ -34596,7 +34925,7 @@ var flexCriteriaQuery = {
|
|
|
34596
34925
|
offset: page,
|
|
34597
34926
|
count: perpage
|
|
34598
34927
|
},
|
|
34599
|
-
return_fields: "merge(CA_FlexAttribApplicability, {TotalCount:
|
|
34928
|
+
return_fields: "merge(CA_FlexAttribApplicability, {TotalCount:count(FOR cnt IN CA_FlexAttribApplicability FILTER (LIKE(cnt.winlabelName,'%".concat(search, "%',true)) && cnt.activestatus==true return cnt._id)},{AttribComponents:( for att in CA_FlexAttribApplicability.AttribComponents return merge(att,{attribCode:merge(document(att.attribCode),{attribtype:document(document(att.attribCode).attribtype)})}) )})"),
|
|
34600
34929
|
sort: "CA_FlexAttribApplicability.createddate desc"
|
|
34601
34930
|
};
|
|
34602
34931
|
},
|
|
@@ -34798,7 +35127,7 @@ var FLEX_CRITERIA_FULL_READ = createAsyncThunk("flexCriteriaSlice/flexCriteriaFu
|
|
|
34798
35127
|
page = payload.page, perpage = payload.perpage, search = payload.search;
|
|
34799
35128
|
_context3.next = 6;
|
|
34800
35129
|
return fetchData({
|
|
34801
|
-
body: JSON.stringify(flexCriteriaQuery.flexCriteriaFullRead(page, perpage, search))
|
|
35130
|
+
body: JSON.stringify(flexCriteriaQuery.flexCriteriaFullRead(page, perpage, search ? search : ''))
|
|
34802
35131
|
}, __readDocumentUrl__);
|
|
34803
35132
|
|
|
34804
35133
|
case 6:
|
|
@@ -36716,13 +37045,18 @@ var queries$2 = {
|
|
|
36716
37045
|
})];
|
|
36717
37046
|
}
|
|
36718
37047
|
},
|
|
36719
|
-
get_general_master_type: function get_general_master_type(type) {
|
|
37048
|
+
get_general_master_type: function get_general_master_type(type, page, perPage, search) {
|
|
37049
|
+
debugger;
|
|
36720
37050
|
return {
|
|
36721
37051
|
"db_name": dbName$1,
|
|
36722
37052
|
"entity": "CodeableConceptMaster",
|
|
36723
37053
|
"sort": "document(CodeableConceptMaster.coding[0]).display",
|
|
36724
|
-
"filter": "CodeableConceptMaster.Type=='".concat(type, "' && CodeableConceptMaster.activestatus==true"),
|
|
36725
|
-
"
|
|
37054
|
+
"filter": "CodeableConceptMaster.Type == '".concat(type, "' && (LIKE(CodeableConceptMaster.shortdesc,'%").concat(search, "%',true) || LIKE(CodeableConceptMaster.longdesc,'%").concat(search, "%',true) || LIKE(CodeableConceptMaster.code,'%").concat(search, "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true"),
|
|
37055
|
+
"limit": {
|
|
37056
|
+
"offset": page,
|
|
37057
|
+
"count": perPage
|
|
37058
|
+
},
|
|
37059
|
+
"return_fields": "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='".concat(type, "' filter cnt.activestatus==true RETURN cnt._key), coding:document(CodeableConceptMaster.coding)})")
|
|
36726
37060
|
};
|
|
36727
37061
|
},
|
|
36728
37062
|
add_new_general_type: function add_new_general_type(data) {
|
|
@@ -37156,6 +37490,9 @@ var GET_GENERAL_MASTER_TYPE = createAsyncThunk("generalMasterSlice/get_general_m
|
|
|
37156
37490
|
var payload,
|
|
37157
37491
|
actions,
|
|
37158
37492
|
type,
|
|
37493
|
+
page,
|
|
37494
|
+
perPage,
|
|
37495
|
+
search,
|
|
37159
37496
|
data,
|
|
37160
37497
|
readData,
|
|
37161
37498
|
_args7 = arguments;
|
|
@@ -37167,10 +37504,10 @@ var GET_GENERAL_MASTER_TYPE = createAsyncThunk("generalMasterSlice/get_general_m
|
|
|
37167
37504
|
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
37168
37505
|
actions = _args7.length > 1 ? _args7[1] : undefined;
|
|
37169
37506
|
_context7.prev = 2;
|
|
37170
|
-
type = payload.type;
|
|
37507
|
+
type = payload.type, page = payload.page, perPage = payload.perPage, search = payload.search;
|
|
37171
37508
|
_context7.next = 7;
|
|
37172
37509
|
return fetchData({
|
|
37173
|
-
body: JSON.stringify(queries$2.get_general_master_type(type))
|
|
37510
|
+
body: JSON.stringify(queries$2.get_general_master_type(type, page, perPage, search ? search : ''))
|
|
37174
37511
|
}, __readDocumentUrl__);
|
|
37175
37512
|
|
|
37176
37513
|
case 7:
|
|
@@ -37553,12 +37890,16 @@ var queries$1 = {
|
|
|
37553
37890
|
}
|
|
37554
37891
|
})];
|
|
37555
37892
|
},
|
|
37556
|
-
symptom_and_specialty_read: function symptom_and_specialty_read() {
|
|
37893
|
+
symptom_and_specialty_read: function symptom_and_specialty_read(search, page, perPage) {
|
|
37557
37894
|
return {
|
|
37558
37895
|
db_name: dbName$1,
|
|
37559
37896
|
entity: "SymptomsMapping",
|
|
37560
|
-
filter: "SymptomsMapping.activestatus==true",
|
|
37561
|
-
|
|
37897
|
+
filter: "SymptomsMapping.activestatus==true ".concat(search ? "&& UPPER(SymptomsMapping.SymptomsName) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(SymptomsMapping.symptomsCode) LIKE '%").concat(search.toUpperCase(), "%'") : ""),
|
|
37898
|
+
limit: {
|
|
37899
|
+
offset: page,
|
|
37900
|
+
count: perPage
|
|
37901
|
+
},
|
|
37902
|
+
return_fields: "merge(SymptomsMapping,{TotalCount:COUNT(".concat(search ? "FOR cnt IN SymptomsMapping filter UPPER(cnt.SymptomsName) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.symptomsCode) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN SymptomsMapping RETURN cnt._key", " ), specialty:(FOR cod IN CodeableConceptMaster filter cod._id in SymptomsMapping.specialty RETURN merge(cod,{coding:document(cod.coding)}))})"),
|
|
37562
37903
|
sort: "SymptomsMapping.createddate"
|
|
37563
37904
|
};
|
|
37564
37905
|
},
|
|
@@ -37694,7 +38035,8 @@ var constructSingleReadJSON = function constructSingleReadJSON(data) {
|
|
|
37694
38035
|
};
|
|
37695
38036
|
|
|
37696
38037
|
var SYMPTOM_AND_SPECIALTY_READ = createAsyncThunk("symptomAndSpecialtySlice/symptom_and_specialty_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
37697
|
-
var
|
|
38038
|
+
var payload,
|
|
38039
|
+
_ref4,
|
|
37698
38040
|
rejectWithValue,
|
|
37699
38041
|
readqueries,
|
|
37700
38042
|
data,
|
|
@@ -37705,9 +38047,10 @@ var SYMPTOM_AND_SPECIALTY_READ = createAsyncThunk("symptomAndSpecialtySlice/symp
|
|
|
37705
38047
|
while (1) {
|
|
37706
38048
|
switch (_context2.prev = _context2.next) {
|
|
37707
38049
|
case 0:
|
|
38050
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
37708
38051
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
37709
38052
|
_context2.prev = 2;
|
|
37710
|
-
readqueries = queries$1.symptom_and_specialty_read();
|
|
38053
|
+
readqueries = queries$1.symptom_and_specialty_read(payload === null || payload === void 0 ? void 0 : payload.search, payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage);
|
|
37711
38054
|
_context2.next = 6;
|
|
37712
38055
|
return fetchData({
|
|
37713
38056
|
body: JSON.stringify(readqueries)
|
|
@@ -37719,6 +38062,7 @@ var SYMPTOM_AND_SPECIALTY_READ = createAsyncThunk("symptomAndSpecialtySlice/symp
|
|
|
37719
38062
|
data.result.map(function (val) {
|
|
37720
38063
|
if (val._key) {
|
|
37721
38064
|
arry.push({
|
|
38065
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
37722
38066
|
id: val.id ? val.id : 0,
|
|
37723
38067
|
_key: val._key ? val._key : "",
|
|
37724
38068
|
status: val.status ? val.status : false,
|
|
@@ -37941,20 +38285,18 @@ var symptomAndSpecialtyActions = {
|
|
|
37941
38285
|
var symptomAndSpecialtySlice$1 = symptomAndSpecialtySlice.reducer;
|
|
37942
38286
|
|
|
37943
38287
|
var queries = {
|
|
37944
|
-
encounterType: function encounterType(
|
|
37945
|
-
// return {
|
|
37946
|
-
// "db_name": dbName,
|
|
37947
|
-
// "entity": "AMPatientClass",
|
|
37948
|
-
// "filter": "AMPatientClass.activestatus==true",
|
|
37949
|
-
// "return_fields": "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
|
|
37950
|
-
// "sort": "document(AMPatientClass.encTypeDesc).display"
|
|
37951
|
-
// }
|
|
38288
|
+
encounterType: function encounterType(page, perPage, search) {
|
|
37952
38289
|
return {
|
|
37953
38290
|
"db_name": dbName$1,
|
|
37954
38291
|
"entity": "AMPatientClass",
|
|
37955
|
-
"filter": "AMPatientClass.activestatus==true",
|
|
37956
|
-
"
|
|
37957
|
-
|
|
38292
|
+
"filter": "(LIKE(AMPatientClass.shortDesc,'%".concat(search, "%',true) ) && AMPatientClass.activestatus==true"),
|
|
38293
|
+
"limit": {
|
|
38294
|
+
"offset": page,
|
|
38295
|
+
"count": perPage
|
|
38296
|
+
},
|
|
38297
|
+
"return_fields": "merge(AMPatientClass,{TotalCount:count(FOR cnt IN AMPatientClass FILTER (LIKE(cnt.shortDesc,'%".concat(search, "%',true)) && cnt.activestatus==true return cnt._key), encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})"),
|
|
38298
|
+
// "merge(AMPatientClass,{encClsByTypes:(for encClsByTypes in (AMPatientClass.encClsByTypes) return merge(encClsByTypes,{encClsType:document(encClsByTypes.encClsType)}))},{encType:document(AMPatientClass.encType)})"
|
|
38299
|
+
"sort": "document(AMPatientClass.encTypeDesc).display"
|
|
37958
38300
|
};
|
|
37959
38301
|
},
|
|
37960
38302
|
//STATUS CHANGE
|
|
@@ -37976,7 +38318,8 @@ var queries = {
|
|
|
37976
38318
|
|
|
37977
38319
|
var _extraReducers$2;
|
|
37978
38320
|
var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
37979
|
-
var
|
|
38321
|
+
var payload,
|
|
38322
|
+
_ref2,
|
|
37980
38323
|
rejectWithValue,
|
|
37981
38324
|
queriesjson,
|
|
37982
38325
|
data,
|
|
@@ -37987,9 +38330,10 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
|
|
|
37987
38330
|
while (1) {
|
|
37988
38331
|
switch (_context.prev = _context.next) {
|
|
37989
38332
|
case 0:
|
|
38333
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
37990
38334
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
37991
38335
|
_context.prev = 2;
|
|
37992
|
-
queriesjson = queries.encounterType();
|
|
38336
|
+
queriesjson = queries.encounterType(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '');
|
|
37993
38337
|
_context.next = 6;
|
|
37994
38338
|
return fetchData({
|
|
37995
38339
|
body: JSON.stringify(queriesjson)
|
|
@@ -38003,6 +38347,11 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
|
|
|
38003
38347
|
var _val$id, _val$_id, _val$encType$display, _val$encType, _val$encType$code, _val$encType2;
|
|
38004
38348
|
|
|
38005
38349
|
arry.push(_objectSpread2({
|
|
38350
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
38351
|
+
// id: val?.id,
|
|
38352
|
+
// description: val?.encTypeDesc,
|
|
38353
|
+
// code: val?.encType,
|
|
38354
|
+
// encounter_class: val?.encClsDesc + " ( " +val?.encClsType + " )",
|
|
38006
38355
|
id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : "",
|
|
38007
38356
|
_id: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
|
|
38008
38357
|
description: (_val$encType$display = val === null || val === void 0 ? void 0 : (_val$encType = val.encType) === null || _val$encType === void 0 ? void 0 : _val$encType.display) !== null && _val$encType$display !== void 0 ? _val$encType$display : "",
|