primarycare-binder 1.1.26 → 1.1.27

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 +93 -15
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -13769,6 +13769,12 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13769
13769
  longtitude,
13770
13770
  _payload$doctorId,
13771
13771
  doctorId,
13772
+ _payload$consultmode,
13773
+ consultmode,
13774
+ _payload$gender,
13775
+ gender,
13776
+ _payload$lang,
13777
+ lang,
13772
13778
  body,
13773
13779
  data,
13774
13780
  returnData,
@@ -13802,20 +13808,18 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13802
13808
  endDate = Edate;
13803
13809
  startDate.setHours(0, 0, 0, 0);
13804
13810
  endDate.setHours(23, 59, 59, 999);
13805
- hospital = payload.hospital, specialities = payload.specialities, latitude = payload.latitude, longtitude = payload.longtitude, _payload$doctorId = payload.doctorId, doctorId = _payload$doctorId === void 0 ? 0 : _payload$doctorId;
13811
+ hospital = payload.hospital, specialities = payload.specialities, latitude = payload.latitude, longtitude = payload.longtitude, _payload$doctorId = payload.doctorId, doctorId = _payload$doctorId === void 0 ? 0 : _payload$doctorId, _payload$consultmode = payload.consultmode, consultmode = _payload$consultmode === void 0 ? ["Direct", "Video", "Both"] : _payload$consultmode, _payload$gender = payload.gender, gender = _payload$gender === void 0 ? "" : _payload$gender, _payload$lang = payload.lang, lang = _payload$lang === void 0 ? "" : _payload$lang;
13806
13812
  body = {
13807
13813
  db_name: dbName,
13808
13814
  queryid: query_ids.doctorListing,
13809
13815
  filter: {
13810
13816
  org_id: hospital,
13811
- // "Organization": hospital + "/10000",
13812
13817
  speciality: specialities,
13813
13818
  startdate: getUtcTime(startDate),
13814
- enddate: getUtcTime(endDate) // "latitude": latitude,
13815
- // "longtitude": longtitude,
13816
- // "startdate": 1614836455,
13817
- // "enddate" : 1622785255
13818
-
13819
+ enddate: getUtcTime(endDate),
13820
+ consultmode: consultmode,
13821
+ gender: gender,
13822
+ lang: lang
13819
13823
  }
13820
13824
  };
13821
13825
 
@@ -13997,7 +14001,8 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13997
14001
  } else {
13998
14002
  var _restData$gender, _restData$gender$codi, _restData$gender$codi2, _restData$Specialties, _restData$communicati, _restData$hospital6, _restData$qualificati, _restData$qualificati2, _restData$qualificati3, _restData$hospital7, _restData$address5, _restData$address5$, _restData$name, _restData$photo, _restData$photo$, _restData$address6, _restData$address6$;
13999
14003
 
14000
- var gender = (restData === null || restData === void 0 ? void 0 : (_restData$gender = restData.gender) === null || _restData$gender === void 0 ? void 0 : (_restData$gender$codi = _restData$gender.coding) === null || _restData$gender$codi === void 0 ? void 0 : (_restData$gender$codi2 = _restData$gender$codi[0]) === null || _restData$gender$codi2 === void 0 ? void 0 : _restData$gender$codi2.display) || "";
14004
+ var _gender = (restData === null || restData === void 0 ? void 0 : (_restData$gender = restData.gender) === null || _restData$gender === void 0 ? void 0 : (_restData$gender$codi = _restData$gender.coding) === null || _restData$gender$codi === void 0 ? void 0 : (_restData$gender$codi2 = _restData$gender$codi[0]) === null || _restData$gender$codi2 === void 0 ? void 0 : _restData$gender$codi2.display) || "";
14005
+
14001
14006
  var designation = "";
14002
14007
  restData === null || restData === void 0 ? void 0 : (_restData$Specialties = restData.Specialties) === null || _restData$Specialties === void 0 ? void 0 : _restData$Specialties.forEach(function (s) {
14003
14008
  var _s$coding2;
@@ -14033,8 +14038,8 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
14033
14038
  });
14034
14039
  }
14035
14040
  });
14036
- info["title"] = "".concat(gender).concat(gender && " | ").concat(designation);
14037
- info["gender"] = gender;
14041
+ info["title"] = "".concat(_gender).concat(_gender && " | ").concat(designation);
14042
+ info["gender"] = _gender;
14038
14043
  info["hospId"] = restData === null || restData === void 0 ? void 0 : (_restData$hospital6 = restData.hospital) === null || _restData$hospital6 === void 0 ? void 0 : _restData$hospital6.id;
14039
14044
  info["subtext"] = (restData === null || restData === void 0 ? void 0 : (_restData$qualificati = restData.qualification) === null || _restData$qualificati === void 0 ? void 0 : (_restData$qualificati2 = _restData$qualificati.map) === null || _restData$qualificati2 === void 0 ? void 0 : (_restData$qualificati3 = _restData$qualificati2.call(_restData$qualificati, function (q) {
14040
14045
  return (q === null || q === void 0 ? void 0 : q.name) || "";
@@ -14106,29 +14111,102 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
14106
14111
  }
14107
14112
  }, _callee2, null, [[2, 34]]);
14108
14113
  }))); // end
14109
- // FUZZY SEARCH CREATE INITIALSTATE
14114
+
14115
+ var GET_ALL_LANGS = createAsyncThunk("docterListingReducer/allLanguages", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
14116
+ var payload,
14117
+ _ref5,
14118
+ rejectWithValue,
14119
+ body,
14120
+ data,
14121
+ returnData,
14122
+ _args3 = arguments;
14123
+
14124
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
14125
+ while (1) {
14126
+ switch (_context3.prev = _context3.next) {
14127
+ case 0:
14128
+ payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
14129
+ _ref5 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
14130
+ _context3.prev = 2;
14131
+ body = {
14132
+ db_name: dbName,
14133
+ entity: "CodeableConceptMaster",
14134
+ filter: "CodeableConceptMaster.Type == 'LANGUAGE'",
14135
+ return_fields: "{coding_id: CodeableConceptMaster._id, codeable: (let codeable = DOCUMENT(CodeableConceptMaster.coding[0]) RETURN codeable)[0]}"
14136
+ };
14137
+ _context3.next = 6;
14138
+ return fetchData$3({
14139
+ body: JSON.stringify(body)
14140
+ }, __readDocumentUrl__);
14141
+
14142
+ case 6:
14143
+ data = _context3.sent;
14144
+ returnData = [];
14145
+
14146
+ if (data.result && Array.isArray(data.result)) {
14147
+ returnData = data.result.map(function (d) {
14148
+ var _d$codeable, _d$codeable2;
14149
+
14150
+ return {
14151
+ val: (_d$codeable = d.codeable) === null || _d$codeable === void 0 ? void 0 : _d$codeable.code,
14152
+ title: (_d$codeable2 = d.codeable) === null || _d$codeable2 === void 0 ? void 0 : _d$codeable2.display
14153
+ };
14154
+ });
14155
+ }
14156
+
14157
+ return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
14158
+ data: returnData
14159
+ }));
14160
+
14161
+ case 12:
14162
+ _context3.prev = 12;
14163
+ _context3.t0 = _context3["catch"](2);
14164
+ console.log(error);
14165
+ return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
14166
+ message: error.message
14167
+ })));
14168
+
14169
+ case 16:
14170
+ case "end":
14171
+ return _context3.stop();
14172
+ }
14173
+ }
14174
+ }, _callee3, null, [[2, 12]]);
14175
+ }))); // FUZZY SEARCH CREATE INITIALSTATE
14110
14176
 
14111
14177
  var docterListingReducer = createSlice({
14112
14178
  name: "docterListingReducer",
14113
14179
  initialState: {
14114
- docterListing: _objectSpread2({}, defaultState.Info)
14180
+ docterListing: _objectSpread2({}, defaultState.List),
14181
+ allLanguages: _objectSpread2({}, defaultState.List)
14115
14182
  },
14116
14183
  extraReducers: (_extraReducers$y = {}, _defineProperty(_extraReducers$y, DOCTER_LISTING.fulfilled, function (state, action) {
14117
14184
  var _action$payload;
14118
14185
 
14119
- state.docterListing = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
14186
+ state.docterListing = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : [];
14120
14187
  }), _defineProperty(_extraReducers$y, DOCTER_LISTING.pending, function (state, action) {
14121
14188
  state.docterListing.loading = true;
14122
14189
  }), _defineProperty(_extraReducers$y, DOCTER_LISTING.rejected, function (state, action) {
14123
14190
  var _action$payload2;
14124
14191
 
14125
- state.docterListing = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
14192
+ state.docterListing = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : [];
14193
+ }), _defineProperty(_extraReducers$y, GET_ALL_LANGS.fulfilled, function (state, action) {
14194
+ var _action$payload3;
14195
+
14196
+ state.allLanguages = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : [];
14197
+ }), _defineProperty(_extraReducers$y, GET_ALL_LANGS.pending, function (state, action) {
14198
+ state.allLanguages.loading = true;
14199
+ }), _defineProperty(_extraReducers$y, GET_ALL_LANGS.rejected, function (state, action) {
14200
+ var _action$payload4;
14201
+
14202
+ state.allLanguages = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : [];
14126
14203
  }), _extraReducers$y)
14127
14204
  }); // end
14128
14205
  // DOCTER_LISTING ACTION LISTS
14129
14206
 
14130
14207
  var docterListingActions = {
14131
- DOCTER_LISTING: DOCTER_LISTING
14208
+ DOCTER_LISTING: DOCTER_LISTING,
14209
+ GET_ALL_LANGS: GET_ALL_LANGS
14132
14210
  }; // end
14133
14211
  var docterListingReducer$1 = docterListingReducer.reducer;
14134
14212
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primarycare-binder",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",