Skip to content

Commit e39ceab

Browse files
authored
Merge pull request #58 from rcpch/truncate-who-child
fix-truncate-who-child
2 parents e731f81 + d7f6e38 commit e39ceab

File tree

4 files changed

+173
-4
lines changed

4 files changed

+173
-4
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.3.1
2+
current_version = 4.3.2
33
tag = False
44
commit = True
55

rcpchgrowth/chart_functions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
TURNERS,
2727
UK_WHO,
2828
UK_WHO_REFERENCES,
29+
UK_WHO_CHILD,
2930
WHO,
3031
WHO_REFERENCES
3132
)
@@ -352,8 +353,8 @@ def create_uk_who_chart(
352353
except:
353354
lms_array_for_measurement = []
354355

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

359360
for centile_index, centile_sds in enumerate(centile_sds_collection):

0 commit comments

Comments
 (0)