# Validation limits: upper and lower limits for gestation, bone health and parental height **Category:** [Growth Charts](https://forum.rcpch.tech/c/rcpch-digital-growth-charts/6) **Created:** 2025-07-21 08:27 UTC **Views:** 23 **Replies:** 3 **URL:** https://forum.rcpch.tech/t/validation-limits-upper-and-lower-limits-for-gestation-bone-health-and-parental-height/527 --- ## Post #1 by @Lindsey Hi, Please can you let me know the upper and lower limits for Maternal height Paternal height Gestation weeks Gestation Days Bone Age --- ## Post #2 by @pacharanero Great question @Lindsey, I've outlined some responses below, and of course if there's anything still unclear we will work on the documentation and source files to make it clearer. ### Upstream validation constants in rcpchgrowth-python All the validation constants used throughout our codebase are derived from this one master constants file in the RCPCHGrowth Python package, which internally our API uses to do the calculations. https://github.com/rcpch/rcpchgrowth-python/blob/live/rcpchgrowth/constants/validation_constants.py I would always recommend to consult that file, but for convenience: * Maternal and Paternal height is limited on the lower end to **50cm**. * Gestation Weeks minimum is **22** weeks and maximum is **44** weeks * Gestation Days is used **in combination** with the Gestation Weeks (the way gestation is expressed clinically is Gestation Weeks + Gestation Days ie. '34+3' means 34 weeks and 3 days). Gestation Days can therefore only have values from **0 to 6 days**. ### SDS-based advisories and errors For all other parameters we moved away from a hard-coded single cutoff value, because this just didn't work well - what would be a dangerous error at one stage of development might well be within reasonable variation at another stage of development. We moved to a system of limits based on the **number of standard deviations away from the median**. For example we generate an 'advisory' for height, weight, or OFC at **±4 standard deviations**, suggesting that the value is extreme (but not completely impossible). For larger deviations, we report that the value is an error - *implausibly* small or large - if it is **±8 standard deviations away from the median**. I appreciate that this can make it difficult for you to implement tests without knowing some values for what inputs 'should' result in an advisory or an error. I will raise an [issue](https://github.com/rcpch/digital-growth-charts-server/issues/253) so that we generate some 'known bad' numbers for various ages, and put them in our documentation. As a 'holding' option, you can use the values we use in the API Server tests, which should be reliably out of bounds. https://github.com/rcpch/digital-growth-charts-server/blob/live/tests/test_ukwho.py ### Bone Age Bone Age is a value that is added to the API request but no validation or calculation is applied, we trust whatever the user inputs, and it is simply displayed alongside the other data on the chart. It's merely an annotation for clinician convenience. Same applies to Events. I know that seems weird but if you can get hold of an example Bone Age report you will see it is calculated/estimated by a clinical expert on the basis of an Xray skeletal survey. It can't be calculated by our API (yet! - there are online platforms that seem to be able to do it though! https://bxonline.bonexpert.com/select) ### API request validation There is a small amount of additional validation applied in the API server, mainly around the type of input that is permitted, or where the input must select from a list, this implements an enum selection: https://github.com/rcpch/digital-growth-charts-server/blob/live/schemas/request_validation_classes.py --- ## Post #3 by @eatyourpeas In follow up to this - there is a discussion exactly about this [here](https://github.com/rcpch/digital-growth-charts-react-component-library/issues/137) tldr; Based on +/- 8 SDS | reference | sex | minimum height (cm) | maximum height (cm) | |---|---|---|---| | uk-who | male | 121.60 | 233.08 | | uk-who | female | 115.33 | 211.95 | | cdc | male | 117.91 | 232.61 | | cdc | female | 110.52 | 214.34 | --- ## Post #4 by @michael.barton Thanks @pacharanero and @eatyourpeas! @Lindsey whilst we’re unlikely to change these limits any time soon in general we’d prefer that you don’t hard code them in your application. We should return an error useful enough to show directly to your users, if not let us know and we will improve them. We do not charge for invalid requests. --- **Canonical:** https://forum.rcpch.tech/t/validation-limits-upper-and-lower-limits-for-gestation-bone-health-and-parental-height/527 **Original content:** https://forum.rcpch.tech/t/validation-limits-upper-and-lower-limits-for-gestation-bone-health-and-parental-height/527