primarycare-binder 1.1.93 → 1.1.96

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 +149 -7
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -9695,6 +9695,117 @@ var GET_COUNTRY_CODE_LIST = createAsyncThunk("authSlice/country_code_list", /*#_
9695
9695
  }
9696
9696
  }, _callee16, null, [[2, 12]]);
9697
9697
  })));
9698
+ var GET_FACILITY_BY_USERID = createAsyncThunk("authSlice/getFacilityByUserid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
9699
+ var payload,
9700
+ _ref29,
9701
+ rejectWithValue,
9702
+ _data$result$0$OrgID$,
9703
+ _data$result,
9704
+ _data$result$,
9705
+ _data$result$$OrgID,
9706
+ _payload$username3,
9707
+ username,
9708
+ queries,
9709
+ data,
9710
+ dat,
9711
+ _args17 = arguments;
9712
+
9713
+ return regeneratorRuntime.wrap(function _callee17$(_context17) {
9714
+ while (1) {
9715
+ switch (_context17.prev = _context17.next) {
9716
+ case 0:
9717
+ payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
9718
+ _ref29 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
9719
+ _context17.prev = 2;
9720
+ _payload$username3 = payload.username, username = _payload$username3 === void 0 ? "" : _payload$username3;
9721
+ queries = {
9722
+ "db_name": dbName,
9723
+ "entity": "Person",
9724
+ "filter": "document(document(Person.telecom)[*].system)[*].code == to_Array('email') && document(Person.telecom)[*].value==to_array('".concat(username, "') && Person.activestatus==true"),
9725
+ "return_fields": "keep(Person,'_id','_key','OrgID','Id')"
9726
+ };
9727
+ _context17.next = 7;
9728
+ return fetchData$3({
9729
+ body: JSON.stringify(queries)
9730
+ }, __readDocumentUrl__);
9731
+
9732
+ case 7:
9733
+ data = _context17.sent;
9734
+ dat = (_data$result$0$OrgID$ = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$ = _data$result[0]) === null || _data$result$ === void 0 ? void 0 : (_data$result$$OrgID = _data$result$.OrgID) === null || _data$result$$OrgID === void 0 ? void 0 : _data$result$$OrgID[0]) !== null && _data$result$0$OrgID$ !== void 0 ? _data$result$0$OrgID$ : "";
9735
+ debugger;
9736
+ return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
9737
+ data: dat
9738
+ }));
9739
+
9740
+ case 13:
9741
+ _context17.prev = 13;
9742
+ _context17.t0 = _context17["catch"](2);
9743
+ return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
9744
+ message: _context17.t0.message
9745
+ })));
9746
+
9747
+ case 16:
9748
+ case "end":
9749
+ return _context17.stop();
9750
+ }
9751
+ }
9752
+ }, _callee17, null, [[2, 13]]);
9753
+ })));
9754
+ var GET_IS_NURSE_TRIAGE_REQUIRED_BY_FACILITY = createAsyncThunk("authSlice/getIsNurseTriageRequiredByFacility", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
9755
+ var payload,
9756
+ _ref31,
9757
+ rejectWithValue,
9758
+ _data$result2,
9759
+ _data$result2$,
9760
+ _payload$facilityId,
9761
+ facilityId,
9762
+ queries,
9763
+ data,
9764
+ res,
9765
+ _args18 = arguments;
9766
+
9767
+ return regeneratorRuntime.wrap(function _callee18$(_context18) {
9768
+ while (1) {
9769
+ switch (_context18.prev = _context18.next) {
9770
+ case 0:
9771
+ payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
9772
+ _ref31 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref31.rejectWithValue;
9773
+ _context18.prev = 2;
9774
+ _payload$facilityId = payload.facilityId, facilityId = _payload$facilityId === void 0 ? "" : _payload$facilityId;
9775
+ debugger;
9776
+ queries = {
9777
+ "db_name": dbName,
9778
+ "entity": "EntityParametersSetup",
9779
+ "filter": "EntityParametersSetup.entityid=='".concat(facilityId, "' && document(EntityParametersSetup.parameterid).code=='ISNURSETRIAGEREQD'"),
9780
+ "return_fields": "EntityParametersSetup"
9781
+ };
9782
+ _context18.next = 8;
9783
+ return fetchData$3({
9784
+ body: JSON.stringify(queries)
9785
+ }, __readDocumentUrl__);
9786
+
9787
+ case 8:
9788
+ data = _context18.sent;
9789
+ res = (data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : (_data$result2$ = _data$result2[0]) === null || _data$result2$ === void 0 ? void 0 : _data$result2$.parametervalue) === "N" ? false : true;
9790
+ debugger;
9791
+ return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
9792
+ data: res
9793
+ }));
9794
+
9795
+ case 14:
9796
+ _context18.prev = 14;
9797
+ _context18.t0 = _context18["catch"](2);
9798
+ return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
9799
+ message: _context18.t0.message
9800
+ })));
9801
+
9802
+ case 17:
9803
+ case "end":
9804
+ return _context18.stop();
9805
+ }
9806
+ }
9807
+ }, _callee18, null, [[2, 14]]);
9808
+ })));
9698
9809
  var authSlice = createSlice({
9699
9810
  name: "authSlice",
9700
9811
  initialState: {
@@ -9714,7 +9825,9 @@ var authSlice = createSlice({
9714
9825
  changePassword: _objectSpread2({}, defaultState.Info),
9715
9826
  tokenValidate: _objectSpread2({}, defaultState.Info),
9716
9827
  refreshToken: _objectSpread2({}, defaultState.Info),
9717
- country_code_list: _objectSpread2({}, defaultState.Info)
9828
+ country_code_list: _objectSpread2({}, defaultState.Info),
9829
+ getFacilityByUserid: _objectSpread2({}, defaultState.Info),
9830
+ getIsNurseTriageRequiredByFacility: _objectSpread2({}, defaultState.Info)
9718
9831
  },
9719
9832
  extraReducers: (_extraReducers$G = {}, _defineProperty(_extraReducers$G, REGISTER_USERS.fulfilled, function (state, action) {
9720
9833
  var _action$payload;
@@ -9866,6 +9979,26 @@ var authSlice = createSlice({
9866
9979
  var _action$payload30;
9867
9980
 
9868
9981
  state.country_code_list = (_action$payload30 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload30 !== void 0 ? _action$payload30 : {};
9982
+ }), _defineProperty(_extraReducers$G, GET_FACILITY_BY_USERID.fulfilled, function (state, action) {
9983
+ var _action$payload31;
9984
+
9985
+ state.getFacilityByUserid = (_action$payload31 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload31 !== void 0 ? _action$payload31 : {};
9986
+ }), _defineProperty(_extraReducers$G, GET_FACILITY_BY_USERID.pending, function (state, action) {
9987
+ state.getFacilityByUserid.loading = true;
9988
+ }), _defineProperty(_extraReducers$G, GET_FACILITY_BY_USERID.rejected, function (state, action) {
9989
+ var _action$payload32;
9990
+
9991
+ state.getFacilityByUserid = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
9992
+ }), _defineProperty(_extraReducers$G, GET_IS_NURSE_TRIAGE_REQUIRED_BY_FACILITY.fulfilled, function (state, action) {
9993
+ var _action$payload33;
9994
+
9995
+ state.getIsNurseTriageRequiredByFacility = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
9996
+ }), _defineProperty(_extraReducers$G, GET_IS_NURSE_TRIAGE_REQUIRED_BY_FACILITY.pending, function (state, action) {
9997
+ state.getIsNurseTriageRequiredByFacility.loading = true;
9998
+ }), _defineProperty(_extraReducers$G, GET_IS_NURSE_TRIAGE_REQUIRED_BY_FACILITY.rejected, function (state, action) {
9999
+ var _action$payload34;
10000
+
10001
+ state.getIsNurseTriageRequiredByFacility = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
9869
10002
  }), _extraReducers$G)
9870
10003
  });
9871
10004
  var authActions = {
@@ -9883,7 +10016,9 @@ var authActions = {
9883
10016
  CHANGE_PASSWORD: CHANGE_PASSWORD,
9884
10017
  TOKEN_VALIDATE: TOKEN_VALIDATE,
9885
10018
  REFRESH_TOKEN: REFRESH_TOKEN,
9886
- GET_COUNTRY_CODE_LIST: GET_COUNTRY_CODE_LIST
10019
+ GET_COUNTRY_CODE_LIST: GET_COUNTRY_CODE_LIST,
10020
+ GET_FACILITY_BY_USERID: GET_FACILITY_BY_USERID,
10021
+ GET_IS_NURSE_TRIAGE_REQUIRED_BY_FACILITY: GET_IS_NURSE_TRIAGE_REQUIRED_BY_FACILITY
9887
10022
  };
9888
10023
  var authSlice$1 = authSlice.reducer;
9889
10024
 
@@ -19867,7 +20002,12 @@ var dashboardQuery = {
19867
20002
  period: "",
19868
20003
  Practitioner_id: data === null || data === void 0 ? void 0 : data.Practitioner_id,
19869
20004
  PractitionerRole_id: data === null || data === void 0 ? void 0 : data.PractitionerRole_id,
19870
- RelatedPerson_id: 0,
20005
+ // RelatedPerson_id: 0,
20006
+ // schema change
20007
+ RelatedPerson_id: [{
20008
+ "relatedpersonid": "0",
20009
+ "relationship": ""
20010
+ }],
19871
20011
  specialty: data === null || data === void 0 ? void 0 : data.specialty
19872
20012
  }],
19873
20013
  participantHistory: data === null || data === void 0 ? void 0 : data.participantHistory
@@ -29654,7 +29794,8 @@ var GET_ORDERTYPE = createAsyncThunk("LabOrderApiSlice/get_ordertype", /*#__PURE
29654
29794
  data.result.map(function (val, i) {
29655
29795
  returnData.push({
29656
29796
  value: val === null || val === void 0 ? void 0 : val.Ordcatgory,
29657
- label: val === null || val === void 0 ? void 0 : val.longdesc
29797
+ label: val === null || val === void 0 ? void 0 : val.longdesc,
29798
+ _id: val === null || val === void 0 ? void 0 : val._id
29658
29799
  });
29659
29800
  });
29660
29801
  }
@@ -40117,7 +40258,7 @@ var query$4 = {
40117
40258
  Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
40118
40259
  Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
40119
40260
  },
40120
- return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
40261
+ return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)},{telecom:document(pati.telecom)}))})"
40121
40262
  };
40122
40263
  },
40123
40264
  getNewPatientsNurse: function getNewPatientsNurse(data) {
@@ -40129,7 +40270,7 @@ var query$4 = {
40129
40270
  Appointment: "Appointment.activestatus==true && Appointment.orgid=='".concat(data === null || data === void 0 ? void 0 : data.orgID, "' && Appointment.start>=").concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID)[*].id ANY IN Appointment.SpecialtyID"),
40130
40271
  Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
40131
40272
  },
40132
- return_fields: "merge(Encounter,{status:document(Encounter.status),appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:document(document(Appointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == Encounter.patient_id return merge(pati,{name:document(pati.name)}))})"
40273
+ return_fields: "merge(adqolcEncounter,{status:document(adqolcEncounter.status),appointmentId:(filter adqolcAppointment.id in adqolcEncounter.appointmentId return merge(adqolcAppointment,{PersonID:(for per in Person filter per.Id in adqolcAppointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(adqolcAppointment.resourcecode),{name:document(document(adqolcAppointment.resourcecode).name)}),SpecialtyID:(for spe in CodeableConceptMaster filter adqolcAppointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))})),patient_id:(for pati in Patient filter pati.id == adqolcEncounter.patient_id return merge(pati,{name:document(pati.name)},{telecom:document(pati.telecom)}))})"
40133
40274
  };
40134
40275
  },
40135
40276
  getOtherVisitsNurse: function getOtherVisitsNurse(data) {
@@ -40766,6 +40907,7 @@ var GET_TODAY_VISITS = createAsyncThunk("appointmentStatsApiSlice/getTodayVisits
40766
40907
  returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : _data$result6.map(function (_) {
40767
40908
  var _$Encounter29, _$Encounter29$patient, _$Encounter29$patient2, _$Encounter29$patient3, _$Encounter30, _$Encounter30$patient, _$Encounter30$patient2, _$Appointment41, _$Appointment41$Perso, _$Appointment41$Perso2, _$Appointment42, _$Appointment43, _$Appointment44, _$Appointment45, _$Encounter31, _$Encounter$status$di5, _$Encounter32, _$Encounter32$status, _$Appointment$appno5, _$Appointment46, _$Encounter$appointme5, _$Encounter33, _$Encounter33$appoint, _$Encounter34, _$Encounter34$patient, _$Encounter34$patient2, _$Encounter34$patient3, _$Encounter34$patient4, _$Appointment$PersonI8, _$Appointment47, _$Appointment47$Perso, _$Appointment47$Perso2, _$Encounter$patient_i8, _$Encounter35, _$Encounter35$patient, _$Encounter35$patient2;
40768
40909
 
40910
+ debugger;
40769
40911
  return {
40770
40912
  // img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
40771
40913
  // ? getImgUrl(_?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid)
@@ -40878,7 +41020,7 @@ var GET_APPOINTMENTS_NURSE = createAsyncThunk("appointmentStatsApiSlice/getAppoi
40878
41020
  // )
40879
41021
  // : "https://worthingtonmotorcycles.com.au/wp-content/uploads/2017/06/tlc-perth-user-icon-im2.png",
40880
41022
  name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment48 = _.Appointment) === null || _$Appointment48 === void 0 ? void 0 : (_$Appointment48$Perso = _$Appointment48.PersonID) === null || _$Appointment48$Perso === void 0 ? void 0 : (_$Appointment48$Perso2 = _$Appointment48$Perso[0]) === null || _$Appointment48$Perso2 === void 0 ? void 0 : (_$Appointment48$Perso3 = _$Appointment48$Perso2.name) === null || _$Appointment48$Perso3 === void 0 ? void 0 : _$Appointment48$Perso3[0]) || {}),
40881
- mrn: (_$Appointment49 = _.Appointment) === null || _$Appointment49 === void 0 ? void 0 : (_$Appointment49$Perso = _$Appointment49.PersonID) === null || _$Appointment49$Perso === void 0 ? void 0 : (_$Appointment49$Perso2 = _$Appointment49$Perso[0]) === null || _$Appointment49$Perso2 === void 0 ? void 0 : (_$Appointment49$Perso3 = _$Appointment49$Perso2.MRN) === null || _$Appointment49$Perso3 === void 0 ? void 0 : _$Appointment49$Perso3[0],
41023
+ mrn: ((_$Appointment49 = _.Appointment) === null || _$Appointment49 === void 0 ? void 0 : (_$Appointment49$Perso = _$Appointment49.PersonID) === null || _$Appointment49$Perso === void 0 ? void 0 : (_$Appointment49$Perso2 = _$Appointment49$Perso[0]) === null || _$Appointment49$Perso2 === void 0 ? void 0 : (_$Appointment49$Perso3 = _$Appointment49$Perso2.MRN) === null || _$Appointment49$Perso3 === void 0 ? void 0 : _$Appointment49$Perso3[0]) || "",
40882
41024
  age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment50 = _.Appointment) === null || _$Appointment50 === void 0 ? void 0 : (_$Appointment50$Perso = _$Appointment50.PersonID) === null || _$Appointment50$Perso === void 0 ? void 0 : (_$Appointment50$Perso2 = _$Appointment50$Perso[0]) === null || _$Appointment50$Perso2 === void 0 ? void 0 : _$Appointment50$Perso2.birthDay),
40883
41025
  // genderData: "M",
40884
41026
  contact: ((_$Appointment51 = _.Appointment) === null || _$Appointment51 === void 0 ? void 0 : (_$Appointment51$Perso = _$Appointment51.PersonID) === null || _$Appointment51$Perso === void 0 ? void 0 : (_$Appointment51$Perso2 = _$Appointment51$Perso[0]) === null || _$Appointment51$Perso2 === void 0 ? void 0 : (_$Appointment51$Perso3 = _$Appointment51$Perso2.telecom) === null || _$Appointment51$Perso3 === void 0 ? void 0 : (_$Appointment51$Perso4 = _$Appointment51$Perso3[0]) === null || _$Appointment51$Perso4 === void 0 ? void 0 : _$Appointment51$Perso4.value) ? JSON.stringify((_$Appointment52 = _.Appointment) === null || _$Appointment52 === void 0 ? void 0 : (_$Appointment52$Perso = _$Appointment52.PersonID) === null || _$Appointment52$Perso === void 0 ? void 0 : (_$Appointment52$Perso2 = _$Appointment52$Perso[0]) === null || _$Appointment52$Perso2 === void 0 ? void 0 : (_$Appointment52$Perso3 = _$Appointment52$Perso2.telecom) === null || _$Appointment52$Perso3 === void 0 ? void 0 : (_$Appointment52$Perso4 = _$Appointment52$Perso3[0]) === null || _$Appointment52$Perso4 === void 0 ? void 0 : _$Appointment52$Perso4.value) : "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.93",
3
+ "version": "1.1.96",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",