diff --git a/src/psycop_feature_generation/loaders/raw/load_structured_sfi.py b/src/psycop_feature_generation/loaders/raw/load_structured_sfi.py index c7a5a7c9..8ea696cb 100644 --- a/src/psycop_feature_generation/loaders/raw/load_structured_sfi.py +++ b/src/psycop_feature_generation/loaders/raw/load_structured_sfi.py @@ -157,9 +157,13 @@ def weight_in_kg(n_rows: int | None = None) -> pd.DataFrame: @data_loaders.register("bmi") def bmi(n_rows: int | None = None) -> pd.DataFrame: - return sfi_loader( + df = sfi_loader( aktivitetstypenavn="Bestemmelse af Body Mass Index (BMI)", elementledetekst="BMI", n_rows=n_rows, value_col="numelementvaerdi", ) + + df = df[(df["value"] > 10.0) & (df["value"] < 70.0)] + + return df