primary_care_admin_binder 0.1.75 → 0.1.78

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 +94 -13
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -11819,7 +11819,7 @@ var generateReference = function generateReference(ref, state, ageCategory) {
11819
11819
  ageMin: element.age_minimum,
11820
11820
  ageMax: element.age_maximum,
11821
11821
  unit: state.reference_unit_allowed.data.find(function (sys) {
11822
- return element.UOM.indexOf(sys.value) > -1;
11822
+ return element.RefValUOM.indexOf(sys.value) > -1;
11823
11823
  }),
11824
11824
  normalMin: element.normal_min,
11825
11825
  normalMax: element.normal_max,
@@ -11838,7 +11838,7 @@ var generateReference = function generateReference(ref, state, ageCategory) {
11838
11838
  // Unit: state.reference_unit_allowed.data.find(
11839
11839
  // (sys) => element.UOM.indexOf(sys.value) > -1
11840
11840
  // ),
11841
- Unit: state.unit_allowed.data.find(function (sys) {
11841
+ Unit: state.reference_unit_allowed.data.find(function (sys) {
11842
11842
  return element.UOM.indexOf(sys.value) > -1;
11843
11843
  }),
11844
11844
  table: []
@@ -11851,7 +11851,7 @@ var generateReference = function generateReference(ref, state, ageCategory) {
11851
11851
  ageMin: element.age_minimum,
11852
11852
  ageMax: element.age_maximum,
11853
11853
  unit: state.reference_unit_allowed.data.find(function (sys) {
11854
- return element.UOM.indexOf(sys.value) > -1;
11854
+ return element.RefValUOM.indexOf(sys.value) > -1;
11855
11855
  }),
11856
11856
  normalMin: element.normal_min,
11857
11857
  normalMax: element.normal_max,
@@ -29227,7 +29227,7 @@ var queries$8 = {
29227
29227
  return {
29228
29228
  "db_name": dbName$1,
29229
29229
  "entity": "Organization",
29230
- "filter": "Organization.activestatus==true && lower(first(document(Organization.OrgType)[*].display)) == '".concat(data, "'"),
29230
+ "filter": "Organization.active==true && lower(first(document(Organization.OrgType)[*].display)) == '".concat(data, "'"),
29231
29231
  "return_fields": "{_id:Organization._id,_key:Organization._key,id:Organization.id,name:Organization.name,alias:Organization.alias}"
29232
29232
  };
29233
29233
  },
@@ -33871,7 +33871,7 @@ var masterQuery$1 = {
33871
33871
  locationType: "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='LOCATIONTYPE' && (lower(first(document(CodeableConceptMaster.coding)[*].display)) =='ward' || lower(first(document(CodeableConceptMaster.coding)[*].display)) == 'clinic' ) && CodeableConceptMaster.status==true && CodeableConceptMaster.activestatus==true \",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\",\n \"sort\": \"first(document(CodeableConceptMaster.coding)[*].display)\"\n }")
33872
33872
  };
33873
33873
  var dynamicMaster = {
33874
- orderSetAppPractitioner: function orderSetAppPractitioner(_id) {
33874
+ orderSetAppPractitioner: function orderSetAppPractitioner(facility, speciality, practitionerType) {
33875
33875
  // return {
33876
33876
  // db_name: `${dbName}`,
33877
33877
  // entity: "Practitioner",
@@ -33879,10 +33879,16 @@ var dynamicMaster = {
33879
33879
  // return_fields:
33880
33880
  // "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))}))})",
33881
33881
  // };
33882
+ // return {
33883
+ // "db_name": `${dbName}`,
33884
+ // "entity": "Practitioner",
33885
+ // "filter": `document(document(Practitioner.practitioner_type).coding)[*]._id any=='${_id}' && Practitioner.activestatus==true && Practitioner.active == true`,
33886
+ // "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))}))})"
33887
+ // }
33882
33888
  return {
33883
33889
  "db_name": "".concat(dbName$1),
33884
33890
  "entity": "Practitioner",
33885
- "filter": "document(document(Practitioner.practitioner_type).coding)[*]._id any=='".concat(_id, "' && Practitioner.activestatus==true && Practitioner.active == true"),
33891
+ "filter": "Practitioner.ReportingEntityName=='".concat(facility, "' && (document(Practitioner.practitioner_role)[*].SpecialtyID any == '").concat(speciality, "' || first(document(document(Practitioner.practitioner_role)[*].SpecialtyID)[*].coding) any == '").concat(speciality, "' ) && document(document(Practitioner.practitioner_type).coding)[*]._id any=='").concat(practitionerType, "' && Practitioner.activestatus==true && Practitioner.active == true "),
33886
33892
  "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))}))})"
33887
33893
  };
33888
33894
  },
@@ -33920,6 +33926,14 @@ var dynamicMaster = {
33920
33926
  "return_fields": "KEEP(LocationMaster,'id','_id','key','locationID','longdesc','shortdesc')",
33921
33927
  "sort": "LocationMaster.shortdesc"
33922
33928
  };
33929
+ },
33930
+ orderSetAppSpecialty: function orderSetAppSpecialty(_id) {
33931
+ return {
33932
+ "db_name": "".concat(dbName$1),
33933
+ "entity": "Organization",
33934
+ "filter": "Organization._id=='".concat(_id, "' AND Organization.activestatus==true"),
33935
+ "return_fields": "document(Organization.specialtyDetails[*].specialty)"
33936
+ };
33923
33937
  }
33924
33938
  };
33925
33939
 
@@ -34327,7 +34341,9 @@ var ORDER_SET_APP_PRACTITIONER = createAsyncThunk("orderSetApplicabilitySlice/or
34327
34341
  var payload,
34328
34342
  _ref11,
34329
34343
  rejectWithValue,
34330
- _id,
34344
+ facility,
34345
+ speciality,
34346
+ practitionerType,
34331
34347
  data_arr,
34332
34348
  arry,
34333
34349
  _args7 = arguments;
@@ -34339,10 +34355,10 @@ var ORDER_SET_APP_PRACTITIONER = createAsyncThunk("orderSetApplicabilitySlice/or
34339
34355
  payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
34340
34356
  _ref11 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
34341
34357
  _context7.prev = 2;
34342
- _id = payload._id;
34358
+ facility = payload.facility, speciality = payload.speciality, practitionerType = payload.practitionerType;
34343
34359
  _context7.next = 6;
34344
34360
  return fetchData({
34345
- body: JSON.stringify(dynamicMaster.orderSetAppPractitioner(_id))
34361
+ body: JSON.stringify(dynamicMaster.orderSetAppPractitioner(facility, speciality, practitionerType))
34346
34362
  }, __readDocumentUrl__);
34347
34363
 
34348
34364
  case 6:
@@ -34629,6 +34645,63 @@ var ORDER_SET_APPLICABILITY_UPSERT = createAsyncThunk("orderSetApplicabilitySlic
34629
34645
  }
34630
34646
  }
34631
34647
  }, _callee12, null, [[2, 11]]);
34648
+ }))); //ORDER_SET_APP_SPECIALTY
34649
+
34650
+ var ORDER_SET_APP_SPECIALTY = createAsyncThunk("orderSetApplicabilitySlice/order_set_app_specialty", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
34651
+ var payload,
34652
+ _ref23,
34653
+ rejectWithValue,
34654
+ _data_arr$result,
34655
+ _data_arr$result$,
34656
+ _id,
34657
+ data_arr,
34658
+ arry,
34659
+ _args13 = arguments;
34660
+
34661
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
34662
+ while (1) {
34663
+ switch (_context13.prev = _context13.next) {
34664
+ case 0:
34665
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
34666
+ _ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
34667
+ _context13.prev = 2;
34668
+ _id = payload._id;
34669
+ _context13.next = 6;
34670
+ return fetchData({
34671
+ body: JSON.stringify(dynamicMaster.orderSetAppSpecialty(_id))
34672
+ }, __readDocumentUrl__);
34673
+
34674
+ case 6:
34675
+ data_arr = _context13.sent;
34676
+ arry = [];
34677
+ _context13.next = 10;
34678
+ return data_arr === null || data_arr === void 0 ? void 0 : (_data_arr$result = data_arr.result) === null || _data_arr$result === void 0 ? void 0 : (_data_arr$result$ = _data_arr$result[0]) === null || _data_arr$result$ === void 0 ? void 0 : _data_arr$result$.map(function (val) {
34679
+ var _val$_id5, _val$display;
34680
+
34681
+ arry.push({
34682
+ value: (_val$_id5 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id5 !== void 0 ? _val$_id5 : "",
34683
+ label: (_val$display = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display !== void 0 ? _val$display : ""
34684
+ });
34685
+ });
34686
+
34687
+ case 10:
34688
+ return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
34689
+ data: arry
34690
+ }));
34691
+
34692
+ case 13:
34693
+ _context13.prev = 13;
34694
+ _context13.t0 = _context13["catch"](2);
34695
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
34696
+ message: _context13.t0.message
34697
+ })));
34698
+
34699
+ case 16:
34700
+ case "end":
34701
+ return _context13.stop();
34702
+ }
34703
+ }
34704
+ }, _callee13, null, [[2, 13]]);
34632
34705
  })));
34633
34706
  var orderSetApplicabilitySlice = createSlice({
34634
34707
  name: "orderSetApplicabilityApiSlice",
@@ -34641,9 +34714,16 @@ var orderSetApplicabilitySlice = createSlice({
34641
34714
  order_set_app_diagnosis_group: _objectSpread2({}, defaultState.List),
34642
34715
  order_set_app_diagnosis_code: _objectSpread2({}, defaultState.List),
34643
34716
  order_set_app_location: _objectSpread2({}, defaultState.List),
34644
- order_set_applicability_upsert: _objectSpread2({}, defaultState.List)
34645
- },
34646
- extraReducers: (_extraReducers$b = {}, _defineProperty(_extraReducers$b, GET_ORDER_SET_APPLICABILITY_LIST.fulfilled, function (state, action) {
34717
+ order_set_applicability_upsert: _objectSpread2({}, defaultState.List),
34718
+ order_set_app_specialty: _objectSpread2({}, defaultState.List)
34719
+ },
34720
+ extraReducers: (_extraReducers$b = {}, _defineProperty(_extraReducers$b, ORDER_SET_APP_SPECIALTY.fulfilled, function (state, action) {
34721
+ state.order_set_app_specialty.loading = false, state.order_set_app_specialty.error = false, state.order_set_app_specialty = action.payload;
34722
+ }), _defineProperty(_extraReducers$b, ORDER_SET_APP_SPECIALTY.pending, function (state, action) {
34723
+ state.order_set_app_specialty.loading = true, state.order_set_app_specialty.error = false, state.order_set_app_specialty.loading = true;
34724
+ }), _defineProperty(_extraReducers$b, ORDER_SET_APP_SPECIALTY.rejected, function (state, action) {
34725
+ state.order_set_app_specialty.loading = false, state.order_set_app_specialty.error = true, state.order_set_app_specialty = action.payload;
34726
+ }), _defineProperty(_extraReducers$b, GET_ORDER_SET_APPLICABILITY_LIST.fulfilled, function (state, action) {
34647
34727
  state.order_set_applicability_list.loading = false, state.order_set_applicability_list.error = false, state.order_set_applicability_list = action.payload;
34648
34728
  }), _defineProperty(_extraReducers$b, GET_ORDER_SET_APPLICABILITY_LIST.pending, function (state, action) {
34649
34729
  state.order_set_applicability_list.loading = true, state.order_set_applicability_list.error = false, state.order_set_applicability_list.loading = true;
@@ -34708,7 +34788,8 @@ var orderSetApplicabilityActions = {
34708
34788
  ORDER_SET_APP_DIAGNOSIS_GROUP: ORDER_SET_APP_DIAGNOSIS_GROUP,
34709
34789
  ORDER_SET_APP_DIAGNOSIS_CODE: ORDER_SET_APP_DIAGNOSIS_CODE,
34710
34790
  ORDER_SET_APP_LOCATION: ORDER_SET_APP_LOCATION,
34711
- ORDER_SET_APPLICABILITY_UPSERT: ORDER_SET_APPLICABILITY_UPSERT
34791
+ ORDER_SET_APPLICABILITY_UPSERT: ORDER_SET_APPLICABILITY_UPSERT,
34792
+ ORDER_SET_APP_SPECIALTY: ORDER_SET_APP_SPECIALTY
34712
34793
  };
34713
34794
  var orderSetApplicabilitySlice$1 = orderSetApplicabilitySlice.reducer;
34714
34795
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.75",
3
+ "version": "0.1.78",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",