Skip to content

Commit

Permalink
Merge pull request #244 from rcpch/eatyourpeas/issue243
Browse files Browse the repository at this point in the history
cdc-replace-who
  • Loading branch information
eatyourpeas authored Jan 17, 2025
2 parents 8c96a33 + a9f23c5 commit 773ee71
Show file tree
Hide file tree
Showing 4 changed files with 5,866 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pydantic == 2.*

# rcpch dependencies
# python package which does the centile and SDS calculations
rcpchgrowth==4.3.4
rcpchgrowth==4.3.5
160 changes: 159 additions & 1 deletion tests/test_data/test_cdc_calculation_valid.json
Original file line number Diff line number Diff line change
@@ -1 +1,159 @@
{"birth_data":{"birth_date":"2020-04-12","gestation_weeks":40,"gestation_days":0,"estimated_date_delivery":"2020-04-12","estimated_date_delivery_string":"Sun 12 April, 2020","sex":"female"},"measurement_dates":{"observation_date":"2028-06-12","chronological_decimal_age":8.167008898015059,"corrected_decimal_age":8.167008898015059,"chronological_calendar_age":"8 years and 2 months","corrected_calendar_age":"8 years and 2 months","corrected_gestational_age":{"corrected_gestation_weeks":null,"corrected_gestation_days":null},"comments":{"clinician_corrected_decimal_age_comment":"Born at term. No correction for gestation has been made.","lay_corrected_decimal_age_comment":"Your child was born at term. No correction for gestation has been made.","clinician_chronological_decimal_age_comment":"Born at term. No correction for gestation has been made.","lay_chronological_decimal_age_comment":"Your child was born at term. No correction for gestation has been made."},"corrected_decimal_age_error":null,"chronological_decimal_age_error":null},"child_observation_value":{"measurement_method":"height","observation_value":115.0,"observation_value_error":null},"measurement_calculated_values":{"corrected_sds":-2.423175012664367,"corrected_centile":0.7693,"corrected_centile_band":"This height measurement is below the normal range.","chronological_sds":-2.423175012664367,"chronological_centile":0.7693,"chronological_centile_band":"This height measurement is below the normal range.","corrected_measurement_error":null,"chronological_measurement_error":null,"corrected_percentage_median_bmi":null,"chronological_percentage_median_bmi":null},"plottable_data":{"centile_data":{"chronological_decimal_age_data":{"x":8.167008898015059,"y":115.0,"b":10.0,"centile":0.7693,"sds":-2.423175012664367,"bone_age_label":"This bone age is advanced","events_text":["Growth hormone start","Growth Hormone Deficiency diagnosis"],"bone_age_type":"greulich-pyle","bone_age_sds":2.0,"bone_age_centile":98.0,"observation_error":null,"age_type":"chronological_age","calendar_age":"8 years and 2 months","lay_comment":"Your child was born at term. No correction for gestation has been made.","clinician_comment":"Born at term. No correction for gestation has been made.","age_error":null,"centile_band":"This height measurement is below the normal range.","observation_value_error":null},"corrected_decimal_age_data":{"x":8.167008898015059,"y":115.0,"b":10.0,"centile":0.7693,"sds":-2.423175012664367,"bone_age_label":"This bone age is advanced","events_text":["Growth hormone start","Growth Hormone Deficiency diagnosis"],"bone_age_type":"greulich-pyle","bone_age_sds":2.0,"bone_age_centile":98.0,"observation_error":null,"age_type":"corrected_age","calendar_age":"8 years and 2 months","corrected_gestational_age":"","lay_comment":"Your child was born at term. No correction for gestation has been made.","clinician_comment":"Born at term. No correction for gestation has been made.","age_error":null,"centile_band":"This height measurement is below the normal range.","observation_value_error":null}},"sds_data":{"chronological_decimal_age_data":{"x":8.167008898015059,"y":-2.423175012664367,"b":10.0,"centile":0.7693,"sds":null,"bone_age_label":"This bone age is advanced","events_text":["Growth hormone start","Growth Hormone Deficiency diagnosis"],"bone_age_type":"greulich-pyle","bone_age_sds":2.0,"bone_age_centile":98.0,"observation_error":null,"age_type":"chronological_age","calendar_age":"8 years and 2 months","lay_comment":"Your child was born at term. No correction for gestation has been made.","clinician_comment":"Born at term. No correction for gestation has been made.","age_error":null,"centile_band":"This height measurement is below the normal range.","observation_value_error":null},"corrected_decimal_age_data":{"x":8.167008898015059,"y":-2.423175012664367,"b":10.0,"centile":0.7693,"sds":null,"bone_age_label":"This bone age is advanced","events_text":["Growth hormone start","Growth Hormone Deficiency diagnosis"],"bone_age_type":"greulich-pyle","bone_age_sds":2.0,"bone_age_centile":98.0,"observation_error":null,"age_type":"corrected_age","calendar_age":"8 years and 2 months","corrected_gestational_age":"","lay_comment":"Your child was born at term. No correction for gestation has been made.","clinician_comment":"Born at term. No correction for gestation has been made.","age_error":null,"centile_band":"This height measurement is below the normal range.","observation_value_error":null}}},"bone_age":{"bone_age":10.0,"bone_age_type":"greulich-pyle","bone_age_sds":2.0,"bone_age_centile":98.0,"bone_age_text":"This bone age is advanced"},"events_data":{"events_text":["Growth hormone start","Growth Hormone Deficiency diagnosis"]}}
{
"birth_data": {
"birth_date": "2020-04-12",
"gestation_weeks": 40,
"gestation_days": 0,
"estimated_date_delivery": "2020-04-12",
"estimated_date_delivery_string": "Sun 12 April, 2020",
"sex": "female"
},
"measurement_dates": {
"observation_date": "2028-06-12",
"chronological_decimal_age": 8.167008898015059,
"corrected_decimal_age": 8.167008898015059,
"chronological_calendar_age": "8 years and 2 months",
"corrected_calendar_age": "8 years and 2 months",
"corrected_gestational_age": {
"corrected_gestation_weeks": null,
"corrected_gestation_days": null
},
"comments": {
"clinician_corrected_decimal_age_comment": "Born at term. No correction for gestation has been made.",
"lay_corrected_decimal_age_comment": "Your child was born at term. No correction for gestation has been made.",
"clinician_chronological_decimal_age_comment": "Born at term. No correction for gestation has been made.",
"lay_chronological_decimal_age_comment": "Your child was born at term. No correction for gestation has been made."
},
"corrected_decimal_age_error": null,
"chronological_decimal_age_error": null
},
"child_observation_value": {
"measurement_method": "height",
"observation_value": 115.0,
"observation_value_error": null
},
"measurement_calculated_values": {
"corrected_sds": -2.423175012664367,
"corrected_centile": 0.7693,
"corrected_centile_band": "This height measurement is below the normal range.",
"chronological_sds": -2.423175012664367,
"chronological_centile": 0.7693,
"chronological_centile_band": "This height measurement is below the normal range.",
"corrected_measurement_error": null,
"chronological_measurement_error": null,
"corrected_percentage_median_bmi": null,
"chronological_percentage_median_bmi": null
},
"plottable_data": {
"centile_data": {
"chronological_decimal_age_data": {
"x": 8.167008898015059,
"y": 115.0,
"b": 10.0,
"centile": 0.7693,
"sds": -2.423175012664367,
"bone_age_label": "This bone age is advanced",
"events_text": [
"Growth hormone start",
"Growth Hormone Deficiency diagnosis"
],
"bone_age_type": "greulich-pyle",
"bone_age_sds": 2.0,
"bone_age_centile": 98.0,
"observation_error": null,
"age_type": "chronological_age",
"calendar_age": "8 years and 2 months",
"lay_comment": "Your child was born at term. No correction for gestation has been made.",
"clinician_comment": "Born at term. No correction for gestation has been made.",
"age_error": null,
"centile_band": "This height measurement is below the normal range.",
"observation_value_error": null
},
"corrected_decimal_age_data": {
"x": 8.167008898015059,
"y": 115.0,
"b": 10.0,
"centile": 0.7693,
"sds": -2.423175012664367,
"bone_age_label": "This bone age is advanced",
"events_text": [
"Growth hormone start",
"Growth Hormone Deficiency diagnosis"
],
"bone_age_type": "greulich-pyle",
"bone_age_sds": 2.0,
"bone_age_centile": 98.0,
"observation_error": null,
"age_type": "corrected_age",
"calendar_age": "8 years and 2 months",
"corrected_gestational_age": "",
"lay_comment": "Your child was born at term. No correction for gestation has been made.",
"clinician_comment": "Born at term. No correction for gestation has been made.",
"age_error": null,
"centile_band": "This height measurement is below the normal range.",
"observation_value_error": null
}
},
"sds_data": {
"chronological_decimal_age_data": {
"x": 8.167008898015059,
"y": -2.423175012664367,
"b": 10.0,
"centile": 0.7693,
"sds": null,
"bone_age_label": "This bone age is advanced",
"events_text": [
"Growth hormone start",
"Growth Hormone Deficiency diagnosis"
],
"bone_age_type": "greulich-pyle",
"bone_age_sds": 2.0,
"bone_age_centile": 98.0,
"observation_error": null,
"age_type": "chronological_age",
"calendar_age": "8 years and 2 months",
"lay_comment": "Your child was born at term. No correction for gestation has been made.",
"clinician_comment": "Born at term. No correction for gestation has been made.",
"age_error": null,
"centile_band": "This height measurement is below the normal range.",
"observation_value_error": null
},
"corrected_decimal_age_data": {
"x": 8.167008898015059,
"y": -2.423175012664367,
"b": 10.0,
"centile": 0.7693,
"sds": null,
"bone_age_label": "This bone age is advanced",
"events_text": [
"Growth hormone start",
"Growth Hormone Deficiency diagnosis"
],
"bone_age_type": "greulich-pyle",
"bone_age_sds": 2.0,
"bone_age_centile": 98.0,
"observation_error": null,
"age_type": "corrected_age",
"calendar_age": "8 years and 2 months",
"corrected_gestational_age": "",
"lay_comment": "Your child was born at term. No correction for gestation has been made.",
"clinician_comment": "Born at term. No correction for gestation has been made.",
"age_error": null,
"centile_band": "This height measurement is below the normal range.",
"observation_value_error": null
}
}
},
"bone_age": {
"bone_age": 10.0,
"bone_age_type": "greulich-pyle",
"bone_age_sds": 2.0,
"bone_age_centile": 98.0,
"bone_age_text": "This bone age is advanced"
},
"events_data": {
"events_text": [
"Growth hormone start",
"Growth Hormone Deficiency diagnosis"
]
}
}
1,875 changes: 1,874 additions & 1 deletion tests/test_data/test_cdc_fictional_child_data_valid.json

Large diffs are not rendered by default.

Loading

0 comments on commit 773ee71

Please sign in to comment.