primary_care_admin_binder 0.1.40 → 0.1.41

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 +26 -4
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -7982,6 +7982,27 @@ var fetchData = /*#__PURE__*/function () {
7982
7982
  };
7983
7983
  }();
7984
7984
 
7985
+ var getAge = function getAge(date) {
7986
+ if (date) {
7987
+ var yearDiff = moment().diff(moment(date, 'DD/MM/YYYY'), 'years', false);
7988
+
7989
+ if (yearDiff > 0) {
7990
+ return yearDiff + ' Y';
7991
+ }
7992
+
7993
+ var monthDiff = moment().diff(moment(date, 'DD/MM/YYYY'), 'months', false);
7994
+
7995
+ if (monthDiff > 0) {
7996
+ return monthDiff + ' M';
7997
+ }
7998
+
7999
+ var dayDiff = moment().diff(moment(date, 'DD/MM/YYYY'), 'days', false);
8000
+ return dayDiff + ' D';
8001
+ }
8002
+
8003
+ return "";
8004
+ };
8005
+
7985
8006
  var makeName = function makeName() {
7986
8007
  var _prefix$, _prefix$$coding, _prefix$$coding$, _prefix$coding, _prefix$coding$, _prefix$2, _suffix$, _suffix$$coding, _suffix$$coding$, _suffix$coding, _suffix$coding$, _suffix$2;
7987
8008
 
@@ -33740,13 +33761,14 @@ var VIEW_PENDING_PATIENT_LIST = createAsyncThunk("getPendingRescheduleListApiSli
33740
33761
  case 5:
33741
33762
  data = _context2.sent;
33742
33763
  returnedData = data !== null && data !== void 0 && data.result ? data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (_) {
33743
- var _makeName2, _$Patient, _$Patient$name, _$Patient$alias, _$Patient2, _$Patient$age, _$Patient3, _ref6, _$Patient4, _$Patient4$telecom, _$Patient4$telecom$, _$appno, _$Patient$slotID$0$bl, _$Patient5, _$Patient5$slotID, _$Patient5$slotID$, _$Patient5$slotID$$bl, _$Patient$gender$, _$Patient6, _$Patient6$gender, _$id2;
33764
+ var _$Patient, _makeName2, _$Patient2, _$Patient2$name, _$Patient$alias, _$Patient3, _ref6, _$Patient4, _$Patient4$telecom, _$Patient4$telecom$, _$appno, _$Patient$slotID$0$bl, _$Patient5, _$Patient5$slotID, _$Patient5$slotID$, _$Patient5$slotID$$bl, _$Patient$gender$, _$Patient6, _$Patient6$gender, _$id2;
33744
33765
 
33766
+ var age = getAge(_ === null || _ === void 0 ? void 0 : (_$Patient = _.Patient) === null || _$Patient === void 0 ? void 0 : _$Patient.birthDate);
33745
33767
  return {
33746
33768
  "select": false,
33747
- "name": (_makeName2 = makeName(_ === null || _ === void 0 ? void 0 : (_$Patient = _.Patient) === null || _$Patient === void 0 ? void 0 : (_$Patient$name = _$Patient.name) === null || _$Patient$name === void 0 ? void 0 : _$Patient$name[0])) !== null && _makeName2 !== void 0 ? _makeName2 : '',
33748
- "mrn": (_$Patient$alias = _ === null || _ === void 0 ? void 0 : (_$Patient2 = _.Patient) === null || _$Patient2 === void 0 ? void 0 : _$Patient2.alias) !== null && _$Patient$alias !== void 0 ? _$Patient$alias : '---',
33749
- "age": (_$Patient$age = _ === null || _ === void 0 ? void 0 : (_$Patient3 = _.Patient) === null || _$Patient3 === void 0 ? void 0 : _$Patient3.age) !== null && _$Patient$age !== void 0 ? _$Patient$age : '',
33769
+ "name": (_makeName2 = makeName(_ === null || _ === void 0 ? void 0 : (_$Patient2 = _.Patient) === null || _$Patient2 === void 0 ? void 0 : (_$Patient2$name = _$Patient2.name) === null || _$Patient2$name === void 0 ? void 0 : _$Patient2$name[0])) !== null && _makeName2 !== void 0 ? _makeName2 : '',
33770
+ "mrn": (_$Patient$alias = _ === null || _ === void 0 ? void 0 : (_$Patient3 = _.Patient) === null || _$Patient3 === void 0 ? void 0 : _$Patient3.alias) !== null && _$Patient$alias !== void 0 ? _$Patient$alias : '---',
33771
+ "age": age !== null && age !== void 0 ? age : '',
33750
33772
  "mobile no": (_ref6 = "".concat(_ === null || _ === void 0 ? void 0 : (_$Patient4 = _.Patient) === null || _$Patient4 === void 0 ? void 0 : (_$Patient4$telecom = _$Patient4.telecom) === null || _$Patient4$telecom === void 0 ? void 0 : (_$Patient4$telecom$ = _$Patient4$telecom[0]) === null || _$Patient4$telecom$ === void 0 ? void 0 : _$Patient4$telecom$.value)) !== null && _ref6 !== void 0 ? _ref6 : '',
33751
33773
  "appt ref no.": (_$appno = _ === null || _ === void 0 ? void 0 : _.appno) !== null && _$appno !== void 0 ? _$appno : '',
33752
33774
  "appt date & time": _ !== null && _ !== void 0 && _.start ? utcTOLocal(_ === null || _ === void 0 ? void 0 : _.start, 'DD MMM,YYYY hh:mm A') : '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",