primary_care_admin_binder 0.1.169 → 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 +205 -95
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -16418,19 +16418,19 @@ var locationMasterActions = {
|
|
|
16418
16418
|
};
|
|
16419
16419
|
var locationMasterSlice$1 = locationMasterSlice.reducer;
|
|
16420
16420
|
|
|
16421
|
-
// import { dbName } from "../../qdm_query_ids";
|
|
16422
16421
|
var queries$m = {
|
|
16423
|
-
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;
|
|
16424
16426
|
return {
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
|
|
16428
|
-
|
|
16429
|
-
limit: {
|
|
16427
|
+
appcode: dbName,
|
|
16428
|
+
requestid: "d61e3890-a7d5-4564-8840-05822368940f",
|
|
16429
|
+
filter: {
|
|
16430
|
+
search: "".concat(search),
|
|
16430
16431
|
offset: page,
|
|
16431
16432
|
count: perPage
|
|
16432
|
-
}
|
|
16433
|
-
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
|
+
}
|
|
16434
16434
|
};
|
|
16435
16435
|
},
|
|
16436
16436
|
OrderCategory: function OrderCategory() {
|
|
@@ -16443,29 +16443,33 @@ var queries$m = {
|
|
|
16443
16443
|
};
|
|
16444
16444
|
},
|
|
16445
16445
|
Insert: function Insert(data) {
|
|
16446
|
+
var _data$aliasMapping;
|
|
16446
16447
|
return [{
|
|
16447
16448
|
appcode: dbName,
|
|
16448
|
-
|
|
16449
|
+
collection: "OrderType",
|
|
16449
16450
|
is_metadata: true,
|
|
16450
16451
|
metadataId: metaDataId$1,
|
|
16451
|
-
|
|
16452
|
-
doc: {
|
|
16452
|
+
metadata_appcode: metaDatadbName$1,
|
|
16453
|
+
doc: _objectSpread2(_objectSpread2({
|
|
16453
16454
|
id: 0,
|
|
16454
16455
|
ordertype: data === null || data === void 0 ? void 0 : data.ordertype,
|
|
16455
16456
|
shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc,
|
|
16456
16457
|
longdesc: data === null || data === void 0 ? void 0 : data.longdesc,
|
|
16457
|
-
ordercategory: data === null || data === void 0 ? void 0 : data.ordercategory,
|
|
16458
|
-
registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
|
|
16459
|
-
|
|
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) {
|
|
16460
16462
|
var _item$aliasType;
|
|
16461
16463
|
return {
|
|
16462
|
-
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) || "",
|
|
16463
|
-
aliasCode: (item === null || item === void 0 ? void 0 : item.aliasCode) || "",
|
|
16464
|
-
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) || "")
|
|
16465
16467
|
};
|
|
16466
|
-
})
|
|
16467
|
-
|
|
16468
|
-
|
|
16468
|
+
})
|
|
16469
|
+
}), {}, {
|
|
16470
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
16471
|
+
activestatus: true
|
|
16472
|
+
})
|
|
16469
16473
|
}];
|
|
16470
16474
|
},
|
|
16471
16475
|
SoftDelete: function SoftDelete() {
|
|
@@ -16478,46 +16482,49 @@ var queries$m = {
|
|
|
16478
16482
|
StatusUpdate: function StatusUpdate(key, getstatus) {
|
|
16479
16483
|
return [{
|
|
16480
16484
|
appcode: dbName,
|
|
16481
|
-
|
|
16485
|
+
collection: "OrderType",
|
|
16482
16486
|
filter: {
|
|
16483
16487
|
_key: key
|
|
16484
16488
|
},
|
|
16485
16489
|
is_metadata: true,
|
|
16486
16490
|
metadataId: metaDataId$1,
|
|
16487
|
-
|
|
16491
|
+
metadata_appcode: metaDatadbName$1,
|
|
16488
16492
|
doc: {
|
|
16489
16493
|
status: getstatus
|
|
16490
16494
|
}
|
|
16491
16495
|
}];
|
|
16492
16496
|
},
|
|
16493
16497
|
UpdateORModify: function UpdateORModify(data) {
|
|
16498
|
+
var _data$aliasMapping2;
|
|
16494
16499
|
return [{
|
|
16495
16500
|
appcode: dbName,
|
|
16496
|
-
|
|
16501
|
+
collection: "OrderType",
|
|
16497
16502
|
is_metadata: true,
|
|
16498
16503
|
filter: {
|
|
16499
16504
|
_key: data === null || data === void 0 ? void 0 : data._key
|
|
16500
16505
|
},
|
|
16501
16506
|
metadataId: metaDataId$1,
|
|
16502
|
-
|
|
16503
|
-
doc: {
|
|
16507
|
+
metadata_appcode: metaDatadbName$1,
|
|
16508
|
+
doc: _objectSpread2(_objectSpread2({
|
|
16504
16509
|
_id: data === null || data === void 0 ? void 0 : data._id,
|
|
16505
16510
|
id: data === null || data === void 0 ? void 0 : data.id,
|
|
16506
16511
|
ordertype: data === null || data === void 0 ? void 0 : data.ordertype,
|
|
16507
16512
|
shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc,
|
|
16508
16513
|
longdesc: data === null || data === void 0 ? void 0 : data.longdesc,
|
|
16509
|
-
ordercategory: data === null || data === void 0 ? void 0 : data.ordercategory,
|
|
16510
|
-
registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
|
|
16511
|
-
|
|
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) {
|
|
16512
16518
|
var _item$aliasType2;
|
|
16513
16519
|
return {
|
|
16514
|
-
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) || "",
|
|
16515
|
-
aliasCode: (item === null || item === void 0 ? void 0 : item.aliasCode) || "",
|
|
16516
|
-
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) || "")
|
|
16517
16523
|
};
|
|
16518
|
-
})
|
|
16524
|
+
})
|
|
16525
|
+
}), {}, {
|
|
16519
16526
|
status: data === null || data === void 0 ? void 0 : data.status
|
|
16520
|
-
}
|
|
16527
|
+
})
|
|
16521
16528
|
}];
|
|
16522
16529
|
}
|
|
16523
16530
|
};
|
|
@@ -16542,11 +16549,11 @@ var ORDERTYPEREAD = createAsyncThunk("ordertypeSlice/ordertypeRead", /*#__PURE__
|
|
|
16542
16549
|
_context.n = 2;
|
|
16543
16550
|
return fetchData({
|
|
16544
16551
|
body: JSON.stringify(queriesjson)
|
|
16545
|
-
},
|
|
16552
|
+
}, __baseUrl__$1);
|
|
16546
16553
|
case 2:
|
|
16547
16554
|
data = _context.v;
|
|
16548
16555
|
arry = [];
|
|
16549
|
-
data.
|
|
16556
|
+
(data || []).map(function (val) {
|
|
16550
16557
|
var _val$ordercategory, _val$ordercategory2;
|
|
16551
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) {
|
|
16552
16559
|
var _val$ordercategory3, _val$ordercategory4, _val$ordercategory5, _val$ordercategory6;
|
|
@@ -16778,16 +16785,18 @@ var ordertypeSlice$1 = ordertypeSlice.reducer;
|
|
|
16778
16785
|
// import { dbName } from "../../qdm_query_ids";
|
|
16779
16786
|
var queries$l = {
|
|
16780
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] : "";
|
|
16781
16790
|
return {
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
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
|
+
}
|
|
16791
16800
|
};
|
|
16792
16801
|
},
|
|
16793
16802
|
Insert: function Insert(data) {
|
|
@@ -16863,11 +16872,11 @@ var queries$l = {
|
|
|
16863
16872
|
// ];
|
|
16864
16873
|
return [{
|
|
16865
16874
|
appcode: dbName,
|
|
16866
|
-
|
|
16875
|
+
collection: "CodingMaster",
|
|
16867
16876
|
is_metadata: true,
|
|
16868
16877
|
// metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
16869
16878
|
metadataId: metaDataId$1,
|
|
16870
|
-
|
|
16879
|
+
metadata_appcode: metaDatadbName$1,
|
|
16871
16880
|
doc: {
|
|
16872
16881
|
system: "",
|
|
16873
16882
|
version: "1",
|
|
@@ -16890,6 +16899,16 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
16890
16899
|
var payload,
|
|
16891
16900
|
_ref2,
|
|
16892
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,
|
|
16893
16912
|
queriesjson,
|
|
16894
16913
|
data,
|
|
16895
16914
|
arry,
|
|
@@ -16901,29 +16920,38 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
16901
16920
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
16902
16921
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
16903
16922
|
_context.p = 1;
|
|
16904
|
-
|
|
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);
|
|
16905
16925
|
_context.n = 2;
|
|
16906
16926
|
return fetchData({
|
|
16907
16927
|
body: JSON.stringify(queriesjson)
|
|
16908
|
-
},
|
|
16928
|
+
}, __baseUrl__$1);
|
|
16909
16929
|
case 2:
|
|
16910
16930
|
data = _context.v;
|
|
16911
16931
|
arry = [];
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
|
|
16915
|
-
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
|
|
16923
|
-
|
|
16924
|
-
|
|
16925
|
-
|
|
16926
|
-
|
|
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
|
+
}
|
|
16927
16955
|
return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
16928
16956
|
data: arry
|
|
16929
16957
|
}));
|
|
@@ -16938,7 +16966,7 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
|
|
|
16938
16966
|
})));
|
|
16939
16967
|
var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderNatureTableState", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
16940
16968
|
var payload,
|
|
16941
|
-
|
|
16969
|
+
_ref5,
|
|
16942
16970
|
rejectWithValue,
|
|
16943
16971
|
data,
|
|
16944
16972
|
queriesjson,
|
|
@@ -16949,7 +16977,7 @@ var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderN
|
|
|
16949
16977
|
while (1) switch (_context2.p = _context2.n) {
|
|
16950
16978
|
case 0:
|
|
16951
16979
|
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
16952
|
-
|
|
16980
|
+
_ref5 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
|
|
16953
16981
|
_context2.p = 1;
|
|
16954
16982
|
data = payload.data;
|
|
16955
16983
|
queriesjson = queries$l.StatusUpdate(data._key, data.status);
|
|
@@ -16973,7 +17001,7 @@ var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderN
|
|
|
16973
17001
|
})));
|
|
16974
17002
|
var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrderNatureTable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
16975
17003
|
var payload,
|
|
16976
|
-
|
|
17004
|
+
_ref7,
|
|
16977
17005
|
rejectWithValue,
|
|
16978
17006
|
data,
|
|
16979
17007
|
queriesjson,
|
|
@@ -16984,7 +17012,7 @@ var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrder
|
|
|
16984
17012
|
while (1) switch (_context3.p = _context3.n) {
|
|
16985
17013
|
case 0:
|
|
16986
17014
|
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
16987
|
-
|
|
17015
|
+
_ref7 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
|
|
16988
17016
|
_context3.p = 1;
|
|
16989
17017
|
data = payload.data;
|
|
16990
17018
|
queriesjson = queries$l.UpdateORModify(data);
|
|
@@ -17008,7 +17036,7 @@ var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrder
|
|
|
17008
17036
|
})));
|
|
17009
17037
|
var INSERTORDERNATURETABLE = createAsyncThunk("ordertypeSlice/insertOrrderNarureTable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
17010
17038
|
var payload,
|
|
17011
|
-
|
|
17039
|
+
_ref9,
|
|
17012
17040
|
rejectWithValue,
|
|
17013
17041
|
data,
|
|
17014
17042
|
queriesjson,
|
|
@@ -17019,7 +17047,7 @@ var INSERTORDERNATURETABLE = createAsyncThunk("ordertypeSlice/insertOrrderNarure
|
|
|
17019
17047
|
while (1) switch (_context4.p = _context4.n) {
|
|
17020
17048
|
case 0:
|
|
17021
17049
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
17022
|
-
|
|
17050
|
+
_ref9 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
|
|
17023
17051
|
_context4.p = 1;
|
|
17024
17052
|
data = payload.data;
|
|
17025
17053
|
queriesjson = queries$l.Insert(data);
|
|
@@ -17163,20 +17191,17 @@ var queries$k = {
|
|
|
17163
17191
|
perPage = _ref$perPage === void 0 ? 10 : _ref$perPage,
|
|
17164
17192
|
_ref$search = _ref.search,
|
|
17165
17193
|
search = _ref$search === void 0 ? "" : _ref$search;
|
|
17166
|
-
|
|
17167
|
-
|
|
17168
|
-
|
|
17169
|
-
filter:
|
|
17170
|
-
|
|
17171
|
-
|
|
17172
|
-
|
|
17173
|
-
|
|
17174
|
-
|
|
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
|
+
}
|
|
17175
17204
|
};
|
|
17176
|
-
if (isSingle) {
|
|
17177
|
-
obj.filter = "CodeableConceptMaster.activestatus==true && CodeableConceptMaster._key=='".concat(key, "' && CodeableConceptMaster.Type=='ORDERMODE'");
|
|
17178
|
-
}
|
|
17179
|
-
return obj;
|
|
17180
17205
|
},
|
|
17181
17206
|
orderModeUpsert: function orderModeUpsert(_ref2) {
|
|
17182
17207
|
var _ref2$code = _ref2.code,
|
|
@@ -17241,6 +17266,21 @@ var queries$k = {
|
|
|
17241
17266
|
}];
|
|
17242
17267
|
}
|
|
17243
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
|
+
}];
|
|
17244
17284
|
}
|
|
17245
17285
|
};
|
|
17246
17286
|
|
|
@@ -17382,12 +17422,12 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
|
|
|
17382
17422
|
_context.n = 2;
|
|
17383
17423
|
return fetchData({
|
|
17384
17424
|
body: JSON.stringify(queryJson)
|
|
17385
|
-
},
|
|
17425
|
+
}, __baseUrl__$1);
|
|
17386
17426
|
case 2:
|
|
17387
17427
|
data = _context.v;
|
|
17388
17428
|
arr = [];
|
|
17389
|
-
if (Array.isArray(data
|
|
17390
|
-
arr = data.
|
|
17429
|
+
if (Array.isArray(data)) {
|
|
17430
|
+
arr = data.map(function (item) {
|
|
17391
17431
|
var _ref3 = item || {},
|
|
17392
17432
|
_key = _ref3._key,
|
|
17393
17433
|
coding = _ref3.coding,
|
|
@@ -17401,7 +17441,11 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
|
|
|
17401
17441
|
_ref4$display = _ref4.display,
|
|
17402
17442
|
display = _ref4$display === void 0 ? "" : _ref4$display,
|
|
17403
17443
|
_ref4$id = _ref4.id,
|
|
17404
|
-
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;
|
|
17405
17449
|
return {
|
|
17406
17450
|
total_count: TotalCount,
|
|
17407
17451
|
code: code,
|
|
@@ -17409,6 +17453,7 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
|
|
|
17409
17453
|
longdesc: display,
|
|
17410
17454
|
status: status,
|
|
17411
17455
|
coding_id: id,
|
|
17456
|
+
coding_key: _id || c_key,
|
|
17412
17457
|
key: _key
|
|
17413
17458
|
};
|
|
17414
17459
|
});
|
|
@@ -17449,12 +17494,12 @@ var GET_SINGLE_ORDER_MODE = createAsyncThunk("orderModeSlice/getSingleOrderMode"
|
|
|
17449
17494
|
_context2.n = 2;
|
|
17450
17495
|
return fetchData({
|
|
17451
17496
|
body: JSON.stringify(queryJson)
|
|
17452
|
-
},
|
|
17497
|
+
}, __baseUrl__$1);
|
|
17453
17498
|
case 2:
|
|
17454
17499
|
data = _context2.v;
|
|
17455
17500
|
arr = [];
|
|
17456
|
-
if (Array.isArray(data
|
|
17457
|
-
arr = data.
|
|
17501
|
+
if (Array.isArray(data)) {
|
|
17502
|
+
arr = data.map(function (item) {
|
|
17458
17503
|
var _ref7 = item || {},
|
|
17459
17504
|
_key = _ref7._key,
|
|
17460
17505
|
coding = _ref7.coding,
|
|
@@ -17467,13 +17512,18 @@ var GET_SINGLE_ORDER_MODE = createAsyncThunk("orderModeSlice/getSingleOrderMode"
|
|
|
17467
17512
|
_ref8$display = _ref8.display,
|
|
17468
17513
|
display = _ref8$display === void 0 ? "" : _ref8$display,
|
|
17469
17514
|
_ref8$id = _ref8.id,
|
|
17470
|
-
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;
|
|
17471
17520
|
return {
|
|
17472
17521
|
code: code,
|
|
17473
17522
|
shortdesc: shortdesc,
|
|
17474
17523
|
longdesc: display,
|
|
17475
17524
|
status: status,
|
|
17476
17525
|
coding_id: id,
|
|
17526
|
+
coding_key: _id || c_key,
|
|
17477
17527
|
key: _key
|
|
17478
17528
|
};
|
|
17479
17529
|
});
|
|
@@ -17523,12 +17573,51 @@ var UPSERT_ORDER_MODE = createAsyncThunk("orderModeSlice/upsertOrderMode", /*#__
|
|
|
17523
17573
|
}
|
|
17524
17574
|
}, _callee3, null, [[1, 3]]);
|
|
17525
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
|
+
}());
|
|
17526
17614
|
createSlice({
|
|
17527
17615
|
name: "orderModeSlice",
|
|
17528
17616
|
initialState: {
|
|
17529
17617
|
get_all_order_mode: _objectSpread2({}, defaultState.List),
|
|
17530
17618
|
get_single_order_mode: _objectSpread2({}, defaultState.List),
|
|
17531
|
-
upsert_order_mode: _objectSpread2({}, defaultState.Info)
|
|
17619
|
+
upsert_order_mode: _objectSpread2({}, defaultState.Info),
|
|
17620
|
+
update_order_mode_status: _objectSpread2({}, defaultState.Info)
|
|
17532
17621
|
},
|
|
17533
17622
|
extraReducers: function extraReducers(builder) {
|
|
17534
17623
|
builder
|
|
@@ -17557,6 +17646,14 @@ createSlice({
|
|
|
17557
17646
|
state.upsert_order_mode = action.payload;
|
|
17558
17647
|
}).addCase(UPSERT_ORDER_MODE.rejected, function (state, action) {
|
|
17559
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;
|
|
17560
17657
|
});
|
|
17561
17658
|
}
|
|
17562
17659
|
});
|
|
@@ -17572,7 +17669,8 @@ var orderMasterSlice = createSlice({
|
|
|
17572
17669
|
// Mode
|
|
17573
17670
|
get_all_order_mode: _objectSpread2({}, defaultState.List),
|
|
17574
17671
|
get_single_order_mode: _objectSpread2({}, defaultState.List),
|
|
17575
|
-
upsert_order_mode: _objectSpread2({}, defaultState.Info)
|
|
17672
|
+
upsert_order_mode: _objectSpread2({}, defaultState.Info),
|
|
17673
|
+
update_order_mode_status: _objectSpread2({}, defaultState.Info)
|
|
17576
17674
|
},
|
|
17577
17675
|
extraReducers: (_extraReducers$u = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_CATEGORY.pending, function (state) {
|
|
17578
17676
|
state.order_category_list.loading = true;
|
|
@@ -17610,7 +17708,7 @@ var orderMasterSlice = createSlice({
|
|
|
17610
17708
|
}), GET_ALL_ORDER_MODE.pending, function (state) {
|
|
17611
17709
|
state.get_all_order_mode.loading = true;
|
|
17612
17710
|
state.get_all_order_mode.error = false;
|
|
17613
|
-
}), _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) {
|
|
17614
17712
|
state.get_all_order_mode.loading = false;
|
|
17615
17713
|
state.get_all_order_mode.error = false;
|
|
17616
17714
|
state.get_all_order_mode = action.payload;
|
|
@@ -17640,6 +17738,17 @@ var orderMasterSlice = createSlice({
|
|
|
17640
17738
|
state.upsert_order_mode.loading = false;
|
|
17641
17739
|
state.upsert_order_mode.error = true;
|
|
17642
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;
|
|
17643
17752
|
}))
|
|
17644
17753
|
});
|
|
17645
17754
|
var orderMasterActions = {
|
|
@@ -17648,7 +17757,8 @@ var orderMasterActions = {
|
|
|
17648
17757
|
UPDATE_ORDER_CATEGORY_STATUS: UPDATE_ORDER_CATEGORY_STATUS,
|
|
17649
17758
|
GET_ALL_ORDER_MODE: GET_ALL_ORDER_MODE,
|
|
17650
17759
|
GET_SINGLE_ORDER_MODE: GET_SINGLE_ORDER_MODE,
|
|
17651
|
-
UPSERT_ORDER_MODE: UPSERT_ORDER_MODE
|
|
17760
|
+
UPSERT_ORDER_MODE: UPSERT_ORDER_MODE,
|
|
17761
|
+
UPDATE_ORDER_MODE_STATUS: UPDATE_ORDER_MODE_STATUS
|
|
17652
17762
|
};
|
|
17653
17763
|
var orderMasterSlice$1 = orderMasterSlice.reducer;
|
|
17654
17764
|
|