primary_care_admin_binder 0.1.52 → 0.1.53
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 +1497 -249
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2235,6 +2235,10 @@ function unwrapResult(action) {
|
|
|
2235
2235
|
// src/index.ts
|
|
2236
2236
|
N();
|
|
2237
2237
|
|
|
2238
|
+
var httpMessage = {
|
|
2239
|
+
OkMessage: "200 Successful",
|
|
2240
|
+
ErroMessage: "500 Internal server error"
|
|
2241
|
+
};
|
|
2238
2242
|
var defaultReject = {
|
|
2239
2243
|
loading: false,
|
|
2240
2244
|
error: true,
|
|
@@ -8264,8 +8268,11 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8264
8268
|
|
|
8265
8269
|
if (data.identification && data.identification.length > 0) {
|
|
8266
8270
|
data.identification.map(function (val) {
|
|
8271
|
+
var _val$_key;
|
|
8272
|
+
|
|
8267
8273
|
var data = {
|
|
8268
8274
|
// "_id": "string",
|
|
8275
|
+
"_key": (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
|
|
8269
8276
|
"user": val.id_type.value ? val.id_type.value : "",
|
|
8270
8277
|
"system": "",
|
|
8271
8278
|
"value": val.id_number ? val.id_number : "",
|
|
@@ -8289,8 +8296,11 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8289
8296
|
|
|
8290
8297
|
if (data.names && data.names.length > 0) {
|
|
8291
8298
|
data.names.map(function (val) {
|
|
8299
|
+
var _val$_key2;
|
|
8300
|
+
|
|
8292
8301
|
var nameData = {
|
|
8293
8302
|
// "_id": "string",
|
|
8303
|
+
"_key": (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : "",
|
|
8294
8304
|
"use": val.use ? val.use.value : "",
|
|
8295
8305
|
"text": val.first_name ? val.first_name : "",
|
|
8296
8306
|
"family": val.last_name ? val.last_name : "",
|
|
@@ -8346,6 +8356,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8346
8356
|
|
|
8347
8357
|
if (data.practitionerbyrole && data.practitionerbyrole.length > 0) {
|
|
8348
8358
|
data.practitionerbyrole.map(function (val) {
|
|
8359
|
+
var _val$speciality, _val$speciality2, _val$select_entity, _val$select_entity2, _val$entity_name, _val$entity_name2, _val$entity_name3, _val$entity_name4, _val$select_location, _val$select_location2;
|
|
8360
|
+
|
|
8349
8361
|
var key = {};
|
|
8350
8362
|
var roleId = {};
|
|
8351
8363
|
|
|
@@ -8369,14 +8381,14 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
|
|
|
8369
8381
|
end: val.end_date ? getUtcTime(moment(val.end_date)) : null // "id": "number"
|
|
8370
8382
|
|
|
8371
8383
|
}],
|
|
8372
|
-
SpecialtyID: val.speciality ? val.speciality.value : "",
|
|
8373
|
-
EntityType: val.select_entity ? val.select_entity._id : "",
|
|
8374
|
-
OrgID: val.entity_name ? "".concat(val.entity_name.value) : "",
|
|
8375
|
-
EntityName: val.entity_name ? "".concat(val.entity_name.value) : "",
|
|
8376
|
-
locationID: val.select_location ? val.select_location.value : "",
|
|
8377
|
-
primary_specialty: val.primary_specialty ? val.primary_specialty : false,
|
|
8384
|
+
SpecialtyID: val !== null && val !== void 0 && (_val$speciality = val.speciality) !== null && _val$speciality !== void 0 && _val$speciality.value ? val === null || val === void 0 ? void 0 : (_val$speciality2 = val.speciality) === null || _val$speciality2 === void 0 ? void 0 : _val$speciality2.value : "",
|
|
8385
|
+
EntityType: val !== null && val !== void 0 && (_val$select_entity = val.select_entity) !== null && _val$select_entity !== void 0 && _val$select_entity._id ? val === null || val === void 0 ? void 0 : (_val$select_entity2 = val.select_entity) === null || _val$select_entity2 === void 0 ? void 0 : _val$select_entity2._id : "",
|
|
8386
|
+
OrgID: val !== null && val !== void 0 && (_val$entity_name = val.entity_name) !== null && _val$entity_name !== void 0 && _val$entity_name.value ? "".concat(val === null || val === void 0 ? void 0 : (_val$entity_name2 = val.entity_name) === null || _val$entity_name2 === void 0 ? void 0 : _val$entity_name2.value) : "",
|
|
8387
|
+
EntityName: val !== null && val !== void 0 && (_val$entity_name3 = val.entity_name) !== null && _val$entity_name3 !== void 0 && _val$entity_name3.value ? "".concat(val === null || val === void 0 ? void 0 : (_val$entity_name4 = val.entity_name) === null || _val$entity_name4 === void 0 ? void 0 : _val$entity_name4.value) : "",
|
|
8388
|
+
locationID: val !== null && val !== void 0 && (_val$select_location = val.select_location) !== null && _val$select_location !== void 0 && _val$select_location.value ? val === null || val === void 0 ? void 0 : (_val$select_location2 = val.select_location) === null || _val$select_location2 === void 0 ? void 0 : _val$select_location2.value : "",
|
|
8389
|
+
primary_specialty: val !== null && val !== void 0 && val.primary_specialty ? val === null || val === void 0 ? void 0 : val.primary_specialty : false,
|
|
8378
8390
|
telecom: contactList(val.contact),
|
|
8379
|
-
files: val.doc ? val.doc : []
|
|
8391
|
+
files: val !== null && val !== void 0 && val.doc ? val === null || val === void 0 ? void 0 : val.doc : []
|
|
8380
8392
|
}, roleId), key);
|
|
8381
8393
|
|
|
8382
8394
|
practitioner_list.push(practitionerData);
|
|
@@ -8912,7 +8924,7 @@ var practitionerActions$1 = {
|
|
|
8912
8924
|
};
|
|
8913
8925
|
var practitionerSlice$1 = practitionerSlice.reducer;
|
|
8914
8926
|
|
|
8915
|
-
var masterQuery$
|
|
8927
|
+
var masterQuery$6 = {
|
|
8916
8928
|
"id_type": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ALTERNATEIDTYPE' && CodeableConceptMaster.status == true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8917
8929
|
"id_number": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='RELATIONSHIP'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8918
8930
|
"prefix": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='NAMEPREFIX'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
@@ -8941,7 +8953,7 @@ var masterQuery$7 = {
|
|
|
8941
8953
|
"priority": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='PRIORITY'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8942
8954
|
"address_type": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ADDRESSTYPE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8943
8955
|
"role": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='PRACTROLE' && CodeableConceptMaster.status == true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
8944
|
-
"location": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && LocationMaster.status=='active'\"
|
|
8956
|
+
"location": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && lower(LocationMaster.status)=='active'\", \n \"return_fields\": \"LocationMaster\"\n }"),
|
|
8945
8957
|
// "city": `{
|
|
8946
8958
|
// "db_name": "${dbName}",
|
|
8947
8959
|
// "entity": "SMGeographicMaster",
|
|
@@ -9159,7 +9171,7 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9159
9171
|
|
|
9160
9172
|
if (data.identifier && ((_data$identifier = data.identifier) === null || _data$identifier === void 0 ? void 0 : _data$identifier.length) > 0) {
|
|
9161
9173
|
data.identifier.map(function (val) {
|
|
9162
|
-
var _val$user;
|
|
9174
|
+
var _val$user, _val$_key;
|
|
9163
9175
|
|
|
9164
9176
|
var identifierData = {
|
|
9165
9177
|
"id_type": ((_val$user = val.user) === null || _val$user === void 0 ? void 0 : _val$user.length) > 0 && masters.id_type.filter(function (idlabel) {
|
|
@@ -9169,7 +9181,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9169
9181
|
})[0] : {},
|
|
9170
9182
|
"id_number": val.value,
|
|
9171
9183
|
"expiry_date": val.period[0].end ? utcTOLocal(val.period[0].end, "YYYY-MM-DD") : null,
|
|
9172
|
-
"doc": val.files
|
|
9184
|
+
"doc": val.files,
|
|
9185
|
+
_key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : ""
|
|
9173
9186
|
};
|
|
9174
9187
|
identifier.push(identifierData);
|
|
9175
9188
|
});
|
|
@@ -9179,6 +9192,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9179
9192
|
|
|
9180
9193
|
if (data.name && ((_data$name = data.name) === null || _data$name === void 0 ? void 0 : _data$name.length) > 0) {
|
|
9181
9194
|
data.name.map(function (val) {
|
|
9195
|
+
var _val$_key2;
|
|
9196
|
+
|
|
9182
9197
|
var namedatas = {
|
|
9183
9198
|
use: val.use ? masters.use.filter(function (idlabel) {
|
|
9184
9199
|
return idlabel.value === val.use;
|
|
@@ -9191,7 +9206,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9191
9206
|
last_name: val.family,
|
|
9192
9207
|
suffix: val.suffix ? masters.suffix.filter(function (idlabel) {
|
|
9193
9208
|
return idlabel.value === val.suffix;
|
|
9194
|
-
})[0] : {}
|
|
9209
|
+
})[0] : {},
|
|
9210
|
+
_key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : ""
|
|
9195
9211
|
};
|
|
9196
9212
|
nameslist.push(namedatas);
|
|
9197
9213
|
});
|
|
@@ -9428,14 +9444,14 @@ var loopMasters$8 = function loopMasters() {
|
|
|
9428
9444
|
while (1) {
|
|
9429
9445
|
switch (_context2.prev = _context2.next) {
|
|
9430
9446
|
case 0:
|
|
9431
|
-
calls = Object.keys(masterQuery$
|
|
9447
|
+
calls = Object.keys(masterQuery$6).map( /*#__PURE__*/function () {
|
|
9432
9448
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {
|
|
9433
9449
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
9434
9450
|
while (1) {
|
|
9435
9451
|
switch (_context.prev = _context.next) {
|
|
9436
9452
|
case 0:
|
|
9437
9453
|
_context.next = 2;
|
|
9438
|
-
return fetchMaster$8(val, masterQuery$
|
|
9454
|
+
return fetchMaster$8(val, masterQuery$6[val]);
|
|
9439
9455
|
|
|
9440
9456
|
case 2:
|
|
9441
9457
|
return _context.abrupt("return", _context.sent);
|
|
@@ -12863,7 +12879,7 @@ var locationActions$1 = {
|
|
|
12863
12879
|
};
|
|
12864
12880
|
var locationSlice$1 = locationSlice.reducer;
|
|
12865
12881
|
|
|
12866
|
-
var masterQuery$
|
|
12882
|
+
var masterQuery$5 = {
|
|
12867
12883
|
locationMasterEntityType: function locationMasterEntityType() {
|
|
12868
12884
|
return {
|
|
12869
12885
|
db_name: dbName$1,
|
|
@@ -13383,7 +13399,7 @@ var LOCATION_MASTERS_ENTITYTYPE = createAsyncThunk("locationMasterSlice/location
|
|
|
13383
13399
|
_context.prev = 2;
|
|
13384
13400
|
_context.next = 5;
|
|
13385
13401
|
return fetchData({
|
|
13386
|
-
body: JSON.stringify(masterQuery$
|
|
13402
|
+
body: JSON.stringify(masterQuery$5.locationMasterEntityType())
|
|
13387
13403
|
}, __readDocumentUrl__);
|
|
13388
13404
|
|
|
13389
13405
|
case 5:
|
|
@@ -13436,7 +13452,7 @@ var LOCATION_MASTERS_ENTITYNAME = createAsyncThunk("locationMasterSlice/location
|
|
|
13436
13452
|
type = payload.type;
|
|
13437
13453
|
_context2.next = 6;
|
|
13438
13454
|
return fetchData({
|
|
13439
|
-
body: JSON.stringify(masterQuery$
|
|
13455
|
+
body: JSON.stringify(masterQuery$5.locationMasterEntityName(type))
|
|
13440
13456
|
}, __readDocumentUrl__);
|
|
13441
13457
|
|
|
13442
13458
|
case 6:
|
|
@@ -13485,7 +13501,7 @@ var LOCATION_MASTERS_LOCATIONTYPE = createAsyncThunk("locationMasterSlice/locati
|
|
|
13485
13501
|
_context3.prev = 2;
|
|
13486
13502
|
_context3.next = 5;
|
|
13487
13503
|
return fetchData({
|
|
13488
|
-
body: JSON.stringify(masterQuery$
|
|
13504
|
+
body: JSON.stringify(masterQuery$5.locationMasterLocationType())
|
|
13489
13505
|
}, __readDocumentUrl__);
|
|
13490
13506
|
|
|
13491
13507
|
case 5:
|
|
@@ -13533,7 +13549,7 @@ var LOCATION_MASTERS_OPERATIONALSTATUS = createAsyncThunk("locationMasterSlice/l
|
|
|
13533
13549
|
_context4.prev = 2;
|
|
13534
13550
|
_context4.next = 5;
|
|
13535
13551
|
return fetchData({
|
|
13536
|
-
body: JSON.stringify(masterQuery$
|
|
13552
|
+
body: JSON.stringify(masterQuery$5.locationMasterOperationalStatus())
|
|
13537
13553
|
}, __readDocumentUrl__);
|
|
13538
13554
|
|
|
13539
13555
|
case 5:
|
|
@@ -13581,7 +13597,7 @@ var LOCATION_MASTERS_PARENT_LOCATION_ID_DESCRIPTION = createAsyncThunk("location
|
|
|
13581
13597
|
_context5.prev = 2;
|
|
13582
13598
|
_context5.next = 5;
|
|
13583
13599
|
return fetchData({
|
|
13584
|
-
body: JSON.stringify(masterQuery$
|
|
13600
|
+
body: JSON.stringify(masterQuery$5.locationMasterParentLocationIdDescription())
|
|
13585
13601
|
}, __readDocumentUrl__);
|
|
13586
13602
|
|
|
13587
13603
|
case 5:
|
|
@@ -13629,7 +13645,7 @@ var LOCATION_MASTERS_LOCATIONROLETYPE = createAsyncThunk("locationMasterSlice/lo
|
|
|
13629
13645
|
_context6.prev = 2;
|
|
13630
13646
|
_context6.next = 5;
|
|
13631
13647
|
return fetchData({
|
|
13632
|
-
body: JSON.stringify(masterQuery$
|
|
13648
|
+
body: JSON.stringify(masterQuery$5.locationMasterLocationRoleType())
|
|
13633
13649
|
}, __readDocumentUrl__);
|
|
13634
13650
|
|
|
13635
13651
|
case 5:
|
|
@@ -13683,7 +13699,7 @@ var LOCATION_MASTER_SPECIALITY = createAsyncThunk("locationMasterSlice/location_
|
|
|
13683
13699
|
id = payload.id;
|
|
13684
13700
|
_context7.next = 6;
|
|
13685
13701
|
return fetchData({
|
|
13686
|
-
body: JSON.stringify(masterQuery$
|
|
13702
|
+
body: JSON.stringify(masterQuery$5.locationMasterSpeciality(id))
|
|
13687
13703
|
}, __readDocumentUrl__);
|
|
13688
13704
|
|
|
13689
13705
|
case 6:
|
|
@@ -13733,7 +13749,7 @@ var LOCATION_MASTER_CONTACTMODE = createAsyncThunk("locationMasterSlice/location
|
|
|
13733
13749
|
_context8.prev = 2;
|
|
13734
13750
|
_context8.next = 5;
|
|
13735
13751
|
return fetchData({
|
|
13736
|
-
body: JSON.stringify(masterQuery$
|
|
13752
|
+
body: JSON.stringify(masterQuery$5.locationMasterContactMode())
|
|
13737
13753
|
}, __readDocumentUrl__);
|
|
13738
13754
|
|
|
13739
13755
|
case 5:
|
|
@@ -13781,7 +13797,7 @@ var LOCATION_MASTER_ISD = createAsyncThunk("locationMasterSlice/location_masters
|
|
|
13781
13797
|
_context9.prev = 2;
|
|
13782
13798
|
_context9.next = 5;
|
|
13783
13799
|
return fetchData({
|
|
13784
|
-
body: JSON.stringify(masterQuery$
|
|
13800
|
+
body: JSON.stringify(masterQuery$5.locationMasterISD())
|
|
13785
13801
|
}, __readDocumentUrl__);
|
|
13786
13802
|
|
|
13787
13803
|
case 5:
|
|
@@ -13829,7 +13845,7 @@ var LOCATION_MASTER_USE = createAsyncThunk("locationMasterSlice/location_masters
|
|
|
13829
13845
|
_context10.prev = 2;
|
|
13830
13846
|
_context10.next = 5;
|
|
13831
13847
|
return fetchData({
|
|
13832
|
-
body: JSON.stringify(masterQuery$
|
|
13848
|
+
body: JSON.stringify(masterQuery$5.locationMasterUse())
|
|
13833
13849
|
}, __readDocumentUrl__);
|
|
13834
13850
|
|
|
13835
13851
|
case 5:
|
|
@@ -13877,7 +13893,7 @@ var LOCATION_MASTER_PRIORITY = createAsyncThunk("locationMasterSlice/location_ma
|
|
|
13877
13893
|
_context11.prev = 2;
|
|
13878
13894
|
_context11.next = 5;
|
|
13879
13895
|
return fetchData({
|
|
13880
|
-
body: JSON.stringify(masterQuery$
|
|
13896
|
+
body: JSON.stringify(masterQuery$5.locationMasterPriority())
|
|
13881
13897
|
}, __readDocumentUrl__);
|
|
13882
13898
|
|
|
13883
13899
|
case 5:
|
|
@@ -17663,134 +17679,134 @@ var queries$f = {
|
|
|
17663
17679
|
// "filter": "DrugMaster.activestatus==true ",
|
|
17664
17680
|
// "return_fields": "{id:DrugMaster.id,_id:DrugMaster._id,DrugCode:DrugMaster.DrugCode,ShortDesc:DrugMaster.ShortDesc,LongDesc:DrugMaster.LongDesc,statusactive:DrugMaster.statusactive,draftstatus:DrugMaster.draftstatus}"
|
|
17665
17681
|
// }`,
|
|
17666
|
-
drug_master: function drug_master(page, perpage) {
|
|
17682
|
+
drug_master: function drug_master(page, perpage, searchQuery) {
|
|
17667
17683
|
return {
|
|
17668
17684
|
db_name: dbName$1,
|
|
17669
17685
|
entity: "DrugMaster",
|
|
17670
|
-
sort: "DrugMaster.
|
|
17671
|
-
filter: "DrugMaster.activestatus==true ",
|
|
17686
|
+
sort: "DrugMaster.createddate desc",
|
|
17687
|
+
filter: "(LIKE(DrugMaster.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(DrugMaster.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(DrugMaster.ShortDesc,'%").concat(searchQuery, "%',true)) && DrugMaster.activestatus == true "),
|
|
17672
17688
|
limit: {
|
|
17673
17689
|
offset: page,
|
|
17674
17690
|
count: perpage
|
|
17675
17691
|
},
|
|
17676
|
-
return_fields: "{
|
|
17692
|
+
return_fields: "merge(DrugMaster,{DrugCode:DrugMaster.DrugCode},{Count:count( for drgmst in DrugMaster filter (LIKE(drgmst.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(drgmst.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(drgmst.ShortDesc,'%").concat(searchQuery, "%',true)) && drgmst.activestatus == true return drgmst._id )},{ShortDesc:DrugMaster.ShortDesc},{DrugClass:DOCUMENT(DrugMaster.DrugClass)},{DrugType:DOCUMENT(DrugMaster.DrugType)},{DrugCategory:DOCUMENT(DrugMaster.DrugCategory)},{FormCode:DOCUMENT(DrugMaster.FormCode)},{StrengthValuesPossible:(for strValPoss in to_array(DrugMaster.StrengthValuesPossible) return merge(strValPoss,{StrengthUOM:document(strValPoss.StrengthUOM)},{StrengthVolumeUoM:document(strValPoss.StrengthVolumeUoM)},{OrderUOMAllowed:(for OrderUOMAllowed in to_array(strValPoss.OrderUOMAllowed) return merge(OrderUOMAllowed,{AllowedOrderDoseUOM:document(OrderUOMAllowed.AllowedOrderDoseUOM)},{AllowedOrderDoseVolUoM:document(OrderUOMAllowed.AllowedOrderDoseVolUoM)}))}))},{RoutesAllowed:document(DrugMaster.RoutesAllowed)})")
|
|
17677
17693
|
};
|
|
17678
17694
|
},
|
|
17679
17695
|
drug_master_upsert: [{
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17683
|
-
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
|
|
17691
|
-
|
|
17696
|
+
db_name: dbName$1,
|
|
17697
|
+
entity: "DrugMaster",
|
|
17698
|
+
is_metadata: true,
|
|
17699
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17700
|
+
doc: (_doc = {
|
|
17701
|
+
_id: "string",
|
|
17702
|
+
id: "number",
|
|
17703
|
+
DrugCode: "string",
|
|
17704
|
+
ShortDesc: "string",
|
|
17705
|
+
LongDesc: "string",
|
|
17706
|
+
Formulary: "boolean",
|
|
17707
|
+
DrugSynonyms: "string",
|
|
17692
17708
|
//Array of string
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
|
|
17698
|
-
|
|
17709
|
+
DrugClass: "string",
|
|
17710
|
+
DrugCategory: "string",
|
|
17711
|
+
DrugType: "string",
|
|
17712
|
+
FormCode: "string",
|
|
17713
|
+
RoutesAllowed: "array",
|
|
17714
|
+
DefaultRouteCode: "string",
|
|
17699
17715
|
//AVAILABLE STRENGTHS
|
|
17700
|
-
|
|
17701
|
-
|
|
17702
|
-
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17709
|
-
|
|
17716
|
+
StrengthValuesPossible: [{
|
|
17717
|
+
StrengthValue: "number",
|
|
17718
|
+
StrengthUOM: "string",
|
|
17719
|
+
StrengthVolume: "number",
|
|
17720
|
+
StrengthVolumeUoM: "string",
|
|
17721
|
+
OrderUOMAllowed: [{
|
|
17722
|
+
AllowedOrderDoseVal: "number",
|
|
17723
|
+
AllowedOrderDoseUOM: "string",
|
|
17724
|
+
AllowedOrderDoseVolVal: "number",
|
|
17725
|
+
AllowedOrderDoseVolUoM: "string"
|
|
17710
17726
|
}]
|
|
17711
17727
|
}],
|
|
17712
17728
|
//Drug Other Attributes
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17729
|
+
TrialDrug: "boolean",
|
|
17730
|
+
Additive: "boolean",
|
|
17731
|
+
ApplicableForCompounding: "boolean",
|
|
17732
|
+
DispenseviaprescriptionOnly: "boolean",
|
|
17733
|
+
CounsellingRequired: "boolean",
|
|
17718
17734
|
//Alternate drugs
|
|
17719
|
-
|
|
17735
|
+
AlternateDrugs: "array",
|
|
17720
17736
|
//INSTRUCTIONS
|
|
17721
|
-
|
|
17722
|
-
|
|
17723
|
-
|
|
17724
|
-
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
|
|
17737
|
+
Instruction_FrequencyRules: [{
|
|
17738
|
+
_id: "string",
|
|
17739
|
+
id: "number",
|
|
17740
|
+
encountertype: "string",
|
|
17741
|
+
gendercode: "string",
|
|
17742
|
+
agegroup: "string",
|
|
17743
|
+
agecatgcode: "array",
|
|
17744
|
+
OrderInstr: [{
|
|
17745
|
+
patientInst: "string",
|
|
17746
|
+
practionerInst: "string",
|
|
17747
|
+
prepInstr: "string",
|
|
17748
|
+
deptInstr: "string"
|
|
17733
17749
|
}],
|
|
17734
|
-
|
|
17750
|
+
setuptypeInd: "string",
|
|
17735
17751
|
//No use
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17752
|
+
serviceapplicability: "string",
|
|
17753
|
+
ordercatalog: "string",
|
|
17754
|
+
freqappl: "boolean",
|
|
17755
|
+
dfltfreqValue: "number",
|
|
17740
17756
|
//Default Frequency number
|
|
17741
|
-
|
|
17757
|
+
dfltfreqValueUnit: "string",
|
|
17742
17758
|
//Default Frequency sel
|
|
17743
|
-
|
|
17759
|
+
dfltfreqRate: "number",
|
|
17744
17760
|
//Dose number
|
|
17745
|
-
|
|
17761
|
+
dfltfreqRateUnit: "string",
|
|
17746
17762
|
//Dose select
|
|
17747
|
-
|
|
17763
|
+
dfltduration: "number",
|
|
17748
17764
|
//valu
|
|
17749
|
-
|
|
17765
|
+
dfltdurationType: "string",
|
|
17750
17766
|
//select
|
|
17751
|
-
|
|
17767
|
+
maxdurnallowedinDays: "number"
|
|
17752
17768
|
}],
|
|
17753
17769
|
//FREQUENCY RULES
|
|
17754
17770
|
//DISPENSE RULES
|
|
17755
|
-
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17761
|
-
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
|
|
17771
|
+
DrugDispRules: [{
|
|
17772
|
+
_id: "string",
|
|
17773
|
+
id: "number",
|
|
17774
|
+
DrugCode: "string",
|
|
17775
|
+
MaxDispDurnRulebyEnctype: [{
|
|
17776
|
+
EncounterType: "string",
|
|
17777
|
+
MaxDispDurationVal: "number",
|
|
17778
|
+
MaxDispDurationUOM: "string",
|
|
17779
|
+
Action: "string",
|
|
17780
|
+
ActionMessage: "string",
|
|
17781
|
+
Status: "boolean"
|
|
17766
17782
|
}]
|
|
17767
17783
|
}],
|
|
17768
17784
|
//STATUS
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17785
|
+
Status: "string",
|
|
17786
|
+
EffectiveFrom: "number",
|
|
17787
|
+
EffectiveTo: "number",
|
|
17788
|
+
InactiveReason: "string",
|
|
17789
|
+
draftstatus: "boolean",
|
|
17774
17790
|
//No use
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17791
|
+
Charge: "boolean",
|
|
17792
|
+
OrderUOMAllowed: "string",
|
|
17793
|
+
DoseRoundUpVal: "number",
|
|
17794
|
+
AdminUOM: "string",
|
|
17795
|
+
TotalVolContent: "string",
|
|
17796
|
+
TotalVolContentUoM: "string"
|
|
17781
17797
|
}, _defineProperty(_doc, "FormCode", "string"), _defineProperty(_doc, "IVFluid", "boolean"), _defineProperty(_doc, "DfltInfuseOverDurationvalue", "number"), _defineProperty(_doc, "DfltInfuseOverDurationType", "string"), _defineProperty(_doc, "DfltFluidCode", "string"), _defineProperty(_doc, "InactiveDate", "number"), _defineProperty(_doc, "InactiveByid", "string"), _defineProperty(_doc, "DispenseAlternateDrug", "boolean"), _defineProperty(_doc, "SpecialInstructionText", "array"), _defineProperty(_doc, "DrugImageID", "number"), _defineProperty(_doc, "DrugItem", "boolean"), _defineProperty(_doc, "SourceOfDrugOrderCatalog", "string"), _defineProperty(_doc, "DrugGenericId", "string"), _defineProperty(_doc, "IngredientListId", "string"), _defineProperty(_doc, "statusactive", "boolean"), _doc)
|
|
17782
17798
|
}],
|
|
17783
|
-
status_update_drug_master: function status_update_drug_master(
|
|
17799
|
+
status_update_drug_master: function status_update_drug_master(key, status) {
|
|
17784
17800
|
return [{
|
|
17785
|
-
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17801
|
+
db_name: dbName$1,
|
|
17802
|
+
entity: "DrugMaster",
|
|
17803
|
+
filter: {
|
|
17804
|
+
_key: key
|
|
17789
17805
|
},
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
|
|
17793
|
-
|
|
17806
|
+
is_metadata: true,
|
|
17807
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
17808
|
+
doc: {
|
|
17809
|
+
status: status
|
|
17794
17810
|
}
|
|
17795
17811
|
}];
|
|
17796
17812
|
},
|
|
@@ -17803,20 +17819,20 @@ var queries$f = {
|
|
|
17803
17819
|
// "return_fields": "merge(DrugMaster,{Status:document(DrugMaster.Status).display},{DrugClass:document(DrugMaster.DrugClass)},{DrugType:document(DrugMaster.DrugType)},{DrugCategory:document(DrugMaster.DrugCategory)},{FormCode:document(DrugMaster.FormCode)},{DefaultRouteCode:document(DrugMaster.DefaultRouteCode)},{RoutesAllowed:document(DrugMaster.RoutesAllowed)},{DfltInfuseOverDurationType:document(DrugMaster.DfltInfuseOverDurationType)},{Instruction: (for i in CA_OrderCatalogByEncounterTypeAge filter i._id in DrugMaster.Instruction return merge(i,{encountertype: (for en in CodingMaster filter en._id == i.encountertype return en)},{gendercode:(for gen in CodingMaster filter gen._id == i.gendercode return gen)},{agegroup:(for ag in AgeRanges filter ag._id == i.agegroup return ag)},{agecatgcode:(for ac in AgeCategory filter ac._id in i.agecatgcode return ac)},{dfltfreqValueUnit:(for df in FrequencyMaster filter df._id == i.dfltfreqValueUnit return df)},{dfltfreqRateUnit:(for dfr in DrugUOM filter dfr._id == i.dfltfreqRateUnit return dfr)},{dfltdurationType:(for ddt in DrugUOM filter ddt._id == i.dfltdurationType return ddt)}))},{FrequencyRules: (for fr in DrugDefaultFeqRules filter fr._id in DrugMaster.FrequencyRules return merge(fr,{DfltFreqbyPatAttrib:(for dfpa in fr.DfltFreqbyPatAttrib return merge(dfpa,{encountertype:document(dfpa.encountertype)},{AgeCatgCode:document(dfpa.AgeCatgCode)},{DfltInfuseOverDurationType:document(dfpa.DfltInfuseOverDurationType)},{agegroup:document(dfpa.agegroup)},{ageunit:document(dfpa.ageunit)},{dfltdoseUOM:document(dfpa.dfltdoseUOM)},{dfltdurnUOM:document(dfpa.dfltdurnUOM)},{dfltfreqcode:document(dfpa.dfltfreqcode)}))}))},{DrugDispRules:(for dd in DrugDispRules filter dd._id in DrugMaster.DrugDispRules return merge(dd,{MaxDispDurnRulebyEnctype: (for mdd in dd.MaxDispDurnRulebyEnctype return merge(mdd,{Action:(document(mdd.Action).display)},{EncounterType:(for etype in CodingMaster filter etype._id == mdd.EncounterType return etype)},{MaxDispDurationUOM:(for mduom in DrugUOM filter mduom._id == mdd.MaxDispDurationUOM return mduom)}))}))},{StrengthValuesPossible:(for dr in DrugMaster.StrengthValuesPossible return merge(dr,{StrengthUOM:(document(dr.StrengthUOM))},{StrengthVolumeUoM:(document(dr.StrengthVolumeUoM))},{OrderUOMAllowed:(for od in dr.OrderUOMAllowed return merge(od,{AllowedOrderDoseUOM:(document(od.AllowedOrderDoseUOM))},{AllowedOrderDoseVolUoM:(document(od.AllowedOrderDoseVolUoM))}))}))})"
|
|
17804
17820
|
// }
|
|
17805
17821
|
return {
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17822
|
+
db_name: dbName$1,
|
|
17823
|
+
entity: "DrugMaster",
|
|
17824
|
+
filter: "DrugMaster.activestatus==true && DrugMaster._id=='".concat(_id, "'"),
|
|
17825
|
+
return_fields: "merge(DrugMaster,{Status:document(DrugMaster.Status).display},{DrugClass:document(DrugMaster.DrugClass)},{DrugType:document(DrugMaster.DrugType)},{DrugCategory:document(DrugMaster.DrugCategory)},{FormCode:document(DrugMaster.FormCode)},{DefaultRouteCode:document(DrugMaster.DefaultRouteCode)},{RoutesAllowed:document(DrugMaster.RoutesAllowed)},{DfltInfuseOverDurationType:document(DrugMaster.DfltInfuseOverDurationType)},{Instruction: (for i in CA_OrderCatalogByEncounterTypeAge filter i._id in DrugMaster.Instruction return merge(i,{encountertype: (for en in CodingMaster filter en._id == i.encountertype return en)},{gendercode:(for gen in CodingMaster filter gen._id == i.gendercode return gen)},{agegroup:(for ag in AgeRanges filter ag._id == i.agegroup return ag)},{agecatgcode:(for ac in AgeCategory filter ac._id in i.agecatgcode return ac)},{dfltfreqValueUnit:(for df in FrequencyMaster filter df._id == i.dfltfreqValueUnit return df)},{dfltfreqRateUnit:(for dfr in DrugUOM filter dfr._id == i.dfltfreqRateUnit return dfr)},{dfltdurationType:(for ddt in DrugUOM filter ddt._id == i.dfltdurationType return ddt)}))},{FrequencyRules: (for fr in DrugDefaultFeqRules filter fr._id in DrugMaster.FrequencyRules return merge(fr,{DfltFreqbyPatAttrib:(for dfpa in fr.DfltFreqbyPatAttrib return merge(dfpa,{encountertype:document(dfpa.encountertype)},{AgeCatgCode:document(dfpa.AgeCatgCode)},{DfltInfuseOverDurationType:document(dfpa.DfltInfuseOverDurationType)},{agegroup:document(dfpa.agegroup)},{ageunit:document(dfpa.ageunit)},{dfltdoseUOM:document(dfpa.dfltdoseUOM)},{dfltdurnUOM:document(dfpa.dfltdurnUOM)},{dfltfreqcode:document(dfpa.dfltfreqcode)}))}))},{mappedItems:(for SIDC in StockItemsbyDrugCode filter SIDC._id in DrugMaster.mappedItems return merge(SIDC, {StockItemCodes:(for ssidc in SIDC.StockItemCodes return merge (ssidc,{stkitemcode:(for sic in DrugItemMaster filter sic._id ==ssidc.stkitemcode return {_id:sic._id,id:sic.id,itemcode:sic.itemcode,shortdesc:sic.shortdesc,longdesc:sic.longdesc})} ))}))},{DrugDispRules:(for dd in DrugDispRules filter dd._id in DrugMaster.DrugDispRules return merge(dd,{MaxDispDurnRulebyEnctype: (for mdd in dd.MaxDispDurnRulebyEnctype return merge(mdd,{Action:(document(mdd.Action).display)},{EncounterType:(for etype in CodingMaster filter etype._id == mdd.EncounterType return etype)},{MaxDispDurationUOM:(for mduom in DrugUOM filter mduom._id == mdd.MaxDispDurationUOM return mduom)}))}))},{StrengthValuesPossible:(for dr in DrugMaster.StrengthValuesPossible return merge(dr,{StrengthUOM:(document(dr.StrengthUOM))},{StrengthVolumeUoM:(document(dr.StrengthVolumeUoM))},{OrderUOMAllowed:(for od in dr.OrderUOMAllowed return merge(od,{AllowedOrderDoseUOM:(document(od.AllowedOrderDoseUOM))},{AllowedOrderDoseVolUoM:(document(od.AllowedOrderDoseVolUoM))}))}))})"
|
|
17810
17826
|
};
|
|
17811
17827
|
},
|
|
17812
17828
|
age_category_by_id: function age_category_by_id(ids) {
|
|
17813
17829
|
// ['${AllowedUnit.join("','")}']
|
|
17814
17830
|
return {
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17831
|
+
db_name: dbName$1,
|
|
17832
|
+
entity: "AgeCategory",
|
|
17833
|
+
filter: "AgeCategory.activestatus == true && AgeCategory._id in ['".concat(ids.join("','"), "']"),
|
|
17834
|
+
return_fields: "{id:AgeCategory.id, _id:AgeCategory._id, code:AgeCategory.code, age_minimum:AgeCategory.age_minimum, age_maximum:AgeCategory.age_maximum, description:AgeCategory.description,UOM:document(document(AgeCategory.UOM).coding)}",
|
|
17835
|
+
sort: "AgeCategory.description"
|
|
17820
17836
|
};
|
|
17821
17837
|
},
|
|
17822
17838
|
ageCategory: function ageCategory(ageRangeId) {
|
|
@@ -17828,43 +17844,354 @@ var queries$f = {
|
|
|
17828
17844
|
},
|
|
17829
17845
|
return_fields: "DOCUMENT( AgeRanges.AgeCategory)"
|
|
17830
17846
|
};
|
|
17847
|
+
},
|
|
17848
|
+
entityNameOptionsQuery: function entityNameOptionsQuery() {
|
|
17849
|
+
var entityTypeCode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "OT003";
|
|
17850
|
+
return {
|
|
17851
|
+
db_name: dbName$1,
|
|
17852
|
+
entity: "Organization",
|
|
17853
|
+
filter: "FIRST(DOCUMENT(Organization.OrgType)[*].code) == '".concat(entityTypeCode, "' && Organization.active==true && Organization.activestatus== true"),
|
|
17854
|
+
return_fields: "KEEP(Organization,'_id','id','_key','name','entitycode','active','activestatus','isExternal')"
|
|
17855
|
+
};
|
|
17831
17856
|
}
|
|
17832
17857
|
};
|
|
17833
|
-
var
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
|
|
17843
|
-
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17863
|
-
|
|
17864
|
-
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
|
|
17858
|
+
var masterNewQuery = {
|
|
17859
|
+
code_standara: function code_standara() {
|
|
17860
|
+
return {
|
|
17861
|
+
db_name: dbName$1,
|
|
17862
|
+
entity: "CodingMaster",
|
|
17863
|
+
filter: "CodingMaster.Type=='DBSOURCE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17864
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17865
|
+
sort: "CodingMaster.shortdesc"
|
|
17866
|
+
};
|
|
17867
|
+
},
|
|
17868
|
+
drug_category: function drug_category() {
|
|
17869
|
+
return {
|
|
17870
|
+
db_name: dbName$1,
|
|
17871
|
+
entity: "DrugCategory",
|
|
17872
|
+
filter: "DrugCategory.activestatus == true && DrugCategory.status==true",
|
|
17873
|
+
return_fields: "KEEP(DrugCategory,'_key','_id','id','drugcategory','shortdesc','longdesc','status','activestatus')",
|
|
17874
|
+
sort: "DrugCategory.longdesc"
|
|
17875
|
+
};
|
|
17876
|
+
},
|
|
17877
|
+
drug_class: function drug_class() {
|
|
17878
|
+
return {
|
|
17879
|
+
db_name: dbName$1,
|
|
17880
|
+
entity: "DrugClass",
|
|
17881
|
+
filter: "DrugClass.activestatus == true && DrugClass.status == true",
|
|
17882
|
+
return_fields: "KEEP(DrugClass,'_key','_id','id','drugclass','shortdesc','longdesc','status','activestatus')",
|
|
17883
|
+
sort: "DrugClass.longdesc"
|
|
17884
|
+
};
|
|
17885
|
+
},
|
|
17886
|
+
drug_generic: function drug_generic() {
|
|
17887
|
+
return {
|
|
17888
|
+
db_name: dbName$1,
|
|
17889
|
+
entity: "GenericDrugMaster",
|
|
17890
|
+
filter: "GenericDrugMaster.activestatus == true ",
|
|
17891
|
+
limit: {
|
|
17892
|
+
count: 20,
|
|
17893
|
+
offset: 0
|
|
17894
|
+
},
|
|
17895
|
+
return_fields: "keep(GenericDrugMaster,'id','_id','longdesc','shortdesc','activestatus','mappedextsourcedb')",
|
|
17896
|
+
sort: "GenericDrugMaster.shortdesc"
|
|
17897
|
+
};
|
|
17898
|
+
},
|
|
17899
|
+
drug_type: function drug_type() {
|
|
17900
|
+
return {
|
|
17901
|
+
db_name: dbName$1,
|
|
17902
|
+
entity: "DrugType",
|
|
17903
|
+
filter: "DrugType.status==true && DrugType.activestatus == true ",
|
|
17904
|
+
return_fields: "KEEP(DrugType,'_key','_id','id','drugtype','shortdesc','longdesc','status','activestatus')",
|
|
17905
|
+
sort: "DrugType.longdesc"
|
|
17906
|
+
};
|
|
17907
|
+
},
|
|
17908
|
+
form: function form() {
|
|
17909
|
+
return {
|
|
17910
|
+
db_name: dbName$1,
|
|
17911
|
+
entity: "DosageForm",
|
|
17912
|
+
filter: "DosageForm.activestatus == true && DosageForm.status==true",
|
|
17913
|
+
return_fields: "KEEP(DosageForm,'_key','_id','id','dosageform','shortdesc','longdesc','status','activestatus')",
|
|
17914
|
+
sort: "DosageForm.longdesc"
|
|
17915
|
+
};
|
|
17916
|
+
},
|
|
17917
|
+
synonym_type: function synonym_type() {
|
|
17918
|
+
return {
|
|
17919
|
+
db_name: dbName$1,
|
|
17920
|
+
entity: "CodingMaster",
|
|
17921
|
+
filter: "CodingMaster.Type=='SYNONYMTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
17922
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
17923
|
+
sort: "CodingMaster.display"
|
|
17924
|
+
};
|
|
17925
|
+
},
|
|
17926
|
+
source: function source() {
|
|
17927
|
+
return {
|
|
17928
|
+
db_name: dbName$1,
|
|
17929
|
+
entity: "CodingMaster",
|
|
17930
|
+
filter: "CodingMaster.Type=='ALIASSOURCE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
17931
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
17932
|
+
sort: "CodingMaster.display"
|
|
17933
|
+
};
|
|
17934
|
+
},
|
|
17935
|
+
drug_uom: function drug_uom() {
|
|
17936
|
+
return {
|
|
17937
|
+
db_name: dbName$1,
|
|
17938
|
+
entity: "CodingMaster",
|
|
17939
|
+
filter: "CodingMaster.Type=='DRUGUOMCODE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17940
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17941
|
+
sort: "CodingMaster.shortdesc"
|
|
17942
|
+
};
|
|
17943
|
+
},
|
|
17944
|
+
default_route: function default_route() {
|
|
17945
|
+
return {
|
|
17946
|
+
db_name: dbName$1,
|
|
17947
|
+
entity: "DrugRoutes",
|
|
17948
|
+
filter: "DrugRoutes.activestatus==true && DrugRoutes.status == true",
|
|
17949
|
+
return_fields: "kEEP(DrugRoutes,'id','_id','_key','routecode','shortdesc','longdesc','status','activestatus')",
|
|
17950
|
+
sort: "DrugRoutes.shortdesc"
|
|
17951
|
+
};
|
|
17952
|
+
},
|
|
17953
|
+
frequency: function frequency() {
|
|
17954
|
+
return {
|
|
17955
|
+
db_name: dbName$1,
|
|
17956
|
+
entity: "FrequencyMaster",
|
|
17957
|
+
filter: "FrequencyMaster.activestatus==true && FrequencyMaster.status == true",
|
|
17958
|
+
return_fields: "kEEP(FrequencyMaster,'id','_id','_key','freqcode','shortdesc','longdesc','status','activestatus')",
|
|
17959
|
+
sort: "CodingMaster.shortdesc"
|
|
17960
|
+
};
|
|
17961
|
+
},
|
|
17962
|
+
routes_allowed: function routes_allowed() {
|
|
17963
|
+
return {
|
|
17964
|
+
db_name: dbName$1,
|
|
17965
|
+
entity: "DrugRoutes",
|
|
17966
|
+
filter: "DrugRoutes.activestatus==true && DrugRoutes.status == true",
|
|
17967
|
+
return_fields: "kEEP(DrugRoutes,'id','_id','_key','routecode','shortdesc','longdesc','status','activestatus')",
|
|
17968
|
+
sort: "DrugRoutes.shortdesc"
|
|
17969
|
+
};
|
|
17970
|
+
},
|
|
17971
|
+
drug_followUom: function drug_followUom() {
|
|
17972
|
+
return {
|
|
17973
|
+
db_name: dbName$1,
|
|
17974
|
+
entity: "CodingMaster",
|
|
17975
|
+
filter: "CodingMaster.Type=='FOLLOWUOM' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17976
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17977
|
+
sort: "CodingMaster.shortdesc"
|
|
17978
|
+
};
|
|
17979
|
+
},
|
|
17980
|
+
action: function action() {
|
|
17981
|
+
return {
|
|
17982
|
+
db_name: dbName$1,
|
|
17983
|
+
entity: "CodingMaster",
|
|
17984
|
+
filter: "CodingMaster.Type=='DRUGACTION' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
17985
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
17986
|
+
sort: "CodingMaster.shortdesc"
|
|
17987
|
+
};
|
|
17988
|
+
},
|
|
17989
|
+
instruction_type: function instruction_type() {
|
|
17990
|
+
return {
|
|
17991
|
+
db_name: dbName$1,
|
|
17992
|
+
entity: "CodingMaster",
|
|
17993
|
+
filter: "CodingMaster.Type=='INSTRUCTIONTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
17994
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
17995
|
+
sort: "CodingMaster.display"
|
|
17996
|
+
};
|
|
17997
|
+
},
|
|
17998
|
+
drug_status: function drug_status() {
|
|
17999
|
+
return {
|
|
18000
|
+
db_name: dbName$1,
|
|
18001
|
+
entity: "CodingMaster",
|
|
18002
|
+
filter: "CodingMaster.Type=='DRUGSTATUS' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18003
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18004
|
+
sort: "CodingMaster.display"
|
|
18005
|
+
};
|
|
18006
|
+
},
|
|
18007
|
+
entity_type: function entity_type() {
|
|
18008
|
+
return {
|
|
18009
|
+
db_name: dbName$1,
|
|
18010
|
+
entity: "CodingMaster",
|
|
18011
|
+
filter: "CodingMaster.Type=='ORGTYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18012
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status','shortdesc','activestatus')",
|
|
18013
|
+
sort: "CodingMaster.display"
|
|
18014
|
+
};
|
|
18015
|
+
},
|
|
18016
|
+
applicability: function applicability() {
|
|
18017
|
+
return {
|
|
18018
|
+
db_name: dbName$1,
|
|
18019
|
+
entity: "CodingMaster",
|
|
18020
|
+
filter: "CodingMaster.Type=='APPLICABLEUOM' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18021
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18022
|
+
sort: "CodingMaster.display"
|
|
18023
|
+
};
|
|
18024
|
+
},
|
|
18025
|
+
privilege_type: function privilege_type() {
|
|
18026
|
+
return {
|
|
18027
|
+
db_name: dbName$1,
|
|
18028
|
+
entity: "CodingMaster",
|
|
18029
|
+
filter: "CodingMaster.Type == 'PRIVILEGETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18030
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18031
|
+
sort: "CodingMaster.shortdesc"
|
|
18032
|
+
};
|
|
18033
|
+
},
|
|
18034
|
+
rule_type: function rule_type() {
|
|
18035
|
+
return {
|
|
18036
|
+
db_name: dbName$1,
|
|
18037
|
+
entity: "CodingMaster",
|
|
18038
|
+
filter: "CodingMaster.Type == 'RULETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18039
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18040
|
+
sort: "CodingMaster.shortdesc"
|
|
18041
|
+
};
|
|
18042
|
+
},
|
|
18043
|
+
round_off_type: function round_off_type() {
|
|
18044
|
+
return {
|
|
18045
|
+
db_name: dbName$1,
|
|
18046
|
+
entity: "CodingMaster",
|
|
18047
|
+
filter: "CodingMaster.Type=='ROUNDOFFTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18048
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18049
|
+
sort: "CodingMaster.display"
|
|
18050
|
+
};
|
|
18051
|
+
},
|
|
18052
|
+
drug_code: function drug_code() {
|
|
18053
|
+
return {
|
|
18054
|
+
db_name: dbName$1,
|
|
18055
|
+
entity: "DrugMaster",
|
|
18056
|
+
filter: "DrugMaster.activestatus == true ",
|
|
18057
|
+
limit: {
|
|
18058
|
+
count: 20,
|
|
18059
|
+
offset: 0
|
|
18060
|
+
},
|
|
18061
|
+
return_fields: "keep(DrugMaster,'_id','id','_key','DrugCode','ShortDesc','StrengthValuesPossible','activestatus')",
|
|
18062
|
+
sort: "DrugMaster.shortdesc"
|
|
18063
|
+
};
|
|
18064
|
+
},
|
|
18065
|
+
item_code: function item_code(_ref) {
|
|
18066
|
+
var id = _ref.id;
|
|
18067
|
+
return {
|
|
18068
|
+
db_name: dbName$1,
|
|
18069
|
+
entity: "DrugMaster",
|
|
18070
|
+
filter: "DrugMaster._id !='".concat(id, "' && DrugMaster.activestatus == true && DrugMaster.IsDispensible == true"),
|
|
18071
|
+
limit: {
|
|
18072
|
+
count: 20,
|
|
18073
|
+
offset: 0
|
|
18074
|
+
},
|
|
18075
|
+
return_fields: "keep(DrugMaster,'_id','id','_key','DrugCode', 'ShortDesc','StrengthValuesPossible','activestatus')",
|
|
18076
|
+
sort: "DrugMaster.shortdesc"
|
|
18077
|
+
};
|
|
18078
|
+
},
|
|
18079
|
+
return_reason: function return_reason() {
|
|
18080
|
+
return {
|
|
18081
|
+
db_name: dbName$1,
|
|
18082
|
+
entity: "CodingMaster",
|
|
18083
|
+
filter: "CodingMaster.Type=='MEDRETURNREASON' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
18084
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')",
|
|
18085
|
+
sort: "CodingMaster.display"
|
|
18086
|
+
};
|
|
18087
|
+
},
|
|
18088
|
+
duration_uom: function duration_uom() {
|
|
18089
|
+
return {
|
|
18090
|
+
db_name: dbName$1,
|
|
18091
|
+
entity: "CodingMaster",
|
|
18092
|
+
filter: "CodingMaster.Type=='DURATIONUOM' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18093
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18094
|
+
sort: "CodingMaster.shortdesc"
|
|
18095
|
+
};
|
|
18096
|
+
}
|
|
18097
|
+
};
|
|
18098
|
+
var drugCatalogMasterQuery = {
|
|
18099
|
+
drugCatalogMasterRead: function drugCatalogMasterRead(page, perPage) {
|
|
18100
|
+
var searchQuery = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
18101
|
+
return {
|
|
18102
|
+
db_name: dbName$1,
|
|
18103
|
+
entity: "DrugMaster",
|
|
18104
|
+
filter: "(LIKE(DrugMaster.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(DrugMaster.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(DrugMaster.ShortDesc,'%").concat(searchQuery, "%',true)) && DrugMaster.activestatus == true "),
|
|
18105
|
+
limit: {
|
|
18106
|
+
count: perPage,
|
|
18107
|
+
offset: page
|
|
18108
|
+
},
|
|
18109
|
+
return_fields: "merge(DrugMaster,{DrugCode:DrugMaster.DrugCode},{Count:count( for drgmst in DrugMaster filter (LIKE(drgmst.DrugCode,'%".concat(searchQuery, "%',true) || LIKE(document(drgmst.DrugType).longdesc,'%").concat(searchQuery, "%',true) || LIKE(drgmst.ShortDesc,'%").concat(searchQuery, "%',true)) && drgmst.activestatus == true return drgmst._id )},{ShortDesc:DrugMaster.ShortDesc},{DrugClass:DOCUMENT(DrugMaster.DrugClass)},{DrugType:DOCUMENT(DrugMaster.DrugType)},{DrugCategory:DOCUMENT(DrugMaster.DrugCategory)},{FormCode:DOCUMENT(DrugMaster.FormCode)},{StrengthValuesPossible:(for strValPoss in to_array(DrugMaster.StrengthValuesPossible) return merge(strValPoss,{StrengthUOM:document(strValPoss.StrengthUOM)},{StrengthVolumeUoM:document(strValPoss.StrengthVolumeUoM)},{OrderUOMAllowed:(for OrderUOMAllowed in to_array(strValPoss.OrderUOMAllowed) return merge(OrderUOMAllowed,{AllowedOrderDoseUOM:document(OrderUOMAllowed.AllowedOrderDoseUOM)},{AllowedOrderDoseVolUoM:document(OrderUOMAllowed.AllowedOrderDoseVolUoM)}))}))},{RoutesAllowed:document(DrugMaster.RoutesAllowed)})"),
|
|
18110
|
+
sort: "DrugMaster.createddate desc"
|
|
18111
|
+
};
|
|
18112
|
+
},
|
|
18113
|
+
drugCatalogMasterSingleRead: function drugCatalogMasterSingleRead(id) {
|
|
18114
|
+
return {
|
|
18115
|
+
db_name: dbName$1,
|
|
18116
|
+
entity: "DrugMaster",
|
|
18117
|
+
filter: "DrugMaster._id == '".concat(id, "' && DrugMaster.activestatus == true"),
|
|
18118
|
+
return_fields: "merge(DrugMaster,{DrugClass:document(DrugMaster.DrugClass)},{DrugType:DOCUMENT(DrugMaster.DrugType)},{DrugGenericId:DOCUMENT(DrugMaster.DrugGenericId)},{DrugCategory:DOCUMENT(DrugMaster.DrugCategory)},{StrengthValuesPossible:(for strValPoss in to_array(DrugMaster.StrengthValuesPossible) return merge(strValPoss,{StrengthUOM:document(strValPoss.StrengthUOM)},{StrengthVolumeUoM:document(strValPoss.StrengthVolumeUoM)},{OrderUOMAllowed:(for OrderUOMAllowed in to_array(strValPoss.OrderUOMAllowed) return merge(OrderUOMAllowed,{AllowedOrderDoseUOM:document(OrderUOMAllowed.AllowedOrderDoseUOM)},{AllowedOrderDoseVolUoM:document(OrderUOMAllowed.AllowedOrderDoseVolUoM)}))}))},{TotalVolContentUoM:(for DrugUOM in to_array(document(DrugMaster.TotalVolContentUoM)) return merge(DrugUOM,{UOMType:document(DrugUOM.UOMType)}))},{FormCode:DOCUMENT(DrugMaster.FormCode)},{DefaultRouteCode:DOCUMENT(DrugMaster.DefaultRouteCode)},{RoutesAllowed:document(DrugMaster.RoutesAllowed)},{AlternateDrugs:DOCUMENT(DrugMaster.AlternateDrugs)},{GenericIngrListId:DOCUMENT(DrugMaster.GenericIngrListId)},{DrugDispRules:(for DrugDispRules in to_array(document(DrugMaster.DrugDispRules)) return merge(DrugDispRules,{Action:document(DrugDispRules.Action)},{maxDispDurationUOM:document(DrugDispRules.maxDispDurationUOM)},{dfltDispDurationUOM:document(DrugDispRules.dfltDispDurationUOM)}))},{FrequencyRules:(for FrequencyRules in to_array(document(DrugMaster.FrequencyRules)) return merge(FrequencyRules,{freqcode:document(FrequencyRules.freqcode) },{durnUOM:document(FrequencyRules.durnUOM)},{doseUOM:document(FrequencyRules.doseUOM)},{InfuseOverDurType:document(FrequencyRules.InfuseOverDurType)},{InfuseRateUom:document(FrequencyRules.InfuseRateUom)}))},{mappedItems:(for mappedItems in to_array(DrugMaster.mappedItems) return merge(mappedItems,{dispensedrugcode:document(mappedItems.dispensedrugcode)}))},{codeStandard:DOCUMENT(DrugMaster.codeStandard)},{entityLevelStatus:(for entityLevelStatus in to_array(document(DrugMaster.entityLevelStatus)) return merge(entityLevelStatus,{status:document(entityLevelStatus.status)},{entityCode:document(entityLevelStatus.entityCode)},{entityType:document(entityLevelStatus.entityType)}))},{packSizeApplicability:(for packSizeApplicability in to_array(document(DrugMaster.packSizeApplicability)) return merge(packSizeApplicability,{applicableInd:document(packSizeApplicability.applicableInd)},{roundtype:document(packSizeApplicability.roundtype)},{applicablityUOM:document(packSizeApplicability.applicablityUOM)},{packSizeUoM:document(packSizeApplicability.packSizeUoM)},{packUnitUoM:document(packSizeApplicability.packUnitUoM)}))},{aliasDtls:(for aliasDtls in to_array(DrugMaster.aliasDtls) return merge(aliasDtls,{aliasType:document(aliasDtls.aliasType)}) )},{instrDtls:(for instrDtls in to_array(DrugMaster.instrDtls) return merge(instrDtls,{instrType:document(instrDtls.instrType)}))},{drugSynonyms:(for drugSynonyms in to_array(DrugMaster.drugSynonyms) return merge(drugSynonyms,{synonymType:document(drugSynonyms.synonymType)}))},{photo:(for ph in document(to_array(DrugMaster.photo)) return ph)},{baseStkUoM:document(DrugMaster.baseStkUoM)},{compondCompDTls:(for compondCompDTls in to_array(DrugMaster.compondCompDTls) return merge(compondCompDTls,{compDrugCode:(for compDrugCode in to_array(compondCompDTls.compDrugCode) return document(compDrugCode))},{compQtyUom:document(compondCompDTls.compQtyUom)},{compStrengthUOM:document(compondCompDTls.compStrengthUOM)},{compStrengthVolumeUoM:document(compondCompDTls.compStrengthVolumeUoM)} ))},{directiontag:DrugMaster.directiontag},{directiontaglocal:DrugMaster.directiontaglocal},{returnPeriodUOM:document(DrugMaster.returnPeriodUOM)},{newReturnParams:(for nr in to_array(DrugMaster.newReturnParams) return merge(nr,{returnReason:document(nr.returnReason)}))})"
|
|
18119
|
+
};
|
|
18120
|
+
},
|
|
18121
|
+
status_update: function status_update(key, status) {
|
|
18122
|
+
return [{
|
|
18123
|
+
db_name: dbName$1,
|
|
18124
|
+
entity: "DrugMaster",
|
|
18125
|
+
filter: {
|
|
18126
|
+
_key: key
|
|
18127
|
+
},
|
|
18128
|
+
is_metadata: true,
|
|
18129
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
18130
|
+
doc: {
|
|
18131
|
+
status: status
|
|
18132
|
+
}
|
|
18133
|
+
}];
|
|
18134
|
+
},
|
|
18135
|
+
// Alerts & Restrictions Query
|
|
18136
|
+
drugRuleType: function drugRuleType() {
|
|
18137
|
+
return {
|
|
18138
|
+
db_name: dbName$1,
|
|
18139
|
+
entity: "CodingMaster",
|
|
18140
|
+
filter: "CodingMaster.Type == 'RULETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18141
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18142
|
+
sort: "CodingMaster.shortdesc"
|
|
18143
|
+
};
|
|
18144
|
+
},
|
|
18145
|
+
drugPrivilegeType: function drugPrivilegeType() {
|
|
18146
|
+
return {
|
|
18147
|
+
db_name: dbName$1,
|
|
18148
|
+
entity: "CodingMaster",
|
|
18149
|
+
filter: "CodingMaster.Type == 'PRIVILEGETYPE' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18150
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18151
|
+
sort: "CodingMaster.shortdesc"
|
|
18152
|
+
};
|
|
18153
|
+
},
|
|
18154
|
+
drugServiceApplicabilityType: function drugServiceApplicabilityType() {
|
|
18155
|
+
return {
|
|
18156
|
+
db_name: dbName$1,
|
|
18157
|
+
entity: "CodingMaster",
|
|
18158
|
+
filter: "CodingMaster.Type == 'SERVICEAPPLICABILITY' && CodingMaster.activestatus==true && CodingMaster.status == true",
|
|
18159
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
18160
|
+
sort: "CodingMaster.shortdesc"
|
|
18161
|
+
};
|
|
18162
|
+
},
|
|
18163
|
+
drugFacilityOptions: function drugFacilityOptions() {
|
|
18164
|
+
return {
|
|
18165
|
+
db_name: dbName$1,
|
|
18166
|
+
entity: "Organization",
|
|
18167
|
+
filter: "DOCUMENT(Organization.OrgType)[*].code ANY == 'OT003'",
|
|
18168
|
+
return_fields: "{_id:Organization._id,name:Organization.name}"
|
|
18169
|
+
};
|
|
18170
|
+
},
|
|
18171
|
+
drugApprovalWorkflowOptions: function drugApprovalWorkflowOptions() {
|
|
18172
|
+
return {
|
|
18173
|
+
db_name: dbName$1,
|
|
18174
|
+
entity: "queuescenarios",
|
|
18175
|
+
filter: "queuescenarios.activestatus==true && queuescenarios.status==true",
|
|
18176
|
+
return_fields: "Keep(queuescenarios,'_id','queueid','scenarioid','scenarioname')"
|
|
18177
|
+
};
|
|
18178
|
+
},
|
|
18179
|
+
drugalertRestrictionSingleRead: function drugalertRestrictionSingleRead(id) {
|
|
18180
|
+
return {
|
|
18181
|
+
db_name: dbName$1,
|
|
18182
|
+
entity: "CA_OrderCatalogPrivilegeLevel",
|
|
18183
|
+
filter: "CA_OrderCatalogPrivilegeLevel.activestatus == true && CA_OrderCatalogPrivilegeLevel.status==true && CA_OrderCatalogPrivilegeLevel.relationID=='".concat(id, "'"),
|
|
18184
|
+
return_fields: "{id:CA_OrderCatalogPrivilegeLevel.id,orgn_code:CA_OrderCatalogPrivilegeLevel.orgn_code,service_applicablity:CA_OrderCatalogPrivilegeLevel.service_applicablity,patient_criteria:CA_OrderCatalogPrivilegeLevel.patient_criteria,pract_criteria:CA_OrderCatalogPrivilegeLevel.pract_criteria,rule_type:CA_OrderCatalogPrivilegeLevel.rule_type,privilege_type:CA_OrderCatalogPrivilegeLevel.privilege_type,alert_test_message:CA_OrderCatalogPrivilegeLevel.alert_test_message,workflow:CA_OrderCatalogPrivilegeLevel.workflow}"
|
|
18185
|
+
};
|
|
18186
|
+
},
|
|
18187
|
+
ruleGroup: function ruleGroup() {
|
|
18188
|
+
return {
|
|
18189
|
+
db_name: "RuleBuilder",
|
|
18190
|
+
entity: "Groups",
|
|
18191
|
+
filter: "Groups.activestatus==true",
|
|
18192
|
+
return_fields: "{label : Groups.name, value:Groups.id}"
|
|
18193
|
+
};
|
|
18194
|
+
}
|
|
17868
18195
|
};
|
|
17869
18196
|
|
|
17870
18197
|
var allowedJsonFun = function allowedJsonFun(val) {
|
|
@@ -18535,9 +18862,126 @@ var readDrugMasterJSON = function readDrugMasterJSON(data, state) {
|
|
|
18535
18862
|
return json;
|
|
18536
18863
|
};
|
|
18537
18864
|
|
|
18865
|
+
var GenerateUpsert = function GenerateUpsert(data) {
|
|
18866
|
+
var filter = {};
|
|
18867
|
+
|
|
18868
|
+
if (data !== null && data !== void 0 && data.isEdit) {
|
|
18869
|
+
filter = {
|
|
18870
|
+
filter: {
|
|
18871
|
+
_key: data === null || data === void 0 ? void 0 : data._key
|
|
18872
|
+
}
|
|
18873
|
+
};
|
|
18874
|
+
}
|
|
18875
|
+
|
|
18876
|
+
return [_objectSpread2(_objectSpread2({
|
|
18877
|
+
db_name: dbName$1,
|
|
18878
|
+
entity: "DrugMaster",
|
|
18879
|
+
is_metadata: true,
|
|
18880
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
18881
|
+
}, filter), {}, {
|
|
18882
|
+
doc: {
|
|
18883
|
+
id: 0,
|
|
18884
|
+
DrugCode: data === null || data === void 0 ? void 0 : data.DrugCode,
|
|
18885
|
+
ShortDesc: data === null || data === void 0 ? void 0 : data.ShortDesc,
|
|
18886
|
+
LongDesc: data === null || data === void 0 ? void 0 : data.LongDesc,
|
|
18887
|
+
// Charge: "boolean",
|
|
18888
|
+
DrugClass: data === null || data === void 0 ? void 0 : data.DrugClass,
|
|
18889
|
+
DrugType: data === null || data === void 0 ? void 0 : data.DrugType,
|
|
18890
|
+
DrugCategory: data === null || data === void 0 ? void 0 : data.DrugCategory,
|
|
18891
|
+
StrengthValuesPossible: data === null || data === void 0 ? void 0 : data.StrengthValuesPossible,
|
|
18892
|
+
// TotalVolContent: "string",
|
|
18893
|
+
// TotalVolContentUoM: "string",
|
|
18894
|
+
FormCode: data === null || data === void 0 ? void 0 : data.FormCode,
|
|
18895
|
+
DefaultRouteCode: data === null || data === void 0 ? void 0 : data.DefaultRouteCode,
|
|
18896
|
+
RoutesAllowed: data === null || data === void 0 ? void 0 : data.RoutesAllowed,
|
|
18897
|
+
DispenseviaprescriptionOnly: data === null || data === void 0 ? void 0 : data.DispenseviaprescriptionOnly,
|
|
18898
|
+
// IVFluid: "boolean",
|
|
18899
|
+
// DfltFluidCode: "string",
|
|
18900
|
+
// DispenseAlternateDrug: "boolean",
|
|
18901
|
+
// AlternateDrugs: "array",
|
|
18902
|
+
// SpecialInstructionText: "array",
|
|
18903
|
+
CounsellingRequired: data === null || data === void 0 ? void 0 : data.CounsellingRequired,
|
|
18904
|
+
// DrugImageID: "number",
|
|
18905
|
+
ApplicableForCompounding: data === null || data === void 0 ? void 0 : data.ApplicableForCompounding,
|
|
18906
|
+
Additive: data === null || data === void 0 ? void 0 : data.Additive,
|
|
18907
|
+
// SourceOfDrugOrderCatalog: "string",
|
|
18908
|
+
DrugGenericId: data === null || data === void 0 ? void 0 : data.DrugGenericId,
|
|
18909
|
+
// GenericIngrListId: "string",
|
|
18910
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
18911
|
+
// statusactive: data?.status,
|
|
18912
|
+
DrugDispRules: data === null || data === void 0 ? void 0 : data.DrugDispRules,
|
|
18913
|
+
FrequencyRules: data === null || data === void 0 ? void 0 : data.FrequencyRules,
|
|
18914
|
+
mappedItems: data === null || data === void 0 ? void 0 : data.mappedItems,
|
|
18915
|
+
// drugroutegenid: "string",
|
|
18916
|
+
codeStandard: data === null || data === void 0 ? void 0 : data.codeStandard,
|
|
18917
|
+
IsDispensible: data === null || data === void 0 ? void 0 : data.IsDispensible,
|
|
18918
|
+
entityLevelStatus: data === null || data === void 0 ? void 0 : data.entityLevelStatus,
|
|
18919
|
+
packSizeApplicability: data === null || data === void 0 ? void 0 : data.packSizeApplicability,
|
|
18920
|
+
aliasDtls: data === null || data === void 0 ? void 0 : data.aliasDtls,
|
|
18921
|
+
instrDtls: data === null || data === void 0 ? void 0 : data.instrDtls,
|
|
18922
|
+
directiontag: data === null || data === void 0 ? void 0 : data.directiontag,
|
|
18923
|
+
directiontaglocal: data === null || data === void 0 ? void 0 : data.directiontaglocal,
|
|
18924
|
+
drugSynonyms: data === null || data === void 0 ? void 0 : data.drugSynonyms,
|
|
18925
|
+
photo: data === null || data === void 0 ? void 0 : data.photo,
|
|
18926
|
+
// baseStkUoM: "string",
|
|
18927
|
+
// avgRate: "number",
|
|
18928
|
+
compondCompDTls: data === null || data === void 0 ? void 0 : data.compondCompDTls,
|
|
18929
|
+
// privilegeID: "array",
|
|
18930
|
+
// extDrugGenericId: "string",
|
|
18931
|
+
returnApplicable: data === null || data === void 0 ? void 0 : data.returnApplicable,
|
|
18932
|
+
returnPeriodVal: data === null || data === void 0 ? void 0 : data.returnPeriodVal,
|
|
18933
|
+
returnPeriodUOM: data === null || data === void 0 ? void 0 : data.returnPeriodUOM,
|
|
18934
|
+
partialQtyAllow: data === null || data === void 0 ? void 0 : data.partialQtyAllow,
|
|
18935
|
+
returnPolicy: data === null || data === void 0 ? void 0 : data.returnPolicy,
|
|
18936
|
+
newReturnParams: data === null || data === void 0 ? void 0 : data.newReturnParams
|
|
18937
|
+
}
|
|
18938
|
+
})];
|
|
18939
|
+
};
|
|
18940
|
+
var GenerateAlertRestrictionUpsert = function GenerateAlertRestrictionUpsert(data) {
|
|
18941
|
+
var filter = {};
|
|
18942
|
+
|
|
18943
|
+
if (data !== null && data !== void 0 && data.isEdit) {
|
|
18944
|
+
filter = {
|
|
18945
|
+
filter: {
|
|
18946
|
+
_key: data === null || data === void 0 ? void 0 : data._key
|
|
18947
|
+
}
|
|
18948
|
+
};
|
|
18949
|
+
}
|
|
18950
|
+
|
|
18951
|
+
return [_objectSpread2(_objectSpread2({
|
|
18952
|
+
db_name: dbName$1,
|
|
18953
|
+
entity: "CA_OrderCatalogPrivilegeLevel",
|
|
18954
|
+
is_metadata: true,
|
|
18955
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
18956
|
+
}, filter), {}, {
|
|
18957
|
+
doc: {
|
|
18958
|
+
id: 0,
|
|
18959
|
+
orgn_code: data === null || data === void 0 ? void 0 : data.orgn_code,
|
|
18960
|
+
service_applicablity: data === null || data === void 0 ? void 0 : data.service_applicablity,
|
|
18961
|
+
order_catalog_criteria: data === null || data === void 0 ? void 0 : data.order_catalog_criteria,
|
|
18962
|
+
patient_criteria: data === null || data === void 0 ? void 0 : data.patient_criteria,
|
|
18963
|
+
pract_criteria: data === null || data === void 0 ? void 0 : data.pract_criteria,
|
|
18964
|
+
// appr_leveles: [
|
|
18965
|
+
// {
|
|
18966
|
+
// appr_level: "string",
|
|
18967
|
+
// appr_level_description: "string",
|
|
18968
|
+
// approval_authority_criteria: "array",
|
|
18969
|
+
// },
|
|
18970
|
+
// ],
|
|
18971
|
+
rule_type: data === null || data === void 0 ? void 0 : data.rule_type,
|
|
18972
|
+
privilege_type: data === null || data === void 0 ? void 0 : data.privilege_type,
|
|
18973
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
18974
|
+
alert_test_message: data === null || data === void 0 ? void 0 : data.alert_test_message,
|
|
18975
|
+
workflow: data === null || data === void 0 ? void 0 : data.workflow,
|
|
18976
|
+
relationID: data === null || data === void 0 ? void 0 : data.relationID // This is mandatory for further reading of documents on Update mode. Do not remove this field.
|
|
18977
|
+
|
|
18978
|
+
}
|
|
18979
|
+
})];
|
|
18980
|
+
};
|
|
18981
|
+
|
|
18538
18982
|
var _extraReducers$t;
|
|
18539
18983
|
|
|
18540
|
-
var loopMasters$6 = function loopMasters() {
|
|
18984
|
+
var loopMasters$6 = function loopMasters(params) {
|
|
18541
18985
|
return new es6Promise.Promise( /*#__PURE__*/function () {
|
|
18542
18986
|
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(resolve, reject) {
|
|
18543
18987
|
var calls;
|
|
@@ -18545,19 +18989,31 @@ var loopMasters$6 = function loopMasters() {
|
|
|
18545
18989
|
while (1) {
|
|
18546
18990
|
switch (_context2.prev = _context2.next) {
|
|
18547
18991
|
case 0:
|
|
18548
|
-
calls = Object.keys(
|
|
18992
|
+
calls = Object.keys(masterNewQuery).map( /*#__PURE__*/function () {
|
|
18549
18993
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(val) {
|
|
18550
18994
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
18551
18995
|
while (1) {
|
|
18552
18996
|
switch (_context.prev = _context.next) {
|
|
18553
18997
|
case 0:
|
|
18554
|
-
|
|
18555
|
-
|
|
18998
|
+
if (!(val === "item_code")) {
|
|
18999
|
+
_context.next = 4;
|
|
19000
|
+
break;
|
|
19001
|
+
}
|
|
18556
19002
|
|
|
18557
|
-
|
|
18558
|
-
return
|
|
19003
|
+
_context.next = 3;
|
|
19004
|
+
return fetchMaster$6(val, masterNewQuery[val], params === null || params === void 0 ? void 0 : params[val]);
|
|
18559
19005
|
|
|
18560
19006
|
case 3:
|
|
19007
|
+
return _context.abrupt("return", _context.sent);
|
|
19008
|
+
|
|
19009
|
+
case 4:
|
|
19010
|
+
_context.next = 6;
|
|
19011
|
+
return fetchMaster$6(val, masterNewQuery[val]);
|
|
19012
|
+
|
|
19013
|
+
case 6:
|
|
19014
|
+
return _context.abrupt("return", _context.sent);
|
|
19015
|
+
|
|
19016
|
+
case 7:
|
|
18561
19017
|
case "end":
|
|
18562
19018
|
return _context.stop();
|
|
18563
19019
|
}
|
|
@@ -18574,59 +19030,48 @@ var loopMasters$6 = function loopMasters() {
|
|
|
18574
19030
|
data.map(function (val) {
|
|
18575
19031
|
var arr = [];
|
|
18576
19032
|
val.data.map(function (value) {
|
|
18577
|
-
var _value$coding;
|
|
18578
|
-
|
|
18579
19033
|
switch (val.name) {
|
|
18580
|
-
case "
|
|
18581
|
-
case "
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
19034
|
+
case "synonym_type":
|
|
19035
|
+
case "source":
|
|
19036
|
+
case "drug_uom":
|
|
19037
|
+
case "instruction_type":
|
|
19038
|
+
case "drug_status":
|
|
19039
|
+
case "applicability":
|
|
19040
|
+
case "rule_type":
|
|
19041
|
+
case "round_off_type":
|
|
19042
|
+
case "return_reason":
|
|
19043
|
+
case "duration_uom":
|
|
19044
|
+
arr.push({
|
|
19045
|
+
label: value !== null && value !== void 0 && value.display ? value === null || value === void 0 ? void 0 : value.display : "",
|
|
19046
|
+
value: value !== null && value !== void 0 && value._id ? value === null || value === void 0 ? void 0 : value._id : ""
|
|
18587
19047
|
});
|
|
18588
19048
|
break;
|
|
18589
19049
|
|
|
18590
|
-
case "
|
|
18591
|
-
case "gender":
|
|
18592
|
-
arr.push(_objectSpread2({
|
|
18593
|
-
label: value.coding ? value.coding[0] ? value.coding[0].display : "" : val,
|
|
18594
|
-
value: value.coding ? value.coding[0] ? value.coding[0]._id : "" : val
|
|
18595
|
-
}, value));
|
|
18596
|
-
break;
|
|
18597
|
-
|
|
18598
|
-
case "alternate_drug_code":
|
|
18599
|
-
arr.push(_objectSpread2({
|
|
18600
|
-
label: value.ShortDesc ? value.ShortDesc : "",
|
|
18601
|
-
value: value._id
|
|
18602
|
-
}, value));
|
|
18603
|
-
break;
|
|
18604
|
-
|
|
18605
|
-
case "age_range_group":
|
|
18606
|
-
arr.push(_objectSpread2({
|
|
18607
|
-
label: value.agerangecode,
|
|
18608
|
-
value: value._id
|
|
18609
|
-
}, value));
|
|
18610
|
-
break;
|
|
18611
|
-
|
|
18612
|
-
case "default_route":
|
|
18613
|
-
case "routes_allowed":
|
|
18614
|
-
case "default_frequency":
|
|
18615
|
-
case "drug_item_master":
|
|
19050
|
+
case "code_standara":
|
|
18616
19051
|
case "drug_class":
|
|
19052
|
+
case "drug_generic":
|
|
19053
|
+
case "drug_type":
|
|
19054
|
+
case "form":
|
|
18617
19055
|
case "drug_category":
|
|
18618
19056
|
case "drug_type":
|
|
18619
19057
|
case "form":
|
|
18620
|
-
case "
|
|
19058
|
+
case "default_route":
|
|
19059
|
+
case "frequency":
|
|
19060
|
+
case "routes_allowed":
|
|
19061
|
+
case "drug_followUom":
|
|
19062
|
+
case "action":
|
|
19063
|
+
case "entity_type":
|
|
19064
|
+
case "privilege_type":
|
|
18621
19065
|
arr.push(_objectSpread2({
|
|
18622
19066
|
label: value.shortdesc ? value.shortdesc : "",
|
|
18623
19067
|
value: value._id
|
|
18624
19068
|
}, value));
|
|
18625
19069
|
break;
|
|
18626
19070
|
|
|
18627
|
-
case "
|
|
19071
|
+
case "drug_code":
|
|
19072
|
+
case "item_code":
|
|
18628
19073
|
arr.push(_objectSpread2({
|
|
18629
|
-
label: value.
|
|
19074
|
+
label: value.ShortDesc ? value.ShortDesc : "",
|
|
18630
19075
|
value: value._id
|
|
18631
19076
|
}, value));
|
|
18632
19077
|
break;
|
|
@@ -18661,7 +19106,7 @@ var loopMasters$6 = function loopMasters() {
|
|
|
18661
19106
|
}());
|
|
18662
19107
|
};
|
|
18663
19108
|
|
|
18664
|
-
var fetchMaster$6 = function fetchMaster(name, query) {
|
|
19109
|
+
var fetchMaster$6 = function fetchMaster(name, query, params) {
|
|
18665
19110
|
return new es6Promise.Promise( /*#__PURE__*/function () {
|
|
18666
19111
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(resolve, reject) {
|
|
18667
19112
|
var data;
|
|
@@ -18671,7 +19116,7 @@ var fetchMaster$6 = function fetchMaster(name, query) {
|
|
|
18671
19116
|
case 0:
|
|
18672
19117
|
_context3.next = 2;
|
|
18673
19118
|
return fetchData({
|
|
18674
|
-
body: query
|
|
19119
|
+
body: JSON.stringify(query(params))
|
|
18675
19120
|
}, __readDocumentUrl__);
|
|
18676
19121
|
|
|
18677
19122
|
case 2:
|
|
@@ -18699,8 +19144,15 @@ var DRUG_MASTER_READ = createAsyncThunk("drugMasterSlice/drug_master_list", /*#_
|
|
|
18699
19144
|
var payload,
|
|
18700
19145
|
_ref5,
|
|
18701
19146
|
rejectWithValue,
|
|
19147
|
+
isWithoutLimit,
|
|
18702
19148
|
page,
|
|
18703
19149
|
perpage,
|
|
19150
|
+
_payload$searchQuery,
|
|
19151
|
+
searchQuery,
|
|
19152
|
+
queryId,
|
|
19153
|
+
withoutLimitFilter,
|
|
19154
|
+
withLimitFilter,
|
|
19155
|
+
fullReadQDMQuery,
|
|
18704
19156
|
data,
|
|
18705
19157
|
arry,
|
|
18706
19158
|
_args4 = arguments;
|
|
@@ -18712,24 +19164,47 @@ var DRUG_MASTER_READ = createAsyncThunk("drugMasterSlice/drug_master_list", /*#_
|
|
|
18712
19164
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
18713
19165
|
_ref5 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
|
|
18714
19166
|
_context4.prev = 2;
|
|
18715
|
-
page = payload.page, perpage = payload.perpage;
|
|
18716
|
-
|
|
19167
|
+
isWithoutLimit = payload.isWithoutLimit, page = payload.page, perpage = payload.perpage, _payload$searchQuery = payload.searchQuery, searchQuery = _payload$searchQuery === void 0 ? "" : _payload$searchQuery;
|
|
19168
|
+
queryId = isWithoutLimit ? "b1656253-8d63-4954-98ea-3765c230a3d5" : "2d926ad5-19f5-4140-9158-f4cd17e7c307";
|
|
19169
|
+
withoutLimitFilter = {
|
|
19170
|
+
filter: {
|
|
19171
|
+
search: "%".concat(searchQuery, "%")
|
|
19172
|
+
}
|
|
19173
|
+
};
|
|
19174
|
+
withLimitFilter = {
|
|
19175
|
+
filter: {
|
|
19176
|
+
search: "%".concat(searchQuery, "%"),
|
|
19177
|
+
page: page,
|
|
19178
|
+
perPage: perpage
|
|
19179
|
+
}
|
|
19180
|
+
};
|
|
19181
|
+
fullReadQDMQuery = _objectSpread2({
|
|
19182
|
+
db_name: dbName$1,
|
|
19183
|
+
queryid: queryId
|
|
19184
|
+
}, isWithoutLimit ? withoutLimitFilter : withLimitFilter);
|
|
19185
|
+
_context4.next = 10;
|
|
18717
19186
|
return fetchData({
|
|
18718
|
-
body: JSON.stringify(
|
|
18719
|
-
},
|
|
19187
|
+
body: JSON.stringify(fullReadQDMQuery)
|
|
19188
|
+
}, __baseUrl__$1);
|
|
18720
19189
|
|
|
18721
|
-
case
|
|
19190
|
+
case 10:
|
|
18722
19191
|
data = _context4.sent;
|
|
18723
19192
|
arry = [];
|
|
18724
|
-
data.
|
|
19193
|
+
data.map(function (val) {
|
|
18725
19194
|
if (val._id) {
|
|
19195
|
+
var _val$DrugCode, _val$LongDesc, _val$DrugClass$longde, _val$DrugClass, _val$DrugCategory$lon, _val$DrugCategory, _val$DrugType$longdes, _val$DrugType, _val$FormCode$longdes, _val$FormCode, _val$RoutesAllowed, _val$StrengthValuesPo;
|
|
19196
|
+
|
|
18726
19197
|
arry.push(_objectSpread2(_objectSpread2({}, val), {}, {
|
|
18727
|
-
"
|
|
18728
|
-
"
|
|
18729
|
-
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
19198
|
+
code_des: "".concat((_val$DrugCode = val === null || val === void 0 ? void 0 : val.DrugCode) !== null && _val$DrugCode !== void 0 ? _val$DrugCode : "", " & ").concat((_val$LongDesc = val === null || val === void 0 ? void 0 : val.LongDesc) !== null && _val$LongDesc !== void 0 ? _val$LongDesc : ""),
|
|
19199
|
+
"class": (_val$DrugClass$longde = val === null || val === void 0 ? void 0 : (_val$DrugClass = val.DrugClass) === null || _val$DrugClass === void 0 ? void 0 : _val$DrugClass.longdesc) !== null && _val$DrugClass$longde !== void 0 ? _val$DrugClass$longde : "",
|
|
19200
|
+
category: (_val$DrugCategory$lon = val === null || val === void 0 ? void 0 : (_val$DrugCategory = val.DrugCategory) === null || _val$DrugCategory === void 0 ? void 0 : _val$DrugCategory.longdesc) !== null && _val$DrugCategory$lon !== void 0 ? _val$DrugCategory$lon : "",
|
|
19201
|
+
type: (_val$DrugType$longdes = val === null || val === void 0 ? void 0 : (_val$DrugType = val.DrugType) === null || _val$DrugType === void 0 ? void 0 : _val$DrugType.longdesc) !== null && _val$DrugType$longdes !== void 0 ? _val$DrugType$longdes : "",
|
|
19202
|
+
form: (_val$FormCode$longdes = val === null || val === void 0 ? void 0 : (_val$FormCode = val.FormCode) === null || _val$FormCode === void 0 ? void 0 : _val$FormCode.longdesc) !== null && _val$FormCode$longdes !== void 0 ? _val$FormCode$longdes : "",
|
|
19203
|
+
route: val !== null && val !== void 0 && val.RoutesAllowed ? val === null || val === void 0 ? void 0 : (_val$RoutesAllowed = val.RoutesAllowed) === null || _val$RoutesAllowed === void 0 ? void 0 : _val$RoutesAllowed.map(function (data) {
|
|
19204
|
+
return data === null || data === void 0 ? void 0 : data.longdesc;
|
|
19205
|
+
}).join(", ") : [],
|
|
19206
|
+
strength: (_val$StrengthValuesPo = val === null || val === void 0 ? void 0 : val.StrengthValuesPossible) !== null && _val$StrengthValuesPo !== void 0 ? _val$StrengthValuesPo : {},
|
|
19207
|
+
status: val !== null && val !== void 0 && val.status ? true : false
|
|
18733
19208
|
}));
|
|
18734
19209
|
}
|
|
18735
19210
|
});
|
|
@@ -18737,19 +19212,19 @@ var DRUG_MASTER_READ = createAsyncThunk("drugMasterSlice/drug_master_list", /*#_
|
|
|
18737
19212
|
data: arry
|
|
18738
19213
|
}));
|
|
18739
19214
|
|
|
18740
|
-
case
|
|
18741
|
-
_context4.prev =
|
|
19215
|
+
case 16:
|
|
19216
|
+
_context4.prev = 16;
|
|
18742
19217
|
_context4.t0 = _context4["catch"](2);
|
|
18743
|
-
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject
|
|
19218
|
+
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18744
19219
|
message: _context4.t0.message
|
|
18745
19220
|
})));
|
|
18746
19221
|
|
|
18747
|
-
case
|
|
19222
|
+
case 19:
|
|
18748
19223
|
case "end":
|
|
18749
19224
|
return _context4.stop();
|
|
18750
19225
|
}
|
|
18751
19226
|
}
|
|
18752
|
-
}, _callee4, null, [[2,
|
|
19227
|
+
}, _callee4, null, [[2, 16]]);
|
|
18753
19228
|
})));
|
|
18754
19229
|
var DRUG_MASTER_UPSERT = createAsyncThunk("drugMasterSlice/drug_master_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
18755
19230
|
var payload,
|
|
@@ -18804,7 +19279,8 @@ var DRUG_MASTER_STATUS_CHANGE = createAsyncThunk("drugMasterSlice/drug_master_st
|
|
|
18804
19279
|
var payload,
|
|
18805
19280
|
_ref9,
|
|
18806
19281
|
rejectWithValue,
|
|
18807
|
-
|
|
19282
|
+
key,
|
|
19283
|
+
status,
|
|
18808
19284
|
queriesjson,
|
|
18809
19285
|
data,
|
|
18810
19286
|
_args6 = arguments;
|
|
@@ -18816,11 +19292,8 @@ var DRUG_MASTER_STATUS_CHANGE = createAsyncThunk("drugMasterSlice/drug_master_st
|
|
|
18816
19292
|
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
18817
19293
|
_ref9 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
|
|
18818
19294
|
_context6.prev = 2;
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
status: payload.status
|
|
18822
|
-
};
|
|
18823
|
-
queriesjson = queries$f.status_update_drug_master(statuschange);
|
|
19295
|
+
key = payload.key, status = payload.status;
|
|
19296
|
+
queriesjson = queries$f.status_update_drug_master(key, status);
|
|
18824
19297
|
_context6.next = 7;
|
|
18825
19298
|
return fetchData({
|
|
18826
19299
|
body: JSON.stringify(queriesjson)
|
|
@@ -18847,8 +19320,11 @@ var DRUG_MASTER_STATUS_CHANGE = createAsyncThunk("drugMasterSlice/drug_master_st
|
|
|
18847
19320
|
}, _callee6, null, [[2, 11]]);
|
|
18848
19321
|
})));
|
|
18849
19322
|
var DRUG_MASTERS = createAsyncThunk("drugMasterSlice/masterlist", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
18850
|
-
var
|
|
19323
|
+
var payload,
|
|
19324
|
+
_ref11,
|
|
18851
19325
|
rejectWithValue,
|
|
19326
|
+
itemCodeId,
|
|
19327
|
+
params,
|
|
18852
19328
|
data,
|
|
18853
19329
|
_args7 = arguments;
|
|
18854
19330
|
|
|
@@ -18856,30 +19332,37 @@ var DRUG_MASTERS = createAsyncThunk("drugMasterSlice/masterlist", /*#__PURE__*/_
|
|
|
18856
19332
|
while (1) {
|
|
18857
19333
|
switch (_context7.prev = _context7.next) {
|
|
18858
19334
|
case 0:
|
|
19335
|
+
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
18859
19336
|
_ref11 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
|
|
18860
19337
|
_context7.prev = 2;
|
|
18861
|
-
|
|
18862
|
-
|
|
19338
|
+
itemCodeId = payload.itemCodeId;
|
|
19339
|
+
params = {
|
|
19340
|
+
item_code: {
|
|
19341
|
+
id: itemCodeId
|
|
19342
|
+
}
|
|
19343
|
+
};
|
|
19344
|
+
_context7.next = 7;
|
|
19345
|
+
return loopMasters$6(params);
|
|
18863
19346
|
|
|
18864
|
-
case
|
|
19347
|
+
case 7:
|
|
18865
19348
|
data = _context7.sent;
|
|
18866
19349
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18867
19350
|
data: data
|
|
18868
19351
|
}));
|
|
18869
19352
|
|
|
18870
|
-
case
|
|
18871
|
-
_context7.prev =
|
|
19353
|
+
case 11:
|
|
19354
|
+
_context7.prev = 11;
|
|
18872
19355
|
_context7.t0 = _context7["catch"](2);
|
|
18873
19356
|
return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18874
19357
|
message: _context7.t0.message
|
|
18875
19358
|
})));
|
|
18876
19359
|
|
|
18877
|
-
case
|
|
19360
|
+
case 14:
|
|
18878
19361
|
case "end":
|
|
18879
19362
|
return _context7.stop();
|
|
18880
19363
|
}
|
|
18881
19364
|
}
|
|
18882
|
-
}, _callee7, null, [[2,
|
|
19365
|
+
}, _callee7, null, [[2, 11]]);
|
|
18883
19366
|
})));
|
|
18884
19367
|
var SAVE_DRUG_MASTER = createAsyncThunk("drugMasterSlice/create_drug_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
18885
19368
|
var payload,
|
|
@@ -19072,6 +19555,610 @@ var AGE_CATEGORY_BY_ID = createAsyncThunk("drugMasterSlice/age_category_by_id",
|
|
|
19072
19555
|
}
|
|
19073
19556
|
}, _callee11, null, [[2, 13]]);
|
|
19074
19557
|
})));
|
|
19558
|
+
var DRUG_MASTER_ENTITY_NAME_OPTIONS = createAsyncThunk("drugMasterSlice/drug_catalog_master_entity_name_options", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
19559
|
+
var payload,
|
|
19560
|
+
_ref21,
|
|
19561
|
+
rejectWithValue,
|
|
19562
|
+
entityTypeCode,
|
|
19563
|
+
data,
|
|
19564
|
+
_data,
|
|
19565
|
+
_data$result3,
|
|
19566
|
+
_args12 = arguments;
|
|
19567
|
+
|
|
19568
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
19569
|
+
while (1) {
|
|
19570
|
+
switch (_context12.prev = _context12.next) {
|
|
19571
|
+
case 0:
|
|
19572
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
19573
|
+
_ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
|
|
19574
|
+
_context12.prev = 2;
|
|
19575
|
+
entityTypeCode = payload.entityTypeCode;
|
|
19576
|
+
_context12.next = 6;
|
|
19577
|
+
return fetchData({
|
|
19578
|
+
body: JSON.stringify(queries$f.entityNameOptionsQuery(entityTypeCode))
|
|
19579
|
+
}, __readDocumentUrl__);
|
|
19580
|
+
|
|
19581
|
+
case 6:
|
|
19582
|
+
data = _context12.sent;
|
|
19583
|
+
|
|
19584
|
+
if (!(data.result.length > 0)) {
|
|
19585
|
+
_context12.next = 12;
|
|
19586
|
+
break;
|
|
19587
|
+
}
|
|
19588
|
+
|
|
19589
|
+
data = (_data = data) === null || _data === void 0 ? void 0 : (_data$result3 = _data.result) === null || _data$result3 === void 0 ? void 0 : _data$result3.map(function (option) {
|
|
19590
|
+
return _objectSpread2({
|
|
19591
|
+
label: option,
|
|
19592
|
+
value: option._id
|
|
19593
|
+
}, option);
|
|
19594
|
+
});
|
|
19595
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19596
|
+
data: data
|
|
19597
|
+
}));
|
|
19598
|
+
|
|
19599
|
+
case 12:
|
|
19600
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19601
|
+
data: []
|
|
19602
|
+
}));
|
|
19603
|
+
|
|
19604
|
+
case 13:
|
|
19605
|
+
_context12.next = 18;
|
|
19606
|
+
break;
|
|
19607
|
+
|
|
19608
|
+
case 15:
|
|
19609
|
+
_context12.prev = 15;
|
|
19610
|
+
_context12.t0 = _context12["catch"](2);
|
|
19611
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19612
|
+
message: _context12.t0.message
|
|
19613
|
+
})));
|
|
19614
|
+
|
|
19615
|
+
case 18:
|
|
19616
|
+
case "end":
|
|
19617
|
+
return _context12.stop();
|
|
19618
|
+
}
|
|
19619
|
+
}
|
|
19620
|
+
}, _callee12, null, [[2, 15]]);
|
|
19621
|
+
})));
|
|
19622
|
+
var DRUG_MASTER_SINGLE_READ = createAsyncThunk("drugMasterSlice/drug_catalog_master_singleRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
19623
|
+
var payload,
|
|
19624
|
+
_ref23,
|
|
19625
|
+
rejectWithValue,
|
|
19626
|
+
id,
|
|
19627
|
+
data,
|
|
19628
|
+
_args13 = arguments;
|
|
19629
|
+
|
|
19630
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
19631
|
+
while (1) {
|
|
19632
|
+
switch (_context13.prev = _context13.next) {
|
|
19633
|
+
case 0:
|
|
19634
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
19635
|
+
_ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
|
|
19636
|
+
_context13.prev = 2;
|
|
19637
|
+
id = payload.id;
|
|
19638
|
+
_context13.next = 6;
|
|
19639
|
+
return fetchData({
|
|
19640
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugCatalogMasterSingleRead(id))
|
|
19641
|
+
}, __readDocumentUrl__);
|
|
19642
|
+
|
|
19643
|
+
case 6:
|
|
19644
|
+
data = _context13.sent;
|
|
19645
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19646
|
+
data: data.result
|
|
19647
|
+
}));
|
|
19648
|
+
|
|
19649
|
+
case 10:
|
|
19650
|
+
_context13.prev = 10;
|
|
19651
|
+
_context13.t0 = _context13["catch"](2);
|
|
19652
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19653
|
+
message: _context13.t0.message
|
|
19654
|
+
})));
|
|
19655
|
+
|
|
19656
|
+
case 13:
|
|
19657
|
+
case "end":
|
|
19658
|
+
return _context13.stop();
|
|
19659
|
+
}
|
|
19660
|
+
}
|
|
19661
|
+
}, _callee13, null, [[2, 10]]);
|
|
19662
|
+
})));
|
|
19663
|
+
var DRUG_MASTER_SAVE = createAsyncThunk("drugMasterSlice/drug_catalog_master_save", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
19664
|
+
var payload,
|
|
19665
|
+
_ref25,
|
|
19666
|
+
rejectWithValue,
|
|
19667
|
+
body,
|
|
19668
|
+
Body,
|
|
19669
|
+
data,
|
|
19670
|
+
_args14 = arguments;
|
|
19671
|
+
|
|
19672
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
19673
|
+
while (1) {
|
|
19674
|
+
switch (_context14.prev = _context14.next) {
|
|
19675
|
+
case 0:
|
|
19676
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
19677
|
+
_ref25 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
|
|
19678
|
+
_context14.prev = 2;
|
|
19679
|
+
body = payload.body;
|
|
19680
|
+
Body = GenerateUpsert(body);
|
|
19681
|
+
_context14.next = 7;
|
|
19682
|
+
return fetchData({
|
|
19683
|
+
body: JSON.stringify(Body)
|
|
19684
|
+
}, __uspsertUrl__);
|
|
19685
|
+
|
|
19686
|
+
case 7:
|
|
19687
|
+
data = _context14.sent;
|
|
19688
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19689
|
+
data: data
|
|
19690
|
+
}));
|
|
19691
|
+
|
|
19692
|
+
case 11:
|
|
19693
|
+
_context14.prev = 11;
|
|
19694
|
+
_context14.t0 = _context14["catch"](2);
|
|
19695
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19696
|
+
message: _context14.t0.message
|
|
19697
|
+
})));
|
|
19698
|
+
|
|
19699
|
+
case 14:
|
|
19700
|
+
case "end":
|
|
19701
|
+
return _context14.stop();
|
|
19702
|
+
}
|
|
19703
|
+
}
|
|
19704
|
+
}, _callee14, null, [[2, 11]]);
|
|
19705
|
+
})));
|
|
19706
|
+
var RULE_GROUP_DROPDOWN = createAsyncThunk("drugMasterSlice/getGroup", /*#__PURE__*/function () {
|
|
19707
|
+
var _ref26 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(payload, action) {
|
|
19708
|
+
var _rejectWithValue, body, options, _res, response;
|
|
19709
|
+
|
|
19710
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
19711
|
+
while (1) {
|
|
19712
|
+
switch (_context15.prev = _context15.next) {
|
|
19713
|
+
case 0:
|
|
19714
|
+
_context15.prev = 0;
|
|
19715
|
+
_rejectWithValue = action.rejectWithValue;
|
|
19716
|
+
body = {};
|
|
19717
|
+
body = JSON.stringify(drugCatalogMasterQuery.ruleGroup());
|
|
19718
|
+
options = {
|
|
19719
|
+
method: "Post",
|
|
19720
|
+
headers: {
|
|
19721
|
+
"Content-Type": "application/json",
|
|
19722
|
+
Accept: "application/json"
|
|
19723
|
+
},
|
|
19724
|
+
body: body
|
|
19725
|
+
};
|
|
19726
|
+
_context15.next = 7;
|
|
19727
|
+
return fetch(__readDocumentUrl__, options);
|
|
19728
|
+
|
|
19729
|
+
case 7:
|
|
19730
|
+
_res = _context15.sent;
|
|
19731
|
+
|
|
19732
|
+
if (_res.ok) {
|
|
19733
|
+
_context15.next = 10;
|
|
19734
|
+
break;
|
|
19735
|
+
}
|
|
19736
|
+
|
|
19737
|
+
return _context15.abrupt("return", _rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19738
|
+
message: _res === null || _res === void 0 ? void 0 : _res.statusText,
|
|
19739
|
+
Code: _res.status
|
|
19740
|
+
})));
|
|
19741
|
+
|
|
19742
|
+
case 10:
|
|
19743
|
+
_context15.next = 12;
|
|
19744
|
+
return _res.json();
|
|
19745
|
+
|
|
19746
|
+
case 12:
|
|
19747
|
+
response = _context15.sent;
|
|
19748
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, response), {}, {
|
|
19749
|
+
Code: _res.status
|
|
19750
|
+
}));
|
|
19751
|
+
|
|
19752
|
+
case 16:
|
|
19753
|
+
_context15.prev = 16;
|
|
19754
|
+
_context15.t0 = _context15["catch"](0);
|
|
19755
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19756
|
+
message: _context15.t0.message
|
|
19757
|
+
})));
|
|
19758
|
+
|
|
19759
|
+
case 19:
|
|
19760
|
+
case "end":
|
|
19761
|
+
return _context15.stop();
|
|
19762
|
+
}
|
|
19763
|
+
}
|
|
19764
|
+
}, _callee15, null, [[0, 16]]);
|
|
19765
|
+
}));
|
|
19766
|
+
|
|
19767
|
+
return function (_x6, _x7) {
|
|
19768
|
+
return _ref26.apply(this, arguments);
|
|
19769
|
+
};
|
|
19770
|
+
}());
|
|
19771
|
+
var DRUG_RULE_TYPE = createAsyncThunk("drugMasterSlice/drug_rule_type", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
19772
|
+
var _ref28,
|
|
19773
|
+
rejectWithValue,
|
|
19774
|
+
_data$result4,
|
|
19775
|
+
data,
|
|
19776
|
+
_data$result5,
|
|
19777
|
+
_data$result5$map,
|
|
19778
|
+
res,
|
|
19779
|
+
_args16 = arguments;
|
|
19780
|
+
|
|
19781
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
19782
|
+
while (1) {
|
|
19783
|
+
switch (_context16.prev = _context16.next) {
|
|
19784
|
+
case 0:
|
|
19785
|
+
_ref28 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
|
|
19786
|
+
_context16.prev = 2;
|
|
19787
|
+
_context16.next = 5;
|
|
19788
|
+
return fetchData({
|
|
19789
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugRuleType())
|
|
19790
|
+
}, __readDocumentUrl__);
|
|
19791
|
+
|
|
19792
|
+
case 5:
|
|
19793
|
+
data = _context16.sent;
|
|
19794
|
+
|
|
19795
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : _data$result4.length) > 0)) {
|
|
19796
|
+
_context16.next = 11;
|
|
19797
|
+
break;
|
|
19798
|
+
}
|
|
19799
|
+
|
|
19800
|
+
res = data === null || data === void 0 ? void 0 : (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : (_data$result5$map = _data$result5.map(function (option) {
|
|
19801
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19802
|
+
label: option === null || option === void 0 ? void 0 : option.display,
|
|
19803
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19804
|
+
});
|
|
19805
|
+
})) === null || _data$result5$map === void 0 ? void 0 : _data$result5$map.reverse();
|
|
19806
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19807
|
+
data: res
|
|
19808
|
+
}));
|
|
19809
|
+
|
|
19810
|
+
case 11:
|
|
19811
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19812
|
+
data: []
|
|
19813
|
+
}));
|
|
19814
|
+
|
|
19815
|
+
case 12:
|
|
19816
|
+
_context16.next = 17;
|
|
19817
|
+
break;
|
|
19818
|
+
|
|
19819
|
+
case 14:
|
|
19820
|
+
_context16.prev = 14;
|
|
19821
|
+
_context16.t0 = _context16["catch"](2);
|
|
19822
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19823
|
+
message: _context16.t0.message
|
|
19824
|
+
})));
|
|
19825
|
+
|
|
19826
|
+
case 17:
|
|
19827
|
+
case "end":
|
|
19828
|
+
return _context16.stop();
|
|
19829
|
+
}
|
|
19830
|
+
}
|
|
19831
|
+
}, _callee16, null, [[2, 14]]);
|
|
19832
|
+
})));
|
|
19833
|
+
var DRUG_PRIVILEGE_TYPE = createAsyncThunk("drugMasterSlice/drug_privilege_type", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
19834
|
+
var _ref30,
|
|
19835
|
+
rejectWithValue,
|
|
19836
|
+
_data$result6,
|
|
19837
|
+
data,
|
|
19838
|
+
_data$result7,
|
|
19839
|
+
res,
|
|
19840
|
+
_args17 = arguments;
|
|
19841
|
+
|
|
19842
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
19843
|
+
while (1) {
|
|
19844
|
+
switch (_context17.prev = _context17.next) {
|
|
19845
|
+
case 0:
|
|
19846
|
+
_ref30 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
|
|
19847
|
+
_context17.prev = 2;
|
|
19848
|
+
_context17.next = 5;
|
|
19849
|
+
return fetchData({
|
|
19850
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugPrivilegeType())
|
|
19851
|
+
}, __readDocumentUrl__);
|
|
19852
|
+
|
|
19853
|
+
case 5:
|
|
19854
|
+
data = _context17.sent;
|
|
19855
|
+
|
|
19856
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : _data$result6.length) > 0)) {
|
|
19857
|
+
_context17.next = 11;
|
|
19858
|
+
break;
|
|
19859
|
+
}
|
|
19860
|
+
|
|
19861
|
+
res = data === null || data === void 0 ? void 0 : (_data$result7 = data.result) === null || _data$result7 === void 0 ? void 0 : _data$result7.map(function (option) {
|
|
19862
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19863
|
+
label: option === null || option === void 0 ? void 0 : option.display,
|
|
19864
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19865
|
+
});
|
|
19866
|
+
});
|
|
19867
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19868
|
+
data: res
|
|
19869
|
+
}));
|
|
19870
|
+
|
|
19871
|
+
case 11:
|
|
19872
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19873
|
+
data: []
|
|
19874
|
+
}));
|
|
19875
|
+
|
|
19876
|
+
case 12:
|
|
19877
|
+
_context17.next = 17;
|
|
19878
|
+
break;
|
|
19879
|
+
|
|
19880
|
+
case 14:
|
|
19881
|
+
_context17.prev = 14;
|
|
19882
|
+
_context17.t0 = _context17["catch"](2);
|
|
19883
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19884
|
+
message: _context17.t0.message
|
|
19885
|
+
})));
|
|
19886
|
+
|
|
19887
|
+
case 17:
|
|
19888
|
+
case "end":
|
|
19889
|
+
return _context17.stop();
|
|
19890
|
+
}
|
|
19891
|
+
}
|
|
19892
|
+
}, _callee17, null, [[2, 14]]);
|
|
19893
|
+
})));
|
|
19894
|
+
var DRUG_SERVICE_APPLICABILITY_TYPE = createAsyncThunk("drugMasterSlice/drug_service_applicability_type", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
|
|
19895
|
+
var _ref32,
|
|
19896
|
+
rejectWithValue,
|
|
19897
|
+
_data$result8,
|
|
19898
|
+
data,
|
|
19899
|
+
_data$result9,
|
|
19900
|
+
_data$result9$map,
|
|
19901
|
+
res,
|
|
19902
|
+
_args18 = arguments;
|
|
19903
|
+
|
|
19904
|
+
return regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
19905
|
+
while (1) {
|
|
19906
|
+
switch (_context18.prev = _context18.next) {
|
|
19907
|
+
case 0:
|
|
19908
|
+
_ref32 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
19909
|
+
_context18.prev = 2;
|
|
19910
|
+
_context18.next = 5;
|
|
19911
|
+
return fetchData({
|
|
19912
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugServiceApplicabilityType())
|
|
19913
|
+
}, __readDocumentUrl__);
|
|
19914
|
+
|
|
19915
|
+
case 5:
|
|
19916
|
+
data = _context18.sent;
|
|
19917
|
+
|
|
19918
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result8 = data.result) === null || _data$result8 === void 0 ? void 0 : _data$result8.length) > 0)) {
|
|
19919
|
+
_context18.next = 11;
|
|
19920
|
+
break;
|
|
19921
|
+
}
|
|
19922
|
+
|
|
19923
|
+
res = data === null || data === void 0 ? void 0 : (_data$result9 = data.result) === null || _data$result9 === void 0 ? void 0 : (_data$result9$map = _data$result9.map(function (option) {
|
|
19924
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19925
|
+
label: option === null || option === void 0 ? void 0 : option.display,
|
|
19926
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19927
|
+
});
|
|
19928
|
+
})) === null || _data$result9$map === void 0 ? void 0 : _data$result9$map.reverse();
|
|
19929
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19930
|
+
data: res
|
|
19931
|
+
}));
|
|
19932
|
+
|
|
19933
|
+
case 11:
|
|
19934
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19935
|
+
data: []
|
|
19936
|
+
}));
|
|
19937
|
+
|
|
19938
|
+
case 12:
|
|
19939
|
+
_context18.next = 17;
|
|
19940
|
+
break;
|
|
19941
|
+
|
|
19942
|
+
case 14:
|
|
19943
|
+
_context18.prev = 14;
|
|
19944
|
+
_context18.t0 = _context18["catch"](2);
|
|
19945
|
+
return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19946
|
+
message: _context18.t0.message
|
|
19947
|
+
})));
|
|
19948
|
+
|
|
19949
|
+
case 17:
|
|
19950
|
+
case "end":
|
|
19951
|
+
return _context18.stop();
|
|
19952
|
+
}
|
|
19953
|
+
}
|
|
19954
|
+
}, _callee18, null, [[2, 14]]);
|
|
19955
|
+
})));
|
|
19956
|
+
var DRUG_FACILITY_OPTIONS = createAsyncThunk("drugMasterSlice/drug_facility_options", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
|
|
19957
|
+
var _ref34,
|
|
19958
|
+
rejectWithValue,
|
|
19959
|
+
_data$result10,
|
|
19960
|
+
data,
|
|
19961
|
+
_data$result11,
|
|
19962
|
+
res,
|
|
19963
|
+
_args19 = arguments;
|
|
19964
|
+
|
|
19965
|
+
return regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
19966
|
+
while (1) {
|
|
19967
|
+
switch (_context19.prev = _context19.next) {
|
|
19968
|
+
case 0:
|
|
19969
|
+
_ref34 = _args19.length > 1 ? _args19[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
|
|
19970
|
+
_context19.prev = 2;
|
|
19971
|
+
_context19.next = 5;
|
|
19972
|
+
return fetchData({
|
|
19973
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugFacilityOptions())
|
|
19974
|
+
}, __readDocumentUrl__);
|
|
19975
|
+
|
|
19976
|
+
case 5:
|
|
19977
|
+
data = _context19.sent;
|
|
19978
|
+
|
|
19979
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result10 = data.result) === null || _data$result10 === void 0 ? void 0 : _data$result10.length) > 0)) {
|
|
19980
|
+
_context19.next = 11;
|
|
19981
|
+
break;
|
|
19982
|
+
}
|
|
19983
|
+
|
|
19984
|
+
res = data === null || data === void 0 ? void 0 : (_data$result11 = data.result) === null || _data$result11 === void 0 ? void 0 : _data$result11.map(function (option) {
|
|
19985
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
19986
|
+
label: option === null || option === void 0 ? void 0 : option.name,
|
|
19987
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
19988
|
+
});
|
|
19989
|
+
});
|
|
19990
|
+
return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19991
|
+
data: res
|
|
19992
|
+
}));
|
|
19993
|
+
|
|
19994
|
+
case 11:
|
|
19995
|
+
return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
19996
|
+
data: []
|
|
19997
|
+
}));
|
|
19998
|
+
|
|
19999
|
+
case 12:
|
|
20000
|
+
_context19.next = 17;
|
|
20001
|
+
break;
|
|
20002
|
+
|
|
20003
|
+
case 14:
|
|
20004
|
+
_context19.prev = 14;
|
|
20005
|
+
_context19.t0 = _context19["catch"](2);
|
|
20006
|
+
return _context19.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20007
|
+
message: _context19.t0.message
|
|
20008
|
+
})));
|
|
20009
|
+
|
|
20010
|
+
case 17:
|
|
20011
|
+
case "end":
|
|
20012
|
+
return _context19.stop();
|
|
20013
|
+
}
|
|
20014
|
+
}
|
|
20015
|
+
}, _callee19, null, [[2, 14]]);
|
|
20016
|
+
})));
|
|
20017
|
+
var DRUG_APPROVAL_WORKFLOW_OPTIONS = createAsyncThunk("drugMasterSlice/drug_approval_workflow_options", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
|
|
20018
|
+
var _ref36,
|
|
20019
|
+
rejectWithValue,
|
|
20020
|
+
_data$result12,
|
|
20021
|
+
data,
|
|
20022
|
+
_data$result13,
|
|
20023
|
+
res,
|
|
20024
|
+
_args20 = arguments;
|
|
20025
|
+
|
|
20026
|
+
return regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
20027
|
+
while (1) {
|
|
20028
|
+
switch (_context20.prev = _context20.next) {
|
|
20029
|
+
case 0:
|
|
20030
|
+
_ref36 = _args20.length > 1 ? _args20[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
|
|
20031
|
+
_context20.prev = 2;
|
|
20032
|
+
_context20.next = 5;
|
|
20033
|
+
return fetchData({
|
|
20034
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugApprovalWorkflowOptions())
|
|
20035
|
+
}, __readDocumentUrl__);
|
|
20036
|
+
|
|
20037
|
+
case 5:
|
|
20038
|
+
data = _context20.sent;
|
|
20039
|
+
|
|
20040
|
+
if (!((data === null || data === void 0 ? void 0 : (_data$result12 = data.result) === null || _data$result12 === void 0 ? void 0 : _data$result12.length) > 0)) {
|
|
20041
|
+
_context20.next = 11;
|
|
20042
|
+
break;
|
|
20043
|
+
}
|
|
20044
|
+
|
|
20045
|
+
res = data === null || data === void 0 ? void 0 : (_data$result13 = data.result) === null || _data$result13 === void 0 ? void 0 : _data$result13.map(function (option) {
|
|
20046
|
+
return _objectSpread2(_objectSpread2({}, option), {}, {
|
|
20047
|
+
label: option === null || option === void 0 ? void 0 : option.scenarioname,
|
|
20048
|
+
value: option === null || option === void 0 ? void 0 : option._id
|
|
20049
|
+
});
|
|
20050
|
+
});
|
|
20051
|
+
return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20052
|
+
data: res
|
|
20053
|
+
}));
|
|
20054
|
+
|
|
20055
|
+
case 11:
|
|
20056
|
+
return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20057
|
+
data: []
|
|
20058
|
+
}));
|
|
20059
|
+
|
|
20060
|
+
case 12:
|
|
20061
|
+
_context20.next = 17;
|
|
20062
|
+
break;
|
|
20063
|
+
|
|
20064
|
+
case 14:
|
|
20065
|
+
_context20.prev = 14;
|
|
20066
|
+
_context20.t0 = _context20["catch"](2);
|
|
20067
|
+
return _context20.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20068
|
+
message: _context20.t0.message
|
|
20069
|
+
})));
|
|
20070
|
+
|
|
20071
|
+
case 17:
|
|
20072
|
+
case "end":
|
|
20073
|
+
return _context20.stop();
|
|
20074
|
+
}
|
|
20075
|
+
}
|
|
20076
|
+
}, _callee20, null, [[2, 14]]);
|
|
20077
|
+
})));
|
|
20078
|
+
var DRUG_ALERTS_RESTRICTIONS_SINGLE_READ = createAsyncThunk("drugMasterSlice/drug_alerts_restriction_singleRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21() {
|
|
20079
|
+
var payload,
|
|
20080
|
+
_ref38,
|
|
20081
|
+
rejectWithValue,
|
|
20082
|
+
id,
|
|
20083
|
+
data,
|
|
20084
|
+
_args21 = arguments;
|
|
20085
|
+
|
|
20086
|
+
return regeneratorRuntime.wrap(function _callee21$(_context21) {
|
|
20087
|
+
while (1) {
|
|
20088
|
+
switch (_context21.prev = _context21.next) {
|
|
20089
|
+
case 0:
|
|
20090
|
+
payload = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
|
|
20091
|
+
_ref38 = _args21.length > 1 ? _args21[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
|
|
20092
|
+
_context21.prev = 2;
|
|
20093
|
+
id = payload.id;
|
|
20094
|
+
_context21.next = 6;
|
|
20095
|
+
return fetchData({
|
|
20096
|
+
body: JSON.stringify(drugCatalogMasterQuery.drugalertRestrictionSingleRead(id))
|
|
20097
|
+
}, __readDocumentUrl__);
|
|
20098
|
+
|
|
20099
|
+
case 6:
|
|
20100
|
+
data = _context21.sent;
|
|
20101
|
+
return _context21.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
20102
|
+
data: data.result
|
|
20103
|
+
}));
|
|
20104
|
+
|
|
20105
|
+
case 10:
|
|
20106
|
+
_context21.prev = 10;
|
|
20107
|
+
_context21.t0 = _context21["catch"](2);
|
|
20108
|
+
return _context21.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20109
|
+
message: _context21.t0.message
|
|
20110
|
+
})));
|
|
20111
|
+
|
|
20112
|
+
case 13:
|
|
20113
|
+
case "end":
|
|
20114
|
+
return _context21.stop();
|
|
20115
|
+
}
|
|
20116
|
+
}
|
|
20117
|
+
}, _callee21, null, [[2, 10]]);
|
|
20118
|
+
})));
|
|
20119
|
+
var DRUG_ALERTS_RESTRICTIONS_SAVE = createAsyncThunk("drugMasterSlice/drug_alerts_restrictions_save", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22() {
|
|
20120
|
+
var payload,
|
|
20121
|
+
_ref40,
|
|
20122
|
+
rejectWithValue,
|
|
20123
|
+
body,
|
|
20124
|
+
Body,
|
|
20125
|
+
data,
|
|
20126
|
+
_args22 = arguments;
|
|
20127
|
+
|
|
20128
|
+
return regeneratorRuntime.wrap(function _callee22$(_context22) {
|
|
20129
|
+
while (1) {
|
|
20130
|
+
switch (_context22.prev = _context22.next) {
|
|
20131
|
+
case 0:
|
|
20132
|
+
payload = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {};
|
|
20133
|
+
_ref40 = _args22.length > 1 ? _args22[1] : undefined, rejectWithValue = _ref40.rejectWithValue;
|
|
20134
|
+
_context22.prev = 2;
|
|
20135
|
+
body = payload.body;
|
|
20136
|
+
Body = GenerateAlertRestrictionUpsert(body);
|
|
20137
|
+
_context22.next = 7;
|
|
20138
|
+
return fetchData({
|
|
20139
|
+
body: JSON.stringify(Body)
|
|
20140
|
+
}, __uspsertUrl__);
|
|
20141
|
+
|
|
20142
|
+
case 7:
|
|
20143
|
+
data = _context22.sent;
|
|
20144
|
+
return _context22.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
20145
|
+
data: data
|
|
20146
|
+
}));
|
|
20147
|
+
|
|
20148
|
+
case 11:
|
|
20149
|
+
_context22.prev = 11;
|
|
20150
|
+
_context22.t0 = _context22["catch"](2);
|
|
20151
|
+
return _context22.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
20152
|
+
message: _context22.t0.message
|
|
20153
|
+
})));
|
|
20154
|
+
|
|
20155
|
+
case 14:
|
|
20156
|
+
case "end":
|
|
20157
|
+
return _context22.stop();
|
|
20158
|
+
}
|
|
20159
|
+
}
|
|
20160
|
+
}, _callee22, null, [[2, 11]]);
|
|
20161
|
+
})));
|
|
19075
20162
|
var drugMasterSlice = createSlice({
|
|
19076
20163
|
name: "drugMasterSlice",
|
|
19077
20164
|
initialState: {
|
|
@@ -19082,7 +20169,18 @@ var drugMasterSlice = createSlice({
|
|
|
19082
20169
|
upsert_drug_master: _objectSpread2({}, defaultState.List),
|
|
19083
20170
|
drug_form_type: _objectSpread2({}, defaultState.List),
|
|
19084
20171
|
drug_form_read: _objectSpread2({}, defaultState.List),
|
|
19085
|
-
age_category_by_id: _objectSpread2({}, defaultState.List)
|
|
20172
|
+
age_category_by_id: _objectSpread2({}, defaultState.List),
|
|
20173
|
+
drugCatalogMasterEntityNameOptions: _objectSpread2({}, defaultState.List),
|
|
20174
|
+
drugCatalogMasterSingleread: _objectSpread2({}, defaultState.List),
|
|
20175
|
+
drugCatalogMasterSave: _objectSpread2({}, defaultState.Info),
|
|
20176
|
+
getGroup: _objectSpread2({}, defaultState.Info),
|
|
20177
|
+
drugRuleType: _objectSpread2({}, defaultState.List),
|
|
20178
|
+
drugPrivilegeType: _objectSpread2({}, defaultState.List),
|
|
20179
|
+
drugServiceApplicabilityType: _objectSpread2({}, defaultState.List),
|
|
20180
|
+
drugFacilityOptions: _objectSpread2({}, defaultState.List),
|
|
20181
|
+
drugApprovalWorkflowOptions: _objectSpread2({}, defaultState.List),
|
|
20182
|
+
drugAlertsRestrictionSingleRead: _objectSpread2({}, defaultState.Info),
|
|
20183
|
+
drugAlertsRestrictionSave: _objectSpread2({}, defaultState.Info)
|
|
19086
20184
|
},
|
|
19087
20185
|
extraReducers: (_extraReducers$t = {}, _defineProperty(_extraReducers$t, DRUG_MASTER_READ.fulfilled, function (state, action) {
|
|
19088
20186
|
state.drug_master_list.loading = false, state.drug_master_list.error = false, state.drug_master_list = action.payload;
|
|
@@ -19132,6 +20230,116 @@ var drugMasterSlice = createSlice({
|
|
|
19132
20230
|
state.age_category_by_id.loading = true, state.age_category_by_id.error = false, state.age_category_by_id.loading = true;
|
|
19133
20231
|
}), _defineProperty(_extraReducers$t, AGE_CATEGORY_BY_ID.rejected, function (state, action) {
|
|
19134
20232
|
state.age_category_by_id.loading = false, state.age_category_by_id.error = true, state.age_category_by_id = action.payload;
|
|
20233
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_ENTITY_NAME_OPTIONS.fulfilled, function (state, action) {
|
|
20234
|
+
var _action$payload;
|
|
20235
|
+
|
|
20236
|
+
state.drugCatalogMasterEntityNameOptions = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
20237
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_ENTITY_NAME_OPTIONS.pending, function (state, action) {
|
|
20238
|
+
state.drugCatalogMasterEntityNameOptions.loading = true;
|
|
20239
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_ENTITY_NAME_OPTIONS.rejected, function (state, action) {
|
|
20240
|
+
var _action$payload2;
|
|
20241
|
+
|
|
20242
|
+
state.drugCatalogMasterEntityNameOptions = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
20243
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SINGLE_READ.fulfilled, function (state, action) {
|
|
20244
|
+
var _action$payload3;
|
|
20245
|
+
|
|
20246
|
+
state.drugCatalogMasterSingleread = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
20247
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SINGLE_READ.pending, function (state, action) {
|
|
20248
|
+
state.drugCatalogMasterSingleread.loading = true;
|
|
20249
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SINGLE_READ.rejected, function (state, action) {
|
|
20250
|
+
var _action$payload4;
|
|
20251
|
+
|
|
20252
|
+
state.drugCatalogMasterSingleread = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
20253
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SAVE.fulfilled, function (state, action) {
|
|
20254
|
+
var _action$payload5;
|
|
20255
|
+
|
|
20256
|
+
state.drugCatalogMasterSave = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
20257
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SAVE.pending, function (state, action) {
|
|
20258
|
+
state.drugCatalogMasterSave.loading = true;
|
|
20259
|
+
}), _defineProperty(_extraReducers$t, DRUG_MASTER_SAVE.rejected, function (state, action) {
|
|
20260
|
+
var _action$payload6;
|
|
20261
|
+
|
|
20262
|
+
state.drugCatalogMasterSave = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
20263
|
+
}), _defineProperty(_extraReducers$t, RULE_GROUP_DROPDOWN.fulfilled, function (state, action) {
|
|
20264
|
+
var _action$payload$data, _action$payload7;
|
|
20265
|
+
|
|
20266
|
+
state.getGroup.loading = false, state.getGroup.data = (_action$payload$data = action === null || action === void 0 ? void 0 : (_action$payload7 = action.payload) === null || _action$payload7 === void 0 ? void 0 : _action$payload7.data) !== null && _action$payload$data !== void 0 ? _action$payload$data : action === null || action === void 0 ? void 0 : action.payload, state.getGroup.error = false, state.getGroup.message = httpMessage.OkMessage;
|
|
20267
|
+
}), _defineProperty(_extraReducers$t, RULE_GROUP_DROPDOWN.rejected, function (state, action) {
|
|
20268
|
+
var _action$payload8;
|
|
20269
|
+
|
|
20270
|
+
state.getGroup = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
20271
|
+
}), _defineProperty(_extraReducers$t, RULE_GROUP_DROPDOWN.pending, function (state, action) {
|
|
20272
|
+
state.getGroup.loading = true;
|
|
20273
|
+
}), _defineProperty(_extraReducers$t, DRUG_RULE_TYPE.fulfilled, function (state, action) {
|
|
20274
|
+
var _action$payload9;
|
|
20275
|
+
|
|
20276
|
+
state.drugRuleType = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
20277
|
+
}), _defineProperty(_extraReducers$t, DRUG_RULE_TYPE.pending, function (state, action) {
|
|
20278
|
+
state.drugRuleType.loading = true;
|
|
20279
|
+
}), _defineProperty(_extraReducers$t, DRUG_RULE_TYPE.rejected, function (state, action) {
|
|
20280
|
+
var _action$payload10;
|
|
20281
|
+
|
|
20282
|
+
state.drugRuleType = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
20283
|
+
}), _defineProperty(_extraReducers$t, DRUG_PRIVILEGE_TYPE.fulfilled, function (state, action) {
|
|
20284
|
+
var _action$payload11;
|
|
20285
|
+
|
|
20286
|
+
state.drugPrivilegeType = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
|
|
20287
|
+
}), _defineProperty(_extraReducers$t, DRUG_PRIVILEGE_TYPE.pending, function (state, action) {
|
|
20288
|
+
state.drugPrivilegeType.loading = true;
|
|
20289
|
+
}), _defineProperty(_extraReducers$t, DRUG_PRIVILEGE_TYPE.rejected, function (state, action) {
|
|
20290
|
+
var _action$payload12;
|
|
20291
|
+
|
|
20292
|
+
state.drugPrivilegeType = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
|
|
20293
|
+
}), _defineProperty(_extraReducers$t, DRUG_SERVICE_APPLICABILITY_TYPE.fulfilled, function (state, action) {
|
|
20294
|
+
var _action$payload13;
|
|
20295
|
+
|
|
20296
|
+
state.drugServiceApplicabilityType = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
|
|
20297
|
+
}), _defineProperty(_extraReducers$t, DRUG_SERVICE_APPLICABILITY_TYPE.pending, function (state, action) {
|
|
20298
|
+
state.drugServiceApplicabilityType.loading = true;
|
|
20299
|
+
}), _defineProperty(_extraReducers$t, DRUG_SERVICE_APPLICABILITY_TYPE.rejected, function (state, action) {
|
|
20300
|
+
var _action$payload14;
|
|
20301
|
+
|
|
20302
|
+
state.drugServiceApplicabilityType = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
|
|
20303
|
+
}), _defineProperty(_extraReducers$t, DRUG_FACILITY_OPTIONS.fulfilled, function (state, action) {
|
|
20304
|
+
var _action$payload15;
|
|
20305
|
+
|
|
20306
|
+
state.drugFacilityOptions = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
|
|
20307
|
+
}), _defineProperty(_extraReducers$t, DRUG_FACILITY_OPTIONS.pending, function (state, action) {
|
|
20308
|
+
state.drugFacilityOptions.loading = true;
|
|
20309
|
+
}), _defineProperty(_extraReducers$t, DRUG_FACILITY_OPTIONS.rejected, function (state, action) {
|
|
20310
|
+
var _action$payload16;
|
|
20311
|
+
|
|
20312
|
+
state.drugFacilityOptions = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
|
|
20313
|
+
}), _defineProperty(_extraReducers$t, DRUG_APPROVAL_WORKFLOW_OPTIONS.fulfilled, function (state, action) {
|
|
20314
|
+
var _action$payload17;
|
|
20315
|
+
|
|
20316
|
+
state.drugApprovalWorkflowOptions = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
|
|
20317
|
+
}), _defineProperty(_extraReducers$t, DRUG_APPROVAL_WORKFLOW_OPTIONS.pending, function (state, action) {
|
|
20318
|
+
state.drugApprovalWorkflowOptions.loading = true;
|
|
20319
|
+
}), _defineProperty(_extraReducers$t, DRUG_APPROVAL_WORKFLOW_OPTIONS.rejected, function (state, action) {
|
|
20320
|
+
var _action$payload18;
|
|
20321
|
+
|
|
20322
|
+
state.drugApprovalWorkflowOptions = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
|
|
20323
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SINGLE_READ.fulfilled, function (state, action) {
|
|
20324
|
+
var _action$payload19;
|
|
20325
|
+
|
|
20326
|
+
state.drugAlertsRestrictionSingleRead = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
|
|
20327
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SINGLE_READ.pending, function (state, action) {
|
|
20328
|
+
state.drugAlertsRestrictionSingleRead.loading = true;
|
|
20329
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SINGLE_READ.rejected, function (state, action) {
|
|
20330
|
+
var _action$payload20;
|
|
20331
|
+
|
|
20332
|
+
state.drugAlertsRestrictionSingleRead = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
|
|
20333
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SAVE.fulfilled, function (state, action) {
|
|
20334
|
+
var _action$payload21;
|
|
20335
|
+
|
|
20336
|
+
state.drugAlertsRestrictionSave = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
|
|
20337
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SAVE.pending, function (state, action) {
|
|
20338
|
+
state.drugAlertsRestrictionSave.loading = true;
|
|
20339
|
+
}), _defineProperty(_extraReducers$t, DRUG_ALERTS_RESTRICTIONS_SAVE.rejected, function (state, action) {
|
|
20340
|
+
var _action$payload22;
|
|
20341
|
+
|
|
20342
|
+
state.drugAlertsRestrictionSave = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
|
|
19135
20343
|
}), _extraReducers$t)
|
|
19136
20344
|
});
|
|
19137
20345
|
var drugMasterActions = {
|
|
@@ -19142,7 +20350,18 @@ var drugMasterActions = {
|
|
|
19142
20350
|
SAVE_DRUG_MASTER: SAVE_DRUG_MASTER,
|
|
19143
20351
|
DRUG_FORM_TYPE: DRUG_FORM_TYPE,
|
|
19144
20352
|
DRUG_READ_FORM: DRUG_READ_FORM,
|
|
19145
|
-
AGE_CATEGORY_BY_ID: AGE_CATEGORY_BY_ID
|
|
20353
|
+
AGE_CATEGORY_BY_ID: AGE_CATEGORY_BY_ID,
|
|
20354
|
+
DRUG_MASTER_ENTITY_NAME_OPTIONS: DRUG_MASTER_ENTITY_NAME_OPTIONS,
|
|
20355
|
+
DRUG_MASTER_SINGLE_READ: DRUG_MASTER_SINGLE_READ,
|
|
20356
|
+
DRUG_MASTER_SAVE: DRUG_MASTER_SAVE,
|
|
20357
|
+
RULE_GROUP_DROPDOWN: RULE_GROUP_DROPDOWN,
|
|
20358
|
+
DRUG_RULE_TYPE: DRUG_RULE_TYPE,
|
|
20359
|
+
DRUG_PRIVILEGE_TYPE: DRUG_PRIVILEGE_TYPE,
|
|
20360
|
+
DRUG_SERVICE_APPLICABILITY_TYPE: DRUG_SERVICE_APPLICABILITY_TYPE,
|
|
20361
|
+
DRUG_FACILITY_OPTIONS: DRUG_FACILITY_OPTIONS,
|
|
20362
|
+
DRUG_APPROVAL_WORKFLOW_OPTIONS: DRUG_APPROVAL_WORKFLOW_OPTIONS,
|
|
20363
|
+
DRUG_ALERTS_RESTRICTIONS_SINGLE_READ: DRUG_ALERTS_RESTRICTIONS_SINGLE_READ,
|
|
20364
|
+
DRUG_ALERTS_RESTRICTIONS_SAVE: DRUG_ALERTS_RESTRICTIONS_SAVE
|
|
19146
20365
|
};
|
|
19147
20366
|
var drugMasterSlice$1 = drugMasterSlice.reducer;
|
|
19148
20367
|
|
|
@@ -36716,12 +37935,19 @@ var symptomAndSpecialtySlice$1 = symptomAndSpecialtySlice.reducer;
|
|
|
36716
37935
|
|
|
36717
37936
|
var queries = {
|
|
36718
37937
|
encounterType: function encounterType(type) {
|
|
37938
|
+
// return {
|
|
37939
|
+
// "db_name": dbName,
|
|
37940
|
+
// "entity": "AMPatientClass",
|
|
37941
|
+
// "filter": "AMPatientClass.activestatus==true",
|
|
37942
|
+
// "return_fields": "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
|
|
37943
|
+
// "sort": "document(AMPatientClass.encTypeDesc).display"
|
|
37944
|
+
// }
|
|
36719
37945
|
return {
|
|
36720
37946
|
"db_name": dbName$1,
|
|
36721
37947
|
"entity": "AMPatientClass",
|
|
36722
37948
|
"filter": "AMPatientClass.activestatus==true",
|
|
36723
|
-
"return_fields": "merge(AMPatientClass,{
|
|
36724
|
-
"sort": "document(AMPatientClass.
|
|
37949
|
+
"return_fields": "merge(AMPatientClass,{encClsByTypes:(for encClsByTypes in (AMPatientClass.encClsByTypes) return merge(encClsByTypes,{encClsType:document(encClsByTypes.encClsType)}))},{encType:document(AMPatientClass.encType)})",
|
|
37950
|
+
"sort": "document(AMPatientClass.encType).display "
|
|
36725
37951
|
};
|
|
36726
37952
|
},
|
|
36727
37953
|
//STATUS CHANGE
|
|
@@ -36767,13 +37993,14 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
|
|
|
36767
37993
|
arry = [];
|
|
36768
37994
|
data.result.map(function (val, i) {
|
|
36769
37995
|
if (val !== null && val !== void 0 && val._id) {
|
|
36770
|
-
var _val$
|
|
37996
|
+
var _val$id, _val$_id, _val$encType$display, _val$encType, _val$encType$code, _val$encType2;
|
|
36771
37997
|
|
|
36772
37998
|
arry.push(_objectSpread2({
|
|
36773
|
-
id: val === null || val === void 0 ? void 0 : val.id,
|
|
36774
|
-
|
|
36775
|
-
|
|
36776
|
-
|
|
37999
|
+
id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : "",
|
|
38000
|
+
_id: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
|
|
38001
|
+
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 : "",
|
|
38002
|
+
code: (_val$encType$code = val === null || val === void 0 ? void 0 : (_val$encType2 = val.encType) === null || _val$encType2 === void 0 ? void 0 : _val$encType2.code) !== null && _val$encType$code !== void 0 ? _val$encType$code : "",
|
|
38003
|
+
encounter_class: constructEncounterClassData(val === null || val === void 0 ? void 0 : val.encClsByTypes).toString()
|
|
36777
38004
|
}, val));
|
|
36778
38005
|
}
|
|
36779
38006
|
});
|
|
@@ -36794,7 +38021,28 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
|
|
|
36794
38021
|
}
|
|
36795
38022
|
}
|
|
36796
38023
|
}, _callee, null, [[2, 12]]);
|
|
36797
|
-
})));
|
|
38024
|
+
})));
|
|
38025
|
+
|
|
38026
|
+
var constructEncounterClassData = function constructEncounterClassData(data) {
|
|
38027
|
+
var arr = [];
|
|
38028
|
+
|
|
38029
|
+
if (data.length > 0 && Array.isArray(data)) {
|
|
38030
|
+
data.map(function (val) {
|
|
38031
|
+
var _val$encClsType, _val$encClsType2;
|
|
38032
|
+
|
|
38033
|
+
if (val !== null && val !== void 0 && (_val$encClsType = val.encClsType) !== null && _val$encClsType !== void 0 && _val$encClsType.display && val !== null && val !== void 0 && (_val$encClsType2 = val.encClsType) !== null && _val$encClsType2 !== void 0 && _val$encClsType2.code) {
|
|
38034
|
+
var _val$encClsType3, _val$encClsType4, _val$encClsType5, _val$encClsType6;
|
|
38035
|
+
|
|
38036
|
+
var dis = val !== null && val !== void 0 && (_val$encClsType3 = val.encClsType) !== null && _val$encClsType3 !== void 0 && _val$encClsType3.display ? val === null || val === void 0 ? void 0 : (_val$encClsType4 = val.encClsType) === null || _val$encClsType4 === void 0 ? void 0 : _val$encClsType4.display : "";
|
|
38037
|
+
var co = val !== null && val !== void 0 && (_val$encClsType5 = val.encClsType) !== null && _val$encClsType5 !== void 0 && _val$encClsType5.code ? val === null || val === void 0 ? void 0 : (_val$encClsType6 = val.encClsType) === null || _val$encClsType6 === void 0 ? void 0 : _val$encClsType6.code : "" + " )";
|
|
38038
|
+
arr.push(dis + " (" + co + ")");
|
|
38039
|
+
}
|
|
38040
|
+
});
|
|
38041
|
+
}
|
|
38042
|
+
|
|
38043
|
+
return arr;
|
|
38044
|
+
}; //ENCOUNTER_TYPE_STATUS_CHANGE
|
|
38045
|
+
|
|
36798
38046
|
|
|
36799
38047
|
var ENCOUNTER_TYPE_STATUS_CHANGE = createAsyncThunk("encouterTypeSlice/encouterStatusChange", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
36800
38048
|
var payload,
|