Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.7
current_version = 4.3.8
tag = False
commit = True

Expand Down
10 changes: 8 additions & 2 deletions rcpchgrowth/fictional_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ def generate_fictional_child_data(
birth_date = date(1759, 4, 11) # YYYY m d
observation_date = birth_date + timedelta(days=start_chronological_age*365.25)

# adjust the age for gestation
correction = 0.0
if gestation_weeks < 40:
correction = (((gestation_weeks * 7 + gestation_days)-40*7) / 365.25) # adjust age for gestation

# set the counters
cycle_age = start_chronological_age
cycle_age = start_chronological_age + correction # adjust the age for gestation
end_age += correction # adjust the end age for gestation
cycle_sds = start_sds

interval_in_years = end_age-start_chronological_age
Expand All @@ -76,7 +82,7 @@ def generate_fictional_child_data(
drift_amount = drift_range / cycle_number

measurements_array=[]

while cycle_age < end_age:

rawMeasurement = None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="rcpchgrowth",
version="4.3.7",
version="4.3.8",
description="SDS and Centile calculations for UK Growth Data",
long_description=long_description,
url="https://github.com/rcpch/digital-growth-charts/blob/master/README.md",
Expand Down