primary_care_admin_binder 0.1.112 → 0.1.114
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 +876 -428
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2508,6 +2508,7 @@ var __holidayAddUrl__ = "".concat(process.env.REACT_APP_APPOINTMENT_API, "/api/a
|
|
|
2508
2508
|
// metadata db name & Id
|
|
2509
2509
|
var metaDatadbName$1 = process.env.REACT_APP_METADATA_DB_NAME;
|
|
2510
2510
|
var metaDataId$1 = process.env.REACT_APP_METADATAID;
|
|
2511
|
+
var tenantId = process.env.REACT_APP_TENANTID;
|
|
2511
2512
|
|
|
2512
2513
|
var moment = createCommonjsModule(function (module, exports) {
|
|
2513
2514
|
(function (global, factory) {
|
|
@@ -11429,7 +11430,7 @@ var generateUpdateJSON$1 = function generateUpdateJSON(editID, Status) {
|
|
|
11429
11430
|
};
|
|
11430
11431
|
|
|
11431
11432
|
//for edit read JSON
|
|
11432
|
-
var generateReadResJson
|
|
11433
|
+
var generateReadResJson = function generateReadResJson(data, state, ageCategory) {
|
|
11433
11434
|
var list = data.map(function (v) {
|
|
11434
11435
|
return {
|
|
11435
11436
|
editData: v._id,
|
|
@@ -11966,7 +11967,7 @@ var EDIT_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/editvitalM
|
|
|
11966
11967
|
}, __readDocumentUrl__);
|
|
11967
11968
|
case 11:
|
|
11968
11969
|
data = _context11.sent;
|
|
11969
|
-
res = generateReadResJson
|
|
11970
|
+
res = generateReadResJson(data.result, ccState, category.result);
|
|
11970
11971
|
return _context11.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
11971
11972
|
data: res
|
|
11972
11973
|
}));
|
|
@@ -23237,12 +23238,19 @@ var masterQuery$5 = {
|
|
|
23237
23238
|
};
|
|
23238
23239
|
var orderTypedata = {
|
|
23239
23240
|
ordertype: function ordertype(type) {
|
|
23241
|
+
// return{
|
|
23242
|
+
// db_name: dbName,
|
|
23243
|
+
// entity: "OrderType",
|
|
23244
|
+
// filter: `OrderType.activestatus==true && OrderType.status==true && OrderType.ordercategory=='${type}'`,
|
|
23245
|
+
// return_fields: "merge(OrderType,{ordercategory:(document(OrderType.ordercategory))})",
|
|
23246
|
+
// sort: "OrderType.ordertype"
|
|
23247
|
+
// }
|
|
23240
23248
|
return {
|
|
23241
|
-
db_name: dbName$1,
|
|
23242
|
-
|
|
23243
|
-
|
|
23244
|
-
|
|
23245
|
-
|
|
23249
|
+
"db_name": dbName$1,
|
|
23250
|
+
"filter": {
|
|
23251
|
+
"ordercategoryId": type
|
|
23252
|
+
},
|
|
23253
|
+
"queryid": "b4c429f4-45d0-438d-89b8-3ca31134ae4a"
|
|
23246
23254
|
};
|
|
23247
23255
|
}
|
|
23248
23256
|
};
|
|
@@ -23262,40 +23270,67 @@ var Query = {
|
|
|
23262
23270
|
order_catalog_read: function order_catalog_read(_ref) {
|
|
23263
23271
|
var page = _ref.page,
|
|
23264
23272
|
perPage = _ref.perPage;
|
|
23273
|
+
// return {
|
|
23274
|
+
// "db_name": dbName,
|
|
23275
|
+
// "entity": "OrderCatalog",
|
|
23276
|
+
// "sort": "OrderCatalog.createddate ASC",
|
|
23277
|
+
// "limit": {
|
|
23278
|
+
// "offset": page,
|
|
23279
|
+
// "count": perPage
|
|
23280
|
+
// },
|
|
23281
|
+
// "filter": "OrderCatalog.activestatus==true",
|
|
23282
|
+
// "return_fields": "MERGE(OrderCatalog,{TotalCount:COUNT(FOR cnt IN OrderCatalog RETURN cnt._key)},{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})"
|
|
23283
|
+
// };
|
|
23284
|
+
|
|
23265
23285
|
return {
|
|
23266
23286
|
"db_name": dbName$1,
|
|
23267
|
-
"
|
|
23268
|
-
|
|
23269
|
-
|
|
23270
|
-
"offset": page,
|
|
23271
|
-
"count": perPage
|
|
23287
|
+
"filter": {
|
|
23288
|
+
"page": page,
|
|
23289
|
+
"perPage": perPage
|
|
23272
23290
|
},
|
|
23273
|
-
"
|
|
23274
|
-
"return_fields": "MERGE(OrderCatalog,{TotalCount:COUNT(FOR cnt IN OrderCatalog RETURN cnt._key)},{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})"
|
|
23291
|
+
"queryid": "0b70b829-2e3e-49b2-85e4-1be22332f351"
|
|
23275
23292
|
};
|
|
23276
23293
|
},
|
|
23277
23294
|
order_catalog_read_search: function order_catalog_read_search(_ref2) {
|
|
23278
23295
|
var page = _ref2.page,
|
|
23279
23296
|
perPage = _ref2.perPage,
|
|
23280
23297
|
search = _ref2.search;
|
|
23298
|
+
// return {
|
|
23299
|
+
// "db_name": dbName,
|
|
23300
|
+
// "entity": "OrderCatalog",
|
|
23301
|
+
// "sort": "OrderCatalog.createddate ASC",
|
|
23302
|
+
// "limit": {
|
|
23303
|
+
// "offset": page,
|
|
23304
|
+
// "count": perPage
|
|
23305
|
+
// },
|
|
23306
|
+
// "filter": `(like(OrderCatalog.shortdesc,'%${search}%',true) || like(OrderCatalog.longdesc,'%${search}%',true) || like(OrderCatalog.ordercatalog,'%${search}%',true)) && OrderCatalog.activestatus==true`,
|
|
23307
|
+
// "return_fields": `MERGE(OrderCatalog,{TotalCount:COUNT(FOR cnt IN OrderCatalog FILTER (like(cnt.shortdesc,'%${search}%',true) || like(cnt.longdesc,'%${search}%',true) || like(cnt.ordercatalog,'%${search}%',true)) && cnt.activestatus==true RETURN cnt._key)},{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})`
|
|
23308
|
+
// }
|
|
23309
|
+
|
|
23281
23310
|
return {
|
|
23282
|
-
"db_name":
|
|
23283
|
-
"
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
"
|
|
23287
|
-
"count": perPage
|
|
23311
|
+
"db_name": "primarycareng",
|
|
23312
|
+
"filter": {
|
|
23313
|
+
"searchval": search,
|
|
23314
|
+
"page": page,
|
|
23315
|
+
"perPage": perPage
|
|
23288
23316
|
},
|
|
23289
|
-
"
|
|
23290
|
-
"return_fields": "MERGE(OrderCatalog,{TotalCount:COUNT(FOR cnt IN OrderCatalog FILTER (like(cnt.shortdesc,'%".concat(search, "%',true) || like(cnt.longdesc,'%").concat(search, "%',true) || like(cnt.ordercatalog,'%").concat(search, "%',true)) && cnt.activestatus==true RETURN cnt._key)},{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltFastingPeriodUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenBodySite:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenBodySite return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenCollectionMethod:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenCollectionMethod return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenType:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenType return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltSpecimenVolumeUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenVolumeUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),dfltqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),maxorderqtyUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.maxorderqtyUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),repeatCheckUOM:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.repeatCheckUOM return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)})),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(for docs in CodeableConceptMaster filter docs._id==doc.perfOrganizationEntity return merge(doc,{coding:(for cod in CodingMaster filter cod._id in docs.coding return cod.display)}))})),dfltSpecimenContainer:(for doc in CodeableConceptMaster filter doc._id==OrderCatalog.dfltSpecimenContainer return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod.display)}))})")
|
|
23317
|
+
"queryid": "603d2995-cff2-4cd3-b89d-13d21be3c79f"
|
|
23291
23318
|
};
|
|
23292
23319
|
},
|
|
23293
23320
|
editOrderCatalog: function editOrderCatalog(id) {
|
|
23321
|
+
// return {
|
|
23322
|
+
// db_name: dbName,
|
|
23323
|
+
// entity: "OrderCatalog",
|
|
23324
|
+
// filter: `OrderCatalog.activestatus==true && OrderCatalog._id=='${id}'`,
|
|
23325
|
+
// return_fields:
|
|
23326
|
+
// "MERGE(OrderCatalog,{ordercategory:(document(OrderCatalog.ordercategory)),ordertype:(document(OrderCatalog.ordertype)),healthcareservicecode:(document(OrderCatalog.healthcareservicecode)),OrderCatalogByEncounterTypeAge:(for doc in CA_OrderCatalogByEncounterTypeAge filter doc._id in OrderCatalog.OrderCatalogByEncounterTypeAge return doc),OrderAttribApplicability:(for doc in CA_OrderAttribApplicability filter doc._id in OrderCatalog.OrderAttribApplicability return doc),dfltFastingPeriodUOM:document(OrderCatalog.dfltFastingPeriodUOM),dfltSpecimenBodySite:document(OrderCatalog.dfltSpecimenBodySite),dfltSpecimenCollectionMethod:document(OrderCatalog.dfltSpecimenCollectionMethod),dfltSpecimenType:document(OrderCatalog.dfltSpecimenType),dfltSpecimenVolumeUOM:document(OrderCatalog.dfltSpecimenVolumeUOM),dfltqtyUOM:document(OrderCatalog.dfltqtyUOM),maxorderqtyUOM:document(OrderCatalog.maxorderqtyUOM),repeatCheckUOM:document(OrderCatalog.repeatCheckUOM),AvailablebyPerOrganization:(for doc in to_array(OrderCatalog.AvailablebyPerOrganization) return merge(doc,{perforganizationId:(document(doc.perforganizationId)),perfOrganizationEntity:(document(doc.perfOrganizationEntity))})),dfltSpecimenContainer:document(OrderCatalog.dfltSpecimenContainer),repeatCheckAction:document(OrderCatalog.repeatCheckAction),resourcedefinition:(for i in TO_ARRAY(OrderCatalog.resourcedefinition) return {resourcetype:{label:document(i.resourcetype).display,value:document(i.resourcetype)._id,_id:document(i.resourcetype)._id},resourcerole:{label:document(i.resourcerole).display,value:document(i.resourcerole)._id,_id:document(i.resourcerole)._id},resourcename:(for resn in i.resourcename return {_id:document(resn)._id,value:document(resn)._id,label:CONCAT(document(document(resn).personid).name[0].fulname)}), resourcedepartment:(for resourcedepartment in i.resourcedepartment return {_id : document(resourcedepartment)._id,label:document(resourcedepartment).display,value : document(resourcedepartment)._id})}),observationdetails:(for obs in TO_ARRAY(OrderCatalog.observationdetails) return MERGE (obs,{vitalcode:{label:document(obs.vitalcode).longdesc,value:document(obs.vitalcode)._id,_id:document(obs.vitalcode)._id}}))})"
|
|
23327
|
+
// };
|
|
23294
23328
|
return {
|
|
23295
|
-
db_name: dbName$1,
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23329
|
+
"db_name": dbName$1,
|
|
23330
|
+
"filter": {
|
|
23331
|
+
"id": id
|
|
23332
|
+
},
|
|
23333
|
+
"queryid": "d2d0ea53-0a1c-4569-a033-f2a3716e3f1d"
|
|
23299
23334
|
};
|
|
23300
23335
|
},
|
|
23301
23336
|
attributeDelete: function attributeDelete(id) {
|
|
@@ -23306,18 +23341,79 @@ var Query = {
|
|
|
23306
23341
|
};
|
|
23307
23342
|
},
|
|
23308
23343
|
entityTypeName: function entityTypeName(name) {
|
|
23344
|
+
// return {
|
|
23345
|
+
// db_name: dbName,
|
|
23346
|
+
// entity: "Organization",
|
|
23347
|
+
// sort: "Organization.name",
|
|
23348
|
+
// filter: `Organization.OrgType ANY =='${name}' && Organization.activestatus==true`,
|
|
23349
|
+
// return_fields: "Organization",
|
|
23350
|
+
// };
|
|
23351
|
+
|
|
23309
23352
|
return {
|
|
23310
|
-
db_name: dbName$1,
|
|
23311
|
-
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
|
|
23353
|
+
"db_name": dbName$1,
|
|
23354
|
+
"filter": {
|
|
23355
|
+
"Orgname": name
|
|
23356
|
+
},
|
|
23357
|
+
"queryid": "b0931347-d3eb-4627-b799-cc701cb8f6c9"
|
|
23315
23358
|
};
|
|
23316
23359
|
}
|
|
23317
23360
|
};
|
|
23318
23361
|
|
|
23319
|
-
var
|
|
23320
|
-
var _data$
|
|
23362
|
+
var generateSaveChargeCode = function generateSaveChargeCode(data) {
|
|
23363
|
+
var _data$healthcareServi, _data$code, _data$longdes, _data$DuplicatePeriod, _data$shortdes;
|
|
23364
|
+
var filter = {};
|
|
23365
|
+
if (data !== null && data !== void 0 && (_data$healthcareServi = data.healthcareService) !== null && _data$healthcareServi !== void 0 && _data$healthcareServi.value) {
|
|
23366
|
+
var _data$healthcareServi2;
|
|
23367
|
+
filter = {
|
|
23368
|
+
filter: {
|
|
23369
|
+
_id: data === null || data === void 0 ? void 0 : (_data$healthcareServi2 = data.healthcareService) === null || _data$healthcareServi2 === void 0 ? void 0 : _data$healthcareServi2._id
|
|
23370
|
+
}
|
|
23371
|
+
};
|
|
23372
|
+
}
|
|
23373
|
+
return [_objectSpread2$1(_objectSpread2$1({
|
|
23374
|
+
db_name: dbName$1,
|
|
23375
|
+
entity: "RC_ChargeCode",
|
|
23376
|
+
is_metadata: true,
|
|
23377
|
+
metadataId: metaDataId$1,
|
|
23378
|
+
metadata_dbname: metaDatadbName$1
|
|
23379
|
+
}, filter), {}, {
|
|
23380
|
+
doc: {
|
|
23381
|
+
baseqty: 1,
|
|
23382
|
+
chargecode: (_data$code = data === null || data === void 0 ? void 0 : data.code) !== null && _data$code !== void 0 ? _data$code : "",
|
|
23383
|
+
facilityid: "",
|
|
23384
|
+
id: 0,
|
|
23385
|
+
longdesc: (_data$longdes = data.longdes) !== null && _data$longdes !== void 0 ? _data$longdes : "",
|
|
23386
|
+
maxdurnuom: data.DuplicatePeriod ? data === null || data === void 0 ? void 0 : (_data$DuplicatePeriod = data.DuplicatePeriod) === null || _data$DuplicatePeriod === void 0 ? void 0 : _data$DuplicatePeriod._id : "",
|
|
23387
|
+
maxdurnval: data.no ? parseInt(data.no) : 0,
|
|
23388
|
+
maxordqtyuom: data.Maxorder ? data.Maxorder._id : "",
|
|
23389
|
+
maxordqtyval: data.Qtyno ? parseInt(data.maxno) : 0,
|
|
23390
|
+
shortdesc: (_data$shortdes = data.shortdes) !== null && _data$shortdes !== void 0 ? _data$shortdes : "",
|
|
23391
|
+
tenantid: tenantId
|
|
23392
|
+
}
|
|
23393
|
+
})];
|
|
23394
|
+
};
|
|
23395
|
+
var generateSaveJSON = function generateSaveJSON(data, rcchargeCode) {
|
|
23396
|
+
var _data$resourceList, _data$observationList, _data$DuplicatePeriod2, _data$CheckAction;
|
|
23397
|
+
var resourceresult = data === null || data === void 0 ? void 0 : (_data$resourceList = data.resourceList) === null || _data$resourceList === void 0 ? void 0 : _data$resourceList.map(function (item) {
|
|
23398
|
+
return {
|
|
23399
|
+
resourcetype: item.resourcetype._id,
|
|
23400
|
+
resourcerole: item.resourcerole._id,
|
|
23401
|
+
resourcedepartment: item.resourcedepartment.map(function (department) {
|
|
23402
|
+
return department._id;
|
|
23403
|
+
}),
|
|
23404
|
+
resourcename: item.resourcename.map(function (name) {
|
|
23405
|
+
return name._id;
|
|
23406
|
+
})
|
|
23407
|
+
};
|
|
23408
|
+
});
|
|
23409
|
+
var observationresult = data === null || data === void 0 ? void 0 : (_data$observationList = data.observationList) === null || _data$observationList === void 0 ? void 0 : _data$observationList.map(function (item) {
|
|
23410
|
+
var _item$vitalcode;
|
|
23411
|
+
return {
|
|
23412
|
+
ismandatory: item === null || item === void 0 ? void 0 : item.mandatory,
|
|
23413
|
+
Sequence: item === null || item === void 0 ? void 0 : item.sequence,
|
|
23414
|
+
vitalcode: item === null || item === void 0 ? void 0 : (_item$vitalcode = item.vitalcode) === null || _item$vitalcode === void 0 ? void 0 : _item$vitalcode._id
|
|
23415
|
+
};
|
|
23416
|
+
});
|
|
23321
23417
|
var filter = {};
|
|
23322
23418
|
if (data.editData) {
|
|
23323
23419
|
filter = {
|
|
@@ -23347,7 +23443,7 @@ var generateSaveJSON = function generateSaveJSON(data) {
|
|
|
23347
23443
|
ordercategory: data.orderCategory ? data.orderCategory.value : "",
|
|
23348
23444
|
grouporindv: data.groupOrIndividual ? data.groupOrIndividual.value : "",
|
|
23349
23445
|
ordertype: data.orderType ? data.orderType.value : "",
|
|
23350
|
-
healthcareservicecode:
|
|
23446
|
+
healthcareservicecode: rcchargeCode ? rcchargeCode : "",
|
|
23351
23447
|
//reflexonresult: "boolean",
|
|
23352
23448
|
completeonorder: data.characteristicJson[0].checked,
|
|
23353
23449
|
mappingmoduleId: "",
|
|
@@ -23356,8 +23452,8 @@ var generateSaveJSON = function generateSaveJSON(data) {
|
|
|
23356
23452
|
chargeable: data.characteristicJson[3].checked,
|
|
23357
23453
|
resultappl: data.characteristicJson[4].checked,
|
|
23358
23454
|
resultauthreqd: data.characteristicJson[5].checked,
|
|
23359
|
-
isitem:
|
|
23360
|
-
|
|
23455
|
+
// isitem:data.characteristicJson[6]?.checked,
|
|
23456
|
+
// itemdesc:data?.itemdesc?.value ?? "",
|
|
23361
23457
|
explanatorynote: data.explantorymsg,
|
|
23362
23458
|
// promptalertreqd: "boolean",
|
|
23363
23459
|
// alertmessageCriteria: "string",
|
|
@@ -23373,11 +23469,11 @@ var generateSaveJSON = function generateSaveJSON(data) {
|
|
|
23373
23469
|
consentformid: data.ConsentForm ? data.ConsentForm.value : "",
|
|
23374
23470
|
checkforrepeatorders: data.checkSwitch,
|
|
23375
23471
|
repeatcheckperiod: data.no ? parseInt(data.no) : 0,
|
|
23376
|
-
repeatCheckUOM: data.DuplicatePeriod ? data.DuplicatePeriod.
|
|
23377
|
-
repeatCheckAction: data.CheckAction ? data.CheckAction.
|
|
23472
|
+
repeatCheckUOM: data.DuplicatePeriod ? data === null || data === void 0 ? void 0 : (_data$DuplicatePeriod2 = data.DuplicatePeriod) === null || _data$DuplicatePeriod2 === void 0 ? void 0 : _data$DuplicatePeriod2._id : "",
|
|
23473
|
+
repeatCheckAction: data.CheckAction ? data === null || data === void 0 ? void 0 : (_data$CheckAction = data.CheckAction) === null || _data$CheckAction === void 0 ? void 0 : _data$CheckAction._id : "",
|
|
23378
23474
|
status: data.status,
|
|
23379
|
-
dfltqtyUOM: data.DefaultQuantity ? data.DefaultQuantity.
|
|
23380
|
-
maxorderqtyUOM: data.Maxorder ? data.Maxorder.
|
|
23475
|
+
dfltqtyUOM: data.DefaultQuantity ? data.DefaultQuantity._id : "",
|
|
23476
|
+
maxorderqtyUOM: data.Maxorder ? data.Maxorder._id : "",
|
|
23381
23477
|
dfltSpecimenType: data.SpecimenType ? data.SpecimenType.value : "",
|
|
23382
23478
|
dfltSpecimenVolume: data.VolumeQuantity ? parseInt(data.VolumeQuantity) : 0,
|
|
23383
23479
|
dfltSpecimenVolumeUOM: data.Volume ? data.Volume.value : "",
|
|
@@ -23386,20 +23482,30 @@ var generateSaveJSON = function generateSaveJSON(data) {
|
|
|
23386
23482
|
dfltSpecimenBodySite: data.BodyType ? data.BodyType.value : "",
|
|
23387
23483
|
dfltFastingPeriod: data.FastingPeriodQuantity ? parseInt(data.FastingPeriodQuantity) : 0,
|
|
23388
23484
|
dfltFastingPeriodUOM: data.FastingPeriod ? data.FastingPeriod.value : "",
|
|
23389
|
-
OrderCatalogByEncounterTypeAge: getInstructionAndFrequency(
|
|
23485
|
+
// OrderCatalogByEncounterTypeAge: getInstructionAndFrequency(
|
|
23486
|
+
// data.instructions,
|
|
23487
|
+
// data.frequency,
|
|
23488
|
+
// data.Frequency_applicability
|
|
23489
|
+
// ),
|
|
23490
|
+
|
|
23390
23491
|
draftstatus: data.draftstatus,
|
|
23391
|
-
OrderAttribApplicability: getAttributes(data.AttributeList, data.attribute)
|
|
23492
|
+
OrderAttribApplicability: getAttributes(data.AttributeList, data.attribute),
|
|
23493
|
+
resourcedefinition: resourceresult !== null && resourceresult !== void 0 ? resourceresult : [],
|
|
23494
|
+
observationdetails: observationresult !== null && observationresult !== void 0 ? observationresult : [],
|
|
23495
|
+
instruction: getInstruction(data.instructions),
|
|
23496
|
+
frequency: getFrequency(data.frequency, data.Frequency_applicability)
|
|
23392
23497
|
}
|
|
23393
23498
|
})];
|
|
23394
23499
|
};
|
|
23395
23500
|
var getAvailability = function getAvailability(data) {
|
|
23396
23501
|
var arr = data.map(function (v) {
|
|
23397
|
-
var _v$entity_name$
|
|
23502
|
+
var _v$entity_name$_id, _v$entity_name, _v$entity_name2, _v$appointment, _parseInt, _v$bill_nature$_id, _v$bill_nature, _v$entity_type$_id, _v$entity_type;
|
|
23398
23503
|
return {
|
|
23399
|
-
perforganizationId: (_v$entity_name$
|
|
23504
|
+
perforganizationId: (_v$entity_name$_id = v === null || v === void 0 ? void 0 : (_v$entity_name = v.entity_name) === null || _v$entity_name === void 0 ? void 0 : _v$entity_name._id) !== null && _v$entity_name$_id !== void 0 ? _v$entity_name$_id : v === null || v === void 0 ? void 0 : (_v$entity_name2 = v.entity_name) === null || _v$entity_name2 === void 0 ? void 0 : _v$entity_name2.value,
|
|
23400
23505
|
apptreqd: (_v$appointment = v === null || v === void 0 ? void 0 : v.appointment) !== null && _v$appointment !== void 0 ? _v$appointment : false,
|
|
23401
23506
|
apptDurnInMinutes: (_parseInt = parseInt(v.duration)) !== null && _parseInt !== void 0 ? _parseInt : null,
|
|
23402
|
-
|
|
23507
|
+
billnature: (_v$bill_nature$_id = v === null || v === void 0 ? void 0 : (_v$bill_nature = v.bill_nature) === null || _v$bill_nature === void 0 ? void 0 : _v$bill_nature._id) !== null && _v$bill_nature$_id !== void 0 ? _v$bill_nature$_id : null,
|
|
23508
|
+
perfOrganizationEntity: (_v$entity_type$_id = v === null || v === void 0 ? void 0 : (_v$entity_type = v.entity_type) === null || _v$entity_type === void 0 ? void 0 : _v$entity_type._id) !== null && _v$entity_type$_id !== void 0 ? _v$entity_type$_id : null,
|
|
23403
23509
|
EffFrDate: v !== null && v !== void 0 && v.effective_from ? getUtcTime(moment(v.effective_from, "DD/MM/YYYY")) : null,
|
|
23404
23510
|
EffToDate: v !== null && v !== void 0 && v.effective_to ? getUtcTime(moment(v === null || v === void 0 ? void 0 : v.effective_to, "DD/MM/YYYY")) : null
|
|
23405
23511
|
};
|
|
@@ -23408,6 +23514,7 @@ var getAvailability = function getAvailability(data) {
|
|
|
23408
23514
|
};
|
|
23409
23515
|
var getAttributes = function getAttributes(data, attri) {
|
|
23410
23516
|
var arr = data.map(function (v, i) {
|
|
23517
|
+
var _v$isMandatory;
|
|
23411
23518
|
return {
|
|
23412
23519
|
_id: v._id,
|
|
23413
23520
|
id: 0,
|
|
@@ -23418,13 +23525,73 @@ var getAttributes = function getAttributes(data, attri) {
|
|
|
23418
23525
|
attribCode: v.Attcode.value,
|
|
23419
23526
|
attribdefaultVal: v.defaultValue.label,
|
|
23420
23527
|
attribType: v.type,
|
|
23421
|
-
attribLabel: v.label
|
|
23528
|
+
attribLabel: v.label,
|
|
23529
|
+
mandatory: (_v$isMandatory = v === null || v === void 0 ? void 0 : v.isMandatory) !== null && _v$isMandatory !== void 0 ? _v$isMandatory : false
|
|
23422
23530
|
}]
|
|
23423
23531
|
};
|
|
23424
23532
|
});
|
|
23425
23533
|
return arr;
|
|
23426
23534
|
};
|
|
23427
|
-
|
|
23535
|
+
|
|
23536
|
+
// const getInstructionAndFrequency = (insdata, fredata, freapp) => {
|
|
23537
|
+
// let arr = [];
|
|
23538
|
+
|
|
23539
|
+
// insdata.map((v, i) => {
|
|
23540
|
+
// arr.push({
|
|
23541
|
+
// _id: v._id,
|
|
23542
|
+
// id: 0,
|
|
23543
|
+
// serviceapplicability: "Service",
|
|
23544
|
+
// setuptypeInd: "Instruction",
|
|
23545
|
+
|
|
23546
|
+
// encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23547
|
+
// gendercode: v.gender ? v.gender._id : "",
|
|
23548
|
+
// agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23549
|
+
// agecatgcode: v.agecategory
|
|
23550
|
+
// ? v.agecategory.map((a) => {
|
|
23551
|
+
// return a.value;
|
|
23552
|
+
// })
|
|
23553
|
+
// : [],
|
|
23554
|
+
|
|
23555
|
+
// OrderInstr: [
|
|
23556
|
+
// {
|
|
23557
|
+
// patientInst: v.patientInstrction,
|
|
23558
|
+
// practionerInst: v.practitionerInstrction,
|
|
23559
|
+
// prepInstr: v.prepratoryInstrction,
|
|
23560
|
+
// deptInstr: v.departmentInstrction,
|
|
23561
|
+
// },
|
|
23562
|
+
// ],
|
|
23563
|
+
// });
|
|
23564
|
+
// });
|
|
23565
|
+
|
|
23566
|
+
// fredata.map((v) => {
|
|
23567
|
+
// arr.push({
|
|
23568
|
+
// _id: v._id,
|
|
23569
|
+
// id: 0,
|
|
23570
|
+
// serviceapplicability: "Service",
|
|
23571
|
+
// setuptypeInd: "DefaultValues",
|
|
23572
|
+
// ordercatalog: "string",
|
|
23573
|
+
// encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23574
|
+
// gendercode: v.gender ? v.gender._id : "",
|
|
23575
|
+
// agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23576
|
+
// agecatgcode: v.agecategory
|
|
23577
|
+
// ? v.agecategory.map((a) => {
|
|
23578
|
+
// return a.value;
|
|
23579
|
+
// })
|
|
23580
|
+
// : [],
|
|
23581
|
+
// freqappl: freapp,
|
|
23582
|
+
// dfltfreqValue: v.freqvalue ? parseInt(v.freqvalue) : 0,
|
|
23583
|
+
// dfltfreqValueUnit: v.freqValSelect ? v.freqValSelect._id : "",
|
|
23584
|
+
// dfltfreqRate: v.freqrate ? parseInt(v.freqrate) : 0,
|
|
23585
|
+
// dfltfreqRateUnit: v.freqRatSelect ? v.freqRatSelect._id : "",
|
|
23586
|
+
// dfltduration: v.freqdura ? parseInt(v.freqdura) : 0,
|
|
23587
|
+
// dfltdurationType: v.freqDuraSelect ? v.freqDuraSelect._id : "",
|
|
23588
|
+
// maxdurnallowedinDays: v.freqmax ? parseInt(v.freqmax) : 0,
|
|
23589
|
+
// });
|
|
23590
|
+
// });
|
|
23591
|
+
|
|
23592
|
+
// return arr;
|
|
23593
|
+
// };
|
|
23594
|
+
var getInstruction = function getInstruction(insdata) {
|
|
23428
23595
|
var arr = [];
|
|
23429
23596
|
insdata.map(function (v, i) {
|
|
23430
23597
|
arr.push({
|
|
@@ -23432,8 +23599,8 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23432
23599
|
id: 0,
|
|
23433
23600
|
serviceapplicability: "Service",
|
|
23434
23601
|
setuptypeInd: "Instruction",
|
|
23435
|
-
encountertype: v.encounterType ? v.encounterType.
|
|
23436
|
-
gendercode: v.gender ? v.gender.
|
|
23602
|
+
encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23603
|
+
gendercode: v.gender ? v.gender._id : "",
|
|
23437
23604
|
agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23438
23605
|
agecatgcode: v.agecategory ? v.agecategory.map(function (a) {
|
|
23439
23606
|
return a.value;
|
|
@@ -23446,6 +23613,10 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23446
23613
|
}]
|
|
23447
23614
|
});
|
|
23448
23615
|
});
|
|
23616
|
+
return arr;
|
|
23617
|
+
};
|
|
23618
|
+
var getFrequency = function getFrequency(fredata, freapp) {
|
|
23619
|
+
var arr = [];
|
|
23449
23620
|
fredata.map(function (v) {
|
|
23450
23621
|
arr.push({
|
|
23451
23622
|
_id: v._id,
|
|
@@ -23453,25 +23624,24 @@ var getInstructionAndFrequency = function getInstructionAndFrequency(insdata, fr
|
|
|
23453
23624
|
serviceapplicability: "Service",
|
|
23454
23625
|
setuptypeInd: "DefaultValues",
|
|
23455
23626
|
ordercatalog: "string",
|
|
23456
|
-
encountertype: v.encounterType ? v.encounterType.
|
|
23457
|
-
gendercode: v.gender ? v.gender.
|
|
23627
|
+
encountertype: v.encounterType ? v.encounterType._id : "",
|
|
23628
|
+
gendercode: v.gender ? v.gender._id : "",
|
|
23458
23629
|
agegroup: v.ageRange ? v.ageRange.value : "",
|
|
23459
23630
|
agecatgcode: v.agecategory ? v.agecategory.map(function (a) {
|
|
23460
23631
|
return a.value;
|
|
23461
23632
|
}) : [],
|
|
23462
23633
|
freqappl: freapp,
|
|
23463
23634
|
dfltfreqValue: v.freqvalue ? parseInt(v.freqvalue) : 0,
|
|
23464
|
-
dfltfreqValueUnit: v.freqValSelect ? v.freqValSelect.
|
|
23635
|
+
dfltfreqValueUnit: v.freqValSelect ? v.freqValSelect._id : "",
|
|
23465
23636
|
dfltfreqRate: v.freqrate ? parseInt(v.freqrate) : 0,
|
|
23466
|
-
dfltfreqRateUnit: v.freqRatSelect ? v.freqRatSelect.
|
|
23637
|
+
dfltfreqRateUnit: v.freqRatSelect ? v.freqRatSelect._id : "",
|
|
23467
23638
|
dfltduration: v.freqdura ? parseInt(v.freqdura) : 0,
|
|
23468
|
-
dfltdurationType: v.freqDuraSelect ? v.freqDuraSelect.
|
|
23639
|
+
dfltdurationType: v.freqDuraSelect ? v.freqDuraSelect._id : "",
|
|
23469
23640
|
maxdurnallowedinDays: v.freqmax ? parseInt(v.freqmax) : 0
|
|
23470
23641
|
});
|
|
23471
23642
|
});
|
|
23472
23643
|
return arr;
|
|
23473
23644
|
};
|
|
23474
|
-
|
|
23475
23645
|
//for table response (readJSon)
|
|
23476
23646
|
var generateResJson = function generateResJson(data) {
|
|
23477
23647
|
var list = data.map(function (val) {
|
|
@@ -23479,8 +23649,7 @@ var generateResJson = function generateResJson(data) {
|
|
|
23479
23649
|
code: val.ordercatalog ? val.ordercatalog : "",
|
|
23480
23650
|
"short": val.shortdesc ? val.shortdesc : "",
|
|
23481
23651
|
"long": val.longdesc ? val.longdesc : "",
|
|
23482
|
-
status: val.status ? val.status : false
|
|
23483
|
-
draft: val.draftstatus
|
|
23652
|
+
status: val.status ? val.status : false
|
|
23484
23653
|
}, val);
|
|
23485
23654
|
});
|
|
23486
23655
|
return list;
|
|
@@ -23503,32 +23672,21 @@ var generateUpdateJSON = function generateUpdateJSON(editID, Status) {
|
|
|
23503
23672
|
}];
|
|
23504
23673
|
};
|
|
23505
23674
|
|
|
23506
|
-
|
|
23507
|
-
var
|
|
23508
|
-
var _val$catalogsynonym, _val$ordercategory, _val$ordertype, _val$healthcareservic, _val$dfltqtyUOM, _val$maxorderqtyUOM, _val$repeatCheckUOM, _val$repeatCheckActio, _val$dfltSpecimenType, _val$dfltSpecimenVolu, _val$dfltSpecimenBody, _val$dfltFastingPerio, _val$dfltSpecimenCont, _val$dfltSpecimenColl;
|
|
23675
|
+
var generateReadResJsonData = function generateReadResJsonData(val, state, resState) {
|
|
23676
|
+
var _val$catalogsynonym2, _val$ordercategory2, _val$ordertype2, _val$healthcareservic2, _val$dfltqtyUOM2, _val$maxorderqtyUOM2, _val$repeatCheckUOM2, _val$repeatCheckActio2, _generateAttribute2, _val$dfltSpecimenType2, _val$dfltSpecimenVolu2, _val$dfltSpecimenBody2, _val$dfltFastingPerio2, _val$dfltSpecimenCont2, _val$dfltSpecimenColl2, _generateResoure2, _generateObservation2;
|
|
23509
23677
|
return {
|
|
23510
23678
|
code: val.ordercatalog,
|
|
23511
23679
|
longdes: val.longdesc,
|
|
23512
23680
|
shortdes: val.shortdesc,
|
|
23513
|
-
catalogSynonym: (_val$
|
|
23514
|
-
orderCategory: val !== null && val !== void 0 && val.ordercategory && val !== null && val !== void 0 && (_val$
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
orderType: val.ordertype && (_val$ordertype = val.ordertype) !== null && _val$ordertype !== void 0 && _val$ordertype._id ? state.order_catalog_masters.data.orderType.find(function (sys) {
|
|
23518
|
-
return val.ordertype._id.indexOf(sys.value) > -1;
|
|
23519
|
-
}) : null,
|
|
23520
|
-
healthcareService: val.healthcareservicecode && (_val$healthcareservic = val.healthcareservicecode) !== null && _val$healthcareservic !== void 0 && _val$healthcareservic._id ? state.order_catalog_masters.data.healthService.find(function (sys) {
|
|
23521
|
-
return val.healthcareservicecode._id.indexOf(sys.value) > -1;
|
|
23522
|
-
}) : null,
|
|
23681
|
+
catalogSynonym: (_val$catalogsynonym2 = val.catalogsynonym) !== null && _val$catalogsynonym2 !== void 0 ? _val$catalogsynonym2 : "",
|
|
23682
|
+
orderCategory: val !== null && val !== void 0 && val.ordercategory && val !== null && val !== void 0 && (_val$ordercategory2 = val.ordercategory) !== null && _val$ordercategory2 !== void 0 && _val$ordercategory2._id ? val === null || val === void 0 ? void 0 : val.ordercategory : null,
|
|
23683
|
+
orderType: val.ordertype && (_val$ordertype2 = val.ordertype) !== null && _val$ordertype2 !== void 0 && _val$ordertype2._id ? val.ordertype : null,
|
|
23684
|
+
healthcareService: val.healthcareservicecode && (_val$healthcareservic2 = val.healthcareservicecode) !== null && _val$healthcareservic2 !== void 0 && _val$healthcareservic2._id ? val.healthcareservicecode : null,
|
|
23523
23685
|
Qtyno: val.dfltqty,
|
|
23524
|
-
DefaultQuantity: val.dfltqtyUOM && (_val$
|
|
23525
|
-
return val.dfltqtyUOM._id.indexOf(sys.value) > -1;
|
|
23526
|
-
}) : null,
|
|
23686
|
+
DefaultQuantity: val.dfltqtyUOM && (_val$dfltqtyUOM2 = val.dfltqtyUOM) !== null && _val$dfltqtyUOM2 !== void 0 && _val$dfltqtyUOM2._id ? val.dfltqtyUOM : null,
|
|
23527
23687
|
AllowQtyCheck: val.allowqtychange,
|
|
23528
23688
|
maxno: val.maxorderqty,
|
|
23529
|
-
Maxorder: val.maxorderqtyUOM && (_val$
|
|
23530
|
-
return val.maxorderqtyUOM._id.indexOf(sys.value) > -1;
|
|
23531
|
-
}) : null,
|
|
23689
|
+
Maxorder: val.maxorderqtyUOM && (_val$maxorderqtyUOM2 = val.maxorderqtyUOM) !== null && _val$maxorderqtyUOM2 !== void 0 && _val$maxorderqtyUOM2._id ? val.maxorderqtyUOM : null,
|
|
23532
23690
|
explantorymsg: val.explanatorynote,
|
|
23533
23691
|
characteristicJson: [{
|
|
23534
23692
|
label: "Complete On Order",
|
|
@@ -23548,67 +23706,77 @@ var generateReadResJson = function generateReadResJson(val, state) {
|
|
|
23548
23706
|
}, {
|
|
23549
23707
|
label: "Result Authentication Required",
|
|
23550
23708
|
checked: val.resultauthreqd
|
|
23551
|
-
}, {
|
|
23552
|
-
label: "Item/Services",
|
|
23553
|
-
checked: val.isitem
|
|
23554
23709
|
}],
|
|
23555
|
-
itemdesc:
|
|
23556
|
-
|
|
23557
|
-
|
|
23710
|
+
// itemdesc:(val.itemdesc)
|
|
23711
|
+
// ? state.order_catalog_serviceItem.data.find(
|
|
23712
|
+
// (sys) => val.itemdesc.indexOf(sys.value) > -1
|
|
23713
|
+
// )
|
|
23714
|
+
// : null,
|
|
23558
23715
|
checkSwitch: val.checkforrepeatorders,
|
|
23559
23716
|
no: val.repeatcheckperiod,
|
|
23560
|
-
DuplicatePeriod: val.repeatCheckUOM && (_val$
|
|
23561
|
-
|
|
23562
|
-
}) : null,
|
|
23563
|
-
CheckAction: val.repeatCheckAction && (_val$repeatCheckActio = val.repeatCheckAction) !== null && _val$repeatCheckActio !== void 0 && _val$repeatCheckActio._id ? state.order_catalog_masters.data.checkaction.find(function (sys) {
|
|
23564
|
-
return val.repeatCheckAction._id.indexOf(sys.value) > -1;
|
|
23565
|
-
}) : null,
|
|
23717
|
+
DuplicatePeriod: val.repeatCheckUOM && (_val$repeatCheckUOM2 = val.repeatCheckUOM) !== null && _val$repeatCheckUOM2 !== void 0 && _val$repeatCheckUOM2._id ? val.repeatCheckUOM : null,
|
|
23718
|
+
CheckAction: val.repeatCheckAction && (_val$repeatCheckActio2 = val.repeatCheckAction) !== null && _val$repeatCheckActio2 !== void 0 && _val$repeatCheckActio2._id ? val.repeatCheckAction : null,
|
|
23566
23719
|
consentSwitch: val.consentreqd,
|
|
23567
23720
|
ConsentForm: null,
|
|
23568
23721
|
attribute: val.OrderAttribApplicability.length > 0 ? val.OrderAttribApplicability[0].winlabelName : "",
|
|
23569
|
-
AttributeList: generateAttribute(val.OrderAttribApplicability, state),
|
|
23570
|
-
FacilityData: generatefaciltity(val.AvailablebyPerOrganization
|
|
23571
|
-
SpecimenType: val.dfltSpecimenType && (_val$
|
|
23572
|
-
return val.dfltSpecimenType._id.indexOf(sys.value) > -1;
|
|
23573
|
-
}) : null,
|
|
23722
|
+
AttributeList: (_generateAttribute2 = generateAttribute(val.OrderAttribApplicability, state)) !== null && _generateAttribute2 !== void 0 ? _generateAttribute2 : [],
|
|
23723
|
+
FacilityData: generatefaciltity(val.AvailablebyPerOrganization),
|
|
23724
|
+
SpecimenType: val.dfltSpecimenType && (_val$dfltSpecimenType2 = val.dfltSpecimenType) !== null && _val$dfltSpecimenType2 !== void 0 && _val$dfltSpecimenType2._id ? val.dfltSpecimenType : null,
|
|
23574
23725
|
VolumeQuantity: val.dfltSpecimenVolume,
|
|
23575
|
-
Volume: val.dfltSpecimenVolumeUOM && (_val$
|
|
23576
|
-
|
|
23577
|
-
}) : null,
|
|
23578
|
-
BodyType: val.dfltSpecimenBodySite && (_val$dfltSpecimenBody = val.dfltSpecimenBodySite) !== null && _val$dfltSpecimenBody !== void 0 && _val$dfltSpecimenBody._id ? state.order_catalog_masters.data.bodySite.find(function (sys) {
|
|
23579
|
-
return val.dfltSpecimenBodySite._id.indexOf(sys.value) > -1;
|
|
23580
|
-
}) : null,
|
|
23726
|
+
Volume: val.dfltSpecimenVolumeUOM && (_val$dfltSpecimenVolu2 = val.dfltSpecimenVolumeUOM) !== null && _val$dfltSpecimenVolu2 !== void 0 && _val$dfltSpecimenVolu2._id ? dfltSpecimenVolumeUOM : null,
|
|
23727
|
+
BodyType: val.dfltSpecimenBodySite && (_val$dfltSpecimenBody2 = val.dfltSpecimenBodySite) !== null && _val$dfltSpecimenBody2 !== void 0 && _val$dfltSpecimenBody2._id ? dfltSpecimenBodySite : null,
|
|
23581
23728
|
FastingPeriodQuantity: val.dfltFastingPeriod,
|
|
23582
|
-
FastingPeriod: val.dfltFastingPeriodUOM && (_val$
|
|
23583
|
-
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
CollectionMethod: val.dfltSpecimenCollectionMethod && (_val$dfltSpecimenColl = val.dfltSpecimenCollectionMethod) !== null && _val$dfltSpecimenColl !== void 0 && _val$dfltSpecimenColl._id ? state.order_catalog_masters.data.collectionMethod.find(function (sys) {
|
|
23589
|
-
return val.dfltSpecimenCollectionMethod._id.indexOf(sys.value) > -1;
|
|
23590
|
-
}) : null,
|
|
23591
|
-
instructions: generateInstruction(val.OrderCatalogByEncounterTypeAge, state),
|
|
23592
|
-
Frequency_applicability: generateFrequency(val.OrderCatalogByEncounterTypeAge, state).length > 0 ? true : false,
|
|
23593
|
-
frequency: generateFrequency(val.OrderCatalogByEncounterTypeAge, state),
|
|
23729
|
+
FastingPeriod: val.dfltFastingPeriodUOM && (_val$dfltFastingPerio2 = val.dfltFastingPeriodUOM) !== null && _val$dfltFastingPerio2 !== void 0 && _val$dfltFastingPerio2._id ? val.dfltFastingPeriodUOM : null,
|
|
23730
|
+
SpecimenContainer: val.dfltSpecimenContainer && (_val$dfltSpecimenCont2 = val.dfltSpecimenContainer) !== null && _val$dfltSpecimenCont2 !== void 0 && _val$dfltSpecimenCont2._id ? val.dfltSpecimenContainer : null,
|
|
23731
|
+
CollectionMethod: val.dfltSpecimenCollectionMethod && (_val$dfltSpecimenColl2 = val.dfltSpecimenCollectionMethod) !== null && _val$dfltSpecimenColl2 !== void 0 && _val$dfltSpecimenColl2._id ? val.dfltSpecimenCollectionMethod : null,
|
|
23732
|
+
instructions: generateInstruction(val.instruction),
|
|
23733
|
+
Frequency_applicability: generateFrequency(val.frequency).length > 0 ? true : false,
|
|
23734
|
+
frequency: generateFrequency(val.frequency),
|
|
23594
23735
|
editData: val._key,
|
|
23595
23736
|
id: val.id,
|
|
23596
23737
|
draftstatus: val.draftstatus,
|
|
23597
|
-
status: val.status
|
|
23738
|
+
status: val.status,
|
|
23739
|
+
resourceList: (_generateResoure2 = generateResoure(val.resourcedefinition)) !== null && _generateResoure2 !== void 0 ? _generateResoure2 : [],
|
|
23740
|
+
observationList: (_generateObservation2 = generateObservation(val.observationdetails)) !== null && _generateObservation2 !== void 0 ? _generateObservation2 : []
|
|
23741
|
+
// observationList: val.observationdetails
|
|
23598
23742
|
};
|
|
23599
23743
|
};
|
|
23744
|
+
|
|
23600
23745
|
var generateAttribute = function generateAttribute(data, state) {
|
|
23601
23746
|
var arr = data.map(function (v) {
|
|
23602
23747
|
return {
|
|
23603
|
-
Attcode: state.
|
|
23748
|
+
Attcode: state.order_catalog_attrcode.data.find(function (sys) {
|
|
23604
23749
|
return v.AttribComponents[0].attribCode.indexOf(sys.value) > -1;
|
|
23605
23750
|
}),
|
|
23606
23751
|
label: v.AttribComponents[0].attribLabel,
|
|
23607
23752
|
type: v.AttribComponents[0].attribType,
|
|
23608
23753
|
defaultValue: v.AttribComponents[0].attribType === "Number" || v.AttribComponents[0].attribType === "Text" ? {
|
|
23609
23754
|
label: v.AttribComponents[0].attribdefaultVal
|
|
23610
|
-
} : getDefautlValue(v, state.
|
|
23611
|
-
_id: v._key
|
|
23755
|
+
} : getDefautlValue(v, state.order_catalog_attrcode.data),
|
|
23756
|
+
_id: v._key,
|
|
23757
|
+
isMandatory: v.AttribComponents[0].mandatory
|
|
23758
|
+
};
|
|
23759
|
+
});
|
|
23760
|
+
return arr;
|
|
23761
|
+
};
|
|
23762
|
+
var generateResoure = function generateResoure(data, state) {
|
|
23763
|
+
var arr = data === null || data === void 0 ? void 0 : data.map(function (v) {
|
|
23764
|
+
return {
|
|
23765
|
+
resourcetype: v === null || v === void 0 ? void 0 : v.resourcetype,
|
|
23766
|
+
resourcerole: v === null || v === void 0 ? void 0 : v.resourcerole,
|
|
23767
|
+
resourcedepartment: v === null || v === void 0 ? void 0 : v.resourcedepartment,
|
|
23768
|
+
resourcename: v === null || v === void 0 ? void 0 : v.resourcename
|
|
23769
|
+
};
|
|
23770
|
+
});
|
|
23771
|
+
return arr;
|
|
23772
|
+
};
|
|
23773
|
+
var generateObservation = function generateObservation(data) {
|
|
23774
|
+
var arr = data === null || data === void 0 ? void 0 : data.map(function (v) {
|
|
23775
|
+
var _v$Sequence, _v$ismandatory, _v$vitalcode;
|
|
23776
|
+
return {
|
|
23777
|
+
sequence: (_v$Sequence = v === null || v === void 0 ? void 0 : v.Sequence) !== null && _v$Sequence !== void 0 ? _v$Sequence : "",
|
|
23778
|
+
mandatory: (_v$ismandatory = v === null || v === void 0 ? void 0 : v.ismandatory) !== null && _v$ismandatory !== void 0 ? _v$ismandatory : "",
|
|
23779
|
+
vitalcode: (_v$vitalcode = v === null || v === void 0 ? void 0 : v.vitalcode) !== null && _v$vitalcode !== void 0 ? _v$vitalcode : ""
|
|
23612
23780
|
};
|
|
23613
23781
|
});
|
|
23614
23782
|
return arr;
|
|
@@ -23667,15 +23835,9 @@ var generateInstruction = function generateInstruction(data, state) {
|
|
|
23667
23835
|
|
|
23668
23836
|
var instructionArr = obj === null || obj === void 0 ? void 0 : (_obj$Instruction = obj.Instruction) === null || _obj$Instruction === void 0 ? void 0 : (_obj$Instruction$data = _obj$Instruction.data) === null || _obj$Instruction$data === void 0 ? void 0 : _obj$Instruction$data.map(function (v) {
|
|
23669
23837
|
return {
|
|
23670
|
-
encounterType: v.encountertype ?
|
|
23671
|
-
|
|
23672
|
-
|
|
23673
|
-
gender: v.gendercode ? state.order_catalog_masters.data.gender.find(function (sys) {
|
|
23674
|
-
return v.gendercode.indexOf(sys.value) > -1;
|
|
23675
|
-
}) : null,
|
|
23676
|
-
ageRange: v.agegroup ? state.order_catalog_masters.data.ageGroup.find(function (sys) {
|
|
23677
|
-
return v.agegroup.indexOf(sys.value) > -1;
|
|
23678
|
-
}) : null,
|
|
23838
|
+
encounterType: v.encountertype ? v.encountertype : null,
|
|
23839
|
+
gender: v.gendercode ? v.gendercode : null,
|
|
23840
|
+
ageRange: v.agegroup ? v.agegroup : null,
|
|
23679
23841
|
agecategory: v.agecatgcode.map(function (v) {
|
|
23680
23842
|
return {
|
|
23681
23843
|
label: "",
|
|
@@ -23738,15 +23900,9 @@ var generateFrequency = function generateFrequency(data, state) {
|
|
|
23738
23900
|
var frequency = [];
|
|
23739
23901
|
frequency = obj === null || obj === void 0 ? void 0 : (_obj$DefaultValues = obj.DefaultValues) === null || _obj$DefaultValues === void 0 ? void 0 : (_obj$DefaultValues$da = _obj$DefaultValues.data) === null || _obj$DefaultValues$da === void 0 ? void 0 : _obj$DefaultValues$da.map(function (v) {
|
|
23740
23902
|
return {
|
|
23741
|
-
encounterType: v.encountertype ?
|
|
23742
|
-
|
|
23743
|
-
|
|
23744
|
-
gender: v.gendercode ? state.order_catalog_masters.data.gender.find(function (sys) {
|
|
23745
|
-
return v.gendercode.indexOf(sys.value) > -1;
|
|
23746
|
-
}) : null,
|
|
23747
|
-
ageRange: v.agegroup ? state.order_catalog_masters.data.ageGroup.find(function (sys) {
|
|
23748
|
-
return v.agegroup.indexOf(sys.value) > -1;
|
|
23749
|
-
}) : null,
|
|
23903
|
+
encounterType: v.encountertype ? v.encountertype : null,
|
|
23904
|
+
gender: v.gendercode ? v.gendercode : null,
|
|
23905
|
+
ageRange: v.agegroup ? v.agegroup : null,
|
|
23750
23906
|
agecategory: v.agecatgcode.map(function (v) {
|
|
23751
23907
|
return {
|
|
23752
23908
|
label: "",
|
|
@@ -23754,17 +23910,11 @@ var generateFrequency = function generateFrequency(data, state) {
|
|
|
23754
23910
|
};
|
|
23755
23911
|
}),
|
|
23756
23912
|
freqvalue: v.dfltfreqValue,
|
|
23757
|
-
freqValSelect: v.dfltfreqValueUnit ?
|
|
23758
|
-
return v.dfltfreqValueUnit.indexOf(sys.value) > -1;
|
|
23759
|
-
}) : null,
|
|
23913
|
+
freqValSelect: v.dfltfreqValueUnit ? v.dfltfreqValueUnit : null,
|
|
23760
23914
|
freqrate: v.dfltfreqRate,
|
|
23761
|
-
freqRatSelect: v.dfltfreqRateUnit ?
|
|
23762
|
-
return v.dfltfreqRateUnit.indexOf(sys.value) > -1;
|
|
23763
|
-
}) : null,
|
|
23915
|
+
freqRatSelect: v.dfltfreqRateUnit ? v.dfltfreqRateUnit : null,
|
|
23764
23916
|
freqdura: v.dfltduration,
|
|
23765
|
-
freqDuraSelect: v.dfltdurationType ?
|
|
23766
|
-
return v.dfltdurationType.indexOf(sys.value) > -1;
|
|
23767
|
-
}) : null,
|
|
23917
|
+
freqDuraSelect: v.dfltdurationType ? v.dfltdurationType : null,
|
|
23768
23918
|
freqmax: v.maxdurnallowedinDays,
|
|
23769
23919
|
_id: v._id
|
|
23770
23920
|
};
|
|
@@ -23774,11 +23924,9 @@ var generateFrequency = function generateFrequency(data, state) {
|
|
|
23774
23924
|
};
|
|
23775
23925
|
var generatefaciltity = function generatefaciltity(data, state) {
|
|
23776
23926
|
var facilityArr = data.map(function (v) {
|
|
23777
|
-
var _v$apptreqd, _v$apptDurnInMinutes;
|
|
23927
|
+
var _v$apptreqd, _v$apptDurnInMinutes, _v$billnature;
|
|
23778
23928
|
return {
|
|
23779
|
-
entity_type: v.perfOrganizationEntity && v.perfOrganizationEntity._id ?
|
|
23780
|
-
return v.perfOrganizationEntity._id.indexOf(sys.value) > -1;
|
|
23781
|
-
}) : null,
|
|
23929
|
+
entity_type: v.perfOrganizationEntity && v.perfOrganizationEntity._id ? v.perfOrganizationEntity : null,
|
|
23782
23930
|
// entity_name: v.perforganizationId
|
|
23783
23931
|
// ? state.order_catalog_masters.data.entitytName.find(
|
|
23784
23932
|
// (sys) => v.perforganizationId._id.indexOf(sys.value) > -1
|
|
@@ -23790,8 +23938,9 @@ var generatefaciltity = function generatefaciltity(data, state) {
|
|
|
23790
23938
|
} : null,
|
|
23791
23939
|
appointment: (_v$apptreqd = v === null || v === void 0 ? void 0 : v.apptreqd) !== null && _v$apptreqd !== void 0 ? _v$apptreqd : false,
|
|
23792
23940
|
duration: (_v$apptDurnInMinutes = v === null || v === void 0 ? void 0 : v.apptDurnInMinutes) !== null && _v$apptDurnInMinutes !== void 0 ? _v$apptDurnInMinutes : "",
|
|
23793
|
-
|
|
23794
|
-
|
|
23941
|
+
bill_nature: (_v$billnature = v === null || v === void 0 ? void 0 : v.billnature) !== null && _v$billnature !== void 0 ? _v$billnature : "",
|
|
23942
|
+
effective_from: v !== null && v !== void 0 && v.EffFrDate ? new Date(utcTOLocal(v.EffFrDate)).toLocaleDateString('en-GB') : "",
|
|
23943
|
+
effective_to: v !== null && v !== void 0 && v.EffToDate ? new Date(utcTOLocal(v.EffToDate)).toLocaleDateString('en-GB') : ""
|
|
23795
23944
|
};
|
|
23796
23945
|
});
|
|
23797
23946
|
return facilityArr;
|
|
@@ -23864,33 +24013,39 @@ var loopMasters$5 = function loopMasters() {
|
|
|
23864
24013
|
if (value.coding[0] !== null) {
|
|
23865
24014
|
arr.push({
|
|
23866
24015
|
label: value.coding[0].display,
|
|
23867
|
-
value: value.coding[0]._id
|
|
24016
|
+
value: value.coding[0]._id,
|
|
24017
|
+
_id: value.coding[0]._id
|
|
23868
24018
|
});
|
|
23869
24019
|
}
|
|
23870
24020
|
} else if ("orderCategory" === val.name) {
|
|
23871
24021
|
arr.push({
|
|
23872
24022
|
label: value.ordercategory,
|
|
23873
|
-
value: value._id
|
|
24023
|
+
value: value._id,
|
|
24024
|
+
_id: value._id
|
|
23874
24025
|
});
|
|
23875
24026
|
} else if ("orderType" === val.name) {
|
|
23876
24027
|
arr.push({
|
|
23877
24028
|
label: value.ordertype,
|
|
23878
|
-
value: value._id
|
|
24029
|
+
value: value._id,
|
|
24030
|
+
_id: value._id
|
|
23879
24031
|
});
|
|
23880
24032
|
} else if ("healthService" === val.name) {
|
|
23881
24033
|
arr.push({
|
|
23882
24034
|
label: value.name,
|
|
23883
|
-
value: value._id
|
|
24035
|
+
value: value._id,
|
|
24036
|
+
_id: value._id
|
|
23884
24037
|
});
|
|
23885
24038
|
} else if ("entitytName" === val.name) {
|
|
23886
24039
|
arr.push({
|
|
23887
24040
|
label: value.name,
|
|
23888
|
-
value: value._id
|
|
24041
|
+
value: value._id,
|
|
24042
|
+
_id: value._id
|
|
23889
24043
|
});
|
|
23890
24044
|
} else if ("ageGroup" === val.name) {
|
|
23891
24045
|
arr.push({
|
|
23892
24046
|
label: value.agerangecode,
|
|
23893
|
-
value: value._id
|
|
24047
|
+
value: value._id,
|
|
24048
|
+
_id: value._id
|
|
23894
24049
|
});
|
|
23895
24050
|
} else if ("attrcode" === val.name) {
|
|
23896
24051
|
var _value$AttribValidVal;
|
|
@@ -23991,170 +24146,167 @@ var ORDER_CATALOG_MASTERS = createAsyncThunk("orderCatalogApiSlice/order_catalog
|
|
|
23991
24146
|
}
|
|
23992
24147
|
}, _callee4, null, [[2, 10]]);
|
|
23993
24148
|
})));
|
|
23994
|
-
var
|
|
23995
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(payload, _ref6) {
|
|
23996
|
-
var rejectWithValue, _data$, _data$$GRPORIND, _data$$GRPORIND$Value, body, data, arry;
|
|
23997
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
23998
|
-
while (1) {
|
|
23999
|
-
switch (_context5.prev = _context5.next) {
|
|
24000
|
-
case 0:
|
|
24001
|
-
rejectWithValue = _ref6.rejectWithValue;
|
|
24002
|
-
_context5.prev = 1;
|
|
24003
|
-
// const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
|
|
24004
|
-
body = {
|
|
24005
|
-
"db_name": dbName$1,
|
|
24006
|
-
"filter": {
|
|
24007
|
-
"type": ["GRPORIND"],
|
|
24008
|
-
"tenantid": "",
|
|
24009
|
-
"facilityid": "",
|
|
24010
|
-
"lang": ""
|
|
24011
|
-
},
|
|
24012
|
-
"queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
|
|
24013
|
-
};
|
|
24014
|
-
_context5.next = 5;
|
|
24015
|
-
return fetchData({
|
|
24016
|
-
body: JSON.stringify(body)
|
|
24017
|
-
}, __baseUrl__$1);
|
|
24018
|
-
case 5:
|
|
24019
|
-
data = _context5.sent;
|
|
24020
|
-
arry = [];
|
|
24021
|
-
(_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$GRPORIND = _data$.GRPORIND) === null || _data$$GRPORIND === void 0 ? void 0 : (_data$$GRPORIND$Value = _data$$GRPORIND.Value) === null || _data$$GRPORIND$Value === void 0 ? void 0 : _data$$GRPORIND$Value.map(function (item) {
|
|
24022
|
-
return arry.push({
|
|
24023
|
-
_id: item._id,
|
|
24024
|
-
value: item._id,
|
|
24025
|
-
label: item.display
|
|
24026
|
-
});
|
|
24027
|
-
});
|
|
24028
|
-
return _context5.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24029
|
-
data: arry
|
|
24030
|
-
}));
|
|
24031
|
-
case 11:
|
|
24032
|
-
_context5.prev = 11;
|
|
24033
|
-
_context5.t0 = _context5["catch"](1);
|
|
24034
|
-
return _context5.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24035
|
-
message: _context5.t0.message
|
|
24036
|
-
})));
|
|
24037
|
-
case 14:
|
|
24038
|
-
case "end":
|
|
24039
|
-
return _context5.stop();
|
|
24040
|
-
}
|
|
24041
|
-
}
|
|
24042
|
-
}, _callee5, null, [[1, 11]]);
|
|
24043
|
-
}));
|
|
24044
|
-
return function (_x6, _x7) {
|
|
24045
|
-
return _ref7.apply(this, arguments);
|
|
24046
|
-
};
|
|
24047
|
-
}());
|
|
24048
|
-
var ORDER_CATALOG_SERVICEITEM = createAsyncThunk("orderCatalogApiSlice/order_catalog_serviceItem", /*#__PURE__*/function () {
|
|
24049
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(payload, _ref8) {
|
|
24050
|
-
var rejectWithValue, _data$2, _data$2$ORDERITEMSERV, _data$2$ORDERITEMSERV2, body, data, arry;
|
|
24051
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
24052
|
-
while (1) {
|
|
24053
|
-
switch (_context6.prev = _context6.next) {
|
|
24054
|
-
case 0:
|
|
24055
|
-
rejectWithValue = _ref8.rejectWithValue;
|
|
24056
|
-
_context6.prev = 1;
|
|
24057
|
-
// const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
|
|
24058
|
-
body = {
|
|
24059
|
-
"db_name": dbName$1,
|
|
24060
|
-
"filter": {
|
|
24061
|
-
"type": ["ORDERITEMSERVICE"],
|
|
24062
|
-
"tenantid": "",
|
|
24063
|
-
"facilityid": "",
|
|
24064
|
-
"lang": ""
|
|
24065
|
-
},
|
|
24066
|
-
"queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
|
|
24067
|
-
};
|
|
24068
|
-
_context6.next = 5;
|
|
24069
|
-
return fetchData({
|
|
24070
|
-
body: JSON.stringify(body)
|
|
24071
|
-
}, __baseUrl__$1);
|
|
24072
|
-
case 5:
|
|
24073
|
-
data = _context6.sent;
|
|
24074
|
-
arry = [];
|
|
24075
|
-
(_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$ORDERITEMSERV = _data$2.ORDERITEMSERVICE) === null || _data$2$ORDERITEMSERV === void 0 ? void 0 : (_data$2$ORDERITEMSERV2 = _data$2$ORDERITEMSERV.Value) === null || _data$2$ORDERITEMSERV2 === void 0 ? void 0 : _data$2$ORDERITEMSERV2.map(function (item) {
|
|
24076
|
-
return arry.push({
|
|
24077
|
-
_id: item._id,
|
|
24078
|
-
value: item._id,
|
|
24079
|
-
label: item.display
|
|
24080
|
-
});
|
|
24081
|
-
});
|
|
24082
|
-
return _context6.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24083
|
-
data: arry
|
|
24084
|
-
}));
|
|
24085
|
-
case 11:
|
|
24086
|
-
_context6.prev = 11;
|
|
24087
|
-
_context6.t0 = _context6["catch"](1);
|
|
24088
|
-
return _context6.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24089
|
-
message: _context6.t0.message
|
|
24090
|
-
})));
|
|
24091
|
-
case 14:
|
|
24092
|
-
case "end":
|
|
24093
|
-
return _context6.stop();
|
|
24094
|
-
}
|
|
24095
|
-
}
|
|
24096
|
-
}, _callee6, null, [[1, 11]]);
|
|
24097
|
-
}));
|
|
24098
|
-
return function (_x8, _x9) {
|
|
24099
|
-
return _ref9.apply(this, arguments);
|
|
24100
|
-
};
|
|
24101
|
-
}());
|
|
24102
|
-
var ENTITY_NAME_DATA = createAsyncThunk("orderCatalogApiSlice/entity_name_data", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
24149
|
+
var ORDER_CATALOG_CODING_MASTERS = createAsyncThunk("orderCatalogApiSlice/order_catalog_coding_masters", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
24103
24150
|
var payload,
|
|
24104
|
-
|
|
24151
|
+
_ref7,
|
|
24105
24152
|
rejectWithValue,
|
|
24106
|
-
|
|
24107
|
-
queriesjson,
|
|
24153
|
+
body,
|
|
24108
24154
|
data,
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
24155
|
+
_args5 = arguments;
|
|
24156
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
24112
24157
|
while (1) {
|
|
24113
|
-
switch (
|
|
24158
|
+
switch (_context5.prev = _context5.next) {
|
|
24114
24159
|
case 0:
|
|
24115
|
-
payload =
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
|
|
24160
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
24161
|
+
_ref7 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
|
|
24162
|
+
_context5.prev = 2;
|
|
24163
|
+
payload.type;
|
|
24164
|
+
body = {
|
|
24165
|
+
"db_name": dbName$1,
|
|
24166
|
+
"filter": {
|
|
24167
|
+
"type": payload,
|
|
24168
|
+
"tenantid": "",
|
|
24169
|
+
"facilityid": "",
|
|
24170
|
+
"lang": ""
|
|
24171
|
+
},
|
|
24172
|
+
"queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
|
|
24173
|
+
};
|
|
24174
|
+
_context5.next = 7;
|
|
24122
24175
|
return fetchData({
|
|
24123
|
-
body: JSON.stringify(
|
|
24124
|
-
},
|
|
24125
|
-
case
|
|
24126
|
-
data =
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
arry.push({
|
|
24130
|
-
label: val.name,
|
|
24131
|
-
value: val._id
|
|
24132
|
-
});
|
|
24133
|
-
});
|
|
24134
|
-
return _context7.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24135
|
-
data: arry
|
|
24176
|
+
body: JSON.stringify(body)
|
|
24177
|
+
}, __baseUrl__$1);
|
|
24178
|
+
case 7:
|
|
24179
|
+
data = _context5.sent;
|
|
24180
|
+
return _context5.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24181
|
+
data: data
|
|
24136
24182
|
}));
|
|
24137
|
-
case
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
return
|
|
24141
|
-
message:
|
|
24183
|
+
case 11:
|
|
24184
|
+
_context5.prev = 11;
|
|
24185
|
+
_context5.t0 = _context5["catch"](2);
|
|
24186
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24187
|
+
message: _context5.t0.message
|
|
24142
24188
|
})));
|
|
24143
|
-
case
|
|
24189
|
+
case 14:
|
|
24190
|
+
case "end":
|
|
24191
|
+
return _context5.stop();
|
|
24192
|
+
}
|
|
24193
|
+
}
|
|
24194
|
+
}, _callee5, null, [[2, 11]]);
|
|
24195
|
+
})));
|
|
24196
|
+
var ORDER_CATALOG_ATTRCODE = createAsyncThunk("orderCatalogApiSlice/order_catalog_attrcode", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
24197
|
+
var payload,
|
|
24198
|
+
_ref9,
|
|
24199
|
+
rejectWithValue,
|
|
24200
|
+
body,
|
|
24201
|
+
data,
|
|
24202
|
+
arr,
|
|
24203
|
+
_args6 = arguments;
|
|
24204
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
24205
|
+
while (1) {
|
|
24206
|
+
switch (_context6.prev = _context6.next) {
|
|
24207
|
+
case 0:
|
|
24208
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
24209
|
+
_ref9 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
|
|
24210
|
+
_context6.prev = 2;
|
|
24211
|
+
payload.type;
|
|
24212
|
+
body = {
|
|
24213
|
+
"db_name": dbName$1,
|
|
24214
|
+
"queryid": "def95574-656e-40c7-928e-b544f2b2f801"
|
|
24215
|
+
};
|
|
24216
|
+
_context6.next = 7;
|
|
24217
|
+
return fetchData({
|
|
24218
|
+
body: JSON.stringify(body)
|
|
24219
|
+
}, __baseUrl__$1);
|
|
24220
|
+
case 7:
|
|
24221
|
+
data = _context6.sent;
|
|
24222
|
+
arr = [];
|
|
24223
|
+
data.map(function (value) {
|
|
24224
|
+
var _value$AttribValidVal2;
|
|
24225
|
+
arr.push({
|
|
24226
|
+
label: value.attribcode,
|
|
24227
|
+
value: value._id,
|
|
24228
|
+
name: value.attriblabel,
|
|
24229
|
+
type: value.attribtype,
|
|
24230
|
+
AttribValidValues: ((_value$AttribValidVal2 = value.AttribValidValues) === null || _value$AttribValidVal2 === void 0 ? void 0 : _value$AttribValidVal2.length) > 0 && value.AttribValidValues.map(function (v) {
|
|
24231
|
+
return {
|
|
24232
|
+
label: v.validCode,
|
|
24233
|
+
Dfltflag: v.Dfltflag
|
|
24234
|
+
};
|
|
24235
|
+
})
|
|
24236
|
+
});
|
|
24237
|
+
});
|
|
24238
|
+
return _context6.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24239
|
+
data: arr
|
|
24240
|
+
}));
|
|
24241
|
+
case 13:
|
|
24242
|
+
_context6.prev = 13;
|
|
24243
|
+
_context6.t0 = _context6["catch"](2);
|
|
24244
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24245
|
+
message: _context6.t0.message
|
|
24246
|
+
})));
|
|
24247
|
+
case 16:
|
|
24248
|
+
case "end":
|
|
24249
|
+
return _context6.stop();
|
|
24250
|
+
}
|
|
24251
|
+
}
|
|
24252
|
+
}, _callee6, null, [[2, 13]]);
|
|
24253
|
+
})));
|
|
24254
|
+
var ORDER_CATALOG_AGEGROUP = createAsyncThunk("orderCatalogApiSlice/order_catalog_agegroup", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
24255
|
+
var payload,
|
|
24256
|
+
_ref11,
|
|
24257
|
+
rejectWithValue,
|
|
24258
|
+
body,
|
|
24259
|
+
data,
|
|
24260
|
+
arr,
|
|
24261
|
+
_args7 = arguments;
|
|
24262
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
24263
|
+
while (1) {
|
|
24264
|
+
switch (_context7.prev = _context7.next) {
|
|
24265
|
+
case 0:
|
|
24266
|
+
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
24267
|
+
_ref11 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
|
|
24268
|
+
_context7.prev = 2;
|
|
24269
|
+
payload.type;
|
|
24270
|
+
body = {
|
|
24271
|
+
"db_name": dbName$1,
|
|
24272
|
+
"queryid": "869e5895-b0e0-4657-ad31-6ed02294f691"
|
|
24273
|
+
};
|
|
24274
|
+
_context7.next = 7;
|
|
24275
|
+
return fetchData({
|
|
24276
|
+
body: JSON.stringify(body)
|
|
24277
|
+
}, __baseUrl__$1);
|
|
24278
|
+
case 7:
|
|
24279
|
+
data = _context7.sent;
|
|
24280
|
+
arr = [];
|
|
24281
|
+
data.map(function (value) {
|
|
24282
|
+
arr.push({
|
|
24283
|
+
label: value.agerangecode,
|
|
24284
|
+
value: value._id
|
|
24285
|
+
});
|
|
24286
|
+
});
|
|
24287
|
+
return _context7.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24288
|
+
data: arr
|
|
24289
|
+
}));
|
|
24290
|
+
case 13:
|
|
24291
|
+
_context7.prev = 13;
|
|
24292
|
+
_context7.t0 = _context7["catch"](2);
|
|
24293
|
+
return _context7.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24294
|
+
message: _context7.t0.message
|
|
24295
|
+
})));
|
|
24296
|
+
case 16:
|
|
24144
24297
|
case "end":
|
|
24145
24298
|
return _context7.stop();
|
|
24146
24299
|
}
|
|
24147
24300
|
}
|
|
24148
|
-
}, _callee7, null, [[2,
|
|
24301
|
+
}, _callee7, null, [[2, 13]]);
|
|
24149
24302
|
})));
|
|
24150
|
-
var
|
|
24303
|
+
var ORDER_CATALOG_ORDERCATEGORY = createAsyncThunk("orderCatalogApiSlice/order_catalog_orderCategory", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
24151
24304
|
var payload,
|
|
24152
24305
|
_ref13,
|
|
24153
24306
|
rejectWithValue,
|
|
24154
|
-
|
|
24155
|
-
queriesjson,
|
|
24307
|
+
body,
|
|
24156
24308
|
data,
|
|
24157
|
-
|
|
24309
|
+
arr,
|
|
24158
24310
|
_args8 = arguments;
|
|
24159
24311
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
24160
24312
|
while (1) {
|
|
@@ -24163,60 +24315,271 @@ var ORDER_TYPE_DATA = createAsyncThunk("orderCatalogApiSlice/order_type_data", /
|
|
|
24163
24315
|
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
24164
24316
|
_ref13 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref13.rejectWithValue;
|
|
24165
24317
|
_context8.prev = 2;
|
|
24318
|
+
payload.type;
|
|
24319
|
+
body = {
|
|
24320
|
+
"db_name": dbName$1,
|
|
24321
|
+
"queryid": "df53fb0d-dd4c-4e65-9067-f5917563625b"
|
|
24322
|
+
};
|
|
24323
|
+
_context8.next = 7;
|
|
24324
|
+
return fetchData({
|
|
24325
|
+
body: JSON.stringify(body)
|
|
24326
|
+
}, __baseUrl__$1);
|
|
24327
|
+
case 7:
|
|
24328
|
+
data = _context8.sent;
|
|
24329
|
+
arr = [];
|
|
24330
|
+
data.map(function (value) {
|
|
24331
|
+
arr.push({
|
|
24332
|
+
label: value.ordercategory,
|
|
24333
|
+
value: value._id
|
|
24334
|
+
});
|
|
24335
|
+
});
|
|
24336
|
+
return _context8.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24337
|
+
data: arr
|
|
24338
|
+
}));
|
|
24339
|
+
case 13:
|
|
24340
|
+
_context8.prev = 13;
|
|
24341
|
+
_context8.t0 = _context8["catch"](2);
|
|
24342
|
+
return _context8.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24343
|
+
message: _context8.t0.message
|
|
24344
|
+
})));
|
|
24345
|
+
case 16:
|
|
24346
|
+
case "end":
|
|
24347
|
+
return _context8.stop();
|
|
24348
|
+
}
|
|
24349
|
+
}
|
|
24350
|
+
}, _callee8, null, [[2, 13]]);
|
|
24351
|
+
})));
|
|
24352
|
+
var ORDER_CATALOG_GRPORIND = createAsyncThunk("orderCatalogApiSlice/order_catalog_grporind", /*#__PURE__*/function () {
|
|
24353
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(payload, _ref14) {
|
|
24354
|
+
var rejectWithValue, _data$, _data$$GRPORIND, _data$$GRPORIND$Value, body, data, arry;
|
|
24355
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
24356
|
+
while (1) {
|
|
24357
|
+
switch (_context9.prev = _context9.next) {
|
|
24358
|
+
case 0:
|
|
24359
|
+
rejectWithValue = _ref14.rejectWithValue;
|
|
24360
|
+
_context9.prev = 1;
|
|
24361
|
+
// const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
|
|
24362
|
+
body = {
|
|
24363
|
+
"db_name": dbName$1,
|
|
24364
|
+
"filter": {
|
|
24365
|
+
"type": ["GRPORIND"],
|
|
24366
|
+
"tenantid": "",
|
|
24367
|
+
"facilityid": "",
|
|
24368
|
+
"lang": ""
|
|
24369
|
+
},
|
|
24370
|
+
"queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
|
|
24371
|
+
};
|
|
24372
|
+
_context9.next = 5;
|
|
24373
|
+
return fetchData({
|
|
24374
|
+
body: JSON.stringify(body)
|
|
24375
|
+
}, __baseUrl__$1);
|
|
24376
|
+
case 5:
|
|
24377
|
+
data = _context9.sent;
|
|
24378
|
+
arry = [];
|
|
24379
|
+
(_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$GRPORIND = _data$.GRPORIND) === null || _data$$GRPORIND === void 0 ? void 0 : (_data$$GRPORIND$Value = _data$$GRPORIND.Value) === null || _data$$GRPORIND$Value === void 0 ? void 0 : _data$$GRPORIND$Value.map(function (item) {
|
|
24380
|
+
return arry.push({
|
|
24381
|
+
_id: item._id,
|
|
24382
|
+
value: item._id,
|
|
24383
|
+
label: item.display
|
|
24384
|
+
});
|
|
24385
|
+
});
|
|
24386
|
+
return _context9.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24387
|
+
data: arry
|
|
24388
|
+
}));
|
|
24389
|
+
case 11:
|
|
24390
|
+
_context9.prev = 11;
|
|
24391
|
+
_context9.t0 = _context9["catch"](1);
|
|
24392
|
+
return _context9.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24393
|
+
message: _context9.t0.message
|
|
24394
|
+
})));
|
|
24395
|
+
case 14:
|
|
24396
|
+
case "end":
|
|
24397
|
+
return _context9.stop();
|
|
24398
|
+
}
|
|
24399
|
+
}
|
|
24400
|
+
}, _callee9, null, [[1, 11]]);
|
|
24401
|
+
}));
|
|
24402
|
+
return function (_x6, _x7) {
|
|
24403
|
+
return _ref15.apply(this, arguments);
|
|
24404
|
+
};
|
|
24405
|
+
}());
|
|
24406
|
+
var ORDER_CATALOG_SERVICEITEM = createAsyncThunk("orderCatalogApiSlice/order_catalog_serviceItem", /*#__PURE__*/function () {
|
|
24407
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(payload, _ref16) {
|
|
24408
|
+
var rejectWithValue, _data$2, _data$2$ORDERITEMSERV, _data$2$ORDERITEMSERV2, body, data, arry;
|
|
24409
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
24410
|
+
while (1) {
|
|
24411
|
+
switch (_context10.prev = _context10.next) {
|
|
24412
|
+
case 0:
|
|
24413
|
+
rejectWithValue = _ref16.rejectWithValue;
|
|
24414
|
+
_context10.prev = 1;
|
|
24415
|
+
// const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
|
|
24416
|
+
body = {
|
|
24417
|
+
"db_name": dbName$1,
|
|
24418
|
+
"filter": {
|
|
24419
|
+
"type": ["ORDERITEMSERVICE"],
|
|
24420
|
+
"tenantid": "",
|
|
24421
|
+
"facilityid": "",
|
|
24422
|
+
"lang": ""
|
|
24423
|
+
},
|
|
24424
|
+
"queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
|
|
24425
|
+
};
|
|
24426
|
+
_context10.next = 5;
|
|
24427
|
+
return fetchData({
|
|
24428
|
+
body: JSON.stringify(body)
|
|
24429
|
+
}, __baseUrl__$1);
|
|
24430
|
+
case 5:
|
|
24431
|
+
data = _context10.sent;
|
|
24432
|
+
arry = [];
|
|
24433
|
+
(_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$ORDERITEMSERV = _data$2.ORDERITEMSERVICE) === null || _data$2$ORDERITEMSERV === void 0 ? void 0 : (_data$2$ORDERITEMSERV2 = _data$2$ORDERITEMSERV.Value) === null || _data$2$ORDERITEMSERV2 === void 0 ? void 0 : _data$2$ORDERITEMSERV2.map(function (item) {
|
|
24434
|
+
return arry.push({
|
|
24435
|
+
_id: item._id,
|
|
24436
|
+
value: item._id,
|
|
24437
|
+
label: item.display
|
|
24438
|
+
});
|
|
24439
|
+
});
|
|
24440
|
+
return _context10.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24441
|
+
data: arry
|
|
24442
|
+
}));
|
|
24443
|
+
case 11:
|
|
24444
|
+
_context10.prev = 11;
|
|
24445
|
+
_context10.t0 = _context10["catch"](1);
|
|
24446
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24447
|
+
message: _context10.t0.message
|
|
24448
|
+
})));
|
|
24449
|
+
case 14:
|
|
24450
|
+
case "end":
|
|
24451
|
+
return _context10.stop();
|
|
24452
|
+
}
|
|
24453
|
+
}
|
|
24454
|
+
}, _callee10, null, [[1, 11]]);
|
|
24455
|
+
}));
|
|
24456
|
+
return function (_x8, _x9) {
|
|
24457
|
+
return _ref17.apply(this, arguments);
|
|
24458
|
+
};
|
|
24459
|
+
}());
|
|
24460
|
+
var ENTITY_NAME_DATA = createAsyncThunk("orderCatalogApiSlice/entity_name_data", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
24461
|
+
var payload,
|
|
24462
|
+
_ref19,
|
|
24463
|
+
rejectWithValue,
|
|
24464
|
+
type,
|
|
24465
|
+
queriesjson,
|
|
24466
|
+
data,
|
|
24467
|
+
arry,
|
|
24468
|
+
_args11 = arguments;
|
|
24469
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
24470
|
+
while (1) {
|
|
24471
|
+
switch (_context11.prev = _context11.next) {
|
|
24472
|
+
case 0:
|
|
24473
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
24474
|
+
_ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
|
|
24475
|
+
_context11.prev = 2;
|
|
24476
|
+
type = payload.type;
|
|
24477
|
+
queriesjson = Query.entityTypeName(type); // let payloadData= {
|
|
24478
|
+
// "db_name": dbName,
|
|
24479
|
+
// "filter": {
|
|
24480
|
+
// "Orgname":type
|
|
24481
|
+
// },
|
|
24482
|
+
// "queryid": "b0931347-d3eb-4627-b799-cc701cb8f6c9"
|
|
24483
|
+
// }
|
|
24484
|
+
_context11.next = 7;
|
|
24485
|
+
return fetchData({
|
|
24486
|
+
body: JSON.stringify(queriesjson)
|
|
24487
|
+
}, __baseUrl__$1);
|
|
24488
|
+
case 7:
|
|
24489
|
+
data = _context11.sent;
|
|
24490
|
+
arry = [];
|
|
24491
|
+
data.map(function (val) {
|
|
24492
|
+
arry.push({
|
|
24493
|
+
label: val.name,
|
|
24494
|
+
value: val._id,
|
|
24495
|
+
_id: val._id
|
|
24496
|
+
});
|
|
24497
|
+
});
|
|
24498
|
+
return _context11.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24499
|
+
data: arry
|
|
24500
|
+
}));
|
|
24501
|
+
case 13:
|
|
24502
|
+
_context11.prev = 13;
|
|
24503
|
+
_context11.t0 = _context11["catch"](2);
|
|
24504
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24505
|
+
message: _context11.t0.message
|
|
24506
|
+
})));
|
|
24507
|
+
case 16:
|
|
24508
|
+
case "end":
|
|
24509
|
+
return _context11.stop();
|
|
24510
|
+
}
|
|
24511
|
+
}
|
|
24512
|
+
}, _callee11, null, [[2, 13]]);
|
|
24513
|
+
})));
|
|
24514
|
+
var ORDER_TYPE_DATA = createAsyncThunk("orderCatalogApiSlice/order_type_data", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
24515
|
+
var payload,
|
|
24516
|
+
_ref21,
|
|
24517
|
+
rejectWithValue,
|
|
24518
|
+
type,
|
|
24519
|
+
queriesjson,
|
|
24520
|
+
data,
|
|
24521
|
+
arry,
|
|
24522
|
+
_args12 = arguments;
|
|
24523
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
24524
|
+
while (1) {
|
|
24525
|
+
switch (_context12.prev = _context12.next) {
|
|
24526
|
+
case 0:
|
|
24527
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
24528
|
+
_ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
|
|
24529
|
+
_context12.prev = 2;
|
|
24166
24530
|
type = payload.type;
|
|
24167
|
-
console.log("type", type);
|
|
24168
24531
|
queriesjson = orderTypedata.ordertype(type);
|
|
24169
|
-
|
|
24532
|
+
_context12.next = 7;
|
|
24170
24533
|
return fetchData({
|
|
24171
24534
|
body: JSON.stringify(queriesjson)
|
|
24172
|
-
},
|
|
24173
|
-
case
|
|
24174
|
-
data =
|
|
24535
|
+
}, __baseUrl__$1);
|
|
24536
|
+
case 7:
|
|
24537
|
+
data = _context12.sent;
|
|
24175
24538
|
arry = [];
|
|
24176
|
-
data.
|
|
24539
|
+
data.map(function (val) {
|
|
24177
24540
|
arry.push({
|
|
24178
24541
|
label: val.ordertype,
|
|
24179
24542
|
value: val._id
|
|
24180
24543
|
});
|
|
24181
24544
|
});
|
|
24182
|
-
return
|
|
24545
|
+
return _context12.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24183
24546
|
data: arry
|
|
24184
24547
|
}));
|
|
24185
|
-
case
|
|
24186
|
-
|
|
24187
|
-
|
|
24188
|
-
return
|
|
24189
|
-
message:
|
|
24548
|
+
case 13:
|
|
24549
|
+
_context12.prev = 13;
|
|
24550
|
+
_context12.t0 = _context12["catch"](2);
|
|
24551
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24552
|
+
message: _context12.t0.message
|
|
24190
24553
|
})));
|
|
24191
|
-
case
|
|
24554
|
+
case 16:
|
|
24192
24555
|
case "end":
|
|
24193
|
-
return
|
|
24556
|
+
return _context12.stop();
|
|
24194
24557
|
}
|
|
24195
24558
|
}
|
|
24196
|
-
},
|
|
24559
|
+
}, _callee12, null, [[2, 13]]);
|
|
24197
24560
|
})));
|
|
24198
|
-
var AGE_RANGES_CATEGORY_CATALOG = createAsyncThunk("orderCatalogApiSlice/ageranges_Category", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24561
|
+
var AGE_RANGES_CATEGORY_CATALOG = createAsyncThunk("orderCatalogApiSlice/ageranges_Category", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
24199
24562
|
var payload,
|
|
24200
|
-
|
|
24563
|
+
_ref23,
|
|
24201
24564
|
rejectWithValue,
|
|
24202
24565
|
ageRangeId,
|
|
24203
24566
|
data,
|
|
24204
24567
|
arr,
|
|
24205
|
-
|
|
24206
|
-
return _regeneratorRuntime().wrap(function
|
|
24568
|
+
_args13 = arguments;
|
|
24569
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
24207
24570
|
while (1) {
|
|
24208
|
-
switch (
|
|
24571
|
+
switch (_context13.prev = _context13.next) {
|
|
24209
24572
|
case 0:
|
|
24210
|
-
payload =
|
|
24211
|
-
|
|
24212
|
-
|
|
24573
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
24574
|
+
_ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
|
|
24575
|
+
_context13.prev = 2;
|
|
24213
24576
|
ageRangeId = payload.ageRangeId;
|
|
24214
|
-
|
|
24577
|
+
_context13.next = 6;
|
|
24215
24578
|
return fetchData({
|
|
24216
24579
|
body: JSON.stringify(Query.ageCategory(ageRangeId))
|
|
24217
24580
|
}, __readDocumentUrl__);
|
|
24218
24581
|
case 6:
|
|
24219
|
-
data =
|
|
24582
|
+
data = _context13.sent;
|
|
24220
24583
|
arr = [];
|
|
24221
24584
|
data.result[0].map(function (val) {
|
|
24222
24585
|
arr.push({
|
|
@@ -24226,83 +24589,127 @@ var AGE_RANGES_CATEGORY_CATALOG = createAsyncThunk("orderCatalogApiSlice/agerang
|
|
|
24226
24589
|
maxAge: val.age_maximum
|
|
24227
24590
|
});
|
|
24228
24591
|
});
|
|
24229
|
-
return
|
|
24592
|
+
return _context13.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24230
24593
|
data: arr
|
|
24231
24594
|
}));
|
|
24232
24595
|
case 12:
|
|
24233
|
-
|
|
24234
|
-
|
|
24235
|
-
return
|
|
24236
|
-
message:
|
|
24596
|
+
_context13.prev = 12;
|
|
24597
|
+
_context13.t0 = _context13["catch"](2);
|
|
24598
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24599
|
+
message: _context13.t0.message
|
|
24237
24600
|
})));
|
|
24238
24601
|
case 15:
|
|
24239
24602
|
case "end":
|
|
24240
|
-
return
|
|
24603
|
+
return _context13.stop();
|
|
24241
24604
|
}
|
|
24242
24605
|
}
|
|
24243
|
-
},
|
|
24606
|
+
}, _callee13, null, [[2, 12]]);
|
|
24244
24607
|
})));
|
|
24245
|
-
var
|
|
24608
|
+
var SAVE_RC_CHARGECODE = createAsyncThunk("orderCatalogApiSlice/savercchargecode", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
24246
24609
|
var payload,
|
|
24247
|
-
|
|
24610
|
+
_ref25,
|
|
24248
24611
|
rejectWithValue,
|
|
24249
24612
|
list,
|
|
24250
24613
|
body,
|
|
24251
24614
|
data,
|
|
24252
|
-
|
|
24253
|
-
return _regeneratorRuntime().wrap(function
|
|
24615
|
+
_args14 = arguments;
|
|
24616
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
24254
24617
|
while (1) {
|
|
24255
|
-
switch (
|
|
24618
|
+
switch (_context14.prev = _context14.next) {
|
|
24256
24619
|
case 0:
|
|
24257
|
-
payload =
|
|
24258
|
-
|
|
24259
|
-
|
|
24620
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
24621
|
+
_ref25 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
|
|
24622
|
+
_context14.prev = 2;
|
|
24260
24623
|
list = payload.list;
|
|
24261
|
-
body =
|
|
24262
|
-
|
|
24624
|
+
body = generateSaveChargeCode(list);
|
|
24625
|
+
_context14.next = 7;
|
|
24263
24626
|
return fetchData({
|
|
24264
24627
|
body: JSON.stringify(body)
|
|
24265
24628
|
}, __uspsertUrl__);
|
|
24266
24629
|
case 7:
|
|
24267
|
-
data =
|
|
24268
|
-
return
|
|
24630
|
+
data = _context14.sent;
|
|
24631
|
+
return _context14.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24269
24632
|
data: data
|
|
24270
24633
|
}));
|
|
24271
24634
|
case 11:
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
return
|
|
24275
|
-
message:
|
|
24635
|
+
_context14.prev = 11;
|
|
24636
|
+
_context14.t0 = _context14["catch"](2);
|
|
24637
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24638
|
+
message: _context14.t0.message
|
|
24276
24639
|
})));
|
|
24277
24640
|
case 14:
|
|
24278
24641
|
case "end":
|
|
24279
|
-
return
|
|
24642
|
+
return _context14.stop();
|
|
24280
24643
|
}
|
|
24281
24644
|
}
|
|
24282
|
-
},
|
|
24645
|
+
}, _callee14, null, [[2, 11]]);
|
|
24283
24646
|
})));
|
|
24284
|
-
var
|
|
24647
|
+
var SAVE_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/saveOrderCatalog", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
24285
24648
|
var payload,
|
|
24286
|
-
|
|
24649
|
+
_ref27,
|
|
24650
|
+
rejectWithValue,
|
|
24651
|
+
list,
|
|
24652
|
+
rcchargeCode,
|
|
24653
|
+
body,
|
|
24654
|
+
data,
|
|
24655
|
+
_args15 = arguments;
|
|
24656
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
24657
|
+
while (1) {
|
|
24658
|
+
switch (_context15.prev = _context15.next) {
|
|
24659
|
+
case 0:
|
|
24660
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
24661
|
+
_ref27 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref27.rejectWithValue;
|
|
24662
|
+
_context15.prev = 2;
|
|
24663
|
+
list = payload.list, rcchargeCode = payload.rcchargeCode; // let SaveChargeCode =generateSaveChargeCode(list)
|
|
24664
|
+
// const SaveChargeCodedata = fetchData(
|
|
24665
|
+
// { body: JSON.stringify(SaveChargeCode) },
|
|
24666
|
+
// __uspsertUrl__
|
|
24667
|
+
// );
|
|
24668
|
+
body = generateSaveJSON(list, rcchargeCode);
|
|
24669
|
+
_context15.next = 7;
|
|
24670
|
+
return fetchData({
|
|
24671
|
+
body: JSON.stringify(body)
|
|
24672
|
+
}, __uspsertUrl__);
|
|
24673
|
+
case 7:
|
|
24674
|
+
data = _context15.sent;
|
|
24675
|
+
return _context15.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
|
|
24676
|
+
data: data
|
|
24677
|
+
}));
|
|
24678
|
+
case 11:
|
|
24679
|
+
_context15.prev = 11;
|
|
24680
|
+
_context15.t0 = _context15["catch"](2);
|
|
24681
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24682
|
+
message: _context15.t0.message
|
|
24683
|
+
})));
|
|
24684
|
+
case 14:
|
|
24685
|
+
case "end":
|
|
24686
|
+
return _context15.stop();
|
|
24687
|
+
}
|
|
24688
|
+
}
|
|
24689
|
+
}, _callee15, null, [[2, 11]]);
|
|
24690
|
+
})));
|
|
24691
|
+
var READ_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/orderCatalogRead", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
24692
|
+
var payload,
|
|
24693
|
+
_ref29,
|
|
24287
24694
|
rejectWithValue,
|
|
24288
24695
|
page,
|
|
24289
24696
|
perPage,
|
|
24290
24697
|
search,
|
|
24291
24698
|
data,
|
|
24292
24699
|
res,
|
|
24293
|
-
|
|
24294
|
-
return _regeneratorRuntime().wrap(function
|
|
24700
|
+
_args16 = arguments;
|
|
24701
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
24295
24702
|
while (1) {
|
|
24296
|
-
switch (
|
|
24703
|
+
switch (_context16.prev = _context16.next) {
|
|
24297
24704
|
case 0:
|
|
24298
|
-
payload =
|
|
24299
|
-
|
|
24300
|
-
|
|
24705
|
+
payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
|
|
24706
|
+
_ref29 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref29.rejectWithValue, _ref29.getState;
|
|
24707
|
+
_context16.prev = 2;
|
|
24301
24708
|
// const { encounter_id } = payload;
|
|
24302
24709
|
// let state = getState();
|
|
24303
24710
|
// let ccState = state.DiagnosisMasterSlice;
|
|
24304
24711
|
page = payload.page, perPage = payload.perPage, search = payload.search;
|
|
24305
|
-
|
|
24712
|
+
_context16.next = 6;
|
|
24306
24713
|
return fetchData({
|
|
24307
24714
|
body: JSON.stringify(search ? Query.order_catalog_read_search({
|
|
24308
24715
|
page: page,
|
|
@@ -24312,69 +24719,69 @@ var READ_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/orderCatalogRead
|
|
|
24312
24719
|
page: page,
|
|
24313
24720
|
perPage: perPage
|
|
24314
24721
|
}))
|
|
24315
|
-
},
|
|
24722
|
+
}, __baseUrl__$1);
|
|
24316
24723
|
case 6:
|
|
24317
|
-
data =
|
|
24318
|
-
res = generateResJson(data
|
|
24319
|
-
return
|
|
24724
|
+
data = _context16.sent;
|
|
24725
|
+
res = generateResJson(data);
|
|
24726
|
+
return _context16.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24320
24727
|
data: res
|
|
24321
24728
|
}));
|
|
24322
24729
|
case 11:
|
|
24323
|
-
|
|
24324
|
-
|
|
24325
|
-
return
|
|
24326
|
-
message:
|
|
24730
|
+
_context16.prev = 11;
|
|
24731
|
+
_context16.t0 = _context16["catch"](2);
|
|
24732
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24733
|
+
message: _context16.t0.message
|
|
24327
24734
|
})));
|
|
24328
24735
|
case 14:
|
|
24329
24736
|
case "end":
|
|
24330
|
-
return
|
|
24737
|
+
return _context16.stop();
|
|
24331
24738
|
}
|
|
24332
24739
|
}
|
|
24333
|
-
},
|
|
24740
|
+
}, _callee16, null, [[2, 11]]);
|
|
24334
24741
|
})));
|
|
24335
|
-
var UPDATE_ORDER_CATALOG_STATUS = createAsyncThunk("orderCatalogApiSlice/orderCatalogUpdate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24742
|
+
var UPDATE_ORDER_CATALOG_STATUS = createAsyncThunk("orderCatalogApiSlice/orderCatalogUpdate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
24336
24743
|
var payload,
|
|
24337
|
-
|
|
24744
|
+
_ref31,
|
|
24338
24745
|
rejectWithValue,
|
|
24339
24746
|
editId,
|
|
24340
24747
|
status,
|
|
24341
24748
|
body,
|
|
24342
24749
|
data,
|
|
24343
|
-
|
|
24344
|
-
return _regeneratorRuntime().wrap(function
|
|
24750
|
+
_args17 = arguments;
|
|
24751
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
24345
24752
|
while (1) {
|
|
24346
|
-
switch (
|
|
24753
|
+
switch (_context17.prev = _context17.next) {
|
|
24347
24754
|
case 0:
|
|
24348
|
-
payload =
|
|
24349
|
-
|
|
24350
|
-
|
|
24755
|
+
payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
|
|
24756
|
+
_ref31 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref31.rejectWithValue;
|
|
24757
|
+
_context17.prev = 2;
|
|
24351
24758
|
editId = payload.editId, status = payload.status;
|
|
24352
24759
|
body = generateUpdateJSON(editId, status);
|
|
24353
|
-
|
|
24760
|
+
_context17.next = 7;
|
|
24354
24761
|
return fetchData({
|
|
24355
24762
|
body: JSON.stringify(body)
|
|
24356
24763
|
}, __uspsertUrl__);
|
|
24357
24764
|
case 7:
|
|
24358
|
-
data =
|
|
24359
|
-
return
|
|
24765
|
+
data = _context17.sent;
|
|
24766
|
+
return _context17.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24360
24767
|
data: data
|
|
24361
24768
|
}));
|
|
24362
24769
|
case 11:
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
return
|
|
24366
|
-
message:
|
|
24770
|
+
_context17.prev = 11;
|
|
24771
|
+
_context17.t0 = _context17["catch"](2);
|
|
24772
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24773
|
+
message: _context17.t0.message
|
|
24367
24774
|
})));
|
|
24368
24775
|
case 14:
|
|
24369
24776
|
case "end":
|
|
24370
|
-
return
|
|
24777
|
+
return _context17.stop();
|
|
24371
24778
|
}
|
|
24372
24779
|
}
|
|
24373
|
-
},
|
|
24780
|
+
}, _callee17, null, [[2, 11]]);
|
|
24374
24781
|
})));
|
|
24375
|
-
var EDIT_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/editOrderCatalog", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24782
|
+
var EDIT_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/editOrderCatalog", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
24376
24783
|
var payload,
|
|
24377
|
-
|
|
24784
|
+
_ref33,
|
|
24378
24785
|
rejectWithValue,
|
|
24379
24786
|
getState,
|
|
24380
24787
|
id,
|
|
@@ -24382,76 +24789,77 @@ var EDIT_ORDER_CATALOG = createAsyncThunk("orderCatalogApiSlice/editOrderCatalog
|
|
|
24382
24789
|
ccState,
|
|
24383
24790
|
data,
|
|
24384
24791
|
res,
|
|
24385
|
-
|
|
24386
|
-
return _regeneratorRuntime().wrap(function
|
|
24792
|
+
_args18 = arguments;
|
|
24793
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
24387
24794
|
while (1) {
|
|
24388
|
-
switch (
|
|
24795
|
+
switch (_context18.prev = _context18.next) {
|
|
24389
24796
|
case 0:
|
|
24390
|
-
payload =
|
|
24391
|
-
|
|
24392
|
-
|
|
24797
|
+
payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
|
|
24798
|
+
_ref33 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref33.rejectWithValue, getState = _ref33.getState;
|
|
24799
|
+
_context18.prev = 2;
|
|
24393
24800
|
id = payload.id;
|
|
24394
24801
|
state = getState();
|
|
24395
24802
|
ccState = state.orderCatalogSlice;
|
|
24396
|
-
|
|
24803
|
+
state.resourceByAppointmentTypesSlice;
|
|
24804
|
+
_context18.next = 9;
|
|
24397
24805
|
return fetchData({
|
|
24398
24806
|
body: JSON.stringify(Query.editOrderCatalog(id))
|
|
24399
|
-
},
|
|
24400
|
-
case
|
|
24401
|
-
data =
|
|
24402
|
-
res =
|
|
24403
|
-
return
|
|
24807
|
+
}, __baseUrl__$1);
|
|
24808
|
+
case 9:
|
|
24809
|
+
data = _context18.sent;
|
|
24810
|
+
res = generateReadResJsonData(data[0], ccState);
|
|
24811
|
+
return _context18.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24404
24812
|
data: res
|
|
24405
24813
|
}));
|
|
24406
|
-
case
|
|
24407
|
-
|
|
24408
|
-
|
|
24409
|
-
return
|
|
24410
|
-
message:
|
|
24814
|
+
case 14:
|
|
24815
|
+
_context18.prev = 14;
|
|
24816
|
+
_context18.t0 = _context18["catch"](2);
|
|
24817
|
+
return _context18.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24818
|
+
message: _context18.t0.message
|
|
24411
24819
|
})));
|
|
24412
|
-
case
|
|
24820
|
+
case 17:
|
|
24413
24821
|
case "end":
|
|
24414
|
-
return
|
|
24822
|
+
return _context18.stop();
|
|
24415
24823
|
}
|
|
24416
24824
|
}
|
|
24417
|
-
},
|
|
24825
|
+
}, _callee18, null, [[2, 14]]);
|
|
24418
24826
|
})));
|
|
24419
|
-
var DELETE_ATTRIBUTE_DELETE = createAsyncThunk("orderCatalogApiSlice/attributesDelete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24827
|
+
var DELETE_ATTRIBUTE_DELETE = createAsyncThunk("orderCatalogApiSlice/attributesDelete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
24420
24828
|
var payload,
|
|
24421
|
-
|
|
24829
|
+
_ref35,
|
|
24422
24830
|
rejectWithValue,
|
|
24423
24831
|
id,
|
|
24424
24832
|
data,
|
|
24425
|
-
|
|
24426
|
-
return _regeneratorRuntime().wrap(function
|
|
24833
|
+
_args19 = arguments;
|
|
24834
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
24427
24835
|
while (1) {
|
|
24428
|
-
switch (
|
|
24836
|
+
switch (_context19.prev = _context19.next) {
|
|
24429
24837
|
case 0:
|
|
24430
|
-
payload =
|
|
24431
|
-
|
|
24432
|
-
|
|
24838
|
+
payload = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
|
|
24839
|
+
_ref35 = _args19.length > 1 ? _args19[1] : undefined, rejectWithValue = _ref35.rejectWithValue;
|
|
24840
|
+
_context19.prev = 2;
|
|
24433
24841
|
id = payload.id;
|
|
24434
|
-
|
|
24842
|
+
_context19.next = 6;
|
|
24435
24843
|
return fetchData({
|
|
24436
24844
|
body: JSON.stringify(Query.attributeDelete(id))
|
|
24437
24845
|
}, __softDelete__);
|
|
24438
24846
|
case 6:
|
|
24439
|
-
data =
|
|
24440
|
-
return
|
|
24847
|
+
data = _context19.sent;
|
|
24848
|
+
return _context19.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
|
|
24441
24849
|
data: data.result
|
|
24442
24850
|
}));
|
|
24443
24851
|
case 10:
|
|
24444
|
-
|
|
24445
|
-
|
|
24446
|
-
return
|
|
24447
|
-
message:
|
|
24852
|
+
_context19.prev = 10;
|
|
24853
|
+
_context19.t0 = _context19["catch"](2);
|
|
24854
|
+
return _context19.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
|
|
24855
|
+
message: _context19.t0.message
|
|
24448
24856
|
})));
|
|
24449
24857
|
case 13:
|
|
24450
24858
|
case "end":
|
|
24451
|
-
return
|
|
24859
|
+
return _context19.stop();
|
|
24452
24860
|
}
|
|
24453
24861
|
}
|
|
24454
|
-
},
|
|
24862
|
+
}, _callee19, null, [[2, 10]]);
|
|
24455
24863
|
})));
|
|
24456
24864
|
var orderCatalogSlice = createSlice({
|
|
24457
24865
|
name: "orderCatalogApiSlice",
|
|
@@ -24466,7 +24874,12 @@ var orderCatalogSlice = createSlice({
|
|
|
24466
24874
|
order_type_data: _objectSpread2$1({}, defaultState.List),
|
|
24467
24875
|
entityTypeName: _objectSpread2$1({}, defaultState.List),
|
|
24468
24876
|
order_catalog_grporind: _objectSpread2$1({}, defaultState.List),
|
|
24469
|
-
order_catalog_serviceItem: _objectSpread2$1({}, defaultState.List)
|
|
24877
|
+
order_catalog_serviceItem: _objectSpread2$1({}, defaultState.List),
|
|
24878
|
+
order_catalog_coding_masters: _objectSpread2$1({}, defaultState.List),
|
|
24879
|
+
order_catalog_attrcode: _objectSpread2$1({}, defaultState.List),
|
|
24880
|
+
order_catalog_agegroup: _objectSpread2$1({}, defaultState.List),
|
|
24881
|
+
order_catalog_orderCategory: _objectSpread2$1({}, defaultState.List),
|
|
24882
|
+
savercchargecode: _objectSpread2$1({}, defaultState.List)
|
|
24470
24883
|
},
|
|
24471
24884
|
extraReducers: (_extraReducers$t = {}, _defineProperty(_extraReducers$t, ENTITY_NAME_DATA.fulfilled, function (state, action) {
|
|
24472
24885
|
state.entityTypeName.loading = false, state.entityTypeName.error = false, state.entityTypeName = action.payload;
|
|
@@ -24534,6 +24947,36 @@ var orderCatalogSlice = createSlice({
|
|
|
24534
24947
|
state.order_catalog_serviceItem.loading = true, state.order_catalog_serviceItem.error = false, state.order_catalog_serviceItem.loading = true;
|
|
24535
24948
|
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_SERVICEITEM.rejected, function (state, action) {
|
|
24536
24949
|
state.order_catalog_serviceItem.loading = false, state.order_catalog_serviceItem.error = true, state.order_catalog_serviceItem = action.payload;
|
|
24950
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_CODING_MASTERS.fulfilled, function (state, action) {
|
|
24951
|
+
state.order_catalog_coding_masters.loading = false, state.order_catalog_coding_masters.error = false, state.order_catalog_coding_masters = action.payload;
|
|
24952
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_CODING_MASTERS.pending, function (state, action) {
|
|
24953
|
+
state.order_catalog_coding_masters.loading = true, state.order_catalog_coding_masters.error = false, state.order_catalog_coding_masters.loading = true;
|
|
24954
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_CODING_MASTERS.rejected, function (state, action) {
|
|
24955
|
+
state.order_catalog_coding_masters.loading = false, state.order_catalog_coding_masters.error = true, state.order_catalog_coding_masters = action.payload;
|
|
24956
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_ATTRCODE.fulfilled, function (state, action) {
|
|
24957
|
+
state.order_catalog_attrcode.loading = false, state.order_catalog_attrcode.error = false, state.order_catalog_attrcode = action.payload;
|
|
24958
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_ATTRCODE.pending, function (state, action) {
|
|
24959
|
+
state.order_catalog_attrcode.loading = true, state.order_catalog_attrcode.error = false, state.order_catalog_attrcode.loading = true;
|
|
24960
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_ATTRCODE.rejected, function (state, action) {
|
|
24961
|
+
state.order_catalog_attrcode.loading = false, state.order_catalog_attrcode.error = true, state.order_catalog_attrcode = action.payload;
|
|
24962
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_AGEGROUP.fulfilled, function (state, action) {
|
|
24963
|
+
state.order_catalog_agegroup.loading = false, state.order_catalog_agegroup.error = false, state.order_catalog_agegroup = action.payload;
|
|
24964
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_AGEGROUP.pending, function (state, action) {
|
|
24965
|
+
state.order_catalog_agegroup.loading = true, state.order_catalog_agegroup.error = false, state.order_catalog_agegroup.loading = true;
|
|
24966
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_AGEGROUP.rejected, function (state, action) {
|
|
24967
|
+
state.order_catalog_agegroup.loading = false, state.order_catalog_agegroup.error = true, state.order_catalog_agegroup = action.payload;
|
|
24968
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_ORDERCATEGORY.fulfilled, function (state, action) {
|
|
24969
|
+
state.order_catalog_orderCategory.loading = false, state.order_catalog_orderCategory.error = false, state.order_catalog_orderCategory = action.payload;
|
|
24970
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_ORDERCATEGORY.pending, function (state, action) {
|
|
24971
|
+
state.order_catalog_orderCategory.loading = true, state.order_catalog_orderCategory.error = false, state.order_catalog_orderCategory.loading = true;
|
|
24972
|
+
}), _defineProperty(_extraReducers$t, ORDER_CATALOG_ORDERCATEGORY.rejected, function (state, action) {
|
|
24973
|
+
state.order_catalog_orderCategory.loading = false, state.order_catalog_orderCategory.error = true, state.order_catalog_orderCategory = action.payload;
|
|
24974
|
+
}), _defineProperty(_extraReducers$t, SAVE_RC_CHARGECODE.fulfilled, function (state, action) {
|
|
24975
|
+
state.savercchargecode.loading = false, state.savercchargecode.error = false, state.savercchargecode = action.payload;
|
|
24976
|
+
}), _defineProperty(_extraReducers$t, SAVE_RC_CHARGECODE.pending, function (state, action) {
|
|
24977
|
+
state.savercchargecode.loading = true, state.savercchargecode.error = false, state.savercchargecode.loading = true;
|
|
24978
|
+
}), _defineProperty(_extraReducers$t, SAVE_RC_CHARGECODE.rejected, function (state, action) {
|
|
24979
|
+
state.savercchargecode.loading = false, state.savercchargecode.error = true, state.savercchargecode = action.payload;
|
|
24537
24980
|
}), _extraReducers$t)
|
|
24538
24981
|
});
|
|
24539
24982
|
var orderCatalogActions = {
|
|
@@ -24547,7 +24990,12 @@ var orderCatalogActions = {
|
|
|
24547
24990
|
ORDER_TYPE_DATA: ORDER_TYPE_DATA,
|
|
24548
24991
|
ENTITY_NAME_DATA: ENTITY_NAME_DATA,
|
|
24549
24992
|
ORDER_CATALOG_GRPORIND: ORDER_CATALOG_GRPORIND,
|
|
24550
|
-
ORDER_CATALOG_SERVICEITEM: ORDER_CATALOG_SERVICEITEM
|
|
24993
|
+
ORDER_CATALOG_SERVICEITEM: ORDER_CATALOG_SERVICEITEM,
|
|
24994
|
+
ORDER_CATALOG_CODING_MASTERS: ORDER_CATALOG_CODING_MASTERS,
|
|
24995
|
+
ORDER_CATALOG_ATTRCODE: ORDER_CATALOG_ATTRCODE,
|
|
24996
|
+
ORDER_CATALOG_AGEGROUP: ORDER_CATALOG_AGEGROUP,
|
|
24997
|
+
ORDER_CATALOG_ORDERCATEGORY: ORDER_CATALOG_ORDERCATEGORY,
|
|
24998
|
+
SAVE_RC_CHARGECODE: SAVE_RC_CHARGECODE
|
|
24551
24999
|
};
|
|
24552
25000
|
var orderCatalogSlice$1 = orderCatalogSlice.reducer;
|
|
24553
25001
|
|