primary_care_admin_binder 0.1.167 → 0.1.170
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 +338 -247
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8500,13 +8500,13 @@ var queries$o = {
|
|
|
8500
8500
|
status_update_practitioner: function status_update_practitioner(data) {
|
|
8501
8501
|
return [{
|
|
8502
8502
|
appcode: dbName,
|
|
8503
|
-
|
|
8503
|
+
collection: "Practitioner",
|
|
8504
8504
|
filter: {
|
|
8505
8505
|
_key: data._key
|
|
8506
8506
|
},
|
|
8507
8507
|
is_metadata: true,
|
|
8508
8508
|
metadataId: metaDataId$1,
|
|
8509
|
-
|
|
8509
|
+
metadata_appcode: metaDatadbName$1,
|
|
8510
8510
|
doc: {
|
|
8511
8511
|
active: data.status
|
|
8512
8512
|
}
|
|
@@ -8878,6 +8878,27 @@ var practitionerActions$1 = {
|
|
|
8878
8878
|
};
|
|
8879
8879
|
var practitionerSlice$1 = practitionerSlice.reducer;
|
|
8880
8880
|
|
|
8881
|
+
var codingMasterTypes = ["ALTERNATEIDTYPE", "RELATIONSHIP", "NAMEPREFIX", "NAMESUFFIX", "GENDER", "USE", "PRACTTYPE", "LANGUAGE", "SPECIALTY", "ORGTYPE", "CONTACTSYSTEM", "PRIORITY", "ADDRESSTYPE", "PRACTROLE", "POSITION", "EMPSTATUS", "MARITALSTATUS"];
|
|
8882
|
+
var typeToKeyMap = {
|
|
8883
|
+
"ALTERNATEIDTYPE": ["id_type"],
|
|
8884
|
+
"RELATIONSHIP": ["id_number"],
|
|
8885
|
+
"NAMEPREFIX": ["prefix"],
|
|
8886
|
+
"NAMESUFFIX": ["suffix"],
|
|
8887
|
+
"GENDER": ["gender"],
|
|
8888
|
+
"USE": ["use", "Address_use"],
|
|
8889
|
+
"PRACTTYPE": ["practitioner_type"],
|
|
8890
|
+
"LANGUAGE": ["Communication_languages"],
|
|
8891
|
+
"SPECIALTY": ["speciality"],
|
|
8892
|
+
"ORGTYPE": ["entity"],
|
|
8893
|
+
"CONTACTSYSTEM": ["contact_mode"],
|
|
8894
|
+
"PRIORITY": ["priority"],
|
|
8895
|
+
"ADDRESSTYPE": ["address_type"],
|
|
8896
|
+
"PRACTROLE": ["role"],
|
|
8897
|
+
"POSITION": ["position"],
|
|
8898
|
+
"EMPSTATUS": ["employee_type"],
|
|
8899
|
+
"MARITALSTATUS": ["marital_status"]
|
|
8900
|
+
};
|
|
8901
|
+
|
|
8881
8902
|
var codingMasterFilter = function codingMasterFilter(type) {
|
|
8882
8903
|
return {
|
|
8883
8904
|
appcode: _dbName,
|
|
@@ -8889,25 +8910,8 @@ var codingMasterFilter = function codingMasterFilter(type) {
|
|
|
8889
8910
|
}
|
|
8890
8911
|
};
|
|
8891
8912
|
};
|
|
8913
|
+
var codingMasterQuery = JSON.stringify(codingMasterFilter(codingMasterTypes));
|
|
8892
8914
|
var masterQuery$8 = {
|
|
8893
|
-
id_type: JSON.stringify(codingMasterFilter("ALTERNATEIDTYPE")),
|
|
8894
|
-
id_number: JSON.stringify(codingMasterFilter("RELATIONSHIP")),
|
|
8895
|
-
prefix: JSON.stringify(codingMasterFilter("NAMEPREFIX")),
|
|
8896
|
-
suffix: JSON.stringify(codingMasterFilter("NAMESUFFIX")),
|
|
8897
|
-
gender: JSON.stringify(codingMasterFilter("GENDER")),
|
|
8898
|
-
use: JSON.stringify(codingMasterFilter("USE")),
|
|
8899
|
-
practitioner_type: JSON.stringify(codingMasterFilter("PRACTTYPE")),
|
|
8900
|
-
Communication_languages: JSON.stringify(codingMasterFilter("LANGUAGE")),
|
|
8901
|
-
speciality: JSON.stringify(codingMasterFilter("SPECIALTY")),
|
|
8902
|
-
entity: JSON.stringify(codingMasterFilter("ORGTYPE")),
|
|
8903
|
-
Address_use: JSON.stringify(codingMasterFilter("USE")),
|
|
8904
|
-
contact_mode: JSON.stringify(codingMasterFilter("CONTACTSYSTEM")),
|
|
8905
|
-
priority: JSON.stringify(codingMasterFilter("PRIORITY")),
|
|
8906
|
-
address_type: JSON.stringify(codingMasterFilter("ADDRESSTYPE")),
|
|
8907
|
-
role: JSON.stringify(codingMasterFilter("PRACTROLE")),
|
|
8908
|
-
position: JSON.stringify(codingMasterFilter("POSITION")),
|
|
8909
|
-
employee_type: JSON.stringify(codingMasterFilter("EMPSTATUS")),
|
|
8910
|
-
marital_status: JSON.stringify(codingMasterFilter("MARITALSTATUS")),
|
|
8911
8915
|
entity_name: "{\n \"appcode\": \"".concat(_dbName, "\",\n \"requestid\": \"9f065c19-10c9-41e1-b925-53458964974f\", \n \"filter\": {\n \"activestatus\": true,\n \"id\": \"\",\n \"sortByName\": false,\n \"active\": \"\"\n }\n }"),
|
|
8912
8916
|
location: "{\n \"appcode\": \"".concat(_dbName, "\",\n \"requestid\": \"c27d71be-6c29-4024-aab3-1dd0a0a88c32\", \n \"filter\": {\n \"activestatus\": true, \n \"status\": \"active\", \n \"parentLocationId\": \"\",\n \"locationtype\": null,\n \"organizationId\":\"\" \n }\n }"),
|
|
8913
8917
|
nationality: "{\n \"appcode\": \"".concat(_dbName, "\",\n \"requestid\": \"d3659637-f0aa-4e0d-86d6-61fd445f7dd5\",\n \"filter\":{\n \"display\": \"country\",\n \"activestatus\": true,\n \"active\": true,\n \"sort\":\"geogLevelName\"\n }\n }"),
|
|
@@ -8963,7 +8967,7 @@ var masterqueries = {
|
|
|
8963
8967
|
}
|
|
8964
8968
|
};
|
|
8965
8969
|
|
|
8966
|
-
var generateReadJSON$5 = function generateReadJSON(data
|
|
8970
|
+
var generateReadJSON$5 = function generateReadJSON(data) {
|
|
8967
8971
|
var _data$identifier, _data$name, _data$communication, _data$telecom, _data$practitioner_ro, _data$address, _data$qualification, _data$publication_det, _data$training_detail, _data$job_experience, _data$achievements_aw, _data$communication2, _data$gender, _data$gender2, _data$marital_status, _data$marital_status2, _data$nationality, _data$nationality2, _data$biography_descr, _data$photo$0$fileNam, _data$photo, _data$photo$0$fileid, _data$photo2, _data$photo$0$filetyp, _data$photo3, _data$photo$0$objecti, _data$photo4, _data$photo$0$_id, _data$photo5, _data$practitioner_ty, _data$practitioner_ty2;
|
|
8968
8972
|
var identifier = [];
|
|
8969
8973
|
if (data !== null && data !== void 0 && data.identifier && (data === null || data === void 0 || (_data$identifier = data.identifier) === null || _data$identifier === void 0 ? void 0 : _data$identifier.length) > 0) {
|
|
@@ -9269,7 +9273,6 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
|
|
|
9269
9273
|
};
|
|
9270
9274
|
|
|
9271
9275
|
var _extraReducers$B;
|
|
9272
|
-
var location = ["nationality", "city", "district", "state", "country"];
|
|
9273
9276
|
var loopMasters$9 = function loopMasters() {
|
|
9274
9277
|
return new es6Promise.Promise(/*#__PURE__*/function () {
|
|
9275
9278
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(resolve, reject) {
|
|
@@ -9277,75 +9280,87 @@ var loopMasters$9 = function loopMasters() {
|
|
|
9277
9280
|
return _regenerator().w(function (_context2) {
|
|
9278
9281
|
while (1) switch (_context2.n) {
|
|
9279
9282
|
case 0:
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
}, _callee);
|
|
9291
|
-
}));
|
|
9292
|
-
return function (_x3) {
|
|
9293
|
-
return _ref2.apply(this, arguments);
|
|
9294
|
-
};
|
|
9295
|
-
}());
|
|
9296
|
-
es6Promise.Promise.all(calls).then(function (data) {
|
|
9297
|
-
var json = {};
|
|
9298
|
-
data.map(function (val) {
|
|
9299
|
-
var arr = [];
|
|
9300
|
-
val.data.map(function (value) {
|
|
9301
|
-
if ("country_code" === val.name) {
|
|
9302
|
-
arr.push(_objectSpread2({
|
|
9303
|
-
label: value.GeoLocationISDCode,
|
|
9304
|
-
value: value._id
|
|
9305
|
-
}, value));
|
|
9306
|
-
} else if ("location" === val.name) {
|
|
9307
|
-
if (value.shortdesc) {
|
|
9308
|
-
arr.push(_objectSpread2({
|
|
9309
|
-
label: value.shortdesc,
|
|
9310
|
-
value: value._id
|
|
9311
|
-
}, value));
|
|
9283
|
+
try {
|
|
9284
|
+
calls = Object.keys(masterQuery$8).map(/*#__PURE__*/function () {
|
|
9285
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(val) {
|
|
9286
|
+
return _regenerator().w(function (_context) {
|
|
9287
|
+
while (1) switch (_context.n) {
|
|
9288
|
+
case 0:
|
|
9289
|
+
_context.n = 1;
|
|
9290
|
+
return fetchMaster$9(val, masterQuery$8[val]);
|
|
9291
|
+
case 1:
|
|
9292
|
+
return _context.a(2, _context.v);
|
|
9312
9293
|
}
|
|
9313
|
-
}
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9294
|
+
}, _callee);
|
|
9295
|
+
}));
|
|
9296
|
+
return function (_x3) {
|
|
9297
|
+
return _ref2.apply(this, arguments);
|
|
9298
|
+
};
|
|
9299
|
+
}()); // Add the batch query for coding masters
|
|
9300
|
+
calls.push(fetchMaster$9("coding_masters", codingMasterQuery));
|
|
9301
|
+
es6Promise.Promise.all(calls).then(function (data) {
|
|
9302
|
+
var json = {};
|
|
9303
|
+
|
|
9304
|
+
// Initialize arrays for all coding master keys
|
|
9305
|
+
Object.values(typeToKeyMap).flat().forEach(function (key) {
|
|
9306
|
+
json[key] = [];
|
|
9307
|
+
});
|
|
9308
|
+
data.forEach(function (val) {
|
|
9309
|
+
if (val.name === "coding_masters") {
|
|
9310
|
+
if (Array.isArray(val.data)) {
|
|
9311
|
+
val.data.forEach(function (value) {
|
|
9312
|
+
var type = value.Type || value.type;
|
|
9313
|
+
if (typeToKeyMap[type]) {
|
|
9314
|
+
typeToKeyMap[type].forEach(function (key) {
|
|
9315
|
+
json[key].push(_objectSpread2({
|
|
9316
|
+
label: value !== null && value !== void 0 && value.display ? value.display : "",
|
|
9317
|
+
value: value !== null && value !== void 0 && value._id ? value._id : ""
|
|
9318
|
+
}, value));
|
|
9319
|
+
});
|
|
9320
|
+
}
|
|
9321
|
+
});
|
|
9334
9322
|
}
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9323
|
+
return;
|
|
9324
|
+
}
|
|
9325
|
+
var arr = [];
|
|
9326
|
+
if (Array.isArray(val.data)) {
|
|
9327
|
+
val.data.forEach(function (value) {
|
|
9328
|
+
if ("country_code" === val.name) {
|
|
9329
|
+
arr.push(_objectSpread2({
|
|
9330
|
+
label: value.GeoLocationISDCode,
|
|
9331
|
+
value: value._id
|
|
9332
|
+
}, value));
|
|
9333
|
+
} else if ("location" === val.name) {
|
|
9334
|
+
if (value.shortdesc) {
|
|
9335
|
+
arr.push(_objectSpread2({
|
|
9336
|
+
label: value.shortdesc,
|
|
9337
|
+
value: value._id
|
|
9338
|
+
}, value));
|
|
9339
|
+
}
|
|
9340
|
+
} else if (val.name === "entity_name") {
|
|
9341
|
+
arr.push(_objectSpread2({
|
|
9342
|
+
label: value.name ? value.name : "",
|
|
9343
|
+
value: value._id ? value._id : ""
|
|
9344
|
+
}, value));
|
|
9345
|
+
} else {
|
|
9346
|
+
arr.push(_objectSpread2({
|
|
9347
|
+
label: value.geogLevelName,
|
|
9348
|
+
value: value._id
|
|
9349
|
+
}, value));
|
|
9350
|
+
}
|
|
9351
|
+
});
|
|
9340
9352
|
}
|
|
9353
|
+
json[val.name] = arr;
|
|
9341
9354
|
});
|
|
9342
|
-
json[val.name] = arr;
|
|
9343
9355
|
resolve(json);
|
|
9356
|
+
})["catch"](function (err) {
|
|
9357
|
+
resolve({});
|
|
9358
|
+
console.log(err);
|
|
9344
9359
|
});
|
|
9345
|
-
}
|
|
9346
|
-
resolve(
|
|
9347
|
-
console.log(
|
|
9348
|
-
}
|
|
9360
|
+
} catch (e) {
|
|
9361
|
+
resolve({});
|
|
9362
|
+
console.log(e);
|
|
9363
|
+
}
|
|
9349
9364
|
case 1:
|
|
9350
9365
|
return _context2.a(2);
|
|
9351
9366
|
}
|
|
@@ -9430,57 +9445,23 @@ var PRACTITIONER_GET_BY_ID = createAsyncThunk("practitionerMasterSlice/practitio
|
|
|
9430
9445
|
_context5.p = 1;
|
|
9431
9446
|
id = payload.id;
|
|
9432
9447
|
_context5.n = 2;
|
|
9433
|
-
return loopMasters$9();
|
|
9434
|
-
case 2:
|
|
9435
|
-
_context5.v;
|
|
9436
|
-
_context5.n = 3;
|
|
9437
9448
|
return fetchData({
|
|
9438
9449
|
body: JSON.stringify(queries$o.practitioner_by_id(id))
|
|
9439
9450
|
}, __baseUrl__$1);
|
|
9440
|
-
case
|
|
9451
|
+
case 2:
|
|
9441
9452
|
data = _context5.v;
|
|
9442
|
-
_context5.n = 4;
|
|
9443
|
-
return fetchData({
|
|
9444
|
-
body: JSON.stringify(masterqueries.country())
|
|
9445
|
-
}, __baseUrl__$1);
|
|
9446
|
-
case 4:
|
|
9447
|
-
_context5.v;
|
|
9448
|
-
_context5.n = 5;
|
|
9449
|
-
return fetchData({
|
|
9450
|
-
body: JSON.stringify(masterqueries.state_by_country_())
|
|
9451
|
-
}, __baseUrl__$1);
|
|
9452
|
-
case 5:
|
|
9453
|
-
_context5.v;
|
|
9454
|
-
_context5.n = 6;
|
|
9455
|
-
return fetchData({
|
|
9456
|
-
body: JSON.stringify(masterqueries.district_by_state_())
|
|
9457
|
-
}, __baseUrl__$1);
|
|
9458
|
-
case 6:
|
|
9459
|
-
_context5.v;
|
|
9460
|
-
_context5.n = 7;
|
|
9461
|
-
return fetchData({
|
|
9462
|
-
body: JSON.stringify(masterqueries.city_by_district_())
|
|
9463
|
-
}, __baseUrl__$1);
|
|
9464
|
-
case 7:
|
|
9465
|
-
_context5.v;
|
|
9466
|
-
_context5.n = 8;
|
|
9467
|
-
return fetchData({
|
|
9468
|
-
body: JSON.stringify(masterqueries.pincode_by_city_())
|
|
9469
|
-
}, __baseUrl__$1);
|
|
9470
|
-
case 8:
|
|
9471
|
-
_context5.v;
|
|
9472
9453
|
readJSON = generateReadJSON$5(data[0] ? data[0] : null);
|
|
9473
9454
|
return _context5.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
9474
9455
|
data: readJSON
|
|
9475
9456
|
}));
|
|
9476
|
-
case
|
|
9477
|
-
_context5.p =
|
|
9457
|
+
case 3:
|
|
9458
|
+
_context5.p = 3;
|
|
9478
9459
|
_t2 = _context5.v;
|
|
9479
9460
|
return _context5.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
9480
9461
|
message: _t2.message
|
|
9481
9462
|
})));
|
|
9482
9463
|
}
|
|
9483
|
-
}, _callee5, null, [[1,
|
|
9464
|
+
}, _callee5, null, [[1, 3]]);
|
|
9484
9465
|
})));
|
|
9485
9466
|
var PRACTITIONER_COUNTRY_MASTER = createAsyncThunk("practitionerMasterSlice/practitioner_country_master", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
|
|
9486
9467
|
var payload,
|
|
@@ -9701,11 +9682,11 @@ var practitionerMasterSlice = createSlice({
|
|
|
9701
9682
|
initialState: {
|
|
9702
9683
|
practitioner_masters: _objectSpread2({}, defaultState.Info),
|
|
9703
9684
|
practitionerbyid: _objectSpread2({}, defaultState.Info),
|
|
9704
|
-
practitioner_country_master: _objectSpread2({}, defaultState.
|
|
9705
|
-
practitioner_state_master: _objectSpread2({}, defaultState.
|
|
9706
|
-
practitioner_district_master: _objectSpread2({}, defaultState.
|
|
9707
|
-
practitioner_city_master: _objectSpread2({}, defaultState.
|
|
9708
|
-
practitioner_pincode_master: _objectSpread2({}, defaultState.
|
|
9685
|
+
practitioner_country_master: _objectSpread2({}, defaultState.List),
|
|
9686
|
+
practitioner_state_master: _objectSpread2({}, defaultState.List),
|
|
9687
|
+
practitioner_district_master: _objectSpread2({}, defaultState.List),
|
|
9688
|
+
practitioner_city_master: _objectSpread2({}, defaultState.List),
|
|
9689
|
+
practitioner_pincode_master: _objectSpread2({}, defaultState.List)
|
|
9709
9690
|
},
|
|
9710
9691
|
extraReducers: (_extraReducers$B = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$B, PRACTITIONER_MASTERS.fulfilled, function (state, action) {
|
|
9711
9692
|
state.practitioner_masters.loading = false, state.practitioner_masters.error = false, state.practitioner_masters = action.payload;
|
|
@@ -16437,19 +16418,19 @@ var locationMasterActions = {
|
|
|
16437
16418
|
};
|
|
16438
16419
|
var locationMasterSlice$1 = locationMasterSlice.reducer;
|
|
16439
16420
|
|
|
16440
|
-
// import { dbName } from "../../qdm_query_ids";
|
|
16441
16421
|
var queries$m = {
|
|
16442
|
-
fullread: function fullread(
|
|
16422
|
+
fullread: function fullread() {
|
|
16423
|
+
var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
16424
|
+
var perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
16425
|
+
var search = arguments.length > 2 ? arguments[2] : undefined;
|
|
16443
16426
|
return {
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16447
|
-
|
|
16448
|
-
limit: {
|
|
16427
|
+
appcode: dbName,
|
|
16428
|
+
requestid: "d61e3890-a7d5-4564-8840-05822368940f",
|
|
16429
|
+
filter: {
|
|
16430
|
+
search: "".concat(search),
|
|
16449
16431
|
offset: page,
|
|
16450
16432
|
count: perPage
|
|
16451
|
-
}
|
|
16452
|
-
return_fields: "MERGE( adqolcOrderType, { TotalCount: COUNT(FOR cnt IN OrderType RETURN cnt._key), ordercategory: DOCUMENT(adqolcOrderType.ordercategory), aliasDtls: ( FOR alias IN (adqolcOrderType.aliasDtls || []) LET aliasTypeDoc = DOCUMENT(alias.aliasType) RETURN MERGE( alias, { aliasType: { label: aliasTypeDoc.display, value: aliasTypeDoc._id, code: aliasTypeDoc.code } } ) ) } )"
|
|
16433
|
+
}
|
|
16453
16434
|
};
|
|
16454
16435
|
},
|
|
16455
16436
|
OrderCategory: function OrderCategory() {
|
|
@@ -16462,29 +16443,33 @@ var queries$m = {
|
|
|
16462
16443
|
};
|
|
16463
16444
|
},
|
|
16464
16445
|
Insert: function Insert(data) {
|
|
16446
|
+
var _data$aliasMapping;
|
|
16465
16447
|
return [{
|
|
16466
16448
|
appcode: dbName,
|
|
16467
|
-
|
|
16449
|
+
collection: "OrderType",
|
|
16468
16450
|
is_metadata: true,
|
|
16469
16451
|
metadataId: metaDataId$1,
|
|
16470
|
-
|
|
16471
|
-
doc: {
|
|
16452
|
+
metadata_appcode: metaDatadbName$1,
|
|
16453
|
+
doc: _objectSpread2(_objectSpread2({
|
|
16472
16454
|
id: 0,
|
|
16473
16455
|
ordertype: data === null || data === void 0 ? void 0 : data.ordertype,
|
|
16474
16456
|
shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc,
|
|
16475
16457
|
longdesc: data === null || data === void 0 ? void 0 : data.longdesc,
|
|
16476
|
-
ordercategory: data === null || data === void 0 ? void 0 : data.ordercategory,
|
|
16477
|
-
registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
|
|
16478
|
-
|
|
16458
|
+
ordercategory: String(data === null || data === void 0 ? void 0 : data.ordercategory),
|
|
16459
|
+
registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
|
|
16460
|
+
}, (data === null || data === void 0 || (_data$aliasMapping = data.aliasMapping) === null || _data$aliasMapping === void 0 ? void 0 : _data$aliasMapping.length) > 0 && {
|
|
16461
|
+
aliasDtls: data.aliasMapping.map(function (item) {
|
|
16479
16462
|
var _item$aliasType;
|
|
16480
16463
|
return {
|
|
16481
|
-
aliasType: (item === null || item === void 0 || (_item$aliasType = item.aliasType) === null || _item$aliasType === void 0 ? void 0 : _item$aliasType.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || "",
|
|
16482
|
-
aliasCode: (item === null || item === void 0 ? void 0 : item.aliasCode) || "",
|
|
16483
|
-
aliasName: (item === null || item === void 0 ? void 0 : item.aliasName) || ""
|
|
16464
|
+
aliasType: String((item === null || item === void 0 || (_item$aliasType = item.aliasType) === null || _item$aliasType === void 0 ? void 0 : _item$aliasType.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || ""),
|
|
16465
|
+
aliasCode: String((item === null || item === void 0 ? void 0 : item.aliasCode) || ""),
|
|
16466
|
+
aliasName: String((item === null || item === void 0 ? void 0 : item.aliasName) || "")
|
|
16484
16467
|
};
|
|
16485
|
-
})
|
|
16486
|
-
|
|
16487
|
-
|
|
16468
|
+
})
|
|
16469
|
+
}), {}, {
|
|
16470
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
16471
|
+
activestatus: true
|
|
16472
|
+
})
|
|
16488
16473
|
}];
|
|
16489
16474
|
},
|
|
16490
16475
|
SoftDelete: function SoftDelete() {
|
|
@@ -16497,46 +16482,49 @@ var queries$m = {
|
|
|
16497
16482
|
StatusUpdate: function StatusUpdate(key, getstatus) {
|
|
16498
16483
|
return [{
|
|
16499
16484
|
appcode: dbName,
|
|
16500
|
-
|
|
16485
|
+
collection: "OrderType",
|
|
16501
16486
|
filter: {
|
|
16502
16487
|
_key: key
|
|
16503
16488
|
},
|
|
16504
16489
|
is_metadata: true,
|
|
16505
16490
|
metadataId: metaDataId$1,
|
|
16506
|
-
|
|
16491
|
+
metadata_appcode: metaDatadbName$1,
|
|
16507
16492
|
doc: {
|
|
16508
16493
|
status: getstatus
|
|
16509
16494
|
}
|
|
16510
16495
|
}];
|
|
16511
16496
|
},
|
|
16512
16497
|
UpdateORModify: function UpdateORModify(data) {
|
|
16498
|
+
var _data$aliasMapping2;
|
|
16513
16499
|
return [{
|
|
16514
16500
|
appcode: dbName,
|
|
16515
|
-
|
|
16501
|
+
collection: "OrderType",
|
|
16516
16502
|
is_metadata: true,
|
|
16517
16503
|
filter: {
|
|
16518
16504
|
_key: data === null || data === void 0 ? void 0 : data._key
|
|
16519
16505
|
},
|
|
16520
16506
|
metadataId: metaDataId$1,
|
|
16521
|
-
|
|
16522
|
-
doc: {
|
|
16507
|
+
metadata_appcode: metaDatadbName$1,
|
|
16508
|
+
doc: _objectSpread2(_objectSpread2({
|
|
16523
16509
|
_id: data === null || data === void 0 ? void 0 : data._id,
|
|
16524
16510
|
id: data === null || data === void 0 ? void 0 : data.id,
|
|
16525
16511
|
ordertype: data === null || data === void 0 ? void 0 : data.ordertype,
|
|
16526
16512
|
shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc,
|
|
16527
16513
|
longdesc: data === null || data === void 0 ? void 0 : data.longdesc,
|
|
16528
|
-
ordercategory: data === null || data === void 0 ? void 0 : data.ordercategory,
|
|
16529
|
-
registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
|
|
16530
|
-
|
|
16514
|
+
ordercategory: String(data === null || data === void 0 ? void 0 : data.ordercategory),
|
|
16515
|
+
registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
|
|
16516
|
+
}, (data === null || data === void 0 || (_data$aliasMapping2 = data.aliasMapping) === null || _data$aliasMapping2 === void 0 ? void 0 : _data$aliasMapping2.length) > 0 && {
|
|
16517
|
+
aliasDtls: data.aliasMapping.map(function (item) {
|
|
16531
16518
|
var _item$aliasType2;
|
|
16532
16519
|
return {
|
|
16533
|
-
aliasType: (item === null || item === void 0 || (_item$aliasType2 = item.aliasType) === null || _item$aliasType2 === void 0 ? void 0 : _item$aliasType2.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || "",
|
|
16534
|
-
aliasCode: (item === null || item === void 0 ? void 0 : item.aliasCode) || "",
|
|
16535
|
-
aliasName: (item === null || item === void 0 ? void 0 : item.aliasName) || ""
|
|
16520
|
+
aliasType: String((item === null || item === void 0 || (_item$aliasType2 = item.aliasType) === null || _item$aliasType2 === void 0 ? void 0 : _item$aliasType2.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || ""),
|
|
16521
|
+
aliasCode: String((item === null || item === void 0 ? void 0 : item.aliasCode) || ""),
|
|
16522
|
+
aliasName: String((item === null || item === void 0 ? void 0 : item.aliasName) || "")
|
|
16536
16523
|
};
|
|
16537
|
-
})
|
|
16524
|
+
})
|
|
16525
|
+
}), {}, {
|
|
16538
16526
|
status: data === null || data === void 0 ? void 0 : data.status
|
|
16539
|
-
}
|
|
16527
|
+
})
|
|
16540
16528
|
}];
|
|
16541
16529
|
}
|
|
16542
16530
|
};
|
|
@@ -16561,11 +16549,11 @@ var ORDERTYPEREAD = createAsyncThunk("ordertypeSlice/ordertypeRead", /*#__PURE__
|
|
|
16561
16549
|
_context.n = 2;
|
|
16562
16550
|
return fetchData({
|
|
16563
16551
|
body: JSON.stringify(queriesjson)
|
|
16564
|
-
},
|
|
16552
|
+
}, __baseUrl__$1);
|
|
16565
16553
|
case 2:
|
|
16566
16554
|
data = _context.v;
|
|
16567
16555
|
arry = [];
|
|
16568
|
-
data.
|
|
16556
|
+
(data || []).map(function (val) {
|
|
16569
16557
|
var _val$ordercategory, _val$ordercategory2;
|
|
16570
16558
|
if (val !== null && val !== void 0 && (_val$ordercategory = val.ordercategory) !== null && _val$ordercategory !== void 0 && _val$ordercategory.ordercategory && val !== null && val !== void 0 && (_val$ordercategory2 = val.ordercategory) !== null && _val$ordercategory2 !== void 0 && _val$ordercategory2.longdesc) {
|
|
16571
16559
|
var _val$ordercategory3, _val$ordercategory4, _val$ordercategory5, _val$ordercategory6;
|
|
@@ -16797,26 +16785,28 @@ var ordertypeSlice$1 = ordertypeSlice.reducer;
|
|
|
16797
16785
|
// import { dbName } from "../../qdm_query_ids";
|
|
16798
16786
|
var queries$l = {
|
|
16799
16787
|
fullread: function fullread(page, perPage, search) {
|
|
16788
|
+
var isSingle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
16789
|
+
var key = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
|
|
16800
16790
|
return {
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16791
|
+
appcode: dbName,
|
|
16792
|
+
requestid: "9d2753a8-4c3e-4b21-817a-5b4d1101e4a1",
|
|
16793
|
+
request: {
|
|
16794
|
+
page: page,
|
|
16795
|
+
perPage: perPage,
|
|
16796
|
+
search: search,
|
|
16797
|
+
isSingle: isSingle,
|
|
16798
|
+
key: key
|
|
16799
|
+
}
|
|
16810
16800
|
};
|
|
16811
16801
|
},
|
|
16812
16802
|
Insert: function Insert(data) {
|
|
16813
16803
|
return [{
|
|
16814
16804
|
appcode: dbName,
|
|
16815
|
-
|
|
16805
|
+
collection: "CodeableConceptMaster",
|
|
16816
16806
|
is_metadata: true,
|
|
16817
16807
|
// metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
16818
16808
|
metadataId: metaDataId$1,
|
|
16819
|
-
|
|
16809
|
+
metadata_appcode: metaDatadbName$1,
|
|
16820
16810
|
doc: {
|
|
16821
16811
|
text: "",
|
|
16822
16812
|
coding: [{
|
|
@@ -16838,13 +16828,13 @@ var queries$l = {
|
|
|
16838
16828
|
StatusUpdate: function StatusUpdate(key, getstatus) {
|
|
16839
16829
|
return [{
|
|
16840
16830
|
appcode: dbName,
|
|
16841
|
-
|
|
16831
|
+
collection: "CodeableConceptMaster",
|
|
16842
16832
|
filter: {
|
|
16843
16833
|
_key: key
|
|
16844
16834
|
},
|
|
16845
16835
|
is_metadata: true,
|
|
16846
16836
|
metadataId: metaDataId$1,
|
|
16847
|
-
|
|
16837
|
+
metadata_appcode: metaDatadbName$1,
|
|
16848
16838
|
doc: {
|
|
16849
16839
|
status: getstatus
|
|
16850
16840
|
}
|
|
@@ -16882,11 +16872,11 @@ var queries$l = {
|
|
|
16882
16872
|
// ];
|
|
16883
16873
|
return [{
|
|
16884
16874
|
appcode: dbName,
|
|
16885
|
-
|
|
16875
|
+
collection: "CodingMaster",
|
|
16886
16876
|
is_metadata: true,
|
|
16887
16877
|
// metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
16888
16878
|
metadataId: metaDataId$1,
|
|
16889
|
-
|
|
16879
|
+
metadata_appcode: metaDatadbName$1,
|
|
16890
16880
|
doc: {
|
|
16891
16881
|
system: "",
|
|
16892
16882
|
version: "1",
|
|
@@ -16909,6 +16899,16 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
16909
16899
|
var payload,
|
|
16910
16900
|
_ref2,
|
|
16911
16901
|
rejectWithValue,
|
|
16902
|
+
_payload$page,
|
|
16903
|
+
page,
|
|
16904
|
+
_payload$perPage,
|
|
16905
|
+
perPage,
|
|
16906
|
+
_payload$search,
|
|
16907
|
+
search,
|
|
16908
|
+
_payload$isSingle,
|
|
16909
|
+
isSingle,
|
|
16910
|
+
_payload$key,
|
|
16911
|
+
key,
|
|
16912
16912
|
queriesjson,
|
|
16913
16913
|
data,
|
|
16914
16914
|
arry,
|
|
@@ -16920,29 +16920,38 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
16920
16920
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
16921
16921
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
16922
16922
|
_context.p = 1;
|
|
16923
|
-
|
|
16923
|
+
_payload$page = payload.page, page = _payload$page === void 0 ? 0 : _payload$page, _payload$perPage = payload.perPage, perPage = _payload$perPage === void 0 ? 10 : _payload$perPage, _payload$search = payload.search, search = _payload$search === void 0 ? "" : _payload$search, _payload$isSingle = payload.isSingle, isSingle = _payload$isSingle === void 0 ? false : _payload$isSingle, _payload$key = payload.key, key = _payload$key === void 0 ? "" : _payload$key;
|
|
16924
|
+
queriesjson = queries$l.fullread(page, perPage, search, isSingle, key);
|
|
16924
16925
|
_context.n = 2;
|
|
16925
16926
|
return fetchData({
|
|
16926
16927
|
body: JSON.stringify(queriesjson)
|
|
16927
|
-
},
|
|
16928
|
+
}, __baseUrl__$1);
|
|
16928
16929
|
case 2:
|
|
16929
16930
|
data = _context.v;
|
|
16930
16931
|
arry = [];
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16932
|
+
if (Array.isArray(data)) {
|
|
16933
|
+
data.forEach(function (val) {
|
|
16934
|
+
var _val$coding, _val$coding2;
|
|
16935
|
+
if (val !== null && val !== void 0 && val.activestatus && val !== null && val !== void 0 && (_val$coding = val.coding) !== null && _val$coding !== void 0 && (_val$coding = _val$coding[0]) !== null && _val$coding !== void 0 && _val$coding.shortdesc && val !== null && val !== void 0 && (_val$coding2 = val.coding) !== null && _val$coding2 !== void 0 && (_val$coding2 = _val$coding2[0]) !== null && _val$coding2 !== void 0 && _val$coding2.code) {
|
|
16936
|
+
var _val$coding3, _val$coding$, _val$coding$2, _val$coding$3;
|
|
16937
|
+
var _ref3 = (val === null || val === void 0 || (_val$coding3 = val.coding) === null || _val$coding3 === void 0 ? void 0 : _val$coding3[0]) || {},
|
|
16938
|
+
_ref3$_id = _ref3._id,
|
|
16939
|
+
_id = _ref3$_id === void 0 ? "" : _ref3$_id,
|
|
16940
|
+
_ref3$_key = _ref3._key,
|
|
16941
|
+
c_key = _ref3$_key === void 0 ? "" : _ref3$_key;
|
|
16942
|
+
arry.push(_objectSpread2({
|
|
16943
|
+
total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
|
|
16944
|
+
code: val === null || val === void 0 || (_val$coding$ = val.coding[0]) === null || _val$coding$ === void 0 ? void 0 : _val$coding$.code,
|
|
16945
|
+
"short": val === null || val === void 0 || (_val$coding$2 = val.coding[0]) === null || _val$coding$2 === void 0 ? void 0 : _val$coding$2.shortdesc,
|
|
16946
|
+
"long": val === null || val === void 0 ? void 0 : val.coding[0].display,
|
|
16947
|
+
id: val === null || val === void 0 || (_val$coding$3 = val.coding[0]) === null || _val$coding$3 === void 0 ? void 0 : _val$coding$3.id,
|
|
16948
|
+
coding_key: _id || c_key,
|
|
16949
|
+
_key: val === null || val === void 0 ? void 0 : val._key,
|
|
16950
|
+
status: val === null || val === void 0 ? void 0 : val.status
|
|
16951
|
+
}, val));
|
|
16952
|
+
}
|
|
16953
|
+
});
|
|
16954
|
+
}
|
|
16946
16955
|
return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
16947
16956
|
data: arry
|
|
16948
16957
|
}));
|
|
@@ -16957,7 +16966,7 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
16957
16966
|
})));
|
|
16958
16967
|
var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderNatureTableState", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
16959
16968
|
var payload,
|
|
16960
|
-
|
|
16969
|
+
_ref5,
|
|
16961
16970
|
rejectWithValue,
|
|
16962
16971
|
data,
|
|
16963
16972
|
queriesjson,
|
|
@@ -16968,7 +16977,7 @@ var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderN
|
|
|
16968
16977
|
while (1) switch (_context2.p = _context2.n) {
|
|
16969
16978
|
case 0:
|
|
16970
16979
|
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
16971
|
-
|
|
16980
|
+
_ref5 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
|
|
16972
16981
|
_context2.p = 1;
|
|
16973
16982
|
data = payload.data;
|
|
16974
16983
|
queriesjson = queries$l.StatusUpdate(data._key, data.status);
|
|
@@ -16992,7 +17001,7 @@ var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderN
|
|
|
16992
17001
|
})));
|
|
16993
17002
|
var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrderNatureTable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
16994
17003
|
var payload,
|
|
16995
|
-
|
|
17004
|
+
_ref7,
|
|
16996
17005
|
rejectWithValue,
|
|
16997
17006
|
data,
|
|
16998
17007
|
queriesjson,
|
|
@@ -17003,7 +17012,7 @@ var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrder
|
|
|
17003
17012
|
while (1) switch (_context3.p = _context3.n) {
|
|
17004
17013
|
case 0:
|
|
17005
17014
|
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
17006
|
-
|
|
17015
|
+
_ref7 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
|
|
17007
17016
|
_context3.p = 1;
|
|
17008
17017
|
data = payload.data;
|
|
17009
17018
|
queriesjson = queries$l.UpdateORModify(data);
|
|
@@ -17027,7 +17036,7 @@ var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrder
|
|
|
17027
17036
|
})));
|
|
17028
17037
|
var INSERTORDERNATURETABLE = createAsyncThunk("ordertypeSlice/insertOrrderNarureTable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
17029
17038
|
var payload,
|
|
17030
|
-
|
|
17039
|
+
_ref9,
|
|
17031
17040
|
rejectWithValue,
|
|
17032
17041
|
data,
|
|
17033
17042
|
queriesjson,
|
|
@@ -17038,7 +17047,7 @@ var INSERTORDERNATURETABLE = createAsyncThunk("ordertypeSlice/insertOrrderNarure
|
|
|
17038
17047
|
while (1) switch (_context4.p = _context4.n) {
|
|
17039
17048
|
case 0:
|
|
17040
17049
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
17041
|
-
|
|
17050
|
+
_ref9 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
|
|
17042
17051
|
_context4.p = 1;
|
|
17043
17052
|
data = payload.data;
|
|
17044
17053
|
queriesjson = queries$l.Insert(data);
|
|
@@ -17109,7 +17118,7 @@ var queries$k = {
|
|
|
17109
17118
|
var perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
17110
17119
|
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
17111
17120
|
return {
|
|
17112
|
-
|
|
17121
|
+
db_name: dbName,
|
|
17113
17122
|
entity: "OrderCategory",
|
|
17114
17123
|
sort: "OrderCategory.createddate",
|
|
17115
17124
|
filter: "OrderCategory.activestatus == true ".concat(search ? "&& (UPPER(OrderCategory.ordercategory) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(OrderCategory.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(OrderCategory.longdesc) LIKE '%").concat(search.toUpperCase(), "%')") : ""),
|
|
@@ -17124,10 +17133,10 @@ var queries$k = {
|
|
|
17124
17133
|
var _data$status, _data$id;
|
|
17125
17134
|
return [{
|
|
17126
17135
|
appcode: dbName,
|
|
17127
|
-
|
|
17136
|
+
collection: "OrderCategory",
|
|
17128
17137
|
is_metadata: true,
|
|
17129
17138
|
metadataId: metaDataId$1,
|
|
17130
|
-
|
|
17139
|
+
metadata_appcode: metaDatadbName$1,
|
|
17131
17140
|
doc: {
|
|
17132
17141
|
ordercategory: data.category,
|
|
17133
17142
|
shortdesc: data.shortdesc,
|
|
@@ -17140,10 +17149,10 @@ var queries$k = {
|
|
|
17140
17149
|
orderCategoryStatusUpdate: function orderCategoryStatusUpdate(key, status) {
|
|
17141
17150
|
return [{
|
|
17142
17151
|
appcode: dbName,
|
|
17143
|
-
|
|
17152
|
+
collection: "OrderCategory",
|
|
17144
17153
|
is_metadata: true,
|
|
17145
17154
|
metadataId: metaDataId$1,
|
|
17146
|
-
|
|
17155
|
+
metadata_appcode: metaDatadbName$1,
|
|
17147
17156
|
filter: {
|
|
17148
17157
|
_key: key
|
|
17149
17158
|
},
|
|
@@ -17155,10 +17164,10 @@ var queries$k = {
|
|
|
17155
17164
|
orderCategoryModify: function orderCategoryModify(data) {
|
|
17156
17165
|
return [{
|
|
17157
17166
|
appcode: dbName,
|
|
17158
|
-
|
|
17167
|
+
collection: "OrderCategory",
|
|
17159
17168
|
is_metadata: true,
|
|
17160
17169
|
metadataId: metaDataId$1,
|
|
17161
|
-
|
|
17170
|
+
metadata_appcode: metaDatadbName$1,
|
|
17162
17171
|
filter: {
|
|
17163
17172
|
_key: data.key
|
|
17164
17173
|
},
|
|
@@ -17182,20 +17191,17 @@ var queries$k = {
|
|
|
17182
17191
|
perPage = _ref$perPage === void 0 ? 10 : _ref$perPage,
|
|
17183
17192
|
_ref$search = _ref.search,
|
|
17184
17193
|
search = _ref$search === void 0 ? "" : _ref$search;
|
|
17185
|
-
|
|
17186
|
-
|
|
17187
|
-
|
|
17188
|
-
filter:
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
+
return {
|
|
17195
|
+
appcode: dbName,
|
|
17196
|
+
requestid: "2a5e9b7d-3f8c-4a12-8e6b-0c9d7a5b3f2e",
|
|
17197
|
+
filter: {
|
|
17198
|
+
isSingle: isSingle,
|
|
17199
|
+
key: key,
|
|
17200
|
+
page: page,
|
|
17201
|
+
perPage: perPage,
|
|
17202
|
+
search: search
|
|
17203
|
+
}
|
|
17194
17204
|
};
|
|
17195
|
-
if (isSingle) {
|
|
17196
|
-
obj.filter = "CodeableConceptMaster.activestatus==true && CodeableConceptMaster._key=='".concat(key, "' && CodeableConceptMaster.Type=='ORDERMODE'");
|
|
17197
|
-
}
|
|
17198
|
-
return obj;
|
|
17199
17205
|
},
|
|
17200
17206
|
orderModeUpsert: function orderModeUpsert(_ref2) {
|
|
17201
17207
|
var _ref2$code = _ref2.code,
|
|
@@ -17216,10 +17222,10 @@ var queries$k = {
|
|
|
17216
17222
|
key = _ref2$key === void 0 ? "" : _ref2$key;
|
|
17217
17223
|
var newData = [{
|
|
17218
17224
|
appcode: dbName,
|
|
17219
|
-
|
|
17225
|
+
collection: "CodeableConceptMaster",
|
|
17220
17226
|
is_metadata: true,
|
|
17221
17227
|
metadataId: metaDataId$1,
|
|
17222
|
-
|
|
17228
|
+
metadata_appcode: metaDatadbName$1,
|
|
17223
17229
|
doc: {
|
|
17224
17230
|
text: "",
|
|
17225
17231
|
coding: [{
|
|
@@ -17240,13 +17246,13 @@ var queries$k = {
|
|
|
17240
17246
|
if (isUpdate) {
|
|
17241
17247
|
newData = [{
|
|
17242
17248
|
appcode: dbName,
|
|
17243
|
-
|
|
17249
|
+
collection: "CodingMaster",
|
|
17244
17250
|
is_metadata: true,
|
|
17245
17251
|
filter: {
|
|
17246
17252
|
_key: key
|
|
17247
17253
|
},
|
|
17248
17254
|
metadataId: metaDataId$1,
|
|
17249
|
-
|
|
17255
|
+
metadata_appcode: metaDatadbName$1,
|
|
17250
17256
|
doc: {
|
|
17251
17257
|
system: "",
|
|
17252
17258
|
version: "1",
|
|
@@ -17260,6 +17266,21 @@ var queries$k = {
|
|
|
17260
17266
|
}];
|
|
17261
17267
|
}
|
|
17262
17268
|
return newData;
|
|
17269
|
+
},
|
|
17270
|
+
orderModeStatusUpdate: function orderModeStatusUpdate(key, status) {
|
|
17271
|
+
return [{
|
|
17272
|
+
appcode: dbName,
|
|
17273
|
+
collection: "CodeableConceptMaster",
|
|
17274
|
+
is_metadata: true,
|
|
17275
|
+
metadataId: metaDataId$1,
|
|
17276
|
+
metadata_appcode: metaDatadbName$1,
|
|
17277
|
+
filter: {
|
|
17278
|
+
_key: key
|
|
17279
|
+
},
|
|
17280
|
+
doc: {
|
|
17281
|
+
status: status
|
|
17282
|
+
}
|
|
17283
|
+
}];
|
|
17263
17284
|
}
|
|
17264
17285
|
};
|
|
17265
17286
|
|
|
@@ -17287,7 +17308,7 @@ var GET_ALL_ORDER_CATEGORY = createAsyncThunk("orderMaster/getAllOrderCategory",
|
|
|
17287
17308
|
longdesc: v === null || v === void 0 ? void 0 : v.longdesc,
|
|
17288
17309
|
status: v === null || v === void 0 ? void 0 : v.status,
|
|
17289
17310
|
id: v === null || v === void 0 ? void 0 : v.id,
|
|
17290
|
-
key: v === null || v === void 0 ? void 0 : v.
|
|
17311
|
+
key: v === null || v === void 0 ? void 0 : v._id
|
|
17291
17312
|
};
|
|
17292
17313
|
});
|
|
17293
17314
|
return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -17401,12 +17422,12 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
|
|
|
17401
17422
|
_context.n = 2;
|
|
17402
17423
|
return fetchData({
|
|
17403
17424
|
body: JSON.stringify(queryJson)
|
|
17404
|
-
},
|
|
17425
|
+
}, __baseUrl__$1);
|
|
17405
17426
|
case 2:
|
|
17406
17427
|
data = _context.v;
|
|
17407
17428
|
arr = [];
|
|
17408
|
-
if (Array.isArray(data
|
|
17409
|
-
arr = data.
|
|
17429
|
+
if (Array.isArray(data)) {
|
|
17430
|
+
arr = data.map(function (item) {
|
|
17410
17431
|
var _ref3 = item || {},
|
|
17411
17432
|
_key = _ref3._key,
|
|
17412
17433
|
coding = _ref3.coding,
|
|
@@ -17420,7 +17441,11 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
|
|
|
17420
17441
|
_ref4$display = _ref4.display,
|
|
17421
17442
|
display = _ref4$display === void 0 ? "" : _ref4$display,
|
|
17422
17443
|
_ref4$id = _ref4.id,
|
|
17423
|
-
id = _ref4$id === void 0 ? 0 : _ref4$id
|
|
17444
|
+
id = _ref4$id === void 0 ? 0 : _ref4$id,
|
|
17445
|
+
_ref4$_id = _ref4._id,
|
|
17446
|
+
_id = _ref4$_id === void 0 ? "" : _ref4$_id,
|
|
17447
|
+
_ref4$_key = _ref4._key,
|
|
17448
|
+
c_key = _ref4$_key === void 0 ? "" : _ref4$_key;
|
|
17424
17449
|
return {
|
|
17425
17450
|
total_count: TotalCount,
|
|
17426
17451
|
code: code,
|
|
@@ -17428,6 +17453,7 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
|
|
|
17428
17453
|
longdesc: display,
|
|
17429
17454
|
status: status,
|
|
17430
17455
|
coding_id: id,
|
|
17456
|
+
coding_key: _id || c_key,
|
|
17431
17457
|
key: _key
|
|
17432
17458
|
};
|
|
17433
17459
|
});
|
|
@@ -17468,12 +17494,12 @@ var GET_SINGLE_ORDER_MODE = createAsyncThunk("orderModeSlice/getSingleOrderMode"
|
|
|
17468
17494
|
_context2.n = 2;
|
|
17469
17495
|
return fetchData({
|
|
17470
17496
|
body: JSON.stringify(queryJson)
|
|
17471
|
-
},
|
|
17497
|
+
}, __baseUrl__$1);
|
|
17472
17498
|
case 2:
|
|
17473
17499
|
data = _context2.v;
|
|
17474
17500
|
arr = [];
|
|
17475
|
-
if (Array.isArray(data
|
|
17476
|
-
arr = data.
|
|
17501
|
+
if (Array.isArray(data)) {
|
|
17502
|
+
arr = data.map(function (item) {
|
|
17477
17503
|
var _ref7 = item || {},
|
|
17478
17504
|
_key = _ref7._key,
|
|
17479
17505
|
coding = _ref7.coding,
|
|
@@ -17486,13 +17512,18 @@ var GET_SINGLE_ORDER_MODE = createAsyncThunk("orderModeSlice/getSingleOrderMode"
|
|
|
17486
17512
|
_ref8$display = _ref8.display,
|
|
17487
17513
|
display = _ref8$display === void 0 ? "" : _ref8$display,
|
|
17488
17514
|
_ref8$id = _ref8.id,
|
|
17489
|
-
id = _ref8$id === void 0 ? 0 : _ref8$id
|
|
17515
|
+
id = _ref8$id === void 0 ? 0 : _ref8$id,
|
|
17516
|
+
_ref8$_id = _ref8._id,
|
|
17517
|
+
_id = _ref8$_id === void 0 ? "" : _ref8$_id,
|
|
17518
|
+
_ref8$_key = _ref8._key,
|
|
17519
|
+
c_key = _ref8$_key === void 0 ? "" : _ref8$_key;
|
|
17490
17520
|
return {
|
|
17491
17521
|
code: code,
|
|
17492
17522
|
shortdesc: shortdesc,
|
|
17493
17523
|
longdesc: display,
|
|
17494
17524
|
status: status,
|
|
17495
17525
|
coding_id: id,
|
|
17526
|
+
coding_key: _id || c_key,
|
|
17496
17527
|
key: _key
|
|
17497
17528
|
};
|
|
17498
17529
|
});
|
|
@@ -17542,12 +17573,51 @@ var UPSERT_ORDER_MODE = createAsyncThunk("orderModeSlice/upsertOrderMode", /*#__
|
|
|
17542
17573
|
}
|
|
17543
17574
|
}, _callee3, null, [[1, 3]]);
|
|
17544
17575
|
})));
|
|
17576
|
+
var UPDATE_ORDER_MODE_STATUS = createAsyncThunk("orderModeSlice/updateOrderModeStatus", /*#__PURE__*/function () {
|
|
17577
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(_ref1, _ref10) {
|
|
17578
|
+
var key, status, rejectWithValue, queryJson, res, _t4;
|
|
17579
|
+
return _regenerator().w(function (_context4) {
|
|
17580
|
+
while (1) switch (_context4.p = _context4.n) {
|
|
17581
|
+
case 0:
|
|
17582
|
+
key = _ref1.key, status = _ref1.status;
|
|
17583
|
+
rejectWithValue = _ref10.rejectWithValue;
|
|
17584
|
+
_context4.p = 1;
|
|
17585
|
+
if (key) {
|
|
17586
|
+
_context4.n = 2;
|
|
17587
|
+
break;
|
|
17588
|
+
}
|
|
17589
|
+
throw new Error("Missing document key for status update.");
|
|
17590
|
+
case 2:
|
|
17591
|
+
queryJson = queries$k.orderModeStatusUpdate(key, status);
|
|
17592
|
+
_context4.n = 3;
|
|
17593
|
+
return fetchData({
|
|
17594
|
+
body: JSON.stringify(queryJson)
|
|
17595
|
+
}, __uspsertUrl__);
|
|
17596
|
+
case 3:
|
|
17597
|
+
res = _context4.v;
|
|
17598
|
+
return _context4.a(2, _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
17599
|
+
data: res
|
|
17600
|
+
}));
|
|
17601
|
+
case 4:
|
|
17602
|
+
_context4.p = 4;
|
|
17603
|
+
_t4 = _context4.v;
|
|
17604
|
+
return _context4.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
17605
|
+
message: _t4.message
|
|
17606
|
+
})));
|
|
17607
|
+
}
|
|
17608
|
+
}, _callee4, null, [[1, 4]]);
|
|
17609
|
+
}));
|
|
17610
|
+
return function (_x, _x2) {
|
|
17611
|
+
return _ref11.apply(this, arguments);
|
|
17612
|
+
};
|
|
17613
|
+
}());
|
|
17545
17614
|
createSlice({
|
|
17546
17615
|
name: "orderModeSlice",
|
|
17547
17616
|
initialState: {
|
|
17548
17617
|
get_all_order_mode: _objectSpread2({}, defaultState.List),
|
|
17549
17618
|
get_single_order_mode: _objectSpread2({}, defaultState.List),
|
|
17550
|
-
upsert_order_mode: _objectSpread2({}, defaultState.Info)
|
|
17619
|
+
upsert_order_mode: _objectSpread2({}, defaultState.Info),
|
|
17620
|
+
update_order_mode_status: _objectSpread2({}, defaultState.Info)
|
|
17551
17621
|
},
|
|
17552
17622
|
extraReducers: function extraReducers(builder) {
|
|
17553
17623
|
builder
|
|
@@ -17576,6 +17646,14 @@ createSlice({
|
|
|
17576
17646
|
state.upsert_order_mode = action.payload;
|
|
17577
17647
|
}).addCase(UPSERT_ORDER_MODE.rejected, function (state, action) {
|
|
17578
17648
|
state.upsert_order_mode = action.payload;
|
|
17649
|
+
})
|
|
17650
|
+
// UPDATE STATUS
|
|
17651
|
+
.addCase(UPDATE_ORDER_MODE_STATUS.pending, function (state) {
|
|
17652
|
+
state.update_order_mode_status.loading = true;
|
|
17653
|
+
}).addCase(UPDATE_ORDER_MODE_STATUS.fulfilled, function (state, action) {
|
|
17654
|
+
state.update_order_mode_status = action.payload;
|
|
17655
|
+
}).addCase(UPDATE_ORDER_MODE_STATUS.rejected, function (state, action) {
|
|
17656
|
+
state.update_order_mode_status = action.payload;
|
|
17579
17657
|
});
|
|
17580
17658
|
}
|
|
17581
17659
|
});
|
|
@@ -17591,7 +17669,8 @@ var orderMasterSlice = createSlice({
|
|
|
17591
17669
|
// Mode
|
|
17592
17670
|
get_all_order_mode: _objectSpread2({}, defaultState.List),
|
|
17593
17671
|
get_single_order_mode: _objectSpread2({}, defaultState.List),
|
|
17594
|
-
upsert_order_mode: _objectSpread2({}, defaultState.Info)
|
|
17672
|
+
upsert_order_mode: _objectSpread2({}, defaultState.Info),
|
|
17673
|
+
update_order_mode_status: _objectSpread2({}, defaultState.Info)
|
|
17595
17674
|
},
|
|
17596
17675
|
extraReducers: (_extraReducers$u = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_CATEGORY.pending, function (state) {
|
|
17597
17676
|
state.order_category_list.loading = true;
|
|
@@ -17629,7 +17708,7 @@ var orderMasterSlice = createSlice({
|
|
|
17629
17708
|
}), GET_ALL_ORDER_MODE.pending, function (state) {
|
|
17630
17709
|
state.get_all_order_mode.loading = true;
|
|
17631
17710
|
state.get_all_order_mode.error = false;
|
|
17632
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_MODE.fulfilled, function (state, action) {
|
|
17711
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_MODE.fulfilled, function (state, action) {
|
|
17633
17712
|
state.get_all_order_mode.loading = false;
|
|
17634
17713
|
state.get_all_order_mode.error = false;
|
|
17635
17714
|
state.get_all_order_mode = action.payload;
|
|
@@ -17659,6 +17738,17 @@ var orderMasterSlice = createSlice({
|
|
|
17659
17738
|
state.upsert_order_mode.loading = false;
|
|
17660
17739
|
state.upsert_order_mode.error = true;
|
|
17661
17740
|
state.upsert_order_mode = action.payload;
|
|
17741
|
+
}), UPDATE_ORDER_MODE_STATUS.pending, function (state) {
|
|
17742
|
+
state.update_order_mode_status.loading = true;
|
|
17743
|
+
state.update_order_mode_status.error = false;
|
|
17744
|
+
}), UPDATE_ORDER_MODE_STATUS.fulfilled, function (state, action) {
|
|
17745
|
+
state.update_order_mode_status.loading = false;
|
|
17746
|
+
state.update_order_mode_status.error = false;
|
|
17747
|
+
state.update_order_mode_status = action.payload;
|
|
17748
|
+
}), _defineProperty(_extraReducers$u, UPDATE_ORDER_MODE_STATUS.rejected, function (state, action) {
|
|
17749
|
+
state.update_order_mode_status.loading = false;
|
|
17750
|
+
state.update_order_mode_status.error = true;
|
|
17751
|
+
state.update_order_mode_status = action.payload;
|
|
17662
17752
|
}))
|
|
17663
17753
|
});
|
|
17664
17754
|
var orderMasterActions = {
|
|
@@ -17667,7 +17757,8 @@ var orderMasterActions = {
|
|
|
17667
17757
|
UPDATE_ORDER_CATEGORY_STATUS: UPDATE_ORDER_CATEGORY_STATUS,
|
|
17668
17758
|
GET_ALL_ORDER_MODE: GET_ALL_ORDER_MODE,
|
|
17669
17759
|
GET_SINGLE_ORDER_MODE: GET_SINGLE_ORDER_MODE,
|
|
17670
|
-
UPSERT_ORDER_MODE: UPSERT_ORDER_MODE
|
|
17760
|
+
UPSERT_ORDER_MODE: UPSERT_ORDER_MODE,
|
|
17761
|
+
UPDATE_ORDER_MODE_STATUS: UPDATE_ORDER_MODE_STATUS
|
|
17671
17762
|
};
|
|
17672
17763
|
var orderMasterSlice$1 = orderMasterSlice.reducer;
|
|
17673
17764
|
|
|
@@ -25590,10 +25681,10 @@ var generateSaveChargeCode = function generateSaveChargeCode(data) {
|
|
|
25590
25681
|
}
|
|
25591
25682
|
return [_objectSpread2(_objectSpread2({
|
|
25592
25683
|
appcode: dbName,
|
|
25593
|
-
|
|
25684
|
+
collection: "RC_ChargeCode",
|
|
25594
25685
|
is_metadata: true,
|
|
25595
25686
|
metadataId: metaDataId$1,
|
|
25596
|
-
|
|
25687
|
+
metadata_appcode: metaDatadbName$1
|
|
25597
25688
|
}, filter), {}, {
|
|
25598
25689
|
doc: {
|
|
25599
25690
|
baseqty: 1,
|
|
@@ -25622,10 +25713,10 @@ var generateSaveChargeRate = function generateSaveChargeRate(data, rcchargeData,
|
|
|
25622
25713
|
}
|
|
25623
25714
|
return [_objectSpread2(_objectSpread2({
|
|
25624
25715
|
appcode: dbName,
|
|
25625
|
-
|
|
25716
|
+
collection: "RC_ChargeRates",
|
|
25626
25717
|
is_metadata: true,
|
|
25627
25718
|
metadataId: metaDataId$1,
|
|
25628
|
-
|
|
25719
|
+
metadata_appcode: metaDatadbName$1
|
|
25629
25720
|
}, filter), {}, {
|
|
25630
25721
|
doc: {
|
|
25631
25722
|
baserate: data !== null && data !== void 0 && data.baseRate ? parseFloat(data === null || data === void 0 ? void 0 : data.baseRate) : 1000,
|
|
@@ -25675,10 +25766,10 @@ var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
|
25675
25766
|
}
|
|
25676
25767
|
return [_objectSpread2(_objectSpread2({
|
|
25677
25768
|
appcode: dbName,
|
|
25678
|
-
|
|
25769
|
+
collection: "OrderCatalog",
|
|
25679
25770
|
is_metadata: true,
|
|
25680
25771
|
metadataId: metaDataId$1,
|
|
25681
|
-
|
|
25772
|
+
metadata_appcode: metaDatadbName$1
|
|
25682
25773
|
}, filter), {}, {
|
|
25683
25774
|
doc: {
|
|
25684
25775
|
_id: "",
|
|
@@ -25986,13 +26077,13 @@ var generateResJson = function generateResJson(data) {
|
|
|
25986
26077
|
var generateUpdateJSON = function generateUpdateJSON(editID, Status) {
|
|
25987
26078
|
return [{
|
|
25988
26079
|
appcode: dbName,
|
|
25989
|
-
|
|
26080
|
+
collection: "OrderCatalog",
|
|
25990
26081
|
filter: {
|
|
25991
26082
|
_key: editID
|
|
25992
26083
|
},
|
|
25993
26084
|
is_metadata: true,
|
|
25994
26085
|
metadataId: metaDataId$1,
|
|
25995
|
-
|
|
26086
|
+
metadata_appcode: metaDatadbName$1,
|
|
25996
26087
|
doc: {
|
|
25997
26088
|
status: Status
|
|
25998
26089
|
}
|