primary_care_admin_binder 0.1.189 → 0.1.191

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 +443 -222
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8283,9 +8283,10 @@ var fetchData = /*#__PURE__*/function () {
8283
8283
  while (1) switch (_context.n) {
8284
8284
  case 0:
8285
8285
  url = _args.length > 1 && _args[1] !== undefined ? _args[1] : __baseUrl__;
8286
- jwtTokenFromStorage = localStorage.getItem("token");
8286
+ jwtTokenFromStorage = localStorage.getItem("jwttoken");
8287
8287
  __options = {
8288
8288
  method: "POST",
8289
+ credentials: "include",
8289
8290
  headers: jwtTokenFromStorage ? {
8290
8291
  "Content-Type": "application/json",
8291
8292
  "jwtToken": jwtTokenFromStorage
@@ -8392,8 +8393,9 @@ var fetchDataApi = /*#__PURE__*/function () {
8392
8393
  case 0:
8393
8394
  url = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : __baseUrl__;
8394
8395
  input = _args2.length > 1 ? _args2[1] : undefined;
8395
- jwtToken = localStorage.getItem("userInfo"); // get jwt token from local storage
8396
+ jwtToken = localStorage.getItem("jwttoken"); // get jwt token from local storage
8396
8397
  __options = input || {};
8398
+ __options.credentials = "include";
8397
8399
  if (__options.headers) {
8398
8400
  __options.headers.jwttoken = jwtToken;
8399
8401
  } else {
@@ -10383,38 +10385,71 @@ var vitalsMeasureCodeSlice$1 = vitalsMeasureCodeSlice.reducer;
10383
10385
  var query$a = {
10384
10386
  entityName: function entityName(data) {
10385
10387
  return {
10386
- db_name: _dbName,
10388
+ db_name: dbName,
10387
10389
  entity: "Organization",
10388
10390
  sort: "Organization.name",
10389
10391
  filter: "Organization.activestatus==true",
10390
10392
  return_fields: "Organization"
10391
10393
  };
10392
10394
  },
10393
- entityType: "{ \n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\": \"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='ORGTYPE' && CodingMaster.activestatus==true\",\n \"return_fields\": \"CodingMaster\"\n }"),
10394
- gender: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\": \"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='GENDER' && CodingMaster.activestatus==true\",\n \"return_fields\": \"CodingMaster\"\n }"),
10395
+ entityType: function entityType() {
10396
+ return {
10397
+ appcode: dbName,
10398
+ filter: {
10399
+ type: ["ORGTYPE"],
10400
+ tenantid: "",
10401
+ facilityid: "",
10402
+ lang: ""
10403
+ },
10404
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
10405
+ };
10406
+ },
10407
+ gender: function gender() {
10408
+ return {
10409
+ appcode: dbName,
10410
+ filter: {
10411
+ type: ["GENDER"],
10412
+ tenantid: "",
10413
+ facilityid: "",
10414
+ lang: ""
10415
+ },
10416
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
10417
+ };
10418
+ },
10395
10419
  specialityCodeOrgId: function specialityCodeOrgId(data) {
10396
10420
  return {
10397
- db_name: _dbName,
10421
+ db_name: dbName,
10398
10422
  entity: "Organization",
10399
10423
  filter: "Organization._id=='".concat(data.id, "' && Organization.activestatus==true"),
10400
10424
  return_fields: "KEEP(Organization,'_id','id','name','specialtydetails')"
10401
10425
  };
10402
10426
  },
10403
- specialityCode: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"HealthcareService,CodeableConceptMaster\",\n \"filter\":{\"CodeableConceptMaster\":\"CodeableConceptMaster.id IN HealthcareService.SpecialtyID AND CodeableConceptMaster.Type=='SPECIALTY'\"},\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
10404
- diagnosis: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Diagnosis\",\n \"filter\": \"Diagnosis.activestatus==true\",\n \"return_fields\": \"{'_id':Diagnosis._id,'icdcode':Diagnosis.icdcode,'icdname':Diagnosis.icdname,'parenticdcode':Diagnosis.parenticdcode}\"\n }"),
10427
+ specialityCode: function specialityCode() {
10428
+ return {
10429
+ appcode: dbName,
10430
+ filter: {
10431
+ type: ["SPECIALTY"],
10432
+ tenantid: "",
10433
+ facilityid: "",
10434
+ lang: ""
10435
+ },
10436
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
10437
+ };
10438
+ },
10439
+ diagnosis: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Diagnosis\",\n \"filter\": \"Diagnosis.activestatus==true\",\n \"return_fields\": \"{'_id':Diagnosis._id,'icdcode':Diagnosis.icdcode,'icdname':Diagnosis.icdname,'parenticdcode':Diagnosis.parenticdcode}\"\n }"),
10405
10440
  ageRanges: function ageRanges() {
10406
10441
  return {
10407
- appcode: _dbName,
10442
+ appcode: dbName,
10408
10443
  requestid: query_ids["ageRanges"]
10409
10444
  };
10410
10445
  },
10411
- vitalcode: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"VitalsCodes\",\n \"sort\":\"VitalsCodes.vitalscode\",\n \"filter\": \"VitalsCodes.activestatus==true && VitalsCodes.status==true\",\n \"return_fields\": \"KEEP(VitalsCodes,'_id','vitalscode','shortdesc','longdesc')\"\n }"),
10446
+ vitalcode: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"VitalsCodes\",\n \"sort\":\"VitalsCodes.vitalscode\",\n \"filter\": \"VitalsCodes.activestatus==true && VitalsCodes.status==true\",\n \"return_fields\": \"KEEP(VitalsCodes,'_id','vitalscode','shortdesc','longdesc')\"\n }"),
10412
10447
  ageCategory: function ageCategory(ageRangeId) {
10413
10448
  var str = String(ageRangeId || "");
10414
10449
  var idx = str.lastIndexOf("/");
10415
10450
  var key = idx !== -1 ? str.slice(idx + 1) : str;
10416
10451
  return {
10417
- appcode: _dbName,
10452
+ appcode: dbName,
10418
10453
  filter: {
10419
10454
  _id: key || ageRangeId
10420
10455
  },
@@ -10423,7 +10458,7 @@ var query$a = {
10423
10458
  },
10424
10459
  VitalApplicableRead: function VitalApplicableRead(page, perPage, search) {
10425
10460
  return {
10426
- appcode: _dbName,
10461
+ appcode: dbName,
10427
10462
  filter: {
10428
10463
  page: page,
10429
10464
  perPage: perPage,
@@ -10437,7 +10472,7 @@ var query$a = {
10437
10472
  var idx = idStr.lastIndexOf("/");
10438
10473
  var key = idx !== -1 ? idStr.slice(idx + 1) : idStr;
10439
10474
  return {
10440
- appcode: _dbName,
10475
+ appcode: dbName,
10441
10476
  filter: {
10442
10477
  _id: key || id
10443
10478
  },
@@ -10446,7 +10481,7 @@ var query$a = {
10446
10481
  },
10447
10482
  Diagnosis: function Diagnosis(input_text) {
10448
10483
  return {
10449
- db_name: _dbName,
10484
+ db_name: dbName,
10450
10485
  entity: "Diagnosis",
10451
10486
  filter: "Diagnosis.activestatus==true AND Diagnosis.icdname LIKE '%25".concat(input_text, "%25'"),
10452
10487
  return_fields: "KEEP(Diagnosis,'_id','icdcode','icdname','parenticdcode')"
@@ -10828,6 +10863,11 @@ var GET_ENTITY_NAME = createAsyncThunk("vitalApplicableApiSlice/entityName", /*#
10828
10863
  var GET_ENTITY_TYPE_VITALAPP = createAsyncThunk("vitalApplicableApiSlice/entityType", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
10829
10864
  var _ref4,
10830
10865
  rejectWithValue,
10866
+ _ref5,
10867
+ _data$0$ORGTYPE$Value,
10868
+ _data$,
10869
+ queryObj,
10870
+ bodyPayload,
10831
10871
  data,
10832
10872
  resultList,
10833
10873
  arr,
@@ -10838,17 +10878,18 @@ var GET_ENTITY_TYPE_VITALAPP = createAsyncThunk("vitalApplicableApiSlice/entityT
10838
10878
  case 0:
10839
10879
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
10840
10880
  _context2.p = 1;
10881
+ queryObj = typeof query$a.entityType === "function" ? query$a.entityType() : query$a.entityType;
10882
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(queryObj);
10841
10883
  _context2.n = 2;
10842
10884
  return fetchData({
10843
- body: query$a.entityType
10844
- }, __readDocumentUrl__);
10885
+ body: bodyPayload
10886
+ }, __baseUrl__$1);
10845
10887
  case 2:
10846
10888
  data = _context2.v;
10847
- resultList = Array.isArray(data === null || data === void 0 ? void 0 : data.result) ? data.result : Array.isArray(data) ? data : [];
10889
+ resultList = (_ref5 = (_data$0$ORGTYPE$Value = (_data$ = data[0]) === null || _data$ === void 0 || (_data$ = _data$.ORGTYPE) === null || _data$ === void 0 ? void 0 : _data$.Value) !== null && _data$0$ORGTYPE$Value !== void 0 ? _data$0$ORGTYPE$Value : data === null || data === void 0 ? void 0 : data.result) !== null && _ref5 !== void 0 ? _ref5 : Array.isArray(data) ? data : [];
10848
10890
  arr = [];
10849
10891
  resultList.forEach(function (val) {
10850
10892
  if (!val) return;
10851
- // CodingMaster returns {_id, display, ...}, fallback for CodeableConceptMaster coding array
10852
10893
  var codObj = Array.isArray(val === null || val === void 0 ? void 0 : val.coding) && _typeof(val.coding[0]) === "object" ? val.coding[0] : null;
10853
10894
  arr.push({
10854
10895
  value: (codObj === null || codObj === void 0 ? void 0 : codObj._id) || val._id || val.value || "",
@@ -10868,7 +10909,7 @@ var GET_ENTITY_TYPE_VITALAPP = createAsyncThunk("vitalApplicableApiSlice/entityT
10868
10909
  }, _callee2, null, [[1, 3]]);
10869
10910
  })));
10870
10911
  var VITAL_CODE = createAsyncThunk("vitalApplicableApiSlice/vitalCode", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
10871
- var _ref6,
10912
+ var _ref7,
10872
10913
  rejectWithValue,
10873
10914
  data,
10874
10915
  resultList,
@@ -10878,7 +10919,7 @@ var VITAL_CODE = createAsyncThunk("vitalApplicableApiSlice/vitalCode", /*#__PURE
10878
10919
  return _regenerator().w(function (_context3) {
10879
10920
  while (1) switch (_context3.p = _context3.n) {
10880
10921
  case 0:
10881
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
10922
+ _ref7 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
10882
10923
  _context3.p = 1;
10883
10924
  _context3.n = 2;
10884
10925
  return fetchData({
@@ -10910,8 +10951,13 @@ var VITAL_CODE = createAsyncThunk("vitalApplicableApiSlice/vitalCode", /*#__PURE
10910
10951
  }, _callee3, null, [[1, 3]]);
10911
10952
  })));
10912
10953
  var GENDER = createAsyncThunk("vitalApplicableApiSlice/gender", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
10913
- var _ref8,
10954
+ var _ref9,
10914
10955
  rejectWithValue,
10956
+ _ref0,
10957
+ _data$0$GENDER$Value,
10958
+ _data$2,
10959
+ queryObj,
10960
+ bodyPayload,
10915
10961
  data,
10916
10962
  resultList,
10917
10963
  arr,
@@ -10920,19 +10966,20 @@ var GENDER = createAsyncThunk("vitalApplicableApiSlice/gender", /*#__PURE__*/_as
10920
10966
  return _regenerator().w(function (_context4) {
10921
10967
  while (1) switch (_context4.p = _context4.n) {
10922
10968
  case 0:
10923
- _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
10969
+ _ref9 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
10924
10970
  _context4.p = 1;
10971
+ queryObj = typeof query$a.gender === "function" ? query$a.gender() : query$a.gender;
10972
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(queryObj);
10925
10973
  _context4.n = 2;
10926
10974
  return fetchData({
10927
- body: query$a.gender
10928
- }, __readDocumentUrl__);
10975
+ body: bodyPayload
10976
+ }, __baseUrl__$1);
10929
10977
  case 2:
10930
10978
  data = _context4.v;
10931
- resultList = Array.isArray(data === null || data === void 0 ? void 0 : data.result) ? data.result : Array.isArray(data) ? data : [];
10979
+ resultList = (_ref0 = (_data$0$GENDER$Value = (_data$2 = data[0]) === null || _data$2 === void 0 || (_data$2 = _data$2.GENDER) === null || _data$2 === void 0 ? void 0 : _data$2.Value) !== null && _data$0$GENDER$Value !== void 0 ? _data$0$GENDER$Value : data === null || data === void 0 ? void 0 : data.result) !== null && _ref0 !== void 0 ? _ref0 : Array.isArray(data) ? data : [];
10932
10980
  arr = [];
10933
10981
  resultList.forEach(function (val) {
10934
10982
  if (!val) return;
10935
- // CodingMaster returns {_id, display, ...}, fallback for CodeableConceptMaster coding array
10936
10983
  var codObj = Array.isArray(val === null || val === void 0 ? void 0 : val.coding) && _typeof(val.coding[0]) === "object" ? val.coding[0] : null;
10937
10984
  var idVal = String((codObj === null || codObj === void 0 ? void 0 : codObj._id) || val._id || val.value || "");
10938
10985
  arr.push(_objectSpread2(_objectSpread2({}, val), {}, {
@@ -10954,8 +11001,13 @@ var GENDER = createAsyncThunk("vitalApplicableApiSlice/gender", /*#__PURE__*/_as
10954
11001
  }, _callee4, null, [[1, 3]]);
10955
11002
  })));
10956
11003
  var SPECIALITY_CODE = createAsyncThunk("vitalApplicableApiSlice/specialityCode", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
10957
- var _ref0,
11004
+ var _ref10,
10958
11005
  rejectWithValue,
11006
+ _ref11,
11007
+ _data$0$SPECIALTY$Val,
11008
+ _data$3,
11009
+ queryObj,
11010
+ bodyPayload,
10959
11011
  data,
10960
11012
  resultList,
10961
11013
  arr,
@@ -10964,15 +11016,17 @@ var SPECIALITY_CODE = createAsyncThunk("vitalApplicableApiSlice/specialityCode",
10964
11016
  return _regenerator().w(function (_context5) {
10965
11017
  while (1) switch (_context5.p = _context5.n) {
10966
11018
  case 0:
10967
- _ref0 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref0.rejectWithValue;
11019
+ _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
10968
11020
  _context5.p = 1;
11021
+ queryObj = typeof query$a.specialityCode === "function" ? query$a.specialityCode() : query$a.specialityCode;
11022
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(queryObj);
10969
11023
  _context5.n = 2;
10970
11024
  return fetchData({
10971
- body: query$a.specialityCode
10972
- }, __readDocumentUrl__);
11025
+ body: bodyPayload
11026
+ }, __baseUrl__$1);
10973
11027
  case 2:
10974
11028
  data = _context5.v;
10975
- resultList = Array.isArray(data === null || data === void 0 ? void 0 : data.result) ? data.result : Array.isArray(data) ? data : [];
11029
+ resultList = (_ref11 = (_data$0$SPECIALTY$Val = (_data$3 = data[0]) === null || _data$3 === void 0 || (_data$3 = _data$3.SPECIALTY) === null || _data$3 === void 0 ? void 0 : _data$3.Value) !== null && _data$0$SPECIALTY$Val !== void 0 ? _data$0$SPECIALTY$Val : data === null || data === void 0 ? void 0 : data.result) !== null && _ref11 !== void 0 ? _ref11 : Array.isArray(data) ? data : [];
10976
11030
  arr = [];
10977
11031
  resultList.forEach(function (val) {
10978
11032
  if (!val) return;
@@ -10995,7 +11049,7 @@ var SPECIALITY_CODE = createAsyncThunk("vitalApplicableApiSlice/specialityCode",
10995
11049
  }, _callee5, null, [[1, 3]]);
10996
11050
  })));
10997
11051
  var DIAGNOSIS = createAsyncThunk("vitalApplicableApiSlice/diagnosis", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
10998
- var _ref10,
11052
+ var _ref13,
10999
11053
  rejectWithValue,
11000
11054
  data,
11001
11055
  resultList,
@@ -11005,7 +11059,7 @@ var DIAGNOSIS = createAsyncThunk("vitalApplicableApiSlice/diagnosis", /*#__PURE_
11005
11059
  return _regenerator().w(function (_context6) {
11006
11060
  while (1) switch (_context6.p = _context6.n) {
11007
11061
  case 0:
11008
- _ref10 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
11062
+ _ref13 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref13.rejectWithValue;
11009
11063
  _context6.p = 1;
11010
11064
  _context6.n = 2;
11011
11065
  return fetchData({
@@ -11036,7 +11090,7 @@ var DIAGNOSIS = createAsyncThunk("vitalApplicableApiSlice/diagnosis", /*#__PURE_
11036
11090
  })));
11037
11091
  var DIAGNOSIS_MASTERS = createAsyncThunk("vitalApplicableApiSlice/diagnosisMaster", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
11038
11092
  var payload,
11039
- _ref12,
11093
+ _ref15,
11040
11094
  rejectWithValue,
11041
11095
  input_text,
11042
11096
  data,
@@ -11048,7 +11102,7 @@ var DIAGNOSIS_MASTERS = createAsyncThunk("vitalApplicableApiSlice/diagnosisMaste
11048
11102
  while (1) switch (_context7.p = _context7.n) {
11049
11103
  case 0:
11050
11104
  payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
11051
- _ref12 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
11105
+ _ref15 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref15.rejectWithValue;
11052
11106
  _context7.p = 1;
11053
11107
  input_text = payload.input_text;
11054
11108
  _context7.n = 2;
@@ -11079,12 +11133,12 @@ var DIAGNOSIS_MASTERS = createAsyncThunk("vitalApplicableApiSlice/diagnosisMaste
11079
11133
  }, _callee7, null, [[1, 3]]);
11080
11134
  })));
11081
11135
  var AGE_RANGES_CODE = createAsyncThunk("vitalApplicableApiSlice/agerangesCode", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
11082
- var _ref14,
11136
+ var _ref17,
11083
11137
  rejectWithValue,
11084
11138
  data,
11085
11139
  result,
11086
11140
  _data$0$result,
11087
- _data$,
11141
+ _data$4,
11088
11142
  _data$result,
11089
11143
  getRawId,
11090
11144
  arr,
@@ -11093,7 +11147,7 @@ var AGE_RANGES_CODE = createAsyncThunk("vitalApplicableApiSlice/agerangesCode",
11093
11147
  return _regenerator().w(function (_context8) {
11094
11148
  while (1) switch (_context8.p = _context8.n) {
11095
11149
  case 0:
11096
- _ref14 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
11150
+ _ref17 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
11097
11151
  _context8.p = 1;
11098
11152
  _context8.n = 2;
11099
11153
  return fetchData({
@@ -11103,7 +11157,7 @@ var AGE_RANGES_CODE = createAsyncThunk("vitalApplicableApiSlice/agerangesCode",
11103
11157
  data = _context8.v;
11104
11158
  result = [];
11105
11159
  if (Array.isArray(data)) {
11106
- result = (_data$0$result = (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.result) !== null && _data$0$result !== void 0 ? _data$0$result : data;
11160
+ result = (_data$0$result = (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : _data$4.result) !== null && _data$0$result !== void 0 ? _data$0$result : data;
11107
11161
  } else {
11108
11162
  result = (_data$result = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result !== void 0 ? _data$result : [];
11109
11163
  }
@@ -11141,13 +11195,13 @@ var AGE_RANGES_CODE = createAsyncThunk("vitalApplicableApiSlice/agerangesCode",
11141
11195
  })));
11142
11196
  var AGE_RANGES_CATEGORY = createAsyncThunk("vitalApplicableApiSlice/agerangesCategory", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
11143
11197
  var payload,
11144
- _ref16,
11198
+ _ref19,
11145
11199
  rejectWithValue,
11146
11200
  ageRangeId,
11147
11201
  data,
11148
11202
  dataResult,
11149
11203
  _data$0$result2,
11150
- _data$2,
11204
+ _data$5,
11151
11205
  _data$result2,
11152
11206
  arr,
11153
11207
  _args9 = arguments,
@@ -11156,7 +11210,7 @@ var AGE_RANGES_CATEGORY = createAsyncThunk("vitalApplicableApiSlice/agerangesCat
11156
11210
  while (1) switch (_context9.p = _context9.n) {
11157
11211
  case 0:
11158
11212
  payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
11159
- _ref16 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
11213
+ _ref19 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
11160
11214
  _context9.p = 1;
11161
11215
  ageRangeId = payload.ageRangeId;
11162
11216
  _context9.n = 2;
@@ -11167,7 +11221,7 @@ var AGE_RANGES_CATEGORY = createAsyncThunk("vitalApplicableApiSlice/agerangesCat
11167
11221
  data = _context9.v;
11168
11222
  dataResult = [];
11169
11223
  if (Array.isArray(data)) {
11170
- dataResult = (_data$0$result2 = (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : _data$2.result) !== null && _data$0$result2 !== void 0 ? _data$0$result2 : data;
11224
+ dataResult = (_data$0$result2 = (_data$5 = data[0]) === null || _data$5 === void 0 ? void 0 : _data$5.result) !== null && _data$0$result2 !== void 0 ? _data$0$result2 : data;
11171
11225
  } else {
11172
11226
  dataResult = (_data$result2 = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result2 !== void 0 ? _data$result2 : [];
11173
11227
  }
@@ -11200,7 +11254,7 @@ var AGE_RANGES_CATEGORY = createAsyncThunk("vitalApplicableApiSlice/agerangesCat
11200
11254
  })));
11201
11255
  var SAVE_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/savevitalapplicable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
11202
11256
  var payload,
11203
- _ref18,
11257
+ _ref21,
11204
11258
  rejectWithValue,
11205
11259
  list,
11206
11260
  body,
@@ -11212,7 +11266,7 @@ var SAVE_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/savevitala
11212
11266
  while (1) switch (_context0.p = _context0.n) {
11213
11267
  case 0:
11214
11268
  payload = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : {};
11215
- _ref18 = _args0.length > 1 ? _args0[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
11269
+ _ref21 = _args0.length > 1 ? _args0[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
11216
11270
  _context0.p = 1;
11217
11271
  list = payload.list;
11218
11272
  body = generateSaveJSON$1(list);
@@ -11237,7 +11291,7 @@ var SAVE_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/savevitala
11237
11291
  })));
11238
11292
  var READ_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/vitalsapplicableread", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
11239
11293
  var payload,
11240
- _ref20,
11294
+ _ref23,
11241
11295
  rejectWithValue,
11242
11296
  getState,
11243
11297
  search,
@@ -11255,7 +11309,7 @@ var READ_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/vitalsappl
11255
11309
  while (1) switch (_context1.p = _context1.n) {
11256
11310
  case 0:
11257
11311
  payload = _args1.length > 0 && _args1[0] !== undefined ? _args1[0] : {};
11258
- _ref20 = _args1.length > 1 ? _args1[1] : undefined, rejectWithValue = _ref20.rejectWithValue, getState = _ref20.getState;
11312
+ _ref23 = _args1.length > 1 ? _args1[1] : undefined, rejectWithValue = _ref23.rejectWithValue, getState = _ref23.getState;
11259
11313
  _context1.p = 1;
11260
11314
  search = payload.search;
11261
11315
  state = getState();
@@ -11302,7 +11356,7 @@ var READ_VITAL_APPLICABLE = createAsyncThunk("vitalApplicableApiSlice/vitalsappl
11302
11356
  })));
11303
11357
  var UPDATE_VITAL_APPLICABLE_STATUS = createAsyncThunk("vitalApplicableApiSlice/vitalsApplicableUpdate", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
11304
11358
  var payload,
11305
- _ref22,
11359
+ _ref25,
11306
11360
  rejectWithValue,
11307
11361
  editId,
11308
11362
  status,
@@ -11314,7 +11368,7 @@ var UPDATE_VITAL_APPLICABLE_STATUS = createAsyncThunk("vitalApplicableApiSlice/v
11314
11368
  while (1) switch (_context10.p = _context10.n) {
11315
11369
  case 0:
11316
11370
  payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
11317
- _ref22 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
11371
+ _ref25 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
11318
11372
  _context10.p = 1;
11319
11373
  editId = payload.editId, status = payload.status;
11320
11374
  body = generateApplicableUpdateJSON(editId, status);
@@ -11338,7 +11392,7 @@ var UPDATE_VITAL_APPLICABLE_STATUS = createAsyncThunk("vitalApplicableApiSlice/v
11338
11392
  })));
11339
11393
  var EDIT_VITAL_APPLICABLE = createAsyncThunk("vitalsApplicableSlice/editvitalApplicable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
11340
11394
  var payload,
11341
- _ref24,
11395
+ _ref27,
11342
11396
  rejectWithValue,
11343
11397
  getState,
11344
11398
  id,
@@ -11356,7 +11410,7 @@ var EDIT_VITAL_APPLICABLE = createAsyncThunk("vitalsApplicableSlice/editvitalApp
11356
11410
  while (1) switch (_context11.p = _context11.n) {
11357
11411
  case 0:
11358
11412
  payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
11359
- _ref24 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref24.rejectWithValue, getState = _ref24.getState;
11413
+ _ref27 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref27.rejectWithValue, getState = _ref27.getState;
11360
11414
  _context11.p = 1;
11361
11415
  id = payload.id;
11362
11416
  state = getState();
@@ -11403,7 +11457,7 @@ var EDIT_VITAL_APPLICABLE = createAsyncThunk("vitalsApplicableSlice/editvitalApp
11403
11457
  }, _callee11, null, [[1, 3]]);
11404
11458
  })));
11405
11459
  var SPECIALITY_CODE_ORG_ID = createAsyncThunk("vitalApplicableApiSlice/specialityCodeOrgid", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
11406
- var _ref26,
11460
+ var _ref29,
11407
11461
  rejectWithValue,
11408
11462
  _query$ageRanges,
11409
11463
  specialtyQuery,
@@ -11415,7 +11469,7 @@ var SPECIALITY_CODE_ORG_ID = createAsyncThunk("vitalApplicableApiSlice/specialit
11415
11469
  return _regenerator().w(function (_context12) {
11416
11470
  while (1) switch (_context12.p = _context12.n) {
11417
11471
  case 0:
11418
- _ref26 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
11472
+ _ref29 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
11419
11473
  _context12.p = 1;
11420
11474
  // Query CodingMaster for SPECIALTY type codes (org-independent)
11421
11475
  specialtyQuery = JSON.stringify({
@@ -11577,13 +11631,46 @@ var vitalsApplicableActions = {
11577
11631
  var vitalsApplicableSlice$1 = vitalsApplicableSlice.reducer;
11578
11632
 
11579
11633
  var query$9 = {
11580
- gender: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"sort\":\"CodingMaster.display\",\n \"filter\": \"CodingMaster.Type=='GENDER' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"CodingMaster\"\n }"),
11581
- unitAllowed: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"VitalsMeasureCodes\",\n \"sort\":\"VitalsMeasureCodes.ObsValMeasCode\",\n \"filter\": \"VitalsMeasureCodes.activestatus==true && VitalsMeasureCodes.status==true\",\n \"return_fields\": \"VitalsMeasureCodes\"\n }"),
11582
- referenceUnitAllowed: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type == 'VITALSUOM' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status','shortdesc','longdesc','activestatus')\",\n \"sort\": \"CodingMaster.display\"\n }"),
11583
- referenceCodeableConcepts: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type == 'VITALSUOM' && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true\",\n \"return_fields\": \"KEEP(CodeableConceptMaster, '_id', 'coding')\"\n }"),
11634
+ gender: function gender() {
11635
+ return {
11636
+ appcode: dbName,
11637
+ filter: {
11638
+ type: ["GENDER"],
11639
+ tenantid: "",
11640
+ facilityid: "",
11641
+ lang: ""
11642
+ },
11643
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
11644
+ };
11645
+ },
11646
+ unitAllowed: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"VitalsMeasureCodes\",\n \"sort\":\"VitalsMeasureCodes.ObsValMeasCode\",\n \"filter\": \"VitalsMeasureCodes.activestatus==true && VitalsMeasureCodes.status==true\",\n \"return_fields\": \"VitalsMeasureCodes\"\n }"),
11647
+ referenceUnitAllowed: function referenceUnitAllowed() {
11648
+ return {
11649
+ appcode: dbName,
11650
+ filter: {
11651
+ type: ["VITALSUOM"],
11652
+ tenantid: "",
11653
+ facilityid: "",
11654
+ lang: ""
11655
+ },
11656
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
11657
+ };
11658
+ },
11659
+ referenceCodeableConcepts: function referenceCodeableConcepts() {
11660
+ return {
11661
+ appcode: dbName,
11662
+ filter: {
11663
+ type: ["VITALSUOM"],
11664
+ tenantid: "",
11665
+ facilityid: "",
11666
+ lang: ""
11667
+ },
11668
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
11669
+ };
11670
+ },
11584
11671
  ageRanges: function ageRanges() {
11585
11672
  return {
11586
- appcode: _dbName,
11673
+ appcode: dbName,
11587
11674
  requestid: query_ids["ageRanges"]
11588
11675
  };
11589
11676
  },
@@ -11592,17 +11679,17 @@ var query$9 = {
11592
11679
  var idx = str.lastIndexOf("/");
11593
11680
  var key = idx !== -1 ? str.slice(idx + 1) : str;
11594
11681
  return {
11595
- appcode: _dbName,
11682
+ appcode: dbName,
11596
11683
  filter: {
11597
11684
  _id: key || ageRangeId
11598
11685
  },
11599
11686
  requestid: query_ids.ageCategory
11600
11687
  };
11601
11688
  },
11602
- category: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"AgeCategory\",\n \"filter\": \"AgeCategory.activestatus==true\",\n \"return_fields\": \"{_id:AgeCategory._id, id:AgeCategory.id, code:AgeCategory.code, age_minimum:AgeCategory.age_minimum, age_maximum:AgeCategory.age_maximum, UOM:AgeCategory.UOM}\"\n}"),
11689
+ category: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"AgeCategory\",\n \"filter\": \"AgeCategory.activestatus==true\",\n \"return_fields\": \"{_id:AgeCategory._id, id:AgeCategory.id, code:AgeCategory.code, age_minimum:AgeCategory.age_minimum, age_maximum:AgeCategory.age_maximum, UOM:AgeCategory.UOM}\"\n}"),
11603
11690
  defaultUnit: function defaultUnit(AllowedUnit) {
11604
11691
  return {
11605
- db_name: _dbName,
11692
+ db_name: dbName,
11606
11693
  entity: "VitalsMeasureCodes",
11607
11694
  filter: "VitalsMeasureCodes.activestatus==true && VitalsMeasureCodes._id IN ('".concat(AllowedUnit.join("','"), "')"),
11608
11695
  return_fields: "VitalsMeasureCodes"
@@ -11610,7 +11697,7 @@ var query$9 = {
11610
11697
  },
11611
11698
  VitalReadSearch: function VitalReadSearch(page, perPage, search) {
11612
11699
  return {
11613
- appcode: _dbName,
11700
+ appcode: dbName,
11614
11701
  filter: {
11615
11702
  searchval: search,
11616
11703
  page: page,
@@ -11621,7 +11708,7 @@ var query$9 = {
11621
11708
  },
11622
11709
  VitalRead: function VitalRead(page, perPage) {
11623
11710
  return {
11624
- appcode: _dbName,
11711
+ appcode: dbName,
11625
11712
  filter: {
11626
11713
  page: page,
11627
11714
  perPage: perPage
@@ -11631,7 +11718,7 @@ var query$9 = {
11631
11718
  },
11632
11719
  editVitalmaster: function editVitalmaster(_id) {
11633
11720
  return {
11634
- appcode: _dbName,
11721
+ appcode: dbName,
11635
11722
  filter: {
11636
11723
  _id: _id
11637
11724
  },
@@ -11640,7 +11727,7 @@ var query$9 = {
11640
11727
  },
11641
11728
  deleteVitalMaster: function deleteVitalMaster(id) {
11642
11729
  return {
11643
- appcode: _dbName,
11730
+ appcode: dbName,
11644
11731
  entity: "VitalsCodes",
11645
11732
  filter: "VitalsCodes._id=='".concat(id, "'")
11646
11733
  };
@@ -11880,9 +11967,14 @@ var _extraReducers$y;
11880
11967
  var MASTER_GENDER = createAsyncThunk("vitalsMasterSectionApiSlice/gender", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
11881
11968
  var _ref2,
11882
11969
  rejectWithValue,
11883
- _data$result,
11970
+ _ref3,
11971
+ _data$0$GENDER$Value,
11972
+ _data$,
11973
+ queryObj,
11974
+ bodyPayload,
11884
11975
  data,
11885
11976
  arr,
11977
+ resultData,
11886
11978
  _args = arguments,
11887
11979
  _t;
11888
11980
  return _regenerator().w(function (_context) {
@@ -11890,19 +11982,22 @@ var MASTER_GENDER = createAsyncThunk("vitalsMasterSectionApiSlice/gender", /*#__
11890
11982
  case 0:
11891
11983
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
11892
11984
  _context.p = 1;
11985
+ queryObj = typeof query$9.gender === "function" ? query$9.gender() : query$9.gender;
11986
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(queryObj);
11893
11987
  _context.n = 2;
11894
11988
  return fetchData({
11895
- body: query$9.gender
11896
- }, __readDocumentUrl__);
11989
+ body: bodyPayload
11990
+ }, __baseUrl__$1);
11897
11991
  case 2:
11898
11992
  data = _context.v;
11899
11993
  arr = [];
11900
- data && (data === null || data === void 0 || (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (val) {
11994
+ resultData = (_ref3 = (_data$0$GENDER$Value = (_data$ = data[0]) === null || _data$ === void 0 || (_data$ = _data$.GENDER) === null || _data$ === void 0 ? void 0 : _data$.Value) !== null && _data$0$GENDER$Value !== void 0 ? _data$0$GENDER$Value : data === null || data === void 0 ? void 0 : data.result) !== null && _ref3 !== void 0 ? _ref3 : Array.isArray(data) ? data : [];
11995
+ resultData.map(function (val) {
11901
11996
  arr.push({
11902
11997
  value: val === null || val === void 0 ? void 0 : val._id,
11903
11998
  label: val === null || val === void 0 ? void 0 : val.display
11904
11999
  });
11905
- }));
12000
+ });
11906
12001
  return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
11907
12002
  data: arr
11908
12003
  }));
@@ -11916,25 +12011,34 @@ var MASTER_GENDER = createAsyncThunk("vitalsMasterSectionApiSlice/gender", /*#__
11916
12011
  }, _callee, null, [[1, 3]]);
11917
12012
  })));
11918
12013
  var REFERENCE_UNIT_ALLOWED = createAsyncThunk("vitalsMasterSectionApiSlice/referenceUnitAllowed", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
11919
- var _ref4,
12014
+ var _ref5,
11920
12015
  rejectWithValue,
12016
+ _ref6,
12017
+ _data$0$VITALSUOM$Val,
12018
+ _data$2,
12019
+ queryObj,
12020
+ bodyPayload,
11921
12021
  data,
11922
12022
  arr,
12023
+ resultData,
11923
12024
  _args2 = arguments,
11924
12025
  _t2;
11925
12026
  return _regenerator().w(function (_context2) {
11926
12027
  while (1) switch (_context2.p = _context2.n) {
11927
12028
  case 0:
11928
- _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
12029
+ _ref5 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
11929
12030
  _context2.p = 1;
12031
+ queryObj = typeof query$9.referenceUnitAllowed === "function" ? query$9.referenceUnitAllowed() : query$9.referenceUnitAllowed;
12032
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(queryObj);
11930
12033
  _context2.n = 2;
11931
12034
  return fetchData({
11932
- body: query$9.referenceUnitAllowed
11933
- }, __readDocumentUrl__);
12035
+ body: bodyPayload
12036
+ }, __baseUrl__$1);
11934
12037
  case 2:
11935
12038
  data = _context2.v;
11936
12039
  arr = [];
11937
- data && data.result.map(function (val) {
12040
+ resultData = (_ref6 = (_data$0$VITALSUOM$Val = (_data$2 = data[0]) === null || _data$2 === void 0 || (_data$2 = _data$2.VITALSUOM) === null || _data$2 === void 0 ? void 0 : _data$2.Value) !== null && _data$0$VITALSUOM$Val !== void 0 ? _data$0$VITALSUOM$Val : data === null || data === void 0 ? void 0 : data.result) !== null && _ref6 !== void 0 ? _ref6 : Array.isArray(data) ? data : [];
12041
+ resultData.map(function (val) {
11938
12042
  arr.push({
11939
12043
  value: val === null || val === void 0 ? void 0 : val._id,
11940
12044
  label: val === null || val === void 0 ? void 0 : val.display
@@ -11953,7 +12057,7 @@ var REFERENCE_UNIT_ALLOWED = createAsyncThunk("vitalsMasterSectionApiSlice/refer
11953
12057
  }, _callee2, null, [[1, 3]]);
11954
12058
  })));
11955
12059
  var UNIT_ALLOWED = createAsyncThunk("vitalsMasterSectionApiSlice/unitAllowed", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
11956
- var _ref6,
12060
+ var _ref8,
11957
12061
  rejectWithValue,
11958
12062
  data,
11959
12063
  arr,
@@ -11962,7 +12066,7 @@ var UNIT_ALLOWED = createAsyncThunk("vitalsMasterSectionApiSlice/unitAllowed", /
11962
12066
  return _regenerator().w(function (_context3) {
11963
12067
  while (1) switch (_context3.p = _context3.n) {
11964
12068
  case 0:
11965
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
12069
+ _ref8 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
11966
12070
  _context3.p = 1;
11967
12071
  _context3.n = 2;
11968
12072
  return fetchData({
@@ -11990,13 +12094,13 @@ var UNIT_ALLOWED = createAsyncThunk("vitalsMasterSectionApiSlice/unitAllowed", /
11990
12094
  }, _callee3, null, [[1, 3]]);
11991
12095
  })));
11992
12096
  var REFERENCE_AGERANGES = createAsyncThunk("vitalsMasterSectionApiSlice/agerangesCode", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
11993
- var _ref8,
12097
+ var _ref0,
11994
12098
  rejectWithValue,
11995
12099
  data,
11996
12100
  result,
11997
12101
  _data$0$result,
11998
- _data$,
11999
- _data$result2,
12102
+ _data$3,
12103
+ _data$result,
12000
12104
  getRawId,
12001
12105
  arr,
12002
12106
  _args4 = arguments,
@@ -12004,7 +12108,7 @@ var REFERENCE_AGERANGES = createAsyncThunk("vitalsMasterSectionApiSlice/agerange
12004
12108
  return _regenerator().w(function (_context4) {
12005
12109
  while (1) switch (_context4.p = _context4.n) {
12006
12110
  case 0:
12007
- _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
12111
+ _ref0 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref0.rejectWithValue;
12008
12112
  _context4.p = 1;
12009
12113
  _context4.n = 2;
12010
12114
  return fetchData({
@@ -12014,9 +12118,9 @@ var REFERENCE_AGERANGES = createAsyncThunk("vitalsMasterSectionApiSlice/agerange
12014
12118
  data = _context4.v;
12015
12119
  result = [];
12016
12120
  if (Array.isArray(data)) {
12017
- result = (_data$0$result = (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.result) !== null && _data$0$result !== void 0 ? _data$0$result : data; // case 2, else case 3
12121
+ result = (_data$0$result = (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : _data$3.result) !== null && _data$0$result !== void 0 ? _data$0$result : data; // case 2, else case 3
12018
12122
  } else {
12019
- result = (_data$result2 = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result2 !== void 0 ? _data$result2 : []; // case 1
12123
+ result = (_data$result = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result !== void 0 ? _data$result : []; // case 1
12020
12124
  }
12021
12125
  getRawId = function getRawId(val) {
12022
12126
  var str = String(val || "");
@@ -12050,7 +12154,7 @@ var REFERENCE_AGERANGES = createAsyncThunk("vitalsMasterSectionApiSlice/agerange
12050
12154
  })));
12051
12155
  var REFERENCE_AGERANGES_CATEGORY = createAsyncThunk("vitalsMasterSectionApiSlice/referenceCategory", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
12052
12156
  var payload,
12053
- _ref0,
12157
+ _ref10,
12054
12158
  rejectWithValue,
12055
12159
  getState,
12056
12160
  ageRangeId,
@@ -12069,8 +12173,8 @@ var REFERENCE_AGERANGES_CATEGORY = createAsyncThunk("vitalsMasterSectionApiSlice
12069
12173
  _codeableConcepts$res,
12070
12174
  dataResult,
12071
12175
  _data$0$result2,
12072
- _data$2,
12073
- _data$result3,
12176
+ _data$4,
12177
+ _data$result2,
12074
12178
  res,
12075
12179
  _args5 = arguments,
12076
12180
  _t5;
@@ -12078,7 +12182,7 @@ var REFERENCE_AGERANGES_CATEGORY = createAsyncThunk("vitalsMasterSectionApiSlice
12078
12182
  while (1) switch (_context5.p = _context5.n) {
12079
12183
  case 0:
12080
12184
  payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
12081
- _ref0 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref0.rejectWithValue, getState = _ref0.getState;
12185
+ _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue, getState = _ref10.getState;
12082
12186
  _context5.p = 1;
12083
12187
  ageRangeId = payload.ageRangeId;
12084
12188
  state = getState();
@@ -12121,9 +12225,9 @@ var REFERENCE_AGERANGES_CATEGORY = createAsyncThunk("vitalsMasterSectionApiSlice
12121
12225
  }
12122
12226
  dataResult = [];
12123
12227
  if (Array.isArray(data)) {
12124
- dataResult = (_data$0$result2 = (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : _data$2.result) !== null && _data$0$result2 !== void 0 ? _data$0$result2 : data;
12228
+ dataResult = (_data$0$result2 = (_data$4 = data[0]) === null || _data$4 === void 0 ? void 0 : _data$4.result) !== null && _data$0$result2 !== void 0 ? _data$0$result2 : data;
12125
12229
  } else {
12126
- dataResult = (_data$result3 = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result3 !== void 0 ? _data$result3 : [];
12230
+ dataResult = (_data$result2 = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result2 !== void 0 ? _data$result2 : [];
12127
12231
  }
12128
12232
  // nested-array shape [[{...}]] is handled below
12129
12233
  if (Array.isArray(dataResult[0])) {
@@ -12144,7 +12248,7 @@ var REFERENCE_AGERANGES_CATEGORY = createAsyncThunk("vitalsMasterSectionApiSlice
12144
12248
  })));
12145
12249
  var DEFAULT_UNIT = createAsyncThunk("vitalsMasterSectionApiSlice/defaultunit", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
12146
12250
  var payload,
12147
- _ref10,
12251
+ _ref12,
12148
12252
  rejectWithValue,
12149
12253
  AllowedUnit,
12150
12254
  data,
@@ -12155,7 +12259,7 @@ var DEFAULT_UNIT = createAsyncThunk("vitalsMasterSectionApiSlice/defaultunit", /
12155
12259
  while (1) switch (_context6.p = _context6.n) {
12156
12260
  case 0:
12157
12261
  payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
12158
- _ref10 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
12262
+ _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
12159
12263
  _context6.p = 1;
12160
12264
  AllowedUnit = payload.AllowedUnit;
12161
12265
  _context6.n = 2;
@@ -12185,7 +12289,7 @@ var DEFAULT_UNIT = createAsyncThunk("vitalsMasterSectionApiSlice/defaultunit", /
12185
12289
  })));
12186
12290
  var SAVE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/savevitalmaster", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
12187
12291
  var payload,
12188
- _ref12,
12292
+ _ref14,
12189
12293
  rejectWithValue,
12190
12294
  list,
12191
12295
  body,
@@ -12196,7 +12300,7 @@ var SAVE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/savevitalm
12196
12300
  while (1) switch (_context7.p = _context7.n) {
12197
12301
  case 0:
12198
12302
  payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
12199
- _ref12 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
12303
+ _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
12200
12304
  _context7.p = 1;
12201
12305
  list = payload.list;
12202
12306
  body = generateJSON$1(list);
@@ -12220,7 +12324,7 @@ var SAVE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/savevitalm
12220
12324
  })));
12221
12325
  var READ_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMasterread", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
12222
12326
  var payload,
12223
- _ref14,
12327
+ _ref16,
12224
12328
  rejectWithValue,
12225
12329
  page,
12226
12330
  perPage,
@@ -12233,7 +12337,7 @@ var READ_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMast
12233
12337
  while (1) switch (_context8.p = _context8.n) {
12234
12338
  case 0:
12235
12339
  payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
12236
- _ref14 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
12340
+ _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
12237
12341
  _context8.p = 1;
12238
12342
  page = payload.page, perPage = payload.perPage, search = payload.search;
12239
12343
  _context8.n = 2;
@@ -12257,7 +12361,7 @@ var READ_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMast
12257
12361
  })));
12258
12362
  var UPDATE_VITAL_MASTER_STATUS = createAsyncThunk("vitalsMasterSectionApiSlice/vitalsMasterUpdate", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
12259
12363
  var payload,
12260
- _ref16,
12364
+ _ref18,
12261
12365
  rejectWithValue,
12262
12366
  editId,
12263
12367
  status,
@@ -12269,7 +12373,7 @@ var UPDATE_VITAL_MASTER_STATUS = createAsyncThunk("vitalsMasterSectionApiSlice/v
12269
12373
  while (1) switch (_context9.p = _context9.n) {
12270
12374
  case 0:
12271
12375
  payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
12272
- _ref16 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
12376
+ _ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
12273
12377
  _context9.p = 1;
12274
12378
  editId = payload.editId, status = payload.status;
12275
12379
  body = generateUpdateJSON$1(editId, status);
@@ -12293,7 +12397,7 @@ var UPDATE_VITAL_MASTER_STATUS = createAsyncThunk("vitalsMasterSectionApiSlice/v
12293
12397
  })));
12294
12398
  var DELETE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalMasterDelete", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
12295
12399
  var payload,
12296
- _ref18,
12400
+ _ref20,
12297
12401
  rejectWithValue,
12298
12402
  id,
12299
12403
  data,
@@ -12303,7 +12407,7 @@ var DELETE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalMas
12303
12407
  while (1) switch (_context0.p = _context0.n) {
12304
12408
  case 0:
12305
12409
  payload = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : {};
12306
- _ref18 = _args0.length > 1 ? _args0[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
12410
+ _ref20 = _args0.length > 1 ? _args0[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
12307
12411
  _context0.p = 1;
12308
12412
  id = payload.id;
12309
12413
  _context0.n = 2;
@@ -12325,12 +12429,12 @@ var DELETE_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/vitalMas
12325
12429
  }, _callee0, null, [[1, 3]]);
12326
12430
  })));
12327
12431
  var EDIT_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/editvitalMaster", /*#__PURE__*/function () {
12328
- var _ref20 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(payload, _ref19) {
12432
+ var _ref22 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(payload, _ref21) {
12329
12433
  var rejectWithValue, getState, body, data, state, ccState, category, categoryResult, _category$0$result2, _category$2, _category$result2, rawList, resVal, firstKey, innerVal, res, _t1;
12330
12434
  return _regenerator().w(function (_context1) {
12331
12435
  while (1) switch (_context1.p = _context1.n) {
12332
12436
  case 0:
12333
- rejectWithValue = _ref19.rejectWithValue, getState = _ref19.getState;
12437
+ rejectWithValue = _ref21.rejectWithValue, getState = _ref21.getState;
12334
12438
  _context1.p = 1;
12335
12439
  body = JSON.stringify({
12336
12440
  appcode: dbName,
@@ -12394,14 +12498,14 @@ var EDIT_VITAL_MASTER = createAsyncThunk("vitalsMasterSectionApiSlice/editvitalM
12394
12498
  }, _callee1, null, [[1, 4]]);
12395
12499
  }));
12396
12500
  return function (_x, _x2) {
12397
- return _ref20.apply(this, arguments);
12501
+ return _ref22.apply(this, arguments);
12398
12502
  };
12399
12503
  }());
12400
12504
  var GET_GENERAL_DATA_VITAL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/getGeneralDataforVitalType", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
12401
12505
  var payload,
12402
- _ref22,
12506
+ _ref24,
12403
12507
  rejectWithValue,
12404
- _data$3,
12508
+ _data$5,
12405
12509
  body,
12406
12510
  data,
12407
12511
  arry,
@@ -12411,7 +12515,7 @@ var GET_GENERAL_DATA_VITAL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/
12411
12515
  while (1) switch (_context10.p = _context10.n) {
12412
12516
  case 0:
12413
12517
  payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : "";
12414
- _ref22 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
12518
+ _ref24 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
12415
12519
  _context10.p = 1;
12416
12520
  // const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
12417
12521
  body = {
@@ -12431,7 +12535,7 @@ var GET_GENERAL_DATA_VITAL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/
12431
12535
  case 2:
12432
12536
  data = _context10.v;
12433
12537
  arry = [];
12434
- (_data$3 = data[0]) === null || _data$3 === void 0 || (_data$3 = _data$3.OBSERVATIONTYPE) === null || _data$3 === void 0 || (_data$3 = _data$3.Value) === null || _data$3 === void 0 || _data$3.map(function (item) {
12538
+ (_data$5 = data[0]) === null || _data$5 === void 0 || (_data$5 = _data$5.OBSERVATIONTYPE) === null || _data$5 === void 0 || (_data$5 = _data$5.Value) === null || _data$5 === void 0 || _data$5.map(function (item) {
12435
12539
  return arry.push({
12436
12540
  _id: item._id,
12437
12541
  value: item._id,
@@ -12452,9 +12556,9 @@ var GET_GENERAL_DATA_VITAL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/
12452
12556
  })));
12453
12557
  var GET_GENERAL_DATA_LOAD_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/getGeneralDataforLoadType", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
12454
12558
  var payload,
12455
- _ref24,
12559
+ _ref26,
12456
12560
  rejectWithValue,
12457
- _data$4,
12561
+ _data$6,
12458
12562
  body,
12459
12563
  data,
12460
12564
  arry,
@@ -12464,7 +12568,7 @@ var GET_GENERAL_DATA_LOAD_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/g
12464
12568
  while (1) switch (_context11.p = _context11.n) {
12465
12569
  case 0:
12466
12570
  payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : "";
12467
- _ref24 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
12571
+ _ref26 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
12468
12572
  _context11.p = 1;
12469
12573
  // const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
12470
12574
  body = {
@@ -12484,7 +12588,7 @@ var GET_GENERAL_DATA_LOAD_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/g
12484
12588
  case 2:
12485
12589
  data = _context11.v;
12486
12590
  arry = [];
12487
- (_data$4 = data[0]) === null || _data$4 === void 0 || (_data$4 = _data$4.RULEQUERYORGM) === null || _data$4 === void 0 || (_data$4 = _data$4.Value) === null || _data$4 === void 0 || _data$4.map(function (item) {
12591
+ (_data$6 = data[0]) === null || _data$6 === void 0 || (_data$6 = _data$6.RULEQUERYORGM) === null || _data$6 === void 0 || (_data$6 = _data$6.Value) === null || _data$6 === void 0 || _data$6.map(function (item) {
12488
12592
  return arry.push({
12489
12593
  _id: item._id,
12490
12594
  value: item._id,
@@ -12505,9 +12609,9 @@ var GET_GENERAL_DATA_LOAD_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/g
12505
12609
  })));
12506
12610
  var GET_GENERAL_DATA_CONTROL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlice/getGeneralDataforControlType", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
12507
12611
  var payload,
12508
- _ref26,
12612
+ _ref28,
12509
12613
  rejectWithValue,
12510
- _data$5,
12614
+ _data$7,
12511
12615
  body,
12512
12616
  data,
12513
12617
  arry,
@@ -12517,7 +12621,7 @@ var GET_GENERAL_DATA_CONTROL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlic
12517
12621
  while (1) switch (_context12.p = _context12.n) {
12518
12622
  case 0:
12519
12623
  payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : "";
12520
- _ref26 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
12624
+ _ref28 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
12521
12625
  _context12.p = 1;
12522
12626
  // const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
12523
12627
  body = {
@@ -12537,7 +12641,7 @@ var GET_GENERAL_DATA_CONTROL_TYPE = createAsyncThunk("vitalsMasterSectionApiSlic
12537
12641
  case 2:
12538
12642
  data = _context12.v;
12539
12643
  arry = [];
12540
- (_data$5 = data[0]) === null || _data$5 === void 0 || (_data$5 = _data$5.RESULTREPORTDATATYPE) === null || _data$5 === void 0 || (_data$5 = _data$5.Value) === null || _data$5 === void 0 || _data$5.map(function (item) {
12644
+ (_data$7 = data[0]) === null || _data$7 === void 0 || (_data$7 = _data$7.RESULTREPORTDATATYPE) === null || _data$7 === void 0 || (_data$7 = _data$7.Value) === null || _data$7 === void 0 || _data$7.map(function (item) {
12541
12645
  return arry.push({
12542
12646
  _id: item._id,
12543
12647
  value: item._id,
@@ -36621,16 +36725,15 @@ var user_management_actions = _objectSpread2(_objectSpread2(_objectSpread2(_obje
36621
36725
 
36622
36726
  var queries$6 = {
36623
36727
  parameterSetupAdminRead: function parameterSetupAdminRead(page, perPage) {
36728
+ var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
36624
36729
  return {
36625
- db_name: dbName,
36626
- entity: "EntityParametersSetup",
36627
- filter: "EntityParametersSetup.activestatus==true",
36628
- limit: {
36629
- offset: page,
36630
- count: perPage
36631
- },
36632
- return_fields: "merge(EntityParametersSetup,{TotalCount:COUNT(FOR CNT IN EntityParametersSetup RETURN CNT._key)},{entitytype:document(EntityParametersSetup.entitytype),entityid:document(EntityParametersSetup.entityid),moduleid:document(EntityParametersSetup.moduleid),parameterid:document(EntityParametersSetup.parameterid)},{parametervalue:CONTAINS(EntityParametersSetup.parametervalue,'CodingMaster')?document(EntityParametersSetup.parametervalue):EntityParametersSetup.parametervalue})",
36633
- sort: "EntityParametersSetup.createddate DESC"
36730
+ appcode: dbName,
36731
+ requestid: "f7e3ce80-3b34-457e-af4d-ef7781dc0f6a",
36732
+ filter: {
36733
+ search: search || "",
36734
+ page: page !== null && page !== void 0 ? page : 0,
36735
+ perPage: perPage !== null && perPage !== void 0 ? perPage : 10
36736
+ }
36634
36737
  };
36635
36738
  },
36636
36739
  parameterSetupAdminUpsert: function parameterSetupAdminUpsert(data) {
@@ -36675,8 +36778,13 @@ var PARAMETER_SETUP_ADMIN_READ = createAsyncThunk("parameterSetupApiSlice/parame
36675
36778
  rejectWithValue,
36676
36779
  _payload$page,
36677
36780
  _payload$perPage,
36781
+ _payload$search,
36782
+ _data$0$result,
36783
+ _data$,
36784
+ _data$result,
36678
36785
  data,
36679
36786
  arry,
36787
+ resultList,
36680
36788
  _args = arguments,
36681
36789
  _t;
36682
36790
  return _regenerator().w(function (_context) {
@@ -36687,14 +36795,15 @@ var PARAMETER_SETUP_ADMIN_READ = createAsyncThunk("parameterSetupApiSlice/parame
36687
36795
  _context.p = 1;
36688
36796
  _context.n = 2;
36689
36797
  return fetchData({
36690
- body: JSON.stringify(queries$6.parameterSetupAdminRead((_payload$page = payload === null || payload === void 0 ? void 0 : payload.page) !== null && _payload$page !== void 0 ? _payload$page : 0, (_payload$perPage = payload === null || payload === void 0 ? void 0 : payload.perPage) !== null && _payload$perPage !== void 0 ? _payload$perPage : 10))
36691
- }, __readDocumentUrl__);
36798
+ body: JSON.stringify(queries$6.parameterSetupAdminRead((_payload$page = payload === null || payload === void 0 ? void 0 : payload.page) !== null && _payload$page !== void 0 ? _payload$page : 0, (_payload$perPage = payload === null || payload === void 0 ? void 0 : payload.perPage) !== null && _payload$perPage !== void 0 ? _payload$perPage : 10, (_payload$search = payload === null || payload === void 0 ? void 0 : payload.search) !== null && _payload$search !== void 0 ? _payload$search : ""))
36799
+ }, __baseUrl__$1);
36692
36800
  case 2:
36693
36801
  data = _context.v;
36694
36802
  arry = [];
36695
- if (data.result) {
36696
- data.result.map(function (val) {
36697
- var _val$parameterid, _val$parameterid2, _val$id, _val$_id, _val$key, _val$entitytype$displ, _val$entitytype, _val$entityid$name, _val$entityid, _val$parameterid$shor, _val$parameterid3, _val$active;
36803
+ resultList = Array.isArray(data) ? (_data$0$result = (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.result) !== null && _data$0$result !== void 0 ? _data$0$result : data : (_data$result = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result !== void 0 ? _data$result : [];
36804
+ if (Array.isArray(resultList)) {
36805
+ resultList.map(function (val) {
36806
+ var _val$parameterid, _val$parameterid2, _val$id, _val$_id, _ref3, _val$_key, _val$entitytype$displ, _val$entitytype, _val$entityid$name, _val$entityid, _ref4, _val$parameterid$shor, _val$parameterid3, _val$parameterid4, _ref5, _val$active;
36698
36807
  var parametervalue = "";
36699
36808
  if ((val === null || val === void 0 || (_val$parameterid = val.parameterid) === null || _val$parameterid === void 0 || (_val$parameterid = _val$parameterid.gmconfigvalues) === null || _val$parameterid === void 0 ? void 0 : _val$parameterid.ParameterType) === "List Box") {
36700
36809
  var _val$parametervalue;
@@ -36712,12 +36821,12 @@ var PARAMETER_SETUP_ADMIN_READ = createAsyncThunk("parameterSetupApiSlice/parame
36712
36821
  total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
36713
36822
  id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : "",
36714
36823
  _id: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
36715
- key: (_val$key = val === null || val === void 0 ? void 0 : val.key) !== null && _val$key !== void 0 ? _val$key : "",
36824
+ key: (_ref3 = (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : val === null || val === void 0 ? void 0 : val.key) !== null && _ref3 !== void 0 ? _ref3 : "",
36716
36825
  entityType: (_val$entitytype$displ = val === null || val === void 0 || (_val$entitytype = val.entitytype) === null || _val$entitytype === void 0 ? void 0 : _val$entitytype.display) !== null && _val$entitytype$displ !== void 0 ? _val$entitytype$displ : "",
36717
36826
  facility: (_val$entityid$name = val === null || val === void 0 || (_val$entityid = val.entityid) === null || _val$entityid === void 0 ? void 0 : _val$entityid.name) !== null && _val$entityid$name !== void 0 ? _val$entityid$name : "",
36718
- parameterId: (_val$parameterid$shor = val === null || val === void 0 || (_val$parameterid3 = val.parameterid) === null || _val$parameterid3 === void 0 ? void 0 : _val$parameterid3.shortdesc) !== null && _val$parameterid$shor !== void 0 ? _val$parameterid$shor : "",
36827
+ parameterId: (_ref4 = (_val$parameterid$shor = val === null || val === void 0 || (_val$parameterid3 = val.parameterid) === null || _val$parameterid3 === void 0 ? void 0 : _val$parameterid3.shortdesc) !== null && _val$parameterid$shor !== void 0 ? _val$parameterid$shor : val === null || val === void 0 || (_val$parameterid4 = val.parameterid) === null || _val$parameterid4 === void 0 ? void 0 : _val$parameterid4.display) !== null && _ref4 !== void 0 ? _ref4 : "",
36719
36828
  parameterValue: parametervalue,
36720
- status: (_val$active = val === null || val === void 0 ? void 0 : val.active) !== null && _val$active !== void 0 ? _val$active : ""
36829
+ status: (_ref5 = (_val$active = val === null || val === void 0 ? void 0 : val.active) !== null && _val$active !== void 0 ? _val$active : val === null || val === void 0 ? void 0 : val.activestatus) !== null && _ref5 !== void 0 ? _ref5 : ""
36721
36830
  });
36722
36831
  });
36723
36832
  }
@@ -36737,7 +36846,7 @@ var PARAMETER_SETUP_ADMIN_READ = createAsyncThunk("parameterSetupApiSlice/parame
36737
36846
  //PARAMETER_SETUP_ADMIN_UPSERT
36738
36847
  var PARAMETER_SETUP_ADMIN_UPSERT = createAsyncThunk("parameterSetupApiSlice/parameterSetupAdminUpsert", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
36739
36848
  var payload,
36740
- _ref4,
36849
+ _ref7,
36741
36850
  rejectWithValue,
36742
36851
  queriesjson,
36743
36852
  res,
@@ -36747,7 +36856,7 @@ var PARAMETER_SETUP_ADMIN_UPSERT = createAsyncThunk("parameterSetupApiSlice/para
36747
36856
  while (1) switch (_context2.p = _context2.n) {
36748
36857
  case 0:
36749
36858
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
36750
- _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
36859
+ _ref7 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
36751
36860
  _context2.p = 1;
36752
36861
  queriesjson = queries$6.parameterSetupAdminUpsert(payload);
36753
36862
  _context2.n = 2;
@@ -36772,7 +36881,7 @@ var PARAMETER_SETUP_ADMIN_UPSERT = createAsyncThunk("parameterSetupApiSlice/para
36772
36881
  //PARAMETER_SETUP_ADMIN_SINGLE_READ
36773
36882
  var PARAMETER_SETUP_ADMIN_SINGLE_READ = createAsyncThunk("parameterSetupApiSlice/parameterSetupAdminSingleRead", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
36774
36883
  var payload,
36775
- _ref6,
36884
+ _ref9,
36776
36885
  rejectWithValue,
36777
36886
  _key,
36778
36887
  data,
@@ -36783,7 +36892,7 @@ var PARAMETER_SETUP_ADMIN_SINGLE_READ = createAsyncThunk("parameterSetupApiSlice
36783
36892
  while (1) switch (_context3.p = _context3.n) {
36784
36893
  case 0:
36785
36894
  payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
36786
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
36895
+ _ref9 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
36787
36896
  _context3.p = 1;
36788
36897
  _key = payload._key;
36789
36898
  _context3.n = 2;
@@ -36842,10 +36951,8 @@ var parameterSetupSlice$1 = parameterSetupSlice.reducer;
36842
36951
  var masterQuery$4 = {
36843
36952
  entityTypeMater: function entityTypeMater() {
36844
36953
  return {
36845
- db_name: _dbName,
36846
- entity: "CodingMaster",
36847
- filter: "CodingMaster.code=='OT003' && CodingMaster.Type=='ORGTYPE' && CodingMaster.status==true && CodingMaster.activestatus==true",
36848
- return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')"
36954
+ appcode: dbName,
36955
+ requestid: "3cd9377b-28a6-4a7e-bfc6-e75e063a4d58"
36849
36956
  };
36850
36957
  },
36851
36958
  facilityByEntityType: function facilityByEntityType() {
@@ -36882,6 +36989,9 @@ var ENTITY_TYPE_MASTER = createAsyncThunk("parameterSetupMasterAPISlice/entityTy
36882
36989
  rejectWithValue,
36883
36990
  data,
36884
36991
  arry,
36992
+ resultList,
36993
+ _data$0$result,
36994
+ _data$,
36885
36995
  _args = arguments,
36886
36996
  _t;
36887
36997
  return _regenerator().w(function (_context) {
@@ -36892,14 +37002,23 @@ var ENTITY_TYPE_MASTER = createAsyncThunk("parameterSetupMasterAPISlice/entityTy
36892
37002
  _context.n = 2;
36893
37003
  return fetchData({
36894
37004
  body: JSON.stringify(masterQuery$4.entityTypeMater())
36895
- }, __readDocumentUrl__);
37005
+ }, __baseUrl__$1);
36896
37006
  case 2:
36897
37007
  data = _context.v;
36898
37008
  arry = [];
36899
- data.result.map(function (val) {
36900
- var _val$_id, _val$display;
37009
+ resultList = [];
37010
+ if (Array.isArray(data)) {
37011
+ resultList = (_data$0$result = (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.result) !== null && _data$0$result !== void 0 ? _data$0$result : data;
37012
+ } else if (data !== null && data !== void 0 && data.result) {
37013
+ resultList = Array.isArray(data.result) ? data.result : [data.result];
37014
+ } else if (data && _typeof(data) === "object") {
37015
+ resultList = [data];
37016
+ }
37017
+ (resultList || []).forEach(function (val) {
37018
+ var _ref3, _val$_id, _val$display;
37019
+ if (!val) return;
36901
37020
  arry.push({
36902
- value: (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
37021
+ value: (_ref3 = (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : val.id) !== null && _ref3 !== void 0 ? _ref3 : "",
36903
37022
  label: (_val$display = val.display) !== null && _val$display !== void 0 ? _val$display : ""
36904
37023
  });
36905
37024
  });
@@ -36917,7 +37036,7 @@ var ENTITY_TYPE_MASTER = createAsyncThunk("parameterSetupMasterAPISlice/entityTy
36917
37036
  }, _callee, null, [[1, 3]]);
36918
37037
  })));
36919
37038
  var FACILITY_BY_ENTITY_TYPE = createAsyncThunk("parameterSetupMasterAPISlice/facilityByEntityType", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
36920
- var _ref4,
37039
+ var _ref5,
36921
37040
  rejectWithValue,
36922
37041
  data,
36923
37042
  arry,
@@ -36926,7 +37045,7 @@ var FACILITY_BY_ENTITY_TYPE = createAsyncThunk("parameterSetupMasterAPISlice/fac
36926
37045
  return _regenerator().w(function (_context2) {
36927
37046
  while (1) switch (_context2.p = _context2.n) {
36928
37047
  case 0:
36929
- _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
37048
+ _ref5 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
36930
37049
  _context2.p = 1;
36931
37050
  _context2.n = 2;
36932
37051
  return fetchData({
@@ -36956,7 +37075,7 @@ var FACILITY_BY_ENTITY_TYPE = createAsyncThunk("parameterSetupMasterAPISlice/fac
36956
37075
  }, _callee2, null, [[1, 3]]);
36957
37076
  })));
36958
37077
  var APPLICATION_PARAMETER = createAsyncThunk("parameterSetupMasterAPISlice/applicationParameter", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
36959
- var _ref6,
37078
+ var _ref7,
36960
37079
  rejectWithValue,
36961
37080
  data,
36962
37081
  arry,
@@ -36965,7 +37084,7 @@ var APPLICATION_PARAMETER = createAsyncThunk("parameterSetupMasterAPISlice/appli
36965
37084
  return _regenerator().w(function (_context3) {
36966
37085
  while (1) switch (_context3.p = _context3.n) {
36967
37086
  case 0:
36968
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
37087
+ _ref7 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
36969
37088
  _context3.p = 1;
36970
37089
  _context3.n = 2;
36971
37090
  return fetchData({
@@ -36999,7 +37118,7 @@ var APPLICATION_PARAMETER = createAsyncThunk("parameterSetupMasterAPISlice/appli
36999
37118
  })));
37000
37119
  var APPLICATION_PARAMETER_SOURCE_MASTER = createAsyncThunk("parameterSetupMasterAPISlice/applicationParameterSourceMaster", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
37001
37120
  var payload,
37002
- _ref8,
37121
+ _ref9,
37003
37122
  rejectWithValue,
37004
37123
  type,
37005
37124
  data,
@@ -37010,7 +37129,7 @@ var APPLICATION_PARAMETER_SOURCE_MASTER = createAsyncThunk("parameterSetupMaster
37010
37129
  while (1) switch (_context4.p = _context4.n) {
37011
37130
  case 0:
37012
37131
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
37013
- _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
37132
+ _ref9 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
37014
37133
  _context4.p = 1;
37015
37134
  type = payload.type;
37016
37135
  _context4.n = 2;
@@ -39688,9 +39807,20 @@ var query$4 = {
39688
39807
 
39689
39808
  var masterQuery$2 = {
39690
39809
  //name
39691
- facilityName: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"Organization\",\n \"filter\": \"lower(first(document(Organization.OrgType)[*].display)) == 'facility' && Organization.activestatus==true && Organization.active == true \",\n \"return_fields\": \"{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}\",\n \"sort\": \"Organization.name\"\n }"),
39810
+ facilityName: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Organization\",\n \"filter\": \"lower(first(document(Organization.OrgType)[*].display)) == 'facility' && Organization.activestatus==true && Organization.active == true \",\n \"return_fields\": \"{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}\",\n \"sort\": \"Organization.name\"\n }"),
39692
39811
  // coding[0]?.display
39693
- speciality: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='SPECIALTY' && 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 }"),
39812
+ speciality: function speciality() {
39813
+ return {
39814
+ appcode: dbName,
39815
+ filter: {
39816
+ type: ["SPECIALTY"],
39817
+ tenantid: "",
39818
+ facilityid: "",
39819
+ lang: ""
39820
+ },
39821
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
39822
+ };
39823
+ },
39694
39824
  // coding[0]?.display
39695
39825
  practitionerType: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='PRACTTYPE' && 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 }"),
39696
39826
  //array of string
@@ -39942,14 +40072,16 @@ var loopMasters$3 = function loopMasters() {
39942
40072
  var json = {};
39943
40073
  data.map(function (val, i) {
39944
40074
  var arr = [];
39945
- val.data.map(function (value, i_) {
40075
+ ((val === null || val === void 0 ? void 0 : val.data) || []).map(function (value, i_) {
39946
40076
  if (fileds$1.includes(val.name)) {
39947
- if (value.coding[0] !== null) {
39948
- var _value$coding, _value$coding2;
40077
+ var _value$coding, _value$coding2;
40078
+ var displayVal = (value === null || value === void 0 || (_value$coding = value.coding) === null || _value$coding === void 0 || (_value$coding = _value$coding[0]) === null || _value$coding === void 0 ? void 0 : _value$coding.display) || (value === null || value === void 0 ? void 0 : value.display) || "";
40079
+ var idVal = (value === null || value === void 0 || (_value$coding2 = value.coding) === null || _value$coding2 === void 0 || (_value$coding2 = _value$coding2[0]) === null || _value$coding2 === void 0 ? void 0 : _value$coding2._id) || (value === null || value === void 0 ? void 0 : value._id) || "";
40080
+ if (displayVal || idVal) {
39949
40081
  arr.push({
39950
- label: value === null || value === void 0 || (_value$coding = value.coding) === null || _value$coding === void 0 || (_value$coding = _value$coding[0]) === null || _value$coding === void 0 ? void 0 : _value$coding.display,
39951
- value: value === null || value === void 0 || (_value$coding2 = value.coding) === null || _value$coding2 === void 0 || (_value$coding2 = _value$coding2[0]) === null || _value$coding2 === void 0 ? void 0 : _value$coding2._id,
39952
- _id: value === null || value === void 0 ? void 0 : value._id
40082
+ label: displayVal,
40083
+ value: idVal,
40084
+ _id: idVal
39953
40085
  });
39954
40086
  }
39955
40087
  } else if ("facilityName" === val.name) {
@@ -39967,8 +40099,8 @@ var loopMasters$3 = function loopMasters() {
39967
40099
  }
39968
40100
  });
39969
40101
  json[val.name] = arr;
39970
- resolve(json);
39971
40102
  });
40103
+ resolve(json);
39972
40104
  })["catch"](function (err) {
39973
40105
  resolve([]);
39974
40106
  console.log(err);
@@ -39983,27 +40115,55 @@ var loopMasters$3 = function loopMasters() {
39983
40115
  };
39984
40116
  }());
39985
40117
  };
39986
- var fetchMaster$3 = function fetchMaster(name, query) {
40118
+ var fetchMaster$3 = function fetchMaster(name, queryFn) {
39987
40119
  return new es6Promise.Promise(/*#__PURE__*/function () {
39988
40120
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(resolve, reject) {
39989
- var data;
40121
+ var queryObj, isQdm, url, bodyPayload, data, listData, _firstObj$firstKey, firstObj, firstKey;
39990
40122
  return _regenerator().w(function (_context3) {
39991
- while (1) switch (_context3.n) {
40123
+ while (1) switch (_context3.p = _context3.n) {
39992
40124
  case 0:
40125
+ _context3.p = 0;
40126
+ queryObj = typeof queryFn === "function" ? queryFn() : queryFn;
40127
+ isQdm = _typeof(queryObj) === "object" && (queryObj === null || queryObj === void 0 ? void 0 : queryObj.requestid);
40128
+ url = isQdm ? __baseUrl__$1 : __readDocumentUrl__;
40129
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(_objectSpread2(_objectSpread2({}, queryObj), {}, {
40130
+ appcode: (queryObj === null || queryObj === void 0 ? void 0 : queryObj.appcode) || dbName
40131
+ }));
39993
40132
  _context3.n = 1;
39994
40133
  return fetchData({
39995
- body: query
39996
- }, __readDocumentUrl__);
40134
+ body: bodyPayload
40135
+ }, url);
39997
40136
  case 1:
39998
40137
  data = _context3.v;
40138
+ listData = [];
40139
+ if (isQdm && Array.isArray(data) && data[0]) {
40140
+ firstObj = data[0];
40141
+ firstKey = Object.keys(firstObj)[0];
40142
+ if (firstKey && (_firstObj$firstKey = firstObj[firstKey]) !== null && _firstObj$firstKey !== void 0 && _firstObj$firstKey.Value) {
40143
+ listData = firstObj[firstKey].Value;
40144
+ } else {
40145
+ listData = data;
40146
+ }
40147
+ } else if (data !== null && data !== void 0 && data.result) {
40148
+ listData = data.result;
40149
+ }
39999
40150
  resolve({
40000
- data: data.result,
40151
+ data: listData,
40001
40152
  name: name
40002
40153
  });
40154
+ _context3.n = 3;
40155
+ break;
40003
40156
  case 2:
40157
+ _context3.p = 2;
40158
+ _context3.v;
40159
+ resolve({
40160
+ data: [],
40161
+ name: name
40162
+ });
40163
+ case 3:
40004
40164
  return _context3.a(2);
40005
40165
  }
40006
- }, _callee3);
40166
+ }, _callee3, null, [[0, 2]]);
40007
40167
  }));
40008
40168
  return function (_x4, _x5) {
40009
40169
  return _ref3.apply(this, arguments);
@@ -40019,7 +40179,7 @@ var GET_ORDER_SET_APPLICABILITY_LIST = createAsyncThunk("orderSetApplicabilitySl
40019
40179
  data,
40020
40180
  readJSON,
40021
40181
  _args4 = arguments,
40022
- _t;
40182
+ _t2;
40023
40183
  return _regenerator().w(function (_context4) {
40024
40184
  while (1) switch (_context4.p = _context4.n) {
40025
40185
  case 0:
@@ -40039,9 +40199,9 @@ var GET_ORDER_SET_APPLICABILITY_LIST = createAsyncThunk("orderSetApplicabilitySl
40039
40199
  }));
40040
40200
  case 3:
40041
40201
  _context4.p = 3;
40042
- _t = _context4.v;
40202
+ _t2 = _context4.v;
40043
40203
  return _context4.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40044
- message: _t.message
40204
+ message: _t2.message
40045
40205
  })));
40046
40206
  }
40047
40207
  }, _callee4, null, [[1, 3]]);
@@ -40058,7 +40218,7 @@ var GET_ORDER_SET_APPLICABILITY_SINGLE_READ = createAsyncThunk("orderSetApplicab
40058
40218
  data,
40059
40219
  readJSON,
40060
40220
  _args5 = arguments,
40061
- _t2;
40221
+ _t3;
40062
40222
  return _regenerator().w(function (_context5) {
40063
40223
  while (1) switch (_context5.p = _context5.n) {
40064
40224
  case 0:
@@ -40078,9 +40238,9 @@ var GET_ORDER_SET_APPLICABILITY_SINGLE_READ = createAsyncThunk("orderSetApplicab
40078
40238
  }));
40079
40239
  case 3:
40080
40240
  _context5.p = 3;
40081
- _t2 = _context5.v;
40241
+ _t3 = _context5.v;
40082
40242
  return _context5.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40083
- message: _t2.message
40243
+ message: _t3.message
40084
40244
  })));
40085
40245
  }
40086
40246
  }, _callee5, null, [[1, 3]]);
@@ -40092,7 +40252,7 @@ var ORDER_SET_APPLICABILITY_MASTER = createAsyncThunk("orderSetApplicabilitySlic
40092
40252
  rejectWithValue,
40093
40253
  data,
40094
40254
  _args6 = arguments,
40095
- _t3;
40255
+ _t4;
40096
40256
  return _regenerator().w(function (_context6) {
40097
40257
  while (1) switch (_context6.p = _context6.n) {
40098
40258
  case 0:
@@ -40107,9 +40267,9 @@ var ORDER_SET_APPLICABILITY_MASTER = createAsyncThunk("orderSetApplicabilitySlic
40107
40267
  }));
40108
40268
  case 3:
40109
40269
  _context6.p = 3;
40110
- _t3 = _context6.v;
40270
+ _t4 = _context6.v;
40111
40271
  return _context6.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40112
- message: _t3.message
40272
+ message: _t4.message
40113
40273
  })));
40114
40274
  }
40115
40275
  }, _callee6, null, [[1, 3]]);
@@ -40126,7 +40286,7 @@ var ORDER_SET_APP_PRACTITIONER = createAsyncThunk("orderSetApplicabilitySlice/or
40126
40286
  data_arr,
40127
40287
  arry,
40128
40288
  _args7 = arguments,
40129
- _t4;
40289
+ _t5;
40130
40290
  return _regenerator().w(function (_context7) {
40131
40291
  while (1) switch (_context7.p = _context7.n) {
40132
40292
  case 0:
@@ -40155,9 +40315,9 @@ var ORDER_SET_APP_PRACTITIONER = createAsyncThunk("orderSetApplicabilitySlice/or
40155
40315
  }));
40156
40316
  case 4:
40157
40317
  _context7.p = 4;
40158
- _t4 = _context7.v;
40318
+ _t5 = _context7.v;
40159
40319
  return _context7.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40160
- message: _t4.message
40320
+ message: _t5.message
40161
40321
  })));
40162
40322
  }
40163
40323
  }, _callee7, null, [[1, 4]]);
@@ -40172,7 +40332,7 @@ var ORDER_SET_APP_DIAGNOSIS_GROUP = createAsyncThunk("orderSetApplicabilitySlice
40172
40332
  data_arr,
40173
40333
  arry,
40174
40334
  _args8 = arguments,
40175
- _t5;
40335
+ _t6;
40176
40336
  return _regenerator().w(function (_context8) {
40177
40337
  while (1) switch (_context8.p = _context8.n) {
40178
40338
  case 0:
@@ -40201,9 +40361,9 @@ var ORDER_SET_APP_DIAGNOSIS_GROUP = createAsyncThunk("orderSetApplicabilitySlice
40201
40361
  }));
40202
40362
  case 4:
40203
40363
  _context8.p = 4;
40204
- _t5 = _context8.v;
40364
+ _t6 = _context8.v;
40205
40365
  return _context8.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40206
- message: _t5.message
40366
+ message: _t6.message
40207
40367
  })));
40208
40368
  }
40209
40369
  }, _callee8, null, [[1, 4]]);
@@ -40219,7 +40379,7 @@ var ORDER_SET_APP_DIAGNOSIS_CODE = createAsyncThunk("orderSetApplicabilitySlice/
40219
40379
  data_arr,
40220
40380
  arry,
40221
40381
  _args9 = arguments,
40222
- _t6;
40382
+ _t7;
40223
40383
  return _regenerator().w(function (_context9) {
40224
40384
  while (1) switch (_context9.p = _context9.n) {
40225
40385
  case 0:
@@ -40248,9 +40408,9 @@ var ORDER_SET_APP_DIAGNOSIS_CODE = createAsyncThunk("orderSetApplicabilitySlice/
40248
40408
  }));
40249
40409
  case 4:
40250
40410
  _context9.p = 4;
40251
- _t6 = _context9.v;
40411
+ _t7 = _context9.v;
40252
40412
  return _context9.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40253
- message: _t6.message
40413
+ message: _t7.message
40254
40414
  })));
40255
40415
  }
40256
40416
  }, _callee9, null, [[1, 4]]);
@@ -40265,7 +40425,7 @@ var ORDER_SET_APP_LOCATION = createAsyncThunk("orderSetApplicabilitySlice/order_
40265
40425
  data_arr,
40266
40426
  arry,
40267
40427
  _args0 = arguments,
40268
- _t7;
40428
+ _t8;
40269
40429
  return _regenerator().w(function (_context0) {
40270
40430
  while (1) switch (_context0.p = _context0.n) {
40271
40431
  case 0:
@@ -40294,9 +40454,9 @@ var ORDER_SET_APP_LOCATION = createAsyncThunk("orderSetApplicabilitySlice/order_
40294
40454
  }));
40295
40455
  case 4:
40296
40456
  _context0.p = 4;
40297
- _t7 = _context0.v;
40457
+ _t8 = _context0.v;
40298
40458
  return _context0.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40299
- message: _t7.message
40459
+ message: _t8.message
40300
40460
  })));
40301
40461
  }
40302
40462
  }, _callee0, null, [[1, 4]]);
@@ -40310,7 +40470,7 @@ var DELETE_ORDER_SET_APPLICABILITY = createAsyncThunk("orderSetApplicabilitySlic
40310
40470
  _key,
40311
40471
  data,
40312
40472
  _args1 = arguments,
40313
- _t8;
40473
+ _t9;
40314
40474
  return _regenerator().w(function (_context1) {
40315
40475
  while (1) switch (_context1.p = _context1.n) {
40316
40476
  case 0:
@@ -40329,9 +40489,9 @@ var DELETE_ORDER_SET_APPLICABILITY = createAsyncThunk("orderSetApplicabilitySlic
40329
40489
  }));
40330
40490
  case 3:
40331
40491
  _context1.p = 3;
40332
- _t8 = _context1.v;
40492
+ _t9 = _context1.v;
40333
40493
  return _context1.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40334
- message: _t8.message
40494
+ message: _t9.message
40335
40495
  })));
40336
40496
  }
40337
40497
  }, _callee1, null, [[1, 3]]);
@@ -40347,7 +40507,7 @@ var ORDER_SET_APPLICABILITY_UPSERT = createAsyncThunk("orderSetApplicabilitySlic
40347
40507
  queriesjson,
40348
40508
  data,
40349
40509
  _args10 = arguments,
40350
- _t9;
40510
+ _t0;
40351
40511
  return _regenerator().w(function (_context10) {
40352
40512
  while (1) switch (_context10.p = _context10.n) {
40353
40513
  case 0:
@@ -40367,9 +40527,9 @@ var ORDER_SET_APPLICABILITY_UPSERT = createAsyncThunk("orderSetApplicabilitySlic
40367
40527
  }));
40368
40528
  case 3:
40369
40529
  _context10.p = 3;
40370
- _t9 = _context10.v;
40530
+ _t0 = _context10.v;
40371
40531
  return _context10.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40372
- message: _t9.message
40532
+ message: _t0.message
40373
40533
  })));
40374
40534
  }
40375
40535
  }, _callee10, null, [[1, 3]]);
@@ -40385,7 +40545,7 @@ var ORDER_SET_APP_SPECIALTY = createAsyncThunk("orderSetApplicabilitySlice/order
40385
40545
  data_arr,
40386
40546
  arry,
40387
40547
  _args11 = arguments,
40388
- _t0;
40548
+ _t1;
40389
40549
  return _regenerator().w(function (_context11) {
40390
40550
  while (1) switch (_context11.p = _context11.n) {
40391
40551
  case 0:
@@ -40414,9 +40574,9 @@ var ORDER_SET_APP_SPECIALTY = createAsyncThunk("orderSetApplicabilitySlice/order
40414
40574
  }));
40415
40575
  case 4:
40416
40576
  _context11.p = 4;
40417
- _t0 = _context11.v;
40577
+ _t1 = _context11.v;
40418
40578
  return _context11.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40419
- message: _t0.message
40579
+ message: _t1.message
40420
40580
  })));
40421
40581
  }
40422
40582
  }, _callee11, null, [[1, 4]]);
@@ -40590,9 +40750,42 @@ var generateReadJSON$1 = function generateReadJSON(data) {
40590
40750
  };
40591
40751
 
40592
40752
  var masterQuery$1 = {
40593
- allergyTypeIndicator: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type == 'ALTYPE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"keep(CodingMaster,'_key','_id','code','display','Type','status')\",\n \"sort\": \"CodingMaster.display\"\n }"),
40594
- conceptIdType: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type == 'CONCEPTIDTTYPE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"keep(CodingMaster,'_key','_id','code','display','Type','status')\",\n \"sort\": \"CodingMaster.display\"\n }"),
40595
- extSystemSourceId: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type == 'DBSOURCE' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"keep(CodingMaster,'_key','_id','code','display','Type','status')\",\n \"sort\": \"CodingMaster.display\"\n }")
40753
+ allergyTypeIndicator: function allergyTypeIndicator() {
40754
+ return {
40755
+ appcode: dbName,
40756
+ filter: {
40757
+ type: ["ALTYPE"],
40758
+ tenantid: "",
40759
+ facilityid: "",
40760
+ lang: ""
40761
+ },
40762
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
40763
+ };
40764
+ },
40765
+ conceptIdType: function conceptIdType() {
40766
+ return {
40767
+ appcode: dbName,
40768
+ filter: {
40769
+ type: ["CONCEPTIDTTYPE"],
40770
+ tenantid: "",
40771
+ facilityid: "",
40772
+ lang: ""
40773
+ },
40774
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
40775
+ };
40776
+ },
40777
+ extSystemSourceId: function extSystemSourceId() {
40778
+ return {
40779
+ appcode: dbName,
40780
+ filter: {
40781
+ type: ["DBSOURCE"],
40782
+ tenantid: "",
40783
+ facilityid: "",
40784
+ lang: ""
40785
+ },
40786
+ requestid: "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
40787
+ };
40788
+ }
40596
40789
  };
40597
40790
 
40598
40791
  var _extraReducers$b;
@@ -40624,7 +40817,7 @@ var loopMasters$2 = function loopMasters() {
40624
40817
  var json = {};
40625
40818
  data.map(function (val) {
40626
40819
  var arr = [];
40627
- val.data.map(function (value) {
40820
+ ((val === null || val === void 0 ? void 0 : val.data) || []).map(function (value) {
40628
40821
  if (fileds.includes(val.name)) {
40629
40822
  arr.push({
40630
40823
  label: value === null || value === void 0 ? void 0 : value.display,
@@ -40633,10 +40826,10 @@ var loopMasters$2 = function loopMasters() {
40633
40826
  }
40634
40827
  });
40635
40828
  json[val.name] = arr;
40636
- resolve(json);
40637
40829
  });
40830
+ resolve(json);
40638
40831
  })["catch"](function (err) {
40639
- resolve([]);
40832
+ resolve({});
40640
40833
  console.log(err);
40641
40834
  });
40642
40835
  case 1:
@@ -40649,27 +40842,55 @@ var loopMasters$2 = function loopMasters() {
40649
40842
  };
40650
40843
  }());
40651
40844
  };
40652
- var fetchMaster$2 = function fetchMaster(name, query) {
40845
+ var fetchMaster$2 = function fetchMaster(name, queryFn) {
40653
40846
  return new es6Promise.Promise(/*#__PURE__*/function () {
40654
40847
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(resolve, reject) {
40655
- var data;
40848
+ var queryObj, bodyPayload, data, listData, _firstObj$firstKey, firstObj, firstKey;
40656
40849
  return _regenerator().w(function (_context3) {
40657
- while (1) switch (_context3.n) {
40850
+ while (1) switch (_context3.p = _context3.n) {
40658
40851
  case 0:
40852
+ _context3.p = 0;
40853
+ queryObj = typeof queryFn === "function" ? queryFn() : queryFn;
40854
+ bodyPayload = typeof queryObj === "string" ? queryObj : JSON.stringify(_objectSpread2(_objectSpread2({}, queryObj), {}, {
40855
+ appcode: (queryObj === null || queryObj === void 0 ? void 0 : queryObj.appcode) || dbName
40856
+ }));
40659
40857
  _context3.n = 1;
40660
40858
  return fetchData({
40661
- body: query
40662
- }, __readDocumentUrl__);
40859
+ body: bodyPayload
40860
+ }, __baseUrl__$1);
40663
40861
  case 1:
40664
40862
  data = _context3.v;
40863
+ listData = [];
40864
+ if (Array.isArray(data) && data[0]) {
40865
+ firstObj = data[0];
40866
+ firstKey = Object.keys(firstObj)[0];
40867
+ if (firstKey && (_firstObj$firstKey = firstObj[firstKey]) !== null && _firstObj$firstKey !== void 0 && _firstObj$firstKey.Value) {
40868
+ listData = firstObj[firstKey].Value;
40869
+ } else if (firstKey && Array.isArray(firstObj[firstKey])) {
40870
+ listData = firstObj[firstKey];
40871
+ } else {
40872
+ listData = data;
40873
+ }
40874
+ } else if (data !== null && data !== void 0 && data.result) {
40875
+ listData = data.result;
40876
+ }
40665
40877
  resolve({
40666
- data: data.result,
40878
+ data: listData,
40667
40879
  name: name
40668
40880
  });
40881
+ _context3.n = 3;
40882
+ break;
40669
40883
  case 2:
40884
+ _context3.p = 2;
40885
+ _context3.v;
40886
+ resolve({
40887
+ data: [],
40888
+ name: name
40889
+ });
40890
+ case 3:
40670
40891
  return _context3.a(2);
40671
40892
  }
40672
- }, _callee3);
40893
+ }, _callee3, null, [[0, 2]]);
40673
40894
  }));
40674
40895
  return function (_x4, _x5) {
40675
40896
  return _ref3.apply(this, arguments);
@@ -40686,7 +40907,7 @@ var GET_ALLERGEN_MASTER = createAsyncThunk("allergenMasterApiSlice/allergen_mast
40686
40907
  data,
40687
40908
  readJSON,
40688
40909
  _args4 = arguments,
40689
- _t;
40910
+ _t2;
40690
40911
  return _regenerator().w(function (_context4) {
40691
40912
  while (1) switch (_context4.p = _context4.n) {
40692
40913
  case 0:
@@ -40710,9 +40931,9 @@ var GET_ALLERGEN_MASTER = createAsyncThunk("allergenMasterApiSlice/allergen_mast
40710
40931
  }));
40711
40932
  case 3:
40712
40933
  _context4.p = 3;
40713
- _t = _context4.v;
40934
+ _t2 = _context4.v;
40714
40935
  return _context4.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40715
- message: _t.message
40936
+ message: _t2.message
40716
40937
  })));
40717
40938
  }
40718
40939
  }, _callee4, null, [[1, 3]]);
@@ -40725,7 +40946,7 @@ var UPSERT_ALLERGEN_MASTER = createAsyncThunk("allergenMasterApiSlice/save_aller
40725
40946
  queriesjson,
40726
40947
  data,
40727
40948
  _args5 = arguments,
40728
- _t2;
40949
+ _t3;
40729
40950
  return _regenerator().w(function (_context5) {
40730
40951
  while (1) switch (_context5.p = _context5.n) {
40731
40952
  case 0:
@@ -40745,10 +40966,10 @@ var UPSERT_ALLERGEN_MASTER = createAsyncThunk("allergenMasterApiSlice/save_aller
40745
40966
  }));
40746
40967
  case 3:
40747
40968
  _context5.p = 3;
40748
- _t2 = _context5.v;
40749
- alert(_t2.message);
40969
+ _t3 = _context5.v;
40970
+ alert(_t3.message);
40750
40971
  return _context5.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40751
- message: _t2.message
40972
+ message: _t3.message
40752
40973
  })));
40753
40974
  }
40754
40975
  }, _callee5, null, [[1, 3]]);
@@ -40762,7 +40983,7 @@ var UPDATE_ALLERGEN_MASTER_STATUS = createAsyncThunk("allergenMasterApiSlice/upd
40762
40983
  queriesjson,
40763
40984
  data,
40764
40985
  _args6 = arguments,
40765
- _t3;
40986
+ _t4;
40766
40987
  return _regenerator().w(function (_context6) {
40767
40988
  while (1) switch (_context6.p = _context6.n) {
40768
40989
  case 0:
@@ -40794,10 +41015,10 @@ var UPDATE_ALLERGEN_MASTER_STATUS = createAsyncThunk("allergenMasterApiSlice/upd
40794
41015
  }));
40795
41016
  case 3:
40796
41017
  _context6.p = 3;
40797
- _t3 = _context6.v;
40798
- alert(_t3.message);
41018
+ _t4 = _context6.v;
41019
+ alert(_t4.message);
40799
41020
  return _context6.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40800
- message: _t3.message
41021
+ message: _t4.message
40801
41022
  })));
40802
41023
  }
40803
41024
  }, _callee6, null, [[1, 3]]);
@@ -40809,7 +41030,7 @@ var ALLERGEN_MASTER_MASTER = createAsyncThunk("allergenMasterApiSlice/allergen_m
40809
41030
  rejectWithValue,
40810
41031
  data,
40811
41032
  _args7 = arguments,
40812
- _t4;
41033
+ _t5;
40813
41034
  return _regenerator().w(function (_context7) {
40814
41035
  while (1) switch (_context7.p = _context7.n) {
40815
41036
  case 0:
@@ -40824,9 +41045,9 @@ var ALLERGEN_MASTER_MASTER = createAsyncThunk("allergenMasterApiSlice/allergen_m
40824
41045
  }));
40825
41046
  case 3:
40826
41047
  _context7.p = 3;
40827
- _t4 = _context7.v;
41048
+ _t5 = _context7.v;
40828
41049
  return _context7.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
40829
- message: _t4.message
41050
+ message: _t5.message
40830
41051
  })));
40831
41052
  }
40832
41053
  }, _callee7, null, [[1, 3]]);