primarycare-binder 1.1.71 → 1.1.74

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 +338 -141
  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
 
@@ -18417,10 +18544,68 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
18417
18544
  }
18418
18545
  }, _callee12, null, [[2, 13]]);
18419
18546
  })));
18420
- var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
18547
+ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterHeader", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
18421
18548
  var payload,
18422
18549
  _ref26,
18423
18550
  rejectWithValue,
18551
+ _payload$patientId3,
18552
+ patientId,
18553
+ encounterId,
18554
+ body,
18555
+ data,
18556
+ returnData,
18557
+ _args13 = arguments;
18558
+
18559
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
18560
+ while (1) {
18561
+ switch (_context13.prev = _context13.next) {
18562
+ case 0:
18563
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
18564
+ _ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
18565
+ _context13.prev = 2;
18566
+ _payload$patientId3 = payload.patientId, patientId = _payload$patientId3 === void 0 ? "" : _payload$patientId3, encounterId = payload.encounterId;
18567
+ body = {
18568
+ db_name: dbName,
18569
+ entity: "Encounter",
18570
+ filter: "Encounter.patient_id == ".concat(patientId, " && Encounter.id==").concat(encounterId, " && Encounter.activestatus == true"),
18571
+ return_fields: "merge({id:Encounter.id},{_id:Encounter._id},{_key:Encounter._key},{encounterdate:Encounter.encounterdate},{encounter_no:Encounter.encounter_no},{type:document(Encounter.type)[*].display},{visit_type:Encounter.visit_type},{location:(for doc in Encounter.location for loc in LocationMaster filter loc._id == doc.location_id return document(document(loc.locationType).coding))},{Practitioner_id:(for part in Encounter.participant for practId in Practitioner filter practId.id == part.Practitioner_id return {name:(for doc in HumanNameMaster filter doc._id in practId.name return merge(doc,{use:(document(document(doc.use).coding)),prefix:(document(document(doc.prefix).coding)),suffix:(document(document(doc.suffix).coding))}))} )},{PractitionerRole_id:(for part in Encounter.participant for practRole in PractitionerRole filter practRole.id == part.PractitionerRole_id return document(document(practRole.role).coding) )})",
18572
+ sort: "Encounter.encounterdate desc"
18573
+ };
18574
+ _context13.next = 7;
18575
+ return fetchData$3({
18576
+ body: JSON.stringify(body)
18577
+ }, __readDocumentUrl__);
18578
+
18579
+ case 7:
18580
+ data = _context13.sent;
18581
+ returnData = [];
18582
+
18583
+ if (Array.isArray(data.result)) {
18584
+ returnData = data.result;
18585
+ }
18586
+
18587
+ return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18588
+ data: returnData
18589
+ }));
18590
+
18591
+ case 13:
18592
+ _context13.prev = 13;
18593
+ _context13.t0 = _context13["catch"](2);
18594
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18595
+ message: _context13.t0.message
18596
+ })));
18597
+
18598
+ case 16:
18599
+ case "end":
18600
+ return _context13.stop();
18601
+ }
18602
+ }
18603
+ }, _callee13, null, [[2, 13]]);
18604
+ })));
18605
+ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
18606
+ var payload,
18607
+ _ref28,
18608
+ rejectWithValue,
18424
18609
  _payload$patientid,
18425
18610
  patientid,
18426
18611
  _payload$reffId,
@@ -18459,15 +18644,15 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
18459
18644
  _returnData15,
18460
18645
  _returnData15$,
18461
18646
  info,
18462
- _args13 = arguments;
18647
+ _args14 = arguments;
18463
18648
 
18464
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
18649
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
18465
18650
  while (1) {
18466
- switch (_context13.prev = _context13.next) {
18651
+ switch (_context14.prev = _context14.next) {
18467
18652
  case 0:
18468
- payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
18469
- _ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
18470
- _context13.prev = 2;
18653
+ payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
18654
+ _ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
18655
+ _context14.prev = 2;
18471
18656
  _payload$patientid = payload.patientid, patientid = _payload$patientid === void 0 ? "" : _payload$patientid, _payload$reffId = payload.reffId, reffId = _payload$reffId === void 0 ? "" : _payload$reffId;
18472
18657
  body = {
18473
18658
  db_name: dbName,
@@ -18475,13 +18660,13 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
18475
18660
  filter: queries$b["codablemasterGetReferral"].query(patientid, reffId),
18476
18661
  return_fields: queries$b["codablemasterGetReferral"].returnFields
18477
18662
  };
18478
- _context13.next = 7;
18663
+ _context14.next = 7;
18479
18664
  return fetchData$3({
18480
18665
  body: JSON.stringify(body)
18481
18666
  }, __readDocumentUrl__);
18482
18667
 
18483
18668
  case 7:
18484
- data = _context13.sent;
18669
+ data = _context14.sent;
18485
18670
  returnData = [];
18486
18671
 
18487
18672
  if (Array.isArray(data.result)) {
@@ -18514,42 +18699,42 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
18514
18699
  returnData[0] = _objectSpread2(_objectSpread2({}, returnData[0]), info);
18515
18700
  }
18516
18701
 
18517
- return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18702
+ return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18518
18703
  data: returnData
18519
18704
  }));
18520
18705
 
18521
18706
  case 13:
18522
- _context13.prev = 13;
18523
- _context13.t0 = _context13["catch"](2);
18524
- return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18525
- message: _context13.t0.message
18707
+ _context14.prev = 13;
18708
+ _context14.t0 = _context14["catch"](2);
18709
+ return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18710
+ message: _context14.t0.message
18526
18711
  })));
18527
18712
 
18528
18713
  case 16:
18529
18714
  case "end":
18530
- return _context13.stop();
18715
+ return _context14.stop();
18531
18716
  }
18532
18717
  }
18533
- }, _callee13, null, [[2, 13]]);
18718
+ }, _callee14, null, [[2, 13]]);
18534
18719
  })));
18535
- var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
18720
+ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
18536
18721
  var payload,
18537
- _ref28,
18722
+ _ref30,
18538
18723
  rejectWithValue,
18539
18724
  _payload$appointmentI,
18540
18725
  appointmentId,
18541
18726
  body,
18542
18727
  data,
18543
18728
  returnData,
18544
- _args14 = arguments;
18729
+ _args15 = arguments;
18545
18730
 
18546
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
18731
+ return regeneratorRuntime.wrap(function _callee15$(_context15) {
18547
18732
  while (1) {
18548
- switch (_context14.prev = _context14.next) {
18733
+ switch (_context15.prev = _context15.next) {
18549
18734
  case 0:
18550
- payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
18551
- _ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
18552
- _context14.prev = 2;
18735
+ payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
18736
+ _ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
18737
+ _context15.prev = 2;
18553
18738
  _payload$appointmentI = payload.appointmentId, appointmentId = _payload$appointmentI === void 0 ? "" : _payload$appointmentI;
18554
18739
  body = {
18555
18740
  db_name: dbName,
@@ -18557,55 +18742,55 @@ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSl
18557
18742
  filter: queries$b["codablemasterGetAppointment"].query(appointmentId),
18558
18743
  return_fields: queries$b["codablemasterGetAppointment"].returnFields
18559
18744
  };
18560
- _context14.next = 7;
18745
+ _context15.next = 7;
18561
18746
  return fetchData$3({
18562
18747
  body: JSON.stringify(body)
18563
18748
  }, __readDocumentUrl__);
18564
18749
 
18565
18750
  case 7:
18566
- data = _context14.sent;
18751
+ data = _context15.sent;
18567
18752
  returnData = [];
18568
18753
 
18569
18754
  if (Array.isArray(data.result)) {
18570
18755
  returnData = data.result;
18571
18756
  }
18572
18757
 
18573
- return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18758
+ return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18574
18759
  data: returnData
18575
18760
  }));
18576
18761
 
18577
18762
  case 13:
18578
- _context14.prev = 13;
18579
- _context14.t0 = _context14["catch"](2);
18580
- return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18581
- message: _context14.t0.message
18763
+ _context15.prev = 13;
18764
+ _context15.t0 = _context15["catch"](2);
18765
+ return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18766
+ message: _context15.t0.message
18582
18767
  })));
18583
18768
 
18584
18769
  case 16:
18585
18770
  case "end":
18586
- return _context14.stop();
18771
+ return _context15.stop();
18587
18772
  }
18588
18773
  }
18589
- }, _callee14, null, [[2, 13]]);
18774
+ }, _callee15, null, [[2, 13]]);
18590
18775
  })));
18591
- var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
18776
+ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
18592
18777
  var payload,
18593
- _ref30,
18778
+ _ref32,
18594
18779
  rejectWithValue,
18595
18780
  _payload$patientName,
18596
18781
  patientName,
18597
18782
  body,
18598
18783
  data,
18599
18784
  returnData,
18600
- _args15 = arguments;
18785
+ _args16 = arguments;
18601
18786
 
18602
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
18787
+ return regeneratorRuntime.wrap(function _callee16$(_context16) {
18603
18788
  while (1) {
18604
- switch (_context15.prev = _context15.next) {
18789
+ switch (_context16.prev = _context16.next) {
18605
18790
  case 0:
18606
- payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
18607
- _ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
18608
- _context15.prev = 2;
18791
+ payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
18792
+ _ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
18793
+ _context16.prev = 2;
18609
18794
  _payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
18610
18795
  body = {
18611
18796
  db_name: dbName,
@@ -18613,40 +18798,40 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
18613
18798
  filter: queries$b["codablemasterGetPatientname"].query(patientName),
18614
18799
  return_fields: queries$b["codablemasterGetPatientname"].returnFields
18615
18800
  };
18616
- _context15.next = 7;
18801
+ _context16.next = 7;
18617
18802
  return fetchData$3({
18618
18803
  body: JSON.stringify(body)
18619
18804
  }, __readDocumentUrl__);
18620
18805
 
18621
18806
  case 7:
18622
- data = _context15.sent;
18807
+ data = _context16.sent;
18623
18808
  returnData = [];
18624
18809
 
18625
18810
  if (Array.isArray(data.result)) {
18626
18811
  returnData = data.result;
18627
18812
  }
18628
18813
 
18629
- return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18814
+ return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18630
18815
  data: returnData
18631
18816
  }));
18632
18817
 
18633
18818
  case 13:
18634
- _context15.prev = 13;
18635
- _context15.t0 = _context15["catch"](2);
18636
- return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18637
- message: _context15.t0.message
18819
+ _context16.prev = 13;
18820
+ _context16.t0 = _context16["catch"](2);
18821
+ return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18822
+ message: _context16.t0.message
18638
18823
  })));
18639
18824
 
18640
18825
  case 16:
18641
18826
  case "end":
18642
- return _context15.stop();
18827
+ return _context16.stop();
18643
18828
  }
18644
18829
  }
18645
- }, _callee15, null, [[2, 13]]);
18830
+ }, _callee16, null, [[2, 13]]);
18646
18831
  })));
18647
- var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
18832
+ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
18648
18833
  var payload,
18649
- _ref32,
18834
+ _ref34,
18650
18835
  rejectWithValue,
18651
18836
  _payload$idnumber,
18652
18837
  idnumber,
@@ -18654,45 +18839,45 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
18654
18839
  idsourcecode,
18655
18840
  body,
18656
18841
  data,
18657
- _args16 = arguments;
18842
+ _args17 = arguments;
18658
18843
 
18659
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
18844
+ return regeneratorRuntime.wrap(function _callee17$(_context17) {
18660
18845
  while (1) {
18661
- switch (_context16.prev = _context16.next) {
18846
+ switch (_context17.prev = _context17.next) {
18662
18847
  case 0:
18663
- payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
18664
- _ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
18665
- _context16.prev = 2;
18848
+ payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
18849
+ _ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
18850
+ _context17.prev = 2;
18666
18851
  _payload$idnumber = payload.idnumber, idnumber = _payload$idnumber === void 0 ? "" : _payload$idnumber, _payload$idsourcecode = payload.idsourcecode, idsourcecode = _payload$idsourcecode === void 0 ? "" : _payload$idsourcecode;
18667
18852
  body = {
18668
18853
  db_name: dbName,
18669
18854
  filter: JSON.parse("{\n \"idnumber\":\"".concat(idnumber, "\",\"idsourcecode\":\"").concat(idsourcecode, "\"\n }")),
18670
18855
  queryid: "8ffac13e-b147-4568-a13e-ecf9c07c0d92"
18671
18856
  };
18672
- _context16.next = 7;
18857
+ _context17.next = 7;
18673
18858
  return fetchData$3({
18674
18859
  body: JSON.stringify(body)
18675
18860
  }, __baseUrl__);
18676
18861
 
18677
18862
  case 7:
18678
- data = _context16.sent;
18679
- return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18863
+ data = _context17.sent;
18864
+ return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18680
18865
  data: data
18681
18866
  }));
18682
18867
 
18683
18868
  case 11:
18684
- _context16.prev = 11;
18685
- _context16.t0 = _context16["catch"](2);
18686
- return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18687
- message: _context16.t0.message
18869
+ _context17.prev = 11;
18870
+ _context17.t0 = _context17["catch"](2);
18871
+ return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18872
+ message: _context17.t0.message
18688
18873
  })));
18689
18874
 
18690
18875
  case 14:
18691
18876
  case "end":
18692
- return _context16.stop();
18877
+ return _context17.stop();
18693
18878
  }
18694
18879
  }
18695
- }, _callee16, null, [[2, 11]]);
18880
+ }, _callee17, null, [[2, 11]]);
18696
18881
  })));
18697
18882
  var OrganizationRegisterPatientApiSlice = createSlice({
18698
18883
  name: "OrganizationRegisterPatientApiSlice",
@@ -18712,7 +18897,8 @@ var OrganizationRegisterPatientApiSlice = createSlice({
18712
18897
  getreferral: _objectSpread2({}, defaultState.Info),
18713
18898
  getappointment: _objectSpread2({}, defaultState.Info),
18714
18899
  getpatientname: _objectSpread2({}, defaultState.Info),
18715
- getpatientid: _objectSpread2({}, defaultState.Info)
18900
+ getpatientid: _objectSpread2({}, defaultState.Info),
18901
+ getEncounterHeader: _objectSpread2({}, defaultState.Info)
18716
18902
  },
18717
18903
  extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q, GET_PATIENT_NAME.fulfilled, function (state, action) {
18718
18904
  var _action$payload;
@@ -18874,6 +19060,16 @@ var OrganizationRegisterPatientApiSlice = createSlice({
18874
19060
  var _action$payload32;
18875
19061
 
18876
19062
  state.getpatientid = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
19063
+ }), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.fulfilled, function (state, action) {
19064
+ var _action$payload33;
19065
+
19066
+ state.getEncounterHeader = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
19067
+ }), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.pending, function (state, action) {
19068
+ state.getEncounterHeader.loading = true;
19069
+ }), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.rejected, function (state, action) {
19070
+ var _action$payload34;
19071
+
19072
+ state.getEncounterHeader = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
18877
19073
  }), _extraReducers$q)
18878
19074
  });
18879
19075
  var oraganizationRegisterPatientActions = {
@@ -18892,7 +19088,8 @@ var oraganizationRegisterPatientActions = {
18892
19088
  GET_PATIENT_APPOINTMENT: GET_PATIENT_APPOINTMENT,
18893
19089
  GET_PATIENT_NAME: GET_PATIENT_NAME,
18894
19090
  GET_PATIENT_TYPEID: GET_PATIENT_TYPEID,
18895
- GET_PRACTITIONERS: GET_PRACTITIONERS
19091
+ GET_PRACTITIONERS: GET_PRACTITIONERS,
19092
+ GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER
18896
19093
  };
18897
19094
  var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
18898
19095
 
@@ -30709,7 +30906,7 @@ var queries$5 = {
30709
30906
  // }`,
30710
30907
  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
30908
  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 }"),
30909
+ 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
30910
  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
30911
  DrugStoreDispLoc: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugStoreDispLoc\",\n \"return_fields\": \"DrugStoreDispLoc\"\n }"),
30715
30912
  DiagnosisAgainstEncounter: function DiagnosisAgainstEncounter(encounterId) {
@@ -42155,7 +42352,7 @@ var queryObj = {
42155
42352
  db_name: dbName,
42156
42353
  entity: "SMGeographicMaster",
42157
42354
  sort: "SMGeographicMaster.geogLevelName",
42158
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='city' && SMGeographicMaster.activestatus == true",
42355
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='city' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true",
42159
42356
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode,geogLevelCode:SMGeographicMaster.geogLevelCode}"
42160
42357
  };
42161
42358
  },
@@ -42164,7 +42361,7 @@ var queryObj = {
42164
42361
  db_name: dbName,
42165
42362
  entity: "SMGeographicMaster",
42166
42363
  sort: "SMGeographicMaster.geogLevelName",
42167
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='district' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true"),
42364
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='district' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true"),
42168
42365
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
42169
42366
  };
42170
42367
  },
@@ -42173,7 +42370,7 @@ var queryObj = {
42173
42370
  db_name: dbName,
42174
42371
  entity: "SMGeographicMaster",
42175
42372
  sort: "SMGeographicMaster.geogLevelName",
42176
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='state' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true"),
42373
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='state' && SMGeographicMaster._id=='".concat(val, "' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true"),
42177
42374
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode}"
42178
42375
  };
42179
42376
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.71",
3
+ "version": "1.1.74",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",