primary_care_admin_binder 0.1.4 → 0.1.8

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 +787 -547
  2. package/package.json +3 -2
package/dist/index.cjs.js CHANGED
@@ -364,6 +364,10 @@ function _defineProperty(obj, key, value) {
364
364
  return obj;
365
365
  }
366
366
 
367
+ function _objectDestructuringEmpty(obj) {
368
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
369
+ }
370
+
367
371
  function _toConsumableArray(arr) {
368
372
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
369
373
  }
@@ -2269,143 +2273,6 @@ var __keyClockblockappointment__ = "".concat(process.env.REACT_APP_KEY_CLOCK_API
2269
2273
  var refreshOrgToken = "".concat(__nifiUrl__, "/api/v1/refreshOrgAuthToken");
2270
2274
  var refreshUserToken = "".concat(__nifiUrl__, "/api/v1/refreshAuthToken");
2271
2275
 
2272
- var fetchData = /*#__PURE__*/function () {
2273
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(input) {
2274
- var url,
2275
- __options,
2276
- res,
2277
- data,
2278
- _args = arguments;
2279
-
2280
- return regeneratorRuntime.wrap(function _callee$(_context) {
2281
- while (1) {
2282
- switch (_context.prev = _context.next) {
2283
- case 0:
2284
- url = _args.length > 1 && _args[1] !== undefined ? _args[1] : __baseUrl__;
2285
- __options = {
2286
- method: "POST",
2287
- headers: {
2288
- "Content-Type": "application/json"
2289
- },
2290
- body: {}
2291
- };
2292
- _context.next = 4;
2293
- return fetch(url, _objectSpread2(_objectSpread2({}, __options), input));
2294
-
2295
- case 4:
2296
- res = _context.sent;
2297
- _context.next = 7;
2298
- return res.json();
2299
-
2300
- case 7:
2301
- data = _context.sent;
2302
- return _context.abrupt("return", data);
2303
-
2304
- case 9:
2305
- case "end":
2306
- return _context.stop();
2307
- }
2308
- }
2309
- }, _callee);
2310
- }));
2311
-
2312
- return function fetchData(_x) {
2313
- return _ref3.apply(this, arguments);
2314
- };
2315
- }();
2316
-
2317
- var queries$n = {
2318
- rolelist: function rolelist(type) {
2319
- return {
2320
- db_name: dbName,
2321
- entity: "CodeableConceptMaster",
2322
- filter: "CodeableConceptMaster.Type=='".concat(type, "'"),
2323
- return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
2324
- };
2325
- },
2326
- upsert: function upsert(data) {
2327
- var filter = {};
2328
- var _key = {};
2329
-
2330
- if (data._key) {
2331
- filter = {
2332
- filter: {
2333
- _key: data._key
2334
- }
2335
- };
2336
- }
2337
-
2338
- if (data !== null && data !== void 0 && data.coding_key) {
2339
- _key = {
2340
- _key: data === null || data === void 0 ? void 0 : data.coding_key
2341
- };
2342
- }
2343
-
2344
- if (data.id) {
2345
- ({
2346
- id: data.id
2347
- });
2348
- }
2349
-
2350
- return [_objectSpread2(_objectSpread2({
2351
- db_name: "primarycare",
2352
- entity: "CodeableConceptMaster",
2353
- is_metadata: true,
2354
- metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
2355
- }, filter), {}, {
2356
- doc: {
2357
- text: "",
2358
- _id: "",
2359
- id: 0,
2360
- coding: [_objectSpread2({
2361
- system: "",
2362
- version: "1",
2363
- code: data.code,
2364
- display: data.description,
2365
- userSelected: true,
2366
- Type: data.type,
2367
- id: data.id,
2368
- status: data.status
2369
- }, _key)],
2370
- Type: data.type,
2371
- status: data.status
2372
- }
2373
- })];
2374
- },
2375
- practitioner_by_id: function practitioner_by_id(id) {
2376
- return {
2377
- db_name: dbName,
2378
- entity: "Practitioner",
2379
- filter: "Practitioner._key=='".concat(id, "' && Practitioner.activestatus==true"),
2380
- return_fields: "merge(Practitioner,{identifier:(for doc in IdentifierMaster filter doc._id in Practitioner.identifier return merge(doc,{period:(for cod in doc.period return document(cod))})),address:(for a in Practitioner.address return document(a)),communication:( FOR cod IN CodeableConceptMaster filter cod._id in Practitioner.communication RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),marital_status:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.marital_status RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),name:(for a in Practitioner.name return document(a)),nationality:(FOR cod IN SMGeographicMaster filter cod._id==Practitioner.nationality RETURN cod),photo:(for a in Practitioner.photo return document(a)),position:(for pt in CodeableConceptMaster filter pt._id==Practitioner.position return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),practitioner_type:(for pt in CodeableConceptMaster filter pt._id==Practitioner.practitioner_type return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),telecom:(for a in Practitioner.telecom return document(a)),job_experience:(for c in Practitioner.job_experience RETURN merge(c,{jobexperience_contact_details:(for con in c.jobexperience_contact_details return document(con)), jobexperience_address:(for add in c.jobexperience_address return document(add))})),training_details:(for c in Practitioner.training_details RETURN merge(c,{training_contact_details:(for con in c.training_contact_details return document(con)), training_address:(for add in c.training_address return document(add))})),practitioner_role:(for doc in PractitionerRole filter doc._id IN Practitioner.practitioner_role return MERGE(doc,{telecom:(for rol in ContactPointMaster filter rol._id in doc.telecom return rol),role:(for cod in CodeableConceptMaster filter cod._id==doc.role return merge(cod,{coding:(for code in CodingMaster filter code._id in cod.coding return code)})),period:(for per in periodMaster filter per._id in doc.period return per)})),gender:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.gender RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),employee_status:(for pt in CodeableConceptMaster filter pt._id==Practitioner.employee_status return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))}))})"
2381
- };
2382
- },
2383
- practitioner_list: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner\",\n \"sort\":\"Practitioner.createddate\",\n \"filter\": \"Practitioner.activestatus==true\",\n \"return_fields\": \"{id:Practitioner.id,name:(FOR nam IN TO_ARRAY(Practitioner.name) RETURN DOCUMENT(nam).text)[0],type: (for t in CodeableConceptMaster filter t._id == Practitioner.practitioner_type return merge(t,{coding:(for cod in CodingMaster filter cod._id in t.coding return cod.display)})),_key:Practitioner._key,status:Practitioner.status,Practitionerrole:(for pr in PractitionerRole filter pr._id in Practitioner.practitioner_role && pr.primary_specialty==true return merge(pr,{SpecialtyID:(for spe in CodeableConceptMaster filter spe._id ==pr.SpecialtyID return merge(spe,{coding:(for cod in CodingMaster filter cod._id in spe.coding return cod.display)}))}))}\"\n }"),
2384
- status_update_practitioner: function status_update_practitioner(data) {
2385
- return [{
2386
- db_name: dbName,
2387
- entity: "Practitioner",
2388
- filter: {
2389
- _key: data._key
2390
- },
2391
- is_metadata: true,
2392
- metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
2393
- doc: {
2394
- status: data.status
2395
- }
2396
- }];
2397
- },
2398
- get_entity_by_id: function get_entity_by_id(id) {
2399
- return {
2400
- "db_name": dbName,
2401
- "entity": "Organization",
2402
- "sort": "Organization.name",
2403
- "filter": "Organization.activestatus==true && Organization.OrgType any =='".concat(id, "'"),
2404
- "return_fields": "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
2405
- };
2406
- }
2407
- };
2408
-
2409
2276
  var moment = createCommonjsModule(function (module, exports) {
2410
2277
  (function (global, factory) {
2411
2278
  module.exports = factory() ;
@@ -8070,89 +7937,269 @@ var moment = createCommonjsModule(function (module, exports) {
8070
7937
  })));
8071
7938
  });
8072
7939
 
8073
- var contactList = function contactList(data) {
8074
- var contactLists = [];
7940
+ var fetchData = /*#__PURE__*/function () {
7941
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(input) {
7942
+ var url,
7943
+ __options,
7944
+ res,
7945
+ data,
7946
+ _args = arguments;
8075
7947
 
8076
- if (data && data.length > 0) {
8077
- data.map(function (val) {
8078
- var contactData = {
8079
- // "_id": "string",
8080
- "system": val.mode ? val.mode.value : "",
8081
- "value": val.mobile ? val.mobile : "",
8082
- "use": val.use ? val.use.value : "",
8083
- "rank": val.priority ? val.priority.value : "",
8084
- "valueprefix": val.country_code ? val.country_code.value : "",
8085
- "period": [{
8086
- // "_id": "string",
8087
- "start": moment().unix(),
8088
- "end": moment().endOf('day').unix() // "id": "number"
7948
+ return regeneratorRuntime.wrap(function _callee$(_context) {
7949
+ while (1) {
7950
+ switch (_context.prev = _context.next) {
7951
+ case 0:
7952
+ url = _args.length > 1 && _args[1] !== undefined ? _args[1] : __baseUrl__;
7953
+ __options = {
7954
+ method: "POST",
7955
+ headers: {
7956
+ "Content-Type": "application/json"
7957
+ },
7958
+ body: {}
7959
+ };
7960
+ _context.next = 4;
7961
+ return fetch(url, _objectSpread2(_objectSpread2({}, __options), input));
8089
7962
 
8090
- }] // "id": "number"
7963
+ case 4:
7964
+ res = _context.sent;
7965
+ _context.next = 7;
7966
+ return res.json();
8091
7967
 
8092
- };
8093
- contactLists.push(contactData);
8094
- });
8095
- }
7968
+ case 7:
7969
+ data = _context.sent;
7970
+ return _context.abrupt("return", data);
8096
7971
 
8097
- return contactLists;
8098
- }; // Address list
7972
+ case 9:
7973
+ case "end":
7974
+ return _context.stop();
7975
+ }
7976
+ }
7977
+ }, _callee);
7978
+ }));
8099
7979
 
7980
+ return function fetchData(_x) {
7981
+ return _ref3.apply(this, arguments);
7982
+ };
7983
+ }();
8100
7984
 
8101
- var addresslist = function addresslist(data) {
8102
- var addLists = [];
7985
+ var makeName = function makeName() {
7986
+ var _prefix$coding, _prefix$coding$, _suffix$coding, _suffix$coding$;
7987
+
7988
+ var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7989
+ var _nameObj$prefix = nameObj.prefix,
7990
+ prefix = _nameObj$prefix === void 0 ? "" : _nameObj$prefix,
7991
+ _nameObj$given = nameObj.given,
7992
+ given = _nameObj$given === void 0 ? "" : _nameObj$given,
7993
+ _nameObj$text = nameObj.text,
7994
+ text = _nameObj$text === void 0 ? "" : _nameObj$text,
7995
+ _nameObj$suffix = nameObj.suffix,
7996
+ suffix = _nameObj$suffix === void 0 ? "" : _nameObj$suffix;
7997
+ var prefixVal = (prefix === null || prefix === void 0 ? void 0 : (_prefix$coding = prefix.coding) === null || _prefix$coding === void 0 ? void 0 : (_prefix$coding$ = _prefix$coding[0]) === null || _prefix$coding$ === void 0 ? void 0 : _prefix$coding$.display) || "";
7998
+ var suffixVal = (suffix === null || suffix === void 0 ? void 0 : (_suffix$coding = suffix.coding) === null || _suffix$coding === void 0 ? void 0 : (_suffix$coding$ = _suffix$coding[0]) === null || _suffix$coding$ === void 0 ? void 0 : _suffix$coding$.display) || "";
7999
+ return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(suffixVal && suffixVal);
8000
+ };
8103
8001
 
8104
- if (data && data.length > 0) {
8105
- data.map(function (val) {
8106
- var addressData = {
8107
- // "_id": "string",
8108
- "use": val.use ? val.use.value : '',
8109
- "text": val.addressLine1 ? val.addressLine1 : "",
8110
- "line": val.addressLine2 ? val.addressLine2 : "",
8111
- "city": val.city ? val.city.value : '',
8112
- "district": val.district ? val.district.value : "",
8113
- "state": val.state ? val.state.value : "",
8114
- "postalCode": val.pincode ? val.pincode : "",
8115
- "country": val.country ? val.country.value : "",
8116
- "latitude": "",
8117
- "longitude": "",
8118
- 'Type': val.type ? val.type.value : ""
8119
- };
8120
- addLists.push(addressData);
8121
- });
8002
+ var getUtcTime = function getUtcTime(date) {
8003
+ if (date) {
8004
+ return moment.utc(date).unix();
8005
+ } else {
8006
+ return moment.utc().unix();
8122
8007
  }
8123
-
8124
- return addLists;
8125
8008
  };
8126
8009
 
8127
- var generateJSON$2 = function generateJSON(data, _key, person_id) {
8128
- //person id
8129
- var personId = {};
8130
-
8131
- if (person_id) {
8132
- personId = {
8133
- "PersonID": person_id
8134
- };
8135
- } // filter to update the practitioner
8010
+ var utcTOLocal = function utcTOLocal(date, format) {
8011
+ var Ndate = new Date();
8136
8012
 
8013
+ if (typeof date === "number") {
8014
+ Ndate = moment.unix(date);
8015
+ } else {
8016
+ Ndate = moment(date);
8017
+ }
8137
8018
 
8138
- var filter = {};
8019
+ var fmt = format ? format : "DD-MM-YYYY";
8139
8020
 
8140
- if (_key) {
8141
- filter = {
8142
- "filter": {
8143
- "_key": _key
8144
- }
8145
- };
8021
+ if (format) {
8022
+ return moment.utc(Ndate).local().format(fmt);
8023
+ } else {
8024
+ return moment.utc(Ndate).local();
8146
8025
  }
8026
+ };
8147
8027
 
8148
- var id = {};
8149
-
8150
- if (!_key) {
8151
- id = {
8152
- id: 0
8028
+ var queries$n = {
8029
+ rolelist: function rolelist(type) {
8030
+ return {
8031
+ db_name: dbName,
8032
+ entity: "CodeableConceptMaster",
8033
+ filter: "CodeableConceptMaster.Type=='".concat(type, "'"),
8034
+ return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
8153
8035
  };
8154
- } // PRACTITIONER IDENTIFICATION
8155
-
8036
+ },
8037
+ upsert: function upsert(data) {
8038
+ var filter = {};
8039
+ var _key = {};
8040
+
8041
+ if (data._key) {
8042
+ filter = {
8043
+ filter: {
8044
+ _key: data._key
8045
+ }
8046
+ };
8047
+ }
8048
+
8049
+ if (data !== null && data !== void 0 && data.coding_key) {
8050
+ _key = {
8051
+ _key: data === null || data === void 0 ? void 0 : data.coding_key
8052
+ };
8053
+ }
8054
+
8055
+ if (data.id) {
8056
+ ({
8057
+ id: data.id
8058
+ });
8059
+ }
8060
+
8061
+ return [_objectSpread2(_objectSpread2({
8062
+ db_name: "primarycare",
8063
+ entity: "CodeableConceptMaster",
8064
+ is_metadata: true,
8065
+ metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
8066
+ }, filter), {}, {
8067
+ doc: {
8068
+ text: "",
8069
+ _id: "",
8070
+ id: 0,
8071
+ coding: [_objectSpread2({
8072
+ system: "",
8073
+ version: "1",
8074
+ code: data.code,
8075
+ display: data.description,
8076
+ userSelected: true,
8077
+ Type: data.type,
8078
+ id: data.id,
8079
+ status: data.status
8080
+ }, _key)],
8081
+ Type: data.type,
8082
+ status: data.status
8083
+ }
8084
+ })];
8085
+ },
8086
+ practitioner_by_id: function practitioner_by_id(id) {
8087
+ return {
8088
+ db_name: dbName,
8089
+ entity: "Practitioner",
8090
+ filter: "Practitioner._key=='".concat(id, "' && Practitioner.activestatus==true"),
8091
+ return_fields: "merge(Practitioner,{identifier:(for doc in IdentifierMaster filter doc._id in Practitioner.identifier return merge(doc,{period:(for cod in doc.period return document(cod))})),address:(for a in Practitioner.address return document(a)),communication:( FOR cod IN CodeableConceptMaster filter cod._id in Practitioner.communication RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),marital_status:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.marital_status RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),name:(for a in Practitioner.name return document(a)),nationality:(FOR cod IN SMGeographicMaster filter cod._id==Practitioner.nationality RETURN cod),photo:(for a in Practitioner.photo return document(a)),position:(for pt in CodeableConceptMaster filter pt._id==Practitioner.position return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),practitioner_type:(for pt in CodeableConceptMaster filter pt._id==Practitioner.practitioner_type return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))})),telecom:(for a in Practitioner.telecom return document(a)),job_experience:(for c in Practitioner.job_experience RETURN merge(c,{jobexperience_contact_details:(for con in c.jobexperience_contact_details return document(con)), jobexperience_address:(for add in c.jobexperience_address return document(add))})),training_details:(for c in Practitioner.training_details RETURN merge(c,{training_contact_details:(for con in c.training_contact_details return document(con)), training_address:(for add in c.training_address return document(add))})),practitioner_role:(for doc in PractitionerRole filter doc._id IN Practitioner.practitioner_role return MERGE(doc,{telecom:(for rol in ContactPointMaster filter rol._id in doc.telecom return rol),role:(for cod in CodeableConceptMaster filter cod._id==doc.role return merge(cod,{coding:(for code in CodingMaster filter code._id in cod.coding return code)})),period:(for per in periodMaster filter per._id in doc.period return per)})),gender:(FOR cod IN CodeableConceptMaster filter cod._id==Practitioner.gender RETURN MERGE(cod,{coding:(FOR d IN cod.coding RETURN DOCUMENT(d))})),employee_status:(for pt in CodeableConceptMaster filter pt._id==Practitioner.employee_status return merge(pt,{coding:(FOR d IN pt.coding RETURN DOCUMENT(d))}))})"
8092
+ };
8093
+ },
8094
+ practitioner_list: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Practitioner\",\n \"sort\":\"Practitioner.createddate\",\n \"filter\": \"Practitioner.activestatus==true\",\n \"return_fields\": \"{id:Practitioner.id,name:(FOR nam IN TO_ARRAY(Practitioner.name) RETURN DOCUMENT(nam).text)[0],type: (for t in CodeableConceptMaster filter t._id == Practitioner.practitioner_type return merge(t,{coding:(for cod in CodingMaster filter cod._id in t.coding return cod.display)})),_key:Practitioner._key,status:Practitioner.status,Practitionerrole:(for pr in PractitionerRole filter pr._id in Practitioner.practitioner_role && pr.primary_specialty==true return merge(pr,{SpecialtyID:(for spe in CodeableConceptMaster filter spe._id ==pr.SpecialtyID return merge(spe,{coding:(for cod in CodingMaster filter cod._id in spe.coding return cod.display)}))}))}\"\n }"),
8095
+ status_update_practitioner: function status_update_practitioner(data) {
8096
+ return [{
8097
+ db_name: dbName,
8098
+ entity: "Practitioner",
8099
+ filter: {
8100
+ _key: data._key
8101
+ },
8102
+ is_metadata: true,
8103
+ metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
8104
+ doc: {
8105
+ status: data.status
8106
+ }
8107
+ }];
8108
+ },
8109
+ get_entity_by_id: function get_entity_by_id(id) {
8110
+ return {
8111
+ "db_name": dbName,
8112
+ "entity": "Organization",
8113
+ "sort": "Organization.name",
8114
+ "filter": "Organization.activestatus==true && Organization.OrgType any =='".concat(id, "'"),
8115
+ "return_fields": "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
8116
+ };
8117
+ }
8118
+ };
8119
+
8120
+ var contactList = function contactList(data) {
8121
+ var contactLists = [];
8122
+
8123
+ if (data && data.length > 0) {
8124
+ data.map(function (val) {
8125
+ var contactData = {
8126
+ // "_id": "string",
8127
+ "system": val.mode ? val.mode.value : "",
8128
+ "value": val.mobile ? val.mobile : "",
8129
+ "use": val.use ? val.use.value : "",
8130
+ "rank": val.priority ? val.priority.value : "",
8131
+ "valueprefix": val.country_code ? val.country_code.value : "",
8132
+ "period": [{
8133
+ // "_id": "string",
8134
+ "start": getUtcTime(),
8135
+ "end": getUtcTime(moment().endOf('day')) // "id": "number"
8136
+
8137
+ }] // "id": "number"
8138
+
8139
+ };
8140
+ contactLists.push(contactData);
8141
+ });
8142
+ }
8143
+
8144
+ return contactLists;
8145
+ }; // Address list
8146
+
8147
+
8148
+ var addresslist = function addresslist(data) {
8149
+ var addLists = [];
8150
+
8151
+ if (data && data.length > 0) {
8152
+ data.map(function (val) {
8153
+ var addressData = {
8154
+ // "_id": "string",
8155
+ "use": val.use ? val.use.value : '',
8156
+ "text": val.addressLine1 ? val.addressLine1 : "",
8157
+ "line": val.addressLine2 ? val.addressLine2 : "",
8158
+ "city": val.city ? val.city.value : '',
8159
+ "district": val.district ? val.district.value : "",
8160
+ "state": val.state ? val.state.value : "",
8161
+ "postalCode": val.pincode ? val.pincode : "",
8162
+ "country": val.country ? val.country.value : "",
8163
+ "latitude": "",
8164
+ "longitude": "",
8165
+ 'Type': val.type ? val.type.value : ""
8166
+ };
8167
+ addLists.push(addressData);
8168
+ });
8169
+ }
8170
+
8171
+ return addLists;
8172
+ };
8173
+
8174
+ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8175
+ //person id
8176
+ var personId = {};
8177
+
8178
+ if (person_id) {
8179
+ personId = {
8180
+ "PersonID": person_id
8181
+ };
8182
+ } // filter to update the practitioner
8183
+
8184
+
8185
+ var filter = {};
8186
+
8187
+ if (_key) {
8188
+ filter = {
8189
+ "filter": {
8190
+ "_key": _key
8191
+ }
8192
+ };
8193
+ }
8194
+
8195
+ var id = {};
8196
+
8197
+ if (!_key) {
8198
+ id = {
8199
+ id: 0
8200
+ };
8201
+ } // PRACTITIONER IDENTIFICATION
8202
+
8156
8203
  if (data.identification && data.identification.length > 0) {
8157
8204
  data.identification.map(function (val) {
8158
8205
  // var given = moment(val.expiry_date, "YYYY-MM-DD");
@@ -8161,7 +8208,7 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8161
8208
  ({
8162
8209
  "IDType": val.id_type.value ? val.id_type.value : "",
8163
8210
  "IDNumber": val.id_number ? val.id_number : "",
8164
- "ExpiryDate": val.expiry_date ? moment(val.expiry_date).unix() : null // doc
8211
+ "ExpiryDate": val.expiry_date ? getUtcTime(moment(val.expiry_date)) : null // doc
8165
8212
  // "files": val.doc ? val.doc : []
8166
8213
 
8167
8214
  });
@@ -8180,8 +8227,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8180
8227
  "files": val.doc ? val.doc : [],
8181
8228
  "period": [{
8182
8229
  // "_id": "string",
8183
- "start": moment().unix(),
8184
- "end": val.expiry_date ? moment(val.expiry_date).unix() : null // "id": "number"
8230
+ "start": getUtcTime(),
8231
+ "end": val.expiry_date ? getUtcTime(moment(val.expiry_date)) : null // "id": "number"
8185
8232
 
8186
8233
  }] // "assigner": "string",
8187
8234
  // "Type": "string",
@@ -8207,8 +8254,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8207
8254
  "suffix": val.suffix ? val.suffix.value : "",
8208
8255
  "period": [{
8209
8256
  // "_id": "",
8210
- "start": moment().unix(),
8211
- "end": moment().endOf('day').unix() // "id": "number"
8257
+ "start": getUtcTime(),
8258
+ "end": getUtcTime(moment().endOf('day')) // "id": "number"
8212
8259
 
8213
8260
  }]
8214
8261
  };
@@ -8240,8 +8287,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8240
8287
  "valueprefix": val.country_code ? val.country_code.value : "",
8241
8288
  "period": [{
8242
8289
  // "_id": "string",
8243
- "start": moment().unix(),
8244
- "end": moment().endOf('day').unix() // "id": "number"
8290
+ "start": getUtcTime(),
8291
+ "end": getUtcTime(moment().endOf('day')) // "id": "number"
8245
8292
 
8246
8293
  }] // "id": "number"
8247
8294
 
@@ -8273,8 +8320,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8273
8320
  // "EntityName": val.entity_name ? val.entity_name.value : "",
8274
8321
  period: [{
8275
8322
  // "_id": "string",
8276
- start: val.start_date ? moment(val.start_date).unix() : null,
8277
- end: val.end_date ? moment(val.end_date).unix() : null // "id": "number"
8323
+ start: val.start_date ? getUtcTime(moment(val.start_date)) : null,
8324
+ end: val.end_date ? getUtcTime(moment(val.end_date)) : null // "id": "number"
8278
8325
 
8279
8326
  }],
8280
8327
  SpecialtyID: val.speciality ? val.speciality.value : "",
@@ -8322,9 +8369,9 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8322
8369
  var qualificationData = {
8323
8370
  "name": val.name ? val.name : "",
8324
8371
  "university_board": val.qualification_name ? val.qualification_name : "",
8325
- "issue_date": val.issued_by ? moment(val.issued_by).unix() : null,
8326
- "valid_from": val.start_date ? moment(val.start_date).unix() : null,
8327
- "valid_to": val.end_date ? moment(val.end_date).unix() : null,
8372
+ "issue_date": val.issued_by ? getUtcTime(moment(val.issued_by)) : null,
8373
+ "valid_from": val.start_date ? getUtcTime(moment(val.start_date)) : null,
8374
+ "valid_to": val.end_date ? getUtcTime(moment(val.end_date)) : null,
8328
8375
  "files": val.doc ? val.doc : []
8329
8376
  };
8330
8377
  qualification_list.push(qualificationData);
@@ -8353,10 +8400,10 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8353
8400
  "organization": val.organization ? val.organization : "",
8354
8401
  "course_name": val.course_name ? val.course_name : "",
8355
8402
  "responsible_person": val.responsible_person ? val.responsible_person : "",
8356
- "course_start_date": val.course_start_date ? moment(val.course_start_date).unix() : null,
8357
- "course_end_date": val.course_end_date ? moment(val.course_end_date).unix() : null,
8358
- "certificate_issued_date": val.certificate_issue_date ? moment(val.certificate_issue_date).unix() : null,
8359
- "certificate_expiry_date": val.certificate_expiry_date ? moment(val.certificate_expiry_date).unix() : null,
8403
+ "course_start_date": val.course_start_date ? getUtcTime(moment(val.course_start_date)) : null,
8404
+ "course_end_date": val.course_end_date ? getUtcTime(moment(val.course_end_date)) : null,
8405
+ "certificate_issued_date": val.certificate_issue_date ? getUtcTime(moment(val.certificate_issue_date)) : null,
8406
+ "certificate_expiry_date": val.certificate_expiry_date ? getUtcTime(moment(val.certificate_expiry_date)) : null,
8360
8407
  "files": val.doc ? val.doc : [],
8361
8408
  "training_contact_details": contactList(val.contact),
8362
8409
  "training_address": addresslist(val.address)
@@ -8375,8 +8422,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8375
8422
  "department": val.department ? val.department : "",
8376
8423
  "designation": val.designation ? val.designation : "",
8377
8424
  "role": val.role ? val.role : "",
8378
- "start_date": val.start_date ? moment(val.start_date).unix() : null,
8379
- "end_date": val.end_date ? moment(val.end_date).unix() : null,
8425
+ "start_date": val.start_date ? getUtcTime(moment(val.start_date)) : null,
8426
+ "end_date": val.end_date ? getUtcTime(moment(val.end_date)) : null,
8380
8427
  "report_to": val.reporting_to ? val.reporting_to : "",
8381
8428
  "grade": val.grade ? val.grade : "",
8382
8429
  "pay_scale": val.pay_scale ? val.pay_scale : "",
@@ -8400,7 +8447,7 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8400
8447
  "type": val.type ? val.type : "",
8401
8448
  "title": val.title ? val.title : "",
8402
8449
  "note": val.notes ? val.notes : "",
8403
- "date": val.date ? moment(val.date).unix() : null,
8450
+ "date": val.date ? getUtcTime(moment(val.date)) : null,
8404
8451
  "files": val.doc ? val.doc : []
8405
8452
  };
8406
8453
  awardsList.push(awardsData);
@@ -8948,7 +8995,7 @@ var generateReadJSON$4 = function generateReadJSON(data, masters) {
8948
8995
  return idlabel.value === val.user;
8949
8996
  })[0] : {},
8950
8997
  "id_number": val.value,
8951
- "expiry_date": val.period[0].end ? moment.unix(val.period[0].end).format("YYYY-MM-DD") : null,
8998
+ "expiry_date": val.period[0].end ? utcTOLocal(val.period[0].end, "YYYY-MM-DD") : null,
8952
8999
  "doc": val.files
8953
9000
  };
8954
9001
  identifier.push(identifierData);
@@ -9021,8 +9068,8 @@ var generateReadJSON$4 = function generateReadJSON(data, masters) {
9021
9068
  primary_specialty: val.primary_specialty ? val.primary_specialty : false,
9022
9069
  select_role: getmasterOprions("role", val.role && ((_val$role = val.role) === null || _val$role === void 0 ? void 0 : _val$role.length) > 0 ? val.role[0]._id : null, masters)[0],
9023
9070
  status: val.active ? val.active : false,
9024
- start_date: val.period && ((_val$period = val.period) === null || _val$period === void 0 ? void 0 : _val$period.length) > 0 && val.period[0].start ? moment.unix(val.period[0].start).format("YYYY-MM-DD") : null,
9025
- end_date: val.period && ((_val$period2 = val.period) === null || _val$period2 === void 0 ? void 0 : _val$period2.length) > 0 && val.period[0].end ? moment.unix(val.period[0].end).format("YYYY-MM-DD") : null,
9071
+ start_date: val.period && ((_val$period = val.period) === null || _val$period === void 0 ? void 0 : _val$period.length) > 0 && val.period[0].start ? utcTOLocal(val.period[0].start, "YYYY-MM-DD") : null,
9072
+ end_date: val.period && ((_val$period2 = val.period) === null || _val$period2 === void 0 ? void 0 : _val$period2.length) > 0 && val.period[0].end ? utcTOLocal(val.period[0].end, "YYYY-MM-DD") : null,
9026
9073
  contact: contactListData(val.telecom, masters),
9027
9074
  doc: val.files ? val.files : [],
9028
9075
  // "telecom": contactList(val.contact),
@@ -9060,9 +9107,9 @@ var generateReadJSON$4 = function generateReadJSON(data, masters) {
9060
9107
  var qualificationData = {
9061
9108
  "name": val.name ? val.name : "",
9062
9109
  "qualification_name": val.university_board ? val.university_board : "",
9063
- "issued_by": val.issue_date ? moment.unix(val.issue_date).format("YYYY-MM-DD") : null,
9064
- "start_date": val.valid_from ? moment.unix(val.valid_from).format("YYYY-MM-DD") : null,
9065
- "end_date": val.valid_to ? moment.unix(val.valid_to).format("YYYY-MM-DD") : null,
9110
+ "issued_by": val.issue_date ? utcTOLocal(val.issue_date, "YYYY-MM-DD") : null,
9111
+ "start_date": val.valid_from ? utcTOLocal(val.valid_from, "YYYY-MM-DD") : null,
9112
+ "end_date": val.valid_to ? utcTOLocal(val.valid_to, "YYYY-MM-DD") : null,
9066
9113
  "doc": val.files ? val.files : []
9067
9114
  };
9068
9115
  qualificationList.push(qualificationData);
@@ -9089,10 +9136,10 @@ var generateReadJSON$4 = function generateReadJSON(data, masters) {
9089
9136
  "organization": val.organization ? val.organization : "",
9090
9137
  "course_name": val.course_name ? val.course_name : "",
9091
9138
  "responsible_person": val.responsible_person ? val.responsible_person : "",
9092
- "course_start_date": val.course_start_date ? moment.unix(val.course_start_date).format("YYYY-MM-DD") : null,
9093
- "course_end_date": val.course_end_date ? moment.unix(val.course_end_date).format("YYYY-MM-DD") : null,
9094
- "certificate_issue_date": val.certificate_issued_date ? moment.unix(val.certificate_issued_date).format("YYYY-MM-DD") : null,
9095
- "certificate_expiry_date": val.certificate_expiry_date ? moment.unix(val.certificate_expiry_date).format("YYYY-MM-DD") : null,
9139
+ "course_start_date": val.course_start_date ? utcTOLocal(val.course_start_date, "YYYY-MM-DD") : null,
9140
+ "course_end_date": val.course_end_date ? utcTOLocal(val.course_end_date, "YYYY-MM-DD") : null,
9141
+ "certificate_issue_date": val.certificate_issued_date ? utcTOLocal(val.certificate_issued_date, "YYYY-MM-DD") : null,
9142
+ "certificate_expiry_date": val.certificate_expiry_date ? utcTOLocal(val.certificate_expiry_date, "YYYY-MM-DD") : null,
9096
9143
  "doc": val.files ? val.files : [],
9097
9144
  "contact": contactListData(val.training_contact_details, masters),
9098
9145
  "address": addressListData(val.training_address, masters)
@@ -9110,8 +9157,8 @@ var generateReadJSON$4 = function generateReadJSON(data, masters) {
9110
9157
  "department": val.department ? val.department : "",
9111
9158
  "designation": val.designation ? val.designation : "",
9112
9159
  "role": val.role ? val.role : "",
9113
- "start_date": val.start_date ? moment.unix(val.start_date).format("YYYY-MM-DD") : null,
9114
- "end_date": val.end_date ? moment.unix(val.end_date).format("YYYY-MM-DD") : null,
9160
+ "start_date": val.start_date ? utcTOLocal(val.start_date, "YYYY-MM-DD") : null,
9161
+ "end_date": val.end_date ? utcTOLocal(val.end_date, "YYYY-MM-DD") : null,
9115
9162
  "reporting_to": val.report_to ? val.report_to : "",
9116
9163
  "grade": val.grade ? val.grade : "",
9117
9164
  "pay_scale": val.pay_scale ? val.pay_scale : "",
@@ -9134,7 +9181,7 @@ var generateReadJSON$4 = function generateReadJSON(data, masters) {
9134
9181
  "type": val.type ? val.type : "",
9135
9182
  "title": val.title ? val.title : "",
9136
9183
  "notes": val.note ? val.note : "",
9137
- "date": val.date ? moment.unix(val.date).format("YYYY-MM-DD") : null,
9184
+ "date": val.date ? utcTOLocal(val.date, "YYYY-MM-DD") : null,
9138
9185
  "doc": val.files ? val.files : []
9139
9186
  };
9140
9187
  awardsList.push(awardsListData);
@@ -11858,8 +11905,8 @@ var timeslotList = function timeslotList(data) {
11858
11905
  if (data && data.length > 0) {
11859
11906
  data.map(function (val) {
11860
11907
  var timelot_obj = {
11861
- ovrfromtime: val.fromTime ? moment(val.fromTime).unix() : null,
11862
- ovrtotime: val.toTime ? moment(val.toTime).unix() : null // ovrfromtime: val.fromTime
11908
+ ovrfromtime: val.fromTime ? getUtcTime(moment(val.fromTime)) : null,
11909
+ ovrtotime: val.toTime ? getUtcTime(moment(val.toTime)) : null // ovrfromtime: val.fromTime
11863
11910
  // ? parseFloat(val.fromTime.replace(":", "."))
11864
11911
  // : null,
11865
11912
  // ovrtotime: val.toTime ? parseFloat(val.toTime.replace(":", ".")) : null,
@@ -11878,8 +11925,8 @@ var workday_timeslot = function workday_timeslot(data) {
11878
11925
  if (data && data.length > 0) {
11879
11926
  data.map(function (val) {
11880
11927
  var workday_timeslot_obj = {
11881
- openingtime: val.fromTime ? moment(val.fromTime).unix() : null,
11882
- closingtime: val.toTime ? moment(val.toTime).unix() : null // openingtime: val.fromTime
11928
+ openingtime: val.fromTime ? getUtcTime(moment(val.fromTime)) : null,
11929
+ closingtime: val.toTime ? getUtcTime(moment(val.toTime)) : null // openingtime: val.fromTime
11883
11930
  // ? parseFloat(val.fromTime.replace(":", "."))
11884
11931
  // : null,
11885
11932
  // closingtime: val.toTime
@@ -11915,8 +11962,8 @@ var generateJSON = function generateJSON(data, _key) {
11915
11962
  value: "",
11916
11963
  period: [{
11917
11964
  //_id: "",
11918
- start: moment().unix(),
11919
- end: moment().endOf("day").unix() //id: "",
11965
+ start: getUtcTime(),
11966
+ end: getUtcTime(moment().endOf("day")) //id: "",
11920
11967
 
11921
11968
  }] // assigner: "",
11922
11969
  // Type: "",
@@ -11944,8 +11991,8 @@ var generateJSON = function generateJSON(data, _key) {
11944
11991
  rank: val.priority.value.value ? val.priority.value.value : "",
11945
11992
  period: [{
11946
11993
  //_id: "",
11947
- start: moment().unix(),
11948
- end: moment().endOf("day").unix() //id: "",
11994
+ start: getUtcTime(),
11995
+ end: getUtcTime(moment().endOf("day")) //id: "",
11949
11996
 
11950
11997
  }],
11951
11998
  //id: "",
@@ -11985,7 +12032,7 @@ var generateJSON = function generateJSON(data, _key) {
11985
12032
  if (val.type === "singleDate") {
11986
12033
  final_obj = {
11987
12034
  overridetype: "Single",
11988
- ovrfromdate: val.selectDate ? moment(val.selectDate).unix() : null,
12035
+ ovrfromdate: val.selectDate ? getUtcTime(moment(val.selectDate)) : null,
11989
12036
  ovrtodate: 0,
11990
12037
  operationTime: [{
11991
12038
  ovrday: "Monday",
@@ -11996,8 +12043,8 @@ var generateJSON = function generateJSON(data, _key) {
11996
12043
  } else if (val.type === "dateRange") {
11997
12044
  final_obj = {
11998
12045
  overridetype: "Multiple",
11999
- ovrfromdate: val.fromDate ? moment(val.fromDate).unix() : null,
12000
- ovrtodate: val.toDate ? moment(val.toDate).unix() : null,
12046
+ ovrfromdate: val.fromDate ? getUtcTime(moment(val.fromDate)) : null,
12047
+ ovrtodate: val.toDate ? getUtcTime(moment(val.toDate)) : null,
12001
12048
  operationTime: dayslotlist(val.daySlots)
12002
12049
  };
12003
12050
  overRideArr.push(final_obj);
@@ -14689,7 +14736,7 @@ var queries$i = {
14689
14736
  "doc": _objectSpread2(_objectSpread2({
14690
14737
  // "_id": "string",
14691
14738
  // "CalYear": "number",
14692
- "CalDate": data.date ? moment(data.date).unix() : null,
14739
+ "CalDate": data.date ? getUtcTime(moment(data.date)) : null,
14693
14740
  "CalDay": data.date ? moment(data.date).format("dddd") : "",
14694
14741
  "HolidayType": data.holiday_type,
14695
14742
  "HoidayReason": data.holiday_reason,
@@ -15143,7 +15190,7 @@ var HOLIDAY_READ = createAsyncThunk("holidaySlice/holidy_list", /*#__PURE__*/_as
15143
15190
  data.result.map(function (val) {
15144
15191
  if (val._key) {
15145
15192
  arry.push({
15146
- "date": val.CalDate ? moment.unix(val.CalDate).format("DD-MM-YY") : null,
15193
+ "date": val.CalDate ? utcTOLocal(val.CalDate, "DD-MM-YY") : null,
15147
15194
  "CalDate": val.CalDate ? val.CalDate : null,
15148
15195
  "day": val.CalDay ? val.CalDay : "",
15149
15196
  "holiday_reason": val.HoidayReason ? val.HoidayReason : "",
@@ -17317,7 +17364,7 @@ var DfltFreqbyPatAttribFun = function DfltFreqbyPatAttribFun(val, dataval) {
17317
17364
  };
17318
17365
 
17319
17366
  var generateDrugMasterJSON = function generateDrugMasterJSON(data, _key, draft) {
17320
- var _data$phDrugMaster, _data$phDrugMaster$ro, _data$phDrugMaster2, _data$alternateDrugs, _data$phDrugMaster4, _data$availableStreng, _data$phDrugMaster5, _data$instructions, _data$frequencyRules, _data$dispensesRules, _data$phDrugMaster6, _data$phDrugMaster6$s, _data$mappedStack, _data$phDrugMaster$co, _data$phDrugMaster8, _data$phDrugMaster$sh, _data$phDrugMaster9, _data$phDrugMaster$lo, _data$phDrugMaster10, _data$phDrugMaster$in, _data$phDrugMaster11, _data$phDrugMaster$dr, _data$phDrugMaster12, _data$phDrugMaster$cl, _data$phDrugMaster13, _data$phDrugMaster13$, _data$phDrugMaster$ty, _data$phDrugMaster14, _data$phDrugMaster14$, _data$phDrugMaster$ca, _data$phDrugMaster15, _data$phDrugMaster15$, _data$phDrugMaster16, _data$phDrugMaster16$, _data$phDrugMaster17, _data$phDrugMaster18, _data$phDrugMaster18$, _data$phDrugMaster19, _data$phDrugMaster19$, _data$phDrugMaster20, _data$phDrugMaster21, _data$phDrugMaster21$, _data$drugOtherAttrib, _data$phDrugMaster22, _data$drugOtherAttrib2, _data$drugOtherAttrib3, _data$phDrugMaster23, _data$drugOtherAttrib4, _data$drugOtherAttrib5, _data$phDrugMaster24, _data$drugOtherAttrib6, _data$drugOtherAttrib7, _data$phDrugMaster25, _data$drugOtherAttrib8, _data$drugOtherAttrib9, _data$phDrugMaster26, _data$drugOtherAttrib10, _data$status$status$v, _data$status, _data$status$status, _data$status2, _moment$unix, _data$status3, _data$status4, _moment$unix2, _data$status5, _data$status$reason, _data$status6;
17367
+ var _data$phDrugMaster, _data$phDrugMaster$ro, _data$phDrugMaster2, _data$alternateDrugs, _data$phDrugMaster4, _data$availableStreng, _data$phDrugMaster5, _data$instructions, _data$frequencyRules, _data$dispensesRules, _data$phDrugMaster6, _data$phDrugMaster6$s, _data$mappedStack, _data$phDrugMaster$co, _data$phDrugMaster8, _data$phDrugMaster$sh, _data$phDrugMaster9, _data$phDrugMaster$lo, _data$phDrugMaster10, _data$phDrugMaster$in, _data$phDrugMaster11, _data$phDrugMaster$dr, _data$phDrugMaster12, _data$phDrugMaster$cl, _data$phDrugMaster13, _data$phDrugMaster13$, _data$phDrugMaster$ty, _data$phDrugMaster14, _data$phDrugMaster14$, _data$phDrugMaster$ca, _data$phDrugMaster15, _data$phDrugMaster15$, _data$phDrugMaster16, _data$phDrugMaster16$, _data$phDrugMaster17, _data$phDrugMaster18, _data$phDrugMaster18$, _data$phDrugMaster19, _data$phDrugMaster19$, _data$phDrugMaster20, _data$phDrugMaster21, _data$phDrugMaster21$, _data$drugOtherAttrib, _data$phDrugMaster22, _data$drugOtherAttrib2, _data$drugOtherAttrib3, _data$phDrugMaster23, _data$drugOtherAttrib4, _data$drugOtherAttrib5, _data$phDrugMaster24, _data$drugOtherAttrib6, _data$drugOtherAttrib7, _data$phDrugMaster25, _data$drugOtherAttrib8, _data$drugOtherAttrib9, _data$phDrugMaster26, _data$drugOtherAttrib10, _data$status$status$v, _data$status, _data$status$status, _data$status2, _getUtcTime, _data$status3, _data$status4, _getUtcTime2, _data$status5, _data$status$reason, _data$status6;
17321
17368
 
17322
17369
  var statusactive = true;
17323
17370
  var filter = {};
@@ -17530,8 +17577,8 @@ var generateDrugMasterJSON = function generateDrugMasterJSON(data, _key, draft)
17530
17577
  "DrugDispRules": DrugDispRulesData,
17531
17578
  //STATUS
17532
17579
  "Status": (_data$status$status$v = data === null || data === void 0 ? void 0 : (_data$status = data.status) === null || _data$status === void 0 ? void 0 : (_data$status$status = _data$status.status) === null || _data$status$status === void 0 ? void 0 : _data$status$status.value) !== null && _data$status$status$v !== void 0 ? _data$status$status$v : "",
17533
- "EffectiveFrom": data !== null && data !== void 0 && (_data$status2 = data.status) !== null && _data$status2 !== void 0 && _data$status2.effectiveFrom ? (_moment$unix = moment(data === null || data === void 0 ? void 0 : (_data$status3 = data.status) === null || _data$status3 === void 0 ? void 0 : _data$status3.effectiveFrom).unix()) !== null && _moment$unix !== void 0 ? _moment$unix : null : null,
17534
- "EffectiveTo": data !== null && data !== void 0 && (_data$status4 = data.status) !== null && _data$status4 !== void 0 && _data$status4.effectiveTo ? (_moment$unix2 = moment(data === null || data === void 0 ? void 0 : (_data$status5 = data.status) === null || _data$status5 === void 0 ? void 0 : _data$status5.effectiveTo).unix()) !== null && _moment$unix2 !== void 0 ? _moment$unix2 : null : null,
17580
+ "EffectiveFrom": data !== null && data !== void 0 && (_data$status2 = data.status) !== null && _data$status2 !== void 0 && _data$status2.effectiveFrom ? (_getUtcTime = getUtcTime(moment(data === null || data === void 0 ? void 0 : (_data$status3 = data.status) === null || _data$status3 === void 0 ? void 0 : _data$status3.effectiveFrom))) !== null && _getUtcTime !== void 0 ? _getUtcTime : null : null,
17581
+ "EffectiveTo": data !== null && data !== void 0 && (_data$status4 = data.status) !== null && _data$status4 !== void 0 && _data$status4.effectiveTo ? (_getUtcTime2 = getUtcTime(moment(data === null || data === void 0 ? void 0 : (_data$status5 = data.status) === null || _data$status5 === void 0 ? void 0 : _data$status5.effectiveTo))) !== null && _getUtcTime2 !== void 0 ? _getUtcTime2 : null : null,
17535
17582
  "InactiveReason": (_data$status$reason = data === null || data === void 0 ? void 0 : (_data$status6 = data.status) === null || _data$status6 === void 0 ? void 0 : _data$status6.reason) !== null && _data$status$reason !== void 0 ? _data$status$reason : "",
17536
17583
  "statusactive": statusactive,
17537
17584
  // save type
@@ -17822,8 +17869,8 @@ var readDrugMasterJSON = function readDrugMasterJSON(data, state) {
17822
17869
  "SourceOfDrugOrderCatalog": data === null || data === void 0 ? void 0 : data.SourceOfDrugOrderCatalog,
17823
17870
  "status": {
17824
17871
  "status": data !== null && data !== void 0 && data.Status ? singelOptionComLable(data === null || data === void 0 ? void 0 : data.Status, state === null || state === void 0 ? void 0 : (_state$drug_master11 = state.drug_master) === null || _state$drug_master11 === void 0 ? void 0 : (_state$drug_master11$ = _state$drug_master11.data) === null || _state$drug_master11$ === void 0 ? void 0 : _state$drug_master11$.status) : [],
17825
- "effectiveFrom": data !== null && data !== void 0 && data.EffectiveFrom ? moment.unix(data === null || data === void 0 ? void 0 : data.EffectiveFrom).format("YYYY-MM-DD") : null,
17826
- "effectiveTo": data !== null && data !== void 0 && data.EffectiveTo ? moment.unix(data === null || data === void 0 ? void 0 : data.EffectiveTo).format("YYYY-MM-DD") : null,
17872
+ "effectiveFrom": data !== null && data !== void 0 && data.EffectiveFrom ? utcTOLocal(data === null || data === void 0 ? void 0 : data.EffectiveFrom, "YYYY-MM-DD") : null,
17873
+ "effectiveTo": data !== null && data !== void 0 && data.EffectiveTo ? utcTOLocal(data === null || data === void 0 ? void 0 : data.EffectiveTo, "YYYY-MM-DD") : null,
17827
17874
  "reason": (_data$InactiveReason = data === null || data === void 0 ? void 0 : data.InactiveReason) !== null && _data$InactiveReason !== void 0 ? _data$InactiveReason : ""
17828
17875
  },
17829
17876
  "drugOtherAttributes": {
@@ -19066,8 +19113,8 @@ var getAvailability = function getAvailability(data) {
19066
19113
  apptreqd: v.appointment,
19067
19114
  apptDurnInMinutes: parseInt(v.duration),
19068
19115
  perfOrganizationEntity: v.entity_type.value,
19069
- EffFrDate: v.effective_from ? moment(v.effective_from).unix() : null,
19070
- EffToDate: v.effective_to ? moment(v.effective_to).unix() : null
19116
+ EffFrDate: v.effective_from ? getUtcTime(moment(v.effective_from)) : null,
19117
+ EffToDate: v.effective_to ? getUtcTime(moment(v.effective_to)) : null
19071
19118
  };
19072
19119
  });
19073
19120
  return arr;
@@ -19454,8 +19501,8 @@ var generatefaciltity = function generatefaciltity(data, state) {
19454
19501
  } : null,
19455
19502
  appointment: v.apptreqd,
19456
19503
  duration: v.apptDurnInMinutes,
19457
- effective_from: new Date(moment.unix(v.EffFrDate)).toLocaleDateString(),
19458
- effective_to: new Date(moment.unix(v.EffToDate)).toLocaleDateString()
19504
+ effective_from: new Date(utcTOLocal(v.EffFrDate)).toLocaleDateString(),
19505
+ effective_to: new Date(utcTOLocal(v.EffToDate)).toLocaleDateString()
19459
19506
  };
19460
19507
  });
19461
19508
  return facilityArr;
@@ -20721,8 +20768,8 @@ var upsertData = function upsertData(payload) {
20721
20768
  "ResourceType": (_payload$basicDetails4 = payload === null || payload === void 0 ? void 0 : (_payload$basicDetails5 = payload.basicDetails) === null || _payload$basicDetails5 === void 0 ? void 0 : (_payload$basicDetails6 = _payload$basicDetails5.resource_type) === null || _payload$basicDetails6 === void 0 ? void 0 : _payload$basicDetails6.value) !== null && _payload$basicDetails4 !== void 0 ? _payload$basicDetails4 : "",
20722
20769
  "ResourceRole": (_payload$basicDetails7 = payload === null || payload === void 0 ? void 0 : (_payload$basicDetails8 = payload.basicDetails) === null || _payload$basicDetails8 === void 0 ? void 0 : (_payload$basicDetails9 = _payload$basicDetails8.resource_role) === null || _payload$basicDetails9 === void 0 ? void 0 : _payload$basicDetails9.value) !== null && _payload$basicDetails7 !== void 0 ? _payload$basicDetails7 : "",
20723
20770
  "Resource_Criteria": (_ruleSet = ruleSet) !== null && _ruleSet !== void 0 ? _ruleSet : [],
20724
- "EffectiveFrom": moment(payload.scheduledPeriod.start_date).unix(),
20725
- "EffectiveTo": payload.scheduledPeriod.end_date ? moment(payload.scheduledPeriod.end_date).unix() : 0,
20771
+ "EffectiveFrom": getUtcTime(moment(payload.scheduledPeriod.start_date)),
20772
+ "EffectiveTo": payload.scheduledPeriod.end_date ? getUtcTime(moment(payload.scheduledPeriod.end_date)) : 0,
20726
20773
  "Schedulemode": (_payload$scheduledPer = payload === null || payload === void 0 ? void 0 : (_payload$scheduledPer2 = payload.scheduledPeriod) === null || _payload$scheduledPer2 === void 0 ? void 0 : (_payload$scheduledPer3 = _payload$scheduledPer2.schedule_mode) === null || _payload$scheduledPer3 === void 0 ? void 0 : _payload$scheduledPer3.value) !== null && _payload$scheduledPer !== void 0 ? _payload$scheduledPer : "",
20727
20774
  "scheduleappmang": parseInt((_payload$scheduledPer4 = payload === null || payload === void 0 ? void 0 : (_payload$scheduledPer5 = payload.scheduledPeriod) === null || _payload$scheduledPer5 === void 0 ? void 0 : _payload$scheduledPer5.availablity_management) !== null && _payload$scheduledPer4 !== void 0 ? _payload$scheduledPer4 : 0),
20728
20775
  "Remarks": "",
@@ -20895,8 +20942,8 @@ var makeJson = function makeJson(data) {
20895
20942
  var _val$ResourceType, _val$ResourceRole$dis, _val$ResourceRole, _val$ResourceRole2;
20896
20943
 
20897
20944
  return _objectSpread2(_objectSpread2({}, val), {}, {
20898
- start_date: moment.unix(val.EffectiveFrom).format("DD-MM-YYYY"),
20899
- end_date: val.EffectiveTo ? moment.unix(val.EffectiveTo).format("DD-MM-YYYY") : "",
20945
+ start_date: utcTOLocal(val.EffectiveFrom, "DD-MM-YYYY"),
20946
+ end_date: val.EffectiveTo ? utcTOLocal(val.EffectiveTo, "DD-MM-YYYY") : "",
20900
20947
  resource_type: val === null || val === void 0 ? void 0 : (_val$ResourceType = val.ResourceType) === null || _val$ResourceType === void 0 ? void 0 : _val$ResourceType.display,
20901
20948
  resource_role: (_val$ResourceRole$dis = val === null || val === void 0 ? void 0 : (_val$ResourceRole = val.ResourceRole) === null || _val$ResourceRole === void 0 ? void 0 : _val$ResourceRole.display) !== null && _val$ResourceRole$dis !== void 0 ? _val$ResourceRole$dis : val === null || val === void 0 ? void 0 : (_val$ResourceRole2 = val.ResourceRole) === null || _val$ResourceRole2 === void 0 ? void 0 : _val$ResourceRole2.shortdesc
20902
20949
  });
@@ -21329,11 +21376,12 @@ var ALL_PRACTITIONER = createAsyncThunk("scheduleManagementApiSlice/allPractitio
21329
21376
  data = _context2.sent;
21330
21377
  arr = [];
21331
21378
  data && data.result.map(function (val) {
21332
- var _val$name$0$prefix$0$, _val$name, _val$name$, _val$name$$prefix, _val$name$$prefix$, _val$name$$prefix$$co, _val$name$$prefix$$co2, _val$name$0$text, _val$name2, _val$name2$, _val$name$0$given, _val$name3, _val$name$0$family, _val$name4, _val$name4$, _val$name$0$suffix$0$, _val$name5, _val$name5$, _val$name5$$suffix, _val$name5$$suffix$, _val$name5$$suffix$$c, _val$name5$$suffix$$c2;
21379
+ var _val$name;
21333
21380
 
21334
21381
  arr.push({
21335
21382
  value: val._id,
21336
- label: ((_val$name$0$prefix$0$ = val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : (_val$name$ = _val$name[0]) === null || _val$name$ === void 0 ? void 0 : (_val$name$$prefix = _val$name$.prefix) === null || _val$name$$prefix === void 0 ? void 0 : (_val$name$$prefix$ = _val$name$$prefix[0]) === null || _val$name$$prefix$ === void 0 ? void 0 : (_val$name$$prefix$$co = _val$name$$prefix$.coding) === null || _val$name$$prefix$$co === void 0 ? void 0 : (_val$name$$prefix$$co2 = _val$name$$prefix$$co[0]) === null || _val$name$$prefix$$co2 === void 0 ? void 0 : _val$name$$prefix$$co2.display) !== null && _val$name$0$prefix$0$ !== void 0 ? _val$name$0$prefix$0$ : "") + " " + ((_val$name$0$text = val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : (_val$name2$ = _val$name2[0]) === null || _val$name2$ === void 0 ? void 0 : _val$name2$.text) !== null && _val$name$0$text !== void 0 ? _val$name$0$text : "") + " " + ((_val$name$0$given = val === null || val === void 0 ? void 0 : (_val$name3 = val.name) === null || _val$name3 === void 0 ? void 0 : _val$name3[0].given) !== null && _val$name$0$given !== void 0 ? _val$name$0$given : "") + " " + ((_val$name$0$family = val === null || val === void 0 ? void 0 : (_val$name4 = val.name) === null || _val$name4 === void 0 ? void 0 : (_val$name4$ = _val$name4[0]) === null || _val$name4$ === void 0 ? void 0 : _val$name4$.family) !== null && _val$name$0$family !== void 0 ? _val$name$0$family : "") + " " + ((_val$name$0$suffix$0$ = val === null || val === void 0 ? void 0 : (_val$name5 = val.name) === null || _val$name5 === void 0 ? void 0 : (_val$name5$ = _val$name5[0]) === null || _val$name5$ === void 0 ? void 0 : (_val$name5$$suffix = _val$name5$.suffix) === null || _val$name5$$suffix === void 0 ? void 0 : (_val$name5$$suffix$ = _val$name5$$suffix[0]) === null || _val$name5$$suffix$ === void 0 ? void 0 : (_val$name5$$suffix$$c = _val$name5$$suffix$.coding) === null || _val$name5$$suffix$$c === void 0 ? void 0 : (_val$name5$$suffix$$c2 = _val$name5$$suffix$$c[0]) === null || _val$name5$$suffix$$c2 === void 0 ? void 0 : _val$name5$$suffix$$c2.display) !== null && _val$name$0$suffix$0$ !== void 0 ? _val$name$0$suffix$0$ : ""),
21383
+ label: makeName(val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : _val$name[0]),
21384
+ //(val?.name?.[0]?.prefix?.[0]?.coding?.[0]?.display??"")+ " " + (val?.name?.[0]?.text??"") + " " + (val?.name?.[0].given??"") + " " + (val?.name?.[0]?.family??"") + " " + (val?.name?.[0]?.suffix?.[0]?.coding?.[0]?.display??""),
21337
21385
  // label:
21338
21386
  // val.name.length > 0
21339
21387
  // ? val.name[0].prefix.length > 0
@@ -21726,7 +21774,7 @@ var queries$c = {
21726
21774
  db_name: dbName,
21727
21775
  entity: "Organization",
21728
21776
  // filter: "'CodingMaster/11898' IN Organization.OrgType",
21729
- filter: "Organization.ParentOrgID ==[] && Organization.activestatus==true ",
21777
+ filter: "Organization.ParentOrgID ==[] && Organization.activestatus==true && Organization.isExternal==".concat(type.isexternal),
21730
21778
  // return_fields: "MERGE(Organization,{Organization:(FOR org IN Organization FILTER Organization.id IN org.ParentOrgID AND 'CodingMaster/11899' IN org.OrgType RETURN MERGE(org,{facility:(FOR fac IN Organization FILTER 'CodingMaster/11058' IN fac.OrgType AND org.id IN fac.ParentOrgID RETURN fac)}) )})",
21731
21779
  return_fields: "MERGE(Organization,{Organization:(FOR org IN Organization FILTER Organization.id IN org.ParentOrgID RETURN MERGE(org,{facility:(FOR fac IN Organization FILTER org.id IN fac.ParentOrgID RETURN fac)}) )})"
21732
21780
  };
@@ -21740,7 +21788,7 @@ var queries$c = {
21740
21788
  return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN TO_ARRAY(CodeableConceptMaster.coding) RETURN DOCUMENT(cod))})"
21741
21789
  };
21742
21790
  },
21743
- getParentEntity: function getParentEntity() {
21791
+ getParentEntityFull: function getParentEntityFull() {
21744
21792
  return {
21745
21793
  db_name: dbName,
21746
21794
  entity: "Organization",
@@ -21749,6 +21797,23 @@ var queries$c = {
21749
21797
  return_fields: "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
21750
21798
  };
21751
21799
  },
21800
+ getParentEntity: function getParentEntity(type) {
21801
+ // return {
21802
+ // db_name: dbName,
21803
+ // entity: "Organization",
21804
+ // sort: "Organization.name",
21805
+ // filter: `Organization.activestatus==true AND Organization.active==true && Organization.isExternal==${type.isexternal} && Organization.OrgType === '${type.entityType}'`,
21806
+ // return_fields:
21807
+ // "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}",
21808
+ // };
21809
+ return {
21810
+ "db_name": dbName,
21811
+ "entity": "Organization",
21812
+ "sort": "Organization.name",
21813
+ "filter": "Organization.activestatus==true AND Organization.active==true && Organization.isExternal==".concat(type.isexternal, " && DOCUMENT(Organization.OrgType)[*].code ANY == '").concat(type.entityType, "'"),
21814
+ "return_fields": "{OrgType: Organization.OrgType, _id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
21815
+ };
21816
+ },
21752
21817
  getLevelOfCare: function getLevelOfCare() {
21753
21818
  return {
21754
21819
  db_name: dbName,
@@ -22083,7 +22148,7 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
22083
22148
  var obj = {};
22084
22149
 
22085
22150
  if (data) {
22086
- var _data$name, _data$entitycode, _data$ParentOrgID, _data$levelofcareid$d, _data$levelofcareid, _data$levelofcareid$l, _data$levelofcareid2, _ref2, _data$address, _data$address$, _data$address2, _data$address2$, _data$address2$$city, _data$address3, _data$address3$, _data$address3$$distr, _data$address4, _data$address4$, _data$address4$$state, _data$address5, _data$address5$, _data$address5$$posta, _data$address6, _data$address6$, _data$address6$$count, _data$contact$, _data$contact$$name$, _data$contact$$name$$, _data$contact$2, _data$contact$2$name$, _data$contact$3, _data$contact$3$name$, _data$contact$4, _data$contact$4$name$, _data$contact$5, _data$contact$5$name$, _data$contact$5$name$2, _data$contact$0$desig, _data$contact, _data$contact$6, _data$contact$6$desig, _data$logo$, _getpersondetails, _data$contact2;
22151
+ var _data$name, _data$entitycode, _data$ParentOrgID, _data$levelofcareid$d, _data$levelofcareid, _data$levelofcareid$l, _data$levelofcareid2, _ref2, _data$address, _data$address$, _data$address2, _data$address2$, _data$address2$$city, _data$address3, _data$address3$, _data$address3$$distr, _data$address4, _data$address4$, _data$address4$$state, _data$address5, _data$address5$, _data$address5$$posta, _data$address6, _data$address6$, _data$address6$$count, _data$contact$, _data$contact$$name$, _data$contact$$name$$, _data$contact$2, _data$contact$2$name$, _data$contact$3, _data$contact$3$name$, _data$contact$4, _data$contact$4$name$, _data$contact$5, _data$contact$5$name$, _data$contact$5$name$2, _data$contact$0$desig, _data$contact, _data$contact$6, _data$contact$6$desig, _data$logo$, _getpersondetails, _data$contact2, _data$isExternal;
22087
22152
 
22088
22153
  obj = {
22089
22154
  entityName: (_data$name = data === null || data === void 0 ? void 0 : data.name) !== null && _data$name !== void 0 ? _data$name : "",
@@ -22100,7 +22165,8 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
22100
22165
  status: data === null || data === void 0 ? void 0 : data.active,
22101
22166
  log: data === null || data === void 0 ? void 0 : (_data$logo$ = data.logo[0]) === null || _data$logo$ === void 0 ? void 0 : _data$logo$.fileid,
22102
22167
  specialtyDetails: specialtyDetailsarr,
22103
- contact_person_name: (_getpersondetails = getpersondetails((data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.length) > 0 ? data === null || data === void 0 ? void 0 : data.contact : null)) !== null && _getpersondetails !== void 0 ? _getpersondetails : null
22168
+ contact_person_name: (_getpersondetails = getpersondetails((data === null || data === void 0 ? void 0 : (_data$contact2 = data.contact) === null || _data$contact2 === void 0 ? void 0 : _data$contact2.length) > 0 ? data === null || data === void 0 ? void 0 : data.contact : null)) !== null && _getpersondetails !== void 0 ? _getpersondetails : null,
22169
+ external: (_data$isExternal = data === null || data === void 0 ? void 0 : data.isExternal) !== null && _data$isExternal !== void 0 ? _data$isExternal : false
22104
22170
  };
22105
22171
  }
22106
22172
 
@@ -22109,7 +22175,7 @@ var ReadTreeDetailJson = function ReadTreeDetailJson(data, parentOrgName) {
22109
22175
 
22110
22176
  var generateJson$7 = {
22111
22177
  insert_json: function insert_json(data, key) {
22112
- var _data$Identification, _data$Alias, _data$Address, _data$Contact, _data$ContactPersonDe, _data$specialtyDetail, _data$ParentEntity, _data$ParentEntity2, _data$LevelOfCare, _data$imageDetails$, _data$imageDetails$2, _data$imageDetails$3, _data$imageDetails$4;
22178
+ var _data$Identification, _data$Alias, _data$Address, _data$Contact, _data$ContactPersonDe, _data$specialtyDetail, _data$external, _data$ParentEntity, _data$ParentEntity2, _data$LevelOfCare, _data$imageDetails$, _data$imageDetails$2, _data$imageDetails$3, _data$imageDetails$4;
22113
22179
 
22114
22180
  var identifierArr = data === null || data === void 0 ? void 0 : (_data$Identification = data.Identification) === null || _data$Identification === void 0 ? void 0 : _data$Identification.map(function (v, i) {
22115
22181
  var _v$use;
@@ -22121,8 +22187,8 @@ var generateJson$7 = {
22121
22187
  user: v === null || v === void 0 ? void 0 : (_v$use2 = v.use) === null || _v$use2 === void 0 ? void 0 : _v$use2.value,
22122
22188
  value: v === null || v === void 0 ? void 0 : v.idnumber,
22123
22189
  period: [{
22124
- start: moment(v === null || v === void 0 ? void 0 : v.startdate).unix(),
22125
- end: moment(v === null || v === void 0 ? void 0 : v.enddate).unix(),
22190
+ start: getUtcTime(moment(v === null || v === void 0 ? void 0 : v.startdate)),
22191
+ end: getUtcTime(moment(v === null || v === void 0 ? void 0 : v.enddate)),
22126
22192
  id: 0
22127
22193
  }],
22128
22194
  Type: v === null || v === void 0 ? void 0 : (_v$idtype = v.idtype) === null || _v$idtype === void 0 ? void 0 : _v$idtype.value
@@ -22135,8 +22201,8 @@ var generateJson$7 = {
22135
22201
  return {
22136
22202
  aliasType: v === null || v === void 0 ? void 0 : (_v$aliastype = v.aliastype) === null || _v$aliastype === void 0 ? void 0 : _v$aliastype.value,
22137
22203
  aliasDesc: v === null || v === void 0 ? void 0 : v.aliasname,
22138
- aliasStart: moment(v === null || v === void 0 ? void 0 : v.startdate).unix(),
22139
- aliasEnd: moment(v === null || v === void 0 ? void 0 : v.enddate).unix()
22204
+ aliasStart: getUtcTime(moment(v === null || v === void 0 ? void 0 : v.startdate)),
22205
+ aliasEnd: getUtcTime(moment(v === null || v === void 0 ? void 0 : v.enddate))
22140
22206
  };
22141
22207
  });
22142
22208
  var addressArr = data === null || data === void 0 ? void 0 : (_data$Address = data.Address) === null || _data$Address === void 0 ? void 0 : _data$Address.map(function (val, i) {
@@ -22208,8 +22274,8 @@ var generateJson$7 = {
22208
22274
  var specialtyDetailsArr = data === null || data === void 0 ? void 0 : (_data$specialtyDetail = data.specialtyDetails) === null || _data$specialtyDetail === void 0 ? void 0 : _data$specialtyDetail.map(function (val, i) {
22209
22275
  return {
22210
22276
  specialty: val === null || val === void 0 ? void 0 : val.dropdown.id,
22211
- effFrom: moment(val === null || val === void 0 ? void 0 : val.fromDate).unix(),
22212
- effTo: moment(val === null || val === void 0 ? void 0 : val.toDate).unix(),
22277
+ effFrom: getUtcTime(moment(val === null || val === void 0 ? void 0 : val.fromDate)),
22278
+ effTo: getUtcTime(moment(val === null || val === void 0 ? void 0 : val.toDate)),
22213
22279
  external: false
22214
22280
  };
22215
22281
  });
@@ -22247,6 +22313,7 @@ var generateJson$7 = {
22247
22313
  contact: contactpersondetailsArr,
22248
22314
  specialtyDetails: specialtyDetailsArr
22249
22315
  }, id), {}, {
22316
+ isExternal: (_data$external = data === null || data === void 0 ? void 0 : data.external) !== null && _data$external !== void 0 ? _data$external : false,
22250
22317
  ParentOrgID: data !== null && data !== void 0 && (_data$ParentEntity = data.ParentEntity) !== null && _data$ParentEntity !== void 0 && _data$ParentEntity.value ? [data === null || data === void 0 ? void 0 : (_data$ParentEntity2 = data.ParentEntity) === null || _data$ParentEntity2 === void 0 ? void 0 : _data$ParentEntity2.value] : [],
22251
22318
  OrgType: [data.EntityType.value],
22252
22319
  levelofcareid: data === null || data === void 0 ? void 0 : (_data$LevelOfCare = data.LevelOfCare) === null || _data$LevelOfCare === void 0 ? void 0 : _data$LevelOfCare.value,
@@ -22266,15 +22333,17 @@ var generateJson$7 = {
22266
22333
  };
22267
22334
  var generateReadJson$2 = {
22268
22335
  read_json: function read_json(data, Parentget) {
22269
- var _data$identifier, _data$alias, _data$address, _data$telecom, _data$contact, _data$OrgType$, _data$OrgType$2, _data$ParentOrgID, _data$levelofcareid, _data$levelofcareid2, _data$logo$, _data$logo$2, _data$logo$3, _data$logo$4, _data$logo$5;
22336
+ var _data$identifier, _data$alias, _data$address, _data$telecom, _data$contact, _data$OrgType$, _data$OrgType$2, _data$OrgType$3, _data$ParentOrgID, _data$levelofcareid, _data$levelofcareid2, _data$isExternal, _data$logo$, _data$logo$2, _data$logo$3, _data$logo$4, _data$logo$5;
22270
22337
 
22271
22338
  var IdentificationArr = data === null || data === void 0 ? void 0 : (_data$identifier = data.identifier) === null || _data$identifier === void 0 ? void 0 : _data$identifier.map(function (v, i) {
22272
22339
  var _v$period$, _v$period$2, _v$user, _v$user2, _v$Type, _v$Type2;
22273
22340
 
22274
22341
  // IdentificationArr readdd
22275
22342
  return {
22276
- startdate: moment().utc(v === null || v === void 0 ? void 0 : (_v$period$ = v.period[0]) === null || _v$period$ === void 0 ? void 0 : _v$period$.start, "DD-MM-YYYY")._d,
22277
- enddate: moment().utc(v === null || v === void 0 ? void 0 : (_v$period$2 = v.period[0]) === null || _v$period$2 === void 0 ? void 0 : _v$period$2.end, "DD-MM-YYYY")._d,
22343
+ startdate: moment.utc(moment.unix(v === null || v === void 0 ? void 0 : (_v$period$ = v.period[0]) === null || _v$period$ === void 0 ? void 0 : _v$period$.start)).local()._d,
22344
+ // startdate: moment().utc(v?.period[0]?.start, "DD-MM-YYYY")._d,
22345
+ enddate: moment.utc(moment.unix(v === null || v === void 0 ? void 0 : (_v$period$2 = v.period[0]) === null || _v$period$2 === void 0 ? void 0 : _v$period$2.end)).local()._d,
22346
+ // enddate: moment().utc(v?.period[0]?.end, "DD-MM-YYYY")._d,
22278
22347
  use: {
22279
22348
  title: v === null || v === void 0 ? void 0 : (_v$user = v.user) === null || _v$user === void 0 ? void 0 : _v$user.display,
22280
22349
  value: v === null || v === void 0 ? void 0 : (_v$user2 = v.user) === null || _v$user2 === void 0 ? void 0 : _v$user2._id
@@ -22417,13 +22486,15 @@ var generateReadJson$2 = {
22417
22486
 
22418
22487
  // specialtyDetailsarr
22419
22488
  return {
22420
- effFrom: moment(moment.unix(val === null || val === void 0 ? void 0 : val.effFrom)._d).format("DD-MM-YYYY"),
22421
- effTo: moment(moment.unix(val === null || val === void 0 ? void 0 : val.effTo)._d).format("DD-MM-YYYY"),
22489
+ effFrom: utcTOLocal(val === null || val === void 0 ? void 0 : val.effFrom, "DD-MM-YYYY"),
22490
+ effTo: utcTOLocal(val === null || val === void 0 ? void 0 : val.effTo, "DD-MM-YYYY"),
22422
22491
  specialty: val === null || val === void 0 ? void 0 : (_val$specialty = val.specialty) === null || _val$specialty === void 0 ? void 0 : _val$specialty.display,
22423
22492
  code: val === null || val === void 0 ? void 0 : (_val$specialty2 = val.specialty) === null || _val$specialty2 === void 0 ? void 0 : _val$specialty2.code,
22424
22493
  specialty_id: val === null || val === void 0 ? void 0 : (_val$specialty3 = val.specialty) === null || _val$specialty3 === void 0 ? void 0 : _val$specialty3._id,
22425
- fromDate: moment.unix(val === null || val === void 0 ? void 0 : val.effFrom)._d,
22426
- toDate: moment.unix(val.effTo)._d,
22494
+ fromDate: moment(utcTOLocal(val === null || val === void 0 ? void 0 : val.effFrom, "DD-MM-YYYY"))._d,
22495
+ // moment(val?.effFrom)._d,
22496
+ toDate: moment(utcTOLocal(val === null || val === void 0 ? void 0 : val.effTo, "DD-MM-YYYY"))._d,
22497
+ //moment(val.effTo)._d,
22427
22498
  dropdown: {
22428
22499
  label: (val === null || val === void 0 ? void 0 : (_val$specialty4 = val.specialty) === null || _val$specialty4 === void 0 ? void 0 : _val$specialty4.display) + " (" + (val === null || val === void 0 ? void 0 : (_val$specialty5 = val.specialty) === null || _val$specialty5 === void 0 ? void 0 : _val$specialty5.code) + ")",
22429
22500
  value: val === null || val === void 0 ? void 0 : (_val$specialty6 = val.specialty) === null || _val$specialty6 === void 0 ? void 0 : _val$specialty6.code,
@@ -22437,7 +22508,8 @@ var generateReadJson$2 = {
22437
22508
  status: data === null || data === void 0 ? void 0 : data.active,
22438
22509
  EntityType_: {
22439
22510
  title: data === null || data === void 0 ? void 0 : (_data$OrgType$ = data.OrgType[0]) === null || _data$OrgType$ === void 0 ? void 0 : _data$OrgType$.display,
22440
- value: data === null || data === void 0 ? void 0 : (_data$OrgType$2 = data.OrgType[0]) === null || _data$OrgType$2 === void 0 ? void 0 : _data$OrgType$2._id
22511
+ value: data === null || data === void 0 ? void 0 : (_data$OrgType$2 = data.OrgType[0]) === null || _data$OrgType$2 === void 0 ? void 0 : _data$OrgType$2._id,
22512
+ code: data === null || data === void 0 ? void 0 : (_data$OrgType$3 = data.OrgType[0]) === null || _data$OrgType$3 === void 0 ? void 0 : _data$OrgType$3.code
22441
22513
  },
22442
22514
  ParentEntity_: (data === null || data === void 0 ? void 0 : (_data$ParentOrgID = data.ParentOrgID) === null || _data$ParentOrgID === void 0 ? void 0 : _data$ParentOrgID.length) > 0 ? Parentget === null || Parentget === void 0 ? void 0 : Parentget.filter(function (val) {
22443
22515
  return (val === null || val === void 0 ? void 0 : val.value) === (data === null || data === void 0 ? void 0 : data.ParentOrgID[0]);
@@ -22455,6 +22527,7 @@ var generateReadJson$2 = {
22455
22527
  Contact_: ContactArr,
22456
22528
  ContactPersonDetails_: ContactPersonDetailsArr,
22457
22529
  specialtyDetails: specialtyDetailsarr,
22530
+ external: (_data$isExternal = data === null || data === void 0 ? void 0 : data.isExternal) !== null && _data$isExternal !== void 0 ? _data$isExternal : false,
22458
22531
  imageDetails_: data !== null && data !== void 0 && (_data$logo$ = data.logo[0]) !== null && _data$logo$ !== void 0 && _data$logo$.fileid ? [{
22459
22532
  fileid: data === null || data === void 0 ? void 0 : (_data$logo$2 = data.logo[0]) === null || _data$logo$2 === void 0 ? void 0 : _data$logo$2.fileid,
22460
22533
  filetype: data === null || data === void 0 ? void 0 : (_data$logo$3 = data.logo[0]) === null || _data$logo$3 === void 0 ? void 0 : _data$logo$3.filetype,
@@ -22467,8 +22540,10 @@ var generateReadJson$2 = {
22467
22540
 
22468
22541
  var _extraReducers$k;
22469
22542
  var ORGANIZATION_TREE_READ = createAsyncThunk("organizationSlice/organizationTreeList", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
22470
- var _ref2,
22543
+ var payload,
22544
+ _ref2,
22471
22545
  rejectWithValue,
22546
+ type,
22472
22547
  data,
22473
22548
  getJson,
22474
22549
  _args = arguments;
@@ -22477,11 +22552,13 @@ var ORGANIZATION_TREE_READ = createAsyncThunk("organizationSlice/organizationTre
22477
22552
  while (1) {
22478
22553
  switch (_context.prev = _context.next) {
22479
22554
  case 0:
22555
+ payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
22480
22556
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
22481
22557
  _context.prev = 2;
22558
+ type = payload;
22482
22559
  _context.next = 6;
22483
22560
  return fetchData({
22484
- body: JSON.stringify(queries$c.getTreeStuct())
22561
+ body: JSON.stringify(queries$c.getTreeStuct(type))
22485
22562
  }, __readDocumentUrl__);
22486
22563
 
22487
22564
  case 6:
@@ -22530,12 +22607,13 @@ var ORGANIZATION_ENTITY_TYPE = createAsyncThunk("organizationSlice/organizationE
22530
22607
  var _val$coding$, _val$coding$2;
22531
22608
 
22532
22609
  if (val !== null && val !== void 0 && (_val$coding$ = val.coding[0]) !== null && _val$coding$ !== void 0 && _val$coding$.display && val !== null && val !== void 0 && (_val$coding$2 = val.coding[0]) !== null && _val$coding$2 !== void 0 && _val$coding$2._id) {
22533
- var _val$coding$3;
22610
+ var _val$coding$3, _val$coding, _val$coding$4;
22534
22611
 
22535
- result.push({
22612
+ result.push(_objectSpread2({
22536
22613
  title: val === null || val === void 0 ? void 0 : (_val$coding$3 = val.coding[0]) === null || _val$coding$3 === void 0 ? void 0 : _val$coding$3.display,
22537
- value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22538
- });
22614
+ value: val === null || val === void 0 ? void 0 : val.coding[0]._id,
22615
+ code: val === null || val === void 0 ? void 0 : (_val$coding = val.coding) === null || _val$coding === void 0 ? void 0 : (_val$coding$4 = _val$coding[0]) === null || _val$coding$4 === void 0 ? void 0 : _val$coding$4.code
22616
+ }, val));
22539
22617
  }
22540
22618
  });
22541
22619
  return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
@@ -22557,8 +22635,10 @@ var ORGANIZATION_ENTITY_TYPE = createAsyncThunk("organizationSlice/organizationE
22557
22635
  }, _callee2, null, [[2, 12]]);
22558
22636
  })));
22559
22637
  var ORGANIZATION_GET_PARENT_ENTITY = createAsyncThunk("organizationSlice/orgParEntity", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
22560
- var _ref6,
22638
+ var payload,
22639
+ _ref6,
22561
22640
  rejectWithValue,
22641
+ type,
22562
22642
  data,
22563
22643
  result,
22564
22644
  _args3 = arguments;
@@ -22567,11 +22647,13 @@ var ORGANIZATION_GET_PARENT_ENTITY = createAsyncThunk("organizationSlice/orgParE
22567
22647
  while (1) {
22568
22648
  switch (_context3.prev = _context3.next) {
22569
22649
  case 0:
22650
+ payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
22570
22651
  _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
22571
22652
  _context3.prev = 2;
22653
+ type = payload;
22572
22654
  _context3.next = 6;
22573
22655
  return fetchData({
22574
- body: JSON.stringify(queries$c.getParentEntity())
22656
+ body: JSON.stringify(queries$c.getParentEntity(type))
22575
22657
  }, __readDocumentUrl__);
22576
22658
 
22577
22659
  case 6:
@@ -22672,13 +22754,13 @@ var ORGANIZATION_GET_USE_IDENTIFICATION = createAsyncThunk("organizationSlice/or
22672
22754
  data = _context5.sent;
22673
22755
  result = [];
22674
22756
  data.result.map(function (val, i) {
22675
- var _val$coding$4, _val$coding$5;
22757
+ var _val$coding$5, _val$coding$6;
22676
22758
 
22677
- if (val !== null && val !== void 0 && (_val$coding$4 = val.coding[0]) !== null && _val$coding$4 !== void 0 && _val$coding$4.display && val !== null && val !== void 0 && (_val$coding$5 = val.coding[0]) !== null && _val$coding$5 !== void 0 && _val$coding$5._id) {
22678
- var _val$coding$6;
22759
+ if (val !== null && val !== void 0 && (_val$coding$5 = val.coding[0]) !== null && _val$coding$5 !== void 0 && _val$coding$5.display && val !== null && val !== void 0 && (_val$coding$6 = val.coding[0]) !== null && _val$coding$6 !== void 0 && _val$coding$6._id) {
22760
+ var _val$coding$7;
22679
22761
 
22680
22762
  result.push({
22681
- title: val === null || val === void 0 ? void 0 : (_val$coding$6 = val.coding[0]) === null || _val$coding$6 === void 0 ? void 0 : _val$coding$6.display,
22763
+ title: val === null || val === void 0 ? void 0 : (_val$coding$7 = val.coding[0]) === null || _val$coding$7 === void 0 ? void 0 : _val$coding$7.display,
22682
22764
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22683
22765
  });
22684
22766
  }
@@ -22723,13 +22805,13 @@ var ORGANIZATION_GET_IDTYPE_IDENTIF = createAsyncThunk("organizationSlice/orgIdT
22723
22805
  data = _context6.sent;
22724
22806
  result = [];
22725
22807
  data.result.map(function (val, i) {
22726
- var _val$coding$7, _val$coding$8;
22808
+ var _val$coding$8, _val$coding$9;
22727
22809
 
22728
- if (val !== null && val !== void 0 && (_val$coding$7 = val.coding[0]) !== null && _val$coding$7 !== void 0 && _val$coding$7.display && val !== null && val !== void 0 && (_val$coding$8 = val.coding[0]) !== null && _val$coding$8 !== void 0 && _val$coding$8._id) {
22729
- var _val$coding$9;
22810
+ if (val !== null && val !== void 0 && (_val$coding$8 = val.coding[0]) !== null && _val$coding$8 !== void 0 && _val$coding$8.display && val !== null && val !== void 0 && (_val$coding$9 = val.coding[0]) !== null && _val$coding$9 !== void 0 && _val$coding$9._id) {
22811
+ var _val$coding$10;
22730
22812
 
22731
22813
  result.push({
22732
- title: val === null || val === void 0 ? void 0 : (_val$coding$9 = val.coding[0]) === null || _val$coding$9 === void 0 ? void 0 : _val$coding$9.display,
22814
+ title: val === null || val === void 0 ? void 0 : (_val$coding$10 = val.coding[0]) === null || _val$coding$10 === void 0 ? void 0 : _val$coding$10.display,
22733
22815
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22734
22816
  });
22735
22817
  }
@@ -22774,13 +22856,13 @@ var ORGANIZATION_GET_ALIAS_TYPE = createAsyncThunk("organizationSlice/aliastype"
22774
22856
  data = _context7.sent;
22775
22857
  result = [];
22776
22858
  data.result.map(function (val, i) {
22777
- var _val$coding$10, _val$coding$11;
22859
+ var _val$coding$11, _val$coding$12;
22778
22860
 
22779
- if (val !== null && val !== void 0 && (_val$coding$10 = val.coding[0]) !== null && _val$coding$10 !== void 0 && _val$coding$10.display && val !== null && val !== void 0 && (_val$coding$11 = val.coding[0]) !== null && _val$coding$11 !== void 0 && _val$coding$11._id) {
22780
- var _val$coding$12;
22861
+ if (val !== null && val !== void 0 && (_val$coding$11 = val.coding[0]) !== null && _val$coding$11 !== void 0 && _val$coding$11.display && val !== null && val !== void 0 && (_val$coding$12 = val.coding[0]) !== null && _val$coding$12 !== void 0 && _val$coding$12._id) {
22862
+ var _val$coding$13;
22781
22863
 
22782
22864
  result.push({
22783
- title: val === null || val === void 0 ? void 0 : (_val$coding$12 = val.coding[0]) === null || _val$coding$12 === void 0 ? void 0 : _val$coding$12.display,
22865
+ title: val === null || val === void 0 ? void 0 : (_val$coding$13 = val.coding[0]) === null || _val$coding$13 === void 0 ? void 0 : _val$coding$13.display,
22784
22866
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22785
22867
  });
22786
22868
  }
@@ -22936,13 +23018,13 @@ var ORGANIZATION_GET_ADD_TYPE = createAsyncThunk("organizationSlice/orgAddType",
22936
23018
  data = _context10.sent;
22937
23019
  result = [];
22938
23020
  data.result.map(function (val, i) {
22939
- var _val$coding$13, _val$coding$14;
23021
+ var _val$coding$14, _val$coding$15;
22940
23022
 
22941
- if (val !== null && val !== void 0 && (_val$coding$13 = val.coding[0]) !== null && _val$coding$13 !== void 0 && _val$coding$13.display && val !== null && val !== void 0 && (_val$coding$14 = val.coding[0]) !== null && _val$coding$14 !== void 0 && _val$coding$14._id) {
22942
- var _val$coding$15;
23023
+ if (val !== null && val !== void 0 && (_val$coding$14 = val.coding[0]) !== null && _val$coding$14 !== void 0 && _val$coding$14.display && val !== null && val !== void 0 && (_val$coding$15 = val.coding[0]) !== null && _val$coding$15 !== void 0 && _val$coding$15._id) {
23024
+ var _val$coding$16;
22943
23025
 
22944
23026
  result.push({
22945
- title: val === null || val === void 0 ? void 0 : (_val$coding$15 = val.coding[0]) === null || _val$coding$15 === void 0 ? void 0 : _val$coding$15.display,
23027
+ title: val === null || val === void 0 ? void 0 : (_val$coding$16 = val.coding[0]) === null || _val$coding$16 === void 0 ? void 0 : _val$coding$16.display,
22946
23028
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22947
23029
  });
22948
23030
  }
@@ -22987,13 +23069,13 @@ var ORGANIZATION_GET_ADD_USE = createAsyncThunk("organizationSlice/orgAddUSE", /
22987
23069
  data = _context11.sent;
22988
23070
  result = [];
22989
23071
  data.result.map(function (val, i) {
22990
- var _val$coding$16, _val$coding$17;
23072
+ var _val$coding$17, _val$coding$18;
22991
23073
 
22992
- if (val !== null && val !== void 0 && (_val$coding$16 = val.coding[0]) !== null && _val$coding$16 !== void 0 && _val$coding$16.display && val !== null && val !== void 0 && (_val$coding$17 = val.coding[0]) !== null && _val$coding$17 !== void 0 && _val$coding$17._id) {
22993
- var _val$coding$18;
23074
+ if (val !== null && val !== void 0 && (_val$coding$17 = val.coding[0]) !== null && _val$coding$17 !== void 0 && _val$coding$17.display && val !== null && val !== void 0 && (_val$coding$18 = val.coding[0]) !== null && _val$coding$18 !== void 0 && _val$coding$18._id) {
23075
+ var _val$coding$19;
22994
23076
 
22995
23077
  result.push({
22996
- title: val === null || val === void 0 ? void 0 : (_val$coding$18 = val.coding[0]) === null || _val$coding$18 === void 0 ? void 0 : _val$coding$18.display,
23078
+ title: val === null || val === void 0 ? void 0 : (_val$coding$19 = val.coding[0]) === null || _val$coding$19 === void 0 ? void 0 : _val$coding$19.display,
22997
23079
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
22998
23080
  });
22999
23081
  }
@@ -23295,13 +23377,13 @@ var ORGANIZATION_GET_CONTACTDETAILMODE = createAsyncThunk("organizationSlice/org
23295
23377
  data = _context17.sent;
23296
23378
  result = [];
23297
23379
  data.result.map(function (val, i) {
23298
- var _val$coding$19, _val$coding$20;
23380
+ var _val$coding$20, _val$coding$21;
23299
23381
 
23300
- if (val !== null && val !== void 0 && (_val$coding$19 = val.coding[0]) !== null && _val$coding$19 !== void 0 && _val$coding$19.display && val !== null && val !== void 0 && (_val$coding$20 = val.coding[0]) !== null && _val$coding$20 !== void 0 && _val$coding$20._id) {
23301
- var _val$coding$21;
23382
+ if (val !== null && val !== void 0 && (_val$coding$20 = val.coding[0]) !== null && _val$coding$20 !== void 0 && _val$coding$20.display && val !== null && val !== void 0 && (_val$coding$21 = val.coding[0]) !== null && _val$coding$21 !== void 0 && _val$coding$21._id) {
23383
+ var _val$coding$22;
23302
23384
 
23303
23385
  result.push({
23304
- title: val === null || val === void 0 ? void 0 : (_val$coding$21 = val.coding[0]) === null || _val$coding$21 === void 0 ? void 0 : _val$coding$21.display,
23386
+ title: val === null || val === void 0 ? void 0 : (_val$coding$22 = val.coding[0]) === null || _val$coding$22 === void 0 ? void 0 : _val$coding$22.display,
23305
23387
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23306
23388
  });
23307
23389
  }
@@ -23397,13 +23479,13 @@ var ORGANIZATION_GET_CONTACTDETAILUSE = createAsyncThunk("organizationSlice/orgC
23397
23479
  data = _context19.sent;
23398
23480
  result = [];
23399
23481
  data.result.map(function (val, i) {
23400
- var _val$coding$22, _val$coding$23;
23482
+ var _val$coding$23, _val$coding$24;
23401
23483
 
23402
- if (val !== null && val !== void 0 && (_val$coding$22 = val.coding[0]) !== null && _val$coding$22 !== void 0 && _val$coding$22.display && val !== null && val !== void 0 && (_val$coding$23 = val.coding[0]) !== null && _val$coding$23 !== void 0 && _val$coding$23._id) {
23403
- var _val$coding$24;
23484
+ if (val !== null && val !== void 0 && (_val$coding$23 = val.coding[0]) !== null && _val$coding$23 !== void 0 && _val$coding$23.display && val !== null && val !== void 0 && (_val$coding$24 = val.coding[0]) !== null && _val$coding$24 !== void 0 && _val$coding$24._id) {
23485
+ var _val$coding$25;
23404
23486
 
23405
23487
  result.push({
23406
- title: val === null || val === void 0 ? void 0 : (_val$coding$24 = val.coding[0]) === null || _val$coding$24 === void 0 ? void 0 : _val$coding$24.display,
23488
+ title: val === null || val === void 0 ? void 0 : (_val$coding$25 = val.coding[0]) === null || _val$coding$25 === void 0 ? void 0 : _val$coding$25.display,
23407
23489
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23408
23490
  });
23409
23491
  }
@@ -23448,13 +23530,13 @@ var ORGANIZATION_GET_CONTACTDETAILPRIORITY = createAsyncThunk("organizationSlice
23448
23530
  data = _context20.sent;
23449
23531
  result = [];
23450
23532
  data.result.map(function (val, i) {
23451
- var _val$coding$25, _val$coding$26;
23533
+ var _val$coding$26, _val$coding$27;
23452
23534
 
23453
- if (val !== null && val !== void 0 && (_val$coding$25 = val.coding[0]) !== null && _val$coding$25 !== void 0 && _val$coding$25.display && val !== null && val !== void 0 && (_val$coding$26 = val.coding[0]) !== null && _val$coding$26 !== void 0 && _val$coding$26._id) {
23454
- var _val$coding$27;
23535
+ if (val !== null && val !== void 0 && (_val$coding$26 = val.coding[0]) !== null && _val$coding$26 !== void 0 && _val$coding$26.display && val !== null && val !== void 0 && (_val$coding$27 = val.coding[0]) !== null && _val$coding$27 !== void 0 && _val$coding$27._id) {
23536
+ var _val$coding$28;
23455
23537
 
23456
23538
  result.push({
23457
- title: val === null || val === void 0 ? void 0 : (_val$coding$27 = val.coding[0]) === null || _val$coding$27 === void 0 ? void 0 : _val$coding$27.display,
23539
+ title: val === null || val === void 0 ? void 0 : (_val$coding$28 = val.coding[0]) === null || _val$coding$28 === void 0 ? void 0 : _val$coding$28.display,
23458
23540
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23459
23541
  });
23460
23542
  }
@@ -23499,13 +23581,13 @@ var ORGANIZATION_GET_CONTACT_PREFIX = createAsyncThunk("organizationSlice/orgNam
23499
23581
  data = _context21.sent;
23500
23582
  result = [];
23501
23583
  data.result.map(function (val, i) {
23502
- var _val$coding$28, _val$coding$29;
23584
+ var _val$coding$29, _val$coding$30;
23503
23585
 
23504
- if (val !== null && val !== void 0 && (_val$coding$28 = val.coding[0]) !== null && _val$coding$28 !== void 0 && _val$coding$28.display && val !== null && val !== void 0 && (_val$coding$29 = val.coding[0]) !== null && _val$coding$29 !== void 0 && _val$coding$29._id) {
23505
- var _val$coding$30;
23586
+ if (val !== null && val !== void 0 && (_val$coding$29 = val.coding[0]) !== null && _val$coding$29 !== void 0 && _val$coding$29.display && val !== null && val !== void 0 && (_val$coding$30 = val.coding[0]) !== null && _val$coding$30 !== void 0 && _val$coding$30._id) {
23587
+ var _val$coding$31;
23506
23588
 
23507
23589
  result.push({
23508
- title: val === null || val === void 0 ? void 0 : (_val$coding$30 = val.coding[0]) === null || _val$coding$30 === void 0 ? void 0 : _val$coding$30.display,
23590
+ title: val === null || val === void 0 ? void 0 : (_val$coding$31 = val.coding[0]) === null || _val$coding$31 === void 0 ? void 0 : _val$coding$31.display,
23509
23591
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23510
23592
  });
23511
23593
  }
@@ -23550,13 +23632,13 @@ var ORGANIZATION_GET_CONTACT_SUFFIX = createAsyncThunk("organizationSlice/orgNam
23550
23632
  data = _context22.sent;
23551
23633
  result = [];
23552
23634
  data.result.map(function (val, i) {
23553
- var _val$coding$31, _val$coding$32;
23635
+ var _val$coding$32, _val$coding$33;
23554
23636
 
23555
- if (val !== null && val !== void 0 && (_val$coding$31 = val.coding[0]) !== null && _val$coding$31 !== void 0 && _val$coding$31.display && val !== null && val !== void 0 && (_val$coding$32 = val.coding[0]) !== null && _val$coding$32 !== void 0 && _val$coding$32._id) {
23556
- var _val$coding$33;
23637
+ if (val !== null && val !== void 0 && (_val$coding$32 = val.coding[0]) !== null && _val$coding$32 !== void 0 && _val$coding$32.display && val !== null && val !== void 0 && (_val$coding$33 = val.coding[0]) !== null && _val$coding$33 !== void 0 && _val$coding$33._id) {
23638
+ var _val$coding$34;
23557
23639
 
23558
23640
  result.push({
23559
- title: val === null || val === void 0 ? void 0 : (_val$coding$33 = val.coding[0]) === null || _val$coding$33 === void 0 ? void 0 : _val$coding$33.display,
23641
+ title: val === null || val === void 0 ? void 0 : (_val$coding$34 = val.coding[0]) === null || _val$coding$34 === void 0 ? void 0 : _val$coding$34.display,
23560
23642
  value: val === null || val === void 0 ? void 0 : val.coding[0]._id
23561
23643
  });
23562
23644
  }
@@ -23601,14 +23683,14 @@ var ORGANIZATION_GET_CONTACT_DESI = createAsyncThunk("organizationSlice/position
23601
23683
  data = _context23.sent;
23602
23684
  result = [];
23603
23685
  data.result.map(function (val, i) {
23604
- var _val$coding, _val$coding$34;
23686
+ var _val$coding2, _val$coding2$;
23605
23687
 
23606
- if (val !== null && val !== void 0 && (_val$coding = val.coding) !== null && _val$coding !== void 0 && (_val$coding$34 = _val$coding[0]) !== null && _val$coding$34 !== void 0 && _val$coding$34.display) {
23607
- var _val$coding2, _val$coding2$, _val$coding3, _val$coding3$;
23688
+ if (val !== null && val !== void 0 && (_val$coding2 = val.coding) !== null && _val$coding2 !== void 0 && (_val$coding2$ = _val$coding2[0]) !== null && _val$coding2$ !== void 0 && _val$coding2$.display) {
23689
+ var _val$coding3, _val$coding3$, _val$coding4, _val$coding4$;
23608
23690
 
23609
23691
  result.push({
23610
- title: val === null || val === void 0 ? void 0 : (_val$coding2 = val.coding) === null || _val$coding2 === void 0 ? void 0 : (_val$coding2$ = _val$coding2[0]) === null || _val$coding2$ === void 0 ? void 0 : _val$coding2$.display,
23611
- value: val === null || val === void 0 ? void 0 : (_val$coding3 = val.coding) === null || _val$coding3 === void 0 ? void 0 : (_val$coding3$ = _val$coding3[0]) === null || _val$coding3$ === void 0 ? void 0 : _val$coding3$._id
23692
+ title: val === null || val === void 0 ? void 0 : (_val$coding3 = val.coding) === null || _val$coding3 === void 0 ? void 0 : (_val$coding3$ = _val$coding3[0]) === null || _val$coding3$ === void 0 ? void 0 : _val$coding3$.display,
23693
+ value: val === null || val === void 0 ? void 0 : (_val$coding4 = val.coding) === null || _val$coding4 === void 0 ? void 0 : (_val$coding4$ = _val$coding4[0]) === null || _val$coding4$ === void 0 ? void 0 : _val$coding4$._id
23612
23694
  });
23613
23695
  }
23614
23696
  });
@@ -23695,7 +23777,7 @@ var ORG_FROM_GET = createAsyncThunk("organizationSlice/getOrganization", /*#__PU
23695
23777
  key = payload.key;
23696
23778
  _context25.next = 6;
23697
23779
  return fetchData({
23698
- body: JSON.stringify(queries$c.getParentEntity())
23780
+ body: JSON.stringify(queries$c.getParentEntityFull())
23699
23781
  }, __readDocumentUrl__);
23700
23782
 
23701
23783
  case 6:
@@ -23757,16 +23839,16 @@ var ORGANIZATION_GET_SPECIALTY_DROP = createAsyncThunk("organizationSlice/specia
23757
23839
  data = _context26.sent;
23758
23840
  result = [];
23759
23841
  data.result.map(function (val, i) {
23760
- var _val$coding4, _val$coding5, _val$coding5$;
23842
+ var _val$coding5, _val$coding6, _val$coding6$;
23761
23843
 
23762
- if (val !== null && val !== void 0 && (_val$coding4 = val.coding) !== null && _val$coding4 !== void 0 && _val$coding4[0] && val !== null && val !== void 0 && (_val$coding5 = val.coding) !== null && _val$coding5 !== void 0 && (_val$coding5$ = _val$coding5[0]) !== null && _val$coding5$ !== void 0 && _val$coding5$._id) {
23763
- var _val$coding6, _val$coding6$, _val$coding7, _val$coding7$, _val$coding8, _val$coding8$, _val$coding9, _val$coding9$, _val$coding10, _val$coding10$;
23844
+ if (val !== null && val !== void 0 && (_val$coding5 = val.coding) !== null && _val$coding5 !== void 0 && _val$coding5[0] && val !== null && val !== void 0 && (_val$coding6 = val.coding) !== null && _val$coding6 !== void 0 && (_val$coding6$ = _val$coding6[0]) !== null && _val$coding6$ !== void 0 && _val$coding6$._id) {
23845
+ var _val$coding7, _val$coding7$, _val$coding8, _val$coding8$, _val$coding9, _val$coding9$, _val$coding10, _val$coding10$, _val$coding11, _val$coding11$;
23764
23846
 
23765
23847
  result.push({
23766
- label: (val === null || val === void 0 ? void 0 : (_val$coding6 = val.coding) === null || _val$coding6 === void 0 ? void 0 : (_val$coding6$ = _val$coding6[0]) === null || _val$coding6$ === void 0 ? void 0 : _val$coding6$.display) + " (" + (val === null || val === void 0 ? void 0 : (_val$coding7 = val.coding) === null || _val$coding7 === void 0 ? void 0 : (_val$coding7$ = _val$coding7[0]) === null || _val$coding7$ === void 0 ? void 0 : _val$coding7$.code) + ")",
23767
- value: val === null || val === void 0 ? void 0 : (_val$coding8 = val.coding) === null || _val$coding8 === void 0 ? void 0 : (_val$coding8$ = _val$coding8[0]) === null || _val$coding8$ === void 0 ? void 0 : _val$coding8$.code,
23768
- name: val === null || val === void 0 ? void 0 : (_val$coding9 = val.coding) === null || _val$coding9 === void 0 ? void 0 : (_val$coding9$ = _val$coding9[0]) === null || _val$coding9$ === void 0 ? void 0 : _val$coding9$.display,
23769
- id: val === null || val === void 0 ? void 0 : (_val$coding10 = val.coding) === null || _val$coding10 === void 0 ? void 0 : (_val$coding10$ = _val$coding10[0]) === null || _val$coding10$ === void 0 ? void 0 : _val$coding10$._id
23848
+ label: (val === null || val === void 0 ? void 0 : (_val$coding7 = val.coding) === null || _val$coding7 === void 0 ? void 0 : (_val$coding7$ = _val$coding7[0]) === null || _val$coding7$ === void 0 ? void 0 : _val$coding7$.display) + " (" + (val === null || val === void 0 ? void 0 : (_val$coding8 = val.coding) === null || _val$coding8 === void 0 ? void 0 : (_val$coding8$ = _val$coding8[0]) === null || _val$coding8$ === void 0 ? void 0 : _val$coding8$.code) + ")",
23849
+ value: val === null || val === void 0 ? void 0 : (_val$coding9 = val.coding) === null || _val$coding9 === void 0 ? void 0 : (_val$coding9$ = _val$coding9[0]) === null || _val$coding9$ === void 0 ? void 0 : _val$coding9$.code,
23850
+ name: val === null || val === void 0 ? void 0 : (_val$coding10 = val.coding) === null || _val$coding10 === void 0 ? void 0 : (_val$coding10$ = _val$coding10[0]) === null || _val$coding10$ === void 0 ? void 0 : _val$coding10$.display,
23851
+ id: val === null || val === void 0 ? void 0 : (_val$coding11 = val.coding) === null || _val$coding11 === void 0 ? void 0 : (_val$coding11$ = _val$coding11[0]) === null || _val$coding11$ === void 0 ? void 0 : _val$coding11$._id
23770
23852
  });
23771
23853
  }
23772
23854
  });
@@ -29478,7 +29560,7 @@ var query$3 = {
29478
29560
  db_name: "".concat(dbName),
29479
29561
  entity: "CA_OrderSet",
29480
29562
  filter: "CA_OrderSet._key == '".concat(_key, "' && CA_OrderSet.activestatus == true"),
29481
- return_fields: "merge(CA_OrderSet,{components:(for comp in CA_OrderSet_Components filter comp._id in CA_OrderSet.components return merge(comp,{orderCatalog:merge(document(comp.orderCatalog),{ordertype:document(document(comp.orderCatalog).ordertype)},{ordercategory:document(document(comp.orderCatalog).ordercategory)}),IVDosDurUOM:document(comp.IVDosDurUOM),IVInfusRateUOM:document(comp.IVInfusRateUOM),IVInfusRateVolUOM:document(comp.IVInfusRateVolUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltFreqRateUnit:document(comp.dfltFreqRateUnit),dfltFreqValUnit:document(comp.dfltFreqValUnit),dfltOrderUOM:document(comp.dfltOrderUOM),route:document(comp.route),dosageFreqCode:document(comp.dosageFreqCode)}))})"
29563
+ return_fields: "merge(CA_OrderSet,{components:(for comp in CA_OrderSet_Components filter comp._id in CA_OrderSet.components return merge(comp,{orderCatalog:document(comp.orderCatalog),ordercategory:document(comp.ordercategory),ordertype:document(comp.ordertype),IVDosDurUOM:document(comp.IVDosDurUOM),IVInfusRateUOM:document(comp.IVInfusRateUOM),IVInfusRateVolUOM:document(comp.IVInfusRateVolUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltDurUOM:document(comp.dfltDurUOM),dfltFreqRateUnit:document(comp.dfltFreqRateUnit),dfltFreqValUnit:document(comp.dfltFreqValUnit),dfltOrderUOM:document(comp.dfltOrderUOM),route:document(comp.route),dosageFreqCode:document(comp.dosageFreqCode)}))})"
29482
29564
  };
29483
29565
  },
29484
29566
  status_update_order_set_master: function status_update_order_set_master(data) {
@@ -29531,7 +29613,16 @@ var dynamicMaster$1 = {
29531
29613
  sort: "OrderType.shortdesc"
29532
29614
  };
29533
29615
  },
29534
- orderDrugCatalog: function orderDrugCatalog(order_category, order_drug_type) {
29616
+ drugType: function drugType() {
29617
+ return {
29618
+ db_name: "".concat(dbName),
29619
+ entity: "DrugType",
29620
+ filter: "DrugType.activestatus == true && DrugType.status == true",
29621
+ return_fields: "KEEP(DrugType,'_id','_key','drugtype','longdesc','shortdesc')",
29622
+ sort: "DrugType.shortdesc"
29623
+ };
29624
+ },
29625
+ orderCatalog: function orderCatalog(order_category, order_drug_type) {
29535
29626
  return {
29536
29627
  db_name: "".concat(dbName),
29537
29628
  entity: "OrderCatalog",
@@ -29539,6 +29630,15 @@ var dynamicMaster$1 = {
29539
29630
  return_fields: "merge(keep(OrderCatalog,'id','_key','_id','shortdesc','ordertype','ordercategory','ordercatalog','longdesc'),{ordertype:document(OrderCatalog.ordertype)},{ordercategory:document(OrderCatalog.ordercategory)},{OrderCatalogByEncounterTypeAge:document(OrderCatalog.OrderCatalogByEncounterTypeAge)[*].freqappl})",
29540
29631
  sort: "OrderCatalog.shortdesc"
29541
29632
  };
29633
+ },
29634
+ drugCatalog: function drugCatalog(drug_type) {
29635
+ return {
29636
+ db_name: "".concat(dbName),
29637
+ entity: "DrugMaster",
29638
+ filter: "DrugMaster.DrugType=='".concat(drug_type, "' && DrugMaster.activestatus == true && DrugMaster.statusactive==true"),
29639
+ return_fields: "merge(keep(DrugMaster,'id','_id','_key','ShortDesc','LongDesc','DrugType'),{DrugType:document(DrugMaster.DrugType)})",
29640
+ sort: "DrugMaster.ShortDesc"
29641
+ };
29542
29642
  }
29543
29643
  };
29544
29644
 
@@ -29575,7 +29675,7 @@ var generateJson$2 = function generateJson(data) {
29575
29675
  var constructComponents = function constructComponents(data) {
29576
29676
  var arr = [];
29577
29677
  data.map(function (val) {
29578
- var _val$id, _val$seqNo, _val$orderCatalog$val, _val$orderCatalog, _val$explanatoryNote, _val$practitionerInst, _parseInt, _val$quantity_type$va, _val$quantity_type, _parseInt2, _val$route$value, _val$route, _parseInt3, _val$frequency_type$v, _val$frequency_type, _parseInt4, _val$rate_type$value, _val$rate_type, _parseInt5, _val$duration_type$va, _val$duration_type, _parseInt6, _val$dosage_freq_code, _val$dosage_freq_code2, _parseInt7, _val$in_infusion_rate, _val$in_infusion_rate2, _parseInt8, _val$in_infusion_rate3, _val$in_infusion_rate4, _parseInt9, _val$iv_dosage_durati, _val$iv_dosage_durati2, _val$parentordercatal, _val$parentordercatal2;
29678
+ var _val$id, _val$seqNo, _val$orderCatalog$val, _val$orderCatalog, _val$orderCategory$va, _val$orderCategory, _val$orderTypeDrugTyp, _val$orderTypeDrugTyp2, _val$explanatoryNote, _val$practitionerInst, _parseInt, _val$quantity_type$va, _val$quantity_type, _parseInt2, _val$route$value, _val$route, _parseInt3, _val$frequency_type$v, _val$frequency_type, _parseInt4, _val$rate_type$value, _val$rate_type, _parseInt5, _val$duration_type$va, _val$duration_type, _parseInt6, _val$dosage_freq_code, _val$dosage_freq_code2, _parseInt7, _val$in_infusion_rate, _val$in_infusion_rate2, _parseInt8, _val$in_infusion_rate3, _val$in_infusion_rate4, _parseInt9, _val$iv_dosage_durati, _val$iv_dosage_durati2, _val$parentordercatal, _val$parentordercatal2;
29579
29679
 
29580
29680
  var _key = {};
29581
29681
 
@@ -29590,6 +29690,8 @@ var constructComponents = function constructComponents(data) {
29590
29690
  }, _key), {}, {
29591
29691
  seqNo: (_val$seqNo = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo !== void 0 ? _val$seqNo : 0,
29592
29692
  orderCatalog: (_val$orderCatalog$val = val === null || val === void 0 ? void 0 : (_val$orderCatalog = val.orderCatalog) === null || _val$orderCatalog === void 0 ? void 0 : _val$orderCatalog.value) !== null && _val$orderCatalog$val !== void 0 ? _val$orderCatalog$val : "",
29693
+ ordercategory: (_val$orderCategory$va = val === null || val === void 0 ? void 0 : (_val$orderCategory = val.orderCategory) === null || _val$orderCategory === void 0 ? void 0 : _val$orderCategory.value) !== null && _val$orderCategory$va !== void 0 ? _val$orderCategory$va : "",
29694
+ ordertype: (_val$orderTypeDrugTyp = val === null || val === void 0 ? void 0 : (_val$orderTypeDrugTyp2 = val.orderTypeDrugType) === null || _val$orderTypeDrugTyp2 === void 0 ? void 0 : _val$orderTypeDrugTyp2.value) !== null && _val$orderTypeDrugTyp !== void 0 ? _val$orderTypeDrugTyp : "",
29593
29695
  explNote: (_val$explanatoryNote = val === null || val === void 0 ? void 0 : val.explanatoryNote) !== null && _val$explanatoryNote !== void 0 ? _val$explanatoryNote : "",
29594
29696
  practInstr: (_val$practitionerInst = val === null || val === void 0 ? void 0 : val.practitionerInstructions) !== null && _val$practitionerInst !== void 0 ? _val$practitionerInst : "",
29595
29697
  required: val === null || val === void 0 ? void 0 : val.required,
@@ -29621,7 +29723,7 @@ var constructComponents = function constructComponents(data) {
29621
29723
  var _val$children;
29622
29724
 
29623
29725
  val === null || val === void 0 ? void 0 : (_val$children = val.children) === null || _val$children === void 0 ? void 0 : _val$children.map(function (val_) {
29624
- var _val_$id, _val_$seqNo, _val_$orderCatalog$va, _val_$orderCatalog, _val_$explanatoryNote, _val_$practitionerIns, _parseInt10, _val_$quantity_type$v, _val_$quantity_type, _parseInt11, _val_$route$value, _val_$route, _parseInt12, _val_$frequency_type$, _val_$frequency_type, _parseInt13, _val_$rate_type$value, _val_$rate_type, _parseInt14, _val_$duration_type$v, _val_$duration_type, _parseInt15, _val_$dosage_freq_cod, _val_$dosage_freq_cod2, _parseInt16, _val_$in_infusion_rat, _val_$in_infusion_rat2, _parseInt17, _val_$in_infusion_rat3, _val_$in_infusion_rat4, _parseInt18, _val_$iv_dosage_durat, _val_$iv_dosage_durat2, _val_$parentordercata, _val_$parentordercata2;
29726
+ var _val_$id, _val_$seqNo, _val_$orderCatalog$va, _val_$orderCatalog, _val$orderCategory$va2, _val$orderCategory2, _val$orderTypeDrugTyp3, _val$orderTypeDrugTyp4, _val_$explanatoryNote, _val_$practitionerIns, _parseInt10, _val_$quantity_type$v, _val_$quantity_type, _parseInt11, _val_$route$value, _val_$route, _parseInt12, _val_$frequency_type$, _val_$frequency_type, _parseInt13, _val_$rate_type$value, _val_$rate_type, _parseInt14, _val_$duration_type$v, _val_$duration_type, _parseInt15, _val_$dosage_freq_cod, _val_$dosage_freq_cod2, _parseInt16, _val_$in_infusion_rat, _val_$in_infusion_rat2, _parseInt17, _val_$in_infusion_rat3, _val_$in_infusion_rat4, _parseInt18, _val_$iv_dosage_durat, _val_$iv_dosage_durat2, _val_$parentordercata, _val_$parentordercata2;
29625
29727
 
29626
29728
  if (val_ !== null && val_ !== void 0 && val_._key) {
29627
29729
  ({
@@ -29633,6 +29735,8 @@ var constructComponents = function constructComponents(data) {
29633
29735
  id: (_val_$id = val_ === null || val_ === void 0 ? void 0 : val_.id) !== null && _val_$id !== void 0 ? _val_$id : 0,
29634
29736
  seqNo: (_val_$seqNo = val_ === null || val_ === void 0 ? void 0 : val_.seqNo) !== null && _val_$seqNo !== void 0 ? _val_$seqNo : 0,
29635
29737
  orderCatalog: (_val_$orderCatalog$va = val_ === null || val_ === void 0 ? void 0 : (_val_$orderCatalog = val_.orderCatalog) === null || _val_$orderCatalog === void 0 ? void 0 : _val_$orderCatalog.value) !== null && _val_$orderCatalog$va !== void 0 ? _val_$orderCatalog$va : "",
29738
+ ordercategory: (_val$orderCategory$va2 = val === null || val === void 0 ? void 0 : (_val$orderCategory2 = val.orderCategory) === null || _val$orderCategory2 === void 0 ? void 0 : _val$orderCategory2.value) !== null && _val$orderCategory$va2 !== void 0 ? _val$orderCategory$va2 : "",
29739
+ ordertype: (_val$orderTypeDrugTyp3 = val === null || val === void 0 ? void 0 : (_val$orderTypeDrugTyp4 = val.orderTypeDrugType) === null || _val$orderTypeDrugTyp4 === void 0 ? void 0 : _val$orderTypeDrugTyp4.value) !== null && _val$orderTypeDrugTyp3 !== void 0 ? _val$orderTypeDrugTyp3 : "",
29636
29740
  explNote: (_val_$explanatoryNote = val_ === null || val_ === void 0 ? void 0 : val_.explanatoryNote) !== null && _val_$explanatoryNote !== void 0 ? _val_$explanatoryNote : "",
29637
29741
  practInstr: (_val_$practitionerIns = val_ === null || val_ === void 0 ? void 0 : val_.practitionerInstructions) !== null && _val_$practitionerIns !== void 0 ? _val_$practitionerIns : "",
29638
29742
  required: val_ === null || val_ === void 0 ? void 0 : val_.required,
@@ -29664,7 +29768,7 @@ var constructComponents = function constructComponents(data) {
29664
29768
  return arr;
29665
29769
  };
29666
29770
 
29667
- var generateReadJSON$2 = function generateReadJSON(data, state) {
29771
+ var generateReadJSON$2 = function generateReadJSON(data) {
29668
29772
  var json = {
29669
29773
  //INITAIL STATE
29670
29774
  parentSeqNumber: null,
@@ -29752,121 +29856,130 @@ var getSeqNumber = function getSeqNumber(components) {
29752
29856
  maxNum = c.seqNo;
29753
29857
  }
29754
29858
  });
29755
- debugger;
29756
29859
  return maxNum + 1;
29757
29860
  };
29758
29861
 
29759
- var constructTabelData = function constructTabelData(data, state) {
29862
+ var constructTabelData = function constructTabelData(data) {
29760
29863
  var arr = [];
29761
- data === null || data === void 0 ? void 0 : data.map(function (val) {
29762
- if (!(val !== null && val !== void 0 && val.parentCatSeqNo)) {
29763
- var _val$id, _val$_key, _val$orderCatalog$ord, _val$orderCatalog, _val$seqNo, _val$orderCatalog$ord2, _val$orderCatalog2, _val$orderCatalog3, _val$orderCatalog4, _val$orderCatalog5, _val$orderCatalog6, _val$orderCatalog7, _val$orderCatalog7$or, _val$orderCatalog8, _val$orderCatalog8$or, _val$orderCatalog9, _val$orderCatalog9$or, _val$orderCatalog10, _val$orderCatalog10$o, _val$orderCatalog11, _val$orderCatalog11$o, _val$orderCatalog12, _val$orderCatalog12$o, _val$orderCatalog13, _val$orderCatalog13$o, _val$orderCatalog14, _val$orderCatalog14$o, _val$dfltOrderUOM, _val$dfltOrderUOM2, _val$dfltOrderUOM3, _val$dfltOrderUOM4, _val$dfltOrderUOM5, _val$dfltOrderUOM6, _val$IVInfusRateVol, _val$IVInfusRateVolUO, _val$IVInfusRateVolUO2, _val$IVInfusRateVolUO3, _val$IVInfusRateVolUO4, _val$IVDosDurValue, _val$IVDosDurUOM, _val$IVDosDurUOM2, _val$IVDosDurUOM3, _val$IVDosDurUOM4, _val$IVDosDurValue2, _val$IVDosDurUOM5, _val$IVDosDurUOM6, _val$IVDosDurUOM7, _val$IVDosDurUOM8, _val$dosageFreqCode, _val$dosageFreqCode2, _val$dosageFreqCode3, _val$dosageFreqCode4, _val$startDay, _val$dfltDuration, _val$dfltDurUOM, _val$dfltDurUOM2, _val$dfltDurUOM3, _val$dfltDurUOM4, _val$dfltDurUOM5, _val$dfltDurUOM6, _val$route, _val$route2, _val$route3, _val$route4, _val$route$shortdesc, _val$route5, _val$dfltFreqVal, _val$dfltFreqValUnit, _val$dfltFreqValUnit2, _val$dfltFreqValUnit3, _val$dfltFreqValUnit4, _val$dfltFreqValUnit5, _val$dfltFreqValUnit6, _val$dfltFreqRate, _val$dfltFreqRateUnit, _val$dfltFreqRateUnit2, _val$dfltFreqRateUnit3, _val$dfltFreqRateUnit4, _val$dfltFreqRateUnit5, _val$dfltFreqRateUnit6, _val$additive, _val$parentSequence, _val$parentSequence2, _val$explNote, _val$practInstr, _constructChildrenTab, _obj;
29764
-
29765
- var obj = (_obj = {
29766
- id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : 0,
29767
- _key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : 0,
29768
- typeId: (_val$orderCatalog$ord = val === null || val === void 0 ? void 0 : (_val$orderCatalog = val.orderCatalog) === null || _val$orderCatalog === void 0 ? void 0 : _val$orderCatalog.ordercategory._id) !== null && _val$orderCatalog$ord !== void 0 ? _val$orderCatalog$ord : "",
29769
- seqNo: (_val$seqNo = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo !== void 0 ? _val$seqNo : "",
29770
- orderCategory: (_val$orderCatalog$ord2 = val === null || val === void 0 ? void 0 : (_val$orderCatalog2 = val.orderCatalog) === null || _val$orderCatalog2 === void 0 ? void 0 : _val$orderCatalog2.ordercategory) !== null && _val$orderCatalog$ord2 !== void 0 ? _val$orderCatalog$ord2 : {},
29771
- orderCatalog: val !== null && val !== void 0 && (_val$orderCatalog3 = val.orderCatalog) !== null && _val$orderCatalog3 !== void 0 && _val$orderCatalog3._id && val !== null && val !== void 0 && (_val$orderCatalog4 = val.orderCatalog) !== null && _val$orderCatalog4 !== void 0 && _val$orderCatalog4.shortdesc ? {
29772
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog5 = val.orderCatalog) === null || _val$orderCatalog5 === void 0 ? void 0 : _val$orderCatalog5._id,
29773
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog6 = val.orderCatalog) === null || _val$orderCatalog6 === void 0 ? void 0 : _val$orderCatalog6.shortdesc
29774
- } : {},
29775
- orderTypeDrugType: val !== null && val !== void 0 && (_val$orderCatalog7 = val.orderCatalog) !== null && _val$orderCatalog7 !== void 0 && (_val$orderCatalog7$or = _val$orderCatalog7.ordertype) !== null && _val$orderCatalog7$or !== void 0 && _val$orderCatalog7$or._id && val !== null && val !== void 0 && (_val$orderCatalog8 = val.orderCatalog) !== null && _val$orderCatalog8 !== void 0 && (_val$orderCatalog8$or = _val$orderCatalog8.ordertype) !== null && _val$orderCatalog8$or !== void 0 && _val$orderCatalog8$or.shortdesc ? {
29776
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog9 = val.orderCatalog) === null || _val$orderCatalog9 === void 0 ? void 0 : (_val$orderCatalog9$or = _val$orderCatalog9.ordertype) === null || _val$orderCatalog9$or === void 0 ? void 0 : _val$orderCatalog9$or._id,
29777
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog10 = val.orderCatalog) === null || _val$orderCatalog10 === void 0 ? void 0 : (_val$orderCatalog10$o = _val$orderCatalog10.ordertype) === null || _val$orderCatalog10$o === void 0 ? void 0 : _val$orderCatalog10$o.shortdesc
29778
- } : {}
29779
- }, _defineProperty(_obj, "orderCategory", val !== null && val !== void 0 && (_val$orderCatalog11 = val.orderCatalog) !== null && _val$orderCatalog11 !== void 0 && (_val$orderCatalog11$o = _val$orderCatalog11.ordercategory) !== null && _val$orderCatalog11$o !== void 0 && _val$orderCatalog11$o._id && val !== null && val !== void 0 && (_val$orderCatalog12 = val.orderCatalog) !== null && _val$orderCatalog12 !== void 0 && (_val$orderCatalog12$o = _val$orderCatalog12.ordercategory) !== null && _val$orderCatalog12$o !== void 0 && _val$orderCatalog12$o.shortdesc ? {
29780
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog13 = val.orderCatalog) === null || _val$orderCatalog13 === void 0 ? void 0 : (_val$orderCatalog13$o = _val$orderCatalog13.ordercategory) === null || _val$orderCatalog13$o === void 0 ? void 0 : _val$orderCatalog13$o._id,
29781
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog14 = val.orderCatalog) === null || _val$orderCatalog14 === void 0 ? void 0 : (_val$orderCatalog14$o = _val$orderCatalog14.ordercategory) === null || _val$orderCatalog14$o === void 0 ? void 0 : _val$orderCatalog14$o.shortdesc
29782
- } : {}), _defineProperty(_obj, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM = val.dfltOrderUOM) !== null && _val$dfltOrderUOM !== void 0 && _val$dfltOrderUOM._id && val !== null && val !== void 0 && (_val$dfltOrderUOM2 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM2 !== void 0 && _val$dfltOrderUOM2.display ? {
29783
- value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM3 = val.dfltOrderUOM) === null || _val$dfltOrderUOM3 === void 0 ? void 0 : _val$dfltOrderUOM3._id,
29784
- label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM4 = val.dfltOrderUOM) === null || _val$dfltOrderUOM4 === void 0 ? void 0 : _val$dfltOrderUOM4.display
29785
- } : {}), _defineProperty(_obj, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM5 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM5 !== void 0 && _val$dfltOrderUOM5.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM6 = val.dfltOrderUOM) === null || _val$dfltOrderUOM6 === void 0 ? void 0 : _val$dfltOrderUOM6.display) : "-"), _defineProperty(_obj, "in_infusion_rate_volume_number", (_val$IVInfusRateVol = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol !== void 0 ? _val$IVInfusRateVol : ""), _defineProperty(_obj, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO !== void 0 && _val$IVInfusRateVolUO._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO2 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO2 !== void 0 && _val$IVInfusRateVolUO2.display ? {
29786
- value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO3 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO3 === void 0 ? void 0 : _val$IVInfusRateVolUO3._id,
29787
- label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO4 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO4 === void 0 ? void 0 : _val$IVInfusRateVolUO4.display
29788
- } : {}), _defineProperty(_obj, "in_infusion_rate_duration_number", (_val$IVDosDurValue = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue !== void 0 ? _val$IVDosDurValue : ""), _defineProperty(_obj, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM = val.IVDosDurUOM) !== null && _val$IVDosDurUOM !== void 0 && _val$IVDosDurUOM._id && val !== null && val !== void 0 && (_val$IVDosDurUOM2 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM2 !== void 0 && _val$IVDosDurUOM2.display ? {
29789
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM3 = val.IVDosDurUOM) === null || _val$IVDosDurUOM3 === void 0 ? void 0 : _val$IVDosDurUOM3._id,
29790
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM4 = val.IVDosDurUOM) === null || _val$IVDosDurUOM4 === void 0 ? void 0 : _val$IVDosDurUOM4.display
29791
- } : {}), _defineProperty(_obj, "iv_dosage_duration_number", (_val$IVDosDurValue2 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue2 !== void 0 ? _val$IVDosDurValue2 : ""), _defineProperty(_obj, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM5 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM5 !== void 0 && _val$IVDosDurUOM5._id && val !== null && val !== void 0 && (_val$IVDosDurUOM6 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM6 !== void 0 && _val$IVDosDurUOM6.display ? {
29792
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM7 = val.IVDosDurUOM) === null || _val$IVDosDurUOM7 === void 0 ? void 0 : _val$IVDosDurUOM7._id,
29793
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM8 = val.IVDosDurUOM) === null || _val$IVDosDurUOM8 === void 0 ? void 0 : _val$IVDosDurUOM8.display
29794
- } : {}), _defineProperty(_obj, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode = val.dosageFreqCode) !== null && _val$dosageFreqCode !== void 0 && _val$dosageFreqCode._id && val !== null && val !== void 0 && (_val$dosageFreqCode2 = val.dosageFreqCode) !== null && _val$dosageFreqCode2 !== void 0 && _val$dosageFreqCode2.shortdesc ? {
29795
- value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode3 = val.dosageFreqCode) === null || _val$dosageFreqCode3 === void 0 ? void 0 : _val$dosageFreqCode3._id,
29796
- label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode4 = val.dosageFreqCode) === null || _val$dosageFreqCode4 === void 0 ? void 0 : _val$dosageFreqCode4.shortdesc
29797
- } : {}), _defineProperty(_obj, "startDay", (_val$startDay = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay !== void 0 ? _val$startDay : ""), _defineProperty(_obj, "duration_number", (_val$dfltDuration = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration !== void 0 ? _val$dfltDuration : ""), _defineProperty(_obj, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM = val.dfltDurUOM) !== null && _val$dfltDurUOM !== void 0 && _val$dfltDurUOM._id && val !== null && val !== void 0 && (_val$dfltDurUOM2 = val.dfltDurUOM) !== null && _val$dfltDurUOM2 !== void 0 && _val$dfltDurUOM2.display ? {
29798
- value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM3 = val.dfltDurUOM) === null || _val$dfltDurUOM3 === void 0 ? void 0 : _val$dfltDurUOM3._id,
29799
- label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM4 = val.dfltDurUOM) === null || _val$dfltDurUOM4 === void 0 ? void 0 : _val$dfltDurUOM4.display
29800
- } : {}), _defineProperty(_obj, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM5 = val.dfltDurUOM) !== null && _val$dfltDurUOM5 !== void 0 && _val$dfltDurUOM5.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM6 = val.dfltDurUOM) === null || _val$dfltDurUOM6 === void 0 ? void 0 : _val$dfltDurUOM6.display) : "-"), _defineProperty(_obj, "route", val !== null && val !== void 0 && (_val$route = val.route) !== null && _val$route !== void 0 && _val$route._id && val !== null && val !== void 0 && (_val$route2 = val.route) !== null && _val$route2 !== void 0 && _val$route2.shortdesc ? {
29801
- value: val === null || val === void 0 ? void 0 : (_val$route3 = val.route) === null || _val$route3 === void 0 ? void 0 : _val$route3._id,
29802
- label: val === null || val === void 0 ? void 0 : (_val$route4 = val.route) === null || _val$route4 === void 0 ? void 0 : _val$route4.shortdesc
29803
- } : {}), _defineProperty(_obj, "routeT", (_val$route$shortdesc = val === null || val === void 0 ? void 0 : (_val$route5 = val.route) === null || _val$route5 === void 0 ? void 0 : _val$route5.shortdesc) !== null && _val$route$shortdesc !== void 0 ? _val$route$shortdesc : "-"), _defineProperty(_obj, "frequency_number", (_val$dfltFreqVal = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal !== void 0 ? _val$dfltFreqVal : 0), _defineProperty(_obj, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit !== void 0 && _val$dfltFreqValUnit._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit2 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit2 !== void 0 && _val$dfltFreqValUnit2.display ? {
29804
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit3 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit3 === void 0 ? void 0 : _val$dfltFreqValUnit3._id,
29805
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit4 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit4 === void 0 ? void 0 : _val$dfltFreqValUnit4.display
29806
- } : {}), _defineProperty(_obj, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit5 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit5 !== void 0 && _val$dfltFreqValUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit6 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit6 === void 0 ? void 0 : _val$dfltFreqValUnit6.display) : "-"), _defineProperty(_obj, "rate_number", (_val$dfltFreqRate = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate !== void 0 ? _val$dfltFreqRate : ""), _defineProperty(_obj, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit !== void 0 && _val$dfltFreqRateUnit._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit2 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit2 !== void 0 && _val$dfltFreqRateUnit2.display ? {
29807
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit3 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit3 === void 0 ? void 0 : _val$dfltFreqRateUnit3._id,
29808
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit4 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit4 === void 0 ? void 0 : _val$dfltFreqRateUnit4.display
29809
- } : {}), _defineProperty(_obj, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit5 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit5 !== void 0 && _val$dfltFreqRateUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit6 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit6 === void 0 ? void 0 : _val$dfltFreqRateUnit6.display) : "-"), _defineProperty(_obj, "additive", (_val$additive = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive !== void 0 ? _val$additive : false), _defineProperty(_obj, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "parentSequence", (_val$parentSequence = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence !== void 0 ? _val$parentSequence : ""), _defineProperty(_obj, "parentSequenceT", (_val$parentSequence2 = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence2 !== void 0 ? _val$parentSequence2 : "-"), _defineProperty(_obj, "explanatoryNote", (_val$explNote = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote !== void 0 ? _val$explNote : ""), _defineProperty(_obj, "practitionerInstructions", (_val$practInstr = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr !== void 0 ? _val$practInstr : ""), _defineProperty(_obj, "children", (_constructChildrenTab = constructChildrenTabelData(data, val === null || val === void 0 ? void 0 : val.seqNo)) !== null && _constructChildrenTab !== void 0 ? _constructChildrenTab : []), _obj);
29810
- arr.push(obj);
29811
- }
29812
- });
29864
+
29865
+ if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
29866
+ data === null || data === void 0 ? void 0 : data.map(function (val) {
29867
+ if (!(val !== null && val !== void 0 && val.parentCatSeqNo)) {
29868
+ var _val$id, _val$_key, _val$ordercategory$_i, _val$seqNo, _val$ordercategory, _val$ordercategory2, _val$ordercategory3, _val$ordercategory4, _val$ordercategory5, _val$ordertype, _val$ordertype2, _val$ordertype3, _val$ordertype4, _val$orderCatalog, _val$orderCatalog2, _val$orderCatalog3, _val$orderCatalog4, _val$orderCatalog5, _val$orderCatalog6, _val$orderCatalog7, _val$orderCatalog8, _val$dfltOrderUOM, _val$dfltOrderUOM2, _val$dfltOrderUOM3, _val$dfltOrderUOM4, _val$dfltOrderUOM5, _val$dfltOrderUOM6, _val$IVInfusRateVol, _val$IVInfusRateVolUO, _val$IVInfusRateVolUO2, _val$IVInfusRateVolUO3, _val$IVInfusRateVolUO4, _val$IVDosDurValue, _val$IVDosDurUOM, _val$IVDosDurUOM2, _val$IVDosDurUOM3, _val$IVDosDurUOM4, _val$IVDosDurValue2, _val$IVDosDurUOM5, _val$IVDosDurUOM6, _val$IVDosDurUOM7, _val$IVDosDurUOM8, _val$dosageFreqCode, _val$dosageFreqCode2, _val$dosageFreqCode3, _val$dosageFreqCode4, _val$startDay, _val$dfltDuration, _val$dfltDurUOM, _val$dfltDurUOM2, _val$dfltDurUOM3, _val$dfltDurUOM4, _val$dfltDurUOM5, _val$dfltDurUOM6, _val$route, _val$route2, _val$route3, _val$route4, _val$route$shortdesc, _val$route5, _val$dfltFreqVal, _val$dfltFreqValUnit, _val$dfltFreqValUnit2, _val$dfltFreqValUnit3, _val$dfltFreqValUnit4, _val$dfltFreqValUnit5, _val$dfltFreqValUnit6, _val$dfltFreqRate, _val$dfltFreqRateUnit, _val$dfltFreqRateUnit2, _val$dfltFreqRateUnit3, _val$dfltFreqRateUnit4, _val$dfltFreqRateUnit5, _val$dfltFreqRateUnit6, _val$additive, _val$parentSequence, _val$parentSequence2, _val$explNote, _val$practInstr, _constructChildrenTab, _obj;
29869
+
29870
+ var obj = (_obj = {
29871
+ id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : 0,
29872
+ _key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : 0,
29873
+ typeId: (_val$ordercategory$_i = val === null || val === void 0 ? void 0 : val.ordercategory._id) !== null && _val$ordercategory$_i !== void 0 ? _val$ordercategory$_i : "",
29874
+ seqNo: (_val$seqNo = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo !== void 0 ? _val$seqNo : "",
29875
+ orderCategory: (_val$ordercategory = val === null || val === void 0 ? void 0 : val.ordercategory) !== null && _val$ordercategory !== void 0 ? _val$ordercategory : {}
29876
+ }, _defineProperty(_obj, "orderCategory", val !== null && val !== void 0 && (_val$ordercategory2 = val.ordercategory) !== null && _val$ordercategory2 !== void 0 && _val$ordercategory2._id && val !== null && val !== void 0 && (_val$ordercategory3 = val.ordercategory) !== null && _val$ordercategory3 !== void 0 && _val$ordercategory3.shortdesc ? {
29877
+ value: val === null || val === void 0 ? void 0 : (_val$ordercategory4 = val.ordercategory) === null || _val$ordercategory4 === void 0 ? void 0 : _val$ordercategory4._id,
29878
+ label: val === null || val === void 0 ? void 0 : (_val$ordercategory5 = val.ordercategory) === null || _val$ordercategory5 === void 0 ? void 0 : _val$ordercategory5.shortdesc
29879
+ } : {}), _defineProperty(_obj, "orderTypeDrugType", val !== null && val !== void 0 && (_val$ordertype = val.ordertype) !== null && _val$ordertype !== void 0 && _val$ordertype._id && val !== null && val !== void 0 && (_val$ordertype2 = val.ordertype) !== null && _val$ordertype2 !== void 0 && _val$ordertype2.shortdesc ? {
29880
+ value: val === null || val === void 0 ? void 0 : (_val$ordertype3 = val.ordertype) === null || _val$ordertype3 === void 0 ? void 0 : _val$ordertype3._id,
29881
+ label: val === null || val === void 0 ? void 0 : (_val$ordertype4 = val.ordertype) === null || _val$ordertype4 === void 0 ? void 0 : _val$ordertype4.shortdesc
29882
+ } : {}), _defineProperty(_obj, "orderCatalog", val !== null && val !== void 0 && (_val$orderCatalog = val.orderCatalog) !== null && _val$orderCatalog !== void 0 && _val$orderCatalog._id && val !== null && val !== void 0 && (_val$orderCatalog2 = val.orderCatalog) !== null && _val$orderCatalog2 !== void 0 && _val$orderCatalog2.shortdesc ? {
29883
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog3 = val.orderCatalog) === null || _val$orderCatalog3 === void 0 ? void 0 : _val$orderCatalog3._id,
29884
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog4 = val.orderCatalog) === null || _val$orderCatalog4 === void 0 ? void 0 : _val$orderCatalog4.shortdesc
29885
+ } : val !== null && val !== void 0 && (_val$orderCatalog5 = val.orderCatalog) !== null && _val$orderCatalog5 !== void 0 && _val$orderCatalog5._id && val !== null && val !== void 0 && (_val$orderCatalog6 = val.orderCatalog) !== null && _val$orderCatalog6 !== void 0 && _val$orderCatalog6.ShortDesc ? {
29886
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog7 = val.orderCatalog) === null || _val$orderCatalog7 === void 0 ? void 0 : _val$orderCatalog7._id,
29887
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog8 = val.orderCatalog) === null || _val$orderCatalog8 === void 0 ? void 0 : _val$orderCatalog8.ShortDesc
29888
+ } : {}), _defineProperty(_obj, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM = val.dfltOrderUOM) !== null && _val$dfltOrderUOM !== void 0 && _val$dfltOrderUOM._id && val !== null && val !== void 0 && (_val$dfltOrderUOM2 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM2 !== void 0 && _val$dfltOrderUOM2.display ? {
29889
+ value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM3 = val.dfltOrderUOM) === null || _val$dfltOrderUOM3 === void 0 ? void 0 : _val$dfltOrderUOM3._id,
29890
+ label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM4 = val.dfltOrderUOM) === null || _val$dfltOrderUOM4 === void 0 ? void 0 : _val$dfltOrderUOM4.display
29891
+ } : {}), _defineProperty(_obj, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM5 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM5 !== void 0 && _val$dfltOrderUOM5.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM6 = val.dfltOrderUOM) === null || _val$dfltOrderUOM6 === void 0 ? void 0 : _val$dfltOrderUOM6.display) : "-"), _defineProperty(_obj, "in_infusion_rate_volume_number", (_val$IVInfusRateVol = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol !== void 0 ? _val$IVInfusRateVol : ""), _defineProperty(_obj, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO !== void 0 && _val$IVInfusRateVolUO._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO2 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO2 !== void 0 && _val$IVInfusRateVolUO2.display ? {
29892
+ value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO3 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO3 === void 0 ? void 0 : _val$IVInfusRateVolUO3._id,
29893
+ label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO4 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO4 === void 0 ? void 0 : _val$IVInfusRateVolUO4.display
29894
+ } : {}), _defineProperty(_obj, "in_infusion_rate_duration_number", (_val$IVDosDurValue = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue !== void 0 ? _val$IVDosDurValue : ""), _defineProperty(_obj, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM = val.IVDosDurUOM) !== null && _val$IVDosDurUOM !== void 0 && _val$IVDosDurUOM._id && val !== null && val !== void 0 && (_val$IVDosDurUOM2 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM2 !== void 0 && _val$IVDosDurUOM2.display ? {
29895
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM3 = val.IVDosDurUOM) === null || _val$IVDosDurUOM3 === void 0 ? void 0 : _val$IVDosDurUOM3._id,
29896
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM4 = val.IVDosDurUOM) === null || _val$IVDosDurUOM4 === void 0 ? void 0 : _val$IVDosDurUOM4.display
29897
+ } : {}), _defineProperty(_obj, "iv_dosage_duration_number", (_val$IVDosDurValue2 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue2 !== void 0 ? _val$IVDosDurValue2 : ""), _defineProperty(_obj, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM5 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM5 !== void 0 && _val$IVDosDurUOM5._id && val !== null && val !== void 0 && (_val$IVDosDurUOM6 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM6 !== void 0 && _val$IVDosDurUOM6.display ? {
29898
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM7 = val.IVDosDurUOM) === null || _val$IVDosDurUOM7 === void 0 ? void 0 : _val$IVDosDurUOM7._id,
29899
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM8 = val.IVDosDurUOM) === null || _val$IVDosDurUOM8 === void 0 ? void 0 : _val$IVDosDurUOM8.display
29900
+ } : {}), _defineProperty(_obj, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode = val.dosageFreqCode) !== null && _val$dosageFreqCode !== void 0 && _val$dosageFreqCode._id && val !== null && val !== void 0 && (_val$dosageFreqCode2 = val.dosageFreqCode) !== null && _val$dosageFreqCode2 !== void 0 && _val$dosageFreqCode2.shortdesc ? {
29901
+ value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode3 = val.dosageFreqCode) === null || _val$dosageFreqCode3 === void 0 ? void 0 : _val$dosageFreqCode3._id,
29902
+ label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode4 = val.dosageFreqCode) === null || _val$dosageFreqCode4 === void 0 ? void 0 : _val$dosageFreqCode4.shortdesc
29903
+ } : {}), _defineProperty(_obj, "startDay", (_val$startDay = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay !== void 0 ? _val$startDay : ""), _defineProperty(_obj, "duration_number", (_val$dfltDuration = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration !== void 0 ? _val$dfltDuration : ""), _defineProperty(_obj, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM = val.dfltDurUOM) !== null && _val$dfltDurUOM !== void 0 && _val$dfltDurUOM._id && val !== null && val !== void 0 && (_val$dfltDurUOM2 = val.dfltDurUOM) !== null && _val$dfltDurUOM2 !== void 0 && _val$dfltDurUOM2.display ? {
29904
+ value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM3 = val.dfltDurUOM) === null || _val$dfltDurUOM3 === void 0 ? void 0 : _val$dfltDurUOM3._id,
29905
+ label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM4 = val.dfltDurUOM) === null || _val$dfltDurUOM4 === void 0 ? void 0 : _val$dfltDurUOM4.display
29906
+ } : {}), _defineProperty(_obj, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM5 = val.dfltDurUOM) !== null && _val$dfltDurUOM5 !== void 0 && _val$dfltDurUOM5.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM6 = val.dfltDurUOM) === null || _val$dfltDurUOM6 === void 0 ? void 0 : _val$dfltDurUOM6.display) : "-"), _defineProperty(_obj, "route", val !== null && val !== void 0 && (_val$route = val.route) !== null && _val$route !== void 0 && _val$route._id && val !== null && val !== void 0 && (_val$route2 = val.route) !== null && _val$route2 !== void 0 && _val$route2.shortdesc ? {
29907
+ value: val === null || val === void 0 ? void 0 : (_val$route3 = val.route) === null || _val$route3 === void 0 ? void 0 : _val$route3._id,
29908
+ label: val === null || val === void 0 ? void 0 : (_val$route4 = val.route) === null || _val$route4 === void 0 ? void 0 : _val$route4.shortdesc
29909
+ } : {}), _defineProperty(_obj, "routeT", (_val$route$shortdesc = val === null || val === void 0 ? void 0 : (_val$route5 = val.route) === null || _val$route5 === void 0 ? void 0 : _val$route5.shortdesc) !== null && _val$route$shortdesc !== void 0 ? _val$route$shortdesc : "-"), _defineProperty(_obj, "frequency_number", (_val$dfltFreqVal = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal !== void 0 ? _val$dfltFreqVal : 0), _defineProperty(_obj, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit !== void 0 && _val$dfltFreqValUnit._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit2 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit2 !== void 0 && _val$dfltFreqValUnit2.display ? {
29910
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit3 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit3 === void 0 ? void 0 : _val$dfltFreqValUnit3._id,
29911
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit4 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit4 === void 0 ? void 0 : _val$dfltFreqValUnit4.display
29912
+ } : {}), _defineProperty(_obj, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit5 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit5 !== void 0 && _val$dfltFreqValUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit6 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit6 === void 0 ? void 0 : _val$dfltFreqValUnit6.display) : "-"), _defineProperty(_obj, "rate_number", (_val$dfltFreqRate = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate !== void 0 ? _val$dfltFreqRate : ""), _defineProperty(_obj, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit !== void 0 && _val$dfltFreqRateUnit._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit2 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit2 !== void 0 && _val$dfltFreqRateUnit2.display ? {
29913
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit3 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit3 === void 0 ? void 0 : _val$dfltFreqRateUnit3._id,
29914
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit4 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit4 === void 0 ? void 0 : _val$dfltFreqRateUnit4.display
29915
+ } : {}), _defineProperty(_obj, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit5 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit5 !== void 0 && _val$dfltFreqRateUnit5.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit6 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit6 === void 0 ? void 0 : _val$dfltFreqRateUnit6.display) : "-"), _defineProperty(_obj, "additive", (_val$additive = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive !== void 0 ? _val$additive : false), _defineProperty(_obj, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj, "parentSequence", (_val$parentSequence = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence !== void 0 ? _val$parentSequence : ""), _defineProperty(_obj, "parentSequenceT", (_val$parentSequence2 = val === null || val === void 0 ? void 0 : val.parentSequence) !== null && _val$parentSequence2 !== void 0 ? _val$parentSequence2 : "-"), _defineProperty(_obj, "explanatoryNote", (_val$explNote = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote !== void 0 ? _val$explNote : ""), _defineProperty(_obj, "practitionerInstructions", (_val$practInstr = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr !== void 0 ? _val$practInstr : ""), _defineProperty(_obj, "children", (_constructChildrenTab = constructChildrenTabelData(data, val === null || val === void 0 ? void 0 : val.seqNo)) !== null && _constructChildrenTab !== void 0 ? _constructChildrenTab : []), _obj);
29916
+ arr.push(obj);
29917
+ }
29918
+ });
29919
+ }
29920
+
29813
29921
  return arr;
29814
29922
  };
29815
29923
 
29816
29924
  var constructChildrenTabelData = function constructChildrenTabelData(data, parentCatSeqNo) {
29817
29925
  var arr_ = [];
29818
- data === null || data === void 0 ? void 0 : data.map(function (val) {
29819
- if ((val === null || val === void 0 ? void 0 : val.parentCatSeqNo) === parentCatSeqNo) {
29820
- var _val$id2, _val$_key2, _val$orderCatalog$ord3, _val$orderCatalog15, _val$seqNo2, _val$orderCatalog$ord4, _val$orderCatalog16, _val$orderCatalog17, _val$orderCatalog18, _val$orderCatalog19, _val$orderCatalog20, _val$orderCatalog21, _val$orderCatalog21$o, _val$orderCatalog22, _val$orderCatalog22$o, _val$orderCatalog23, _val$orderCatalog23$o, _val$orderCatalog24, _val$orderCatalog24$o, _val$orderCatalog25, _val$orderCatalog25$o, _val$orderCatalog26, _val$orderCatalog26$o, _val$orderCatalog27, _val$orderCatalog27$o, _val$orderCatalog28, _val$orderCatalog28$o, _val$dfltOrderUOM7, _val$dfltOrderUOM8, _val$dfltOrderUOM9, _val$dfltOrderUOM10, _val$dfltOrderUOM11, _val$dfltOrderUOM12, _val$IVInfusRateVol2, _val$IVInfusRateVolUO5, _val$IVInfusRateVolUO6, _val$IVInfusRateVolUO7, _val$IVInfusRateVolUO8, _val$IVDosDurValue3, _val$IVDosDurUOM9, _val$IVDosDurUOM10, _val$IVDosDurUOM11, _val$IVDosDurUOM12, _val$IVDosDurValue4, _val$IVDosDurUOM13, _val$IVDosDurUOM14, _val$IVDosDurUOM15, _val$IVDosDurUOM16, _val$dosageFreqCode5, _val$dosageFreqCode6, _val$dosageFreqCode7, _val$dosageFreqCode8, _val$startDay2, _val$dfltDuration2, _val$dfltDurUOM7, _val$dfltDurUOM8, _val$dfltDurUOM9, _val$dfltDurUOM10, _val$dfltDurUOM11, _val$dfltDurUOM12, _val$route6, _val$route7, _val$route8, _val$route9, _val$route$shortdesc2, _val$route10, _val$dfltFreqVal2, _val$dfltFreqValUnit7, _val$dfltFreqValUnit8, _val$dfltFreqValUnit9, _val$dfltFreqValUnit10, _val$dfltFreqValUnit11, _val$dfltFreqValUnit12, _val$dfltFreqRate2, _val$dfltFreqRateUnit7, _val$dfltFreqRateUnit8, _val$dfltFreqRateUnit9, _val$dfltFreqRateUnit10, _val$dfltFreqRateUnit11, _val$dfltFreqRateUnit12, _val$additive2, _val$parentCatSeqNo, _val$parentCatSeqNo2, _val$explNote2, _val$practInstr2, _obj_;
29821
-
29822
- var obj_ = (_obj_ = {
29823
- id: (_val$id2 = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id2 !== void 0 ? _val$id2 : 0,
29824
- _key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : 0,
29825
- typeId: (_val$orderCatalog$ord3 = val === null || val === void 0 ? void 0 : (_val$orderCatalog15 = val.orderCatalog) === null || _val$orderCatalog15 === void 0 ? void 0 : _val$orderCatalog15.ordercategory._id) !== null && _val$orderCatalog$ord3 !== void 0 ? _val$orderCatalog$ord3 : "",
29826
- seqNo: (_val$seqNo2 = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo2 !== void 0 ? _val$seqNo2 : "",
29827
- orderCategory: (_val$orderCatalog$ord4 = val === null || val === void 0 ? void 0 : (_val$orderCatalog16 = val.orderCatalog) === null || _val$orderCatalog16 === void 0 ? void 0 : _val$orderCatalog16.ordercategory) !== null && _val$orderCatalog$ord4 !== void 0 ? _val$orderCatalog$ord4 : {},
29828
- orderCatalog: val !== null && val !== void 0 && (_val$orderCatalog17 = val.orderCatalog) !== null && _val$orderCatalog17 !== void 0 && _val$orderCatalog17._id && val !== null && val !== void 0 && (_val$orderCatalog18 = val.orderCatalog) !== null && _val$orderCatalog18 !== void 0 && _val$orderCatalog18.shortdesc ? {
29829
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog19 = val.orderCatalog) === null || _val$orderCatalog19 === void 0 ? void 0 : _val$orderCatalog19._id,
29830
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog20 = val.orderCatalog) === null || _val$orderCatalog20 === void 0 ? void 0 : _val$orderCatalog20.shortdesc
29831
- } : {},
29832
- orderTypeDrugType: val !== null && val !== void 0 && (_val$orderCatalog21 = val.orderCatalog) !== null && _val$orderCatalog21 !== void 0 && (_val$orderCatalog21$o = _val$orderCatalog21.ordertype) !== null && _val$orderCatalog21$o !== void 0 && _val$orderCatalog21$o._id && val !== null && val !== void 0 && (_val$orderCatalog22 = val.orderCatalog) !== null && _val$orderCatalog22 !== void 0 && (_val$orderCatalog22$o = _val$orderCatalog22.ordertype) !== null && _val$orderCatalog22$o !== void 0 && _val$orderCatalog22$o.shortdesc ? {
29833
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog23 = val.orderCatalog) === null || _val$orderCatalog23 === void 0 ? void 0 : (_val$orderCatalog23$o = _val$orderCatalog23.ordertype) === null || _val$orderCatalog23$o === void 0 ? void 0 : _val$orderCatalog23$o._id,
29834
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog24 = val.orderCatalog) === null || _val$orderCatalog24 === void 0 ? void 0 : (_val$orderCatalog24$o = _val$orderCatalog24.ordertype) === null || _val$orderCatalog24$o === void 0 ? void 0 : _val$orderCatalog24$o.shortdesc
29835
- } : {}
29836
- }, _defineProperty(_obj_, "orderCategory", val !== null && val !== void 0 && (_val$orderCatalog25 = val.orderCatalog) !== null && _val$orderCatalog25 !== void 0 && (_val$orderCatalog25$o = _val$orderCatalog25.ordercategory) !== null && _val$orderCatalog25$o !== void 0 && _val$orderCatalog25$o._id && val !== null && val !== void 0 && (_val$orderCatalog26 = val.orderCatalog) !== null && _val$orderCatalog26 !== void 0 && (_val$orderCatalog26$o = _val$orderCatalog26.ordercategory) !== null && _val$orderCatalog26$o !== void 0 && _val$orderCatalog26$o.shortdesc ? {
29837
- value: val === null || val === void 0 ? void 0 : (_val$orderCatalog27 = val.orderCatalog) === null || _val$orderCatalog27 === void 0 ? void 0 : (_val$orderCatalog27$o = _val$orderCatalog27.ordercategory) === null || _val$orderCatalog27$o === void 0 ? void 0 : _val$orderCatalog27$o._id,
29838
- label: val === null || val === void 0 ? void 0 : (_val$orderCatalog28 = val.orderCatalog) === null || _val$orderCatalog28 === void 0 ? void 0 : (_val$orderCatalog28$o = _val$orderCatalog28.ordercategory) === null || _val$orderCatalog28$o === void 0 ? void 0 : _val$orderCatalog28$o.shortdesc
29839
- } : {}), _defineProperty(_obj_, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj_, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj_, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM7 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM7 !== void 0 && _val$dfltOrderUOM7._id && val !== null && val !== void 0 && (_val$dfltOrderUOM8 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM8 !== void 0 && _val$dfltOrderUOM8.display ? {
29840
- value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM9 = val.dfltOrderUOM) === null || _val$dfltOrderUOM9 === void 0 ? void 0 : _val$dfltOrderUOM9._id,
29841
- label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM10 = val.dfltOrderUOM) === null || _val$dfltOrderUOM10 === void 0 ? void 0 : _val$dfltOrderUOM10.display
29842
- } : {}), _defineProperty(_obj_, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM11 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM11 !== void 0 && _val$dfltOrderUOM11.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM12 = val.dfltOrderUOM) === null || _val$dfltOrderUOM12 === void 0 ? void 0 : _val$dfltOrderUOM12.display) : "-"), _defineProperty(_obj_, "in_infusion_rate_volume_number", (_val$IVInfusRateVol2 = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol2 !== void 0 ? _val$IVInfusRateVol2 : ""), _defineProperty(_obj_, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO5 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO5 !== void 0 && _val$IVInfusRateVolUO5._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO6 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO6 !== void 0 && _val$IVInfusRateVolUO6.display ? {
29843
- value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO7 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO7 === void 0 ? void 0 : _val$IVInfusRateVolUO7._id,
29844
- label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO8 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO8 === void 0 ? void 0 : _val$IVInfusRateVolUO8.display
29845
- } : {}), _defineProperty(_obj_, "in_infusion_rate_duration_number", (_val$IVDosDurValue3 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue3 !== void 0 ? _val$IVDosDurValue3 : ""), _defineProperty(_obj_, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM9 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM9 !== void 0 && _val$IVDosDurUOM9._id && val !== null && val !== void 0 && (_val$IVDosDurUOM10 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM10 !== void 0 && _val$IVDosDurUOM10.display ? {
29846
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM11 = val.IVDosDurUOM) === null || _val$IVDosDurUOM11 === void 0 ? void 0 : _val$IVDosDurUOM11._id,
29847
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM12 = val.IVDosDurUOM) === null || _val$IVDosDurUOM12 === void 0 ? void 0 : _val$IVDosDurUOM12.display
29848
- } : {}), _defineProperty(_obj_, "iv_dosage_duration_number", (_val$IVDosDurValue4 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue4 !== void 0 ? _val$IVDosDurValue4 : ""), _defineProperty(_obj_, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM13 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM13 !== void 0 && _val$IVDosDurUOM13._id && val !== null && val !== void 0 && (_val$IVDosDurUOM14 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM14 !== void 0 && _val$IVDosDurUOM14.display ? {
29849
- value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM15 = val.IVDosDurUOM) === null || _val$IVDosDurUOM15 === void 0 ? void 0 : _val$IVDosDurUOM15._id,
29850
- label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM16 = val.IVDosDurUOM) === null || _val$IVDosDurUOM16 === void 0 ? void 0 : _val$IVDosDurUOM16.display
29851
- } : {}), _defineProperty(_obj_, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode5 = val.dosageFreqCode) !== null && _val$dosageFreqCode5 !== void 0 && _val$dosageFreqCode5._id && val !== null && val !== void 0 && (_val$dosageFreqCode6 = val.dosageFreqCode) !== null && _val$dosageFreqCode6 !== void 0 && _val$dosageFreqCode6.shortdesc ? {
29852
- value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode7 = val.dosageFreqCode) === null || _val$dosageFreqCode7 === void 0 ? void 0 : _val$dosageFreqCode7._id,
29853
- label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode8 = val.dosageFreqCode) === null || _val$dosageFreqCode8 === void 0 ? void 0 : _val$dosageFreqCode8.shortdesc
29854
- } : {}), _defineProperty(_obj_, "startDay", (_val$startDay2 = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay2 !== void 0 ? _val$startDay2 : ""), _defineProperty(_obj_, "duration_number", (_val$dfltDuration2 = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration2 !== void 0 ? _val$dfltDuration2 : ""), _defineProperty(_obj_, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM7 = val.dfltDurUOM) !== null && _val$dfltDurUOM7 !== void 0 && _val$dfltDurUOM7._id && val !== null && val !== void 0 && (_val$dfltDurUOM8 = val.dfltDurUOM) !== null && _val$dfltDurUOM8 !== void 0 && _val$dfltDurUOM8.display ? {
29855
- value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM9 = val.dfltDurUOM) === null || _val$dfltDurUOM9 === void 0 ? void 0 : _val$dfltDurUOM9._id,
29856
- label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM10 = val.dfltDurUOM) === null || _val$dfltDurUOM10 === void 0 ? void 0 : _val$dfltDurUOM10.display
29857
- } : {}), _defineProperty(_obj_, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM11 = val.dfltDurUOM) !== null && _val$dfltDurUOM11 !== void 0 && _val$dfltDurUOM11.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM12 = val.dfltDurUOM) === null || _val$dfltDurUOM12 === void 0 ? void 0 : _val$dfltDurUOM12.display) : "-"), _defineProperty(_obj_, "route", val !== null && val !== void 0 && (_val$route6 = val.route) !== null && _val$route6 !== void 0 && _val$route6._id && val !== null && val !== void 0 && (_val$route7 = val.route) !== null && _val$route7 !== void 0 && _val$route7.shortdesc ? {
29858
- value: val === null || val === void 0 ? void 0 : (_val$route8 = val.route) === null || _val$route8 === void 0 ? void 0 : _val$route8._id,
29859
- label: val === null || val === void 0 ? void 0 : (_val$route9 = val.route) === null || _val$route9 === void 0 ? void 0 : _val$route9.shortdesc
29860
- } : {}), _defineProperty(_obj_, "routeT", (_val$route$shortdesc2 = val === null || val === void 0 ? void 0 : (_val$route10 = val.route) === null || _val$route10 === void 0 ? void 0 : _val$route10.shortdesc) !== null && _val$route$shortdesc2 !== void 0 ? _val$route$shortdesc2 : "-"), _defineProperty(_obj_, "frequency_number", (_val$dfltFreqVal2 = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal2 !== void 0 ? _val$dfltFreqVal2 : 0), _defineProperty(_obj_, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit7 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit7 !== void 0 && _val$dfltFreqValUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit8 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit8 !== void 0 && _val$dfltFreqValUnit8.display ? {
29861
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit9 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit9 === void 0 ? void 0 : _val$dfltFreqValUnit9._id,
29862
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit10 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit10 === void 0 ? void 0 : _val$dfltFreqValUnit10.display
29863
- } : {}), _defineProperty(_obj_, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit11 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit11 !== void 0 && _val$dfltFreqValUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit12 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit12 === void 0 ? void 0 : _val$dfltFreqValUnit12.display) : "-"), _defineProperty(_obj_, "rate_number", (_val$dfltFreqRate2 = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate2 !== void 0 ? _val$dfltFreqRate2 : ""), _defineProperty(_obj_, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit7 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit7 !== void 0 && _val$dfltFreqRateUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit8 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit8 !== void 0 && _val$dfltFreqRateUnit8.display ? {
29864
- value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit9 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit9 === void 0 ? void 0 : _val$dfltFreqRateUnit9._id,
29865
- label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit10 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit10 === void 0 ? void 0 : _val$dfltFreqRateUnit10.display
29866
- } : {}), _defineProperty(_obj_, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit11 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit11 !== void 0 && _val$dfltFreqRateUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit12 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit12 === void 0 ? void 0 : _val$dfltFreqRateUnit12.display) : "-"), _defineProperty(_obj_, "additive", (_val$additive2 = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive2 !== void 0 ? _val$additive2 : false), _defineProperty(_obj_, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "parentSequence", (_val$parentCatSeqNo = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo !== void 0 ? _val$parentCatSeqNo : ""), _defineProperty(_obj_, "parentSequenceT", (_val$parentCatSeqNo2 = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo2 !== void 0 ? _val$parentCatSeqNo2 : "-"), _defineProperty(_obj_, "explanatoryNote", (_val$explNote2 = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote2 !== void 0 ? _val$explNote2 : ""), _defineProperty(_obj_, "practitionerInstructions", (_val$practInstr2 = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr2 !== void 0 ? _val$practInstr2 : ""), _obj_);
29867
- arr_.push(obj_);
29868
- }
29869
- });
29926
+
29927
+ if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
29928
+ data === null || data === void 0 ? void 0 : data.map(function (val) {
29929
+ if ((val === null || val === void 0 ? void 0 : val.parentCatSeqNo) === parentCatSeqNo) {
29930
+ var _val$id2, _val$_key2, _val$ordercategory$_i2, _val$seqNo2, _val$ordercategory6, _val$ordercategory7, _val$ordercategory8, _val$ordercategory9, _val$ordercategory10, _val$ordertype5, _val$ordertype6, _val$ordertype7, _val$ordertype8, _val$orderCatalog9, _val$orderCatalog10, _val$orderCatalog11, _val$orderCatalog12, _val$orderCatalog13, _val$orderCatalog14, _val$orderCatalog15, _val$orderCatalog16, _val$dfltOrderUOM7, _val$dfltOrderUOM8, _val$dfltOrderUOM9, _val$dfltOrderUOM10, _val$dfltOrderUOM11, _val$dfltOrderUOM12, _val$IVInfusRateVol2, _val$IVInfusRateVolUO5, _val$IVInfusRateVolUO6, _val$IVInfusRateVolUO7, _val$IVInfusRateVolUO8, _val$IVDosDurValue3, _val$IVDosDurUOM9, _val$IVDosDurUOM10, _val$IVDosDurUOM11, _val$IVDosDurUOM12, _val$IVDosDurValue4, _val$IVDosDurUOM13, _val$IVDosDurUOM14, _val$IVDosDurUOM15, _val$IVDosDurUOM16, _val$dosageFreqCode5, _val$dosageFreqCode6, _val$dosageFreqCode7, _val$dosageFreqCode8, _val$startDay2, _val$dfltDuration2, _val$dfltDurUOM7, _val$dfltDurUOM8, _val$dfltDurUOM9, _val$dfltDurUOM10, _val$dfltDurUOM11, _val$dfltDurUOM12, _val$route6, _val$route7, _val$route8, _val$route9, _val$route$shortdesc2, _val$route10, _val$dfltFreqVal2, _val$dfltFreqValUnit7, _val$dfltFreqValUnit8, _val$dfltFreqValUnit9, _val$dfltFreqValUnit10, _val$dfltFreqValUnit11, _val$dfltFreqValUnit12, _val$dfltFreqRate2, _val$dfltFreqRateUnit7, _val$dfltFreqRateUnit8, _val$dfltFreqRateUnit9, _val$dfltFreqRateUnit10, _val$dfltFreqRateUnit11, _val$dfltFreqRateUnit12, _val$additive2, _val$parentCatSeqNo, _val$parentCatSeqNo2, _val$explNote2, _val$practInstr2, _obj_;
29931
+
29932
+ var obj_ = (_obj_ = {
29933
+ id: (_val$id2 = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id2 !== void 0 ? _val$id2 : 0,
29934
+ _key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : 0,
29935
+ typeId: (_val$ordercategory$_i2 = val === null || val === void 0 ? void 0 : val.ordercategory._id) !== null && _val$ordercategory$_i2 !== void 0 ? _val$ordercategory$_i2 : "",
29936
+ seqNo: (_val$seqNo2 = val === null || val === void 0 ? void 0 : val.seqNo) !== null && _val$seqNo2 !== void 0 ? _val$seqNo2 : "",
29937
+ orderCategory: (_val$ordercategory6 = val === null || val === void 0 ? void 0 : val.ordercategory) !== null && _val$ordercategory6 !== void 0 ? _val$ordercategory6 : {}
29938
+ }, _defineProperty(_obj_, "orderCategory", val !== null && val !== void 0 && (_val$ordercategory7 = val.ordercategory) !== null && _val$ordercategory7 !== void 0 && _val$ordercategory7._id && val !== null && val !== void 0 && (_val$ordercategory8 = val.ordercategory) !== null && _val$ordercategory8 !== void 0 && _val$ordercategory8.shortdesc ? {
29939
+ value: val === null || val === void 0 ? void 0 : (_val$ordercategory9 = val.ordercategory) === null || _val$ordercategory9 === void 0 ? void 0 : _val$ordercategory9._id,
29940
+ label: val === null || val === void 0 ? void 0 : (_val$ordercategory10 = val.ordercategory) === null || _val$ordercategory10 === void 0 ? void 0 : _val$ordercategory10.shortdesc
29941
+ } : {}), _defineProperty(_obj_, "orderTypeDrugType", val !== null && val !== void 0 && (_val$ordertype5 = val.ordertype) !== null && _val$ordertype5 !== void 0 && _val$ordertype5._id && val !== null && val !== void 0 && (_val$ordertype6 = val.ordertype) !== null && _val$ordertype6 !== void 0 && _val$ordertype6.shortdesc ? {
29942
+ value: val === null || val === void 0 ? void 0 : (_val$ordertype7 = val.ordertype) === null || _val$ordertype7 === void 0 ? void 0 : _val$ordertype7._id,
29943
+ label: val === null || val === void 0 ? void 0 : (_val$ordertype8 = val.ordertype) === null || _val$ordertype8 === void 0 ? void 0 : _val$ordertype8.shortdesc
29944
+ } : {}), _defineProperty(_obj_, "orderCatalog", val !== null && val !== void 0 && (_val$orderCatalog9 = val.orderCatalog) !== null && _val$orderCatalog9 !== void 0 && _val$orderCatalog9._id && val !== null && val !== void 0 && (_val$orderCatalog10 = val.orderCatalog) !== null && _val$orderCatalog10 !== void 0 && _val$orderCatalog10.shortdesc ? {
29945
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog11 = val.orderCatalog) === null || _val$orderCatalog11 === void 0 ? void 0 : _val$orderCatalog11._id,
29946
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog12 = val.orderCatalog) === null || _val$orderCatalog12 === void 0 ? void 0 : _val$orderCatalog12.shortdesc
29947
+ } : val !== null && val !== void 0 && (_val$orderCatalog13 = val.orderCatalog) !== null && _val$orderCatalog13 !== void 0 && _val$orderCatalog13._id && val !== null && val !== void 0 && (_val$orderCatalog14 = val.orderCatalog) !== null && _val$orderCatalog14 !== void 0 && _val$orderCatalog14.ShortDesc ? {
29948
+ value: val === null || val === void 0 ? void 0 : (_val$orderCatalog15 = val.orderCatalog) === null || _val$orderCatalog15 === void 0 ? void 0 : _val$orderCatalog15._id,
29949
+ label: val === null || val === void 0 ? void 0 : (_val$orderCatalog16 = val.orderCatalog) === null || _val$orderCatalog16 === void 0 ? void 0 : _val$orderCatalog16.ShortDesc
29950
+ } : {}), _defineProperty(_obj_, "required", val !== null && val !== void 0 && val.required ? val === null || val === void 0 ? void 0 : val.required : false), _defineProperty(_obj_, "requiredT", val !== null && val !== void 0 && val.required ? (val === null || val === void 0 ? void 0 : val.required) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "quantity_number", val !== null && val !== void 0 && val.dfltOrderQty ? val === null || val === void 0 ? void 0 : val.dfltOrderQty : ""), _defineProperty(_obj_, "quantity_type", val !== null && val !== void 0 && (_val$dfltOrderUOM7 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM7 !== void 0 && _val$dfltOrderUOM7._id && val !== null && val !== void 0 && (_val$dfltOrderUOM8 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM8 !== void 0 && _val$dfltOrderUOM8.display ? {
29951
+ value: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM9 = val.dfltOrderUOM) === null || _val$dfltOrderUOM9 === void 0 ? void 0 : _val$dfltOrderUOM9._id,
29952
+ label: val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM10 = val.dfltOrderUOM) === null || _val$dfltOrderUOM10 === void 0 ? void 0 : _val$dfltOrderUOM10.display
29953
+ } : {}), _defineProperty(_obj_, "quantityT", val !== null && val !== void 0 && (_val$dfltOrderUOM11 = val.dfltOrderUOM) !== null && _val$dfltOrderUOM11 !== void 0 && _val$dfltOrderUOM11.display && val !== null && val !== void 0 && val.dfltOrderQty ? (val === null || val === void 0 ? void 0 : val.dfltOrderQty) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltOrderUOM12 = val.dfltOrderUOM) === null || _val$dfltOrderUOM12 === void 0 ? void 0 : _val$dfltOrderUOM12.display) : "-"), _defineProperty(_obj_, "in_infusion_rate_volume_number", (_val$IVInfusRateVol2 = val === null || val === void 0 ? void 0 : val.IVInfusRateVol) !== null && _val$IVInfusRateVol2 !== void 0 ? _val$IVInfusRateVol2 : ""), _defineProperty(_obj_, "in_infusion_rate_volume_type", val !== null && val !== void 0 && (_val$IVInfusRateVolUO5 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO5 !== void 0 && _val$IVInfusRateVolUO5._id && val !== null && val !== void 0 && (_val$IVInfusRateVolUO6 = val.IVInfusRateVolUOM) !== null && _val$IVInfusRateVolUO6 !== void 0 && _val$IVInfusRateVolUO6.display ? {
29954
+ value: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO7 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO7 === void 0 ? void 0 : _val$IVInfusRateVolUO7._id,
29955
+ label: val === null || val === void 0 ? void 0 : (_val$IVInfusRateVolUO8 = val.IVInfusRateVolUOM) === null || _val$IVInfusRateVolUO8 === void 0 ? void 0 : _val$IVInfusRateVolUO8.display
29956
+ } : {}), _defineProperty(_obj_, "in_infusion_rate_duration_number", (_val$IVDosDurValue3 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue3 !== void 0 ? _val$IVDosDurValue3 : ""), _defineProperty(_obj_, "in_infusion_rate_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM9 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM9 !== void 0 && _val$IVDosDurUOM9._id && val !== null && val !== void 0 && (_val$IVDosDurUOM10 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM10 !== void 0 && _val$IVDosDurUOM10.display ? {
29957
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM11 = val.IVDosDurUOM) === null || _val$IVDosDurUOM11 === void 0 ? void 0 : _val$IVDosDurUOM11._id,
29958
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM12 = val.IVDosDurUOM) === null || _val$IVDosDurUOM12 === void 0 ? void 0 : _val$IVDosDurUOM12.display
29959
+ } : {}), _defineProperty(_obj_, "iv_dosage_duration_number", (_val$IVDosDurValue4 = val === null || val === void 0 ? void 0 : val.IVDosDurValue) !== null && _val$IVDosDurValue4 !== void 0 ? _val$IVDosDurValue4 : ""), _defineProperty(_obj_, "iv_dosage_duration_type", val !== null && val !== void 0 && (_val$IVDosDurUOM13 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM13 !== void 0 && _val$IVDosDurUOM13._id && val !== null && val !== void 0 && (_val$IVDosDurUOM14 = val.IVDosDurUOM) !== null && _val$IVDosDurUOM14 !== void 0 && _val$IVDosDurUOM14.display ? {
29960
+ value: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM15 = val.IVDosDurUOM) === null || _val$IVDosDurUOM15 === void 0 ? void 0 : _val$IVDosDurUOM15._id,
29961
+ label: val === null || val === void 0 ? void 0 : (_val$IVDosDurUOM16 = val.IVDosDurUOM) === null || _val$IVDosDurUOM16 === void 0 ? void 0 : _val$IVDosDurUOM16.display
29962
+ } : {}), _defineProperty(_obj_, "dosage_freq_code", val !== null && val !== void 0 && (_val$dosageFreqCode5 = val.dosageFreqCode) !== null && _val$dosageFreqCode5 !== void 0 && _val$dosageFreqCode5._id && val !== null && val !== void 0 && (_val$dosageFreqCode6 = val.dosageFreqCode) !== null && _val$dosageFreqCode6 !== void 0 && _val$dosageFreqCode6.shortdesc ? {
29963
+ value: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode7 = val.dosageFreqCode) === null || _val$dosageFreqCode7 === void 0 ? void 0 : _val$dosageFreqCode7._id,
29964
+ label: val === null || val === void 0 ? void 0 : (_val$dosageFreqCode8 = val.dosageFreqCode) === null || _val$dosageFreqCode8 === void 0 ? void 0 : _val$dosageFreqCode8.shortdesc
29965
+ } : {}), _defineProperty(_obj_, "startDay", (_val$startDay2 = val === null || val === void 0 ? void 0 : val.startDay) !== null && _val$startDay2 !== void 0 ? _val$startDay2 : ""), _defineProperty(_obj_, "duration_number", (_val$dfltDuration2 = val === null || val === void 0 ? void 0 : val.dfltDuration) !== null && _val$dfltDuration2 !== void 0 ? _val$dfltDuration2 : ""), _defineProperty(_obj_, "duration_type", val !== null && val !== void 0 && (_val$dfltDurUOM7 = val.dfltDurUOM) !== null && _val$dfltDurUOM7 !== void 0 && _val$dfltDurUOM7._id && val !== null && val !== void 0 && (_val$dfltDurUOM8 = val.dfltDurUOM) !== null && _val$dfltDurUOM8 !== void 0 && _val$dfltDurUOM8.display ? {
29966
+ value: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM9 = val.dfltDurUOM) === null || _val$dfltDurUOM9 === void 0 ? void 0 : _val$dfltDurUOM9._id,
29967
+ label: val === null || val === void 0 ? void 0 : (_val$dfltDurUOM10 = val.dfltDurUOM) === null || _val$dfltDurUOM10 === void 0 ? void 0 : _val$dfltDurUOM10.display
29968
+ } : {}), _defineProperty(_obj_, "durationT", val !== null && val !== void 0 && val.dfltDuration && val !== null && val !== void 0 && (_val$dfltDurUOM11 = val.dfltDurUOM) !== null && _val$dfltDurUOM11 !== void 0 && _val$dfltDurUOM11.display ? (val === null || val === void 0 ? void 0 : val.dfltDuration) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltDurUOM12 = val.dfltDurUOM) === null || _val$dfltDurUOM12 === void 0 ? void 0 : _val$dfltDurUOM12.display) : "-"), _defineProperty(_obj_, "route", val !== null && val !== void 0 && (_val$route6 = val.route) !== null && _val$route6 !== void 0 && _val$route6._id && val !== null && val !== void 0 && (_val$route7 = val.route) !== null && _val$route7 !== void 0 && _val$route7.shortdesc ? {
29969
+ value: val === null || val === void 0 ? void 0 : (_val$route8 = val.route) === null || _val$route8 === void 0 ? void 0 : _val$route8._id,
29970
+ label: val === null || val === void 0 ? void 0 : (_val$route9 = val.route) === null || _val$route9 === void 0 ? void 0 : _val$route9.shortdesc
29971
+ } : {}), _defineProperty(_obj_, "routeT", (_val$route$shortdesc2 = val === null || val === void 0 ? void 0 : (_val$route10 = val.route) === null || _val$route10 === void 0 ? void 0 : _val$route10.shortdesc) !== null && _val$route$shortdesc2 !== void 0 ? _val$route$shortdesc2 : "-"), _defineProperty(_obj_, "frequency_number", (_val$dfltFreqVal2 = val === null || val === void 0 ? void 0 : val.dfltFreqVal) !== null && _val$dfltFreqVal2 !== void 0 ? _val$dfltFreqVal2 : 0), _defineProperty(_obj_, "frequency_type", val !== null && val !== void 0 && (_val$dfltFreqValUnit7 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit7 !== void 0 && _val$dfltFreqValUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqValUnit8 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit8 !== void 0 && _val$dfltFreqValUnit8.display ? {
29972
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit9 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit9 === void 0 ? void 0 : _val$dfltFreqValUnit9._id,
29973
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit10 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit10 === void 0 ? void 0 : _val$dfltFreqValUnit10.display
29974
+ } : {}), _defineProperty(_obj_, "frequencyT", val !== null && val !== void 0 && val.dfltFreqVal && val !== null && val !== void 0 && (_val$dfltFreqValUnit11 = val.dfltFreqValUnit) !== null && _val$dfltFreqValUnit11 !== void 0 && _val$dfltFreqValUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqVal) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqValUnit12 = val.dfltFreqValUnit) === null || _val$dfltFreqValUnit12 === void 0 ? void 0 : _val$dfltFreqValUnit12.display) : "-"), _defineProperty(_obj_, "rate_number", (_val$dfltFreqRate2 = val === null || val === void 0 ? void 0 : val.dfltFreqRate) !== null && _val$dfltFreqRate2 !== void 0 ? _val$dfltFreqRate2 : ""), _defineProperty(_obj_, "rate_type", val !== null && val !== void 0 && (_val$dfltFreqRateUnit7 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit7 !== void 0 && _val$dfltFreqRateUnit7._id && val !== null && val !== void 0 && (_val$dfltFreqRateUnit8 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit8 !== void 0 && _val$dfltFreqRateUnit8.display ? {
29975
+ value: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit9 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit9 === void 0 ? void 0 : _val$dfltFreqRateUnit9._id,
29976
+ label: val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit10 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit10 === void 0 ? void 0 : _val$dfltFreqRateUnit10.display
29977
+ } : {}), _defineProperty(_obj_, "rateT", val !== null && val !== void 0 && val.dfltFreqRate && val !== null && val !== void 0 && (_val$dfltFreqRateUnit11 = val.dfltFreqRateUnit) !== null && _val$dfltFreqRateUnit11 !== void 0 && _val$dfltFreqRateUnit11.display ? (val === null || val === void 0 ? void 0 : val.dfltFreqRate) + " " + (val === null || val === void 0 ? void 0 : (_val$dfltFreqRateUnit12 = val.dfltFreqRateUnit) === null || _val$dfltFreqRateUnit12 === void 0 ? void 0 : _val$dfltFreqRateUnit12.display) : "-"), _defineProperty(_obj_, "additive", (_val$additive2 = val === null || val === void 0 ? void 0 : val.additive) !== null && _val$additive2 !== void 0 ? _val$additive2 : false), _defineProperty(_obj_, "additivT", val !== null && val !== void 0 && val.additive ? (val === null || val === void 0 ? void 0 : val.additive) === true ? "Yes" : "No" : "No"), _defineProperty(_obj_, "parentSequence", (_val$parentCatSeqNo = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo !== void 0 ? _val$parentCatSeqNo : ""), _defineProperty(_obj_, "parentSequenceT", (_val$parentCatSeqNo2 = val === null || val === void 0 ? void 0 : val.parentCatSeqNo) !== null && _val$parentCatSeqNo2 !== void 0 ? _val$parentCatSeqNo2 : "-"), _defineProperty(_obj_, "explanatoryNote", (_val$explNote2 = val === null || val === void 0 ? void 0 : val.explNote) !== null && _val$explNote2 !== void 0 ? _val$explNote2 : ""), _defineProperty(_obj_, "practitionerInstructions", (_val$practInstr2 = val === null || val === void 0 ? void 0 : val.practInstr) !== null && _val$practInstr2 !== void 0 ? _val$practInstr2 : ""), _obj_);
29978
+ arr_.push(obj_);
29979
+ }
29980
+ });
29981
+ }
29982
+
29870
29983
  return arr_;
29871
29984
  };
29872
29985
 
@@ -30156,9 +30269,9 @@ var ORDER_CATEGORY_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_categ
30156
30269
  }
30157
30270
  }
30158
30271
  }, _callee7, null, [[2, 12]]);
30159
- }))); //ORDER_DRUG_MASTER
30272
+ }))); //ORDER__MASTER
30160
30273
 
30161
- var ORDER_DRUG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
30274
+ var ORDER__MASTER = createAsyncThunk("orderSetMasterApiSlice/order__master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
30162
30275
  var payload,
30163
30276
  _ref13,
30164
30277
  rejectWithValue,
@@ -30209,14 +30322,12 @@ var ORDER_DRUG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_mast
30209
30322
  }
30210
30323
  }
30211
30324
  }, _callee8, null, [[2, 13]]);
30212
- }))); //ORDER_DRUG_CATALOG_MASTER
30325
+ }))); //DRUG__MASTER
30213
30326
 
30214
- var ORDER_DRUG_CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_drug_catalog_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
30327
+ var DRUG__MASTER = createAsyncThunk("orderSetMasterApiSlice/drug__master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
30215
30328
  var payload,
30216
30329
  _ref15,
30217
30330
  rejectWithValue,
30218
- order_category,
30219
- order_drug_type,
30220
30331
  data_arr,
30221
30332
  arry,
30222
30333
  _args9 = arguments;
@@ -30228,10 +30339,12 @@ var ORDER_DRUG_CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_d
30228
30339
  payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
30229
30340
  _ref15 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref15.rejectWithValue;
30230
30341
  _context9.prev = 2;
30231
- order_category = payload.order_category, order_drug_type = payload.order_drug_type;
30342
+
30343
+ _objectDestructuringEmpty(payload);
30344
+
30232
30345
  _context9.next = 6;
30233
30346
  return fetchData({
30234
- body: JSON.stringify(dynamicMaster$1.orderDrugCatalog(order_category, order_drug_type))
30347
+ body: JSON.stringify(dynamicMaster$1.drugType())
30235
30348
  }, __readDocumentUrl__);
30236
30349
 
30237
30350
  case 6:
@@ -30241,30 +30354,143 @@ var ORDER_DRUG_CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order_d
30241
30354
  return data_arr.result.map(function (val) {
30242
30355
  arry.push({
30243
30356
  value: val._id,
30244
- label: val.shortdesc,
30245
- freqApplicable: val !== null && val !== void 0 && val.OrderCatalogByEncounterTypeAge ? constOrderCatalogByEncounterTypeAge(val === null || val === void 0 ? void 0 : val.OrderCatalogByEncounterTypeAge) : false
30357
+ label: val.shortdesc
30246
30358
  });
30247
30359
  });
30248
30360
 
30249
30361
  case 10:
30250
- debugger;
30251
30362
  return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30252
30363
  data: arry
30253
30364
  }));
30254
30365
 
30255
- case 14:
30256
- _context9.prev = 14;
30366
+ case 13:
30367
+ _context9.prev = 13;
30257
30368
  _context9.t0 = _context9["catch"](2);
30258
30369
  return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30259
30370
  message: _context9.t0.message
30260
30371
  })));
30261
30372
 
30262
- case 17:
30373
+ case 16:
30263
30374
  case "end":
30264
30375
  return _context9.stop();
30265
30376
  }
30266
30377
  }
30267
- }, _callee9, null, [[2, 14]]);
30378
+ }, _callee9, null, [[2, 13]]);
30379
+ }))); //ORDER__CATALOG_MASTER
30380
+
30381
+ var ORDER__CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/order__catalog_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
30382
+ var payload,
30383
+ _ref17,
30384
+ rejectWithValue,
30385
+ order_category,
30386
+ order_drug_type,
30387
+ data_arr,
30388
+ arry,
30389
+ _args10 = arguments;
30390
+
30391
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
30392
+ while (1) {
30393
+ switch (_context10.prev = _context10.next) {
30394
+ case 0:
30395
+ payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
30396
+ _ref17 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
30397
+ _context10.prev = 2;
30398
+ order_category = payload.order_category, order_drug_type = payload.order_drug_type;
30399
+ _context10.next = 6;
30400
+ return fetchData({
30401
+ body: JSON.stringify(dynamicMaster$1.orderCatalog(order_category, order_drug_type))
30402
+ }, __readDocumentUrl__);
30403
+
30404
+ case 6:
30405
+ data_arr = _context10.sent;
30406
+ arry = [];
30407
+ _context10.next = 10;
30408
+ return data_arr.result.map(function (val) {
30409
+ arry.push({
30410
+ value: val._id,
30411
+ label: val.shortdesc,
30412
+ freqApplicable: val !== null && val !== void 0 && val.OrderCatalogByEncounterTypeAge ? constOrderCatalogByEncounterTypeAge(val === null || val === void 0 ? void 0 : val.OrderCatalogByEncounterTypeAge) : false
30413
+ });
30414
+ });
30415
+
30416
+ case 10:
30417
+ debugger;
30418
+ return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30419
+ data: arry
30420
+ }));
30421
+
30422
+ case 14:
30423
+ _context10.prev = 14;
30424
+ _context10.t0 = _context10["catch"](2);
30425
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30426
+ message: _context10.t0.message
30427
+ })));
30428
+
30429
+ case 17:
30430
+ case "end":
30431
+ return _context10.stop();
30432
+ }
30433
+ }
30434
+ }, _callee10, null, [[2, 14]]);
30435
+ }))); //DRUG__CATALOG_MASTER
30436
+
30437
+ var DRUG__CATALOG_MASTER = createAsyncThunk("orderSetMasterApiSlice/drug__catalog_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
30438
+ var payload,
30439
+ _ref19,
30440
+ rejectWithValue,
30441
+ drug_type,
30442
+ data_arr,
30443
+ arry,
30444
+ _args11 = arguments;
30445
+
30446
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
30447
+ while (1) {
30448
+ switch (_context11.prev = _context11.next) {
30449
+ case 0:
30450
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
30451
+ _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
30452
+ _context11.prev = 2;
30453
+ drug_type = payload.drug_type;
30454
+ _context11.next = 6;
30455
+ return fetchData({
30456
+ body: JSON.stringify(dynamicMaster$1.drugCatalog(drug_type))
30457
+ }, __readDocumentUrl__);
30458
+
30459
+ case 6:
30460
+ data_arr = _context11.sent;
30461
+ arry = [];
30462
+ _context11.next = 10;
30463
+ return data_arr.result.map(function (val) {
30464
+ arry.push({
30465
+ value: val === null || val === void 0 ? void 0 : val._id,
30466
+ label: val === null || val === void 0 ? void 0 : val.ShortDesc // freqApplicable: val?.OrderCatalogByEncounterTypeAge
30467
+ // ? constOrderCatalogByEncounterTypeAge(
30468
+ // val?.OrderCatalogByEncounterTypeAge
30469
+ // )
30470
+ // : false,
30471
+
30472
+ });
30473
+ });
30474
+
30475
+ case 10:
30476
+ debugger;
30477
+ return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30478
+ data: arry
30479
+ }));
30480
+
30481
+ case 14:
30482
+ _context11.prev = 14;
30483
+ _context11.t0 = _context11["catch"](2);
30484
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30485
+ message: _context11.t0.message
30486
+ })));
30487
+
30488
+ case 17:
30489
+ case "end":
30490
+ return _context11.stop();
30491
+ }
30492
+ }
30493
+ }, _callee11, null, [[2, 14]]);
30268
30494
  })));
30269
30495
 
30270
30496
  var constOrderCatalogByEncounterTypeAge = function constOrderCatalogByEncounterTypeAge(data) {
@@ -30284,137 +30510,135 @@ var constOrderCatalogByEncounterTypeAge = function constOrderCatalogByEncounterT
30284
30510
  }; //UPSERT_ORDER_SET
30285
30511
 
30286
30512
 
30287
- var UPSERT_ORDER_SET = createAsyncThunk("orderSetMasterApiSlice/order_set_upsertS", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
30513
+ var UPSERT_ORDER_SET = createAsyncThunk("orderSetMasterApiSlice/order_set_upsertS", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
30288
30514
  var payload,
30289
- _ref17,
30515
+ _ref21,
30290
30516
  rejectWithValue,
30291
30517
  dataList,
30292
30518
  queriesjson,
30293
30519
  data,
30294
- _args10 = arguments;
30520
+ _args12 = arguments;
30295
30521
 
30296
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
30522
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
30297
30523
  while (1) {
30298
- switch (_context10.prev = _context10.next) {
30524
+ switch (_context12.prev = _context12.next) {
30299
30525
  case 0:
30300
- payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
30301
- _ref17 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
30302
- _context10.prev = 2;
30526
+ payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
30527
+ _ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
30528
+ _context12.prev = 2;
30303
30529
  dataList = payload.dataList;
30304
30530
  queriesjson = generateJson$2(dataList);
30305
- _context10.next = 7;
30531
+ _context12.next = 7;
30306
30532
  return fetchData({
30307
30533
  body: JSON.stringify(queriesjson)
30308
30534
  }, __uspsertUrl__);
30309
30535
 
30310
30536
  case 7:
30311
- data = _context10.sent;
30312
- return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30537
+ data = _context12.sent;
30538
+ return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30313
30539
  data: data
30314
30540
  }));
30315
30541
 
30316
30542
  case 11:
30317
- _context10.prev = 11;
30318
- _context10.t0 = _context10["catch"](2);
30319
- return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30320
- message: _context10.t0.message
30543
+ _context12.prev = 11;
30544
+ _context12.t0 = _context12["catch"](2);
30545
+ return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30546
+ message: _context12.t0.message
30321
30547
  })));
30322
30548
 
30323
30549
  case 14:
30324
30550
  case "end":
30325
- return _context10.stop();
30551
+ return _context12.stop();
30326
30552
  }
30327
30553
  }
30328
- }, _callee10, null, [[2, 11]]);
30554
+ }, _callee12, null, [[2, 11]]);
30329
30555
  }))); //ORDER_SET_SINGLE_READ
30330
30556
 
30331
- var ORDER_SET_SINGLE_READ = createAsyncThunk("orderSetMasterApiSlice/order_set_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
30557
+ var ORDER_SET_SINGLE_READ = createAsyncThunk("orderSetMasterApiSlice/order_set_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
30332
30558
  var payload,
30333
- _ref19,
30559
+ _ref23,
30334
30560
  rejectWithValue,
30335
- getState,
30336
30561
  _key,
30337
30562
  data,
30338
30563
  readJSON,
30339
- _args11 = arguments;
30564
+ _args13 = arguments;
30340
30565
 
30341
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
30566
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
30342
30567
  while (1) {
30343
- switch (_context11.prev = _context11.next) {
30568
+ switch (_context13.prev = _context13.next) {
30344
30569
  case 0:
30345
- payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
30346
- _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue, getState = _ref19.getState;
30347
- _context11.prev = 2;
30570
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
30571
+ _ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
30572
+ _context13.prev = 2;
30348
30573
  _key = payload._key;
30349
- getState();
30350
- _context11.next = 8;
30574
+ _context13.next = 6;
30351
30575
  return fetchData({
30352
30576
  body: JSON.stringify(query$3.orderSetListById(_key))
30353
30577
  }, __readDocumentUrl__);
30354
30578
 
30355
- case 8:
30356
- data = _context11.sent;
30579
+ case 6:
30580
+ data = _context13.sent;
30357
30581
  readJSON = generateReadJSON$2(data.result[0] ? data.result[0] : null);
30358
- return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30582
+ return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30359
30583
  data: readJSON
30360
30584
  }));
30361
30585
 
30362
- case 13:
30363
- _context11.prev = 13;
30364
- _context11.t0 = _context11["catch"](2);
30365
- alert(_context11.t0.message);
30366
- return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30367
- message: _context11.t0.message
30586
+ case 11:
30587
+ _context13.prev = 11;
30588
+ _context13.t0 = _context13["catch"](2);
30589
+ alert(_context13.t0.message);
30590
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30591
+ message: _context13.t0.message
30368
30592
  })));
30369
30593
 
30370
- case 17:
30594
+ case 15:
30371
30595
  case "end":
30372
- return _context11.stop();
30596
+ return _context13.stop();
30373
30597
  }
30374
30598
  }
30375
- }, _callee11, null, [[2, 13]]);
30599
+ }, _callee13, null, [[2, 11]]);
30376
30600
  }))); //DELETE_ORDER_SET_COMPONENT
30377
30601
 
30378
- var DELETE_ORDER_SET_COMPONENT = createAsyncThunk("orderSetMasterApiSlice/order_set_component_delete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
30602
+ var DELETE_ORDER_SET_COMPONENT = createAsyncThunk("orderSetMasterApiSlice/order_set_component_delete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
30379
30603
  var payload,
30380
- _ref21,
30604
+ _ref25,
30381
30605
  rejectWithValue,
30382
30606
  _key,
30383
30607
  data,
30384
- _args12 = arguments;
30608
+ _args14 = arguments;
30385
30609
 
30386
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
30610
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
30387
30611
  while (1) {
30388
- switch (_context12.prev = _context12.next) {
30612
+ switch (_context14.prev = _context14.next) {
30389
30613
  case 0:
30390
- payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
30391
- _ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
30392
- _context12.prev = 2;
30614
+ payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
30615
+ _ref25 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
30616
+ _context14.prev = 2;
30393
30617
  _key = payload._key;
30394
- _context12.next = 6;
30618
+ _context14.next = 6;
30395
30619
  return fetchData({
30396
30620
  body: JSON.stringify(query$3.orderSetComponentDelete(_key))
30397
30621
  }, __softDelete__);
30398
30622
 
30399
30623
  case 6:
30400
- data = _context12.sent;
30401
- return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30624
+ data = _context14.sent;
30625
+ return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
30402
30626
  data: data
30403
30627
  }));
30404
30628
 
30405
30629
  case 10:
30406
- _context12.prev = 10;
30407
- _context12.t0 = _context12["catch"](2);
30408
- return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30409
- message: _context12.t0.message
30630
+ _context14.prev = 10;
30631
+ _context14.t0 = _context14["catch"](2);
30632
+ return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
30633
+ message: _context14.t0.message
30410
30634
  })));
30411
30635
 
30412
30636
  case 13:
30413
30637
  case "end":
30414
- return _context12.stop();
30638
+ return _context14.stop();
30415
30639
  }
30416
30640
  }
30417
- }, _callee12, null, [[2, 10]]);
30641
+ }, _callee14, null, [[2, 10]]);
30418
30642
  })));
30419
30643
  var orderSetMasterSlice = createSlice({
30420
30644
  name: "orderSetMasterApiSlice",
@@ -30423,8 +30647,10 @@ var orderSetMasterSlice = createSlice({
30423
30647
  order_set_single_read: _objectSpread2({}, defaultState.List),
30424
30648
  order_set_master_status_change: _objectSpread2({}, defaultState.List),
30425
30649
  order_set_masters: _objectSpread2({}, defaultState.List),
30426
- order_drug_masters: _objectSpread2({}, defaultState.List),
30427
- order_drug_catalog_masters: _objectSpread2({}, defaultState.List),
30650
+ order__masters: _objectSpread2({}, defaultState.List),
30651
+ drug__masters: _objectSpread2({}, defaultState.List),
30652
+ order__catalog_masters: _objectSpread2({}, defaultState.List),
30653
+ drug__catalog_masters: _objectSpread2({}, defaultState.List),
30428
30654
  order_category_masters: _objectSpread2({}, defaultState.List),
30429
30655
  order_set_upsert: _objectSpread2({}, defaultState.List),
30430
30656
  order_set_component_delete: _objectSpread2({}, defaultState.List)
@@ -30459,18 +30685,30 @@ var orderSetMasterSlice = createSlice({
30459
30685
  state.order_set_masters.loading = true, state.order_set_masters.error = false, state.order_set_masters.loading = true;
30460
30686
  }), _defineProperty(_extraReducers$8, ORDER_SET_MASTER_MASTER.rejected, function (state, action) {
30461
30687
  state.order_set_masters.loading = false, state.order_set_masters.error = true, state.order_set_masters = action.payload;
30462
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_MASTER.fulfilled, function (state, action) {
30463
- state.order_drug_masters.loading = false, state.order_drug_masters.error = false, state.order_drug_masters = action.payload;
30464
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_MASTER.pending, function (state, action) {
30465
- state.order_drug_masters.loading = true, state.order_drug_masters.error = false, state.order_drug_masters.loading = true;
30466
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_MASTER.rejected, function (state, action) {
30467
- state.order_drug_masters.loading = false, state.order_drug_masters.error = true, state.order_drug_masters = action.payload;
30468
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_CATALOG_MASTER.fulfilled, function (state, action) {
30469
- state.order_drug_catalog_masters.loading = false, state.order_drug_catalog_masters.error = false, state.order_drug_catalog_masters = action.payload;
30470
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_CATALOG_MASTER.pending, function (state, action) {
30471
- state.order_drug_catalog_masters.loading = true, state.order_drug_catalog_masters.error = false, state.order_drug_catalog_masters.loading = true;
30472
- }), _defineProperty(_extraReducers$8, ORDER_DRUG_CATALOG_MASTER.rejected, function (state, action) {
30473
- state.order_drug_catalog_masters.loading = false, state.order_drug_catalog_masters.error = true, state.order_drug_catalog_masters = action.payload;
30688
+ }), _defineProperty(_extraReducers$8, ORDER__MASTER.fulfilled, function (state, action) {
30689
+ state.order__masters.loading = false, state.order__masters.error = false, state.order__masters = action.payload;
30690
+ }), _defineProperty(_extraReducers$8, ORDER__MASTER.pending, function (state, action) {
30691
+ state.order__masters.loading = true, state.order__masters.error = false, state.order__masters.loading = true;
30692
+ }), _defineProperty(_extraReducers$8, ORDER__MASTER.rejected, function (state, action) {
30693
+ state.order__masters.loading = false, state.order__masters.error = true, state.order__masters = action.payload;
30694
+ }), _defineProperty(_extraReducers$8, DRUG__MASTER.fulfilled, function (state, action) {
30695
+ state.drug__masters.loading = false, state.drug__masters.error = false, state.drug__masters = action.payload;
30696
+ }), _defineProperty(_extraReducers$8, DRUG__MASTER.pending, function (state, action) {
30697
+ state.drug__masters.loading = true, state.drug__masters.error = false, state.drug__masters.loading = true;
30698
+ }), _defineProperty(_extraReducers$8, DRUG__MASTER.rejected, function (state, action) {
30699
+ state.drug__masters.loading = false, state.drug__masters.error = true, state.drug__masters = action.payload;
30700
+ }), _defineProperty(_extraReducers$8, ORDER__CATALOG_MASTER.fulfilled, function (state, action) {
30701
+ state.order__catalog_masters.loading = false, state.order__catalog_masters.error = false, state.order__catalog_masters = action.payload;
30702
+ }), _defineProperty(_extraReducers$8, ORDER__CATALOG_MASTER.pending, function (state, action) {
30703
+ state.order__catalog_masters.loading = true, state.order__catalog_masters.error = false, state.order__catalog_masters.loading = true;
30704
+ }), _defineProperty(_extraReducers$8, ORDER__CATALOG_MASTER.rejected, function (state, action) {
30705
+ state.order__catalog_masters.loading = false, state.order__catalog_masters.error = true, state.order__catalog_masters = action.payload;
30706
+ }), _defineProperty(_extraReducers$8, DRUG__CATALOG_MASTER.fulfilled, function (state, action) {
30707
+ state.drug__catalog_masters.loading = false, state.drug__catalog_masters.error = false, state.drug__catalog_masters = action.payload;
30708
+ }), _defineProperty(_extraReducers$8, DRUG__CATALOG_MASTER.pending, function (state, action) {
30709
+ state.drug__catalog_masters.loading = true, state.drug__catalog_masters.error = false, state.drug__catalog_masters.loading = true;
30710
+ }), _defineProperty(_extraReducers$8, DRUG__CATALOG_MASTER.rejected, function (state, action) {
30711
+ state.drug__catalog_masters.loading = false, state.drug__catalog_masters.error = true, state.drug__catalog_masters = action.payload;
30474
30712
  }), _defineProperty(_extraReducers$8, ORDER_CATEGORY_MASTER.fulfilled, function (state, action) {
30475
30713
  state.order_category_masters.loading = false, state.order_category_masters.error = false, state.order_category_masters = action.payload;
30476
30714
  }), _defineProperty(_extraReducers$8, ORDER_CATEGORY_MASTER.pending, function (state, action) {
@@ -30495,8 +30733,10 @@ var orderSetMasterActions = {
30495
30733
  GET_ORDER_SET_LIST: GET_ORDER_SET_LIST,
30496
30734
  ORDER_SET_MASTER_STATUS_CHANGE: ORDER_SET_MASTER_STATUS_CHANGE,
30497
30735
  ORDER_SET_MASTER_MASTER: ORDER_SET_MASTER_MASTER,
30498
- ORDER_DRUG_MASTER: ORDER_DRUG_MASTER,
30499
- ORDER_DRUG_CATALOG_MASTER: ORDER_DRUG_CATALOG_MASTER,
30736
+ ORDER__MASTER: ORDER__MASTER,
30737
+ DRUG__MASTER: DRUG__MASTER,
30738
+ ORDER__CATALOG_MASTER: ORDER__CATALOG_MASTER,
30739
+ DRUG__CATALOG_MASTER: DRUG__CATALOG_MASTER,
30500
30740
  ORDER_CATEGORY_MASTER: ORDER_CATEGORY_MASTER,
30501
30741
  UPSERT_ORDER_SET: UPSERT_ORDER_SET,
30502
30742
  ORDER_SET_SINGLE_READ: ORDER_SET_SINGLE_READ,
@@ -31492,7 +31732,7 @@ var VIEW_PENDING_PATIENT_LIST = createAsyncThunk("getPendingRescheduleListApiSli
31492
31732
  case 5:
31493
31733
  data = _context2.sent;
31494
31734
  returnedData = data !== null && data !== void 0 && data.result ? data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (_) {
31495
- var _$Patient$name$0$give, _$Patient, _$Patient$name, _$Patient$name$, _$Patient$alias, _$Patient2, _$Patient$age, _$Patient3, _$Patient$telecom$0$v, _$Patient4, _$Patient4$telecom, _$Patient4$telecom$, _$appno, _moment$unix, _$Patient$slotID$0$bl, _$Patient5, _$Patient5$slotID, _$Patient5$slotID$, _$Patient5$slotID$$bl, _$Patient$gender$, _$Patient6, _$Patient6$gender, _$id2;
31735
+ var _$Patient$name$0$give, _$Patient, _$Patient$name, _$Patient$name$, _$Patient$alias, _$Patient2, _$Patient$age, _$Patient3, _$Patient$telecom$0$v, _$Patient4, _$Patient4$telecom, _$Patient4$telecom$, _$appno, _$Patient$slotID$0$bl, _$Patient5, _$Patient5$slotID, _$Patient5$slotID$, _$Patient5$slotID$$bl, _$Patient$gender$, _$Patient6, _$Patient6$gender, _$id2;
31496
31736
 
31497
31737
  return {
31498
31738
  "select": false,
@@ -31501,7 +31741,7 @@ var VIEW_PENDING_PATIENT_LIST = createAsyncThunk("getPendingRescheduleListApiSli
31501
31741
  "age": (_$Patient$age = _ === null || _ === void 0 ? void 0 : (_$Patient3 = _.Patient) === null || _$Patient3 === void 0 ? void 0 : _$Patient3.age) !== null && _$Patient$age !== void 0 ? _$Patient$age : '',
31502
31742
  "mobile no": (_$Patient$telecom$0$v = _ === null || _ === void 0 ? void 0 : (_$Patient4 = _.Patient) === null || _$Patient4 === void 0 ? void 0 : (_$Patient4$telecom = _$Patient4.telecom) === null || _$Patient4$telecom === void 0 ? void 0 : (_$Patient4$telecom$ = _$Patient4$telecom[0]) === null || _$Patient4$telecom$ === void 0 ? void 0 : _$Patient4$telecom$.value) !== null && _$Patient$telecom$0$v !== void 0 ? _$Patient$telecom$0$v : '',
31503
31743
  "appt ref no.": (_$appno = _ === null || _ === void 0 ? void 0 : _.appno) !== null && _$appno !== void 0 ? _$appno : '',
31504
- "appt date & time": _ !== null && _ !== void 0 && _.start ? (_moment$unix = moment.unix(_ === null || _ === void 0 ? void 0 : _.start)) === null || _moment$unix === void 0 ? void 0 : _moment$unix.format('DD MMM,YYYY hh:mm A') : '',
31744
+ "appt date & time": _ !== null && _ !== void 0 && _.start ? utcTOLocal(_ === null || _ === void 0 ? void 0 : _.start, 'DD MMM,YYYY hh:mm A') : '',
31505
31745
  "reason": (_$Patient$slotID$0$bl = _ === null || _ === void 0 ? void 0 : (_$Patient5 = _.Patient) === null || _$Patient5 === void 0 ? void 0 : (_$Patient5$slotID = _$Patient5.slotID) === null || _$Patient5$slotID === void 0 ? void 0 : (_$Patient5$slotID$ = _$Patient5$slotID[0]) === null || _$Patient5$slotID$ === void 0 ? void 0 : (_$Patient5$slotID$$bl = _$Patient5$slotID$.blockreason) === null || _$Patient5$slotID$$bl === void 0 ? void 0 : _$Patient5$slotID$$bl.display) !== null && _$Patient$slotID$0$bl !== void 0 ? _$Patient$slotID$0$bl : '',
31506
31746
  "gender": (_$Patient$gender$ = _ === null || _ === void 0 ? void 0 : (_$Patient6 = _.Patient) === null || _$Patient6 === void 0 ? void 0 : (_$Patient6$gender = _$Patient6.gender) === null || _$Patient6$gender === void 0 ? void 0 : _$Patient6$gender[0]) !== null && _$Patient$gender$ !== void 0 ? _$Patient$gender$ : '',
31507
31747
  "appointmentId": (_$id2 = _ === null || _ === void 0 ? void 0 : _.id) !== null && _$id2 !== void 0 ? _$id2 : ''
@@ -31553,10 +31793,10 @@ var GET_PRACTITIONER_AGAINST_SPECIALITY = createAsyncThunk("getPendingReschedule
31553
31793
  case 5:
31554
31794
  data = _context3.sent;
31555
31795
  returnedData = data !== null && data !== void 0 && (_data$result2 = data.result) !== null && _data$result2 !== void 0 && (_data$result2$ = _data$result2[0]) !== null && _data$result2$ !== void 0 && _data$result2$.Practitioner ? data === null || data === void 0 ? void 0 : (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : (_data$result3$ = _data$result3[0]) === null || _data$result3$ === void 0 ? void 0 : (_data$result3$$Practi = _data$result3$.Practitioner) === null || _data$result3$$Practi === void 0 ? void 0 : _data$result3$$Practi.map(function (_) {
31556
- var _$name$0$text2, _$name2, _$name2$, _$practitioner_role$c, _$practitioner_role, _$practitioner_role$c2, _$practitioner_role$c3, _$id3, _$practitioner_role$S, _$practitioner_role2, _$practitioner_role2$;
31796
+ var _$name2, _$practitioner_role$c, _$practitioner_role, _$practitioner_role$c2, _$practitioner_role$c3, _$id3, _$practitioner_role$S, _$practitioner_role2, _$practitioner_role2$;
31557
31797
 
31558
31798
  return {
31559
- label: (_$name$0$text2 = _ === null || _ === void 0 ? void 0 : (_$name2 = _.name) === null || _$name2 === void 0 ? void 0 : (_$name2$ = _$name2[0]) === null || _$name2$ === void 0 ? void 0 : _$name2$.text) !== null && _$name$0$text2 !== void 0 ? _$name$0$text2 : '',
31799
+ label: makeName(_ === null || _ === void 0 ? void 0 : (_$name2 = _.name) === null || _$name2 === void 0 ? void 0 : _$name2[0]),
31560
31800
  //name
31561
31801
  value: (_$practitioner_role$c = _ === null || _ === void 0 ? void 0 : (_$practitioner_role = _.practitioner_role) === null || _$practitioner_role === void 0 ? void 0 : (_$practitioner_role$c2 = _$practitioner_role.coding) === null || _$practitioner_role$c2 === void 0 ? void 0 : (_$practitioner_role$c3 = _$practitioner_role$c2[0]) === null || _$practitioner_role$c3 === void 0 ? void 0 : _$practitioner_role$c3.display) !== null && _$practitioner_role$c !== void 0 ? _$practitioner_role$c : '',
31562
31802
  //role