Skip to content

Commit

Permalink
remove overlap at 2y
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourpeas committed Jan 29, 2022
1 parent 5b30dc3 commit 472f23c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rcpchgrowth/uk_who.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,23 @@ def uk_who_reference(

elif age < WHO_CHILD_LOWER_THRESHOLD:
# Children beyond 2 weeks but below 2 years are measured lying down using WHO data
if age == FORTY_TWO_WEEKS_GESTATION and default_youngest_reference:
# If default_youngest_reference is True, the younger reference is used to calculate values
# This is specifically for the overlap between WHO 2006 lying and standing in centile curve generation
return UK90_PRETERM_DATA
return WHO_INFANTS_DATA

elif age < WHO_CHILDREN_UPPER_THRESHOLD:
# Children 2 years and beyond but below 4 years are measured standing up using WHO data
# Children 2 years and beyond but below 4 years are measured standing up using WHO data
if age == 2.0 and default_youngest_reference:
# If default_youngest_reference is True, the younger reference is used to calculate values
# This is specifically for the overlap between WHO 2006 lying and standing in centile curve generation
return WHO_INFANTS_DATA
return WHO_CHILD_DATA

elif age <= UK90_UPPER_THRESHOLD:
# All children 4 years and above are measured using UK90 child data
if age == 4.0 and default_youngest_reference:
print(f"age {age} selected")
# If default_youngest_reference is True, the younger reference is used to calculate values
# This is specifically for the overlap between WHO 2006 and UK90 in centile curve generation
return WHO_CHILD_DATA
Expand Down

0 comments on commit 472f23c

Please sign in to comment.