primary_care_admin_binder 0.1.169 → 0.1.171

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 +358 -227
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -9743,27 +9743,83 @@ var practitionerMasterActions = {
9743
9743
  };
9744
9744
  var practitionerMasterSlice$1 = practitionerMasterSlice.reducer;
9745
9745
 
9746
+ var query_ids = {
9747
+ "scheduleManagementApiSlice/practitionerSlots": "562d7099-7b83-49ec-9bdc-364246ca185d",
9748
+ "slotApiSlice/readSlot": {
9749
+ practionerid: "30fcb559-96fb-48f6-a955-e47dd97bc851",
9750
+ clinicid: "30fcb559-96fb-48f6-a955-e47dd97bc951",
9751
+ query: function query(_ref) {
9752
+ var start = _ref.start,
9753
+ end = _ref.end,
9754
+ id = _ref.id;
9755
+ return {
9756
+ "db_name": dbName,
9757
+ "entity": "Schedule",
9758
+ "filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
9759
+ "return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment.utc().unix(), " AND slt.activestatus==true sort slt._id asc RETURN merge(slt, {DayType: Document(slt.DayType)}))})")
9760
+ };
9761
+ }
9762
+ },
9763
+ "appointmentApiSlice/readAppointment": "0bfea3d4-fe24-43f9-b5b8-cf9ff4365fab",
9764
+ "slotAvailabilityApiSlice/slotAvailability": "c21732eb-9330-45d2-a6bd-e67dca2136d5",
9765
+ "signInApiSlice/SearchPractioner": "2fef3beb-6f38-48b0-955f-90f88dab2822",
9766
+ "VitalReadSearch": "8eefa71f-d48c-44a4-b5e1-e8271eb734d5",
9767
+ "VitalRead": "eebb32ae-0a5f-49b4-9484-41111ec83fa3",
9768
+ "getQDMDataType": "14a1a710-c539-494f-a405-49ca98c5950d",
9769
+ "generalMasterSearch": "92774963-ed7d-4bb7-a2fc-35e71668956b",
9770
+ "rcChargeRateSearch": "b6adb851-754e-4c7d-964f-b217e33945dd",
9771
+ "resOrderCatalogVitalCode": "493389da-6789-4ed0-89e4-a2d546025f1e",
9772
+ "gmLoadQuery": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e",
9773
+ "signInApiSlice/getpermissiondata": "1a91eea3-8c88-4f78-87c1-fcd6af54e81f",
9774
+ "getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697",
9775
+ "getCodingmasterByType": "b283129b-9841-419b-bdfc-de5105ebbad7",
9776
+ "symptom_and_specialty_single_read": "b4157ebd-a966-4d06-8c02-7a9cf8e7f1f5",
9777
+ "symptom_and_specialty_read": "78c9fdd7-fd12-4d36-9729-88ea3174867c",
9778
+ "locationmasterFormId": "f9634cd2-a5c3-46e5-9486-4cc8fd1b42ed",
9779
+ "getformsDetails": "23c2ee00-7c17-4235-943d-dc9e65b7ded8",
9780
+ "getAgeRange": "c5a0a155-4fab-4397-92a9-b89ad94fe3fc",
9781
+ "getsearchDiagonsis": "16d56d62-980e-4f0f-9b4e-cb4ee50e99e9",
9782
+ "getdiagnosisListChild": "4646f218-21bb-43b0-8900-ecfae67e3df5",
9783
+ "diagnosisList": "07820016-0010-4c9f-b724-26018658c4b7"
9784
+ };
9785
+
9746
9786
  var getAgeRangeSort = function getAgeRangeSort(sort) {
9747
9787
  switch (sort) {
9748
- case 'Long Description':
9749
- return "AgeRanges.longdesc";
9750
- case 'Short Description':
9751
- return "AgeRanges.shortdesc";
9752
- case 'Code':
9753
- return "AgeRanges.agerangecode";
9788
+ case "Long Description":
9789
+ return "longdesc";
9790
+ case "Short Description":
9791
+ return "shortdesc";
9792
+ case "Code":
9793
+ return "agerangecode";
9754
9794
  default:
9755
- return "AgeRanges.createddate";
9795
+ return "createddate";
9756
9796
  }
9757
9797
  };
9758
9798
  var query$c = {
9759
- unitUom: "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='VITALSUOM'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
9760
- // getAgeRange: `{
9761
- // "db_name": "${dbName}",
9762
- // "entity": "AgeRanges",
9763
- // "return_fields": "MERGE(AgeRanges, {AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )"
9764
- // }`,
9799
+ unitUom: function unitUom() {
9800
+ return {
9801
+ appcode: 'primarycareng',
9802
+ requestid: query_ids.getCodingmasterByType,
9803
+ filter: {
9804
+ type: 'VITALSUOM',
9805
+ status: true,
9806
+ code: '',
9807
+ sortField: "display"
9808
+ }
9809
+ };
9810
+ },
9765
9811
  getAgeRange: function getAgeRange(page, perPage, sort, direction, search) {
9766
- return "{\n \"db_name\": \"".concat(_dbName, "\",\n \"entity\": \"AgeRanges\",\n \"filter\": \"(LIKE(AgeRanges.agerangecode,'%").concat(search, "%',true) || LIKE(AgeRanges.longdesc,'%").concat(search, "%',true) || LIKE(AgeRanges.shortdesc,'%").concat(search, "%',true)) && AgeRanges.activestatus == true\",\n \"limit\" : { \"offset\" : ").concat(page, ", \"count\": ").concat(perPage, "},\n \"return_fields\": \"MERGE(AgeRanges, {TotalCount:COUNT(").concat(search ? "FOR cnt IN AgeRanges filter UPPER(cnt.agerangecode) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.longdesc) LIKE '%").concat(search.toUpperCase(), "%' || UPPER(cnt.shortdesc) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN AgeRanges RETURN cnt._key", "), AgeCategory: (FOR cat IN TO_ARRAY(AgeRanges.AgeCategory) RETURN MERGE(DOCUMENT(cat), {UOM:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(cat).UOM).coding) RETURN MERGE(DOCUMENT(DOCUMENT(cat).UOM),{coding:DOCUMENT(cod)} ) ) } ) ) } )\",\n \"sort\":\"").concat(getAgeRangeSort(sort), " ").concat(direction, "\"\n }");
9812
+ return {
9813
+ appcode: 'primarycareng',
9814
+ requestid: query_ids.getAgeRange,
9815
+ filter: {
9816
+ sort: getAgeRangeSort(sort),
9817
+ direction: direction !== null && direction !== void 0 ? direction : 'desc',
9818
+ perPage: perPage !== null && perPage !== void 0 ? perPage : 10,
9819
+ page: page !== null && page !== void 0 ? page : 0,
9820
+ search: "%".concat(search, "%")
9821
+ }
9822
+ };
9767
9823
  }
9768
9824
  };
9769
9825
 
@@ -9772,23 +9828,23 @@ var generateJson$c = function generateJson(data) {
9772
9828
  if (data.editData) {
9773
9829
  filter = {
9774
9830
  filter: {
9775
- _id: data.editData._id
9831
+ _key: data.editData._key
9776
9832
  }
9777
9833
  };
9778
9834
  }
9779
9835
  return [_objectSpread2(_objectSpread2({
9780
- "appcode": dbName
9836
+ appcode: dbName
9781
9837
  }, filter), {}, {
9782
- "entity": "AgeRanges",
9783
- "is_metadata": true,
9784
- "metadataId": metaDataId$1,
9785
- "metadata_dbname": metaDatadbName$1,
9786
- "doc": {
9787
- "agerangecode": data.code,
9788
- "shortdesc": data.shortdes,
9789
- "longdesc": data.longdes,
9790
- "AgeCategory": generateCategory(data.categoryDetail),
9791
- "status": data.status
9838
+ collection: "AgeRanges",
9839
+ is_metadata: true,
9840
+ metadataId: metaDataId$1,
9841
+ metadata_appcode: metaDatadbName$1,
9842
+ doc: {
9843
+ agerangecode: data.code,
9844
+ shortdesc: data.shortdes,
9845
+ longdesc: data.longdes,
9846
+ AgeCategory: generateCategory(data.categoryDetail),
9847
+ status: data.status
9792
9848
  }
9793
9849
  })];
9794
9850
  };
@@ -9800,15 +9856,31 @@ var generateCategory = function generateCategory(data) {
9800
9856
  ids._id = val._id;
9801
9857
  }
9802
9858
  arr.push(_objectSpread2(_objectSpread2({}, ids), {}, {
9803
- "code": val.code,
9804
- "age_minimum": val.age_minimum ? parseInt(val.age_minimum) : 0,
9805
- "age_maximum": val.age_maximum ? parseInt(val.age_maximum) : 0,
9806
- "UOM": val.UOM ? val.UOM.value : "",
9807
- "description": val.description
9859
+ code: val.code,
9860
+ age_minimum: val.age_minimum ? parseInt(val.age_minimum) : 0,
9861
+ age_maximum: val.age_maximum ? parseInt(val.age_maximum) : 0,
9862
+ UOM: val.UOM ? val.UOM.value : "",
9863
+ description: val.description
9808
9864
  }));
9809
9865
  });
9810
9866
  return arr;
9811
9867
  };
9868
+ var generateAgeRangeStatus = function generateAgeRangeStatus(data) {
9869
+ var editId = data.editId,
9870
+ status = data.status;
9871
+ return [{
9872
+ appcode: dbName,
9873
+ collection: "AgeRanges",
9874
+ filter: {
9875
+ _id: editId
9876
+ },
9877
+ metadataId: metaDataId$1,
9878
+ metadata_appcode: metaDatadbName$1,
9879
+ doc: {
9880
+ status: status
9881
+ }
9882
+ }];
9883
+ };
9812
9884
 
9813
9885
  var _extraReducers$A;
9814
9886
  var UPSERT_AGE_RANGE = createAsyncThunk("ageRangeMasterApiSlice/save_age_range", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
@@ -9850,8 +9922,6 @@ var UPDATE_AGE_RANGE = createAsyncThunk("ageRangeMasterApiSlice/update_age_range
9850
9922
  var payload,
9851
9923
  _ref4,
9852
9924
  rejectWithValue,
9853
- editId,
9854
- status,
9855
9925
  queriesjson,
9856
9926
  data,
9857
9927
  _args2 = arguments,
@@ -9862,21 +9932,11 @@ var UPDATE_AGE_RANGE = createAsyncThunk("ageRangeMasterApiSlice/update_age_range
9862
9932
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
9863
9933
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
9864
9934
  _context2.p = 1;
9865
- editId = payload.editId, status = payload.status;
9866
- queriesjson = [{
9867
- "appcode": dbName,
9868
- "entity": "AgeRanges",
9869
- "filter": "AgeRanges._id==\"".concat(editId, "\""),
9870
- "metadataId": metaDataId$1,
9871
- "metadata_dbname": metaDatadbName$1,
9872
- "doc": {
9873
- "status": status
9874
- }
9875
- }];
9935
+ queriesjson = generateAgeRangeStatus(payload);
9876
9936
  _context2.n = 2;
9877
9937
  return fetchData({
9878
9938
  body: JSON.stringify(queriesjson)
9879
- }, __update__);
9939
+ }, __uspsertUrl__);
9880
9940
  case 2:
9881
9941
  data = _context2.v;
9882
9942
  return _context2.a(2, _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
@@ -9906,17 +9966,16 @@ var UNIT_UOM = createAsyncThunk("ageRangeMasterApiSlice/unit_uom_list", /*#__PUR
9906
9966
  _context3.p = 1;
9907
9967
  _context3.n = 2;
9908
9968
  return fetchData({
9909
- body: query$c.unitUom
9910
- }, __readDocumentUrl__);
9969
+ body: JSON.stringify(query$c.unitUom())
9970
+ }, __baseUrl__$1);
9911
9971
  case 2:
9912
9972
  data = _context3.v;
9913
9973
  arry = [];
9914
- data.result.map(function (val) {
9915
- arry.push({
9916
- label: val.coding[0].display,
9917
- value: val._id,
9918
- code: val.coding[0].code
9919
- });
9974
+ data === null || data === void 0 || data.map(function (val) {
9975
+ arry.push(_objectSpread2({
9976
+ label: val.display,
9977
+ value: val._id
9978
+ }, val));
9920
9979
  });
9921
9980
  return _context3.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
9922
9981
  data: arry
@@ -9942,17 +10001,15 @@ var GET_AGE_RANGE_MASTER = createAsyncThunk("ageRangeMasterApiSlice/age_range_li
9942
10001
  case 0:
9943
10002
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
9944
10003
  _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
9945
- console.clear();
9946
- console.log(payload === null || payload === void 0 ? void 0 : payload.sort, payload === null || payload === void 0 ? void 0 : payload.search);
9947
10004
  _context4.p = 1;
9948
10005
  _context4.n = 2;
9949
10006
  return fetchData({
9950
- body: query$c.getAgeRange(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.sort ? payload === null || payload === void 0 ? void 0 : payload.sort : '', payload !== null && payload !== void 0 && payload.direction ? '' : 'DESC', payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '')
9951
- }, __readDocumentUrl__);
10007
+ body: JSON.stringify(query$c.getAgeRange(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.sort ? payload === null || payload === void 0 ? void 0 : payload.sort : "", (payload === null || payload === void 0 ? void 0 : payload.direction) !== undefined ? payload.direction ? "asc" : "desc" : "desc", payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : ""))
10008
+ }, __baseUrl__$1);
9952
10009
  case 2:
9953
10010
  data = _context4.v;
9954
10011
  return _context4.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
9955
- data: data.result
10012
+ data: data
9956
10013
  }));
9957
10014
  case 3:
9958
10015
  _context4.p = 3;
@@ -11118,42 +11175,6 @@ var vitalsApplicableActions = {
11118
11175
  };
11119
11176
  var vitalsApplicableSlice$1 = vitalsApplicableSlice.reducer;
11120
11177
 
11121
- var query_ids = {
11122
- "scheduleManagementApiSlice/practitionerSlots": "562d7099-7b83-49ec-9bdc-364246ca185d",
11123
- "slotApiSlice/readSlot": {
11124
- practionerid: "30fcb559-96fb-48f6-a955-e47dd97bc851",
11125
- clinicid: "30fcb559-96fb-48f6-a955-e47dd97bc951",
11126
- query: function query(_ref) {
11127
- var start = _ref.start,
11128
- end = _ref.end,
11129
- id = _ref.id;
11130
- return {
11131
- "db_name": dbName,
11132
- "entity": "Schedule",
11133
- "filter": "Schedule.start >= ".concat(start, " AND Schedule.end <= ").concat(end, " AND Schedule.activestatus == true AND DOCUMENT(Schedule.resourceCode).id == ").concat(id),
11134
- "return_fields": "MERGE(Schedule, {slots : (FOR slt IN Slot FILTER Schedule.id IN slt.ScheduleID AND slt.status!='blocked' AND slt.start >= ".concat(moment.utc().unix(), " AND slt.activestatus==true sort slt._id asc RETURN merge(slt, {DayType: Document(slt.DayType)}))})")
11135
- };
11136
- }
11137
- },
11138
- "appointmentApiSlice/readAppointment": "0bfea3d4-fe24-43f9-b5b8-cf9ff4365fab",
11139
- "slotAvailabilityApiSlice/slotAvailability": "c21732eb-9330-45d2-a6bd-e67dca2136d5",
11140
- "signInApiSlice/SearchPractioner": "2fef3beb-6f38-48b0-955f-90f88dab2822",
11141
- "VitalReadSearch": "8eefa71f-d48c-44a4-b5e1-e8271eb734d5",
11142
- "VitalRead": "eebb32ae-0a5f-49b4-9484-41111ec83fa3",
11143
- "getQDMDataType": "14a1a710-c539-494f-a405-49ca98c5950d",
11144
- "generalMasterSearch": "92774963-ed7d-4bb7-a2fc-35e71668956b",
11145
- "rcChargeRateSearch": "b6adb851-754e-4c7d-964f-b217e33945dd",
11146
- "resOrderCatalogVitalCode": "493389da-6789-4ed0-89e4-a2d546025f1e",
11147
- "gmLoadQuery": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e",
11148
- "signInApiSlice/getpermissiondata": "1a91eea3-8c88-4f78-87c1-fcd6af54e81f",
11149
- "getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697",
11150
- "getCodingmasterByType": "b283129b-9841-419b-bdfc-de5105ebbad7",
11151
- "symptom_and_specialty_single_read": "b4157ebd-a966-4d06-8c02-7a9cf8e7f1f5",
11152
- "symptom_and_specialty_read": "78c9fdd7-fd12-4d36-9729-88ea3174867c",
11153
- "locationmasterFormId": "f9634cd2-a5c3-46e5-9486-4cc8fd1b42ed",
11154
- "getformsDetails": "23c2ee00-7c17-4235-943d-dc9e65b7ded8"
11155
- };
11156
-
11157
11178
  var query$9 = {
11158
11179
  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 }"),
11159
11180
  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 }"),
@@ -16418,19 +16439,19 @@ var locationMasterActions = {
16418
16439
  };
16419
16440
  var locationMasterSlice$1 = locationMasterSlice.reducer;
16420
16441
 
16421
- // import { dbName } from "../../qdm_query_ids";
16422
16442
  var queries$m = {
16423
- fullread: function fullread(page, perPage, search) {
16443
+ fullread: function fullread() {
16444
+ var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
16445
+ var perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
16446
+ var search = arguments.length > 2 ? arguments[2] : undefined;
16424
16447
  return {
16425
- db_name: dbName,
16426
- entity: "OrderType",
16427
- sort: "OrderType.createddate",
16428
- filter: "(LIKE(OrderType.ordertype,'%".concat(search, "%',true) || LIKE(OrderType.shortdesc,'%").concat(search, "%',true) || LIKE(OrderType.longdesc,'%").concat(search, "%',true) ) && OrderType.activestatus == true"),
16429
- limit: {
16448
+ appcode: dbName,
16449
+ requestid: "d61e3890-a7d5-4564-8840-05822368940f",
16450
+ filter: {
16451
+ search: "".concat(search),
16430
16452
  offset: page,
16431
16453
  count: perPage
16432
- },
16433
- return_fields: "MERGE( adqolcOrderType, { TotalCount: COUNT(FOR cnt IN OrderType RETURN cnt._key), ordercategory: DOCUMENT(adqolcOrderType.ordercategory), aliasDtls: ( FOR alias IN (adqolcOrderType.aliasDtls || []) LET aliasTypeDoc = DOCUMENT(alias.aliasType) RETURN MERGE( alias, { aliasType: { label: aliasTypeDoc.display, value: aliasTypeDoc._id, code: aliasTypeDoc.code } } ) ) } )"
16454
+ }
16434
16455
  };
16435
16456
  },
16436
16457
  OrderCategory: function OrderCategory() {
@@ -16443,29 +16464,33 @@ var queries$m = {
16443
16464
  };
16444
16465
  },
16445
16466
  Insert: function Insert(data) {
16467
+ var _data$aliasMapping;
16446
16468
  return [{
16447
16469
  appcode: dbName,
16448
- entity: "OrderType",
16470
+ collection: "OrderType",
16449
16471
  is_metadata: true,
16450
16472
  metadataId: metaDataId$1,
16451
- metadata_dbname: metaDatadbName$1,
16452
- doc: {
16473
+ metadata_appcode: metaDatadbName$1,
16474
+ doc: _objectSpread2(_objectSpread2({
16453
16475
  id: 0,
16454
16476
  ordertype: data === null || data === void 0 ? void 0 : data.ordertype,
16455
16477
  shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc,
16456
16478
  longdesc: data === null || data === void 0 ? void 0 : data.longdesc,
16457
- ordercategory: data === null || data === void 0 ? void 0 : data.ordercategory,
16458
- registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq,
16459
- aliasDtls: ((data === null || data === void 0 ? void 0 : data.aliasMapping) || []).map(function (item) {
16479
+ ordercategory: String(data === null || data === void 0 ? void 0 : data.ordercategory),
16480
+ registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
16481
+ }, (data === null || data === void 0 || (_data$aliasMapping = data.aliasMapping) === null || _data$aliasMapping === void 0 ? void 0 : _data$aliasMapping.length) > 0 && {
16482
+ aliasDtls: data.aliasMapping.map(function (item) {
16460
16483
  var _item$aliasType;
16461
16484
  return {
16462
- aliasType: (item === null || item === void 0 || (_item$aliasType = item.aliasType) === null || _item$aliasType === void 0 ? void 0 : _item$aliasType.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || "",
16463
- aliasCode: (item === null || item === void 0 ? void 0 : item.aliasCode) || "",
16464
- aliasName: (item === null || item === void 0 ? void 0 : item.aliasName) || ""
16485
+ aliasType: String((item === null || item === void 0 || (_item$aliasType = item.aliasType) === null || _item$aliasType === void 0 ? void 0 : _item$aliasType.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || ""),
16486
+ aliasCode: String((item === null || item === void 0 ? void 0 : item.aliasCode) || ""),
16487
+ aliasName: String((item === null || item === void 0 ? void 0 : item.aliasName) || "")
16465
16488
  };
16466
- }),
16467
- status: data === null || data === void 0 ? void 0 : data.status
16468
- }
16489
+ })
16490
+ }), {}, {
16491
+ status: data === null || data === void 0 ? void 0 : data.status,
16492
+ activestatus: true
16493
+ })
16469
16494
  }];
16470
16495
  },
16471
16496
  SoftDelete: function SoftDelete() {
@@ -16478,46 +16503,49 @@ var queries$m = {
16478
16503
  StatusUpdate: function StatusUpdate(key, getstatus) {
16479
16504
  return [{
16480
16505
  appcode: dbName,
16481
- entity: "OrderType",
16506
+ collection: "OrderType",
16482
16507
  filter: {
16483
16508
  _key: key
16484
16509
  },
16485
16510
  is_metadata: true,
16486
16511
  metadataId: metaDataId$1,
16487
- metadata_dbname: metaDatadbName$1,
16512
+ metadata_appcode: metaDatadbName$1,
16488
16513
  doc: {
16489
16514
  status: getstatus
16490
16515
  }
16491
16516
  }];
16492
16517
  },
16493
16518
  UpdateORModify: function UpdateORModify(data) {
16519
+ var _data$aliasMapping2;
16494
16520
  return [{
16495
16521
  appcode: dbName,
16496
- entity: "OrderType",
16522
+ collection: "OrderType",
16497
16523
  is_metadata: true,
16498
16524
  filter: {
16499
16525
  _key: data === null || data === void 0 ? void 0 : data._key
16500
16526
  },
16501
16527
  metadataId: metaDataId$1,
16502
- metadata_dbname: metaDatadbName$1,
16503
- doc: {
16528
+ metadata_appcode: metaDatadbName$1,
16529
+ doc: _objectSpread2(_objectSpread2({
16504
16530
  _id: data === null || data === void 0 ? void 0 : data._id,
16505
16531
  id: data === null || data === void 0 ? void 0 : data.id,
16506
16532
  ordertype: data === null || data === void 0 ? void 0 : data.ordertype,
16507
16533
  shortdesc: data === null || data === void 0 ? void 0 : data.shortdesc,
16508
16534
  longdesc: data === null || data === void 0 ? void 0 : data.longdesc,
16509
- ordercategory: data === null || data === void 0 ? void 0 : data.ordercategory,
16510
- registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq,
16511
- aliasDtls: ((data === null || data === void 0 ? void 0 : data.aliasMapping) || []).map(function (item) {
16535
+ ordercategory: String(data === null || data === void 0 ? void 0 : data.ordercategory),
16536
+ registrationReq: data === null || data === void 0 ? void 0 : data.registrationReq
16537
+ }, (data === null || data === void 0 || (_data$aliasMapping2 = data.aliasMapping) === null || _data$aliasMapping2 === void 0 ? void 0 : _data$aliasMapping2.length) > 0 && {
16538
+ aliasDtls: data.aliasMapping.map(function (item) {
16512
16539
  var _item$aliasType2;
16513
16540
  return {
16514
- aliasType: (item === null || item === void 0 || (_item$aliasType2 = item.aliasType) === null || _item$aliasType2 === void 0 ? void 0 : _item$aliasType2.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || "",
16515
- aliasCode: (item === null || item === void 0 ? void 0 : item.aliasCode) || "",
16516
- aliasName: (item === null || item === void 0 ? void 0 : item.aliasName) || ""
16541
+ aliasType: String((item === null || item === void 0 || (_item$aliasType2 = item.aliasType) === null || _item$aliasType2 === void 0 ? void 0 : _item$aliasType2.value) || (item === null || item === void 0 ? void 0 : item.aliasType) || ""),
16542
+ aliasCode: String((item === null || item === void 0 ? void 0 : item.aliasCode) || ""),
16543
+ aliasName: String((item === null || item === void 0 ? void 0 : item.aliasName) || "")
16517
16544
  };
16518
- }),
16545
+ })
16546
+ }), {}, {
16519
16547
  status: data === null || data === void 0 ? void 0 : data.status
16520
- }
16548
+ })
16521
16549
  }];
16522
16550
  }
16523
16551
  };
@@ -16542,11 +16570,11 @@ var ORDERTYPEREAD = createAsyncThunk("ordertypeSlice/ordertypeRead", /*#__PURE__
16542
16570
  _context.n = 2;
16543
16571
  return fetchData({
16544
16572
  body: JSON.stringify(queriesjson)
16545
- }, __readDocumentUrl__);
16573
+ }, __baseUrl__$1);
16546
16574
  case 2:
16547
16575
  data = _context.v;
16548
16576
  arry = [];
16549
- data.result.map(function (val) {
16577
+ (data || []).map(function (val) {
16550
16578
  var _val$ordercategory, _val$ordercategory2;
16551
16579
  if (val !== null && val !== void 0 && (_val$ordercategory = val.ordercategory) !== null && _val$ordercategory !== void 0 && _val$ordercategory.ordercategory && val !== null && val !== void 0 && (_val$ordercategory2 = val.ordercategory) !== null && _val$ordercategory2 !== void 0 && _val$ordercategory2.longdesc) {
16552
16580
  var _val$ordercategory3, _val$ordercategory4, _val$ordercategory5, _val$ordercategory6;
@@ -16778,16 +16806,18 @@ var ordertypeSlice$1 = ordertypeSlice.reducer;
16778
16806
  // import { dbName } from "../../qdm_query_ids";
16779
16807
  var queries$l = {
16780
16808
  fullread: function fullread(page, perPage, search) {
16809
+ var isSingle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
16810
+ var key = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
16781
16811
  return {
16782
- db_name: dbName,
16783
- entity: "CodeableConceptMaster",
16784
- sort: "CodeableConceptMaster.createddate",
16785
- filter: "CodeableConceptMaster.Type == 'ORDERNATURE' && (LIKE(CodeableConceptMaster.shortdesc,'%".concat(search, "%',true)|| LIKE(CodeableConceptMaster.longdesc,'%").concat(search, "%',true)) && CodeableConceptMaster.activestatus == true"),
16786
- limit: {
16787
- offset: page,
16788
- count: perPage
16789
- },
16790
- return_fields: "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.activestatus==true && cnt.Type=='ORDERNATURE' RETURN cnt._key), coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
16812
+ appcode: dbName,
16813
+ requestid: "9d2753a8-4c3e-4b21-817a-5b4d1101e4a1",
16814
+ request: {
16815
+ page: page,
16816
+ perPage: perPage,
16817
+ search: search,
16818
+ isSingle: isSingle,
16819
+ key: key
16820
+ }
16791
16821
  };
16792
16822
  },
16793
16823
  Insert: function Insert(data) {
@@ -16863,11 +16893,11 @@ var queries$l = {
16863
16893
  // ];
16864
16894
  return [{
16865
16895
  appcode: dbName,
16866
- entity: "CodingMaster",
16896
+ collection: "CodingMaster",
16867
16897
  is_metadata: true,
16868
16898
  // metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
16869
16899
  metadataId: metaDataId$1,
16870
- metadata_dbname: metaDatadbName$1,
16900
+ metadata_appcode: metaDatadbName$1,
16871
16901
  doc: {
16872
16902
  system: "",
16873
16903
  version: "1",
@@ -16890,6 +16920,16 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
16890
16920
  var payload,
16891
16921
  _ref2,
16892
16922
  rejectWithValue,
16923
+ _payload$page,
16924
+ page,
16925
+ _payload$perPage,
16926
+ perPage,
16927
+ _payload$search,
16928
+ search,
16929
+ _payload$isSingle,
16930
+ isSingle,
16931
+ _payload$key,
16932
+ key,
16893
16933
  queriesjson,
16894
16934
  data,
16895
16935
  arry,
@@ -16901,29 +16941,38 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
16901
16941
  payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
16902
16942
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
16903
16943
  _context.p = 1;
16904
- queriesjson = queries$l.fullread(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : "");
16944
+ _payload$page = payload.page, page = _payload$page === void 0 ? 0 : _payload$page, _payload$perPage = payload.perPage, perPage = _payload$perPage === void 0 ? 10 : _payload$perPage, _payload$search = payload.search, search = _payload$search === void 0 ? "" : _payload$search, _payload$isSingle = payload.isSingle, isSingle = _payload$isSingle === void 0 ? false : _payload$isSingle, _payload$key = payload.key, key = _payload$key === void 0 ? "" : _payload$key;
16945
+ queriesjson = queries$l.fullread(page, perPage, search, isSingle, key);
16905
16946
  _context.n = 2;
16906
16947
  return fetchData({
16907
16948
  body: JSON.stringify(queriesjson)
16908
- }, __readDocumentUrl__);
16949
+ }, __baseUrl__$1);
16909
16950
  case 2:
16910
16951
  data = _context.v;
16911
16952
  arry = [];
16912
- data.result.map(function (val) {
16913
- var _val$coding$, _val$coding$2;
16914
- if (val !== null && val !== void 0 && val.activestatus && val !== null && val !== void 0 && (_val$coding$ = val.coding[0]) !== null && _val$coding$ !== void 0 && _val$coding$.shortdesc && val !== null && val !== void 0 && (_val$coding$2 = val.coding[0]) !== null && _val$coding$2 !== void 0 && _val$coding$2.code) {
16915
- var _val$coding$3, _val$coding$4, _val$coding$5;
16916
- arry.push(_objectSpread2({
16917
- total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
16918
- code: val === null || val === void 0 || (_val$coding$3 = val.coding[0]) === null || _val$coding$3 === void 0 ? void 0 : _val$coding$3.code,
16919
- "short": val === null || val === void 0 || (_val$coding$4 = val.coding[0]) === null || _val$coding$4 === void 0 ? void 0 : _val$coding$4.shortdesc,
16920
- "long": val === null || val === void 0 ? void 0 : val.coding[0].display,
16921
- id: val === null || val === void 0 || (_val$coding$5 = val.coding[0]) === null || _val$coding$5 === void 0 ? void 0 : _val$coding$5.id,
16922
- _key: val === null || val === void 0 ? void 0 : val._key,
16923
- status: val === null || val === void 0 ? void 0 : val.status
16924
- }, val));
16925
- }
16926
- });
16953
+ if (Array.isArray(data)) {
16954
+ data.forEach(function (val) {
16955
+ var _val$coding, _val$coding2;
16956
+ if (val !== null && val !== void 0 && val.activestatus && val !== null && val !== void 0 && (_val$coding = val.coding) !== null && _val$coding !== void 0 && (_val$coding = _val$coding[0]) !== null && _val$coding !== void 0 && _val$coding.shortdesc && val !== null && val !== void 0 && (_val$coding2 = val.coding) !== null && _val$coding2 !== void 0 && (_val$coding2 = _val$coding2[0]) !== null && _val$coding2 !== void 0 && _val$coding2.code) {
16957
+ var _val$coding3, _val$coding$, _val$coding$2, _val$coding$3;
16958
+ var _ref3 = (val === null || val === void 0 || (_val$coding3 = val.coding) === null || _val$coding3 === void 0 ? void 0 : _val$coding3[0]) || {},
16959
+ _ref3$_id = _ref3._id,
16960
+ _id = _ref3$_id === void 0 ? "" : _ref3$_id,
16961
+ _ref3$_key = _ref3._key,
16962
+ c_key = _ref3$_key === void 0 ? "" : _ref3$_key;
16963
+ arry.push(_objectSpread2({
16964
+ total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
16965
+ code: val === null || val === void 0 || (_val$coding$ = val.coding[0]) === null || _val$coding$ === void 0 ? void 0 : _val$coding$.code,
16966
+ "short": val === null || val === void 0 || (_val$coding$2 = val.coding[0]) === null || _val$coding$2 === void 0 ? void 0 : _val$coding$2.shortdesc,
16967
+ "long": val === null || val === void 0 ? void 0 : val.coding[0].display,
16968
+ id: val === null || val === void 0 || (_val$coding$3 = val.coding[0]) === null || _val$coding$3 === void 0 ? void 0 : _val$coding$3.id,
16969
+ coding_key: _id || c_key,
16970
+ _key: val === null || val === void 0 ? void 0 : val._key,
16971
+ status: val === null || val === void 0 ? void 0 : val.status
16972
+ }, val));
16973
+ }
16974
+ });
16975
+ }
16927
16976
  return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
16928
16977
  data: arry
16929
16978
  }));
@@ -16938,7 +16987,7 @@ var ORDERNATUREREAD = createAsyncThunk("ordertypeSlice/ordernatureread", /*#__PU
16938
16987
  })));
16939
16988
  var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderNatureTableState", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
16940
16989
  var payload,
16941
- _ref4,
16990
+ _ref5,
16942
16991
  rejectWithValue,
16943
16992
  data,
16944
16993
  queriesjson,
@@ -16949,7 +16998,7 @@ var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderN
16949
16998
  while (1) switch (_context2.p = _context2.n) {
16950
16999
  case 0:
16951
17000
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
16952
- _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
17001
+ _ref5 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
16953
17002
  _context2.p = 1;
16954
17003
  data = payload.data;
16955
17004
  queriesjson = queries$l.StatusUpdate(data._key, data.status);
@@ -16973,7 +17022,7 @@ var UPDATEORDERNATURETABLESTATE = createAsyncThunk("ordertypeSlice/updateOrrderN
16973
17022
  })));
16974
17023
  var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrderNatureTable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
16975
17024
  var payload,
16976
- _ref6,
17025
+ _ref7,
16977
17026
  rejectWithValue,
16978
17027
  data,
16979
17028
  queriesjson,
@@ -16984,7 +17033,7 @@ var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrder
16984
17033
  while (1) switch (_context3.p = _context3.n) {
16985
17034
  case 0:
16986
17035
  payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
16987
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
17036
+ _ref7 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
16988
17037
  _context3.p = 1;
16989
17038
  data = payload.data;
16990
17039
  queriesjson = queries$l.UpdateORModify(data);
@@ -17008,7 +17057,7 @@ var UPDATESETORDERNATURETABLE = createAsyncThunk("ordertypeSlice/updatesetOrrder
17008
17057
  })));
17009
17058
  var INSERTORDERNATURETABLE = createAsyncThunk("ordertypeSlice/insertOrrderNarureTable", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
17010
17059
  var payload,
17011
- _ref8,
17060
+ _ref9,
17012
17061
  rejectWithValue,
17013
17062
  data,
17014
17063
  queriesjson,
@@ -17019,7 +17068,7 @@ var INSERTORDERNATURETABLE = createAsyncThunk("ordertypeSlice/insertOrrderNarure
17019
17068
  while (1) switch (_context4.p = _context4.n) {
17020
17069
  case 0:
17021
17070
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
17022
- _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
17071
+ _ref9 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
17023
17072
  _context4.p = 1;
17024
17073
  data = payload.data;
17025
17074
  queriesjson = queries$l.Insert(data);
@@ -17163,20 +17212,17 @@ var queries$k = {
17163
17212
  perPage = _ref$perPage === void 0 ? 10 : _ref$perPage,
17164
17213
  _ref$search = _ref.search,
17165
17214
  search = _ref$search === void 0 ? "" : _ref$search;
17166
- var obj = {
17167
- db_name: dbName,
17168
- entity: "CodeableConceptMaster",
17169
- filter: "CodeableConceptMaster.Type == 'ORDERMODE' &&\n (LIKE(CodeableConceptMaster.shortdesc,'%".concat(search, "%',true) ||\n LIKE(CodeableConceptMaster.longdesc,'%").concat(search, "%',true)) &&\n CodeableConceptMaster.activestatus == true"),
17170
- limit: {
17171
- offset: page,
17172
- count: perPage
17173
- },
17174
- return_fields: "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.activestatus==true && cnt.Type=='ORDERMODE' RETURN cnt._key), coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
17215
+ return {
17216
+ appcode: dbName,
17217
+ requestid: "2a5e9b7d-3f8c-4a12-8e6b-0c9d7a5b3f2e",
17218
+ filter: {
17219
+ isSingle: isSingle,
17220
+ key: key,
17221
+ page: page,
17222
+ perPage: perPage,
17223
+ search: search
17224
+ }
17175
17225
  };
17176
- if (isSingle) {
17177
- obj.filter = "CodeableConceptMaster.activestatus==true && CodeableConceptMaster._key=='".concat(key, "' && CodeableConceptMaster.Type=='ORDERMODE'");
17178
- }
17179
- return obj;
17180
17226
  },
17181
17227
  orderModeUpsert: function orderModeUpsert(_ref2) {
17182
17228
  var _ref2$code = _ref2.code,
@@ -17241,6 +17287,21 @@ var queries$k = {
17241
17287
  }];
17242
17288
  }
17243
17289
  return newData;
17290
+ },
17291
+ orderModeStatusUpdate: function orderModeStatusUpdate(key, status) {
17292
+ return [{
17293
+ appcode: dbName,
17294
+ collection: "CodeableConceptMaster",
17295
+ is_metadata: true,
17296
+ metadataId: metaDataId$1,
17297
+ metadata_appcode: metaDatadbName$1,
17298
+ filter: {
17299
+ _key: key
17300
+ },
17301
+ doc: {
17302
+ status: status
17303
+ }
17304
+ }];
17244
17305
  }
17245
17306
  };
17246
17307
 
@@ -17382,12 +17443,12 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
17382
17443
  _context.n = 2;
17383
17444
  return fetchData({
17384
17445
  body: JSON.stringify(queryJson)
17385
- }, __readDocumentUrl__);
17446
+ }, __baseUrl__$1);
17386
17447
  case 2:
17387
17448
  data = _context.v;
17388
17449
  arr = [];
17389
- if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
17390
- arr = data.result.map(function (item) {
17450
+ if (Array.isArray(data)) {
17451
+ arr = data.map(function (item) {
17391
17452
  var _ref3 = item || {},
17392
17453
  _key = _ref3._key,
17393
17454
  coding = _ref3.coding,
@@ -17401,7 +17462,11 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
17401
17462
  _ref4$display = _ref4.display,
17402
17463
  display = _ref4$display === void 0 ? "" : _ref4$display,
17403
17464
  _ref4$id = _ref4.id,
17404
- id = _ref4$id === void 0 ? 0 : _ref4$id;
17465
+ id = _ref4$id === void 0 ? 0 : _ref4$id,
17466
+ _ref4$_id = _ref4._id,
17467
+ _id = _ref4$_id === void 0 ? "" : _ref4$_id,
17468
+ _ref4$_key = _ref4._key,
17469
+ c_key = _ref4$_key === void 0 ? "" : _ref4$_key;
17405
17470
  return {
17406
17471
  total_count: TotalCount,
17407
17472
  code: code,
@@ -17409,6 +17474,7 @@ var GET_ALL_ORDER_MODE = createAsyncThunk("orderModeSlice/getAllOrderMode", /*#_
17409
17474
  longdesc: display,
17410
17475
  status: status,
17411
17476
  coding_id: id,
17477
+ coding_key: _id || c_key,
17412
17478
  key: _key
17413
17479
  };
17414
17480
  });
@@ -17449,12 +17515,12 @@ var GET_SINGLE_ORDER_MODE = createAsyncThunk("orderModeSlice/getSingleOrderMode"
17449
17515
  _context2.n = 2;
17450
17516
  return fetchData({
17451
17517
  body: JSON.stringify(queryJson)
17452
- }, __readDocumentUrl__);
17518
+ }, __baseUrl__$1);
17453
17519
  case 2:
17454
17520
  data = _context2.v;
17455
17521
  arr = [];
17456
- if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
17457
- arr = data.result.map(function (item) {
17522
+ if (Array.isArray(data)) {
17523
+ arr = data.map(function (item) {
17458
17524
  var _ref7 = item || {},
17459
17525
  _key = _ref7._key,
17460
17526
  coding = _ref7.coding,
@@ -17467,13 +17533,18 @@ var GET_SINGLE_ORDER_MODE = createAsyncThunk("orderModeSlice/getSingleOrderMode"
17467
17533
  _ref8$display = _ref8.display,
17468
17534
  display = _ref8$display === void 0 ? "" : _ref8$display,
17469
17535
  _ref8$id = _ref8.id,
17470
- id = _ref8$id === void 0 ? 0 : _ref8$id;
17536
+ id = _ref8$id === void 0 ? 0 : _ref8$id,
17537
+ _ref8$_id = _ref8._id,
17538
+ _id = _ref8$_id === void 0 ? "" : _ref8$_id,
17539
+ _ref8$_key = _ref8._key,
17540
+ c_key = _ref8$_key === void 0 ? "" : _ref8$_key;
17471
17541
  return {
17472
17542
  code: code,
17473
17543
  shortdesc: shortdesc,
17474
17544
  longdesc: display,
17475
17545
  status: status,
17476
17546
  coding_id: id,
17547
+ coding_key: _id || c_key,
17477
17548
  key: _key
17478
17549
  };
17479
17550
  });
@@ -17523,12 +17594,51 @@ var UPSERT_ORDER_MODE = createAsyncThunk("orderModeSlice/upsertOrderMode", /*#__
17523
17594
  }
17524
17595
  }, _callee3, null, [[1, 3]]);
17525
17596
  })));
17597
+ var UPDATE_ORDER_MODE_STATUS = createAsyncThunk("orderModeSlice/updateOrderModeStatus", /*#__PURE__*/function () {
17598
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(_ref1, _ref10) {
17599
+ var key, status, rejectWithValue, queryJson, res, _t4;
17600
+ return _regenerator().w(function (_context4) {
17601
+ while (1) switch (_context4.p = _context4.n) {
17602
+ case 0:
17603
+ key = _ref1.key, status = _ref1.status;
17604
+ rejectWithValue = _ref10.rejectWithValue;
17605
+ _context4.p = 1;
17606
+ if (key) {
17607
+ _context4.n = 2;
17608
+ break;
17609
+ }
17610
+ throw new Error("Missing document key for status update.");
17611
+ case 2:
17612
+ queryJson = queries$k.orderModeStatusUpdate(key, status);
17613
+ _context4.n = 3;
17614
+ return fetchData({
17615
+ body: JSON.stringify(queryJson)
17616
+ }, __uspsertUrl__);
17617
+ case 3:
17618
+ res = _context4.v;
17619
+ return _context4.a(2, _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
17620
+ data: res
17621
+ }));
17622
+ case 4:
17623
+ _context4.p = 4;
17624
+ _t4 = _context4.v;
17625
+ return _context4.a(2, rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17626
+ message: _t4.message
17627
+ })));
17628
+ }
17629
+ }, _callee4, null, [[1, 4]]);
17630
+ }));
17631
+ return function (_x, _x2) {
17632
+ return _ref11.apply(this, arguments);
17633
+ };
17634
+ }());
17526
17635
  createSlice({
17527
17636
  name: "orderModeSlice",
17528
17637
  initialState: {
17529
17638
  get_all_order_mode: _objectSpread2({}, defaultState.List),
17530
17639
  get_single_order_mode: _objectSpread2({}, defaultState.List),
17531
- upsert_order_mode: _objectSpread2({}, defaultState.Info)
17640
+ upsert_order_mode: _objectSpread2({}, defaultState.Info),
17641
+ update_order_mode_status: _objectSpread2({}, defaultState.Info)
17532
17642
  },
17533
17643
  extraReducers: function extraReducers(builder) {
17534
17644
  builder
@@ -17557,6 +17667,14 @@ createSlice({
17557
17667
  state.upsert_order_mode = action.payload;
17558
17668
  }).addCase(UPSERT_ORDER_MODE.rejected, function (state, action) {
17559
17669
  state.upsert_order_mode = action.payload;
17670
+ })
17671
+ // UPDATE STATUS
17672
+ .addCase(UPDATE_ORDER_MODE_STATUS.pending, function (state) {
17673
+ state.update_order_mode_status.loading = true;
17674
+ }).addCase(UPDATE_ORDER_MODE_STATUS.fulfilled, function (state, action) {
17675
+ state.update_order_mode_status = action.payload;
17676
+ }).addCase(UPDATE_ORDER_MODE_STATUS.rejected, function (state, action) {
17677
+ state.update_order_mode_status = action.payload;
17560
17678
  });
17561
17679
  }
17562
17680
  });
@@ -17572,7 +17690,8 @@ var orderMasterSlice = createSlice({
17572
17690
  // Mode
17573
17691
  get_all_order_mode: _objectSpread2({}, defaultState.List),
17574
17692
  get_single_order_mode: _objectSpread2({}, defaultState.List),
17575
- upsert_order_mode: _objectSpread2({}, defaultState.Info)
17693
+ upsert_order_mode: _objectSpread2({}, defaultState.Info),
17694
+ update_order_mode_status: _objectSpread2({}, defaultState.Info)
17576
17695
  },
17577
17696
  extraReducers: (_extraReducers$u = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_CATEGORY.pending, function (state) {
17578
17697
  state.order_category_list.loading = true;
@@ -17610,7 +17729,7 @@ var orderMasterSlice = createSlice({
17610
17729
  }), GET_ALL_ORDER_MODE.pending, function (state) {
17611
17730
  state.get_all_order_mode.loading = true;
17612
17731
  state.get_all_order_mode.error = false;
17613
- }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_MODE.fulfilled, function (state, action) {
17732
+ }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_extraReducers$u, GET_ALL_ORDER_MODE.fulfilled, function (state, action) {
17614
17733
  state.get_all_order_mode.loading = false;
17615
17734
  state.get_all_order_mode.error = false;
17616
17735
  state.get_all_order_mode = action.payload;
@@ -17640,6 +17759,17 @@ var orderMasterSlice = createSlice({
17640
17759
  state.upsert_order_mode.loading = false;
17641
17760
  state.upsert_order_mode.error = true;
17642
17761
  state.upsert_order_mode = action.payload;
17762
+ }), UPDATE_ORDER_MODE_STATUS.pending, function (state) {
17763
+ state.update_order_mode_status.loading = true;
17764
+ state.update_order_mode_status.error = false;
17765
+ }), UPDATE_ORDER_MODE_STATUS.fulfilled, function (state, action) {
17766
+ state.update_order_mode_status.loading = false;
17767
+ state.update_order_mode_status.error = false;
17768
+ state.update_order_mode_status = action.payload;
17769
+ }), _defineProperty(_extraReducers$u, UPDATE_ORDER_MODE_STATUS.rejected, function (state, action) {
17770
+ state.update_order_mode_status.loading = false;
17771
+ state.update_order_mode_status.error = true;
17772
+ state.update_order_mode_status = action.payload;
17643
17773
  }))
17644
17774
  });
17645
17775
  var orderMasterActions = {
@@ -17648,7 +17778,8 @@ var orderMasterActions = {
17648
17778
  UPDATE_ORDER_CATEGORY_STATUS: UPDATE_ORDER_CATEGORY_STATUS,
17649
17779
  GET_ALL_ORDER_MODE: GET_ALL_ORDER_MODE,
17650
17780
  GET_SINGLE_ORDER_MODE: GET_SINGLE_ORDER_MODE,
17651
- UPSERT_ORDER_MODE: UPSERT_ORDER_MODE
17781
+ UPSERT_ORDER_MODE: UPSERT_ORDER_MODE,
17782
+ UPDATE_ORDER_MODE_STATUS: UPDATE_ORDER_MODE_STATUS
17652
17783
  };
17653
17784
  var orderMasterSlice$1 = orderMasterSlice.reducer;
17654
17785
 
@@ -39865,7 +39996,7 @@ var generateJson$1 = function generateJson(data) {
39865
39996
  }
39866
39997
  return [_objectSpread2(_objectSpread2({
39867
39998
  appcode: "".concat(dbName),
39868
- entity: "AllergyMaster",
39999
+ collection: "AllergyMaster",
39869
40000
  is_metadata: true,
39870
40001
  metadataId: metaDataId$1,
39871
40002
  metadata_dbname: metaDatadbName$1
@@ -40100,7 +40231,7 @@ var UPDATE_ALLERGEN_MASTER_STATUS = createAsyncThunk("allergenMasterApiSlice/upd
40100
40231
  _key = payload._key, status = payload.status;
40101
40232
  queriesjson = [{
40102
40233
  appcode: dbName,
40103
- entity: "AllergyMaster",
40234
+ collection: "AllergyMaster",
40104
40235
  is_metadata: true,
40105
40236
  metadataId: metaDataId$1,
40106
40237
  metadata_dbname: metaDatadbName$1,
@@ -41132,47 +41263,51 @@ var flexCriteriaApp = _objectSpread2({}, flexCriteriaActions);
41132
41263
  var query$2 = {
41133
41264
  diagnosisList: function diagnosisList(level, code) {
41134
41265
  return {
41135
- "appcode": "".concat(dbName),
41136
- "entity": "Diagnosis",
41137
- "filter": "Diagnosis.levelnumber == ".concat(level, " && Diagnosis.activestatus == true"),
41138
- "return_fields": "Diagnosis",
41139
- "sort": "Diagnosis.icdname"
41266
+ appcode: "".concat(dbName),
41267
+ requestid: query_ids.diagnosisList,
41268
+ filter: {
41269
+ levelnumber: level,
41270
+ sort: "icdname"
41271
+ }
41140
41272
  };
41141
41273
  },
41142
41274
  diagnosisListChild: function diagnosisListChild(level, code) {
41143
41275
  var childvl = level + 1;
41144
41276
  return {
41145
- "db_name": "".concat(dbName),
41146
- "entity": "Diagnosis",
41147
- "filter": "Diagnosis.parenticdcode=='".concat(code, "' && Diagnosis.levelnumber == ").concat(childvl, " && Diagnosis.activestatus==true"),
41148
- "return_fields": "Diagnosis",
41149
- "sort": "Diagnosis.icdname"
41277
+ appcode: "".concat(dbName),
41278
+ requestid: query_ids.getdiagnosisListChild,
41279
+ filter: {
41280
+ parenticdcode: code,
41281
+ levelnumber: childvl,
41282
+ sort: "icdname"
41283
+ }
41150
41284
  };
41151
41285
  },
41152
41286
  updateListeffTo: function updateListeffTo(data) {
41153
41287
  var _data$effTo, _data$islastlevel;
41154
41288
  return [{
41155
- "appcode": "".concat(dbName),
41156
- "entity": "Diagnosis",
41157
- "is_metadata": true,
41158
- "filter": {
41159
- "_key": "".concat(data === null || data === void 0 ? void 0 : data.key)
41289
+ appcode: "".concat(dbName),
41290
+ collection: "Diagnosis",
41291
+ is_metadata: true,
41292
+ filter: {
41293
+ _key: "".concat(data === null || data === void 0 ? void 0 : data.key)
41160
41294
  },
41161
- "metadataId": metaDataId$1,
41162
- "metadata_dbname": metaDatadbName$1,
41163
- "doc": {
41164
- "effTo": (_data$effTo = data === null || data === void 0 ? void 0 : data.effTo) !== null && _data$effTo !== void 0 ? _data$effTo : null,
41165
- "islastlevel": (_data$islastlevel = data === null || data === void 0 ? void 0 : data.islastlevel) !== null && _data$islastlevel !== void 0 ? _data$islastlevel : false
41295
+ metadataId: metaDataId$1,
41296
+ metadata_dbname: metaDatadbName$1,
41297
+ doc: {
41298
+ effTo: (_data$effTo = data === null || data === void 0 ? void 0 : data.effTo) !== null && _data$effTo !== void 0 ? _data$effTo : null,
41299
+ islastlevel: (_data$islastlevel = data === null || data === void 0 ? void 0 : data.islastlevel) !== null && _data$islastlevel !== void 0 ? _data$islastlevel : false
41166
41300
  }
41167
41301
  }];
41168
41302
  },
41169
41303
  searchList: function searchList(text) {
41170
- var searchText = text ? text.replace(/\./g, '_') : '';
41304
+ var search = text ? text.replace(/\./g, "_") : "";
41171
41305
  return {
41172
- "db_name": "".concat(dbName),
41173
- "entity": "Diagnosis",
41174
- "filter": "((icdcode ILIKE '%".concat(searchText, "%') || (icdname ILIKE '%").concat(searchText, "%')) && activestatus == true ORDER BY icdname LIMIT 50"),
41175
- "return_fields": "Diagnosis"
41306
+ appcode: "".concat(dbName),
41307
+ requestid: query_ids.getsearchDiagonsis,
41308
+ filter: {
41309
+ searchText: search
41310
+ }
41176
41311
  };
41177
41312
  }
41178
41313
  };
@@ -41184,7 +41319,6 @@ var GET_DIAGNOSIS_LIST = createAsyncThunk("diagnosisMasterApiSlice/diagnosis_mas
41184
41319
  var payload,
41185
41320
  _ref2,
41186
41321
  rejectWithValue,
41187
- _data$result,
41188
41322
  code,
41189
41323
  level,
41190
41324
  data,
@@ -41200,11 +41334,11 @@ var GET_DIAGNOSIS_LIST = createAsyncThunk("diagnosisMasterApiSlice/diagnosis_mas
41200
41334
  _context.n = 2;
41201
41335
  return fetchData({
41202
41336
  body: JSON.stringify(query$2.diagnosisList(level, code))
41203
- }, __readDocumentUrl__);
41337
+ }, __baseUrl__$1);
41204
41338
  case 2:
41205
41339
  data = _context.v;
41206
41340
  return _context.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
41207
- data: (_data$result = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result !== void 0 ? _data$result : null
41341
+ data: data !== null && data !== void 0 ? data : null
41208
41342
  }));
41209
41343
  case 3:
41210
41344
  _context.p = 3;
@@ -41221,7 +41355,6 @@ var GET_DIAGNOSIS_LIST_CHILD = createAsyncThunk("diagnosisMasterApiSlice/diagnos
41221
41355
  var payload,
41222
41356
  _ref4,
41223
41357
  rejectWithValue,
41224
- _data$result2,
41225
41358
  code,
41226
41359
  level,
41227
41360
  data,
@@ -41237,11 +41370,11 @@ var GET_DIAGNOSIS_LIST_CHILD = createAsyncThunk("diagnosisMasterApiSlice/diagnos
41237
41370
  _context2.n = 2;
41238
41371
  return fetchData({
41239
41372
  body: JSON.stringify(query$2.diagnosisListChild(level, code))
41240
- }, __readDocumentUrl__);
41373
+ }, __baseUrl__$1);
41241
41374
  case 2:
41242
41375
  data = _context2.v;
41243
41376
  return _context2.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
41244
- data: (_data$result2 = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result2 !== void 0 ? _data$result2 : null
41377
+ data: data !== null && data !== void 0 ? data : null
41245
41378
  }));
41246
41379
  case 3:
41247
41380
  _context2.p = 3;
@@ -41258,7 +41391,6 @@ var UPDATE_DIAGNOSIS_LIST = createAsyncThunk("diagnosisMasterApiSlice/update_dia
41258
41391
  var payload,
41259
41392
  _ref6,
41260
41393
  rejectWithValue,
41261
- _data$Result,
41262
41394
  dataPay,
41263
41395
  data,
41264
41396
  _args3 = arguments,
@@ -41277,7 +41409,7 @@ var UPDATE_DIAGNOSIS_LIST = createAsyncThunk("diagnosisMasterApiSlice/update_dia
41277
41409
  case 2:
41278
41410
  data = _context3.v;
41279
41411
  return _context3.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
41280
- data: (_data$Result = data === null || data === void 0 ? void 0 : data.Result) !== null && _data$Result !== void 0 ? _data$Result : null
41412
+ data: data !== null && data !== void 0 ? data : null
41281
41413
  }));
41282
41414
  case 3:
41283
41415
  _context3.p = 3;
@@ -41294,7 +41426,6 @@ var SEARCH_LIST = createAsyncThunk("diagnosisMasterApiSlice/diagnosis_master_lis
41294
41426
  var payload,
41295
41427
  _ref8,
41296
41428
  rejectWithValue,
41297
- _data$result3,
41298
41429
  text,
41299
41430
  data,
41300
41431
  _args4 = arguments,
@@ -41309,11 +41440,11 @@ var SEARCH_LIST = createAsyncThunk("diagnosisMasterApiSlice/diagnosis_master_lis
41309
41440
  _context4.n = 2;
41310
41441
  return fetchData({
41311
41442
  body: JSON.stringify(query$2.searchList(text))
41312
- }, __readDocumentUrl__);
41443
+ }, __baseUrl__$1);
41313
41444
  case 2:
41314
41445
  data = _context4.v;
41315
41446
  return _context4.a(2, _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
41316
- data: (_data$result3 = data === null || data === void 0 ? void 0 : data.result) !== null && _data$result3 !== void 0 ? _data$result3 : null
41447
+ data: data !== null && data !== void 0 ? data : null
41317
41448
  }));
41318
41449
  case 3:
41319
41450
  _context4.p = 3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.169",
3
+ "version": "0.1.171",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",