Skip to content

Commit

Permalink
added to event_bmi # Ignore out-of-range values
Browse files Browse the repository at this point in the history
  • Loading branch information
marrpesce committed Dec 19, 2024
1 parent f23757a commit 591fdd7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion analysis/PRIMIS/variables_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ def has_severe_obesity(index_date):
event_bmi = last_prior_event(
bmi,
index_date,
where=(clinical_events.numeric_value.is_not_null())
where=(
clinical_events.numeric_value.is_not_null() &
# Ignore out-of-range values
(clinical_events.numeric_value > 4) &
(clinical_events.numeric_value < 200)
)
)
# Severe obesity
severe_obesity = case(
Expand Down

0 comments on commit 591fdd7

Please sign in to comment.