primary_care_admin_binder 0.1.3 → 0.1.7

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.
Files changed (2) hide show
  1. package/dist/index.cjs.js +1064 -532
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -364,6 +364,10 @@ function _defineProperty(obj, key, value) {
364
364
  return obj;
365
365
  }
366
366
 
367
+ function _objectDestructuringEmpty(obj) {
368
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
369
+ }
370
+
367
371
  function _toConsumableArray(arr) {
368
372
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
369
373
  }
@@ -9451,7 +9455,7 @@ var query$a = {
9451
9455
  getAgeRange: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"AgeRanges\",\n \"return_fields\": \"MERGE(AgeRanges, {AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )\",\n \"sort\":\"AgeRanges.createddate\"\n }")
9452
9456
  };
9453
9457
 
9454
- var generateJson$a = function generateJson(data) {
9458
+ var generateJson$b = function generateJson(data) {
9455
9459
  var filter = {};
9456
9460
 
9457
9461
  if (data.editData) {
@@ -9516,7 +9520,7 @@ var UPSERT_AGE_RANGE = createAsyncThunk("ageRangeMasterApiSlice/save_age_range",
9516
9520
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
9517
9521
  _context.prev = 2;
9518
9522
  dataList = payload.dataList;
9519
- queriesjson = generateJson$a(dataList);
9523
+ queriesjson = generateJson$b(dataList);
9520
9524
  _context.next = 7;
9521
9525
  return fetchData({
9522
9526
  body: JSON.stringify(queriesjson)
@@ -9724,7 +9728,7 @@ var query$9 = {
9724
9728
  getList: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"VitalsMeasureCodes\",\n \"sort\": \"VitalsMeasureCodes.createddate\",\n \"filter\": {\n \"VitalsMeasureCodes\":\"VitalsMeasureCodes.activestatus==true\"\n },\n \"return_fields\": \"VitalsMeasureCodes\"\n }")
9725
9729
  };
9726
9730
 
9727
- var generateJson$9 = function generateJson(data) {
9731
+ var generateJson$a = function generateJson(data) {
9728
9732
  var filter = {};
9729
9733
 
9730
9734
  if (data.edit_data) {
@@ -9809,7 +9813,7 @@ var UPSERT_MEASURE_CODE = createAsyncThunk("measureCodeApiSlice/save_measure_cod
9809
9813
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
9810
9814
  _context2.prev = 2;
9811
9815
  dataList = payload.dataList;
9812
- queriesjson = generateJson$9(dataList);
9816
+ queriesjson = generateJson$a(dataList);
9813
9817
  _context2.next = 7;
9814
9818
  return fetchData({
9815
9819
  body: JSON.stringify(queriesjson)
@@ -15411,7 +15415,7 @@ var queries$h = {
15411
15415
  }
15412
15416
  };
15413
15417
 
15414
- var generateJson$8 = {
15418
+ var generateJson$9 = {
15415
15419
  insert_json: function insert_json(data, key) {
15416
15420
  var _data$TotNoOfResource, _data$generalInstruct, _data$ApptInstruction;
15417
15421
 
@@ -16088,7 +16092,7 @@ var RES_UPSERT_INSER_NEW = createAsyncThunk("resourceByAppointmentTypesSlice/res
16088
16092
  _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
16089
16093
  _context11.prev = 2;
16090
16094
  state = payload.state, key = payload.key;
16091
- queriesjson = generateJson$8.insert_json(state, key);
16095
+ queriesjson = generateJson$9.insert_json(state, key);
16092
16096
  _context11.next = 7;
16093
16097
  return fetchData({
16094
16098
  body: JSON.stringify(queriesjson)
@@ -20159,7 +20163,7 @@ var queries$d = {
20159
20163
  }
20160
20164
  };
20161
20165
 
20162
- var generateJson$7 = function generateJson(data, _key) {
20166
+ var generateJson$8 = function generateJson(data, _key) {
20163
20167
  var _data$performingData, _data$orderingFacilit, _data$orderingFacilit2, _data$locationType$va, _data$locationType, _data$sourceLocation$, _data$sourceLocation, _data$ServiceApplicab, _data$ServiceApplicab2, _data$status;
20164
20168
 
20165
20169
  var filter = {};
@@ -20419,7 +20423,7 @@ var UPSERT_PERFORMINGLOCATION = createAsyncThunk("performLocationSlice/save_perf
20419
20423
  _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
20420
20424
  _context5.prev = 2;
20421
20425
  list = payload.list, _key = payload._key;
20422
- queriesjson = generateJson$7(list, _key); // return
20426
+ queriesjson = generateJson$8(list, _key); // return
20423
20427
 
20424
20428
  console.log("recived", list);
20425
20429
  _context5.next = 8;
@@ -21726,7 +21730,7 @@ var queries$c = {
21726
21730
  db_name: dbName,
21727
21731
  entity: "Organization",
21728
21732
  // filter: "'CodingMaster/11898' IN Organization.OrgType",
21729
- filter: "Organization.ParentOrgID ==[] && Organization.activestatus==true ",
21733
+ filter: "Organization.ParentOrgID ==[] && Organization.activestatus==true && Organization.isExternal==".concat(type.isexternal),
21730
21734
  // return_fields: "MERGE(Organization,{Organization:(FOR org IN Organization FILTER Organization.id IN org.ParentOrgID AND 'CodingMaster/11899' IN org.OrgType RETURN MERGE(org,{facility:(FOR fac IN Organization FILTER 'CodingMaster/11058' IN fac.OrgType AND org.id IN fac.ParentOrgID RETURN fac)}) )})",
21731
21735
  return_fields: "MERGE(Organization,{Organization:(FOR org IN Organization FILTER Organization.id IN org.ParentOrgID RETURN MERGE(org,{facility:(FOR fac IN Organization FILTER org.id IN fac.ParentOrgID RETURN fac)}) )})"
21732
21736
  };
@@ -21740,7 +21744,7 @@ var queries$c = {
21740
21744
  return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN TO_ARRAY(CodeableConceptMaster.coding) RETURN DOCUMENT(cod))})"
21741
21745
  };
21742
21746
  },
21743
- getParentEntity: function getParentEntity() {
21747
+ getParentEntityFull: function getParentEntityFull() {
21744
21748
  return {
21745
21749
  db_name: dbName,
21746
21750
  entity: "Organization",
@@ -21749,6 +21753,23 @@ var queries$c = {
21749
21753
  return_fields: "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
21750
21754
  };
21751
21755
  },
21756
+ getParentEntity: function getParentEntity(type) {
21757
+ // return {
21758
+ // db_name: dbName,
21759
+ // entity: "Organization",
21760
+ // sort: "Organization.name",
21761
+ // filter: `Organization.activestatus==true AND Organization.active==true && Organization.isExternal==${type.isexternal} && Organization.OrgType === '${type.entityType}'`,
21762
+ // return_fields:
21763
+ // "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}",
21764
+ // };
21765
+ return {
21766
+ "db_name": dbName,
21767
+ "entity": "Organization",
21768
+ "sort": "Organization.name",
21769
+ "filter": "Organization.activestatus==true AND Organization.active==true && Organization.isExternal==".concat(type.isexternal, " && DOCUMENT(Organization.OrgType)[*].code ANY == '").concat(type.entityType, "'"),
21770
+ "return_fields": "{OrgType: Organization.OrgType, _id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
21771
+ };
21772
+ },
21752
21773
  getLevelOfCare: function getLevelOfCare() {
21753
21774
  return {
21754
21775
  db_name: dbName,
@@ -22083,7 +22104,7 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
22083
22104
  var obj = {};
22084
22105
 
22085
22106
  if (data) {
22086
- var _data$name, _data$entitycode, _data$ParentOrgID, _data$levelofcareid$d, _data$levelofcareid, _data$levelofcareid$l, _data$levelofcareid2, _ref2, _data$address, _data$address$, _data$address2, _data$address2$, _data$address2$$city, _data$address3, _data$address3$, _data$address3$$distr, _data$address4, _data$address4$, _data$address4$$state, _data$address5, _data$address5$, _data$address5$$posta, _data$address6, _data$address6$, _data$address6$$count, _data$contact$, _data$contact$$name$, _data$contact$$name$$, _data$contact$2, _data$contact$2$name$, _data$contact$3, _data$contact$3$name$, _data$contact$4, _data$contact$4$name$, _data$contact$5, _data$contact$5$name$, _data$contact$5$name$2, _data$contact$0$desig, _data$contact, _data$contact$6, _data$contact$6$desig, _data$logo$, _getpersondetails, _data$contact2;
22107
+ var _data$name, _data$entitycode, _data$ParentOrgID, _data$levelofcareid$d, _data$levelofcareid, _data$levelofcareid$l, _data$levelofcareid2, _ref2, _data$address, _data$address$, _data$address2, _data$address2$, _data$address2$$city, _data$address3, _data$address3$, _data$address3$$distr, _data$address4, _data$address4$, _data$address4$$state, _data$address5, _data$address5$, _data$address5$$posta, _data$address6, _data$address6$, _data$address6$$count, _data$contact$, _data$contact$$name$, _data$contact$$name$$, _data$contact$2, _data$contact$2$name$, _data$contact$3, _data$contact$3$name$, _data$contact$4, _data$contact$4$name$, _data$contact$5, _data$contact$5$name$, _data$contact$5$name$2, _data$contact$0$desig, _data$contact, _data$contact$6, _data$contact$6$desig, _data$logo$, _getpersondetails, _data$contact2, _data$isExternal;
22087
22108
 
22088
22109
  obj = {
22089
22110
  entityName: (_data$name = data === null || data === void 0 ? void 0 : data.name) !== null && _data$name !== void 0 ? _data$name : "",
@@ -22100,16 +22121,17 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
22100
22121
  status: data === null || data === void 0 ? void 0 : data.active,
22101
22122
  log: data === null || data === void 0 ? void 0 : (_data$logo$ = data.logo[0]) === null || _data$logo$ === void 0 ? void 0 : _data$logo$.fileid,
22102
22123
  specialtyDetails: specialtyDetailsarr,
22103
- contact_person_name: (_getpersondetails = getpersondetails((data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.length) > 0 ? data === null || data === void 0 ? void 0 : data.contact : null)) !== null && _getpersondetails !== void 0 ? _getpersondetails : null
22124
+ contact_person_name: (_getpersondetails = getpersondetails((data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.length) > 0 ? data === null || data === void 0 ? void 0 : data.contact : null)) !== null && _getpersondetails !== void 0 ? _getpersondetails : null,
22125
+ external: (_data$isExternal = data === null || data === void 0 ? void 0 : data.isExternal) !== null && _data$isExternal !== void 0 ? _data$isExternal : false
22104
22126
  };
22105
22127
  }
22106
22128
 
22107
22129
  return obj;
22108
22130
  };
22109
22131
 
22110
- var generateJson$6 = {
22132
+ var generateJson$7 = {
22111
22133
  insert_json: function insert_json(data, key) {
22112
- var _data$Identification, _data$Alias, _data$Address, _data$Contact, _data$ContactPersonDe, _data$specialtyDetail, _data$ParentEntity, _data$ParentEntity2, _data$LevelOfCare, _data$imageDetails$, _data$imageDetails$2, _data$imageDetails$3, _data$imageDetails$4;
22134
+ var _data$Identification, _data$Alias, _data$Address, _data$Contact, _data$ContactPersonDe, _data$specialtyDetail, _data$external, _data$ParentEntity, _data$ParentEntity2, _data$LevelOfCare, _data$imageDetails$, _data$imageDetails$2, _data$imageDetails$3, _data$imageDetails$4;
22113
22135
 
22114
22136
  var identifierArr = data === null || data === void 0 ? void 0 : (_data$Identification = data.Identification) === null || _data$Identification === void 0 ? void 0 : _data$Identification.map(function (v, i) {
22115
22137
  var _v$use;
@@ -22247,6 +22269,7 @@ var generateJson$6 = {
22247
22269
  contact: contactpersondetailsArr,
22248
22270
  specialtyDetails: specialtyDetailsArr
22249
22271
  }, id), {}, {
22272
+ isExternal: (_data$external = data === null || data === void 0 ? void 0 : data.external) !== null && _data$external !== void 0 ? _data$external : false,
22250
22273
  ParentOrgID: data !== null && data !== void 0 && (_data$ParentEntity = data.ParentEntity) !== null && _data$ParentEntity !== void 0 && _data$ParentEntity.value ? [data === null || data === void 0 ? void 0 : (_data$ParentEntity2 = data.ParentEntity) === null || _data$ParentEntity2 === void 0 ? void 0 : _data$ParentEntity2.value] : [],
22251
22274
  OrgType: [data.EntityType.value],
22252
22275
  levelofcareid: data === null || data === void 0 ? void 0 : (_data$LevelOfCare = data.LevelOfCare) === null || _data$LevelOfCare === void 0 ? void 0 : _data$LevelOfCare.value,
@@ -22266,7 +22289,7 @@ var generateJson$6 = {
22266
22289
  };
22267
22290
  var generateReadJson$2 = {
22268
22291
  read_json: function read_json(data, Parentget) {
22269
- var _data$identifier, _data$alias, _data$address, _data$telecom, _data$contact, _data$OrgType$, _data$OrgType$2, _data$ParentOrgID, _data$levelofcareid, _data$levelofcareid2, _data$logo$, _data$logo$2, _data$logo$3, _data$logo$4, _data$logo$5;
22292
+ var _data$identifier, _data$alias, _data$address, _data$telecom, _data$contact, _data$OrgType$, _data$OrgType$2, _data$OrgType$3, _data$ParentOrgID, _data$levelofcareid, _data$levelofcareid2, _data$isExternal, _data$logo$, _data$logo$2, _data$logo$3, _data$logo$4, _data$logo$5;
22270
22293
 
22271
22294
  var IdentificationArr = data === null || data === void 0 ? void 0 : (_data$identifier = data.identifier) === null || _data$identifier === void 0 ? void 0 : _data$identifier.map(function (v, i) {
22272
22295
  var _v$period$, _v$period$2, _v$user, _v$user2, _v$Type, _v$Type2;
@@ -22437,7 +22460,8 @@ var generateReadJson$2 = {
22437
22460
  status: data === null || data === void 0 ? void 0 : data.active,
22438
22461
  EntityType_: {
22439
22462
  title: data === null || data === void 0 ? void 0 : (_data$OrgType$ = data.OrgType[0]) === null || _data$OrgType$ === void 0 ? void 0 : _data$OrgType$.display,
22440
- value: data === null || data === void 0 ? void 0 : (_data$OrgType$2 = data.OrgType[0]) === null || _data$OrgType$2 === void 0 ? void 0 : _data$OrgType$2._id
22463
+ value: data === null || data === void 0 ? void 0 : (_data$OrgType$2 = data.OrgType[0]) === null || _data$OrgType$2 === void 0 ? void 0 : _data$OrgType$2._id,
22464
+ code: data === null || data === void 0 ? void 0 : (_data$OrgType$3 = data.OrgType[0]) === null || _data$OrgType$3 === void 0 ? void 0 : _data$OrgType$3.code
22441
22465
  },
22442
22466
  ParentEntity_: (data === null || data === void 0 ? void 0 : (_data$ParentOrgID = data.ParentOrgID) === null || _data$ParentOrgID === void 0 ? void 0 : _data$ParentOrgID.length) > 0 ? Parentget === null || Parentget === void 0 ? void 0 : Parentget.filter(function (val) {
22443
22467
  return (val === null || val === void 0 ? void 0 : val.value) === (data === null || data === void 0 ? void 0 : data.ParentOrgID[0]);
@@ -22455,6 +22479,7 @@ var generateReadJson$2 = {
22455
22479
  Contact_: ContactArr,
22456
22480
  ContactPersonDetails_: ContactPersonDetailsArr,
22457
22481
  specialtyDetails: specialtyDetailsarr,
22482
+ external: (_data$isExternal = data === null || data === void 0 ? void 0 : data.isExternal) !== null && _data$isExternal !== void 0 ? _data$isExternal : false,
22458
22483
  imageDetails_: data !== null && data !== void 0 && (_data$logo$ = data.logo[0]) !== null && _data$logo$ !== void 0 && _data$logo$.fileid ? [{
22459
22484
  fileid: data === null || data === void 0 ? void 0 : (_data$logo$2 = data.logo[0]) === null || _data$logo$2 === void 0 ? void 0 : _data$logo$2.fileid,
22460
22485
  filetype: data === null || data === void 0 ? void 0 : (_data$logo$3 = data.logo[0]) === null || _data$logo$3 === void 0 ? void 0 : _data$logo$3.filetype,
@@ -22467,8 +22492,10 @@ var generateReadJson$2 = {
22467
22492
 
22468
22493
  var _extraReducers$k;
22469
22494
  var ORGANIZATION_TREE_READ = createAsyncThunk("organizationSlice/organizationTreeList", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
22470
- var _ref2,
22495
+ var payload,
22496
+ _ref2,
22471
22497
  rejectWithValue,
22498
+ type,
22472
22499
  data,
22473
22500
  getJson,
22474
22501
  _args = arguments;
@@ -22477,11 +22504,13 @@ var ORGANIZATION_TREE_READ = createAsyncThunk("organizationSlice/organizationTre
22477
22504
  while (1) {
22478
22505
  switch (_context.prev = _context.next) {
22479
22506
  case 0:
22507
+ payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
22480
22508
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
22481
22509
  _context.prev = 2;
22510
+ type = payload;
22482
22511
  _context.next = 6;
22483
22512
  return fetchData({
22484
- body: JSON.stringify(queries$c.getTreeStuct())
22513
+ body: JSON.stringify(queries$c.getTreeStuct(type))
22485
22514
  }, __readDocumentUrl__);
22486
22515
 
22487
22516
  case 6:
@@ -22530,12 +22559,13 @@ var ORGANIZATION_ENTITY_TYPE = createAsyncThunk("organizationSlice/organizationE
22530
22559
  var _val$coding$, _val$coding$2;
22531
22560
 
22532
22561
  if (val !== null && val !== void 0 && (_val$coding$ = val.coding[0]) !== null && _val$coding$ !== void 0 && _val$coding$.display && val !== null && val !== void 0 && (_val$coding$2 = val.coding[0]) !== null && _val$coding$2 !== void 0 && _val$coding$2._id) {
22533
- var _val$coding$3;
22562
+ var _val$coding$3, _val$coding, _val$coding$4;
22534
22563
 
22535
- result.push({
22564
+ result.push(_objectSpread2({
22536
22565
  title: val === null || val === void 0 ? void 0 : (_val$coding$3 = val.coding[0]) === null || _val$coding$3 === void 0 ? void 0 : _val$coding$3.display,
22537
- value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22538
- });
22566
+ value: val === null || val === void 0 ? void 0 : val.coding[0]._id,
22567
+ code: val === null || val === void 0 ? void 0 : (_val$coding = val.coding) === null || _val$coding === void 0 ? void 0 : (_val$coding$4 = _val$coding[0]) === null || _val$coding$4 === void 0 ? void 0 : _val$coding$4.code
22568
+ }, val));
22539
22569
  }
22540
22570
  });
22541
22571
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -22557,8 +22587,10 @@ var ORGANIZATION_ENTITY_TYPE = createAsyncThunk("organizationSlice/organizationE
22557
22587
  }, _callee2, null, [[2, 12]]);
22558
22588
  })));
22559
22589
  var ORGANIZATION_GET_PARENT_ENTITY = createAsyncThunk("organizationSlice/orgParEntity", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
22560
- var _ref6,
22590
+ var payload,
22591
+ _ref6,
22561
22592
  rejectWithValue,
22593
+ type,
22562
22594
  data,
22563
22595
  result,
22564
22596
  _args3 = arguments;
@@ -22567,11 +22599,13 @@ var ORGANIZATION_GET_PARENT_ENTITY = createAsyncThunk("organizationSlice/orgParE
22567
22599
  while (1) {
22568
22600
  switch (_context3.prev = _context3.next) {
22569
22601
  case 0:
22602
+ payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
22570
22603
  _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
22571
22604
  _context3.prev = 2;
22605
+ type = payload;
22572
22606
  _context3.next = 6;
22573
22607
  return fetchData({
22574
- body: JSON.stringify(queries$c.getParentEntity())
22608
+ body: JSON.stringify(queries$c.getParentEntity(type))
22575
22609
  }, __readDocumentUrl__);
22576
22610
 
22577
22611
  case 6:
@@ -22672,13 +22706,13 @@ var ORGANIZATION_GET_USE_IDENTIFICATION = createAsyncThunk("organizationSlice/or
22672
22706
  data = _context5.sent;
22673
22707
  result = [];
22674
22708
  data.result.map(function (val, i) {
22675
- var _val$coding$4, _val$coding$5;
22709
+ var _val$coding$5, _val$coding$6;
22676
22710
 
22677
- if (val !== null && val !== void 0 && (_val$coding$4 = val.coding[0]) !== null && _val$coding$4 !== void 0 && _val$coding$4.display && val !== null && val !== void 0 && (_val$coding$5 = val.coding[0]) !== null && _val$coding$5 !== void 0 && _val$coding$5._id) {
22678
- var _val$coding$6;
22711
+ if (val !== null && val !== void 0 && (_val$coding$5 = val.coding[0]) !== null && _val$coding$5 !== void 0 && _val$coding$5.display && val !== null && val !== void 0 && (_val$coding$6 = val.coding[0]) !== null && _val$coding$6 !== void 0 && _val$coding$6._id) {
22712
+ var _val$coding$7;
22679
22713
 
22680
22714
  result.push({
22681
- title: val === null || val === void 0 ? void 0 : (_val$coding$6 = val.coding[0]) === null || _val$coding$6 === void 0 ? void 0 : _val$coding$6.display,
22715
+ title: val === null || val === void 0 ? void 0 : (_val$coding$7 = val.coding[0]) === null || _val$coding$7 === void 0 ? void 0 : _val$coding$7.display,
22682
22716
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22683
22717
  });
22684
22718
  }
@@ -22723,13 +22757,13 @@ var ORGANIZATION_GET_IDTYPE_IDENTIF = createAsyncThunk("organizationSlice/orgIdT
22723
22757
  data = _context6.sent;
22724
22758
  result = [];
22725
22759
  data.result.map(function (val, i) {
22726
- var _val$coding$7, _val$coding$8;
22760
+ var _val$coding$8, _val$coding$9;
22727
22761
 
22728
- if (val !== null && val !== void 0 && (_val$coding$7 = val.coding[0]) !== null && _val$coding$7 !== void 0 && _val$coding$7.display && val !== null && val !== void 0 && (_val$coding$8 = val.coding[0]) !== null && _val$coding$8 !== void 0 && _val$coding$8._id) {
22729
- var _val$coding$9;
22762
+ if (val !== null && val !== void 0 && (_val$coding$8 = val.coding[0]) !== null && _val$coding$8 !== void 0 && _val$coding$8.display && val !== null && val !== void 0 && (_val$coding$9 = val.coding[0]) !== null && _val$coding$9 !== void 0 && _val$coding$9._id) {
22763
+ var _val$coding$10;
22730
22764
 
22731
22765
  result.push({
22732
- title: val === null || val === void 0 ? void 0 : (_val$coding$9 = val.coding[0]) === null || _val$coding$9 === void 0 ? void 0 : _val$coding$9.display,
22766
+ title: val === null || val === void 0 ? void 0 : (_val$coding$10 = val.coding[0]) === null || _val$coding$10 === void 0 ? void 0 : _val$coding$10.display,
22733
22767
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22734
22768
  });
22735
22769
  }
@@ -22774,13 +22808,13 @@ var ORGANIZATION_GET_ALIAS_TYPE = createAsyncThunk("organizationSlice/aliastype"
22774
22808
  data = _context7.sent;
22775
22809
  result = [];
22776
22810
  data.result.map(function (val, i) {
22777
- var _val$coding$10, _val$coding$11;
22811
+ var _val$coding$11, _val$coding$12;
22778
22812
 
22779
- if (val !== null && val !== void 0 && (_val$coding$10 = val.coding[0]) !== null && _val$coding$10 !== void 0 && _val$coding$10.display && val !== null && val !== void 0 && (_val$coding$11 = val.coding[0]) !== null && _val$coding$11 !== void 0 && _val$coding$11._id) {
22780
- var _val$coding$12;
22813
+ if (val !== null && val !== void 0 && (_val$coding$11 = val.coding[0]) !== null && _val$coding$11 !== void 0 && _val$coding$11.display && val !== null && val !== void 0 && (_val$coding$12 = val.coding[0]) !== null && _val$coding$12 !== void 0 && _val$coding$12._id) {
22814
+ var _val$coding$13;
22781
22815
 
22782
22816
  result.push({
22783
- title: val === null || val === void 0 ? void 0 : (_val$coding$12 = val.coding[0]) === null || _val$coding$12 === void 0 ? void 0 : _val$coding$12.display,
22817
+ title: val === null || val === void 0 ? void 0 : (_val$coding$13 = val.coding[0]) === null || _val$coding$13 === void 0 ? void 0 : _val$coding$13.display,
22784
22818
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22785
22819
  });
22786
22820
  }
@@ -22936,13 +22970,13 @@ var ORGANIZATION_GET_ADD_TYPE = createAsyncThunk("organizationSlice/orgAddType",
22936
22970
  data = _context10.sent;
22937
22971
  result = [];
22938
22972
  data.result.map(function (val, i) {
22939
- var _val$coding$13, _val$coding$14;
22973
+ var _val$coding$14, _val$coding$15;
22940
22974
 
22941
- if (val !== null && val !== void 0 && (_val$coding$13 = val.coding[0]) !== null && _val$coding$13 !== void 0 && _val$coding$13.display && val !== null && val !== void 0 && (_val$coding$14 = val.coding[0]) !== null && _val$coding$14 !== void 0 && _val$coding$14._id) {
22942
- var _val$coding$15;
22975
+ if (val !== null && val !== void 0 && (_val$coding$14 = val.coding[0]) !== null && _val$coding$14 !== void 0 && _val$coding$14.display && val !== null && val !== void 0 && (_val$coding$15 = val.coding[0]) !== null && _val$coding$15 !== void 0 && _val$coding$15._id) {
22976
+ var _val$coding$16;
22943
22977
 
22944
22978
  result.push({
22945
- title: val === null || val === void 0 ? void 0 : (_val$coding$15 = val.coding[0]) === null || _val$coding$15 === void 0 ? void 0 : _val$coding$15.display,
22979
+ title: val === null || val === void 0 ? void 0 : (_val$coding$16 = val.coding[0]) === null || _val$coding$16 === void 0 ? void 0 : _val$coding$16.display,
22946
22980
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22947
22981
  });
22948
22982
  }
@@ -22987,13 +23021,13 @@ var ORGANIZATION_GET_ADD_USE = createAsyncThunk("organizationSlice/orgAddUSE", /
22987
23021
  data = _context11.sent;
22988
23022
  result = [];
22989
23023
  data.result.map(function (val, i) {
22990
- var _val$coding$16, _val$coding$17;
23024
+ var _val$coding$17, _val$coding$18;
22991
23025
 
22992
- if (val !== null && val !== void 0 && (_val$coding$16 = val.coding[0]) !== null && _val$coding$16 !== void 0 && _val$coding$16.display && val !== null && val !== void 0 && (_val$coding$17 = val.coding[0]) !== null && _val$coding$17 !== void 0 && _val$coding$17._id) {
22993
- var _val$coding$18;
23026
+ if (val !== null && val !== void 0 && (_val$coding$17 = val.coding[0]) !== null && _val$coding$17 !== void 0 && _val$coding$17.display && val !== null && val !== void 0 && (_val$coding$18 = val.coding[0]) !== null && _val$coding$18 !== void 0 && _val$coding$18._id) {
23027
+ var _val$coding$19;
22994
23028
 
22995
23029
  result.push({
22996
- title: val === null || val === void 0 ? void 0 : (_val$coding$18 = val.coding[0]) === null || _val$coding$18 === void 0 ? void 0 : _val$coding$18.display,
23030
+ title: val === null || val === void 0 ? void 0 : (_val$coding$19 = val.coding[0]) === null || _val$coding$19 === void 0 ? void 0 : _val$coding$19.display,
22997
23031
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22998
23032
  });
22999
23033
  }
@@ -23295,13 +23329,13 @@ var ORGANIZATION_GET_CONTACTDETAILMODE = createAsyncThunk("organizationSlice/org
23295
23329
  data = _context17.sent;
23296
23330
  result = [];
23297
23331
  data.result.map(function (val, i) {
23298
- var _val$coding$19, _val$coding$20;
23332
+ var _val$coding$20, _val$coding$21;
23299
23333
 
23300
- if (val !== null && val !== void 0 && (_val$coding$19 = val.coding[0]) !== null && _val$coding$19 !== void 0 && _val$coding$19.display && val !== null && val !== void 0 && (_val$coding$20 = val.coding[0]) !== null && _val$coding$20 !== void 0 && _val$coding$20._id) {
23301
- var _val$coding$21;
23334
+ if (val !== null && val !== void 0 && (_val$coding$20 = val.coding[0]) !== null && _val$coding$20 !== void 0 && _val$coding$20.display && val !== null && val !== void 0 && (_val$coding$21 = val.coding[0]) !== null && _val$coding$21 !== void 0 && _val$coding$21._id) {
23335
+ var _val$coding$22;
23302
23336
 
23303
23337
  result.push({
23304
- title: val === null || val === void 0 ? void 0 : (_val$coding$21 = val.coding[0]) === null || _val$coding$21 === void 0 ? void 0 : _val$coding$21.display,
23338
+ title: val === null || val === void 0 ? void 0 : (_val$coding$22 = val.coding[0]) === null || _val$coding$22 === void 0 ? void 0 : _val$coding$22.display,
23305
23339
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23306
23340
  });
23307
23341
  }
@@ -23397,13 +23431,13 @@ var ORGANIZATION_GET_CONTACTDETAILUSE = createAsyncThunk("organizationSlice/orgC
23397
23431
  data = _context19.sent;
23398
23432
  result = [];
23399
23433
  data.result.map(function (val, i) {
23400
- var _val$coding$22, _val$coding$23;
23434
+ var _val$coding$23, _val$coding$24;
23401
23435
 
23402
- if (val !== null && val !== void 0 && (_val$coding$22 = val.coding[0]) !== null && _val$coding$22 !== void 0 && _val$coding$22.display && val !== null && val !== void 0 && (_val$coding$23 = val.coding[0]) !== null && _val$coding$23 !== void 0 && _val$coding$23._id) {
23403
- var _val$coding$24;
23436
+ if (val !== null && val !== void 0 && (_val$coding$23 = val.coding[0]) !== null && _val$coding$23 !== void 0 && _val$coding$23.display && val !== null && val !== void 0 && (_val$coding$24 = val.coding[0]) !== null && _val$coding$24 !== void 0 && _val$coding$24._id) {
23437
+ var _val$coding$25;
23404
23438
 
23405
23439
  result.push({
23406
- title: val === null || val === void 0 ? void 0 : (_val$coding$24 = val.coding[0]) === null || _val$coding$24 === void 0 ? void 0 : _val$coding$24.display,
23440
+ title: val === null || val === void 0 ? void 0 : (_val$coding$25 = val.coding[0]) === null || _val$coding$25 === void 0 ? void 0 : _val$coding$25.display,
23407
23441
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23408
23442
  });
23409
23443
  }
@@ -23448,13 +23482,13 @@ var ORGANIZATION_GET_CONTACTDETAILPRIORITY = createAsyncThunk("organizationSlice
23448
23482
  data = _context20.sent;
23449
23483
  result = [];
23450
23484
  data.result.map(function (val, i) {
23451
- var _val$coding$25, _val$coding$26;
23485
+ var _val$coding$26, _val$coding$27;
23452
23486
 
23453
- if (val !== null && val !== void 0 && (_val$coding$25 = val.coding[0]) !== null && _val$coding$25 !== void 0 && _val$coding$25.display && val !== null && val !== void 0 && (_val$coding$26 = val.coding[0]) !== null && _val$coding$26 !== void 0 && _val$coding$26._id) {
23454
- var _val$coding$27;
23487
+ if (val !== null && val !== void 0 && (_val$coding$26 = val.coding[0]) !== null && _val$coding$26 !== void 0 && _val$coding$26.display && val !== null && val !== void 0 && (_val$coding$27 = val.coding[0]) !== null && _val$coding$27 !== void 0 && _val$coding$27._id) {
23488
+ var _val$coding$28;
23455
23489
 
23456
23490
  result.push({
23457
- title: val === null || val === void 0 ? void 0 : (_val$coding$27 = val.coding[0]) === null || _val$coding$27 === void 0 ? void 0 : _val$coding$27.display,
23491
+ title: val === null || val === void 0 ? void 0 : (_val$coding$28 = val.coding[0]) === null || _val$coding$28 === void 0 ? void 0 : _val$coding$28.display,
23458
23492
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23459
23493
  });
23460
23494
  }
@@ -23499,13 +23533,13 @@ var ORGANIZATION_GET_CONTACT_PREFIX = createAsyncThunk("organizationSlice/orgNam
23499
23533
  data = _context21.sent;
23500
23534
  result = [];
23501
23535
  data.result.map(function (val, i) {
23502
- var _val$coding$28, _val$coding$29;
23536
+ var _val$coding$29, _val$coding$30;
23503
23537
 
23504
- if (val !== null && val !== void 0 && (_val$coding$28 = val.coding[0]) !== null && _val$coding$28 !== void 0 && _val$coding$28.display && val !== null && val !== void 0 && (_val$coding$29 = val.coding[0]) !== null && _val$coding$29 !== void 0 && _val$coding$29._id) {
23505
- var _val$coding$30;
23538
+ if (val !== null && val !== void 0 && (_val$coding$29 = val.coding[0]) !== null && _val$coding$29 !== void 0 && _val$coding$29.display && val !== null && val !== void 0 && (_val$coding$30 = val.coding[0]) !== null && _val$coding$30 !== void 0 && _val$coding$30._id) {
23539
+ var _val$coding$31;
23506
23540
 
23507
23541
  result.push({
23508
- title: val === null || val === void 0 ? void 0 : (_val$coding$30 = val.coding[0]) === null || _val$coding$30 === void 0 ? void 0 : _val$coding$30.display,
23542
+ title: val === null || val === void 0 ? void 0 : (_val$coding$31 = val.coding[0]) === null || _val$coding$31 === void 0 ? void 0 : _val$coding$31.display,
23509
23543
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23510
23544
  });
23511
23545
  }
@@ -23550,13 +23584,13 @@ var ORGANIZATION_GET_CONTACT_SUFFIX = createAsyncThunk("organizationSlice/orgNam
23550
23584
  data = _context22.sent;
23551
23585
  result = [];
23552
23586
  data.result.map(function (val, i) {
23553
- var _val$coding$31, _val$coding$32;
23587
+ var _val$coding$32, _val$coding$33;
23554
23588
 
23555
- if (val !== null && val !== void 0 && (_val$coding$31 = val.coding[0]) !== null && _val$coding$31 !== void 0 && _val$coding$31.display && val !== null && val !== void 0 && (_val$coding$32 = val.coding[0]) !== null && _val$coding$32 !== void 0 && _val$coding$32._id) {
23556
- var _val$coding$33;
23589
+ if (val !== null && val !== void 0 && (_val$coding$32 = val.coding[0]) !== null && _val$coding$32 !== void 0 && _val$coding$32.display && val !== null && val !== void 0 && (_val$coding$33 = val.coding[0]) !== null && _val$coding$33 !== void 0 && _val$coding$33._id) {
23590
+ var _val$coding$34;
23557
23591
 
23558
23592
  result.push({
23559
- title: val === null || val === void 0 ? void 0 : (_val$coding$33 = val.coding[0]) === null || _val$coding$33 === void 0 ? void 0 : _val$coding$33.display,
23593
+ title: val === null || val === void 0 ? void 0 : (_val$coding$34 = val.coding[0]) === null || _val$coding$34 === void 0 ? void 0 : _val$coding$34.display,
23560
23594
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23561
23595
  });
23562
23596
  }
@@ -23601,14 +23635,14 @@ var ORGANIZATION_GET_CONTACT_DESI = createAsyncThunk("organizationSlice/position
23601
23635
  data = _context23.sent;
23602
23636
  result = [];
23603
23637
  data.result.map(function (val, i) {
23604
- var _val$coding, _val$coding$34;
23638
+ var _val$coding2, _val$coding2$;
23605
23639
 
23606
- if (val !== null && val !== void 0 && (_val$coding = val.coding) !== null && _val$coding !== void 0 && (_val$coding$34 = _val$coding[0]) !== null && _val$coding$34 !== void 0 && _val$coding$34.display) {
23607
- var _val$coding2, _val$coding2$, _val$coding3, _val$coding3$;
23640
+ if (val !== null && val !== void 0 && (_val$coding2 = val.coding) !== null && _val$coding2 !== void 0 && (_val$coding2$ = _val$coding2[0]) !== null && _val$coding2$ !== void 0 && _val$coding2$.display) {
23641
+ var _val$coding3, _val$coding3$, _val$coding4, _val$coding4$;
23608
23642
 
23609
23643
  result.push({
23610
- title: val === null || val === void 0 ? void 0 : (_val$coding2 = val.coding) === null || _val$coding2 === void 0 ? void 0 : (_val$coding2$ = _val$coding2[0]) === null || _val$coding2$ === void 0 ? void 0 : _val$coding2$.display,
23611
- value: val === null || val === void 0 ? void 0 : (_val$coding3 = val.coding) === null || _val$coding3 === void 0 ? void 0 : (_val$coding3$ = _val$coding3[0]) === null || _val$coding3$ === void 0 ? void 0 : _val$coding3$._id
23644
+ title: val === null || val === void 0 ? void 0 : (_val$coding3 = val.coding) === null || _val$coding3 === void 0 ? void 0 : (_val$coding3$ = _val$coding3[0]) === null || _val$coding3$ === void 0 ? void 0 : _val$coding3$.display,
23645
+ value: val === null || val === void 0 ? void 0 : (_val$coding4 = val.coding) === null || _val$coding4 === void 0 ? void 0 : (_val$coding4$ = _val$coding4[0]) === null || _val$coding4$ === void 0 ? void 0 : _val$coding4$._id
23612
23646
  });
23613
23647
  }
23614
23648
  });
@@ -23648,7 +23682,7 @@ var SET_ORGANIZATION = createAsyncThunk("organizationSlice/setOrganization", /*#
23648
23682
  _ref48 = _args24.length > 1 ? _args24[1] : undefined, rejectWithValue = _ref48.rejectWithValue;
23649
23683
  _context24.prev = 2;
23650
23684
  state = payload.state, key = payload.key;
23651
- queriesjson = generateJson$6.insert_json(state, key);
23685
+ queriesjson = generateJson$7.insert_json(state, key);
23652
23686
  _context24.next = 7;
23653
23687
  return fetchData({
23654
23688
  body: JSON.stringify(queriesjson)
@@ -23695,7 +23729,7 @@ var ORG_FROM_GET = createAsyncThunk("organizationSlice/getOrganization", /*#__PU
23695
23729
  key = payload.key;
23696
23730
  _context25.next = 6;
23697
23731
  return fetchData({
23698
- body: JSON.stringify(queries$c.getParentEntity())
23732
+ body: JSON.stringify(queries$c.getParentEntityFull())
23699
23733
  }, __readDocumentUrl__);
23700
23734
 
23701
23735
  case 6:
@@ -23757,16 +23791,16 @@ var ORGANIZATION_GET_SPECIALTY_DROP = createAsyncThunk("organizationSlice/specia
23757
23791
  data = _context26.sent;
23758
23792
  result = [];
23759
23793
  data.result.map(function (val, i) {
23760
- var _val$coding4, _val$coding5, _val$coding5$;
23794
+ var _val$coding5, _val$coding6, _val$coding6$;
23761
23795
 
23762
- if (val !== null && val !== void 0 && (_val$coding4 = val.coding) !== null && _val$coding4 !== void 0 && _val$coding4[0] && val !== null && val !== void 0 && (_val$coding5 = val.coding) !== null && _val$coding5 !== void 0 && (_val$coding5$ = _val$coding5[0]) !== null && _val$coding5$ !== void 0 && _val$coding5$._id) {
23763
- var _val$coding6, _val$coding6$, _val$coding7, _val$coding7$, _val$coding8, _val$coding8$, _val$coding9, _val$coding9$, _val$coding10, _val$coding10$;
23796
+ if (val !== null && val !== void 0 && (_val$coding5 = val.coding) !== null && _val$coding5 !== void 0 && _val$coding5[0] && val !== null && val !== void 0 && (_val$coding6 = val.coding) !== null && _val$coding6 !== void 0 && (_val$coding6$ = _val$coding6[0]) !== null && _val$coding6$ !== void 0 && _val$coding6$._id) {
23797
+ var _val$coding7, _val$coding7$, _val$coding8, _val$coding8$, _val$coding9, _val$coding9$, _val$coding10, _val$coding10$, _val$coding11, _val$coding11$;
23764
23798
 
23765
23799
  result.push({
23766
- label: (val === null || val === void 0 ? void 0 : (_val$coding6 = val.coding) === null || _val$coding6 === void 0 ? void 0 : (_val$coding6$ = _val$coding6[0]) === null || _val$coding6$ === void 0 ? void 0 : _val$coding6$.display) + " (" + (val === null || val === void 0 ? void 0 : (_val$coding7 = val.coding) === null || _val$coding7 === void 0 ? void 0 : (_val$coding7$ = _val$coding7[0]) === null || _val$coding7$ === void 0 ? void 0 : _val$coding7$.code) + ")",
23767
- value: val === null || val === void 0 ? void 0 : (_val$coding8 = val.coding) === null || _val$coding8 === void 0 ? void 0 : (_val$coding8$ = _val$coding8[0]) === null || _val$coding8$ === void 0 ? void 0 : _val$coding8$.code,
23768
- name: val === null || val === void 0 ? void 0 : (_val$coding9 = val.coding) === null || _val$coding9 === void 0 ? void 0 : (_val$coding9$ = _val$coding9[0]) === null || _val$coding9$ === void 0 ? void 0 : _val$coding9$.display,
23769
- id: val === null || val === void 0 ? void 0 : (_val$coding10 = val.coding) === null || _val$coding10 === void 0 ? void 0 : (_val$coding10$ = _val$coding10[0]) === null || _val$coding10$ === void 0 ? void 0 : _val$coding10$._id
23800
+ label: (val === null || val === void 0 ? void 0 : (_val$coding7 = val.coding) === null || _val$coding7 === void 0 ? void 0 : (_val$coding7$ = _val$coding7[0]) === null || _val$coding7$ === void 0 ? void 0 : _val$coding7$.display) + " (" + (val === null || val === void 0 ? void 0 : (_val$coding8 = val.coding) === null || _val$coding8 === void 0 ? void 0 : (_val$coding8$ = _val$coding8[0]) === null || _val$coding8$ === void 0 ? void 0 : _val$coding8$.code) + ")",
23801
+ value: val === null || val === void 0 ? void 0 : (_val$coding9 = val.coding) === null || _val$coding9 === void 0 ? void 0 : (_val$coding9$ = _val$coding9[0]) === null || _val$coding9$ === void 0 ? void 0 : _val$coding9$.code,
23802
+ name: val === null || val === void 0 ? void 0 : (_val$coding10 = val.coding) === null || _val$coding10 === void 0 ? void 0 : (_val$coding10$ = _val$coding10[0]) === null || _val$coding10$ === void 0 ? void 0 : _val$coding10$.display,
23803
+ id: val === null || val === void 0 ? void 0 : (_val$coding11 = val.coding) === null || _val$coding11 === void 0 ? void 0 : (_val$coding11$ = _val$coding11[0]) === null || _val$coding11$ === void 0 ? void 0 : _val$coding11$._id
23770
23804
  });
23771
23805
  }
23772
23806
  });
@@ -24143,7 +24177,7 @@ var queries$b = {
24143
24177
  }
24144
24178
  };
24145
24179
 
24146
- var generateJson$5 = function generateJson(data) {
24180
+ var generateJson$6 = function generateJson(data) {
24147
24181
  var _data$status, _data$serviceDescript, _data$comment, _data$id, _data$speciality$valu, _data$speciality, _data$serviceCategory, _data$serviceCategory2, _data$serviceType$val, _data$serviceType, _data$serviceCode;
24148
24182
 
24149
24183
  var filter = {};
@@ -24760,7 +24794,7 @@ var HEALTH_CARE_SERVICE_INSERT = createAsyncThunk("organizationConfigApiSlice/sa
24760
24794
  _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
24761
24795
  _context8.prev = 2;
24762
24796
  dataList = payload.dataList;
24763
- queriesjson = generateJson$5(dataList);
24797
+ queriesjson = generateJson$6(dataList);
24764
24798
  _context8.next = 7;
24765
24799
  return fetchData({
24766
24800
  body: JSON.stringify(queriesjson)
@@ -27856,7 +27890,7 @@ var user_actions = _objectSpread2({}, userActions);
27856
27890
 
27857
27891
  var user_management_actions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, roles_actions), repository_actions), permission_actions), person_actions), user_actions);
27858
27892
 
27859
- var generateJson$4 = function generateJson(data, _key) {
27893
+ var generateJson$5 = function generateJson(data, _key) {
27860
27894
  var _data$approvalData, _data$orderingFacilit, _data$orderingFacilit2, _data$ServiceApplicab, _data$ServiceApplicab2, _data$ruleType$_id, _data$ruleType, _data$PrivilegeType$_, _data$PrivilegeType, _data$status;
27861
27895
 
27862
27896
  var filter = {};
@@ -27917,7 +27951,7 @@ var UPSERT_ALERT = createAsyncThunk("alertRestictionsMasterSlice/save_alert", /*
27917
27951
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
27918
27952
  _context.prev = 2;
27919
27953
  list = payload.list, _key = payload._key;
27920
- queriesjson = generateJson$4(list, _key); // return
27954
+ queriesjson = generateJson$5(list, _key); // return
27921
27955
 
27922
27956
  _context.next = 7;
27923
27957
  return fetchData({
@@ -28320,7 +28354,7 @@ var queries$5 = {
28320
28354
  }
28321
28355
  };
28322
28356
 
28323
- var generateJson$3 = {
28357
+ var generateJson$4 = {
28324
28358
  insert_json: function insert_json(data, key) {
28325
28359
  var _data$coversionData;
28326
28360
 
@@ -28595,7 +28629,7 @@ var UOM_CODE_INSERT = createAsyncThunk("drugRoutesSlice/drug_uom_code_insert", /
28595
28629
  _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
28596
28630
  _context4.prev = 2;
28597
28631
  data = payload.data, key = payload.key;
28598
- queriesjson = generateJson$3.insert_json(data, key);
28632
+ queriesjson = generateJson$4.insert_json(data, key);
28599
28633
  _context4.next = 7;
28600
28634
  return fetchData({
28601
28635
  body: JSON.stringify(queriesjson)
@@ -28845,7 +28879,7 @@ var queries$4 = {
28845
28879
  }
28846
28880
  };
28847
28881
 
28848
- var generateJson$2 = {
28882
+ var generateJson$3 = {
28849
28883
  insert_json: function insert_json(data, key) {
28850
28884
  var _data$frequencyDefini, _data$frequencyDefini2, _data$frequencyDefini3, _data$frequencyDescri, _data$frequencyDescri2, _data$frequencyDescri3, _data$frequencyDescri4, _data$frequencyDescri5, _data$frequencyDescri6, _data$frequencyDescri7, _data$frequencyDescri8, _data$frequencyDescri9, _data$frequencyDescri10, _data$frequencyDescri11, _data$frequencyDescri12, _data$frequencyDescri13, _data$frequencyDescri14, _data$frequencyDescri15;
28851
28885
 
@@ -29265,7 +29299,7 @@ var UOM_DRUG_FREQ_INSERT = createAsyncThunk("drugMasterFREQUENCYSlice/drug_uom_f
29265
29299
  _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
29266
29300
  _context7.prev = 2;
29267
29301
  data = payload.data, key = payload.key;
29268
- queriesjson = generateJson$2.insert_json(data, key);
29302
+ queriesjson = generateJson$3.insert_json(data, key);
29269
29303
  _context7.next = 7;
29270
29304
  return fetchData({
29271
29305
  body: JSON.stringify(queriesjson)
@@ -29478,7 +29512,7 @@ var query$3 = {
29478
29512
  db_name: "".concat(dbName),
29479
29513
  entity: "CA_OrderSet",
29480
29514
  filter: "CA_OrderSet._key == '".concat(_key, "' && CA_OrderSet.activestatus == true"),
29481
- return_fields: "merge(CA_OrderSet,{components:(for comp in CA_OrderSet_Components filter comp._id in CA_OrderSet.components return merge(comp,{orderCatalog:merge(document(comp.orderCatalog),{ordertype:document(document(comp.orderCatalog).ordertype)},{ordercategory:document(document(comp.orderCatalog).ordercategory)}),IVDosDurUOM:document(comp.IVDosDurUOM),IVInfusRateUOM:document(comp.IVInfusRateUOM),IVInfusRateVolUOM:document(comp.IVInfusRateVolUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltFreqRateUnit:document(comp.dfltFreqRateUnit),dfltFreqValUnit:document(comp.dfltFreqValUnit),dfltOrderUOM:document(comp.dfltOrderUOM),route:document(comp.route),dosageFreqCode:document(comp.dosageFreqCode)}))})"
29515
+ return_fields: "merge(CA_OrderSet,{components:(for comp in CA_OrderSet_Components filter comp._id in CA_OrderSet.components return merge(comp,{orderCatalog:document(comp.orderCatalog),ordercategory:document(comp.ordercategory),ordertype:document(comp.ordertype),IVDosDurUOM:document(comp.IVDosDurUOM),IVInfusRateUOM:document(comp.IVInfusRateUOM),IVInfusRateVolUOM:document(comp.IVInfusRateVolUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltFreqRateUnit:document(comp.dfltFreqRateUnit),dfltFreqValUnit:document(comp.dfltFreqValUnit),dfltOrderUOM:document(comp.dfltOrderUOM),route:document(comp.route),dosageFreqCode:document(comp.dosageFreqCode)}))})"
29482
29516
  };
29483
29517
  },
29484
29518
  status_update_order_set_master: function status_update_order_set_master(data) {
@@ -29521,7 +29555,7 @@ var orderCategoty = {
29521
29555
  };
29522
29556
  }
29523
29557
  };
29524
- var dynamicMaster = {
29558
+ var dynamicMaster$1 = {
29525
29559
  orderDrugType: function orderDrugType(order_category) {
29526
29560
  return {
29527
29561
  db_name: "".concat(dbName),
@@ -29531,7 +29565,16 @@ var dynamicMaster = {
29531
29565
  sort: "OrderType.shortdesc"
29532
29566
  };
29533
29567
  },
29534
- orderDrugCatalog: function orderDrugCatalog(order_category, order_drug_type) {
29568
+ drugType: function drugType() {
29569
+ return {
29570
+ db_name: "".concat(dbName),
29571
+ entity: "DrugType",
29572
+ filter: "DrugType.activestatus == true && DrugType.status == true",
29573
+ return_fields: "KEEP(DrugType,'_id','_key','drugtype','longdesc','shortdesc')",
29574
+ sort: "DrugType.shortdesc"
29575
+ };
29576
+ },
29577
+ orderCatalog: function orderCatalog(order_category, order_drug_type) {
29535
29578
  return {
29536
29579
  db_name: "".concat(dbName),
29537
29580
  entity: "OrderCatalog",
@@ -29539,10 +29582,19 @@ var dynamicMaster = {
29539
29582
  return_fields: "merge(keep(OrderCatalog,'id','_key','_id','shortdesc','ordertype','ordercategory','ordercatalog','longdesc'),{ordertype:document(OrderCatalog.ordertype)},{ordercategory:document(OrderCatalog.ordercategory)},{OrderCatalogByEncounterTypeAge:document(OrderCatalog.OrderCatalogByEncounterTypeAge)[*].freqappl})",
29540
29583
  sort: "OrderCatalog.shortdesc"
29541
29584
  };
29585
+ },
29586
+ drugCatalog: function drugCatalog(drug_type) {
29587
+ return {
29588
+ db_name: "".concat(dbName),
29589
+ entity: "DrugMaster",
29590
+ filter: "DrugMaster.DrugType=='".concat(drug_type, "' && DrugMaster.activestatus == true && DrugMaster.statusactive==true"),
29591
+ return_fields: "merge(keep(DrugMaster,'id','_id','_key','ShortDesc','LongDesc','DrugType'),{DrugType:document(DrugMaster.DrugType)})",
29592
+ sort: "DrugMaster.ShortDesc"
29593
+ };
29542
29594
  }
29543
29595
  };
29544
29596
 
29545
- var generateJson$1 = function generateJson(data) {
29597
+ var generateJson$2 = function generateJson(data) {
29546
29598
  var _data$id, _data$orderSetCode, _data$shortdes, _data$longdes;
29547
29599
 
29548
29600
  var filter = {};
@@ -29575,7 +29627,7 @@ var generateJson$1 = function generateJson(data) {
29575
29627
  var constructComponents = function constructComponents(data) {
29576
29628
  var arr = [];
29577
29629
  data.map(function (val) {
29578
- var _val$id, _val$seqNo, _val$orderCatalog$val, _val$orderCatalog, _val$explanatoryNote, _val$practitionerInst, _parseInt, _val$quantity_type$va, _val$quantity_type, _parseInt2, _val$route$value, _val$route, _parseInt3, _val$frequency_type$v, _val$frequency_type, _parseInt4, _val$rate_type$value, _val$rate_type, _parseInt5, _val$duration_type$va, _val$duration_type, _parseInt6, _val$dosage_freq_code, _val$dosage_freq_code2, _parseInt7, _val$in_infusion_rate, _val$in_infusion_rate2, _parseInt8, _val$in_infusion_rate3, _val$in_infusion_rate4, _parseInt9, _val$iv_dosage_durati, _val$iv_dosage_durati2, _val$parentordercatal, _val$parentordercatal2;
29630
+ var _val$id, _val$seqNo, _val$orderCatalog$val, _val$orderCatalog, _val$orderCategory$va, _val$orderCategory, _val$orderTypeDrugTyp, _val$orderTypeDrugTyp2, _val$explanatoryNote, _val$practitionerInst, _parseInt, _val$quantity_type$va, _val$quantity_type, _parseInt2, _val$route$value, _val$route, _parseInt3, _val$frequency_type$v, _val$frequency_type, _parseInt4, _val$rate_type$value, _val$rate_type, _parseInt5, _val$duration_type$va, _val$duration_type, _parseInt6, _val$dosage_freq_code, _val$dosage_freq_code2, _parseInt7, _val$in_infusion_rate, _val$in_infusion_rate2, _parseInt8, _val$in_infusion_rate3, _val$in_infusion_rate4, _parseInt9, _val$iv_dosage_durati, _val$iv_dosage_durati2, _val$parentordercatal, _val$parentordercatal2;
29579
29631
 
29580
29632
  var _key = {};
29581
29633
 
@@ -29590,6 +29642,8 @@ var constructComponents = function constructComponents(data) {
29590
29642
  }, _key), {}, {
29591
29643
  seqNo: (_val$seqNo = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo !== void 0 ? _val$seqNo : 0,
29592
29644
  orderCatalog: (_val$orderCatalog$val = val === null || val === void 0 ? void 0 : (_val$orderCatalog = val.orderCatalog) === null || _val$orderCatalog === void 0 ? void 0 : _val$orderCatalog.value) !== null && _val$orderCatalog$val !== void 0 ? _val$orderCatalog$val : "",
29645
+ ordercategory: (_val$orderCategory$va = val === null || val === void 0 ? void 0 : (_val$orderCategory = val.orderCategory) === null || _val$orderCategory === void 0 ? void 0 : _val$orderCategory.value) !== null && _val$orderCategory$va !== void 0 ? _val$orderCategory$va : "",
29646
+ ordertype: (_val$orderTypeDrugTyp = val === null || val === void 0 ? void 0 : (_val$orderTypeDrugTyp2 = val.orderTypeDrugType) === null || _val$orderTypeDrugTyp2 === void 0 ? void 0 : _val$orderTypeDrugTyp2.value) !== null && _val$orderTypeDrugTyp !== void 0 ? _val$orderTypeDrugTyp : "",
29593
29647
  explNote: (_val$explanatoryNote = val === null || val === void 0 ? void 0 : val.explanatoryNote) !== null && _val$explanatoryNote !== void 0 ? _val$explanatoryNote : "",
29594
29648
  practInstr: (_val$practitionerInst = val === null || val === void 0 ? void 0 : val.practitionerInstructions) !== null && _val$practitionerInst !== void 0 ? _val$practitionerInst : "",
29595
29649
  required: val === null || val === void 0 ? void 0 : val.required,
@@ -29621,7 +29675,7 @@ var constructComponents = function constructComponents(data) {
29621
29675
  var _val$children;
29622
29676
 
29623
29677
  val === null || val === void 0 ? void 0 : (_val$children = val.children) === null || _val$children === void 0 ? void 0 : _val$children.map(function (val_) {
29624
- var _val_$id, _val_$seqNo, _val_$orderCatalog$va, _val_$orderCatalog, _val_$explanatoryNote, _val_$practitionerIns, _parseInt10, _val_$quantity_type$v, _val_$quantity_type, _parseInt11, _val_$route$value, _val_$route, _parseInt12, _val_$frequency_type$, _val_$frequency_type, _parseInt13, _val_$rate_type$value, _val_$rate_type, _parseInt14, _val_$duration_type$v, _val_$duration_type, _parseInt15, _val_$dosage_freq_cod, _val_$dosage_freq_cod2, _parseInt16, _val_$in_infusion_rat, _val_$in_infusion_rat2, _parseInt17, _val_$in_infusion_rat3, _val_$in_infusion_rat4, _parseInt18, _val_$iv_dosage_durat, _val_$iv_dosage_durat2, _val_$parentordercata, _val_$parentordercata2;
29678
+ var _val_$id, _val_$seqNo, _val_$orderCatalog$va, _val_$orderCatalog, _val$orderCategory$va2, _val$orderCategory2, _val$orderTypeDrugTyp3, _val$orderTypeDrugTyp4, _val_$explanatoryNote, _val_$practitionerIns, _parseInt10, _val_$quantity_type$v, _val_$quantity_type, _parseInt11, _val_$route$value, _val_$route, _parseInt12, _val_$frequency_type$, _val_$frequency_type, _parseInt13, _val_$rate_type$value, _val_$rate_type, _parseInt14, _val_$duration_type$v, _val_$duration_type, _parseInt15, _val_$dosage_freq_cod, _val_$dosage_freq_cod2, _parseInt16, _val_$in_infusion_rat, _val_$in_infusion_rat2, _parseInt17, _val_$in_infusion_rat3, _val_$in_infusion_rat4, _parseInt18, _val_$iv_dosage_durat, _val_$iv_dosage_durat2, _val_$parentordercata, _val_$parentordercata2;
29625
29679
 
29626
29680
  if (val_ !== null && val_ !== void 0 && val_._key) {
29627
29681
  ({
@@ -29633,6 +29687,8 @@ var constructComponents = function constructComponents(data) {
29633
29687
  id: (_val_$id = val_ === null || val_ === void 0 ? void 0 : val_.id) !== null && _val_$id !== void 0 ? _val_$id : 0,
29634
29688
  seqNo: (_val_$seqNo = val_ === null || val_ === void 0 ? void 0 : val_.seqNo) !== null && _val_$seqNo !== void 0 ? _val_$seqNo : 0,
29635
29689
  orderCatalog: (_val_$orderCatalog$va = val_ === null || val_ === void 0 ? void 0 : (_val_$orderCatalog = val_.orderCatalog) === null || _val_$orderCatalog === void 0 ? void 0 : _val_$orderCatalog.value) !== null && _val_$orderCatalog$va !== void 0 ? _val_$orderCatalog$va : "",
29690
+ ordercategory: (_val$orderCategory$va2 = val === null || val === void 0 ? void 0 : (_val$orderCategory2 = val.orderCategory) === null || _val$orderCategory2 === void 0 ? void 0 : _val$orderCategory2.value) !== null && _val$orderCategory$va2 !== void 0 ? _val$orderCategory$va2 : "",
29691
+ ordertype: (_val$orderTypeDrugTyp3 = val === null || val === void 0 ? void 0 : (_val$orderTypeDrugTyp4 = val.orderTypeDrugType) === null || _val$orderTypeDrugTyp4 === void 0 ? void 0 : _val$orderTypeDrugTyp4.value) !== null && _val$orderTypeDrugTyp3 !== void 0 ? _val$orderTypeDrugTyp3 : "",
29636
29692
  explNote: (_val_$explanatoryNote = val_ === null || val_ === void 0 ? void 0 : val_.explanatoryNote) !== null && _val_$explanatoryNote !== void 0 ? _val_$explanatoryNote : "",
29637
29693
  practInstr: (_val_$practitionerIns = val_ === null || val_ === void 0 ? void 0 : val_.practitionerInstructions) !== null && _val_$practitionerIns !== void 0 ? _val_$practitionerIns : "",
29638
29694
  required: val_ === null || val_ === void 0 ? void 0 : val_.required,
@@ -29664,7 +29720,7 @@ var constructComponents = function constructComponents(data) {
29664
29720
  return arr;
29665
29721
  };
29666
29722
 
29667
- var generateReadJSON$2 = function generateReadJSON(data, state) {
29723
+ var generateReadJSON$2 = function generateReadJSON(data) {
29668
29724
  var json = {
29669
29725
  //INITAIL STATE
29670
29726
  parentSeqNumber: null,
@@ -29752,121 +29808,130 @@ var getSeqNumber = function getSeqNumber(components) {
29752
29808
  maxNum = c.seqNo;
29753
29809
  }
29754
29810
  });
29755
- debugger;
29756
29811
  return maxNum + 1;
29757
29812
  };
29758
29813
 
29759
- var constructTabelData = function constructTabelData(data, state) {
29814
+ var constructTabelData = function constructTabelData(data) {
29760
29815
  var arr = [];
29761
- data === null || data === void 0 ? void 0 : data.map(function (val) {
29762
- if (!(val !== null && val !== void 0 && val.parentCatSeqNo)) {
29763
- var _val$id, _val$_key, _val$orderCatalog$ord, _val$orderCatalog, _val$seqNo, _val$orderCatalog$ord2, _val$orderCatalog2, _val$orderCatalog3, _val$orderCatalog4, _val$orderCatalog5, _val$orderCatalog6, _val$orderCatalog7, _val$orderCatalog7$or, _val$orderCatalog8, _val$orderCatalog8$or, _val$orderCatalog9, _val$orderCatalog9$or, _val$orderCatalog10, _val$orderCatalog10$o, _val$orderCatalog11, _val$orderCatalog11$o, _val$orderCatalog12, _val$orderCatalog12$o, _val$orderCatalog13, _val$orderCatalog13$o, _val$orderCatalog14, _val$orderCatalog14$o, _val$dfltOrderUOM, _val$dfltOrderUOM2, _val$dfltOrderUOM3, _val$dfltOrderUOM4, _val$dfltOrderUOM5, _val$dfltOrderUOM6, _val$IVInfusRateVol, _val$IVInfusRateVolUO, _val$IVInfusRateVolUO2, _val$IVInfusRateVolUO3, _val$IVInfusRateVolUO4, _val$IVDosDurValue, _val$IVDosDurUOM, _val$IVDosDurUOM2, _val$IVDosDurUOM3, _val$IVDosDurUOM4, _val$IVDosDurValue2, _val$IVDosDurUOM5, _val$IVDosDurUOM6, _val$IVDosDurUOM7, _val$IVDosDurUOM8, _val$dosageFreqCode, _val$dosageFreqCode2, _val$dosageFreqCode3, _val$dosageFreqCode4, _val$startDay, _val$dfltDuration, _val$dfltDurUOM, _val$dfltDurUOM2, _val$dfltDurUOM3, _val$dfltDurUOM4, _val$dfltDurUOM5, _val$dfltDurUOM6, _val$route, _val$route2, _val$route3, _val$route4, _val$route$shortdesc, _val$route5, _val$dfltFreqVal, _val$dfltFreqValUnit, _val$dfltFreqValUnit2, _val$dfltFreqValUnit3, _val$dfltFreqValUnit4, _val$dfltFreqValUnit5, _val$dfltFreqValUnit6, _val$dfltFreqRate, _val$dfltFreqRateUnit, _val$dfltFreqRateUnit2, _val$dfltFreqRateUnit3, _val$dfltFreqRateUnit4, _val$dfltFreqRateUnit5, _val$dfltFreqRateUnit6, _val$additive, _val$parentSequence, _val$parentSequence2, _val$explNote, _val$practInstr, _constructChildrenTab, _obj;
29764
-
29765
- var obj = (_obj = {
29766
- id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : 0,
29767
- _key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : 0,
29768
- typeId: (_val$orderCatalog$ord = val === null || val === void 0 ? void 0 : (_val$orderCatalog = val.orderCatalog) === null || _val$orderCatalog === void 0 ? void 0 : _val$orderCatalog.ordercategory._id) !== null && _val$orderCatalog$ord !== void 0 ? _val$orderCatalog$ord : "",
29769
- seqNo: (_val$seqNo = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo !== void 0 ? _val$seqNo : "",
29770
- orderCategory: (_val$orderCatalog$ord2 = val === null || val === void 0 ? void 0 : (_val$orderCatalog2 = val.orderCatalog) === null || _val$orderCatalog2 === void 0 ? void 0 : _val$orderCatalog2.ordercategory) !== null && _val$orderCatalog$ord2 !== void 0 ? _val$orderCatalog$ord2 : {},
29771
- orderCatalog: val !== null && val !== void 0 && (_val$orderCatalog3 = val.orderCatalog) !== null && _val$orderCatalog3 !== void 0 && _val$orderCatalog3._id && val !== null && val !== void 0 && (_val$orderCatalog4 = val.orderCatalog) !== null && _val$orderCatalog4 !== void 0 && _val$orderCatalog4.shortdesc ? {
29772
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog5 = val.orderCatalog) === null || _val$orderCatalog5 === void 0 ? void 0 : _val$orderCatalog5._id,
29773
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog6 = val.orderCatalog) === null || _val$orderCatalog6 === void 0 ? void 0 : _val$orderCatalog6.shortdesc
29774
- } : {},
29775
- orderTypeDrugType: val !== null && val !== void 0 && (_val$orderCatalog7 = val.orderCatalog) !== null && _val$orderCatalog7 !== void 0 && (_val$orderCatalog7$or = _val$orderCatalog7.ordertype) !== null && _val$orderCatalog7$or !== void 0 && _val$orderCatalog7$or._id && val !== null && val !== void 0 && (_val$orderCatalog8 = val.orderCatalog) !== null && _val$orderCatalog8 !== void 0 && (_val$orderCatalog8$or = _val$orderCatalog8.ordertype) !== null && _val$orderCatalog8$or !== void 0 && _val$orderCatalog8$or.shortdesc ? {
29776
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog9 = val.orderCatalog) === null || _val$orderCatalog9 === void 0 ? void 0 : (_val$orderCatalog9$or = _val$orderCatalog9.ordertype) === null || _val$orderCatalog9$or === void 0 ? void 0 : _val$orderCatalog9$or._id,
29777
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog10 = val.orderCatalog) === null || _val$orderCatalog10 === void 0 ? void 0 : (_val$orderCatalog10$o = _val$orderCatalog10.ordertype) === null || _val$orderCatalog10$o === void 0 ? void 0 : _val$orderCatalog10$o.shortdesc
29778
- } : {}
29779
- }, _defineProperty(_obj, "orderCategory", val !== null && val !== void 0 && (_val$orderCatalog11 = val.orderCatalog) !== null && _val$orderCatalog11 !== void 0 && (_val$orderCatalog11$o = _val$orderCatalog11.ordercategory) !== null && _val$orderCatalog11$o !== void 0 && _val$orderCatalog11$o._id && val !== null && val !== void 0 && (_val$orderCatalog12 = val.orderCatalog) !== null && _val$orderCatalog12 !== void 0 && (_val$orderCatalog12$o = _val$orderCatalog12.ordercategory) !== null && _val$orderCatalog12$o !== void 0 && _val$orderCatalog12$o.shortdesc ? {
29780
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog13 = val.orderCatalog) === null || _val$orderCatalog13 === void 0 ? void 0 : (_val$orderCatalog13$o = _val$orderCatalog13.ordercategory) === null || _val$orderCatalog13$o === void 0 ? void 0 : _val$orderCatalog13$o._id,
29781
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog14 = val.orderCatalog) === null || _val$orderCatalog14 === void 0 ? void 0 : (_val$orderCatalog14$o = _val$orderCatalog14.ordercategory) === null || _val$orderCatalog14$o === void 0 ? void 0 : _val$orderCatalog14$o.shortdesc
29782
- } : {}), _defineProperty(_obj, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM = val.dfltOrderUOM) !== null && _val$dfltOrderUOM !== void 0 && _val$dfltOrderUOM._id && val !== null && val !== void 0 && (_val$dfltOrderUOM2 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM2 !== void 0 && _val$dfltOrderUOM2.display ? {
29783
- value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM3 = val.dfltOrderUOM) === null || _val$dfltOrderUOM3 === void 0 ? void 0 : _val$dfltOrderUOM3._id,
29784
- label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM4 = val.dfltOrderUOM) === null || _val$dfltOrderUOM4 === void 0 ? void 0 : _val$dfltOrderUOM4.display
29785
- } : {}), _defineProperty(_obj, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM5 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM5 !== void 0 && _val$dfltOrderUOM5.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM6 = val.dfltOrderUOM) === null || _val$dfltOrderUOM6 === void 0 ? void 0 : _val$dfltOrderUOM6.display) : "-"), _defineProperty(_obj, "in_infusion_rate_volume_number", (_val$IVInfusRateVol = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol !== void 0 ? _val$IVInfusRateVol : ""), _defineProperty(_obj, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO !== void 0 && _val$IVInfusRateVolUO._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO2 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO2 !== void 0 && _val$IVInfusRateVolUO2.display ? {
29786
- value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO3 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO3 === void 0 ? void 0 : _val$IVInfusRateVolUO3._id,
29787
- label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO4 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO4 === void 0 ? void 0 : _val$IVInfusRateVolUO4.display
29788
- } : {}), _defineProperty(_obj, "in_infusion_rate_duration_number", (_val$IVDosDurValue = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue !== void 0 ? _val$IVDosDurValue : ""), _defineProperty(_obj, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM = val.IVDosDurUOM) !== null && _val$IVDosDurUOM !== void 0 && _val$IVDosDurUOM._id && val !== null && val !== void 0 && (_val$IVDosDurUOM2 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM2 !== void 0 && _val$IVDosDurUOM2.display ? {
29789
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM3 = val.IVDosDurUOM) === null || _val$IVDosDurUOM3 === void 0 ? void 0 : _val$IVDosDurUOM3._id,
29790
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM4 = val.IVDosDurUOM) === null || _val$IVDosDurUOM4 === void 0 ? void 0 : _val$IVDosDurUOM4.display
29791
- } : {}), _defineProperty(_obj, "iv_dosage_duration_number", (_val$IVDosDurValue2 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue2 !== void 0 ? _val$IVDosDurValue2 : ""), _defineProperty(_obj, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM5 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM5 !== void 0 && _val$IVDosDurUOM5._id && val !== null && val !== void 0 && (_val$IVDosDurUOM6 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM6 !== void 0 && _val$IVDosDurUOM6.display ? {
29792
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM7 = val.IVDosDurUOM) === null || _val$IVDosDurUOM7 === void 0 ? void 0 : _val$IVDosDurUOM7._id,
29793
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM8 = val.IVDosDurUOM) === null || _val$IVDosDurUOM8 === void 0 ? void 0 : _val$IVDosDurUOM8.display
29794
- } : {}), _defineProperty(_obj, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode = val.dosageFreqCode) !== null && _val$dosageFreqCode !== void 0 && _val$dosageFreqCode._id && val !== null && val !== void 0 && (_val$dosageFreqCode2 = val.dosageFreqCode) !== null && _val$dosageFreqCode2 !== void 0 && _val$dosageFreqCode2.shortdesc ? {
29795
- value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode3 = val.dosageFreqCode) === null || _val$dosageFreqCode3 === void 0 ? void 0 : _val$dosageFreqCode3._id,
29796
- label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode4 = val.dosageFreqCode) === null || _val$dosageFreqCode4 === void 0 ? void 0 : _val$dosageFreqCode4.shortdesc
29797
- } : {}), _defineProperty(_obj, "startDay", (_val$startDay = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay !== void 0 ? _val$startDay : ""), _defineProperty(_obj, "duration_number", (_val$dfltDuration = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration !== void 0 ? _val$dfltDuration : ""), _defineProperty(_obj, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM = val.dfltDurUOM) !== null && _val$dfltDurUOM !== void 0 && _val$dfltDurUOM._id && val !== null && val !== void 0 && (_val$dfltDurUOM2 = val.dfltDurUOM) !== null && _val$dfltDurUOM2 !== void 0 && _val$dfltDurUOM2.display ? {
29798
- value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM3 = val.dfltDurUOM) === null || _val$dfltDurUOM3 === void 0 ? void 0 : _val$dfltDurUOM3._id,
29799
- label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM4 = val.dfltDurUOM) === null || _val$dfltDurUOM4 === void 0 ? void 0 : _val$dfltDurUOM4.display
29800
- } : {}), _defineProperty(_obj, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM5 = val.dfltDurUOM) !== null && _val$dfltDurUOM5 !== void 0 && _val$dfltDurUOM5.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM6 = val.dfltDurUOM) === null || _val$dfltDurUOM6 === void 0 ? void 0 : _val$dfltDurUOM6.display) : "-"), _defineProperty(_obj, "route", val !== null && val !== void 0 && (_val$route = val.route) !== null && _val$route !== void 0 && _val$route._id && val !== null && val !== void 0 && (_val$route2 = val.route) !== null && _val$route2 !== void 0 && _val$route2.shortdesc ? {
29801
- value: val === null || val === void 0 ? void 0 : (_val$route3 = val.route) === null || _val$route3 === void 0 ? void 0 : _val$route3._id,
29802
- label: val === null || val === void 0 ? void 0 : (_val$route4 = val.route) === null || _val$route4 === void 0 ? void 0 : _val$route4.shortdesc
29803
- } : {}), _defineProperty(_obj, "routeT", (_val$route$shortdesc = val === null || val === void 0 ? void 0 : (_val$route5 = val.route) === null || _val$route5 === void 0 ? void 0 : _val$route5.shortdesc) !== null && _val$route$shortdesc !== void 0 ? _val$route$shortdesc : "-"), _defineProperty(_obj, "frequency_number", (_val$dfltFreqVal = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal !== void 0 ? _val$dfltFreqVal : 0), _defineProperty(_obj, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit !== void 0 && _val$dfltFreqValUnit._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit2 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit2 !== void 0 && _val$dfltFreqValUnit2.display ? {
29804
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit3 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit3 === void 0 ? void 0 : _val$dfltFreqValUnit3._id,
29805
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit4 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit4 === void 0 ? void 0 : _val$dfltFreqValUnit4.display
29806
- } : {}), _defineProperty(_obj, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit5 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit5 !== void 0 && _val$dfltFreqValUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit6 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit6 === void 0 ? void 0 : _val$dfltFreqValUnit6.display) : "-"), _defineProperty(_obj, "rate_number", (_val$dfltFreqRate = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate !== void 0 ? _val$dfltFreqRate : ""), _defineProperty(_obj, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit !== void 0 && _val$dfltFreqRateUnit._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit2 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit2 !== void 0 && _val$dfltFreqRateUnit2.display ? {
29807
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit3 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit3 === void 0 ? void 0 : _val$dfltFreqRateUnit3._id,
29808
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit4 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit4 === void 0 ? void 0 : _val$dfltFreqRateUnit4.display
29809
- } : {}), _defineProperty(_obj, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit5 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit5 !== void 0 && _val$dfltFreqRateUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit6 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit6 === void 0 ? void 0 : _val$dfltFreqRateUnit6.display) : "-"), _defineProperty(_obj, "additive", (_val$additive = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive !== void 0 ? _val$additive : false), _defineProperty(_obj, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "parentSequence", (_val$parentSequence = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence !== void 0 ? _val$parentSequence : ""), _defineProperty(_obj, "parentSequenceT", (_val$parentSequence2 = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence2 !== void 0 ? _val$parentSequence2 : "-"), _defineProperty(_obj, "explanatoryNote", (_val$explNote = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote !== void 0 ? _val$explNote : ""), _defineProperty(_obj, "practitionerInstructions", (_val$practInstr = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr !== void 0 ? _val$practInstr : ""), _defineProperty(_obj, "children", (_constructChildrenTab = constructChildrenTabelData(data, val === null || val === void 0 ? void 0 : val.seqNo)) !== null && _constructChildrenTab !== void 0 ? _constructChildrenTab : []), _obj);
29810
- arr.push(obj);
29811
- }
29812
- });
29816
+
29817
+ if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
29818
+ data === null || data === void 0 ? void 0 : data.map(function (val) {
29819
+ if (!(val !== null && val !== void 0 && val.parentCatSeqNo)) {
29820
+ var _val$id, _val$_key, _val$ordercategory$_i, _val$seqNo, _val$ordercategory, _val$ordercategory2, _val$ordercategory3, _val$ordercategory4, _val$ordercategory5, _val$ordertype, _val$ordertype2, _val$ordertype3, _val$ordertype4, _val$orderCatalog, _val$orderCatalog2, _val$orderCatalog3, _val$orderCatalog4, _val$orderCatalog5, _val$orderCatalog6, _val$orderCatalog7, _val$orderCatalog8, _val$dfltOrderUOM, _val$dfltOrderUOM2, _val$dfltOrderUOM3, _val$dfltOrderUOM4, _val$dfltOrderUOM5, _val$dfltOrderUOM6, _val$IVInfusRateVol, _val$IVInfusRateVolUO, _val$IVInfusRateVolUO2, _val$IVInfusRateVolUO3, _val$IVInfusRateVolUO4, _val$IVDosDurValue, _val$IVDosDurUOM, _val$IVDosDurUOM2, _val$IVDosDurUOM3, _val$IVDosDurUOM4, _val$IVDosDurValue2, _val$IVDosDurUOM5, _val$IVDosDurUOM6, _val$IVDosDurUOM7, _val$IVDosDurUOM8, _val$dosageFreqCode, _val$dosageFreqCode2, _val$dosageFreqCode3, _val$dosageFreqCode4, _val$startDay, _val$dfltDuration, _val$dfltDurUOM, _val$dfltDurUOM2, _val$dfltDurUOM3, _val$dfltDurUOM4, _val$dfltDurUOM5, _val$dfltDurUOM6, _val$route, _val$route2, _val$route3, _val$route4, _val$route$shortdesc, _val$route5, _val$dfltFreqVal, _val$dfltFreqValUnit, _val$dfltFreqValUnit2, _val$dfltFreqValUnit3, _val$dfltFreqValUnit4, _val$dfltFreqValUnit5, _val$dfltFreqValUnit6, _val$dfltFreqRate, _val$dfltFreqRateUnit, _val$dfltFreqRateUnit2, _val$dfltFreqRateUnit3, _val$dfltFreqRateUnit4, _val$dfltFreqRateUnit5, _val$dfltFreqRateUnit6, _val$additive, _val$parentSequence, _val$parentSequence2, _val$explNote, _val$practInstr, _constructChildrenTab, _obj;
29821
+
29822
+ var obj = (_obj = {
29823
+ id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : 0,
29824
+ _key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : 0,
29825
+ typeId: (_val$ordercategory$_i = val === null || val === void 0 ? void 0 : val.ordercategory._id) !== null && _val$ordercategory$_i !== void 0 ? _val$ordercategory$_i : "",
29826
+ seqNo: (_val$seqNo = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo !== void 0 ? _val$seqNo : "",
29827
+ orderCategory: (_val$ordercategory = val === null || val === void 0 ? void 0 : val.ordercategory) !== null && _val$ordercategory !== void 0 ? _val$ordercategory : {}
29828
+ }, _defineProperty(_obj, "orderCategory", val !== null && val !== void 0 && (_val$ordercategory2 = val.ordercategory) !== null && _val$ordercategory2 !== void 0 && _val$ordercategory2._id && val !== null && val !== void 0 && (_val$ordercategory3 = val.ordercategory) !== null && _val$ordercategory3 !== void 0 && _val$ordercategory3.shortdesc ? {
29829
+ value: val === null || val === void 0 ? void 0 : (_val$ordercategory4 = val.ordercategory) === null || _val$ordercategory4 === void 0 ? void 0 : _val$ordercategory4._id,
29830
+ label: val === null || val === void 0 ? void 0 : (_val$ordercategory5 = val.ordercategory) === null || _val$ordercategory5 === void 0 ? void 0 : _val$ordercategory5.shortdesc
29831
+ } : {}), _defineProperty(_obj, "orderTypeDrugType", val !== null && val !== void 0 && (_val$ordertype = val.ordertype) !== null && _val$ordertype !== void 0 && _val$ordertype._id && val !== null && val !== void 0 && (_val$ordertype2 = val.ordertype) !== null && _val$ordertype2 !== void 0 && _val$ordertype2.shortdesc ? {
29832
+ value: val === null || val === void 0 ? void 0 : (_val$ordertype3 = val.ordertype) === null || _val$ordertype3 === void 0 ? void 0 : _val$ordertype3._id,
29833
+ label: val === null || val === void 0 ? void 0 : (_val$ordertype4 = val.ordertype) === null || _val$ordertype4 === void 0 ? void 0 : _val$ordertype4.shortdesc
29834
+ } : {}), _defineProperty(_obj, "orderCatalog", val !== null && val !== void 0 && (_val$orderCatalog = val.orderCatalog) !== null && _val$orderCatalog !== void 0 && _val$orderCatalog._id && val !== null && val !== void 0 && (_val$orderCatalog2 = val.orderCatalog) !== null && _val$orderCatalog2 !== void 0 && _val$orderCatalog2.shortdesc ? {
29835
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog3 = val.orderCatalog) === null || _val$orderCatalog3 === void 0 ? void 0 : _val$orderCatalog3._id,
29836
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog4 = val.orderCatalog) === null || _val$orderCatalog4 === void 0 ? void 0 : _val$orderCatalog4.shortdesc
29837
+ } : val !== null && val !== void 0 && (_val$orderCatalog5 = val.orderCatalog) !== null && _val$orderCatalog5 !== void 0 && _val$orderCatalog5._id && val !== null && val !== void 0 && (_val$orderCatalog6 = val.orderCatalog) !== null && _val$orderCatalog6 !== void 0 && _val$orderCatalog6.ShortDesc ? {
29838
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog7 = val.orderCatalog) === null || _val$orderCatalog7 === void 0 ? void 0 : _val$orderCatalog7._id,
29839
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog8 = val.orderCatalog) === null || _val$orderCatalog8 === void 0 ? void 0 : _val$orderCatalog8.ShortDesc
29840
+ } : {}), _defineProperty(_obj, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM = val.dfltOrderUOM) !== null && _val$dfltOrderUOM !== void 0 && _val$dfltOrderUOM._id && val !== null && val !== void 0 && (_val$dfltOrderUOM2 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM2 !== void 0 && _val$dfltOrderUOM2.display ? {
29841
+ value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM3 = val.dfltOrderUOM) === null || _val$dfltOrderUOM3 === void 0 ? void 0 : _val$dfltOrderUOM3._id,
29842
+ label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM4 = val.dfltOrderUOM) === null || _val$dfltOrderUOM4 === void 0 ? void 0 : _val$dfltOrderUOM4.display
29843
+ } : {}), _defineProperty(_obj, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM5 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM5 !== void 0 && _val$dfltOrderUOM5.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM6 = val.dfltOrderUOM) === null || _val$dfltOrderUOM6 === void 0 ? void 0 : _val$dfltOrderUOM6.display) : "-"), _defineProperty(_obj, "in_infusion_rate_volume_number", (_val$IVInfusRateVol = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol !== void 0 ? _val$IVInfusRateVol : ""), _defineProperty(_obj, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO !== void 0 && _val$IVInfusRateVolUO._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO2 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO2 !== void 0 && _val$IVInfusRateVolUO2.display ? {
29844
+ value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO3 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO3 === void 0 ? void 0 : _val$IVInfusRateVolUO3._id,
29845
+ label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO4 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO4 === void 0 ? void 0 : _val$IVInfusRateVolUO4.display
29846
+ } : {}), _defineProperty(_obj, "in_infusion_rate_duration_number", (_val$IVDosDurValue = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue !== void 0 ? _val$IVDosDurValue : ""), _defineProperty(_obj, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM = val.IVDosDurUOM) !== null && _val$IVDosDurUOM !== void 0 && _val$IVDosDurUOM._id && val !== null && val !== void 0 && (_val$IVDosDurUOM2 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM2 !== void 0 && _val$IVDosDurUOM2.display ? {
29847
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM3 = val.IVDosDurUOM) === null || _val$IVDosDurUOM3 === void 0 ? void 0 : _val$IVDosDurUOM3._id,
29848
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM4 = val.IVDosDurUOM) === null || _val$IVDosDurUOM4 === void 0 ? void 0 : _val$IVDosDurUOM4.display
29849
+ } : {}), _defineProperty(_obj, "iv_dosage_duration_number", (_val$IVDosDurValue2 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue2 !== void 0 ? _val$IVDosDurValue2 : ""), _defineProperty(_obj, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM5 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM5 !== void 0 && _val$IVDosDurUOM5._id && val !== null && val !== void 0 && (_val$IVDosDurUOM6 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM6 !== void 0 && _val$IVDosDurUOM6.display ? {
29850
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM7 = val.IVDosDurUOM) === null || _val$IVDosDurUOM7 === void 0 ? void 0 : _val$IVDosDurUOM7._id,
29851
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM8 = val.IVDosDurUOM) === null || _val$IVDosDurUOM8 === void 0 ? void 0 : _val$IVDosDurUOM8.display
29852
+ } : {}), _defineProperty(_obj, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode = val.dosageFreqCode) !== null && _val$dosageFreqCode !== void 0 && _val$dosageFreqCode._id && val !== null && val !== void 0 && (_val$dosageFreqCode2 = val.dosageFreqCode) !== null && _val$dosageFreqCode2 !== void 0 && _val$dosageFreqCode2.shortdesc ? {
29853
+ value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode3 = val.dosageFreqCode) === null || _val$dosageFreqCode3 === void 0 ? void 0 : _val$dosageFreqCode3._id,
29854
+ label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode4 = val.dosageFreqCode) === null || _val$dosageFreqCode4 === void 0 ? void 0 : _val$dosageFreqCode4.shortdesc
29855
+ } : {}), _defineProperty(_obj, "startDay", (_val$startDay = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay !== void 0 ? _val$startDay : ""), _defineProperty(_obj, "duration_number", (_val$dfltDuration = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration !== void 0 ? _val$dfltDuration : ""), _defineProperty(_obj, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM = val.dfltDurUOM) !== null && _val$dfltDurUOM !== void 0 && _val$dfltDurUOM._id && val !== null && val !== void 0 && (_val$dfltDurUOM2 = val.dfltDurUOM) !== null && _val$dfltDurUOM2 !== void 0 && _val$dfltDurUOM2.display ? {
29856
+ value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM3 = val.dfltDurUOM) === null || _val$dfltDurUOM3 === void 0 ? void 0 : _val$dfltDurUOM3._id,
29857
+ label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM4 = val.dfltDurUOM) === null || _val$dfltDurUOM4 === void 0 ? void 0 : _val$dfltDurUOM4.display
29858
+ } : {}), _defineProperty(_obj, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM5 = val.dfltDurUOM) !== null && _val$dfltDurUOM5 !== void 0 && _val$dfltDurUOM5.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM6 = val.dfltDurUOM) === null || _val$dfltDurUOM6 === void 0 ? void 0 : _val$dfltDurUOM6.display) : "-"), _defineProperty(_obj, "route", val !== null && val !== void 0 && (_val$route = val.route) !== null && _val$route !== void 0 && _val$route._id && val !== null && val !== void 0 && (_val$route2 = val.route) !== null && _val$route2 !== void 0 && _val$route2.shortdesc ? {
29859
+ value: val === null || val === void 0 ? void 0 : (_val$route3 = val.route) === null || _val$route3 === void 0 ? void 0 : _val$route3._id,
29860
+ label: val === null || val === void 0 ? void 0 : (_val$route4 = val.route) === null || _val$route4 === void 0 ? void 0 : _val$route4.shortdesc
29861
+ } : {}), _defineProperty(_obj, "routeT", (_val$route$shortdesc = val === null || val === void 0 ? void 0 : (_val$route5 = val.route) === null || _val$route5 === void 0 ? void 0 : _val$route5.shortdesc) !== null && _val$route$shortdesc !== void 0 ? _val$route$shortdesc : "-"), _defineProperty(_obj, "frequency_number", (_val$dfltFreqVal = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal !== void 0 ? _val$dfltFreqVal : 0), _defineProperty(_obj, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit !== void 0 && _val$dfltFreqValUnit._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit2 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit2 !== void 0 && _val$dfltFreqValUnit2.display ? {
29862
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit3 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit3 === void 0 ? void 0 : _val$dfltFreqValUnit3._id,
29863
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit4 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit4 === void 0 ? void 0 : _val$dfltFreqValUnit4.display
29864
+ } : {}), _defineProperty(_obj, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit5 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit5 !== void 0 && _val$dfltFreqValUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit6 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit6 === void 0 ? void 0 : _val$dfltFreqValUnit6.display) : "-"), _defineProperty(_obj, "rate_number", (_val$dfltFreqRate = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate !== void 0 ? _val$dfltFreqRate : ""), _defineProperty(_obj, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit !== void 0 && _val$dfltFreqRateUnit._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit2 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit2 !== void 0 && _val$dfltFreqRateUnit2.display ? {
29865
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit3 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit3 === void 0 ? void 0 : _val$dfltFreqRateUnit3._id,
29866
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit4 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit4 === void 0 ? void 0 : _val$dfltFreqRateUnit4.display
29867
+ } : {}), _defineProperty(_obj, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit5 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit5 !== void 0 && _val$dfltFreqRateUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit6 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit6 === void 0 ? void 0 : _val$dfltFreqRateUnit6.display) : "-"), _defineProperty(_obj, "additive", (_val$additive = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive !== void 0 ? _val$additive : false), _defineProperty(_obj, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "parentSequence", (_val$parentSequence = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence !== void 0 ? _val$parentSequence : ""), _defineProperty(_obj, "parentSequenceT", (_val$parentSequence2 = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence2 !== void 0 ? _val$parentSequence2 : "-"), _defineProperty(_obj, "explanatoryNote", (_val$explNote = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote !== void 0 ? _val$explNote : ""), _defineProperty(_obj, "practitionerInstructions", (_val$practInstr = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr !== void 0 ? _val$practInstr : ""), _defineProperty(_obj, "children", (_constructChildrenTab = constructChildrenTabelData(data, val === null || val === void 0 ? void 0 : val.seqNo)) !== null && _constructChildrenTab !== void 0 ? _constructChildrenTab : []), _obj);
29868
+ arr.push(obj);
29869
+ }
29870
+ });
29871
+ }
29872
+
29813
29873
  return arr;
29814
29874
  };
29815
29875
 
29816
29876
  var constructChildrenTabelData = function constructChildrenTabelData(data, parentCatSeqNo) {
29817
29877
  var arr_ = [];
29818
- data === null || data === void 0 ? void 0 : data.map(function (val) {
29819
- if ((val === null || val === void 0 ? void 0 : val.parentCatSeqNo) === parentCatSeqNo) {
29820
- var _val$id2, _val$_key2, _val$orderCatalog$ord3, _val$orderCatalog15, _val$seqNo2, _val$orderCatalog$ord4, _val$orderCatalog16, _val$orderCatalog17, _val$orderCatalog18, _val$orderCatalog19, _val$orderCatalog20, _val$orderCatalog21, _val$orderCatalog21$o, _val$orderCatalog22, _val$orderCatalog22$o, _val$orderCatalog23, _val$orderCatalog23$o, _val$orderCatalog24, _val$orderCatalog24$o, _val$orderCatalog25, _val$orderCatalog25$o, _val$orderCatalog26, _val$orderCatalog26$o, _val$orderCatalog27, _val$orderCatalog27$o, _val$orderCatalog28, _val$orderCatalog28$o, _val$dfltOrderUOM7, _val$dfltOrderUOM8, _val$dfltOrderUOM9, _val$dfltOrderUOM10, _val$dfltOrderUOM11, _val$dfltOrderUOM12, _val$IVInfusRateVol2, _val$IVInfusRateVolUO5, _val$IVInfusRateVolUO6, _val$IVInfusRateVolUO7, _val$IVInfusRateVolUO8, _val$IVDosDurValue3, _val$IVDosDurUOM9, _val$IVDosDurUOM10, _val$IVDosDurUOM11, _val$IVDosDurUOM12, _val$IVDosDurValue4, _val$IVDosDurUOM13, _val$IVDosDurUOM14, _val$IVDosDurUOM15, _val$IVDosDurUOM16, _val$dosageFreqCode5, _val$dosageFreqCode6, _val$dosageFreqCode7, _val$dosageFreqCode8, _val$startDay2, _val$dfltDuration2, _val$dfltDurUOM7, _val$dfltDurUOM8, _val$dfltDurUOM9, _val$dfltDurUOM10, _val$dfltDurUOM11, _val$dfltDurUOM12, _val$route6, _val$route7, _val$route8, _val$route9, _val$route$shortdesc2, _val$route10, _val$dfltFreqVal2, _val$dfltFreqValUnit7, _val$dfltFreqValUnit8, _val$dfltFreqValUnit9, _val$dfltFreqValUnit10, _val$dfltFreqValUnit11, _val$dfltFreqValUnit12, _val$dfltFreqRate2, _val$dfltFreqRateUnit7, _val$dfltFreqRateUnit8, _val$dfltFreqRateUnit9, _val$dfltFreqRateUnit10, _val$dfltFreqRateUnit11, _val$dfltFreqRateUnit12, _val$additive2, _val$parentCatSeqNo, _val$parentCatSeqNo2, _val$explNote2, _val$practInstr2, _obj_;
29821
-
29822
- var obj_ = (_obj_ = {
29823
- id: (_val$id2 = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id2 !== void 0 ? _val$id2 : 0,
29824
- _key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : 0,
29825
- typeId: (_val$orderCatalog$ord3 = val === null || val === void 0 ? void 0 : (_val$orderCatalog15 = val.orderCatalog) === null || _val$orderCatalog15 === void 0 ? void 0 : _val$orderCatalog15.ordercategory._id) !== null && _val$orderCatalog$ord3 !== void 0 ? _val$orderCatalog$ord3 : "",
29826
- seqNo: (_val$seqNo2 = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo2 !== void 0 ? _val$seqNo2 : "",
29827
- orderCategory: (_val$orderCatalog$ord4 = val === null || val === void 0 ? void 0 : (_val$orderCatalog16 = val.orderCatalog) === null || _val$orderCatalog16 === void 0 ? void 0 : _val$orderCatalog16.ordercategory) !== null && _val$orderCatalog$ord4 !== void 0 ? _val$orderCatalog$ord4 : {},
29828
- orderCatalog: val !== null && val !== void 0 && (_val$orderCatalog17 = val.orderCatalog) !== null && _val$orderCatalog17 !== void 0 && _val$orderCatalog17._id && val !== null && val !== void 0 && (_val$orderCatalog18 = val.orderCatalog) !== null && _val$orderCatalog18 !== void 0 && _val$orderCatalog18.shortdesc ? {
29829
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog19 = val.orderCatalog) === null || _val$orderCatalog19 === void 0 ? void 0 : _val$orderCatalog19._id,
29830
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog20 = val.orderCatalog) === null || _val$orderCatalog20 === void 0 ? void 0 : _val$orderCatalog20.shortdesc
29831
- } : {},
29832
- orderTypeDrugType: val !== null && val !== void 0 && (_val$orderCatalog21 = val.orderCatalog) !== null && _val$orderCatalog21 !== void 0 && (_val$orderCatalog21$o = _val$orderCatalog21.ordertype) !== null && _val$orderCatalog21$o !== void 0 && _val$orderCatalog21$o._id && val !== null && val !== void 0 && (_val$orderCatalog22 = val.orderCatalog) !== null && _val$orderCatalog22 !== void 0 && (_val$orderCatalog22$o = _val$orderCatalog22.ordertype) !== null && _val$orderCatalog22$o !== void 0 && _val$orderCatalog22$o.shortdesc ? {
29833
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog23 = val.orderCatalog) === null || _val$orderCatalog23 === void 0 ? void 0 : (_val$orderCatalog23$o = _val$orderCatalog23.ordertype) === null || _val$orderCatalog23$o === void 0 ? void 0 : _val$orderCatalog23$o._id,
29834
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog24 = val.orderCatalog) === null || _val$orderCatalog24 === void 0 ? void 0 : (_val$orderCatalog24$o = _val$orderCatalog24.ordertype) === null || _val$orderCatalog24$o === void 0 ? void 0 : _val$orderCatalog24$o.shortdesc
29835
- } : {}
29836
- }, _defineProperty(_obj_, "orderCategory", val !== null && val !== void 0 && (_val$orderCatalog25 = val.orderCatalog) !== null && _val$orderCatalog25 !== void 0 && (_val$orderCatalog25$o = _val$orderCatalog25.ordercategory) !== null && _val$orderCatalog25$o !== void 0 && _val$orderCatalog25$o._id && val !== null && val !== void 0 && (_val$orderCatalog26 = val.orderCatalog) !== null && _val$orderCatalog26 !== void 0 && (_val$orderCatalog26$o = _val$orderCatalog26.ordercategory) !== null && _val$orderCatalog26$o !== void 0 && _val$orderCatalog26$o.shortdesc ? {
29837
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog27 = val.orderCatalog) === null || _val$orderCatalog27 === void 0 ? void 0 : (_val$orderCatalog27$o = _val$orderCatalog27.ordercategory) === null || _val$orderCatalog27$o === void 0 ? void 0 : _val$orderCatalog27$o._id,
29838
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog28 = val.orderCatalog) === null || _val$orderCatalog28 === void 0 ? void 0 : (_val$orderCatalog28$o = _val$orderCatalog28.ordercategory) === null || _val$orderCatalog28$o === void 0 ? void 0 : _val$orderCatalog28$o.shortdesc
29839
- } : {}), _defineProperty(_obj_, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj_, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj_, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM7 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM7 !== void 0 && _val$dfltOrderUOM7._id && val !== null && val !== void 0 && (_val$dfltOrderUOM8 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM8 !== void 0 && _val$dfltOrderUOM8.display ? {
29840
- value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM9 = val.dfltOrderUOM) === null || _val$dfltOrderUOM9 === void 0 ? void 0 : _val$dfltOrderUOM9._id,
29841
- label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM10 = val.dfltOrderUOM) === null || _val$dfltOrderUOM10 === void 0 ? void 0 : _val$dfltOrderUOM10.display
29842
- } : {}), _defineProperty(_obj_, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM11 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM11 !== void 0 && _val$dfltOrderUOM11.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM12 = val.dfltOrderUOM) === null || _val$dfltOrderUOM12 === void 0 ? void 0 : _val$dfltOrderUOM12.display) : "-"), _defineProperty(_obj_, "in_infusion_rate_volume_number", (_val$IVInfusRateVol2 = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol2 !== void 0 ? _val$IVInfusRateVol2 : ""), _defineProperty(_obj_, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO5 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO5 !== void 0 && _val$IVInfusRateVolUO5._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO6 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO6 !== void 0 && _val$IVInfusRateVolUO6.display ? {
29843
- value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO7 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO7 === void 0 ? void 0 : _val$IVInfusRateVolUO7._id,
29844
- label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO8 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO8 === void 0 ? void 0 : _val$IVInfusRateVolUO8.display
29845
- } : {}), _defineProperty(_obj_, "in_infusion_rate_duration_number", (_val$IVDosDurValue3 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue3 !== void 0 ? _val$IVDosDurValue3 : ""), _defineProperty(_obj_, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM9 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM9 !== void 0 && _val$IVDosDurUOM9._id && val !== null && val !== void 0 && (_val$IVDosDurUOM10 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM10 !== void 0 && _val$IVDosDurUOM10.display ? {
29846
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM11 = val.IVDosDurUOM) === null || _val$IVDosDurUOM11 === void 0 ? void 0 : _val$IVDosDurUOM11._id,
29847
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM12 = val.IVDosDurUOM) === null || _val$IVDosDurUOM12 === void 0 ? void 0 : _val$IVDosDurUOM12.display
29848
- } : {}), _defineProperty(_obj_, "iv_dosage_duration_number", (_val$IVDosDurValue4 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue4 !== void 0 ? _val$IVDosDurValue4 : ""), _defineProperty(_obj_, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM13 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM13 !== void 0 && _val$IVDosDurUOM13._id && val !== null && val !== void 0 && (_val$IVDosDurUOM14 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM14 !== void 0 && _val$IVDosDurUOM14.display ? {
29849
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM15 = val.IVDosDurUOM) === null || _val$IVDosDurUOM15 === void 0 ? void 0 : _val$IVDosDurUOM15._id,
29850
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM16 = val.IVDosDurUOM) === null || _val$IVDosDurUOM16 === void 0 ? void 0 : _val$IVDosDurUOM16.display
29851
- } : {}), _defineProperty(_obj_, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode5 = val.dosageFreqCode) !== null && _val$dosageFreqCode5 !== void 0 && _val$dosageFreqCode5._id && val !== null && val !== void 0 && (_val$dosageFreqCode6 = val.dosageFreqCode) !== null && _val$dosageFreqCode6 !== void 0 && _val$dosageFreqCode6.shortdesc ? {
29852
- value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode7 = val.dosageFreqCode) === null || _val$dosageFreqCode7 === void 0 ? void 0 : _val$dosageFreqCode7._id,
29853
- label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode8 = val.dosageFreqCode) === null || _val$dosageFreqCode8 === void 0 ? void 0 : _val$dosageFreqCode8.shortdesc
29854
- } : {}), _defineProperty(_obj_, "startDay", (_val$startDay2 = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay2 !== void 0 ? _val$startDay2 : ""), _defineProperty(_obj_, "duration_number", (_val$dfltDuration2 = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration2 !== void 0 ? _val$dfltDuration2 : ""), _defineProperty(_obj_, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM7 = val.dfltDurUOM) !== null && _val$dfltDurUOM7 !== void 0 && _val$dfltDurUOM7._id && val !== null && val !== void 0 && (_val$dfltDurUOM8 = val.dfltDurUOM) !== null && _val$dfltDurUOM8 !== void 0 && _val$dfltDurUOM8.display ? {
29855
- value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM9 = val.dfltDurUOM) === null || _val$dfltDurUOM9 === void 0 ? void 0 : _val$dfltDurUOM9._id,
29856
- label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM10 = val.dfltDurUOM) === null || _val$dfltDurUOM10 === void 0 ? void 0 : _val$dfltDurUOM10.display
29857
- } : {}), _defineProperty(_obj_, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM11 = val.dfltDurUOM) !== null && _val$dfltDurUOM11 !== void 0 && _val$dfltDurUOM11.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM12 = val.dfltDurUOM) === null || _val$dfltDurUOM12 === void 0 ? void 0 : _val$dfltDurUOM12.display) : "-"), _defineProperty(_obj_, "route", val !== null && val !== void 0 && (_val$route6 = val.route) !== null && _val$route6 !== void 0 && _val$route6._id && val !== null && val !== void 0 && (_val$route7 = val.route) !== null && _val$route7 !== void 0 && _val$route7.shortdesc ? {
29858
- value: val === null || val === void 0 ? void 0 : (_val$route8 = val.route) === null || _val$route8 === void 0 ? void 0 : _val$route8._id,
29859
- label: val === null || val === void 0 ? void 0 : (_val$route9 = val.route) === null || _val$route9 === void 0 ? void 0 : _val$route9.shortdesc
29860
- } : {}), _defineProperty(_obj_, "routeT", (_val$route$shortdesc2 = val === null || val === void 0 ? void 0 : (_val$route10 = val.route) === null || _val$route10 === void 0 ? void 0 : _val$route10.shortdesc) !== null && _val$route$shortdesc2 !== void 0 ? _val$route$shortdesc2 : "-"), _defineProperty(_obj_, "frequency_number", (_val$dfltFreqVal2 = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal2 !== void 0 ? _val$dfltFreqVal2 : 0), _defineProperty(_obj_, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit7 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit7 !== void 0 && _val$dfltFreqValUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit8 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit8 !== void 0 && _val$dfltFreqValUnit8.display ? {
29861
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit9 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit9 === void 0 ? void 0 : _val$dfltFreqValUnit9._id,
29862
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit10 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit10 === void 0 ? void 0 : _val$dfltFreqValUnit10.display
29863
- } : {}), _defineProperty(_obj_, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit11 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit11 !== void 0 && _val$dfltFreqValUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit12 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit12 === void 0 ? void 0 : _val$dfltFreqValUnit12.display) : "-"), _defineProperty(_obj_, "rate_number", (_val$dfltFreqRate2 = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate2 !== void 0 ? _val$dfltFreqRate2 : ""), _defineProperty(_obj_, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit7 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit7 !== void 0 && _val$dfltFreqRateUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit8 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit8 !== void 0 && _val$dfltFreqRateUnit8.display ? {
29864
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit9 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit9 === void 0 ? void 0 : _val$dfltFreqRateUnit9._id,
29865
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit10 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit10 === void 0 ? void 0 : _val$dfltFreqRateUnit10.display
29866
- } : {}), _defineProperty(_obj_, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit11 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit11 !== void 0 && _val$dfltFreqRateUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit12 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit12 === void 0 ? void 0 : _val$dfltFreqRateUnit12.display) : "-"), _defineProperty(_obj_, "additive", (_val$additive2 = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive2 !== void 0 ? _val$additive2 : false), _defineProperty(_obj_, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "parentSequence", (_val$parentCatSeqNo = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo !== void 0 ? _val$parentCatSeqNo : ""), _defineProperty(_obj_, "parentSequenceT", (_val$parentCatSeqNo2 = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo2 !== void 0 ? _val$parentCatSeqNo2 : "-"), _defineProperty(_obj_, "explanatoryNote", (_val$explNote2 = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote2 !== void 0 ? _val$explNote2 : ""), _defineProperty(_obj_, "practitionerInstructions", (_val$practInstr2 = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr2 !== void 0 ? _val$practInstr2 : ""), _obj_);
29867
- arr_.push(obj_);
29868
- }
29869
- });
29878
+
29879
+ if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
29880
+ data === null || data === void 0 ? void 0 : data.map(function (val) {
29881
+ if ((val === null || val === void 0 ? void 0 : val.parentCatSeqNo) === parentCatSeqNo) {
29882
+ var _val$id2, _val$_key2, _val$ordercategory$_i2, _val$seqNo2, _val$ordercategory6, _val$ordercategory7, _val$ordercategory8, _val$ordercategory9, _val$ordercategory10, _val$ordertype5, _val$ordertype6, _val$ordertype7, _val$ordertype8, _val$orderCatalog9, _val$orderCatalog10, _val$orderCatalog11, _val$orderCatalog12, _val$orderCatalog13, _val$orderCatalog14, _val$orderCatalog15, _val$orderCatalog16, _val$dfltOrderUOM7, _val$dfltOrderUOM8, _val$dfltOrderUOM9, _val$dfltOrderUOM10, _val$dfltOrderUOM11, _val$dfltOrderUOM12, _val$IVInfusRateVol2, _val$IVInfusRateVolUO5, _val$IVInfusRateVolUO6, _val$IVInfusRateVolUO7, _val$IVInfusRateVolUO8, _val$IVDosDurValue3, _val$IVDosDurUOM9, _val$IVDosDurUOM10, _val$IVDosDurUOM11, _val$IVDosDurUOM12, _val$IVDosDurValue4, _val$IVDosDurUOM13, _val$IVDosDurUOM14, _val$IVDosDurUOM15, _val$IVDosDurUOM16, _val$dosageFreqCode5, _val$dosageFreqCode6, _val$dosageFreqCode7, _val$dosageFreqCode8, _val$startDay2, _val$dfltDuration2, _val$dfltDurUOM7, _val$dfltDurUOM8, _val$dfltDurUOM9, _val$dfltDurUOM10, _val$dfltDurUOM11, _val$dfltDurUOM12, _val$route6, _val$route7, _val$route8, _val$route9, _val$route$shortdesc2, _val$route10, _val$dfltFreqVal2, _val$dfltFreqValUnit7, _val$dfltFreqValUnit8, _val$dfltFreqValUnit9, _val$dfltFreqValUnit10, _val$dfltFreqValUnit11, _val$dfltFreqValUnit12, _val$dfltFreqRate2, _val$dfltFreqRateUnit7, _val$dfltFreqRateUnit8, _val$dfltFreqRateUnit9, _val$dfltFreqRateUnit10, _val$dfltFreqRateUnit11, _val$dfltFreqRateUnit12, _val$additive2, _val$parentCatSeqNo, _val$parentCatSeqNo2, _val$explNote2, _val$practInstr2, _obj_;
29883
+
29884
+ var obj_ = (_obj_ = {
29885
+ id: (_val$id2 = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id2 !== void 0 ? _val$id2 : 0,
29886
+ _key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : 0,
29887
+ typeId: (_val$ordercategory$_i2 = val === null || val === void 0 ? void 0 : val.ordercategory._id) !== null && _val$ordercategory$_i2 !== void 0 ? _val$ordercategory$_i2 : "",
29888
+ seqNo: (_val$seqNo2 = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo2 !== void 0 ? _val$seqNo2 : "",
29889
+ orderCategory: (_val$ordercategory6 = val === null || val === void 0 ? void 0 : val.ordercategory) !== null && _val$ordercategory6 !== void 0 ? _val$ordercategory6 : {}
29890
+ }, _defineProperty(_obj_, "orderCategory", val !== null && val !== void 0 && (_val$ordercategory7 = val.ordercategory) !== null && _val$ordercategory7 !== void 0 && _val$ordercategory7._id && val !== null && val !== void 0 && (_val$ordercategory8 = val.ordercategory) !== null && _val$ordercategory8 !== void 0 && _val$ordercategory8.shortdesc ? {
29891
+ value: val === null || val === void 0 ? void 0 : (_val$ordercategory9 = val.ordercategory) === null || _val$ordercategory9 === void 0 ? void 0 : _val$ordercategory9._id,
29892
+ label: val === null || val === void 0 ? void 0 : (_val$ordercategory10 = val.ordercategory) === null || _val$ordercategory10 === void 0 ? void 0 : _val$ordercategory10.shortdesc
29893
+ } : {}), _defineProperty(_obj_, "orderTypeDrugType", val !== null && val !== void 0 && (_val$ordertype5 = val.ordertype) !== null && _val$ordertype5 !== void 0 && _val$ordertype5._id && val !== null && val !== void 0 && (_val$ordertype6 = val.ordertype) !== null && _val$ordertype6 !== void 0 && _val$ordertype6.shortdesc ? {
29894
+ value: val === null || val === void 0 ? void 0 : (_val$ordertype7 = val.ordertype) === null || _val$ordertype7 === void 0 ? void 0 : _val$ordertype7._id,
29895
+ label: val === null || val === void 0 ? void 0 : (_val$ordertype8 = val.ordertype) === null || _val$ordertype8 === void 0 ? void 0 : _val$ordertype8.shortdesc
29896
+ } : {}), _defineProperty(_obj_, "orderCatalog", val !== null && val !== void 0 && (_val$orderCatalog9 = val.orderCatalog) !== null && _val$orderCatalog9 !== void 0 && _val$orderCatalog9._id && val !== null && val !== void 0 && (_val$orderCatalog10 = val.orderCatalog) !== null && _val$orderCatalog10 !== void 0 && _val$orderCatalog10.shortdesc ? {
29897
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog11 = val.orderCatalog) === null || _val$orderCatalog11 === void 0 ? void 0 : _val$orderCatalog11._id,
29898
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog12 = val.orderCatalog) === null || _val$orderCatalog12 === void 0 ? void 0 : _val$orderCatalog12.shortdesc
29899
+ } : val !== null && val !== void 0 && (_val$orderCatalog13 = val.orderCatalog) !== null && _val$orderCatalog13 !== void 0 && _val$orderCatalog13._id && val !== null && val !== void 0 && (_val$orderCatalog14 = val.orderCatalog) !== null && _val$orderCatalog14 !== void 0 && _val$orderCatalog14.ShortDesc ? {
29900
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog15 = val.orderCatalog) === null || _val$orderCatalog15 === void 0 ? void 0 : _val$orderCatalog15._id,
29901
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog16 = val.orderCatalog) === null || _val$orderCatalog16 === void 0 ? void 0 : _val$orderCatalog16.ShortDesc
29902
+ } : {}), _defineProperty(_obj_, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj_, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj_, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM7 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM7 !== void 0 && _val$dfltOrderUOM7._id && val !== null && val !== void 0 && (_val$dfltOrderUOM8 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM8 !== void 0 && _val$dfltOrderUOM8.display ? {
29903
+ value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM9 = val.dfltOrderUOM) === null || _val$dfltOrderUOM9 === void 0 ? void 0 : _val$dfltOrderUOM9._id,
29904
+ label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM10 = val.dfltOrderUOM) === null || _val$dfltOrderUOM10 === void 0 ? void 0 : _val$dfltOrderUOM10.display
29905
+ } : {}), _defineProperty(_obj_, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM11 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM11 !== void 0 && _val$dfltOrderUOM11.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM12 = val.dfltOrderUOM) === null || _val$dfltOrderUOM12 === void 0 ? void 0 : _val$dfltOrderUOM12.display) : "-"), _defineProperty(_obj_, "in_infusion_rate_volume_number", (_val$IVInfusRateVol2 = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol2 !== void 0 ? _val$IVInfusRateVol2 : ""), _defineProperty(_obj_, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO5 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO5 !== void 0 && _val$IVInfusRateVolUO5._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO6 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO6 !== void 0 && _val$IVInfusRateVolUO6.display ? {
29906
+ value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO7 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO7 === void 0 ? void 0 : _val$IVInfusRateVolUO7._id,
29907
+ label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO8 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO8 === void 0 ? void 0 : _val$IVInfusRateVolUO8.display
29908
+ } : {}), _defineProperty(_obj_, "in_infusion_rate_duration_number", (_val$IVDosDurValue3 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue3 !== void 0 ? _val$IVDosDurValue3 : ""), _defineProperty(_obj_, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM9 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM9 !== void 0 && _val$IVDosDurUOM9._id && val !== null && val !== void 0 && (_val$IVDosDurUOM10 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM10 !== void 0 && _val$IVDosDurUOM10.display ? {
29909
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM11 = val.IVDosDurUOM) === null || _val$IVDosDurUOM11 === void 0 ? void 0 : _val$IVDosDurUOM11._id,
29910
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM12 = val.IVDosDurUOM) === null || _val$IVDosDurUOM12 === void 0 ? void 0 : _val$IVDosDurUOM12.display
29911
+ } : {}), _defineProperty(_obj_, "iv_dosage_duration_number", (_val$IVDosDurValue4 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue4 !== void 0 ? _val$IVDosDurValue4 : ""), _defineProperty(_obj_, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM13 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM13 !== void 0 && _val$IVDosDurUOM13._id && val !== null && val !== void 0 && (_val$IVDosDurUOM14 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM14 !== void 0 && _val$IVDosDurUOM14.display ? {
29912
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM15 = val.IVDosDurUOM) === null || _val$IVDosDurUOM15 === void 0 ? void 0 : _val$IVDosDurUOM15._id,
29913
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM16 = val.IVDosDurUOM) === null || _val$IVDosDurUOM16 === void 0 ? void 0 : _val$IVDosDurUOM16.display
29914
+ } : {}), _defineProperty(_obj_, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode5 = val.dosageFreqCode) !== null && _val$dosageFreqCode5 !== void 0 && _val$dosageFreqCode5._id && val !== null && val !== void 0 && (_val$dosageFreqCode6 = val.dosageFreqCode) !== null && _val$dosageFreqCode6 !== void 0 && _val$dosageFreqCode6.shortdesc ? {
29915
+ value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode7 = val.dosageFreqCode) === null || _val$dosageFreqCode7 === void 0 ? void 0 : _val$dosageFreqCode7._id,
29916
+ label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode8 = val.dosageFreqCode) === null || _val$dosageFreqCode8 === void 0 ? void 0 : _val$dosageFreqCode8.shortdesc
29917
+ } : {}), _defineProperty(_obj_, "startDay", (_val$startDay2 = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay2 !== void 0 ? _val$startDay2 : ""), _defineProperty(_obj_, "duration_number", (_val$dfltDuration2 = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration2 !== void 0 ? _val$dfltDuration2 : ""), _defineProperty(_obj_, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM7 = val.dfltDurUOM) !== null && _val$dfltDurUOM7 !== void 0 && _val$dfltDurUOM7._id && val !== null && val !== void 0 && (_val$dfltDurUOM8 = val.dfltDurUOM) !== null && _val$dfltDurUOM8 !== void 0 && _val$dfltDurUOM8.display ? {
29918
+ value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM9 = val.dfltDurUOM) === null || _val$dfltDurUOM9 === void 0 ? void 0 : _val$dfltDurUOM9._id,
29919
+ label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM10 = val.dfltDurUOM) === null || _val$dfltDurUOM10 === void 0 ? void 0 : _val$dfltDurUOM10.display
29920
+ } : {}), _defineProperty(_obj_, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM11 = val.dfltDurUOM) !== null && _val$dfltDurUOM11 !== void 0 && _val$dfltDurUOM11.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM12 = val.dfltDurUOM) === null || _val$dfltDurUOM12 === void 0 ? void 0 : _val$dfltDurUOM12.display) : "-"), _defineProperty(_obj_, "route", val !== null && val !== void 0 && (_val$route6 = val.route) !== null && _val$route6 !== void 0 && _val$route6._id && val !== null && val !== void 0 && (_val$route7 = val.route) !== null && _val$route7 !== void 0 && _val$route7.shortdesc ? {
29921
+ value: val === null || val === void 0 ? void 0 : (_val$route8 = val.route) === null || _val$route8 === void 0 ? void 0 : _val$route8._id,
29922
+ label: val === null || val === void 0 ? void 0 : (_val$route9 = val.route) === null || _val$route9 === void 0 ? void 0 : _val$route9.shortdesc
29923
+ } : {}), _defineProperty(_obj_, "routeT", (_val$route$shortdesc2 = val === null || val === void 0 ? void 0 : (_val$route10 = val.route) === null || _val$route10 === void 0 ? void 0 : _val$route10.shortdesc) !== null && _val$route$shortdesc2 !== void 0 ? _val$route$shortdesc2 : "-"), _defineProperty(_obj_, "frequency_number", (_val$dfltFreqVal2 = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal2 !== void 0 ? _val$dfltFreqVal2 : 0), _defineProperty(_obj_, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit7 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit7 !== void 0 && _val$dfltFreqValUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit8 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit8 !== void 0 && _val$dfltFreqValUnit8.display ? {
29924
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit9 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit9 === void 0 ? void 0 : _val$dfltFreqValUnit9._id,
29925
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit10 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit10 === void 0 ? void 0 : _val$dfltFreqValUnit10.display
29926
+ } : {}), _defineProperty(_obj_, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit11 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit11 !== void 0 && _val$dfltFreqValUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit12 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit12 === void 0 ? void 0 : _val$dfltFreqValUnit12.display) : "-"), _defineProperty(_obj_, "rate_number", (_val$dfltFreqRate2 = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate2 !== void 0 ? _val$dfltFreqRate2 : ""), _defineProperty(_obj_, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit7 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit7 !== void 0 && _val$dfltFreqRateUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit8 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit8 !== void 0 && _val$dfltFreqRateUnit8.display ? {
29927
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit9 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit9 === void 0 ? void 0 : _val$dfltFreqRateUnit9._id,
29928
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit10 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit10 === void 0 ? void 0 : _val$dfltFreqRateUnit10.display
29929
+ } : {}), _defineProperty(_obj_, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit11 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit11 !== void 0 && _val$dfltFreqRateUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit12 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit12 === void 0 ? void 0 : _val$dfltFreqRateUnit12.display) : "-"), _defineProperty(_obj_, "additive", (_val$additive2 = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive2 !== void 0 ? _val$additive2 : false), _defineProperty(_obj_, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "parentSequence", (_val$parentCatSeqNo = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo !== void 0 ? _val$parentCatSeqNo : ""), _defineProperty(_obj_, "parentSequenceT", (_val$parentCatSeqNo2 = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo2 !== void 0 ? _val$parentCatSeqNo2 : "-"), _defineProperty(_obj_, "explanatoryNote", (_val$explNote2 = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote2 !== void 0 ? _val$explNote2 : ""), _defineProperty(_obj_, "practitionerInstructions", (_val$practInstr2 = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr2 !== void 0 ? _val$practInstr2 : ""), _obj_);
29930
+ arr_.push(obj_);
29931
+ }
29932
+ });
29933
+ }
29934
+
29870
29935
  return arr_;
29871
29936
  };
29872
29937
 
@@ -30156,9 +30221,9 @@ var ORDER_CATEGORY_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_categ
30156
30221
  }
30157
30222
  }
30158
30223
  }, _callee7, null, [[2, 12]]);
30159
- }))); //ORDER_DRUG_MASTER
30224
+ }))); //ORDER__MASTER
30160
30225
 
30161
- var ORDER_DRUG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
30226
+ var ORDER__MASTER = createAsyncThunk("orderSetMasterApiSlice/order__master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
30162
30227
  var payload,
30163
30228
  _ref13,
30164
30229
  rejectWithValue,
@@ -30177,7 +30242,7 @@ var ORDER_DRUG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_mast
30177
30242
  order_category = payload.order_category;
30178
30243
  _context8.next = 6;
30179
30244
  return fetchData({
30180
- body: JSON.stringify(dynamicMaster.orderDrugType(order_category))
30245
+ body: JSON.stringify(dynamicMaster$1.orderDrugType(order_category))
30181
30246
  }, __readDocumentUrl__);
30182
30247
 
30183
30248
  case 6:
@@ -30209,14 +30274,12 @@ var ORDER_DRUG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_mast
30209
30274
  }
30210
30275
  }
30211
30276
  }, _callee8, null, [[2, 13]]);
30212
- }))); //ORDER_DRUG_CATALOG_MASTER
30277
+ }))); //DRUG__MASTER
30213
30278
 
30214
- var ORDER_DRUG_CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_catalog_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
30279
+ var DRUG__MASTER = createAsyncThunk("orderSetMasterApiSlice/drug__master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
30215
30280
  var payload,
30216
30281
  _ref15,
30217
30282
  rejectWithValue,
30218
- order_category,
30219
- order_drug_type,
30220
30283
  data_arr,
30221
30284
  arry,
30222
30285
  _args9 = arguments;
@@ -30228,10 +30291,12 @@ var ORDER_DRUG_CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_d
30228
30291
  payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
30229
30292
  _ref15 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref15.rejectWithValue;
30230
30293
  _context9.prev = 2;
30231
- order_category = payload.order_category, order_drug_type = payload.order_drug_type;
30294
+
30295
+ _objectDestructuringEmpty(payload);
30296
+
30232
30297
  _context9.next = 6;
30233
30298
  return fetchData({
30234
- body: JSON.stringify(dynamicMaster.orderDrugCatalog(order_category, order_drug_type))
30299
+ body: JSON.stringify(dynamicMaster$1.drugType())
30235
30300
  }, __readDocumentUrl__);
30236
30301
 
30237
30302
  case 6:
@@ -30241,56 +30306,38 @@ var ORDER_DRUG_CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_d
30241
30306
  return data_arr.result.map(function (val) {
30242
30307
  arry.push({
30243
30308
  value: val._id,
30244
- label: val.shortdesc,
30245
- freqApplicable: val !== null && val !== void 0 && val.OrderCatalogByEncounterTypeAge ? constOrderCatalogByEncounterTypeAge(val === null || val === void 0 ? void 0 : val.OrderCatalogByEncounterTypeAge) : false
30309
+ label: val.shortdesc
30246
30310
  });
30247
30311
  });
30248
30312
 
30249
30313
  case 10:
30250
- debugger;
30251
30314
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30252
30315
  data: arry
30253
30316
  }));
30254
30317
 
30255
- case 14:
30256
- _context9.prev = 14;
30318
+ case 13:
30319
+ _context9.prev = 13;
30257
30320
  _context9.t0 = _context9["catch"](2);
30258
30321
  return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30259
30322
  message: _context9.t0.message
30260
30323
  })));
30261
30324
 
30262
- case 17:
30325
+ case 16:
30263
30326
  case "end":
30264
30327
  return _context9.stop();
30265
30328
  }
30266
30329
  }
30267
- }, _callee9, null, [[2, 14]]);
30268
- })));
30269
-
30270
- var constOrderCatalogByEncounterTypeAge = function constOrderCatalogByEncounterTypeAge(data) {
30271
- var _iterator = _createForOfIteratorHelper(data === null || data === void 0 ? void 0 : data.values()),
30272
- _step;
30273
-
30274
- try {
30275
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
30276
- var val = _step.value;
30277
- return val;
30278
- }
30279
- } catch (err) {
30280
- _iterator.e(err);
30281
- } finally {
30282
- _iterator.f();
30283
- }
30284
- }; //UPSERT_ORDER_SET
30330
+ }, _callee9, null, [[2, 13]]);
30331
+ }))); //ORDER__CATALOG_MASTER
30285
30332
 
30286
-
30287
- var UPSERT_ORDER_SET = createAsyncThunk("orderSetMasterApiSlice/order_set_upsertS", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
30333
+ var ORDER__CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order__catalog_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
30288
30334
  var payload,
30289
30335
  _ref17,
30290
30336
  rejectWithValue,
30291
- dataList,
30292
- queriesjson,
30293
- data,
30337
+ order_category,
30338
+ order_drug_type,
30339
+ data_arr,
30340
+ arry,
30294
30341
  _args10 = arguments;
30295
30342
 
30296
30343
  return regeneratorRuntime.wrap(function _callee10$(_context10) {
@@ -30300,42 +30347,52 @@ var UPSERT_ORDER_SET = createAsyncThunk("orderSetMasterApiSlice/order_set_upsert
30300
30347
  payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
30301
30348
  _ref17 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
30302
30349
  _context10.prev = 2;
30303
- dataList = payload.dataList;
30304
- queriesjson = generateJson$1(dataList);
30305
- _context10.next = 7;
30350
+ order_category = payload.order_category, order_drug_type = payload.order_drug_type;
30351
+ _context10.next = 6;
30306
30352
  return fetchData({
30307
- body: JSON.stringify(queriesjson)
30308
- }, __uspsertUrl__);
30353
+ body: JSON.stringify(dynamicMaster$1.orderCatalog(order_category, order_drug_type))
30354
+ }, __readDocumentUrl__);
30309
30355
 
30310
- case 7:
30311
- data = _context10.sent;
30356
+ case 6:
30357
+ data_arr = _context10.sent;
30358
+ arry = [];
30359
+ _context10.next = 10;
30360
+ return data_arr.result.map(function (val) {
30361
+ arry.push({
30362
+ value: val._id,
30363
+ label: val.shortdesc,
30364
+ freqApplicable: val !== null && val !== void 0 && val.OrderCatalogByEncounterTypeAge ? constOrderCatalogByEncounterTypeAge(val === null || val === void 0 ? void 0 : val.OrderCatalogByEncounterTypeAge) : false
30365
+ });
30366
+ });
30367
+
30368
+ case 10:
30369
+ debugger;
30312
30370
  return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30313
- data: data
30371
+ data: arry
30314
30372
  }));
30315
30373
 
30316
- case 11:
30317
- _context10.prev = 11;
30374
+ case 14:
30375
+ _context10.prev = 14;
30318
30376
  _context10.t0 = _context10["catch"](2);
30319
30377
  return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30320
30378
  message: _context10.t0.message
30321
30379
  })));
30322
30380
 
30323
- case 14:
30381
+ case 17:
30324
30382
  case "end":
30325
30383
  return _context10.stop();
30326
30384
  }
30327
30385
  }
30328
- }, _callee10, null, [[2, 11]]);
30329
- }))); //ORDER_SET_SINGLE_READ
30386
+ }, _callee10, null, [[2, 14]]);
30387
+ }))); //DRUG__CATALOG_MASTER
30330
30388
 
30331
- var ORDER_SET_SINGLE_READ = createAsyncThunk("orderSetMasterApiSlice/order_set_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
30389
+ var DRUG__CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/drug__catalog_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
30332
30390
  var payload,
30333
30391
  _ref19,
30334
30392
  rejectWithValue,
30335
- getState,
30336
- _key,
30337
- data,
30338
- readJSON,
30393
+ drug_type,
30394
+ data_arr,
30395
+ arry,
30339
30396
  _args11 = arguments;
30340
30397
 
30341
30398
  return regeneratorRuntime.wrap(function _callee11$(_context11) {
@@ -30343,26 +30400,39 @@ var ORDER_SET_SINGLE_READ = createAsyncThunk("orderSetMasterApiSlice/order_set_s
30343
30400
  switch (_context11.prev = _context11.next) {
30344
30401
  case 0:
30345
30402
  payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
30346
- _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue, getState = _ref19.getState;
30403
+ _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
30347
30404
  _context11.prev = 2;
30348
- _key = payload._key;
30349
- getState();
30350
- _context11.next = 8;
30405
+ drug_type = payload.drug_type;
30406
+ _context11.next = 6;
30351
30407
  return fetchData({
30352
- body: JSON.stringify(query$3.orderSetListById(_key))
30408
+ body: JSON.stringify(dynamicMaster$1.drugCatalog(drug_type))
30353
30409
  }, __readDocumentUrl__);
30354
30410
 
30355
- case 8:
30356
- data = _context11.sent;
30357
- readJSON = generateReadJSON$2(data.result[0] ? data.result[0] : null);
30411
+ case 6:
30412
+ data_arr = _context11.sent;
30413
+ arry = [];
30414
+ _context11.next = 10;
30415
+ return data_arr.result.map(function (val) {
30416
+ arry.push({
30417
+ value: val === null || val === void 0 ? void 0 : val._id,
30418
+ label: val === null || val === void 0 ? void 0 : val.ShortDesc // freqApplicable: val?.OrderCatalogByEncounterTypeAge
30419
+ // ? constOrderCatalogByEncounterTypeAge(
30420
+ // val?.OrderCatalogByEncounterTypeAge
30421
+ // )
30422
+ // : false,
30423
+
30424
+ });
30425
+ });
30426
+
30427
+ case 10:
30428
+ debugger;
30358
30429
  return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30359
- data: readJSON
30430
+ data: arry
30360
30431
  }));
30361
30432
 
30362
- case 13:
30363
- _context11.prev = 13;
30433
+ case 14:
30434
+ _context11.prev = 14;
30364
30435
  _context11.t0 = _context11["catch"](2);
30365
- alert(_context11.t0.message);
30366
30436
  return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30367
30437
  message: _context11.t0.message
30368
30438
  })));
@@ -30372,14 +30442,32 @@ var ORDER_SET_SINGLE_READ = createAsyncThunk("orderSetMasterApiSlice/order_set_s
30372
30442
  return _context11.stop();
30373
30443
  }
30374
30444
  }
30375
- }, _callee11, null, [[2, 13]]);
30376
- }))); //DELETE_ORDER_SET_COMPONENT
30445
+ }, _callee11, null, [[2, 14]]);
30446
+ })));
30447
+
30448
+ var constOrderCatalogByEncounterTypeAge = function constOrderCatalogByEncounterTypeAge(data) {
30449
+ var _iterator = _createForOfIteratorHelper(data === null || data === void 0 ? void 0 : data.values()),
30450
+ _step;
30451
+
30452
+ try {
30453
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
30454
+ var val = _step.value;
30455
+ return val;
30456
+ }
30457
+ } catch (err) {
30458
+ _iterator.e(err);
30459
+ } finally {
30460
+ _iterator.f();
30461
+ }
30462
+ }; //UPSERT_ORDER_SET
30463
+
30377
30464
 
30378
- var DELETE_ORDER_SET_COMPONENT = createAsyncThunk("orderSetMasterApiSlice/order_set_component_delete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
30465
+ var UPSERT_ORDER_SET = createAsyncThunk("orderSetMasterApiSlice/order_set_upsertS", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
30379
30466
  var payload,
30380
30467
  _ref21,
30381
30468
  rejectWithValue,
30382
- _key,
30469
+ dataList,
30470
+ queriesjson,
30383
30471
  data,
30384
30472
  _args12 = arguments;
30385
30473
 
@@ -30390,65 +30478,155 @@ var DELETE_ORDER_SET_COMPONENT = createAsyncThunk("orderSetMasterApiSlice/order_
30390
30478
  payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
30391
30479
  _ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
30392
30480
  _context12.prev = 2;
30393
- _key = payload._key;
30394
- _context12.next = 6;
30481
+ dataList = payload.dataList;
30482
+ queriesjson = generateJson$2(dataList);
30483
+ _context12.next = 7;
30395
30484
  return fetchData({
30396
- body: JSON.stringify(query$3.orderSetComponentDelete(_key))
30397
- }, __softDelete__);
30485
+ body: JSON.stringify(queriesjson)
30486
+ }, __uspsertUrl__);
30398
30487
 
30399
- case 6:
30488
+ case 7:
30400
30489
  data = _context12.sent;
30401
30490
  return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30402
30491
  data: data
30403
30492
  }));
30404
30493
 
30405
- case 10:
30406
- _context12.prev = 10;
30494
+ case 11:
30495
+ _context12.prev = 11;
30407
30496
  _context12.t0 = _context12["catch"](2);
30408
30497
  return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30409
30498
  message: _context12.t0.message
30410
30499
  })));
30411
30500
 
30412
- case 13:
30501
+ case 14:
30413
30502
  case "end":
30414
30503
  return _context12.stop();
30415
30504
  }
30416
30505
  }
30417
- }, _callee12, null, [[2, 10]]);
30418
- })));
30419
- var orderSetMasterSlice = createSlice({
30420
- name: "orderSetMasterApiSlice",
30421
- initialState: {
30422
- order_set_master_list: _objectSpread2({}, defaultState.List),
30423
- order_set_single_read: _objectSpread2({}, defaultState.List),
30424
- order_set_master_status_change: _objectSpread2({}, defaultState.List),
30425
- order_set_masters: _objectSpread2({}, defaultState.List),
30426
- order_drug_masters: _objectSpread2({}, defaultState.List),
30427
- order_drug_catalog_masters: _objectSpread2({}, defaultState.List),
30428
- order_category_masters: _objectSpread2({}, defaultState.List),
30429
- order_set_upsert: _objectSpread2({}, defaultState.List),
30430
- order_set_component_delete: _objectSpread2({}, defaultState.List)
30431
- },
30432
- extraReducers: (_extraReducers$8 = {}, _defineProperty(_extraReducers$8, DELETE_ORDER_SET_COMPONENT.fulfilled, function (state, action) {
30433
- state.order_set_component_delete.loading = false, state.order_set_component_delete.error = false, state.order_set_component_delete = action.payload;
30434
- }), _defineProperty(_extraReducers$8, DELETE_ORDER_SET_COMPONENT.pending, function (state, action) {
30435
- state.order_set_component_delete.loading = true, state.order_set_component_delete.error = false, state.order_set_component_delete.loading = true;
30436
- }), _defineProperty(_extraReducers$8, DELETE_ORDER_SET_COMPONENT.rejected, function (state, action) {
30437
- state.order_set_component_delete.loading = false, state.order_set_component_delete.error = true, state.order_set_component_delete = action.payload;
30438
- }), _defineProperty(_extraReducers$8, GET_ORDER_SET_LIST.fulfilled, function (state, action) {
30439
- state.order_set_master_list.loading = false, state.order_set_master_list.error = false, state.order_set_master_list = action.payload;
30440
- }), _defineProperty(_extraReducers$8, GET_ORDER_SET_LIST.pending, function (state, action) {
30441
- state.order_set_master_list.loading = true, state.order_set_master_list.error = false, state.order_set_master_list.loading = true;
30442
- }), _defineProperty(_extraReducers$8, GET_ORDER_SET_LIST.rejected, function (state, action) {
30443
- state.order_set_master_list.loading = false, state.order_set_master_list.error = true, state.order_set_master_list = action.payload;
30444
- }), _defineProperty(_extraReducers$8, ORDER_SET_SINGLE_READ.fulfilled, function (state, action) {
30445
- state.order_set_single_read.loading = false, state.order_set_single_read.error = false, state.order_set_single_read = action.payload;
30446
- }), _defineProperty(_extraReducers$8, ORDER_SET_SINGLE_READ.pending, function (state, action) {
30447
- state.order_set_single_read.loading = true, state.order_set_single_read.error = false, state.order_set_single_read.loading = true;
30448
- }), _defineProperty(_extraReducers$8, ORDER_SET_SINGLE_READ.rejected, function (state, action) {
30449
- state.order_set_single_read.loading = false, state.order_set_single_read.error = true, state.order_set_single_read = action.payload;
30450
- }), _defineProperty(_extraReducers$8, ORDER_SET_MASTER_STATUS_CHANGE.fulfilled, function (state, action) {
30451
- state.order_set_master_status_change.loading = false, state.order_set_master_status_change.error = false, state.order_set_master_status_change = action.payload;
30506
+ }, _callee12, null, [[2, 11]]);
30507
+ }))); //ORDER_SET_SINGLE_READ
30508
+
30509
+ var ORDER_SET_SINGLE_READ = createAsyncThunk("orderSetMasterApiSlice/order_set_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
30510
+ var payload,
30511
+ _ref23,
30512
+ rejectWithValue,
30513
+ _key,
30514
+ data,
30515
+ readJSON,
30516
+ _args13 = arguments;
30517
+
30518
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
30519
+ while (1) {
30520
+ switch (_context13.prev = _context13.next) {
30521
+ case 0:
30522
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
30523
+ _ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
30524
+ _context13.prev = 2;
30525
+ _key = payload._key;
30526
+ _context13.next = 6;
30527
+ return fetchData({
30528
+ body: JSON.stringify(query$3.orderSetListById(_key))
30529
+ }, __readDocumentUrl__);
30530
+
30531
+ case 6:
30532
+ data = _context13.sent;
30533
+ readJSON = generateReadJSON$2(data.result[0] ? data.result[0] : null);
30534
+ return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30535
+ data: readJSON
30536
+ }));
30537
+
30538
+ case 11:
30539
+ _context13.prev = 11;
30540
+ _context13.t0 = _context13["catch"](2);
30541
+ alert(_context13.t0.message);
30542
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30543
+ message: _context13.t0.message
30544
+ })));
30545
+
30546
+ case 15:
30547
+ case "end":
30548
+ return _context13.stop();
30549
+ }
30550
+ }
30551
+ }, _callee13, null, [[2, 11]]);
30552
+ }))); //DELETE_ORDER_SET_COMPONENT
30553
+
30554
+ var DELETE_ORDER_SET_COMPONENT = createAsyncThunk("orderSetMasterApiSlice/order_set_component_delete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
30555
+ var payload,
30556
+ _ref25,
30557
+ rejectWithValue,
30558
+ _key,
30559
+ data,
30560
+ _args14 = arguments;
30561
+
30562
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
30563
+ while (1) {
30564
+ switch (_context14.prev = _context14.next) {
30565
+ case 0:
30566
+ payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
30567
+ _ref25 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
30568
+ _context14.prev = 2;
30569
+ _key = payload._key;
30570
+ _context14.next = 6;
30571
+ return fetchData({
30572
+ body: JSON.stringify(query$3.orderSetComponentDelete(_key))
30573
+ }, __softDelete__);
30574
+
30575
+ case 6:
30576
+ data = _context14.sent;
30577
+ return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30578
+ data: data
30579
+ }));
30580
+
30581
+ case 10:
30582
+ _context14.prev = 10;
30583
+ _context14.t0 = _context14["catch"](2);
30584
+ return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30585
+ message: _context14.t0.message
30586
+ })));
30587
+
30588
+ case 13:
30589
+ case "end":
30590
+ return _context14.stop();
30591
+ }
30592
+ }
30593
+ }, _callee14, null, [[2, 10]]);
30594
+ })));
30595
+ var orderSetMasterSlice = createSlice({
30596
+ name: "orderSetMasterApiSlice",
30597
+ initialState: {
30598
+ order_set_master_list: _objectSpread2({}, defaultState.List),
30599
+ order_set_single_read: _objectSpread2({}, defaultState.List),
30600
+ order_set_master_status_change: _objectSpread2({}, defaultState.List),
30601
+ order_set_masters: _objectSpread2({}, defaultState.List),
30602
+ order__masters: _objectSpread2({}, defaultState.List),
30603
+ drug__masters: _objectSpread2({}, defaultState.List),
30604
+ order__catalog_masters: _objectSpread2({}, defaultState.List),
30605
+ drug__catalog_masters: _objectSpread2({}, defaultState.List),
30606
+ order_category_masters: _objectSpread2({}, defaultState.List),
30607
+ order_set_upsert: _objectSpread2({}, defaultState.List),
30608
+ order_set_component_delete: _objectSpread2({}, defaultState.List)
30609
+ },
30610
+ extraReducers: (_extraReducers$8 = {}, _defineProperty(_extraReducers$8, DELETE_ORDER_SET_COMPONENT.fulfilled, function (state, action) {
30611
+ state.order_set_component_delete.loading = false, state.order_set_component_delete.error = false, state.order_set_component_delete = action.payload;
30612
+ }), _defineProperty(_extraReducers$8, DELETE_ORDER_SET_COMPONENT.pending, function (state, action) {
30613
+ state.order_set_component_delete.loading = true, state.order_set_component_delete.error = false, state.order_set_component_delete.loading = true;
30614
+ }), _defineProperty(_extraReducers$8, DELETE_ORDER_SET_COMPONENT.rejected, function (state, action) {
30615
+ state.order_set_component_delete.loading = false, state.order_set_component_delete.error = true, state.order_set_component_delete = action.payload;
30616
+ }), _defineProperty(_extraReducers$8, GET_ORDER_SET_LIST.fulfilled, function (state, action) {
30617
+ state.order_set_master_list.loading = false, state.order_set_master_list.error = false, state.order_set_master_list = action.payload;
30618
+ }), _defineProperty(_extraReducers$8, GET_ORDER_SET_LIST.pending, function (state, action) {
30619
+ state.order_set_master_list.loading = true, state.order_set_master_list.error = false, state.order_set_master_list.loading = true;
30620
+ }), _defineProperty(_extraReducers$8, GET_ORDER_SET_LIST.rejected, function (state, action) {
30621
+ state.order_set_master_list.loading = false, state.order_set_master_list.error = true, state.order_set_master_list = action.payload;
30622
+ }), _defineProperty(_extraReducers$8, ORDER_SET_SINGLE_READ.fulfilled, function (state, action) {
30623
+ state.order_set_single_read.loading = false, state.order_set_single_read.error = false, state.order_set_single_read = action.payload;
30624
+ }), _defineProperty(_extraReducers$8, ORDER_SET_SINGLE_READ.pending, function (state, action) {
30625
+ state.order_set_single_read.loading = true, state.order_set_single_read.error = false, state.order_set_single_read.loading = true;
30626
+ }), _defineProperty(_extraReducers$8, ORDER_SET_SINGLE_READ.rejected, function (state, action) {
30627
+ state.order_set_single_read.loading = false, state.order_set_single_read.error = true, state.order_set_single_read = action.payload;
30628
+ }), _defineProperty(_extraReducers$8, ORDER_SET_MASTER_STATUS_CHANGE.fulfilled, function (state, action) {
30629
+ state.order_set_master_status_change.loading = false, state.order_set_master_status_change.error = false, state.order_set_master_status_change = action.payload;
30452
30630
  }), _defineProperty(_extraReducers$8, ORDER_SET_MASTER_STATUS_CHANGE.pending, function (state, action) {
30453
30631
  state.order_set_master_status_change.loading = true, state.order_set_master_status_change.error = false, state.order_set_master_status_change.loading = true;
30454
30632
  }), _defineProperty(_extraReducers$8, ORDER_SET_MASTER_STATUS_CHANGE.rejected, function (state, action) {
@@ -30459,18 +30637,30 @@ var orderSetMasterSlice = createSlice({
30459
30637
  state.order_set_masters.loading = true, state.order_set_masters.error = false, state.order_set_masters.loading = true;
30460
30638
  }), _defineProperty(_extraReducers$8, ORDER_SET_MASTER_MASTER.rejected, function (state, action) {
30461
30639
  state.order_set_masters.loading = false, state.order_set_masters.error = true, state.order_set_masters = action.payload;
30462
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_MASTER.fulfilled, function (state, action) {
30463
- state.order_drug_masters.loading = false, state.order_drug_masters.error = false, state.order_drug_masters = action.payload;
30464
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_MASTER.pending, function (state, action) {
30465
- state.order_drug_masters.loading = true, state.order_drug_masters.error = false, state.order_drug_masters.loading = true;
30466
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_MASTER.rejected, function (state, action) {
30467
- state.order_drug_masters.loading = false, state.order_drug_masters.error = true, state.order_drug_masters = action.payload;
30468
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_CATALOG_MASTER.fulfilled, function (state, action) {
30469
- state.order_drug_catalog_masters.loading = false, state.order_drug_catalog_masters.error = false, state.order_drug_catalog_masters = action.payload;
30470
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_CATALOG_MASTER.pending, function (state, action) {
30471
- state.order_drug_catalog_masters.loading = true, state.order_drug_catalog_masters.error = false, state.order_drug_catalog_masters.loading = true;
30472
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_CATALOG_MASTER.rejected, function (state, action) {
30473
- state.order_drug_catalog_masters.loading = false, state.order_drug_catalog_masters.error = true, state.order_drug_catalog_masters = action.payload;
30640
+ }), _defineProperty(_extraReducers$8, ORDER__MASTER.fulfilled, function (state, action) {
30641
+ state.order__masters.loading = false, state.order__masters.error = false, state.order__masters = action.payload;
30642
+ }), _defineProperty(_extraReducers$8, ORDER__MASTER.pending, function (state, action) {
30643
+ state.order__masters.loading = true, state.order__masters.error = false, state.order__masters.loading = true;
30644
+ }), _defineProperty(_extraReducers$8, ORDER__MASTER.rejected, function (state, action) {
30645
+ state.order__masters.loading = false, state.order__masters.error = true, state.order__masters = action.payload;
30646
+ }), _defineProperty(_extraReducers$8, DRUG__MASTER.fulfilled, function (state, action) {
30647
+ state.drug__masters.loading = false, state.drug__masters.error = false, state.drug__masters = action.payload;
30648
+ }), _defineProperty(_extraReducers$8, DRUG__MASTER.pending, function (state, action) {
30649
+ state.drug__masters.loading = true, state.drug__masters.error = false, state.drug__masters.loading = true;
30650
+ }), _defineProperty(_extraReducers$8, DRUG__MASTER.rejected, function (state, action) {
30651
+ state.drug__masters.loading = false, state.drug__masters.error = true, state.drug__masters = action.payload;
30652
+ }), _defineProperty(_extraReducers$8, ORDER__CATALOG_MASTER.fulfilled, function (state, action) {
30653
+ state.order__catalog_masters.loading = false, state.order__catalog_masters.error = false, state.order__catalog_masters = action.payload;
30654
+ }), _defineProperty(_extraReducers$8, ORDER__CATALOG_MASTER.pending, function (state, action) {
30655
+ state.order__catalog_masters.loading = true, state.order__catalog_masters.error = false, state.order__catalog_masters.loading = true;
30656
+ }), _defineProperty(_extraReducers$8, ORDER__CATALOG_MASTER.rejected, function (state, action) {
30657
+ state.order__catalog_masters.loading = false, state.order__catalog_masters.error = true, state.order__catalog_masters = action.payload;
30658
+ }), _defineProperty(_extraReducers$8, DRUG__CATALOG_MASTER.fulfilled, function (state, action) {
30659
+ state.drug__catalog_masters.loading = false, state.drug__catalog_masters.error = false, state.drug__catalog_masters = action.payload;
30660
+ }), _defineProperty(_extraReducers$8, DRUG__CATALOG_MASTER.pending, function (state, action) {
30661
+ state.drug__catalog_masters.loading = true, state.drug__catalog_masters.error = false, state.drug__catalog_masters.loading = true;
30662
+ }), _defineProperty(_extraReducers$8, DRUG__CATALOG_MASTER.rejected, function (state, action) {
30663
+ state.drug__catalog_masters.loading = false, state.drug__catalog_masters.error = true, state.drug__catalog_masters = action.payload;
30474
30664
  }), _defineProperty(_extraReducers$8, ORDER_CATEGORY_MASTER.fulfilled, function (state, action) {
30475
30665
  state.order_category_masters.loading = false, state.order_category_masters.error = false, state.order_category_masters = action.payload;
30476
30666
  }), _defineProperty(_extraReducers$8, ORDER_CATEGORY_MASTER.pending, function (state, action) {
@@ -30495,8 +30685,10 @@ var orderSetMasterActions = {
30495
30685
  GET_ORDER_SET_LIST: GET_ORDER_SET_LIST,
30496
30686
  ORDER_SET_MASTER_STATUS_CHANGE: ORDER_SET_MASTER_STATUS_CHANGE,
30497
30687
  ORDER_SET_MASTER_MASTER: ORDER_SET_MASTER_MASTER,
30498
- ORDER_DRUG_MASTER: ORDER_DRUG_MASTER,
30499
- ORDER_DRUG_CATALOG_MASTER: ORDER_DRUG_CATALOG_MASTER,
30688
+ ORDER__MASTER: ORDER__MASTER,
30689
+ DRUG__MASTER: DRUG__MASTER,
30690
+ ORDER__CATALOG_MASTER: ORDER__CATALOG_MASTER,
30691
+ DRUG__CATALOG_MASTER: DRUG__CATALOG_MASTER,
30500
30692
  ORDER_CATEGORY_MASTER: ORDER_CATEGORY_MASTER,
30501
30693
  UPSERT_ORDER_SET: UPSERT_ORDER_SET,
30502
30694
  ORDER_SET_SINGLE_READ: ORDER_SET_SINGLE_READ,
@@ -30510,15 +30702,15 @@ var query$2 = {
30510
30702
  db_name: "".concat(dbName),
30511
30703
  entity: "CA_OrderSet_Applicability",
30512
30704
  filter: "CA_OrderSet_Applicability.Ordersetcode=='".concat(_id, "' && CA_OrderSet_Applicability.activestatus==true"),
30513
- return_fields: "merge(CA_OrderSet_Applicability,{Ordersetcode:merge(document(CA_OrderSet_Applicability.Ordersetcode),{components:document(document(CA_OrderSet_Applicability.Ordersetcode).components)}),diagnosisCode:document(CA_OrderSet_Applicability.diagnosisCode),practRoleId:merge(document(CA_OrderSet_Applicability.practRoleId),{name:document(document(CA_OrderSet_Applicability.practRoleId).name)}),practCode:document(CA_OrderSet_Applicability.practCode),specialty:document(CA_OrderSet_Applicability.specialty),locationCode:document(CA_OrderSet_Applicability.locationCode),locationType:document(CA_OrderSet_Applicability.locationType),organizationCode:document(CA_OrderSet_Applicability.organizationCode)})"
30705
+ return_fields: "merge(CA_OrderSet_Applicability,{Ordersetcode:merge(document(CA_OrderSet_Applicability.Ordersetcode),{components:document(document(CA_OrderSet_Applicability.Ordersetcode).components)}),diagnosisCode:document(CA_OrderSet_Applicability.diagnosisCode),practRoleId:merge(document(CA_OrderSet_Applicability.practRoleId),{name:document(document(CA_OrderSet_Applicability.practRoleId).name)}),practCode:document(CA_OrderSet_Applicability.practCode),specialty:document(CA_OrderSet_Applicability.specialty),locationCode:document(CA_OrderSet_Applicability.locationCode),locationType:document(CA_OrderSet_Applicability.locationType),organizationCode:document(CA_OrderSet_Applicability.organizationCode)},{diagGroup:document(CA_OrderSet_Applicability.diagGroup)})"
30514
30706
  };
30515
30707
  },
30516
- orderSetListById: function orderSetListById(_key) {
30708
+ orderSetApplicabilityById: function orderSetApplicabilityById(_key) {
30517
30709
  return {
30518
30710
  db_name: "".concat(dbName),
30519
- entity: "CA_OrderSet",
30520
- filter: "CA_OrderSet._key == '".concat(_key, "' && CA_OrderSet.activestatus == true"),
30521
- return_fields: "merge(CA_OrderSet,{components:(for comp in CA_OrderSet_Components filter comp._id in CA_OrderSet.components return merge(comp,{orderCatalog:merge(document(comp.orderCatalog),{ordertype:document(document(comp.orderCatalog).ordertype)},{ordercategory:document(document(comp.orderCatalog).ordercategory)}),IVDosDurUOM:document(comp.IVDosDurUOM),IVInfusRateUOM:document(comp.IVInfusRateUOM),IVInfusRateVolUOM:document(comp.IVInfusRateVolUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltFreqRateUnit:document(comp.dfltFreqRateUnit),dfltFreqValUnit:document(comp.dfltFreqValUnit),dfltOrderUOM:document(comp.dfltOrderUOM),route:document(comp.route),dosageFreqCode:document(comp.dosageFreqCode)}))})"
30711
+ entity: "CA_OrderSet_Applicability",
30712
+ filter: "CA_OrderSet_Applicability._key=='".concat(_key, "' && CA_OrderSet_Applicability.activestatus==true"),
30713
+ return_fields: "merge(CA_OrderSet_Applicability,{diagGroup:document(CA_OrderSet_Applicability.diagGroup),Ordersetcode:merge(document(CA_OrderSet_Applicability.Ordersetcode),{components:document(document(CA_OrderSet_Applicability.Ordersetcode).components)}),diagnosisCode:document(CA_OrderSet_Applicability.diagnosisCode),practRoleId:merge(document(CA_OrderSet_Applicability.practRoleId),{name:document(document(CA_OrderSet_Applicability.practRoleId).name)}),practCode:document(CA_OrderSet_Applicability.practCode),specialty:document(CA_OrderSet_Applicability.specialty),locationCode:document(CA_OrderSet_Applicability.locationCode),locationType:document(CA_OrderSet_Applicability.locationType),organizationCode:document(CA_OrderSet_Applicability.organizationCode)})"
30522
30714
  };
30523
30715
  },
30524
30716
  status_update_order_set_master: function status_update_order_set_master(data) {
@@ -30556,13 +30748,87 @@ var masterQuery = {
30556
30748
  //coding[0]?.display
30557
30749
  locationType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='LOCATIONTYPE' && (lower(first(document(CodeableConceptMaster.coding)[*].display)) =='ward' || lower(first(document(CodeableConceptMaster.coding)[*].display)) == 'clinic' ) && CodeableConceptMaster.status==true && CodeableConceptMaster.activestatus==true \",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\",\n \"sort\": \"first(document(CodeableConceptMaster.coding)[*].display)\"\n }")
30558
30750
  };
30751
+ var dynamicMaster = {
30752
+ orderSetAppPractitioner: function orderSetAppPractitioner(_id) {
30753
+ return {
30754
+ db_name: "".concat(dbName),
30755
+ entity: "Practitioner",
30756
+ filter: "Practitioner.practitioner_type=='".concat(_id, "' && Practitioner.activestatus==true && Practitioner.active == true"),
30757
+ return_fields: "merge (Practitioner,{name:(for hm in HumanNameMaster filter hm._id in Practitioner.name return merge(hm,{use:(for cod in CodeableConceptMaster filter cod._id== hm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id == hm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id == hm.suffix return document(cod.coding))}))})"
30758
+ };
30759
+ },
30760
+ orderSetAppDiagnosisGroup: function orderSetAppDiagnosisGroup(_id) {
30761
+ return {
30762
+ db_name: "".concat(dbName),
30763
+ entity: "Diagnosis",
30764
+ filter: "Diagnosis.termcode=='".concat(_id, "' && Diagnosis.icdcode == Diagnosis.parenticdcode && Diagnosis.activestatus==true"),
30765
+ return_fields: "KEEP(Diagnosis,'_id','id','_key','icdcode', 'icdname', 'parenticdcode', 'levelnumber')",
30766
+ sort: "Diagnosis.icdname"
30767
+ };
30768
+ },
30769
+ orderSetAppDiagnosisCode: function orderSetAppDiagnosisCode(_id, search) {
30770
+ return {
30771
+ db_name: "".concat(dbName),
30772
+ entity: "Diagnosis",
30773
+ filter: "((Diagnosis.icdcode != Diagnosis.parenticdcode && like (Diagnosis.icdname,'%".concat(search, "%',true)) || Diagnosis.parenticdcode=='").concat(_id, "') && Diagnosis.activestatus==true"),
30774
+ return_fields: "KEEP(Diagnosis,'_id','id','_key','icdcode', 'icdname', 'parenticdcode', 'levelnumber')",
30775
+ sort: "Diagnosis.icdname"
30776
+ };
30777
+ },
30778
+ orderSetAppLocation: function orderSetAppLocation(_id) {
30779
+ return {
30780
+ db_name: "".concat(dbName),
30781
+ entity: "LocationMaster",
30782
+ filter: "LocationMaster.locationType=='".concat(_id, "' && LocationMaster.activestatus==true && LocationMaster.status=='Active'"),
30783
+ return_fields: "KEEP(LocationMaster,'id','_id','key','locationID','longdesc','shortdesc')",
30784
+ sort: "LocationMaster.shortdesc"
30785
+ };
30786
+ }
30787
+ };
30788
+
30789
+ var generateJson$1 = function generateJson(data, orderSetKey) {
30790
+ var _data$id, _data$facility$value, _data$facility, _data$locationType$va, _data$locationType, _data$location$value, _data$location, _data$specialty$value, _data$specialty, _data$practitionerTyp, _data$practitionerTyp2, _data$practitioner$va, _data$practitioner, _data$codeSet$value, _data$codeSet, _data$diagnosisCode$v, _data$diagnosisCode, _data$diagnosisGroup$, _data$diagnosisGroup;
30791
+
30792
+ var filter = {};
30793
+
30794
+ if (data._key) {
30795
+ filter = {
30796
+ filter: {
30797
+ _key: data._key
30798
+ }
30799
+ };
30800
+ }
30801
+
30802
+ var arr = [_objectSpread2(_objectSpread2({
30803
+ db_name: dbName,
30804
+ entity: "CA_OrderSet_Applicability",
30805
+ is_metadata: true,
30806
+ metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
30807
+ }, filter), {}, {
30808
+ doc: {
30809
+ id: (_data$id = data === null || data === void 0 ? void 0 : data.id) !== null && _data$id !== void 0 ? _data$id : 0,
30810
+ organizationCode: (_data$facility$value = data === null || data === void 0 ? void 0 : (_data$facility = data.facility) === null || _data$facility === void 0 ? void 0 : _data$facility.value) !== null && _data$facility$value !== void 0 ? _data$facility$value : "",
30811
+ locationType: (_data$locationType$va = data === null || data === void 0 ? void 0 : (_data$locationType = data.locationType) === null || _data$locationType === void 0 ? void 0 : _data$locationType.value) !== null && _data$locationType$va !== void 0 ? _data$locationType$va : "",
30812
+ locationCode: (_data$location$value = data === null || data === void 0 ? void 0 : (_data$location = data.location) === null || _data$location === void 0 ? void 0 : _data$location.value) !== null && _data$location$value !== void 0 ? _data$location$value : "",
30813
+ specialty: (_data$specialty$value = data === null || data === void 0 ? void 0 : (_data$specialty = data.specialty) === null || _data$specialty === void 0 ? void 0 : _data$specialty.value) !== null && _data$specialty$value !== void 0 ? _data$specialty$value : "",
30814
+ practCode: (_data$practitionerTyp = data === null || data === void 0 ? void 0 : (_data$practitionerTyp2 = data.practitionerType) === null || _data$practitionerTyp2 === void 0 ? void 0 : _data$practitionerTyp2.value) !== null && _data$practitionerTyp !== void 0 ? _data$practitionerTyp : "",
30815
+ practRoleId: (_data$practitioner$va = data === null || data === void 0 ? void 0 : (_data$practitioner = data.practitioner) === null || _data$practitioner === void 0 ? void 0 : _data$practitioner.value) !== null && _data$practitioner$va !== void 0 ? _data$practitioner$va : "",
30816
+ healthcareService: "",
30817
+ diagcodeSet: (_data$codeSet$value = data === null || data === void 0 ? void 0 : (_data$codeSet = data.codeSet) === null || _data$codeSet === void 0 ? void 0 : _data$codeSet.value) !== null && _data$codeSet$value !== void 0 ? _data$codeSet$value : "",
30818
+ diagnosisCode: (_data$diagnosisCode$v = data === null || data === void 0 ? void 0 : (_data$diagnosisCode = data.diagnosisCode) === null || _data$diagnosisCode === void 0 ? void 0 : _data$diagnosisCode.value) !== null && _data$diagnosisCode$v !== void 0 ? _data$diagnosisCode$v : "",
30819
+ diagGroup: (_data$diagnosisGroup$ = data === null || data === void 0 ? void 0 : (_data$diagnosisGroup = data.diagnosisGroup) === null || _data$diagnosisGroup === void 0 ? void 0 : _data$diagnosisGroup.value) !== null && _data$diagnosisGroup$ !== void 0 ? _data$diagnosisGroup$ : "",
30820
+ Ordersetcode: orderSetKey !== null && orderSetKey !== void 0 ? orderSetKey : ""
30821
+ }
30822
+ })];
30823
+ return arr;
30824
+ };
30559
30825
 
30560
30826
  var generateReadJSON$1 = function generateReadJSON(data) {
30561
30827
  var arr = [];
30562
30828
 
30563
30829
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
30564
30830
  data === null || data === void 0 ? void 0 : data.map(function (val, i) {
30565
- var _val$Ordersetcode$_id, _val$Ordersetcode, _val$Ordersetcode$_ke, _val$Ordersetcode2, _val$Ordersetcode$id, _val$Ordersetcode3, _val$Ordersetcode$ord, _val$Ordersetcode4, _val$Ordersetcode$sho, _val$Ordersetcode5, _val$Ordersetcode$lon, _val$Ordersetcode6, _val$Ordersetcode$sta, _val$Ordersetcode7, _val$_id, _val$_key, _val$id, _val$locationCode, _val$locationCode2, _val$locationCode3, _val$locationCode4, _val$locationType, _val$locationType2, _val$locationType3, _val$locationType4, _val$diagnosisCode, _val$diagnosisCode2, _val$diagnosisCode3, _val$diagnosisCode4, _val$diagnosisCode5, _val$diagnosisCode6, _val$diagnosisCode7, _val$diagnosisCode8, _val$organizationCode, _val$organizationCode2, _val$organizationCode3, _val$organizationCode4, _val$practCode, _val$practCode2, _val$practCode3, _val$practCode4, _val$practRoleId, _val$practRoleId2, _val$practRoleId3, _val$practRoleId4, _val$practRoleId4$nam, _val$specialty, _val$specialty2, _val$specialty3, _val$specialty4;
30831
+ var _val$Ordersetcode$_id, _val$Ordersetcode, _val$Ordersetcode$_ke, _val$Ordersetcode2, _val$Ordersetcode$id, _val$Ordersetcode3, _val$Ordersetcode$ord, _val$Ordersetcode4, _val$Ordersetcode$sho, _val$Ordersetcode5, _val$Ordersetcode$lon, _val$Ordersetcode6, _val$Ordersetcode$sta, _val$Ordersetcode7, _val$_id, _val$_key, _val$id, _val$locationCode, _val$locationCode2, _val$locationCode3, _val$locationCode4, _val$locationType, _val$locationType2, _val$locationType3, _val$locationType4, _val$diagGroup, _val$diagGroup2, _val$diagGroup3, _val$diagGroup4, _val$diagnosisCode, _val$diagnosisCode2, _val$diagnosisCode3, _val$diagnosisCode4, _val$organizationCode, _val$organizationCode2, _val$organizationCode3, _val$organizationCode4, _val$practCode, _val$practCode2, _val$practCode3, _val$practCode4, _val$practRoleId, _val$practRoleId2, _val$practRoleId3, _val$practRoleId4, _val$practRoleId4$nam, _val$specialty, _val$specialty2, _val$specialty3, _val$specialty4;
30566
30832
 
30567
30833
  var obj = {
30568
30834
  //ORDER SET DETAILS
@@ -30585,14 +30851,14 @@ var generateReadJSON$1 = function generateReadJSON(data) {
30585
30851
  value: val === null || val === void 0 ? void 0 : (_val$locationType3 = val.locationType) === null || _val$locationType3 === void 0 ? void 0 : _val$locationType3._id,
30586
30852
  label: val === null || val === void 0 ? void 0 : (_val$locationType4 = val.locationType) === null || _val$locationType4 === void 0 ? void 0 : _val$locationType4.display
30587
30853
  } : {},
30588
- diagnosisGroup: val !== null && val !== void 0 && (_val$diagnosisCode = val.diagnosisCode) !== null && _val$diagnosisCode !== void 0 && _val$diagnosisCode.icdname && val !== null && val !== void 0 && (_val$diagnosisCode2 = val.diagnosisCode) !== null && _val$diagnosisCode2 !== void 0 && _val$diagnosisCode2._id ? {
30854
+ diagnosisGroup: val !== null && val !== void 0 && (_val$diagGroup = val.diagGroup) !== null && _val$diagGroup !== void 0 && _val$diagGroup.icdname && val !== null && val !== void 0 && (_val$diagGroup2 = val.diagGroup) !== null && _val$diagGroup2 !== void 0 && _val$diagGroup2._id ? {
30855
+ value: val === null || val === void 0 ? void 0 : (_val$diagGroup3 = val.diagGroup) === null || _val$diagGroup3 === void 0 ? void 0 : _val$diagGroup3._id,
30856
+ label: val === null || val === void 0 ? void 0 : (_val$diagGroup4 = val.diagGroup) === null || _val$diagGroup4 === void 0 ? void 0 : _val$diagGroup4.icdname
30857
+ } : {},
30858
+ diagnosisCode: val !== null && val !== void 0 && (_val$diagnosisCode = val.diagnosisCode) !== null && _val$diagnosisCode !== void 0 && _val$diagnosisCode.icdname && val !== null && val !== void 0 && (_val$diagnosisCode2 = val.diagnosisCode) !== null && _val$diagnosisCode2 !== void 0 && _val$diagnosisCode2._id ? {
30589
30859
  value: val === null || val === void 0 ? void 0 : (_val$diagnosisCode3 = val.diagnosisCode) === null || _val$diagnosisCode3 === void 0 ? void 0 : _val$diagnosisCode3._id,
30590
30860
  label: val === null || val === void 0 ? void 0 : (_val$diagnosisCode4 = val.diagnosisCode) === null || _val$diagnosisCode4 === void 0 ? void 0 : _val$diagnosisCode4.icdname
30591
30861
  } : {},
30592
- diagnosisCode: val !== null && val !== void 0 && (_val$diagnosisCode5 = val.diagnosisCode) !== null && _val$diagnosisCode5 !== void 0 && _val$diagnosisCode5.icdname && val !== null && val !== void 0 && (_val$diagnosisCode6 = val.diagnosisCode) !== null && _val$diagnosisCode6 !== void 0 && _val$diagnosisCode6._id ? {
30593
- value: val === null || val === void 0 ? void 0 : (_val$diagnosisCode7 = val.diagnosisCode) === null || _val$diagnosisCode7 === void 0 ? void 0 : _val$diagnosisCode7._id,
30594
- label: val === null || val === void 0 ? void 0 : (_val$diagnosisCode8 = val.diagnosisCode) === null || _val$diagnosisCode8 === void 0 ? void 0 : _val$diagnosisCode8.icdname
30595
- } : {},
30596
30862
  diagcodeSet: val !== null && val !== void 0 && val.diagcodeSet ? {
30597
30863
  value: val === null || val === void 0 ? void 0 : val.diagcodeSet,
30598
30864
  label: val === null || val === void 0 ? void 0 : val.diagcodeSet
@@ -30620,6 +30886,53 @@ var generateReadJSON$1 = function generateReadJSON(data) {
30620
30886
 
30621
30887
  return arr;
30622
30888
  };
30889
+ var generateSingleReadJSON = function generateSingleReadJSON(data) {
30890
+ var _data$_id, _data$_key, _data$id, _data$locationCode, _data$locationCode2, _data$locationCode3, _data$locationCode4, _data$locationType, _data$locationType2, _data$locationType3, _data$locationType4, _data$diagGroup, _data$diagGroup2, _data$diagGroup3, _data$diagGroup4, _data$diagnosisCode, _data$diagnosisCode2, _data$diagnosisCode3, _data$diagnosisCode4, _data$organizationCod, _data$organizationCod2, _data$organizationCod3, _data$organizationCod4, _data$practCode, _data$practCode2, _data$practCode3, _data$practCode4, _data$practRoleId, _data$practRoleId2, _data$practRoleId3, _data$practRoleId4, _data$practRoleId4$na, _data$specialty, _data$specialty2, _data$specialty3, _data$specialty4;
30891
+
30892
+ var obj = {
30893
+ //ORDER APPLICABILITY DETAILS
30894
+ _id: (_data$_id = data === null || data === void 0 ? void 0 : data._id) !== null && _data$_id !== void 0 ? _data$_id : "",
30895
+ _key: (_data$_key = data === null || data === void 0 ? void 0 : data._key) !== null && _data$_key !== void 0 ? _data$_key : "",
30896
+ id: (_data$id = data === null || data === void 0 ? void 0 : data.id) !== null && _data$id !== void 0 ? _data$id : "",
30897
+ location: data !== null && data !== void 0 && (_data$locationCode = data.locationCode) !== null && _data$locationCode !== void 0 && _data$locationCode._id && data !== null && data !== void 0 && (_data$locationCode2 = data.locationCode) !== null && _data$locationCode2 !== void 0 && _data$locationCode2.longdesc ? {
30898
+ value: data === null || data === void 0 ? void 0 : (_data$locationCode3 = data.locationCode) === null || _data$locationCode3 === void 0 ? void 0 : _data$locationCode3._id,
30899
+ label: data === null || data === void 0 ? void 0 : (_data$locationCode4 = data.locationCode) === null || _data$locationCode4 === void 0 ? void 0 : _data$locationCode4.longdesc
30900
+ } : {},
30901
+ locationType: data !== null && data !== void 0 && (_data$locationType = data.locationType) !== null && _data$locationType !== void 0 && _data$locationType._id && data !== null && data !== void 0 && (_data$locationType2 = data.locationType) !== null && _data$locationType2 !== void 0 && _data$locationType2.display ? {
30902
+ value: data === null || data === void 0 ? void 0 : (_data$locationType3 = data.locationType) === null || _data$locationType3 === void 0 ? void 0 : _data$locationType3._id,
30903
+ label: data === null || data === void 0 ? void 0 : (_data$locationType4 = data.locationType) === null || _data$locationType4 === void 0 ? void 0 : _data$locationType4.display
30904
+ } : {},
30905
+ diagnosisGroup: data !== null && data !== void 0 && (_data$diagGroup = data.diagGroup) !== null && _data$diagGroup !== void 0 && _data$diagGroup.icdname && data !== null && data !== void 0 && (_data$diagGroup2 = data.diagGroup) !== null && _data$diagGroup2 !== void 0 && _data$diagGroup2._id ? {
30906
+ value: data === null || data === void 0 ? void 0 : (_data$diagGroup3 = data.diagGroup) === null || _data$diagGroup3 === void 0 ? void 0 : _data$diagGroup3._id,
30907
+ label: data === null || data === void 0 ? void 0 : (_data$diagGroup4 = data.diagGroup) === null || _data$diagGroup4 === void 0 ? void 0 : _data$diagGroup4.icdname
30908
+ } : {},
30909
+ diagnosisCode: data !== null && data !== void 0 && (_data$diagnosisCode = data.diagnosisCode) !== null && _data$diagnosisCode !== void 0 && _data$diagnosisCode.icdname && data !== null && data !== void 0 && (_data$diagnosisCode2 = data.diagnosisCode) !== null && _data$diagnosisCode2 !== void 0 && _data$diagnosisCode2._id ? {
30910
+ value: data === null || data === void 0 ? void 0 : (_data$diagnosisCode3 = data.diagnosisCode) === null || _data$diagnosisCode3 === void 0 ? void 0 : _data$diagnosisCode3._id,
30911
+ label: data === null || data === void 0 ? void 0 : (_data$diagnosisCode4 = data.diagnosisCode) === null || _data$diagnosisCode4 === void 0 ? void 0 : _data$diagnosisCode4.icdname
30912
+ } : {},
30913
+ codeSet: data !== null && data !== void 0 && data.diagcodeSet ? {
30914
+ value: data === null || data === void 0 ? void 0 : data.diagcodeSet,
30915
+ label: data === null || data === void 0 ? void 0 : data.diagcodeSet
30916
+ } : {},
30917
+ facility: data !== null && data !== void 0 && (_data$organizationCod = data.organizationCode) !== null && _data$organizationCod !== void 0 && _data$organizationCod.name && data !== null && data !== void 0 && (_data$organizationCod2 = data.organizationCode) !== null && _data$organizationCod2 !== void 0 && _data$organizationCod2._id ? {
30918
+ value: data === null || data === void 0 ? void 0 : (_data$organizationCod3 = data.organizationCode) === null || _data$organizationCod3 === void 0 ? void 0 : _data$organizationCod3._id,
30919
+ label: data === null || data === void 0 ? void 0 : (_data$organizationCod4 = data.organizationCode) === null || _data$organizationCod4 === void 0 ? void 0 : _data$organizationCod4.name
30920
+ } : {},
30921
+ practitionerType: data !== null && data !== void 0 && (_data$practCode = data.practCode) !== null && _data$practCode !== void 0 && _data$practCode.shortdesc && data !== null && data !== void 0 && (_data$practCode2 = data.practCode) !== null && _data$practCode2 !== void 0 && _data$practCode2._id ? {
30922
+ value: data === null || data === void 0 ? void 0 : (_data$practCode3 = data.practCode) === null || _data$practCode3 === void 0 ? void 0 : _data$practCode3._id,
30923
+ label: data === null || data === void 0 ? void 0 : (_data$practCode4 = data.practCode) === null || _data$practCode4 === void 0 ? void 0 : _data$practCode4.shortdesc
30924
+ } : {},
30925
+ practitioner: data !== null && data !== void 0 && (_data$practRoleId = data.practRoleId) !== null && _data$practRoleId !== void 0 && _data$practRoleId._id && data !== null && data !== void 0 && (_data$practRoleId2 = data.practRoleId) !== null && _data$practRoleId2 !== void 0 && _data$practRoleId2.name ? {
30926
+ value: data === null || data === void 0 ? void 0 : (_data$practRoleId3 = data.practRoleId) === null || _data$practRoleId3 === void 0 ? void 0 : _data$practRoleId3._id,
30927
+ label: data === null || data === void 0 ? void 0 : (_data$practRoleId4 = data.practRoleId) === null || _data$practRoleId4 === void 0 ? void 0 : (_data$practRoleId4$na = _data$practRoleId4.name[0]) === null || _data$practRoleId4$na === void 0 ? void 0 : _data$practRoleId4$na.text
30928
+ } : {},
30929
+ specialty: data !== null && data !== void 0 && (_data$specialty = data.specialty) !== null && _data$specialty !== void 0 && _data$specialty._id && data !== null && data !== void 0 && (_data$specialty2 = data.specialty) !== null && _data$specialty2 !== void 0 && _data$specialty2.shortdesc ? {
30930
+ value: data === null || data === void 0 ? void 0 : (_data$specialty3 = data.specialty) === null || _data$specialty3 === void 0 ? void 0 : _data$specialty3._id,
30931
+ label: data === null || data === void 0 ? void 0 : (_data$specialty4 = data.specialty) === null || _data$specialty4 === void 0 ? void 0 : _data$specialty4.shortdesc
30932
+ } : {}
30933
+ };
30934
+ return obj;
30935
+ };
30623
30936
 
30624
30937
  var _extraReducers$7;
30625
30938
  var fileds = [//"facilityName",
@@ -30640,14 +30953,13 @@ var loopMasters$1 = function loopMasters() {
30640
30953
  while (1) {
30641
30954
  switch (_context.prev = _context.next) {
30642
30955
  case 0:
30643
- debugger;
30644
- _context.next = 3;
30956
+ _context.next = 2;
30645
30957
  return fetchMaster$1(val, masterQuery[val]);
30646
30958
 
30647
- case 3:
30959
+ case 2:
30648
30960
  return _context.abrupt("return", _context.sent);
30649
30961
 
30650
- case 4:
30962
+ case 3:
30651
30963
  case "end":
30652
30964
  return _context.stop();
30653
30965
  }
@@ -30661,14 +30973,17 @@ var loopMasters$1 = function loopMasters() {
30661
30973
  }());
30662
30974
  es6Promise.Promise.all(calls).then(function (data) {
30663
30975
  var json = {};
30664
- data.map(function (val) {
30976
+ data.map(function (val, i) {
30665
30977
  var arr = [];
30666
- val.data.map(function (value) {
30978
+ val.data.map(function (value, i_) {
30667
30979
  if (fileds.includes(val.name)) {
30668
30980
  if (value.coding[0] !== null) {
30981
+ var _value$coding, _value$coding$, _value$coding2, _value$coding2$;
30982
+
30669
30983
  arr.push({
30670
- label: value.coding[0].display,
30671
- value: value.coding[0]._id
30984
+ label: value === null || value === void 0 ? void 0 : (_value$coding = value.coding) === null || _value$coding === void 0 ? void 0 : (_value$coding$ = _value$coding[0]) === null || _value$coding$ === void 0 ? void 0 : _value$coding$.display,
30985
+ value: value === null || value === void 0 ? void 0 : (_value$coding2 = value.coding) === null || _value$coding2 === void 0 ? void 0 : (_value$coding2$ = _value$coding2[0]) === null || _value$coding2$ === void 0 ? void 0 : _value$coding2$._id,
30986
+ _id: value === null || value === void 0 ? void 0 : value._id
30672
30987
  });
30673
30988
  }
30674
30989
  } else if ("facilityName" === val.name) {
@@ -30677,10 +30992,13 @@ var loopMasters$1 = function loopMasters() {
30677
30992
  value: value._id
30678
30993
  });
30679
30994
  } else if ("codeSet" === val.name) {
30680
- debugger; // arr.push({
30681
- // label: value.name,
30682
- // value: value._id,
30683
- // });
30995
+ var _val$data, _val$data2;
30996
+
30997
+ var obj = {
30998
+ value: val === null || val === void 0 ? void 0 : (_val$data = val.data) === null || _val$data === void 0 ? void 0 : _val$data[i_],
30999
+ label: val === null || val === void 0 ? void 0 : (_val$data2 = val.data) === null || _val$data2 === void 0 ? void 0 : _val$data2[i_]
31000
+ };
31001
+ arr.push(obj);
30684
31002
  }
30685
31003
  });
30686
31004
  json[val.name] = arr;
@@ -30765,212 +31083,74 @@ var GET_ORDER_SET_APPLICABILITY_LIST = createAsyncThunk("orderSetApplicabilitySl
30765
31083
  case 6:
30766
31084
  data = _context4.sent;
30767
31085
  readJSON = generateReadJSON$1(data !== null && data !== void 0 && data.result ? data === null || data === void 0 ? void 0 : data.result : null);
30768
- debugger;
30769
31086
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30770
31087
  data: readJSON
30771
31088
  }));
30772
31089
 
30773
- case 12:
30774
- _context4.prev = 12;
31090
+ case 11:
31091
+ _context4.prev = 11;
30775
31092
  _context4.t0 = _context4["catch"](2);
30776
31093
  return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30777
31094
  message: _context4.t0.message
30778
31095
  })));
30779
31096
 
30780
- case 15:
31097
+ case 14:
30781
31098
  case "end":
30782
31099
  return _context4.stop();
30783
31100
  }
30784
31101
  }
30785
- }, _callee4, null, [[2, 12]]);
30786
- }))); //ORDER_SET_APPLICABILITY_MASTER
31102
+ }, _callee4, null, [[2, 11]]);
31103
+ }))); //GET_ORDER_SET_APPLICABILITY_SINGLE_READ
30787
31104
 
30788
- var ORDER_SET_APPLICABILITY_MASTER = createAsyncThunk("orderSetApplicabilitySlice/order_set_applicability_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
30789
- var _ref7,
31105
+ var GET_ORDER_SET_APPLICABILITY_SINGLE_READ = createAsyncThunk("orderSetApplicabilitySlice/order_set_applicability_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
31106
+ var payload,
31107
+ _ref7,
30790
31108
  rejectWithValue,
31109
+ _data$result,
31110
+ _data$result2,
31111
+ _key,
30791
31112
  data,
31113
+ readJSON,
30792
31114
  _args5 = arguments;
30793
31115
 
30794
31116
  return regeneratorRuntime.wrap(function _callee5$(_context5) {
30795
31117
  while (1) {
30796
31118
  switch (_context5.prev = _context5.next) {
30797
31119
  case 0:
31120
+ payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
30798
31121
  _ref7 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
30799
31122
  _context5.prev = 2;
30800
- _context5.next = 5;
30801
- return loopMasters$1();
31123
+ _key = payload._key;
31124
+ _context5.next = 6;
31125
+ return fetchData({
31126
+ body: JSON.stringify(query$2.orderSetApplicabilityById(_key))
31127
+ }, __readDocumentUrl__);
30802
31128
 
30803
- case 5:
31129
+ case 6:
30804
31130
  data = _context5.sent;
30805
- return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
30806
- data: data
31131
+ readJSON = generateSingleReadJSON(data !== null && data !== void 0 && (_data$result = data.result) !== null && _data$result !== void 0 && _data$result[0] ? data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2[0] : null);
31132
+ return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31133
+ data: readJSON
30807
31134
  }));
30808
31135
 
30809
- case 9:
30810
- _context5.prev = 9;
31136
+ case 11:
31137
+ _context5.prev = 11;
30811
31138
  _context5.t0 = _context5["catch"](2);
30812
31139
  return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30813
31140
  message: _context5.t0.message
30814
31141
  })));
30815
31142
 
30816
- case 12:
31143
+ case 14:
30817
31144
  case "end":
30818
31145
  return _context5.stop();
30819
31146
  }
30820
31147
  }
30821
- }, _callee5, null, [[2, 9]]);
30822
- }))); // //ORDER_CATEGORY_MASTER
30823
- // const ORDER_CATEGORY_MASTER = createAsyncThunk(
30824
- // `orderSetApplicabilitySlice/order_category_master`,
30825
- // async (payload = {}, { rejectWithValue }) => {
30826
- // try {
30827
- // const data_arr = await fetchData(
30828
- // { body: JSON.stringify(orderCategoty.orderCategory()) },
30829
- // __readDocumentUrl__
30830
- // );
30831
- // let arry = [];
30832
- // await data_arr.result.map((val) => {
30833
- // arry.push({
30834
- // value: val._id,
30835
- // label: val.shortdesc,
30836
- // });
30837
- // });
30838
- // return {
30839
- // ...defaultState.List,
30840
- // data: arry,
30841
- // };
30842
- // } catch (error) {
30843
- // return rejectWithValue({
30844
- // ...defaultReject,
30845
- // message: error.message,
30846
- // });
30847
- // }
30848
- // }
30849
- // );
30850
- // //ORDER_DRUG_MASTER
30851
- // const ORDER_DRUG_MASTER = createAsyncThunk(
30852
- // `orderSetApplicabilitySlice/order_drug_master`,
30853
- // async (payload = {}, { rejectWithValue }) => {
30854
- // try {
30855
- // let { order_category } = payload;
30856
- // const data_arr = await fetchData(
30857
- // { body: JSON.stringify(dynamicMaster.orderDrugType(order_category)) },
30858
- // __readDocumentUrl__
30859
- // );
30860
- // let arry = [];
30861
- // await data_arr.result.map((val) => {
30862
- // arry.push({
30863
- // value: val._id,
30864
- // label: val.shortdesc,
30865
- // });
30866
- // });
30867
- // return {
30868
- // ...defaultState.List,
30869
- // data: arry,
30870
- // };
30871
- // } catch (error) {
30872
- // return rejectWithValue({
30873
- // ...defaultReject,
30874
- // message: error.message,
30875
- // });
30876
- // }
30877
- // }
30878
- // );
30879
- // //ORDER_DRUG_CATALOG_MASTER
30880
- // const ORDER_DRUG_CATALOG_MASTER = createAsyncThunk(
30881
- // `orderSetApplicabilitySlice/order_drug_catalog_master`,
30882
- // async (payload = {}, { rejectWithValue }) => {
30883
- // try {
30884
- // let { order_category, order_drug_type } = payload;
30885
- // const data_arr = await fetchData(
30886
- // {
30887
- // body: JSON.stringify(
30888
- // dynamicMaster.orderDrugCatalog(order_category, order_drug_type)
30889
- // ),
30890
- // },
30891
- // __readDocumentUrl__
30892
- // );
30893
- // let arry = [];
30894
- // await data_arr.result.map((val) => {
30895
- // arry.push({
30896
- // value: val._id,
30897
- // label: val.shortdesc,
30898
- // });
30899
- // });
30900
- // return {
30901
- // ...defaultState.List,
30902
- // data: arry,
30903
- // };
30904
- // } catch (error) {
30905
- // return rejectWithValue({
30906
- // ...defaultReject,
30907
- // message: error.message,
30908
- // });
30909
- // }
30910
- // }
30911
- // );
30912
- // //UPSERT_ORDER_SET
30913
- // const UPSERT_ORDER_SET = createAsyncThunk(
30914
- // `orderSetApplicabilitySlice/order_set_upsertS`,
30915
- // async (payload = {}, { rejectWithValue }) => {
30916
- // try {
30917
- // let { dataList } = payload;
30918
- // let queriesjson = generateJson(dataList);
30919
- // const data = await fetchData(
30920
- // { body: JSON.stringify(queriesjson) },
30921
- // __uspsertUrl__
30922
- // );
30923
- // return {
30924
- // ...defaultState.List,
30925
- // data,
30926
- // };
30927
- // } catch (error) {
30928
- // return rejectWithValue({
30929
- // ...defaultReject,
30930
- // message: error.message,
30931
- // });
30932
- // }
30933
- // }
30934
- // );
30935
- // //ORDER_SET_SINGLE_READ
30936
- // const ORDER_SET_SINGLE_READ = createAsyncThunk(
30937
- // `orderSetApplicabilitySlice/order_set_single_read`,
30938
- // async (payload = {}, { rejectWithValue, getState }) => {
30939
- // try {
30940
- // let { _key } = payload;
30941
- // let state = getState();
30942
- // let ccState = state.orderSetMasterSlice;
30943
- // const data = await fetchData(
30944
- // { body: JSON.stringify(query.orderSetListById(_key)) },
30945
- // __readDocumentUrl__
30946
- // );
30947
- // let readJSON = generateReadJSON(
30948
- // data.result[0] ? data.result[0] : null,
30949
- // ccState
30950
- // );
30951
- // return {
30952
- // ...defaultState.List,
30953
- // data: readJSON,
30954
- // };
30955
- // } catch (error) {
30956
- // {
30957
- // alert(error.message);
30958
- // }
30959
- // return rejectWithValue({
30960
- // ...defaultReject,
30961
- // message: error.message,
30962
- // });
30963
- // }
30964
- // }
30965
- // );
30966
- //DELETE_ORDER_SET_COMPONENT
30967
- //DELETE_ORDER_SET_APPLICABILITY
31148
+ }, _callee5, null, [[2, 11]]);
31149
+ }))); //ORDER_SET_APPLICABILITY_MASTER
30968
31150
 
30969
- var DELETE_ORDER_SET_APPLICABILITY = createAsyncThunk("orderSetApplicabilitySlice/order_set_applicability_delete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
30970
- var payload,
30971
- _ref9,
31151
+ var ORDER_SET_APPLICABILITY_MASTER = createAsyncThunk("orderSetApplicabilitySlice/order_set_applicability_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
31152
+ var _ref9,
30972
31153
  rejectWithValue,
30973
- _key,
30974
31154
  data,
30975
31155
  _args6 = arguments;
30976
31156
 
@@ -30978,41 +31158,351 @@ var DELETE_ORDER_SET_APPLICABILITY = createAsyncThunk("orderSetApplicabilitySlic
30978
31158
  while (1) {
30979
31159
  switch (_context6.prev = _context6.next) {
30980
31160
  case 0:
30981
- payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
30982
31161
  _ref9 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
30983
31162
  _context6.prev = 2;
30984
- _key = payload._key;
30985
- _context6.next = 6;
30986
- return fetchData({
30987
- body: JSON.stringify(query$2.orderSetApplicabilityDelete(_key))
30988
- }, __softDelete__);
31163
+ _context6.next = 5;
31164
+ return loopMasters$1();
30989
31165
 
30990
- case 6:
31166
+ case 5:
30991
31167
  data = _context6.sent;
30992
- return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31168
+ return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
30993
31169
  data: data
30994
31170
  }));
30995
31171
 
30996
- case 10:
30997
- _context6.prev = 10;
31172
+ case 9:
31173
+ _context6.prev = 9;
30998
31174
  _context6.t0 = _context6["catch"](2);
30999
31175
  return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31000
31176
  message: _context6.t0.message
31001
31177
  })));
31002
31178
 
31003
- case 13:
31179
+ case 12:
31004
31180
  case "end":
31005
31181
  return _context6.stop();
31006
31182
  }
31007
31183
  }
31008
- }, _callee6, null, [[2, 10]]);
31184
+ }, _callee6, null, [[2, 9]]);
31185
+ }))); //ORDER_SET_APP_PRACTITIONER
31186
+
31187
+ var ORDER_SET_APP_PRACTITIONER = createAsyncThunk("orderSetApplicabilitySlice/order_set_app_practitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
31188
+ var payload,
31189
+ _ref11,
31190
+ rejectWithValue,
31191
+ _id,
31192
+ data_arr,
31193
+ arry,
31194
+ _args7 = arguments;
31195
+
31196
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
31197
+ while (1) {
31198
+ switch (_context7.prev = _context7.next) {
31199
+ case 0:
31200
+ payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
31201
+ _ref11 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
31202
+ _context7.prev = 2;
31203
+ _id = payload._id;
31204
+ _context7.next = 6;
31205
+ return fetchData({
31206
+ body: JSON.stringify(dynamicMaster.orderSetAppPractitioner(_id))
31207
+ }, __readDocumentUrl__);
31208
+
31209
+ case 6:
31210
+ data_arr = _context7.sent;
31211
+ arry = [];
31212
+ _context7.next = 10;
31213
+ return data_arr.result.map(function (val) {
31214
+ var _val$_id, _val$name$0$text, _val$name, _val$name$;
31215
+
31216
+ arry.push({
31217
+ value: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
31218
+ label: (_val$name$0$text = val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : (_val$name$ = _val$name[0]) === null || _val$name$ === void 0 ? void 0 : _val$name$.text) !== null && _val$name$0$text !== void 0 ? _val$name$0$text : ""
31219
+ });
31220
+ });
31221
+
31222
+ case 10:
31223
+ return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31224
+ data: arry
31225
+ }));
31226
+
31227
+ case 13:
31228
+ _context7.prev = 13;
31229
+ _context7.t0 = _context7["catch"](2);
31230
+ return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31231
+ message: _context7.t0.message
31232
+ })));
31233
+
31234
+ case 16:
31235
+ case "end":
31236
+ return _context7.stop();
31237
+ }
31238
+ }
31239
+ }, _callee7, null, [[2, 13]]);
31240
+ }))); //ORDER_SET_APP_DIAGNOSIS_GROUP
31241
+
31242
+ var ORDER_SET_APP_DIAGNOSIS_GROUP = createAsyncThunk("orderSetApplicabilitySlice/order_set_app_diagnosis_group", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
31243
+ var payload,
31244
+ _ref13,
31245
+ rejectWithValue,
31246
+ _id,
31247
+ data_arr,
31248
+ arry,
31249
+ _args8 = arguments;
31250
+
31251
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
31252
+ while (1) {
31253
+ switch (_context8.prev = _context8.next) {
31254
+ case 0:
31255
+ payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
31256
+ _ref13 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref13.rejectWithValue;
31257
+ _context8.prev = 2;
31258
+ _id = payload._id;
31259
+ _context8.next = 6;
31260
+ return fetchData({
31261
+ body: JSON.stringify(dynamicMaster.orderSetAppDiagnosisGroup(_id))
31262
+ }, __readDocumentUrl__);
31263
+
31264
+ case 6:
31265
+ data_arr = _context8.sent;
31266
+ arry = [];
31267
+ _context8.next = 10;
31268
+ return data_arr.result.map(function (val) {
31269
+ var _val$_id2, _val$icdcode;
31270
+
31271
+ arry.push({
31272
+ value: (_val$_id2 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id2 !== void 0 ? _val$_id2 : "",
31273
+ label: (_val$icdcode = val === null || val === void 0 ? void 0 : val.icdcode) !== null && _val$icdcode !== void 0 ? _val$icdcode : ""
31274
+ });
31275
+ });
31276
+
31277
+ case 10:
31278
+ return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31279
+ data: arry
31280
+ }));
31281
+
31282
+ case 13:
31283
+ _context8.prev = 13;
31284
+ _context8.t0 = _context8["catch"](2);
31285
+ return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31286
+ message: _context8.t0.message
31287
+ })));
31288
+
31289
+ case 16:
31290
+ case "end":
31291
+ return _context8.stop();
31292
+ }
31293
+ }
31294
+ }, _callee8, null, [[2, 13]]);
31295
+ }))); //ORDER_SET_APP_DIAGNOSIS_CODE
31296
+
31297
+ var ORDER_SET_APP_DIAGNOSIS_CODE = createAsyncThunk("orderSetApplicabilitySlice/order_set_app_diagnosis_code", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
31298
+ var payload,
31299
+ _ref15,
31300
+ rejectWithValue,
31301
+ _id,
31302
+ search,
31303
+ data_arr,
31304
+ arry,
31305
+ _args9 = arguments;
31306
+
31307
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
31308
+ while (1) {
31309
+ switch (_context9.prev = _context9.next) {
31310
+ case 0:
31311
+ payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
31312
+ _ref15 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref15.rejectWithValue;
31313
+ _context9.prev = 2;
31314
+ _id = payload._id, search = payload.search;
31315
+ _context9.next = 6;
31316
+ return fetchData({
31317
+ body: JSON.stringify(dynamicMaster.orderSetAppDiagnosisCode(_id, search))
31318
+ }, __readDocumentUrl__);
31319
+
31320
+ case 6:
31321
+ data_arr = _context9.sent;
31322
+ arry = [];
31323
+ _context9.next = 10;
31324
+ return data_arr.result.map(function (val) {
31325
+ var _val$_id3, _val$icdname;
31326
+
31327
+ arry.push({
31328
+ value: (_val$_id3 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id3 !== void 0 ? _val$_id3 : "",
31329
+ label: (_val$icdname = val === null || val === void 0 ? void 0 : val.icdname) !== null && _val$icdname !== void 0 ? _val$icdname : ""
31330
+ });
31331
+ });
31332
+
31333
+ case 10:
31334
+ return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31335
+ data: arry
31336
+ }));
31337
+
31338
+ case 13:
31339
+ _context9.prev = 13;
31340
+ _context9.t0 = _context9["catch"](2);
31341
+ return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31342
+ message: _context9.t0.message
31343
+ })));
31344
+
31345
+ case 16:
31346
+ case "end":
31347
+ return _context9.stop();
31348
+ }
31349
+ }
31350
+ }, _callee9, null, [[2, 13]]);
31351
+ }))); //ORDER_SET_APP_LOCATION
31352
+
31353
+ var ORDER_SET_APP_LOCATION = createAsyncThunk("orderSetApplicabilitySlice/order_set_app_location", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
31354
+ var payload,
31355
+ _ref17,
31356
+ rejectWithValue,
31357
+ _id,
31358
+ data_arr,
31359
+ arry,
31360
+ _args10 = arguments;
31361
+
31362
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
31363
+ while (1) {
31364
+ switch (_context10.prev = _context10.next) {
31365
+ case 0:
31366
+ payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
31367
+ _ref17 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
31368
+ _context10.prev = 2;
31369
+ _id = payload._id;
31370
+ _context10.next = 6;
31371
+ return fetchData({
31372
+ body: JSON.stringify(dynamicMaster.orderSetAppLocation(_id))
31373
+ }, __readDocumentUrl__);
31374
+
31375
+ case 6:
31376
+ data_arr = _context10.sent;
31377
+ arry = [];
31378
+ _context10.next = 10;
31379
+ return data_arr.result.map(function (val) {
31380
+ var _val$_id4, _val$shortdesc;
31381
+
31382
+ arry.push({
31383
+ value: (_val$_id4 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id4 !== void 0 ? _val$_id4 : "",
31384
+ label: (_val$shortdesc = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc !== void 0 ? _val$shortdesc : ""
31385
+ });
31386
+ });
31387
+
31388
+ case 10:
31389
+ return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31390
+ data: arry
31391
+ }));
31392
+
31393
+ case 13:
31394
+ _context10.prev = 13;
31395
+ _context10.t0 = _context10["catch"](2);
31396
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31397
+ message: _context10.t0.message
31398
+ })));
31399
+
31400
+ case 16:
31401
+ case "end":
31402
+ return _context10.stop();
31403
+ }
31404
+ }
31405
+ }, _callee10, null, [[2, 13]]);
31406
+ }))); //DELETE_ORDER_SET_APPLICABILITY
31407
+
31408
+ var DELETE_ORDER_SET_APPLICABILITY = createAsyncThunk("orderSetApplicabilitySlice/order_set_applicability_delete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
31409
+ var payload,
31410
+ _ref19,
31411
+ rejectWithValue,
31412
+ _key,
31413
+ data,
31414
+ _args11 = arguments;
31415
+
31416
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
31417
+ while (1) {
31418
+ switch (_context11.prev = _context11.next) {
31419
+ case 0:
31420
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
31421
+ _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
31422
+ _context11.prev = 2;
31423
+ _key = payload._key;
31424
+ _context11.next = 6;
31425
+ return fetchData({
31426
+ body: JSON.stringify(query$2.orderSetApplicabilityDelete(_key))
31427
+ }, __softDelete__);
31428
+
31429
+ case 6:
31430
+ data = _context11.sent;
31431
+ return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31432
+ data: data
31433
+ }));
31434
+
31435
+ case 10:
31436
+ _context11.prev = 10;
31437
+ _context11.t0 = _context11["catch"](2);
31438
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31439
+ message: _context11.t0.message
31440
+ })));
31441
+
31442
+ case 13:
31443
+ case "end":
31444
+ return _context11.stop();
31445
+ }
31446
+ }
31447
+ }, _callee11, null, [[2, 10]]);
31448
+ }))); //ORDER_SET_APPLICABILITY_UPSERT
31449
+
31450
+ var ORDER_SET_APPLICABILITY_UPSERT = createAsyncThunk("orderSetApplicabilitySlice/order_set_applicability_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
31451
+ var payload,
31452
+ _ref21,
31453
+ rejectWithValue,
31454
+ dataList,
31455
+ orderSetKey,
31456
+ queriesjson,
31457
+ data,
31458
+ _args12 = arguments;
31459
+
31460
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
31461
+ while (1) {
31462
+ switch (_context12.prev = _context12.next) {
31463
+ case 0:
31464
+ payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
31465
+ _ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
31466
+ _context12.prev = 2;
31467
+ dataList = payload.dataList, orderSetKey = payload.orderSetKey;
31468
+ queriesjson = generateJson$1(dataList, orderSetKey);
31469
+ _context12.next = 7;
31470
+ return fetchData({
31471
+ body: JSON.stringify(queriesjson)
31472
+ }, __uspsertUrl__);
31473
+
31474
+ case 7:
31475
+ data = _context12.sent;
31476
+ return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
31477
+ data: data
31478
+ }));
31479
+
31480
+ case 11:
31481
+ _context12.prev = 11;
31482
+ _context12.t0 = _context12["catch"](2);
31483
+ return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
31484
+ message: _context12.t0.message
31485
+ })));
31486
+
31487
+ case 14:
31488
+ case "end":
31489
+ return _context12.stop();
31490
+ }
31491
+ }
31492
+ }, _callee12, null, [[2, 11]]);
31009
31493
  })));
31010
31494
  var orderSetApplicabilitySlice = createSlice({
31011
31495
  name: "orderSetApplicabilityApiSlice",
31012
31496
  initialState: {
31013
31497
  order_set_applicability_list: _objectSpread2({}, defaultState.List),
31498
+ order_set_applicability_single_read: _objectSpread2({}, defaultState.List),
31014
31499
  order_set_applicability_master: _objectSpread2({}, defaultState.List),
31015
- order_set_applicability_delete: _objectSpread2({}, defaultState.List)
31500
+ order_set_applicability_delete: _objectSpread2({}, defaultState.List),
31501
+ order_set_app_practitioner: _objectSpread2({}, defaultState.List),
31502
+ order_set_app_diagnosis_group: _objectSpread2({}, defaultState.List),
31503
+ order_set_app_diagnosis_code: _objectSpread2({}, defaultState.List),
31504
+ order_set_app_location: _objectSpread2({}, defaultState.List),
31505
+ order_set_applicability_upsert: _objectSpread2({}, defaultState.List)
31016
31506
  },
31017
31507
  extraReducers: (_extraReducers$7 = {}, _defineProperty(_extraReducers$7, GET_ORDER_SET_APPLICABILITY_LIST.fulfilled, function (state, action) {
31018
31508
  state.order_set_applicability_list.loading = false, state.order_set_applicability_list.error = false, state.order_set_applicability_list = action.payload;
@@ -31020,6 +31510,12 @@ var orderSetApplicabilitySlice = createSlice({
31020
31510
  state.order_set_applicability_list.loading = true, state.order_set_applicability_list.error = false, state.order_set_applicability_list.loading = true;
31021
31511
  }), _defineProperty(_extraReducers$7, GET_ORDER_SET_APPLICABILITY_LIST.rejected, function (state, action) {
31022
31512
  state.order_set_applicability_list.loading = false, state.order_set_applicability_list.error = true, state.order_set_applicability_list = action.payload;
31513
+ }), _defineProperty(_extraReducers$7, GET_ORDER_SET_APPLICABILITY_SINGLE_READ.fulfilled, function (state, action) {
31514
+ state.order_set_applicability_single_read.loading = false, state.order_set_applicability_single_read.error = false, state.order_set_applicability_single_read = action.payload;
31515
+ }), _defineProperty(_extraReducers$7, GET_ORDER_SET_APPLICABILITY_SINGLE_READ.pending, function (state, action) {
31516
+ state.order_set_applicability_single_read.loading = true, state.order_set_applicability_single_read.error = false, state.order_set_applicability_single_read.loading = true;
31517
+ }), _defineProperty(_extraReducers$7, GET_ORDER_SET_APPLICABILITY_SINGLE_READ.rejected, function (state, action) {
31518
+ state.order_set_applicability_single_read.loading = false, state.order_set_applicability_single_read.error = true, state.order_set_applicability_single_read = action.payload;
31023
31519
  }), _defineProperty(_extraReducers$7, ORDER_SET_APPLICABILITY_MASTER.fulfilled, function (state, action) {
31024
31520
  state.order_set_applicability_master.loading = false, state.order_set_applicability_master.error = false, state.order_set_applicability_master = action.payload;
31025
31521
  }), _defineProperty(_extraReducers$7, ORDER_SET_APPLICABILITY_MASTER.pending, function (state, action) {
@@ -31032,12 +31528,48 @@ var orderSetApplicabilitySlice = createSlice({
31032
31528
  state.order_set_applicability_delete.loading = true, state.order_set_applicability_delete.error = false, state.order_set_applicability_delete.loading = true;
31033
31529
  }), _defineProperty(_extraReducers$7, DELETE_ORDER_SET_APPLICABILITY.rejected, function (state, action) {
31034
31530
  state.order_set_applicability_delete.loading = false, state.order_set_applicability_delete.error = true, state.order_set_applicability_delete = action.payload;
31531
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_PRACTITIONER.fulfilled, function (state, action) {
31532
+ state.order_set_app_practitioner.loading = false, state.order_set_app_practitioner.error = false, state.order_set_app_practitioner = action.payload;
31533
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_PRACTITIONER.pending, function (state, action) {
31534
+ state.order_set_app_practitioner.loading = true, state.order_set_app_practitioner.error = false, state.order_set_app_practitioner.loading = true;
31535
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_PRACTITIONER.rejected, function (state, action) {
31536
+ state.order_set_app_practitioner.loading = false, state.order_set_app_practitioner.error = true, state.order_set_app_practitioner = action.payload;
31537
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_DIAGNOSIS_GROUP.fulfilled, function (state, action) {
31538
+ state.order_set_app_diagnosis_group.loading = false, state.order_set_app_diagnosis_group.error = false, state.order_set_app_diagnosis_group = action.payload;
31539
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_DIAGNOSIS_GROUP.pending, function (state, action) {
31540
+ state.order_set_app_diagnosis_group.loading = true, state.order_set_app_diagnosis_group.error = false, state.order_set_app_diagnosis_group.loading = true;
31541
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_DIAGNOSIS_GROUP.rejected, function (state, action) {
31542
+ state.order_set_app_diagnosis_group.loading = false, state.order_set_app_diagnosis_group.error = true, state.order_set_app_diagnosis_group = action.payload;
31543
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_DIAGNOSIS_CODE.fulfilled, function (state, action) {
31544
+ state.order_set_app_diagnosis_code.loading = false, state.order_set_app_diagnosis_code.error = false, state.order_set_app_diagnosis_code = action.payload;
31545
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_DIAGNOSIS_CODE.pending, function (state, action) {
31546
+ state.order_set_app_diagnosis_code.loading = true, state.order_set_app_diagnosis_code.error = false, state.order_set_app_diagnosis_code.loading = true;
31547
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_DIAGNOSIS_CODE.rejected, function (state, action) {
31548
+ state.order_set_app_diagnosis_code.loading = false, state.order_set_app_diagnosis_code.error = true, state.order_set_app_diagnosis_code = action.payload;
31549
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_LOCATION.fulfilled, function (state, action) {
31550
+ state.order_set_app_location.loading = false, state.order_set_app_location.error = false, state.order_set_app_location = action.payload;
31551
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_LOCATION.pending, function (state, action) {
31552
+ state.order_set_app_location.loading = true, state.order_set_app_location.error = false, state.order_set_app_location.loading = true;
31553
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APP_LOCATION.rejected, function (state, action) {
31554
+ state.order_set_app_location.loading = false, state.order_set_app_location.error = true, state.order_set_app_location = action.payload;
31555
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APPLICABILITY_UPSERT.fulfilled, function (state, action) {
31556
+ state.order_set_applicability_upsert.loading = false, state.order_set_applicability_upsert.error = false, state.order_set_applicability_upsert = action.payload;
31557
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APPLICABILITY_UPSERT.pending, function (state, action) {
31558
+ state.order_set_applicability_upsert.loading = true, state.order_set_applicability_upsert.error = false, state.order_set_applicability_upsert.loading = true;
31559
+ }), _defineProperty(_extraReducers$7, ORDER_SET_APPLICABILITY_UPSERT.rejected, function (state, action) {
31560
+ state.order_set_applicability_upsert.loading = false, state.order_set_applicability_upsert.error = true, state.order_set_applicability_upsert = action.payload;
31035
31561
  }), _extraReducers$7)
31036
31562
  });
31037
31563
  var orderSetApplicabilityActions = {
31038
31564
  GET_ORDER_SET_APPLICABILITY_LIST: GET_ORDER_SET_APPLICABILITY_LIST,
31565
+ GET_ORDER_SET_APPLICABILITY_SINGLE_READ: GET_ORDER_SET_APPLICABILITY_SINGLE_READ,
31039
31566
  ORDER_SET_APPLICABILITY_MASTER: ORDER_SET_APPLICABILITY_MASTER,
31040
- DELETE_ORDER_SET_APPLICABILITY: DELETE_ORDER_SET_APPLICABILITY
31567
+ DELETE_ORDER_SET_APPLICABILITY: DELETE_ORDER_SET_APPLICABILITY,
31568
+ ORDER_SET_APP_PRACTITIONER: ORDER_SET_APP_PRACTITIONER,
31569
+ ORDER_SET_APP_DIAGNOSIS_GROUP: ORDER_SET_APP_DIAGNOSIS_GROUP,
31570
+ ORDER_SET_APP_DIAGNOSIS_CODE: ORDER_SET_APP_DIAGNOSIS_CODE,
31571
+ ORDER_SET_APP_LOCATION: ORDER_SET_APP_LOCATION,
31572
+ ORDER_SET_APPLICABILITY_UPSERT: ORDER_SET_APPLICABILITY_UPSERT
31041
31573
  };
31042
31574
  var orderSetApplicabilitySlice$1 = orderSetApplicabilitySlice.reducer;
31043
31575