primarycare-binder 1.1.69 → 1.1.73

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 +210 -83
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -10338,7 +10338,7 @@ var PATIENT_NATIONALITY_READ = createAsyncThunk("patientReducer/readPatientNatio
10338
10338
  data = {
10339
10339
  db_name: dbName,
10340
10340
  entity: "SMGeographicMaster",
10341
- filter: "lower(document(SMGeographicMaster.geogLevelType).display)=='country' && SMGeographicMaster.activestatus == true",
10341
+ filter: "lower(document(SMGeographicMaster.geogLevelType).display)=='country' && SMGeographicMaster.active == true && SMGeographicMaster.activestatus == true",
10342
10342
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
10343
10343
  };
10344
10344
  _context6.next = 6;
@@ -15190,13 +15190,13 @@ var MASTER_SEARCH = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*
15190
15190
  }
15191
15191
  }, _callee9, null, [[2, 24]]);
15192
15192
  })));
15193
- var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
15193
+ var GET_ENCOUNTER_MASTER_TYPE = createAsyncThunk('searchApiSlice/masterEncounterType', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
15194
15194
  var payload,
15195
15195
  _ref20,
15196
15196
  rejectWithValue,
15197
- body,
15198
- data,
15199
15197
  returnData,
15198
+ encounterTypeBody,
15199
+ encounterType,
15200
15200
  _args10 = arguments;
15201
15201
 
15202
15202
  return regeneratorRuntime.wrap(function _callee10$(_context10) {
@@ -15206,6 +15206,109 @@ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PUR
15206
15206
  payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
15207
15207
  _ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
15208
15208
  _context10.prev = 2;
15209
+ returnData = [];
15210
+ encounterTypeBody = {
15211
+ db_name: dbName,
15212
+ entity: "CodingMaster",
15213
+ filter: "CodingMaster.Type == 'ENCOUNTERTYPE' && CodingMaster.status == true && CodingMaster.activestatus==true ",
15214
+ return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
15215
+ sort: "document(AMPatientClass.encTypeDesc).display"
15216
+ };
15217
+ _context10.next = 7;
15218
+ return fetchData$3({
15219
+ body: JSON.stringify(encounterTypeBody)
15220
+ }, __readDocumentUrl__);
15221
+
15222
+ case 7:
15223
+ encounterType = _context10.sent;
15224
+ returnData = encounterType === null || encounterType === void 0 ? void 0 : encounterType.result;
15225
+ return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
15226
+ data: returnData
15227
+ }));
15228
+
15229
+ case 12:
15230
+ _context10.prev = 12;
15231
+ _context10.t0 = _context10["catch"](2);
15232
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15233
+ message: err.message
15234
+ })));
15235
+
15236
+ case 15:
15237
+ case "end":
15238
+ return _context10.stop();
15239
+ }
15240
+ }
15241
+ }, _callee10, null, [[2, 12]]);
15242
+ })));
15243
+ var GET_ENCOUNTER_MASTER_CLASS = createAsyncThunk('searchApiSlice/masterEncounterClass', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
15244
+ var payload,
15245
+ _ref22,
15246
+ rejectWithValue,
15247
+ _payload$encType,
15248
+ encType,
15249
+ returnData,
15250
+ encounterClassBody,
15251
+ encounterClass,
15252
+ _args11 = arguments;
15253
+
15254
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
15255
+ while (1) {
15256
+ switch (_context11.prev = _context11.next) {
15257
+ case 0:
15258
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
15259
+ _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
15260
+ _context11.prev = 2;
15261
+ _payload$encType = payload.encType, encType = _payload$encType === void 0 ? "" : _payload$encType;
15262
+ returnData = {};
15263
+ encounterClassBody = {
15264
+ db_name: dbName,
15265
+ entity: "AMPatientClass",
15266
+ filter: "AMPatientClass.encType=='".concat(encType, "' && AMPatientClass.activestatus==true && AMPatientClass.status==true"),
15267
+ return_fields: "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
15268
+ sort: "document(AMPatientClass.encTypeDesc).display"
15269
+ };
15270
+ _context11.next = 8;
15271
+ return fetchData$3({
15272
+ body: JSON.stringify(encounterClassBody)
15273
+ }, __readDocumentUrl__);
15274
+
15275
+ case 8:
15276
+ encounterClass = _context11.sent;
15277
+ returnData = encounterClass === null || encounterClass === void 0 ? void 0 : encounterClass.result;
15278
+ return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
15279
+ data: returnData
15280
+ }));
15281
+
15282
+ case 13:
15283
+ _context11.prev = 13;
15284
+ _context11.t0 = _context11["catch"](2);
15285
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15286
+ message: err.message
15287
+ })));
15288
+
15289
+ case 16:
15290
+ case "end":
15291
+ return _context11.stop();
15292
+ }
15293
+ }
15294
+ }, _callee11, null, [[2, 13]]);
15295
+ })));
15296
+ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
15297
+ var payload,
15298
+ _ref24,
15299
+ rejectWithValue,
15300
+ body,
15301
+ data,
15302
+ returnData,
15303
+ _args12 = arguments;
15304
+
15305
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
15306
+ while (1) {
15307
+ switch (_context12.prev = _context12.next) {
15308
+ case 0:
15309
+ payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
15310
+ _ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
15311
+ _context12.prev = 2;
15209
15312
  body = {
15210
15313
  db_name: dbName,
15211
15314
  queryid: query_ids["searhcApiSlice/masterSearch"],
@@ -15213,13 +15316,13 @@ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PUR
15213
15316
  type: ["Relation"]
15214
15317
  }
15215
15318
  };
15216
- _context10.next = 6;
15319
+ _context12.next = 6;
15217
15320
  return fetchData$3({
15218
15321
  body: JSON.stringify(body)
15219
15322
  });
15220
15323
 
15221
15324
  case 6:
15222
- data = _context10.sent;
15325
+ data = _context12.sent;
15223
15326
  returnData = [];
15224
15327
 
15225
15328
  if (Array.isArray(data)) {
@@ -15233,40 +15336,40 @@ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PUR
15233
15336
  });
15234
15337
  }
15235
15338
 
15236
- return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
15339
+ return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
15237
15340
  data: returnData
15238
15341
  }));
15239
15342
 
15240
15343
  case 12:
15241
- _context10.prev = 12;
15242
- _context10.t0 = _context10["catch"](2);
15243
- return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15244
- message: _context10.t0.message
15344
+ _context12.prev = 12;
15345
+ _context12.t0 = _context12["catch"](2);
15346
+ return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15347
+ message: _context12.t0.message
15245
15348
  })));
15246
15349
 
15247
15350
  case 15:
15248
15351
  case "end":
15249
- return _context10.stop();
15352
+ return _context12.stop();
15250
15353
  }
15251
15354
  }
15252
- }, _callee10, null, [[2, 12]]);
15355
+ }, _callee12, null, [[2, 12]]);
15253
15356
  })));
15254
- var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialityAgainstPractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
15357
+ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialityAgainstPractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
15255
15358
  var payload,
15256
- _ref22,
15359
+ _ref26,
15257
15360
  rejectWithValue,
15258
15361
  body,
15259
15362
  data,
15260
15363
  returnData,
15261
- _args11 = arguments;
15364
+ _args13 = arguments;
15262
15365
 
15263
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
15366
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
15264
15367
  while (1) {
15265
- switch (_context11.prev = _context11.next) {
15368
+ switch (_context13.prev = _context13.next) {
15266
15369
  case 0:
15267
- payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
15268
- _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
15269
- _context11.prev = 2;
15370
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
15371
+ _ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
15372
+ _context13.prev = 2;
15270
15373
  body = {
15271
15374
  db_name: dbName,
15272
15375
  entity: "Practitioner",
@@ -15274,13 +15377,13 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
15274
15377
  return_fields: "merge(Practitioner,{name:(for hm in HumanNameMaster filter hm._id in Practitioner.name return merge(hm,{use:(for cod in CodeableConceptMaster filter cod._id== hm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id == hm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id == hm.suffix return document(cod.coding))}))},{SPECIALTY:(for PractitionerRole in PractitionerRole filter Practitioner.practitioner_role any == PractitionerRole._id for CodeableConceptMaster in CodeableConceptMaster filter PractitionerRole.SpecialtyID == CodeableConceptMaster._id return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}) ) } )",
15275
15378
  sort: "first(document(Practitioner.name)[*].text)"
15276
15379
  };
15277
- _context11.next = 6;
15380
+ _context13.next = 6;
15278
15381
  return fetchData$3({
15279
15382
  body: JSON.stringify(body)
15280
15383
  }, __readDocumentUrl__);
15281
15384
 
15282
15385
  case 6:
15283
- data = _context11.sent;
15386
+ data = _context13.sent;
15284
15387
  returnData = [];
15285
15388
 
15286
15389
  if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
@@ -15296,70 +15399,70 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
15296
15399
  });
15297
15400
  }
15298
15401
 
15299
- return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
15402
+ return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
15300
15403
  data: returnData
15301
15404
  }));
15302
15405
 
15303
15406
  case 12:
15304
- _context11.prev = 12;
15305
- _context11.t0 = _context11["catch"](2);
15306
- return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15307
- message: _context11.t0.message
15407
+ _context13.prev = 12;
15408
+ _context13.t0 = _context13["catch"](2);
15409
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15410
+ message: _context13.t0.message
15308
15411
  })));
15309
15412
 
15310
15413
  case 15:
15311
15414
  case "end":
15312
- return _context11.stop();
15415
+ return _context13.stop();
15313
15416
  }
15314
15417
  }
15315
- }, _callee11, null, [[2, 12]]);
15418
+ }, _callee13, null, [[2, 12]]);
15316
15419
  })));
15317
15420
 
15318
15421
  var getLocationInfo = /*#__PURE__*/function () {
15319
- var _ref23 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
15422
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
15320
15423
  var _hospInfo$address3, _hospInfo$address3$, _hospInfo$address3$$c;
15321
15424
 
15322
15425
  var hospInfo,
15323
15426
  obj,
15324
15427
  city,
15325
15428
  info,
15326
- _args12 = arguments;
15327
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
15429
+ _args14 = arguments;
15430
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
15328
15431
  while (1) {
15329
- switch (_context12.prev = _context12.next) {
15432
+ switch (_context14.prev = _context14.next) {
15330
15433
  case 0:
15331
- hospInfo = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
15332
- obj = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
15434
+ hospInfo = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
15435
+ obj = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {};
15333
15436
  city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address3 = hospInfo.address) === null || _hospInfo$address3 === void 0 ? void 0 : (_hospInfo$address3$ = _hospInfo$address3[0]) === null || _hospInfo$address3$ === void 0 ? void 0 : (_hospInfo$address3$$c = _hospInfo$address3$.city) === null || _hospInfo$address3$$c === void 0 ? void 0 : _hospInfo$address3$$c.geogLevelName;
15334
15437
 
15335
15438
  if (obj[city]) {
15336
- _context12.next = 8;
15439
+ _context14.next = 8;
15337
15440
  break;
15338
15441
  }
15339
15442
 
15340
- _context12.next = 6;
15443
+ _context14.next = 6;
15341
15444
  return getLatLong(city);
15342
15445
 
15343
15446
  case 6:
15344
- info = _context12.sent;
15447
+ info = _context14.sent;
15345
15448
  obj[city] = info;
15346
15449
 
15347
15450
  case 8:
15348
15451
  case "end":
15349
- return _context12.stop();
15452
+ return _context14.stop();
15350
15453
  }
15351
15454
  }
15352
- }, _callee12);
15455
+ }, _callee14);
15353
15456
  }));
15354
15457
 
15355
15458
  return function getLocationInfo() {
15356
- return _ref23.apply(this, arguments);
15459
+ return _ref27.apply(this, arguments);
15357
15460
  };
15358
15461
  }();
15359
15462
 
15360
- var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
15463
+ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
15361
15464
  var payload,
15362
- _ref25,
15465
+ _ref29,
15363
15466
  rejectWithValue,
15364
15467
  _payload$practitioner,
15365
15468
  practitionerId,
@@ -15373,21 +15476,21 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
15373
15476
  _data$result2,
15374
15477
  cityMap,
15375
15478
  promArr,
15376
- _args13 = arguments;
15479
+ _args15 = arguments;
15377
15480
 
15378
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
15481
+ return regeneratorRuntime.wrap(function _callee15$(_context15) {
15379
15482
  while (1) {
15380
- switch (_context13.prev = _context13.next) {
15483
+ switch (_context15.prev = _context15.next) {
15381
15484
  case 0:
15382
- payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
15383
- _ref25 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
15384
- _context13.prev = 2;
15485
+ payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
15486
+ _ref29 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
15487
+ _context15.prev = 2;
15385
15488
  _payload$practitioner = payload.practitionerId, practitionerId = _payload$practitioner === void 0 ? "" : _payload$practitioner;
15386
- _context13.next = 6;
15489
+ _context15.next = 6;
15387
15490
  return getCurrentPosition();
15388
15491
 
15389
15492
  case 6:
15390
- _yield$getCurrentPosi2 = _context13.sent;
15493
+ _yield$getCurrentPosi2 = _context15.sent;
15391
15494
  myLat = _yield$getCurrentPosi2.lat;
15392
15495
  myLong = _yield$getCurrentPosi2["long"];
15393
15496
  body = {
@@ -15399,17 +15502,17 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
15399
15502
  },
15400
15503
  return_fields: "{address: (let add = Document(Organization.address[0]) return merge(add, { city: Document(add.city) })), OrganizationName:Organization.name, OrgID:Organization.id}"
15401
15504
  };
15402
- _context13.next = 12;
15505
+ _context15.next = 12;
15403
15506
  return fetchData$3({
15404
15507
  body: JSON.stringify(body)
15405
15508
  }, __readDocumentUrl__);
15406
15509
 
15407
15510
  case 12:
15408
- data = _context13.sent;
15511
+ data = _context15.sent;
15409
15512
  returnData = [];
15410
15513
 
15411
15514
  if (!Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
15412
- _context13.next = 20;
15515
+ _context15.next = 20;
15413
15516
  break;
15414
15517
  }
15415
15518
 
@@ -15417,7 +15520,7 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
15417
15520
  promArr = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (hospInfo) {
15418
15521
  return getLocationInfo(hospInfo, cityMap);
15419
15522
  });
15420
- _context13.next = 19;
15523
+ _context15.next = 19;
15421
15524
  return es6Promise.Promise.all(promArr);
15422
15525
 
15423
15526
  case 19:
@@ -15426,9 +15529,9 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
15426
15529
 
15427
15530
  var city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address4 = hospInfo.address) === null || _hospInfo$address4 === void 0 ? void 0 : (_hospInfo$address4$ = _hospInfo$address4[0]) === null || _hospInfo$address4$ === void 0 ? void 0 : (_hospInfo$address4$$c = _hospInfo$address4$.city) === null || _hospInfo$address4$$c === void 0 ? void 0 : _hospInfo$address4$$c.geogLevelName;
15428
15531
 
15429
- var _ref26 = cityMap[city] || {},
15430
- lat = _ref26.lat,
15431
- _long2 = _ref26["long"];
15532
+ var _ref30 = cityMap[city] || {},
15533
+ lat = _ref30.lat,
15534
+ _long2 = _ref30["long"];
15432
15535
 
15433
15536
  var distance = "";
15434
15537
 
@@ -15446,23 +15549,23 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
15446
15549
  });
15447
15550
 
15448
15551
  case 20:
15449
- return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
15552
+ return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
15450
15553
  data: returnData
15451
15554
  }));
15452
15555
 
15453
15556
  case 23:
15454
- _context13.prev = 23;
15455
- _context13.t0 = _context13["catch"](2);
15456
- return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15457
- message: _context13.t0.message
15557
+ _context15.prev = 23;
15558
+ _context15.t0 = _context15["catch"](2);
15559
+ return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15560
+ message: _context15.t0.message
15458
15561
  })));
15459
15562
 
15460
15563
  case 26:
15461
15564
  case "end":
15462
- return _context13.stop();
15565
+ return _context15.stop();
15463
15566
  }
15464
15567
  }
15465
- }, _callee13, null, [[2, 23]]);
15568
+ }, _callee15, null, [[2, 23]]);
15466
15569
  })));
15467
15570
  var searhcApiSlice = createSlice({
15468
15571
  name: "searhcApiSlice",
@@ -15476,7 +15579,9 @@ var searhcApiSlice = createSlice({
15476
15579
  masterSearch: _objectSpread2({}, defaultState.Info),
15477
15580
  getRelationships: _objectSpread2({}, defaultState.Info),
15478
15581
  getSpecialityAgainstPractitioner: _objectSpread2({}, defaultState.Info),
15479
- getPractitionerAgainstOrganization: _objectSpread2({}, defaultState.Info)
15582
+ getPractitionerAgainstOrganization: _objectSpread2({}, defaultState.Info),
15583
+ getEncounterType: _objectSpread2({}, defaultState.Info),
15584
+ getEncounterClass: _objectSpread2({}, defaultState.Info)
15480
15585
  },
15481
15586
  extraReducers: (_extraReducers$y = {}, _defineProperty(_extraReducers$y, GET_CITIES.fulfilled, function (state, action) {
15482
15587
  var _action$payload;
@@ -15598,6 +15703,26 @@ var searhcApiSlice = createSlice({
15598
15703
  var _action$payload24;
15599
15704
 
15600
15705
  state.getPractitionerAgainstOrganization = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : [];
15706
+ }), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_TYPE.fulfilled, function (state, action) {
15707
+ var _action$payload25;
15708
+
15709
+ state.getEncounterType = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : [];
15710
+ }), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_TYPE.pending, function (state, action) {
15711
+ state.getEncounterType.loading = true;
15712
+ }), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_TYPE.rejected, function (state, action) {
15713
+ var _action$payload26;
15714
+
15715
+ state.getEncounterType = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : [];
15716
+ }), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_CLASS.fulfilled, function (state, action) {
15717
+ var _action$payload27;
15718
+
15719
+ state.getEncounterClass = (_action$payload27 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload27 !== void 0 ? _action$payload27 : [];
15720
+ }), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_CLASS.pending, function (state, action) {
15721
+ state.getEncounterClass.loading = true;
15722
+ }), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_CLASS.rejected, function (state, action) {
15723
+ var _action$payload28;
15724
+
15725
+ state.getEncounterClass = (_action$payload28 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload28 !== void 0 ? _action$payload28 : [];
15601
15726
  }), _extraReducers$y)
15602
15727
  });
15603
15728
  var searchApiActions = {
@@ -15612,7 +15737,9 @@ var searchApiActions = {
15612
15737
  GET_RELATIONSHIPS: GET_RELATIONSHIPS,
15613
15738
  SPECIALITY_AGAINST_PRACTITIONER: SPECIALITY_AGAINST_PRACTITIONER,
15614
15739
  PRACTITIONER_AGAINST_ORGANIZATION: PRACTITIONER_AGAINST_ORGANIZATION,
15615
- GET_ALL_SPECIALITY_2: GET_ALL_SPECIALITY_2
15740
+ GET_ALL_SPECIALITY_2: GET_ALL_SPECIALITY_2,
15741
+ GET_ENCOUNTER_MASTER_TYPE: GET_ENCOUNTER_MASTER_TYPE,
15742
+ GET_ENCOUNTER_MASTER_CLASS: GET_ENCOUNTER_MASTER_CLASS
15616
15743
  };
15617
15744
  var searhcApiSlice$1 = searhcApiSlice.reducer;
15618
15745
 
@@ -25287,6 +25414,7 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
25287
25414
  defaultValue,
25288
25415
  months,
25289
25416
  orgid,
25417
+ stateValues,
25290
25418
  stateDatakey,
25291
25419
  orgData,
25292
25420
  component,
@@ -25301,8 +25429,9 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
25301
25429
  payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
25302
25430
  _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
25303
25431
  _context4.prev = 2;
25304
- defaultValue = payload.defaultValue, months = payload.months, orgid = payload.orgid; // let stateValues = Object.keys(payload.dynamicValue);
25432
+ defaultValue = payload.defaultValue, months = payload.months, orgid = payload.orgid; //let stateValues = Object.keys(payload.dynamicValue);
25305
25433
 
25434
+ stateValues = [];
25306
25435
  stateDatakey = []; // stateValues.filter((val, i) => {
25307
25436
  // if (i % 2 === 0) {
25308
25437
  // stateDatakey.push(val);
@@ -25312,18 +25441,18 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
25312
25441
  stateDatakey = Object.keys(payload.dynamicValue).filter(function (e) {
25313
25442
  return /^[A-Z0-9]+$/.exec(e);
25314
25443
  });
25315
- stateValues.filter(function (val, i) {
25444
+ stateValues === null || stateValues === void 0 ? void 0 : stateValues.filter(function (val, i) {
25316
25445
  // if (i % 2 === 0) {
25317
25446
  if (!(val.endsWith("uom") || val.endsWith("error") || val.endsWith("normalorabnormal"))) {
25318
25447
  stateDatakey.push(val);
25319
25448
  }
25320
25449
  });
25321
- _context4.next = 9;
25450
+ _context4.next = 10;
25322
25451
  return fetchData$3({
25323
25452
  body: vitalsQueries.getOrganizationId(payload.orgid)
25324
25453
  }, __readDocumentUrl__);
25325
25454
 
25326
- case 9:
25455
+ case 10:
25327
25456
  orgData = _context4.sent;
25328
25457
  component = [];
25329
25458
  stateDatakey.map(function (val) {
@@ -25346,22 +25475,20 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
25346
25475
  encounterid: payload.encounterid,
25347
25476
  component: component
25348
25477
  };
25349
- _context4.next = 15;
25478
+ _context4.next = 16;
25350
25479
  return fetchData$3({
25351
25480
  body: JSON.stringify(vitalsQueries.savedPayload(payloadData, payload.editId))
25352
25481
  }, __uspsertUrl__);
25353
25482
 
25354
- case 15:
25483
+ case 16:
25355
25484
  saveddata = _context4.sent;
25356
25485
  return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
25357
25486
  data: saveddata
25358
25487
  }));
25359
25488
 
25360
- case 19:
25361
- _context4.prev = 19;
25489
+ case 20:
25490
+ _context4.prev = 20;
25362
25491
  _context4.t0 = _context4["catch"](2);
25363
- // ;
25364
- alert(_context4.t0.message);
25365
25492
  return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
25366
25493
  message: _context4.t0.message
25367
25494
  })));
@@ -25371,7 +25498,7 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
25371
25498
  return _context4.stop();
25372
25499
  }
25373
25500
  }
25374
- }, _callee4, null, [[2, 19]]);
25501
+ }, _callee4, null, [[2, 20]]);
25375
25502
  })));
25376
25503
  var GET_VITALS_BASED_ENCOUNTER = createAsyncThunk("VitalsApiSlice/vitalsBasedEncounter", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
25377
25504
  var payload,
@@ -30709,7 +30836,7 @@ var queries$5 = {
30709
30836
  // }`,
30710
30837
  Priority: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodingMaster\",\n \"filter\": \"CodingMaster.Type == 'PRIORITY' && CodingMaster.status == true && CodingMaster.activestatus == true\",\n \"return_fields\": \"KEEP(CodingMaster,'_id','id','_key','code','display','Type','status','shortdesc','longdesc','activestatus')\",\n \"sort\": \"CodingMaster.display\"\n }"),
30711
30838
  DrugCategory: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugCategory\",\n \"return_fields\": \"DrugCategory\"\n }"),
30712
- OrderNature: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ORDERNATURE'&& CodeableConceptMaster.status==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
30839
+ OrderNature: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ORDERNATURE'&& CodeableConceptMaster.status==true && CodeableConceptMaster.activestatus == true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
30713
30840
  OrderMode: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ORDERMODE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
30714
30841
  DrugStoreDispLoc: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugStoreDispLoc\",\n \"return_fields\": \"DrugStoreDispLoc\"\n }"),
30715
30842
  DiagnosisAgainstEncounter: function DiagnosisAgainstEncounter(encounterId) {
@@ -42155,7 +42282,7 @@ var queryObj = {
42155
42282
  db_name: dbName,
42156
42283
  entity: "SMGeographicMaster",
42157
42284
  sort: "SMGeographicMaster.geogLevelName",
42158
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='city' && SMGeographicMaster.activestatus == true",
42285
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='city' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true",
42159
42286
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode,geogLevelCode:SMGeographicMaster.geogLevelCode}"
42160
42287
  };
42161
42288
  },
@@ -42164,7 +42291,7 @@ var queryObj = {
42164
42291
  db_name: dbName,
42165
42292
  entity: "SMGeographicMaster",
42166
42293
  sort: "SMGeographicMaster.geogLevelName",
42167
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='district' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true"),
42294
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='district' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true"),
42168
42295
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
42169
42296
  };
42170
42297
  },
@@ -42173,7 +42300,7 @@ var queryObj = {
42173
42300
  db_name: dbName,
42174
42301
  entity: "SMGeographicMaster",
42175
42302
  sort: "SMGeographicMaster.geogLevelName",
42176
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='state' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true"),
42303
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='state' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true"),
42177
42304
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
42178
42305
  };
42179
42306
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.69",
3
+ "version": "1.1.73",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",