@hedia/recommendation-screen 2.2.0-alpha.30 → 2.2.0-alpha.31

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.
@@ -54,5 +54,3 @@ export declare const ACTIVITY_TARGET_BGL_MMOL_LIMITS: IInterval;
54
54
  export declare const REMINDER_HOURS_LIMITS: IInterval;
55
55
  /** The lower and upper limits for activity reduction. */
56
56
  export declare const ACTIVITY_SETTINGS_INTERVAL_LIMITS: IInterval;
57
- /** The number of CGM forecasted glucose units, that's considered to be very low. */
58
- export declare const FORECASTED_CGM_VERY_LOW_LIMIT_MMOLL: number;
@@ -54,5 +54,3 @@ export const ACTIVITY_TARGET_BGL_MMOL_LIMITS = { min: 5, max: 13.9 };
54
54
  export const REMINDER_HOURS_LIMITS = { min: 0, max: 6 };
55
55
  /** The lower and upper limits for activity reduction. */
56
56
  export const ACTIVITY_SETTINGS_INTERVAL_LIMITS = { min: 0, max: 1 };
57
- /** The number of CGM forecasted glucose units, that's considered to be very low. */
58
- export const FORECASTED_CGM_VERY_LOW_LIMIT_MMOLL = 3.5;
@@ -54,5 +54,3 @@ export declare const BloodKetoneUnitError: () => RecommendationError;
54
54
  export declare const BloodGlucoseUnitError: () => RecommendationError;
55
55
  /** The user has provided a blood ketone level but the blood ketone measuring unit is not defined. */
56
56
  export declare const BloodKetonePropsError: () => RecommendationError;
57
- /** The user has provided a forecast cgm glucose value is very low. */
58
- export declare const ForecastedGlucoseIsVeryLowError: () => RecommendationError;
@@ -61,5 +61,3 @@ export const BloodKetoneUnitError = () => new RecommendationError(i18n._(t `Erro
61
61
  export const BloodGlucoseUnitError = () => new RecommendationError(i18n._(t `Error. Hedia Calculator does not support your current blood glucose unit.`), RecommendationErrorEnum.BloodGlucoseUnit);
62
62
  /** The user has provided a blood ketone level but the blood ketone measuring unit is not defined. */
63
63
  export const BloodKetonePropsError = () => new RecommendationError(i18n._(t `Error. Your blood ketone settings are invalid.`), RecommendationErrorEnum.BloodKetoneProps);
64
- /** The user has provided a forecast cgm glucose value is very low. */
65
- export const ForecastedGlucoseIsVeryLowError = () => new RecommendationError(i18n._(t `Error. Your forecasted cgm glucose is very low.`), RecommendationErrorEnum.VeryLowForecastedGlucose);
@@ -248,11 +248,3 @@ export declare function checkInsulinToCarbRatio(insulinToCarbRatio: number): voi
248
248
  * @param carbohydrates The amount of carbohydrates that the user is eating in grams.
249
249
  */
250
250
  export declare function checkCarbohydrates(carbohydrates: number): void;
251
- /**
252
- * Check if the forecasted glucose is not very low.
253
- *
254
- * Steps:
255
- * 1. Check if forecasted glucose is above very low limit. If it isn’t then throw a ForecastedGlucoseIsVeryLowError().
256
- * @param forecast The forecast data, that includes `forecastGlucoseMmoll` and `forecastTimestamp`
257
- */
258
- export declare function checkVeryLowForecastedGlucose(forecast: Logbook.Types.ILogbookEntry[`forecast_glucose`] | undefined): void;
@@ -6,8 +6,8 @@
6
6
  */
7
7
  import { Activity, BloodGlucoseUnit, BloodKetonesUnit, Languages, UserSettings, } from "@hedia/types";
8
8
  import moment from "moment";
9
- import { ACTIVITY_BUFFER_MINUTES, ACTIVITY_DURATION_MINUTES_LIMITS, ACTIVITY_SETTINGS_INTERVAL_LIMITS, ACTIVITY_TARGET_BGL_MMOL_LIMITS, BOLUS_SECONDS_PASSED_LIMITS, CARBOHYDRATES_LIMTS, CURRENT_BGL_MMOL_LIMITS, CURRENT_BKL_MMOL_LIMITS, FORECASTED_CGM_VERY_LOW_LIMIT_MMOLL, INSULIN_DOSE_LIMITS, INSULIN_SENSITIVITY_MMOL_LIMITS, INSULIN_TO_CARBS_RATIO_LIMITS, ONE_HOUR_MINUTES, REMINDER_HOURS_LIMITS, TARGET_BGL_MMOL_LIMITS, } from "./Constants";
10
- import { ActivityDateError, ActivityDurationError, ActivityIntensityError, ActivitySettingsError, ActivityTargetBGLError, ActivityTypeError, BloodGlucoseUnitError, BloodKetonePropsError, BloodKetoneUnitError, BolusInsulinDoseError, BolusInsulinSecondsPassedError, CarbohydrateLimitError, CurrentBGLError, CurrentBKLError, ForecastedGlucoseIsVeryLowError, InjectionMethodError, InsulinSensitivityError, InsulinToCarbsRatioError, LanguageError, LatestLogbook6HoursBGLError, RecentBolusError, TargetBGLError, UserReminderError, } from "./RecommendationError";
9
+ import { ACTIVITY_BUFFER_MINUTES, ACTIVITY_DURATION_MINUTES_LIMITS, ACTIVITY_SETTINGS_INTERVAL_LIMITS, ACTIVITY_TARGET_BGL_MMOL_LIMITS, BOLUS_SECONDS_PASSED_LIMITS, CARBOHYDRATES_LIMTS, CURRENT_BGL_MMOL_LIMITS, CURRENT_BKL_MMOL_LIMITS, INSULIN_DOSE_LIMITS, INSULIN_SENSITIVITY_MMOL_LIMITS, INSULIN_TO_CARBS_RATIO_LIMITS, ONE_HOUR_MINUTES, REMINDER_HOURS_LIMITS, TARGET_BGL_MMOL_LIMITS, } from "./Constants";
10
+ import { ActivityDateError, ActivityDurationError, ActivityIntensityError, ActivitySettingsError, ActivityTargetBGLError, ActivityTypeError, BloodGlucoseUnitError, BloodKetonePropsError, BloodKetoneUnitError, BolusInsulinDoseError, BolusInsulinSecondsPassedError, CarbohydrateLimitError, CurrentBGLError, CurrentBKLError, InjectionMethodError, InsulinSensitivityError, InsulinToCarbsRatioError, LanguageError, LatestLogbook6HoursBGLError, RecentBolusError, TargetBGLError, UserReminderError, } from "./RecommendationError";
11
11
  import { Utils } from "./Utils";
12
12
  const { hard } = Activity.Enums.ActivityIntensity;
13
13
  const { fromFortysix } = Activity.Enums.ActivityReductionIntervals;
@@ -42,7 +42,6 @@ export function validateParams(props) {
42
42
  if (props?.calculatorParams?.activity && props?.activityDisplayProps) {
43
43
  checkActivityType(props.activityDisplayProps.activityType);
44
44
  }
45
- checkVeryLowForecastedGlucose(props.forecast);
46
45
  }
47
46
  /**
48
47
  * In case the users is providing a blood ketone current level, check if the blood ketone unit is defined.
@@ -408,17 +407,3 @@ export function checkCarbohydrates(carbohydrates) {
408
407
  throw CarbohydrateLimitError();
409
408
  }
410
409
  }
411
- /**
412
- * Check if the forecasted glucose is not very low.
413
- *
414
- * Steps:
415
- * 1. Check if forecasted glucose is above very low limit. If it isn’t then throw a ForecastedGlucoseIsVeryLowError().
416
- * @param forecast The forecast data, that includes `forecastGlucoseMmoll` and `forecastTimestamp`
417
- */
418
- export function checkVeryLowForecastedGlucose(forecast) {
419
- if (forecast?.forecastGlucoseMmoll) {
420
- if (forecast.forecastGlucoseMmoll < FORECASTED_CGM_VERY_LOW_LIMIT_MMOLL) {
421
- throw ForecastedGlucoseIsVeryLowError();
422
- }
423
- }
424
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.2.0-alpha.30",
3
+ "version": "2.2.0-alpha.31",
4
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
5
5
  "main": "dist/index.js",
6
6
  "files": [