Skip to content

Commit

Permalink
Merge pull request #58 from rcpch/truncate-who-child
Browse files Browse the repository at this point in the history
fix-truncate-who-child
  • Loading branch information
eatyourpeas authored Dec 28, 2024
2 parents e731f81 + d7f6e38 commit e39ceab
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.3.1
current_version = 4.3.2
tag = False
commit = True

Expand Down
5 changes: 3 additions & 2 deletions rcpchgrowth/chart_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
TURNERS,
UK_WHO,
UK_WHO_REFERENCES,
UK_WHO_CHILD,
WHO,
WHO_REFERENCES
)
Expand Down Expand Up @@ -352,8 +353,8 @@ def create_uk_who_chart(
except:
lms_array_for_measurement = []

# truncate the who_child data to stop at 4y
if len(lms_array_for_measurement) > 0:
# truncate the who_child data to stop at 4y in the WHO child reference. Must not do this for the UK90 reference
if len(lms_array_for_measurement) > 0 and reference == UK_WHO_CHILD:
lms_array_for_measurement = [obj for obj in lms_array_for_measurement if obj["decimal_age"] <= 4.0]

for centile_index, centile_sds in enumerate(centile_sds_collection):
Expand Down
Loading

0 comments on commit e39ceab

Please sign in to comment.