primarycare-binder 1.1.73 → 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 +139 -69
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -18544,10 +18544,68 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
18544
18544
  }
18545
18545
  }, _callee12, null, [[2, 13]]);
18546
18546
  })));
18547
- 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() {
18548
18548
  var payload,
18549
18549
  _ref26,
18550
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,
18551
18609
  _payload$patientid,
18552
18610
  patientid,
18553
18611
  _payload$reffId,
@@ -18586,15 +18644,15 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
18586
18644
  _returnData15,
18587
18645
  _returnData15$,
18588
18646
  info,
18589
- _args13 = arguments;
18647
+ _args14 = arguments;
18590
18648
 
18591
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
18649
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
18592
18650
  while (1) {
18593
- switch (_context13.prev = _context13.next) {
18651
+ switch (_context14.prev = _context14.next) {
18594
18652
  case 0:
18595
- payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
18596
- _ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
18597
- _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;
18598
18656
  _payload$patientid = payload.patientid, patientid = _payload$patientid === void 0 ? "" : _payload$patientid, _payload$reffId = payload.reffId, reffId = _payload$reffId === void 0 ? "" : _payload$reffId;
18599
18657
  body = {
18600
18658
  db_name: dbName,
@@ -18602,13 +18660,13 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
18602
18660
  filter: queries$b["codablemasterGetReferral"].query(patientid, reffId),
18603
18661
  return_fields: queries$b["codablemasterGetReferral"].returnFields
18604
18662
  };
18605
- _context13.next = 7;
18663
+ _context14.next = 7;
18606
18664
  return fetchData$3({
18607
18665
  body: JSON.stringify(body)
18608
18666
  }, __readDocumentUrl__);
18609
18667
 
18610
18668
  case 7:
18611
- data = _context13.sent;
18669
+ data = _context14.sent;
18612
18670
  returnData = [];
18613
18671
 
18614
18672
  if (Array.isArray(data.result)) {
@@ -18641,42 +18699,42 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
18641
18699
  returnData[0] = _objectSpread2(_objectSpread2({}, returnData[0]), info);
18642
18700
  }
18643
18701
 
18644
- return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18702
+ return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18645
18703
  data: returnData
18646
18704
  }));
18647
18705
 
18648
18706
  case 13:
18649
- _context13.prev = 13;
18650
- _context13.t0 = _context13["catch"](2);
18651
- return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18652
- 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
18653
18711
  })));
18654
18712
 
18655
18713
  case 16:
18656
18714
  case "end":
18657
- return _context13.stop();
18715
+ return _context14.stop();
18658
18716
  }
18659
18717
  }
18660
- }, _callee13, null, [[2, 13]]);
18718
+ }, _callee14, null, [[2, 13]]);
18661
18719
  })));
18662
- 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() {
18663
18721
  var payload,
18664
- _ref28,
18722
+ _ref30,
18665
18723
  rejectWithValue,
18666
18724
  _payload$appointmentI,
18667
18725
  appointmentId,
18668
18726
  body,
18669
18727
  data,
18670
18728
  returnData,
18671
- _args14 = arguments;
18729
+ _args15 = arguments;
18672
18730
 
18673
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
18731
+ return regeneratorRuntime.wrap(function _callee15$(_context15) {
18674
18732
  while (1) {
18675
- switch (_context14.prev = _context14.next) {
18733
+ switch (_context15.prev = _context15.next) {
18676
18734
  case 0:
18677
- payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
18678
- _ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
18679
- _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;
18680
18738
  _payload$appointmentI = payload.appointmentId, appointmentId = _payload$appointmentI === void 0 ? "" : _payload$appointmentI;
18681
18739
  body = {
18682
18740
  db_name: dbName,
@@ -18684,55 +18742,55 @@ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSl
18684
18742
  filter: queries$b["codablemasterGetAppointment"].query(appointmentId),
18685
18743
  return_fields: queries$b["codablemasterGetAppointment"].returnFields
18686
18744
  };
18687
- _context14.next = 7;
18745
+ _context15.next = 7;
18688
18746
  return fetchData$3({
18689
18747
  body: JSON.stringify(body)
18690
18748
  }, __readDocumentUrl__);
18691
18749
 
18692
18750
  case 7:
18693
- data = _context14.sent;
18751
+ data = _context15.sent;
18694
18752
  returnData = [];
18695
18753
 
18696
18754
  if (Array.isArray(data.result)) {
18697
18755
  returnData = data.result;
18698
18756
  }
18699
18757
 
18700
- return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18758
+ return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18701
18759
  data: returnData
18702
18760
  }));
18703
18761
 
18704
18762
  case 13:
18705
- _context14.prev = 13;
18706
- _context14.t0 = _context14["catch"](2);
18707
- return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18708
- 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
18709
18767
  })));
18710
18768
 
18711
18769
  case 16:
18712
18770
  case "end":
18713
- return _context14.stop();
18771
+ return _context15.stop();
18714
18772
  }
18715
18773
  }
18716
- }, _callee14, null, [[2, 13]]);
18774
+ }, _callee15, null, [[2, 13]]);
18717
18775
  })));
18718
- 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() {
18719
18777
  var payload,
18720
- _ref30,
18778
+ _ref32,
18721
18779
  rejectWithValue,
18722
18780
  _payload$patientName,
18723
18781
  patientName,
18724
18782
  body,
18725
18783
  data,
18726
18784
  returnData,
18727
- _args15 = arguments;
18785
+ _args16 = arguments;
18728
18786
 
18729
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
18787
+ return regeneratorRuntime.wrap(function _callee16$(_context16) {
18730
18788
  while (1) {
18731
- switch (_context15.prev = _context15.next) {
18789
+ switch (_context16.prev = _context16.next) {
18732
18790
  case 0:
18733
- payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
18734
- _ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
18735
- _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;
18736
18794
  _payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
18737
18795
  body = {
18738
18796
  db_name: dbName,
@@ -18740,40 +18798,40 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
18740
18798
  filter: queries$b["codablemasterGetPatientname"].query(patientName),
18741
18799
  return_fields: queries$b["codablemasterGetPatientname"].returnFields
18742
18800
  };
18743
- _context15.next = 7;
18801
+ _context16.next = 7;
18744
18802
  return fetchData$3({
18745
18803
  body: JSON.stringify(body)
18746
18804
  }, __readDocumentUrl__);
18747
18805
 
18748
18806
  case 7:
18749
- data = _context15.sent;
18807
+ data = _context16.sent;
18750
18808
  returnData = [];
18751
18809
 
18752
18810
  if (Array.isArray(data.result)) {
18753
18811
  returnData = data.result;
18754
18812
  }
18755
18813
 
18756
- return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18814
+ return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18757
18815
  data: returnData
18758
18816
  }));
18759
18817
 
18760
18818
  case 13:
18761
- _context15.prev = 13;
18762
- _context15.t0 = _context15["catch"](2);
18763
- return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18764
- 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
18765
18823
  })));
18766
18824
 
18767
18825
  case 16:
18768
18826
  case "end":
18769
- return _context15.stop();
18827
+ return _context16.stop();
18770
18828
  }
18771
18829
  }
18772
- }, _callee15, null, [[2, 13]]);
18830
+ }, _callee16, null, [[2, 13]]);
18773
18831
  })));
18774
- 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() {
18775
18833
  var payload,
18776
- _ref32,
18834
+ _ref34,
18777
18835
  rejectWithValue,
18778
18836
  _payload$idnumber,
18779
18837
  idnumber,
@@ -18781,45 +18839,45 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
18781
18839
  idsourcecode,
18782
18840
  body,
18783
18841
  data,
18784
- _args16 = arguments;
18842
+ _args17 = arguments;
18785
18843
 
18786
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
18844
+ return regeneratorRuntime.wrap(function _callee17$(_context17) {
18787
18845
  while (1) {
18788
- switch (_context16.prev = _context16.next) {
18846
+ switch (_context17.prev = _context17.next) {
18789
18847
  case 0:
18790
- payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
18791
- _ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
18792
- _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;
18793
18851
  _payload$idnumber = payload.idnumber, idnumber = _payload$idnumber === void 0 ? "" : _payload$idnumber, _payload$idsourcecode = payload.idsourcecode, idsourcecode = _payload$idsourcecode === void 0 ? "" : _payload$idsourcecode;
18794
18852
  body = {
18795
18853
  db_name: dbName,
18796
18854
  filter: JSON.parse("{\n \"idnumber\":\"".concat(idnumber, "\",\"idsourcecode\":\"").concat(idsourcecode, "\"\n }")),
18797
18855
  queryid: "8ffac13e-b147-4568-a13e-ecf9c07c0d92"
18798
18856
  };
18799
- _context16.next = 7;
18857
+ _context17.next = 7;
18800
18858
  return fetchData$3({
18801
18859
  body: JSON.stringify(body)
18802
18860
  }, __baseUrl__);
18803
18861
 
18804
18862
  case 7:
18805
- data = _context16.sent;
18806
- return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18863
+ data = _context17.sent;
18864
+ return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18807
18865
  data: data
18808
18866
  }));
18809
18867
 
18810
18868
  case 11:
18811
- _context16.prev = 11;
18812
- _context16.t0 = _context16["catch"](2);
18813
- return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18814
- 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
18815
18873
  })));
18816
18874
 
18817
18875
  case 14:
18818
18876
  case "end":
18819
- return _context16.stop();
18877
+ return _context17.stop();
18820
18878
  }
18821
18879
  }
18822
- }, _callee16, null, [[2, 11]]);
18880
+ }, _callee17, null, [[2, 11]]);
18823
18881
  })));
18824
18882
  var OrganizationRegisterPatientApiSlice = createSlice({
18825
18883
  name: "OrganizationRegisterPatientApiSlice",
@@ -18839,7 +18897,8 @@ var OrganizationRegisterPatientApiSlice = createSlice({
18839
18897
  getreferral: _objectSpread2({}, defaultState.Info),
18840
18898
  getappointment: _objectSpread2({}, defaultState.Info),
18841
18899
  getpatientname: _objectSpread2({}, defaultState.Info),
18842
- getpatientid: _objectSpread2({}, defaultState.Info)
18900
+ getpatientid: _objectSpread2({}, defaultState.Info),
18901
+ getEncounterHeader: _objectSpread2({}, defaultState.Info)
18843
18902
  },
18844
18903
  extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q, GET_PATIENT_NAME.fulfilled, function (state, action) {
18845
18904
  var _action$payload;
@@ -19001,6 +19060,16 @@ var OrganizationRegisterPatientApiSlice = createSlice({
19001
19060
  var _action$payload32;
19002
19061
 
19003
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 : {};
19004
19073
  }), _extraReducers$q)
19005
19074
  });
19006
19075
  var oraganizationRegisterPatientActions = {
@@ -19019,7 +19088,8 @@ var oraganizationRegisterPatientActions = {
19019
19088
  GET_PATIENT_APPOINTMENT: GET_PATIENT_APPOINTMENT,
19020
19089
  GET_PATIENT_NAME: GET_PATIENT_NAME,
19021
19090
  GET_PATIENT_TYPEID: GET_PATIENT_TYPEID,
19022
- GET_PRACTITIONERS: GET_PRACTITIONERS
19091
+ GET_PRACTITIONERS: GET_PRACTITIONERS,
19092
+ GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER
19023
19093
  };
19024
19094
  var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
19025
19095
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.73",
3
+ "version": "1.1.74",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",