diff --git a/openapi.json b/openapi.json index 642095b9..8cdafb75 100644 --- a/openapi.json +++ b/openapi.json @@ -459,7 +459,7 @@ "utilities" ], "summary": "Mid Parental Height Endpoint", - "description": "## Mid-parental-height Endpoint\n\n* Calculates mid-parental-height\n* Returns mid-parental centile and SDS, as well as centile lines for mid-parental height\n* and +2 SD and -SD", + "description": "## Mid-parental-height Endpoint\n\n* Calculates mid-parental-height\n* Returns mid-parental centile and SDS, as well as centile lines for mid-parental height\n* and +2 SD and -SD\n\nNote any paternal height above 253cm or maternal height above 250cm in a boy or\nany maternal height above 237 cm or any paternal height above 249 cm in a girl will return\na midparental height whose centile is 100 which generates an error when calculating a plottable centile\n(since 100% is not technically plottable)\nGiven that the tallest woman ever to live is Rumeysa Gelgi (born 1979) is 215.16 cm\nand the tallest man was 272 cm it seems reasonable to cap the upper limit for validation purposes\nto 245 cm in either parent (which is over 8 foot).\n\nif this function is called outside of the API and heights above those detailed above are higher,\nan empty array for that centile is returned. This is likely not compatible with the charting component\nas it will not be possible to render the area between the centiles if one is empty.", "operationId": "mid_parental_height_endpoint_utilities_mid_parental_height_post", "requestBody": { "content": { @@ -1972,12 +1972,14 @@ "properties": { "height_paternal": { "type": "number", + "maximum": 245.0, "minimum": 50.0, "title": "Height Paternal", "description": "The height of the child's biological father, passed as float, measured in centimeters" }, "height_maternal": { "type": "number", + "maximum": 245.0, "minimum": 50.0, "title": "Height Maternal", "description": "The height of the child's biological mother, passed as float, measured in centimeters" diff --git a/routers/utilities.py b/routers/utilities.py index 37ecd520..ae3ae4b4 100644 --- a/routers/utilities.py +++ b/routers/utilities.py @@ -18,7 +18,9 @@ ) -@utilities.post('/mid-parental-height', tags=['utilities'], response_model=MidParentalHeightResponse) +@utilities.post( + "/mid-parental-height", tags=["utilities"], response_model=MidParentalHeightResponse +) def mid_parental_height_endpoint(mid_parental_height_request: MidParentalHeightRequest): """ ## Mid-parental-height Endpoint @@ -26,12 +28,26 @@ def mid_parental_height_endpoint(mid_parental_height_request: MidParentalHeightR * Calculates mid-parental-height * Returns mid-parental centile and SDS, as well as centile lines for mid-parental height * and +2 SD and -SD + + Note any paternal height above 253cm or maternal height above 250cm in a boy or + any maternal height above 237 cm or any paternal height above 249 cm in a girl will return + a midparental height whose centile is 100 which generates an error when calculating a plottable centile + (since 100% is not technically plottable) + Given that the tallest woman ever to live is Rumeysa Gelgi (born 1979) is 215.16 cm + and the tallest man was 272 cm it seems reasonable to cap the upper limit for validation purposes + to 245 cm in either parent (which is over 8 foot). + + if this function is called outside of the API and heights above those detailed above are higher, + an empty array for that centile is returned. This is likely not compatible with the charting component + as it will not be possible to render the area between the centiles if one is empty. """ - height = mid_parental_height(mid_parental_height_request.height_paternal, - mid_parental_height_request.height_maternal, - mid_parental_height_request.sex) - + height = mid_parental_height( + mid_parental_height_request.height_paternal, + mid_parental_height_request.height_maternal, + mid_parental_height_request.sex, + ) + """ ## Calculate SDS and centile """ @@ -44,12 +60,12 @@ def mid_parental_height_endpoint(mid_parental_height_request: MidParentalHeightR mph_upper_centile_data = None try: mph_sds = sds_for_measurement( - reference=constants.UK_WHO, - age=20.0, - measurement_method=constants.HEIGHT, - observation_value=height, - sex=mid_parental_height_request.sex - ) + reference=constants.UK_WHO, + age=20.0, + measurement_method=constants.HEIGHT, + observation_value=height, + sex=mid_parental_height_request.sex, + ) except Exception: print("It was not possible to calculate midparental SDS.") @@ -58,39 +74,44 @@ def mid_parental_height_endpoint(mid_parental_height_request: MidParentalHeightR mph_centile = centile(mph_sds) except: print("It was not possible to calculate a centile from midparental height.") - + try: mph_centile_data = create_chart( reference=UK_WHO, centile_format=[mph_centile], measurement_method=constants.HEIGHT, - sex=mid_parental_height_request.sex + sex=mid_parental_height_request.sex, ) except Exception as e: print(e) - + mph_centile_data = [] + try: lower_centile = centile(mph_sds - 2) mph_lower_centile_data = create_chart( reference=UK_WHO, centile_format=[lower_centile], measurement_method=constants.HEIGHT, - sex=mid_parental_height_request.sex + sex=mid_parental_height_request.sex, ) - + except Exception as e: print(e) - + mph_lower_centile_data = [] + try: upper_centile = centile(mph_sds + 2) + mph_upper_centile_data = create_chart( reference=UK_WHO, centile_format=[upper_centile], measurement_method=constants.HEIGHT, - sex=mid_parental_height_request.sex + sex=mid_parental_height_request.sex, ) + except Exception as e: - print(e) + mph_upper_centile_data = [] + print(f"Error: {e}") try: upper_height = measurement_from_sds( @@ -98,14 +119,14 @@ def mid_parental_height_endpoint(mid_parental_height_request: MidParentalHeightR age=20, sex=mid_parental_height_request.sex, measurement_method=constants.HEIGHT, - requested_sds=mph_sds + 2 + requested_sds=mph_sds + 2, ) lower_height = measurement_from_sds( reference=constants.UK_WHO, age=20, sex=mid_parental_height_request.sex, measurement_method=constants.HEIGHT, - requested_sds=mph_sds - 2 + requested_sds=mph_sds - 2, ) except Exception as e: print(e) @@ -118,5 +139,5 @@ def mid_parental_height_endpoint(mid_parental_height_request: MidParentalHeightR "mid_parental_height_lower_centile_data": mph_lower_centile_data, "mid_parental_height_upper_centile_data": mph_upper_centile_data, "mid_parental_height_lower_value": lower_height, - "mid_parental_height_upper_value": upper_height + "mid_parental_height_upper_value": upper_height, } diff --git a/schemas/request_validation_classes.py b/schemas/request_validation_classes.py index 55fa5b39..210b7c56 100644 --- a/schemas/request_validation_classes.py +++ b/schemas/request_validation_classes.py @@ -23,7 +23,6 @@ class MeasurementRequest(BaseModel): We aim to specify all textual information, constraints, and validation here. It all ends up in the openAPI documentation, automagically. """ - gestation_days: Optional[int] = Field( 0, ge=0, @@ -95,7 +94,6 @@ def birth_date_not_after_clinic_date(cls, v, info: FieldValidationInfo): raise ValueError("Birth date cannot be after observation date.") return v - cole_centiles = COLE_TWO_THIRDS_SDS_NINE_CENTILES three_percent_centiles = THREE_PERCENT_CENTILES @@ -216,13 +214,36 @@ class FictionalChildRequest(BaseModel): class MidParentalHeightRequest(BaseModel): height_paternal: float = Field( ge=50, + le=245, description="The height of the child's biological father, passed as float, measured in centimeters", ) height_maternal: float = Field( ge=50, + le=245, description="The height of the child's biological mother, passed as float, measured in centimeters", ) sex: Literal["male", "female"] = Field( ..., description="The sex of the patient, as a string value which can either be `male` or `female`. Abbreviations or alternatives are not accepted.", ) + + +""" +the shortest man in the world was 54.6 cm Chandra Bahadur Dangi +the shortest woman in the world is Jyoti Kishanji Amge at 62.8 cm +lower limit to paternal and maternal height here therefore set at 50 cm +this will need adding to the constants in RCPCHGrowth + +Upper limits are more complicated. +Note any paternal height above 253cm or maternal height above 250cm in a boy or +any maternal height above 237 cm or any paternal height above 249 cm in a girl will return +a midparental height whose centile is 100 which generates an error when calculating a plottable centile +(since 100% is not technically plottable) +Given that the tallest woman ever to live is Rumeysa Gelgi (born 1979) is 215.16 cm +and the tallest man was 272 cm it seems reasonable to cap the upper limit for validation purposes +to 245 cm in either parent (which is over 8 foot). + +if this function is called outside of the API and heights above those detailed above are higher, +an empty array for that centile is returned. This is likely not compatible with the charting component +as it will not be possible to render the area between the centiles if one is empty. +""" diff --git a/tests/test_data/test_midparental_height_valid.json b/tests/test_data/test_midparental_height_valid.json new file mode 100644 index 00000000..0d00c98a --- /dev/null +++ b/tests/test_data/test_midparental_height_valid.json @@ -0,0 +1 @@ +{"mid_parental_height":176.0,"mid_parental_height_sds":-0.19231628692476224,"mid_parental_height_centile":42.3747230699665,"mid_parental_height_centile_data":[{"uk90_preterm":{"male":{"height":[{"sds":-0.19,"centile":42.3747230699665,"data":[{"l":42.3747230699665,"x":-0.2875,"y":34.8701},{"l":42.3747230699665,"x":-0.2683,"y":35.8742},{"l":42.3747230699665,"x":-0.2491,"y":36.8813},{"l":42.3747230699665,"x":-0.23,"y":37.8873},{"l":42.3747230699665,"x":-0.2108,"y":38.9039},{"l":42.3747230699665,"x":-0.1916,"y":39.9568},{"l":42.3747230699665,"x":-0.1725,"y":41.0663},{"l":42.3747230699665,"x":-0.1533,"y":42.2171},{"l":42.3747230699665,"x":-0.1342,"y":43.3849},{"l":42.3747230699665,"x":-0.115,"y":44.5463},{"l":42.3747230699665,"x":-0.0958,"y":45.6837},{"l":42.3747230699665,"x":-0.0767,"y":46.7888},{"l":42.3747230699665,"x":-0.0575,"y":47.8536},{"l":42.3747230699665,"x":-0.0383,"y":48.853},{"l":42.3747230699665,"x":-0.0192,"y":49.7496},{"l":42.3747230699665,"x":-0.0,"y":50.5333},{"l":42.3747230699665,"x":0.0192,"y":51.2385},{"l":42.3747230699665,"x":0.0383,"y":51.9033},{"l":42.3747230699665,"x":0.0383,"y":51.9033}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk_who_infant":{"male":{"height":[{"sds":-0.19,"centile":42.3747230699665,"data":[{"l":42.3747230699665,"x":0.0383,"y":51.9785},{"l":42.3747230699665,"x":0.0575,"y":53.0199},{"l":42.3747230699665,"x":0.0767,"y":54.0147},{"l":42.3747230699665,"x":0.0958,"y":54.9613},{"l":42.3747230699665,"x":0.115,"y":55.8571},{"l":42.3747230699665,"x":0.1342,"y":56.7041},{"l":42.3747230699665,"x":0.1533,"y":57.5057},{"l":42.3747230699665,"x":0.1725,"y":58.2683},{"l":42.3747230699665,"x":0.1916,"y":58.9998},{"l":42.3747230699665,"x":0.2108,"y":59.7001},{"l":42.3747230699665,"x":0.23,"y":60.3693},{"l":42.3747230699665,"x":0.2491,"y":61.0082},{"l":42.3747230699665,"x":0.2683,"y":61.6179},{"l":42.3747230699665,"x":0.2875,"y":62.1996},{"l":42.3747230699665,"x":0.3066,"y":62.7546},{"l":42.3747230699665,"x":0.3258,"y":63.2843},{"l":42.3747230699665,"x":0.345,"y":63.7897},{"l":42.3747230699665,"x":0.3641,"y":64.2725},{"l":42.3747230699665,"x":0.3833,"y":64.7349},{"l":42.3747230699665,"x":0.4025,"y":65.1787},{"l":42.3747230699665,"x":0.4216,"y":65.6058},{"l":42.3747230699665,"x":0.4408,"y":66.0185},{"l":42.3747230699665,"x":0.46,"y":66.4173},{"l":42.3747230699665,"x":0.4791,"y":66.8037},{"l":42.3747230699665,"x":0.4983,"y":67.179},{"l":42.3747230699665,"x":0.5175,"y":67.546},{"l":42.3747230699665,"x":0.5366,"y":67.9044},{"l":42.3747230699665,"x":0.5558,"y":68.2549},{"l":42.3747230699665,"x":0.5749,"y":68.5986},{"l":42.3747230699665,"x":0.5941,"y":68.9369},{"l":42.3747230699665,"x":0.6133,"y":69.2704},{"l":42.3747230699665,"x":0.6324,"y":69.599},{"l":42.3747230699665,"x":0.6516,"y":69.9232},{"l":42.3747230699665,"x":0.6708,"y":70.2438},{"l":42.3747230699665,"x":0.6899,"y":70.5619},{"l":42.3747230699665,"x":0.7091,"y":70.8766},{"l":42.3747230699665,"x":0.7283,"y":71.188},{"l":42.3747230699665,"x":0.7474,"y":71.4962},{"l":42.3747230699665,"x":0.7666,"y":71.8016},{"l":42.3747230699665,"x":0.7858,"y":72.104},{"l":42.3747230699665,"x":0.8049,"y":72.4035},{"l":42.3747230699665,"x":0.8241,"y":72.6999},{"l":42.3747230699665,"x":0.8433,"y":72.9933},{"l":42.3747230699665,"x":0.8624,"y":73.2837},{"l":42.3747230699665,"x":0.8816,"y":73.5713},{"l":42.3747230699665,"x":0.9008,"y":73.8562},{"l":42.3747230699665,"x":0.9199,"y":74.1385},{"l":42.3747230699665,"x":0.9391,"y":74.4183},{"l":42.3747230699665,"x":0.9582,"y":74.6956},{"l":42.3747230699665,"x":0.9774,"y":74.9706},{"l":42.3747230699665,"x":0.9966,"y":75.2433},{"l":42.3747230699665,"x":1.0157,"y":75.5141},{"l":42.3747230699665,"x":1.0349,"y":75.7827},{"l":42.3747230699665,"x":1.0541,"y":76.0492},{"l":42.3747230699665,"x":1.0732,"y":76.3136},{"l":42.3747230699665,"x":1.0924,"y":76.5759},{"l":42.3747230699665,"x":1.1116,"y":76.8361},{"l":42.3747230699665,"x":1.1307,"y":77.0943},{"l":42.3747230699665,"x":1.1499,"y":77.3506},{"l":42.3747230699665,"x":1.1691,"y":77.605},{"l":42.3747230699665,"x":1.1882,"y":77.8574},{"l":42.3747230699665,"x":1.2074,"y":78.1081},{"l":42.3747230699665,"x":1.2266,"y":78.357},{"l":42.3747230699665,"x":1.2457,"y":78.6042},{"l":42.3747230699665,"x":1.2649,"y":78.8499},{"l":42.3747230699665,"x":1.2841,"y":79.0939},{"l":42.3747230699665,"x":1.3032,"y":79.3364},{"l":42.3747230699665,"x":1.3224,"y":79.5773},{"l":42.3747230699665,"x":1.3415,"y":79.8167},{"l":42.3747230699665,"x":1.3607,"y":80.0547},{"l":42.3747230699665,"x":1.3799,"y":80.2911},{"l":42.3747230699665,"x":1.399,"y":80.5261},{"l":42.3747230699665,"x":1.4182,"y":80.7596},{"l":42.3747230699665,"x":1.4374,"y":80.9917},{"l":42.3747230699665,"x":1.4565,"y":81.2223},{"l":42.3747230699665,"x":1.4757,"y":81.4515},{"l":42.3747230699665,"x":1.4949,"y":81.6792},{"l":42.3747230699665,"x":1.514,"y":81.9055},{"l":42.3747230699665,"x":1.5332,"y":82.1303},{"l":42.3747230699665,"x":1.5524,"y":82.3537},{"l":42.3747230699665,"x":1.5715,"y":82.5758},{"l":42.3747230699665,"x":1.5907,"y":82.7965},{"l":42.3747230699665,"x":1.6099,"y":83.0158},{"l":42.3747230699665,"x":1.629,"y":83.2338},{"l":42.3747230699665,"x":1.6482,"y":83.4506},{"l":42.3747230699665,"x":1.6674,"y":83.6661},{"l":42.3747230699665,"x":1.6865,"y":83.8805},{"l":42.3747230699665,"x":1.7057,"y":84.0937},{"l":42.3747230699665,"x":1.7248,"y":84.3056},{"l":42.3747230699665,"x":1.744,"y":84.5164},{"l":42.3747230699665,"x":1.7632,"y":84.726},{"l":42.3747230699665,"x":1.7823,"y":84.9344},{"l":42.3747230699665,"x":1.8015,"y":85.1416},{"l":42.3747230699665,"x":1.8207,"y":85.3478},{"l":42.3747230699665,"x":1.8398,"y":85.5529},{"l":42.3747230699665,"x":1.859,"y":85.757},{"l":42.3747230699665,"x":1.8782,"y":85.96},{"l":42.3747230699665,"x":1.8973,"y":86.1621},{"l":42.3747230699665,"x":1.9165,"y":86.3632},{"l":42.3747230699665,"x":1.9357,"y":86.5618},{"l":42.3747230699665,"x":1.9548,"y":86.7604},{"l":42.3747230699665,"x":1.974,"y":86.959},{"l":42.3747230699665,"x":1.9932,"y":87.1576},{"l":42.3747230699665,"x":2.0,"y":87.2286}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk_who_child":{"male":{"height":[{"sds":-0.19,"centile":42.3747230699665,"data":[{"l":42.3747230699665,"x":2.0,"y":86.5285},{"l":42.3747230699665,"x":2.0192,"y":86.7227},{"l":42.3747230699665,"x":2.1025,"y":87.5639},{"l":42.3747230699665,"x":2.1858,"y":88.382},{"l":42.3747230699665,"x":2.2692,"y":89.179},{"l":42.3747230699665,"x":2.3525,"y":89.9553},{"l":42.3747230699665,"x":2.4358,"y":90.7103},{"l":42.3747230699665,"x":2.5192,"y":91.4451},{"l":42.3747230699665,"x":2.6025,"y":92.1608},{"l":42.3747230699665,"x":2.6858,"y":92.859},{"l":42.3747230699665,"x":2.7692,"y":93.5418},{"l":42.3747230699665,"x":2.8525,"y":94.2116},{"l":42.3747230699665,"x":2.9358,"y":94.8702},{"l":42.3747230699665,"x":3.0192,"y":95.5189},{"l":42.3747230699665,"x":3.1025,"y":96.1583},{"l":42.3747230699665,"x":3.1858,"y":96.7888},{"l":42.3747230699665,"x":3.2692,"y":97.411},{"l":42.3747230699665,"x":3.3525,"y":98.0246},{"l":42.3747230699665,"x":3.4358,"y":98.6295},{"l":42.3747230699665,"x":3.5192,"y":99.2253},{"l":42.3747230699665,"x":3.6025,"y":99.8129},{"l":42.3747230699665,"x":3.6858,"y":100.3924},{"l":42.3747230699665,"x":3.7692,"y":100.9648},{"l":42.3747230699665,"x":3.8525,"y":101.5308},{"l":42.3747230699665,"x":3.9358,"y":102.0913},{"l":42.3747230699665,"x":4.0,"y":102.5207}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk90_child":{"male":{"height":[{"sds":-0.19,"centile":42.3747230699665,"data":[{"l":42.3747230699665,"x":4.0,"y":101.7},{"l":42.3747230699665,"x":4.0833,"y":102.263},{"l":42.3747230699665,"x":4.1667,"y":102.8362},{"l":42.3747230699665,"x":4.25,"y":103.4093},{"l":42.3747230699665,"x":4.3333,"y":103.9823},{"l":42.3747230699665,"x":4.4167,"y":104.5754},{"l":42.3747230699665,"x":4.5,"y":105.1687},{"l":42.3747230699665,"x":4.5833,"y":105.7617},{"l":42.3747230699665,"x":4.6667,"y":106.3651},{"l":42.3747230699665,"x":4.75,"y":106.9585},{"l":42.3747230699665,"x":4.8333,"y":107.5521},{"l":42.3747230699665,"x":4.9167,"y":108.1456},{"l":42.3747230699665,"x":5.0,"y":108.7194},{"l":42.3747230699665,"x":5.0833,"y":109.2836},{"l":42.3747230699665,"x":5.1667,"y":109.8475},{"l":42.3747230699665,"x":5.25,"y":110.3921},{"l":42.3747230699665,"x":5.3333,"y":110.9166},{"l":42.3747230699665,"x":5.4167,"y":111.4512},{"l":42.3747230699665,"x":5.5,"y":111.9659},{"l":42.3747230699665,"x":5.5833,"y":112.4707},{"l":42.3747230699665,"x":5.6667,"y":112.9857},{"l":42.3747230699665,"x":5.75,"y":113.4907},{"l":42.3747230699665,"x":5.8333,"y":113.9957},{"l":42.3747230699665,"x":5.9167,"y":114.5007},{"l":42.3747230699665,"x":6.0,"y":114.9958},{"l":42.3747230699665,"x":6.0833,"y":115.501},{"l":42.3747230699665,"x":6.1667,"y":115.9961},{"l":42.3747230699665,"x":6.25,"y":116.4914},{"l":42.3747230699665,"x":6.3333,"y":116.9867},{"l":42.3747230699665,"x":6.4167,"y":117.472},{"l":42.3747230699665,"x":6.5,"y":117.9673},{"l":42.3747230699665,"x":6.5833,"y":118.4527},{"l":42.3747230699665,"x":6.6667,"y":118.9378},{"l":42.3747230699665,"x":6.75,"y":119.433},{"l":42.3747230699665,"x":6.8333,"y":119.9181},{"l":42.3747230699665,"x":6.9167,"y":120.4131},{"l":42.3747230699665,"x":7.0,"y":120.9081},{"l":42.3747230699665,"x":7.0833,"y":121.4029},{"l":42.3747230699665,"x":7.1667,"y":121.8978},{"l":42.3747230699665,"x":7.25,"y":122.3926},{"l":42.3747230699665,"x":7.3333,"y":122.8875},{"l":42.3747230699665,"x":7.4167,"y":123.3823},{"l":42.3747230699665,"x":7.5,"y":123.877},{"l":42.3747230699665,"x":7.5833,"y":124.3719},{"l":42.3747230699665,"x":7.6667,"y":124.8569},{"l":42.3747230699665,"x":7.75,"y":125.3516},{"l":42.3747230699665,"x":7.8333,"y":125.8267},{"l":42.3747230699665,"x":7.9167,"y":126.3117},{"l":42.3747230699665,"x":8.0,"y":126.7967},{"l":42.3747230699665,"x":8.0833,"y":127.2715},{"l":42.3747230699665,"x":8.1667,"y":127.7366},{"l":42.3747230699665,"x":8.25,"y":128.2017},{"l":42.3747230699665,"x":8.3333,"y":128.6666},{"l":42.3747230699665,"x":8.4167,"y":129.1116},{"l":42.3747230699665,"x":8.5,"y":129.5566},{"l":42.3747230699665,"x":8.5833,"y":130.0014},{"l":42.3747230699665,"x":8.6667,"y":130.4461},{"l":42.3747230699665,"x":8.75,"y":130.871},{"l":42.3747230699665,"x":8.8333,"y":131.3056},{"l":42.3747230699665,"x":8.9167,"y":131.7302},{"l":42.3747230699665,"x":9.0,"y":132.1648},{"l":42.3747230699665,"x":9.0833,"y":132.5891},{"l":42.3747230699665,"x":9.1667,"y":133.0134},{"l":42.3747230699665,"x":9.25,"y":133.4375},{"l":42.3747230699665,"x":9.3333,"y":133.8519},{"l":42.3747230699665,"x":9.4167,"y":134.2756},{"l":42.3747230699665,"x":9.5,"y":134.6897},{"l":42.3747230699665,"x":9.5833,"y":135.1036},{"l":42.3747230699665,"x":9.6667,"y":135.5174},{"l":42.3747230699665,"x":9.75,"y":135.9312},{"l":42.3747230699665,"x":9.8333,"y":136.3546},{"l":42.3747230699665,"x":9.9167,"y":136.7777},{"l":42.3747230699665,"x":10.0,"y":137.2009},{"l":42.3747230699665,"x":10.0833,"y":137.624},{"l":42.3747230699665,"x":10.1667,"y":138.0567},{"l":42.3747230699665,"x":10.25,"y":138.4795},{"l":42.3747230699665,"x":10.3333,"y":138.902},{"l":42.3747230699665,"x":10.4167,"y":139.3145},{"l":42.3747230699665,"x":10.5,"y":139.7271},{"l":42.3747230699665,"x":10.5833,"y":140.1297},{"l":42.3747230699665,"x":10.6667,"y":140.532},{"l":42.3747230699665,"x":10.75,"y":140.9244},{"l":42.3747230699665,"x":10.8333,"y":141.3167},{"l":42.3747230699665,"x":10.9167,"y":141.7088},{"l":42.3747230699665,"x":11.0,"y":142.0912},{"l":42.3747230699665,"x":11.0833,"y":142.4832},{"l":42.3747230699665,"x":11.1667,"y":142.8653},{"l":42.3747230699665,"x":11.25,"y":143.247},{"l":42.3747230699665,"x":11.3333,"y":143.6387},{"l":42.3747230699665,"x":11.4167,"y":144.0204},{"l":42.3747230699665,"x":11.5,"y":144.4219},{"l":42.3747230699665,"x":11.5833,"y":144.8234},{"l":42.3747230699665,"x":11.6667,"y":145.2342},{"l":42.3747230699665,"x":11.75,"y":145.6651},{"l":42.3747230699665,"x":11.8333,"y":146.0959},{"l":42.3747230699665,"x":11.9167,"y":146.5364},{"l":42.3747230699665,"x":12.0,"y":146.9768},{"l":42.3747230699665,"x":12.0833,"y":147.4367},{"l":42.3747230699665,"x":12.1667,"y":147.9067},{"l":42.3747230699665,"x":12.25,"y":148.3965},{"l":42.3747230699665,"x":12.3333,"y":148.886},{"l":42.3747230699665,"x":12.4167,"y":149.3956},{"l":42.3747230699665,"x":12.5,"y":149.9051},{"l":42.3747230699665,"x":12.5833,"y":150.4344},{"l":42.3747230699665,"x":12.6667,"y":150.9739},{"l":42.3747230699665,"x":12.75,"y":151.5232},{"l":42.3747230699665,"x":12.8333,"y":152.0923},{"l":42.3747230699665,"x":12.9167,"y":152.6718},{"l":42.3747230699665,"x":13.0,"y":153.2615},{"l":42.3747230699665,"x":13.0833,"y":153.8611},{"l":42.3747230699665,"x":13.1667,"y":154.4714},{"l":42.3747230699665,"x":13.25,"y":155.0916},{"l":42.3747230699665,"x":13.3333,"y":155.7226},{"l":42.3747230699665,"x":13.4167,"y":156.3542},{"l":42.3747230699665,"x":13.5,"y":156.9861},{"l":42.3747230699665,"x":13.5833,"y":157.6287},{"l":42.3747230699665,"x":13.6667,"y":158.2621},{"l":42.3747230699665,"x":13.75,"y":158.8865},{"l":42.3747230699665,"x":13.8333,"y":159.5218},{"l":42.3747230699665,"x":13.9167,"y":160.1474},{"l":42.3747230699665,"x":14.0,"y":160.7644},{"l":42.3747230699665,"x":14.0833,"y":161.3722},{"l":42.3747230699665,"x":14.1667,"y":161.9809},{"l":42.3747230699665,"x":14.25,"y":162.5708},{"l":42.3747230699665,"x":14.3333,"y":163.1515},{"l":42.3747230699665,"x":14.4167,"y":163.7329},{"l":42.3747230699665,"x":14.5,"y":164.2856},{"l":42.3747230699665,"x":14.5833,"y":164.8389},{"l":42.3747230699665,"x":14.6667,"y":165.3732},{"l":42.3747230699665,"x":14.75,"y":165.8979},{"l":42.3747230699665,"x":14.8333,"y":166.4038},{"l":42.3747230699665,"x":14.9167,"y":166.8999},{"l":42.3747230699665,"x":15.0,"y":167.3769},{"l":42.3747230699665,"x":15.0833,"y":167.8441},{"l":42.3747230699665,"x":15.1667,"y":168.2918},{"l":42.3747230699665,"x":15.25,"y":168.7201},{"l":42.3747230699665,"x":15.3333,"y":169.1385},{"l":42.3747230699665,"x":15.4167,"y":169.5368},{"l":42.3747230699665,"x":15.5,"y":169.9154},{"l":42.3747230699665,"x":15.5833,"y":170.2841},{"l":42.3747230699665,"x":15.6667,"y":170.643},{"l":42.3747230699665,"x":15.75,"y":170.9913},{"l":42.3747230699665,"x":15.8333,"y":171.3099},{"l":42.3747230699665,"x":15.9167,"y":171.6283},{"l":42.3747230699665,"x":16.0,"y":171.9265},{"l":42.3747230699665,"x":16.0833,"y":172.2045},{"l":42.3747230699665,"x":16.1667,"y":172.4823},{"l":42.3747230699665,"x":16.25,"y":172.7396},{"l":42.3747230699665,"x":16.3333,"y":172.9867},{"l":42.3747230699665,"x":16.4167,"y":173.2139},{"l":42.3747230699665,"x":16.5,"y":173.4402},{"l":42.3747230699665,"x":16.5833,"y":173.6467},{"l":42.3747230699665,"x":16.6667,"y":173.8429},{"l":42.3747230699665,"x":16.75,"y":174.0285},{"l":42.3747230699665,"x":16.8333,"y":174.2138},{"l":42.3747230699665,"x":16.9167,"y":174.3793},{"l":42.3747230699665,"x":17.0,"y":174.5342},{"l":42.3747230699665,"x":17.0833,"y":174.6888},{"l":42.3747230699665,"x":17.1667,"y":174.8331},{"l":42.3747230699665,"x":17.25,"y":174.9576},{"l":42.3747230699665,"x":17.3333,"y":175.0814},{"l":42.3747230699665,"x":17.4167,"y":175.2049},{"l":42.3747230699665,"x":17.5,"y":175.3082},{"l":42.3747230699665,"x":17.5833,"y":175.4013},{"l":42.3747230699665,"x":17.6667,"y":175.494},{"l":42.3747230699665,"x":17.75,"y":175.5662},{"l":42.3747230699665,"x":17.8333,"y":175.6383},{"l":42.3747230699665,"x":17.9167,"y":175.6904},{"l":42.3747230699665,"x":18.0,"y":175.742},{"l":42.3747230699665,"x":18.0833,"y":175.7834},{"l":42.3747230699665,"x":18.1667,"y":175.8248},{"l":42.3747230699665,"x":18.25,"y":175.8556},{"l":42.3747230699665,"x":18.3333,"y":175.8864},{"l":42.3747230699665,"x":18.4167,"y":175.9069},{"l":42.3747230699665,"x":18.5,"y":175.9175},{"l":42.3747230699665,"x":18.5833,"y":175.9278},{"l":42.3747230699665,"x":18.6667,"y":175.9281},{"l":42.3747230699665,"x":18.75,"y":175.9381},{"l":42.3747230699665,"x":18.8333,"y":175.9381},{"l":42.3747230699665,"x":18.9167,"y":175.9381},{"l":42.3747230699665,"x":19.0,"y":175.9384},{"l":42.3747230699665,"x":19.0833,"y":175.9483},{"l":42.3747230699665,"x":19.1667,"y":175.9487},{"l":42.3747230699665,"x":19.25,"y":175.9487},{"l":42.3747230699665,"x":19.3333,"y":175.9586},{"l":42.3747230699665,"x":19.4167,"y":175.9586},{"l":42.3747230699665,"x":19.5,"y":175.9586},{"l":42.3747230699665,"x":19.5833,"y":175.9589},{"l":42.3747230699665,"x":19.6667,"y":175.9589},{"l":42.3747230699665,"x":19.75,"y":175.9692},{"l":42.3747230699665,"x":19.8333,"y":175.9795},{"l":42.3747230699665,"x":19.9167,"y":175.9897},{"l":42.3747230699665,"x":20.0,"y":176.0},{"l":42.3747230699665,"x":20.0,"y":176.0}]}],"weight":null,"ofc":null,"bmi":null},"female":null}}],"mid_parental_height_lower_centile_data":[{"uk90_preterm":{"male":{"height":[{"sds":-2.19,"centile":1.4178338266962485,"data":[{"l":1.4178338266962485,"x":-0.2875,"y":29.1084},{"l":1.4178338266962485,"x":-0.2683,"y":30.1467},{"l":1.4178338266962485,"x":-0.2491,"y":31.1993},{"l":1.4178338266962485,"x":-0.23,"y":32.2658},{"l":1.4178338266962485,"x":-0.2108,"y":33.3622},{"l":1.4178338266962485,"x":-0.1916,"y":34.5144},{"l":1.4178338266962485,"x":-0.1725,"y":35.7406},{"l":1.4178338266962485,"x":-0.1533,"y":37.0226},{"l":1.4178338266962485,"x":-0.1342,"y":38.332},{"l":1.4178338266962485,"x":-0.115,"y":39.6399},{"l":1.4178338266962485,"x":-0.0958,"y":40.9229},{"l":1.4178338266962485,"x":-0.0767,"y":42.1644},{"l":1.4178338266962485,"x":-0.0575,"y":43.3493},{"l":1.4178338266962485,"x":-0.0383,"y":44.4478},{"l":1.4178338266962485,"x":-0.0192,"y":45.4203},{"l":1.4178338266962485,"x":-0.0,"y":46.2564},{"l":1.4178338266962485,"x":0.0192,"y":47.0032},{"l":1.4178338266962485,"x":0.0383,"y":47.7248},{"l":1.4178338266962485,"x":0.0383,"y":47.7248}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk_who_infant":{"male":{"height":[{"sds":-2.19,"centile":1.4178338266962485,"data":[{"l":1.4178338266962485,"x":0.0383,"y":48.1551},{"l":1.4178338266962485,"x":0.0575,"y":49.1662},{"l":1.4178338266962485,"x":0.0767,"y":50.1314},{"l":1.4178338266962485,"x":0.0958,"y":51.0501},{"l":1.4178338266962485,"x":0.115,"y":51.9194},{"l":1.4178338266962485,"x":0.1342,"y":52.7424},{"l":1.4178338266962485,"x":0.1533,"y":53.5206},{"l":1.4178338266962485,"x":0.1725,"y":54.2611},{"l":1.4178338266962485,"x":0.1916,"y":54.971},{"l":1.4178338266962485,"x":0.2108,"y":55.6512},{"l":1.4178338266962485,"x":0.23,"y":56.3008},{"l":1.4178338266962485,"x":0.2491,"y":56.9201},{"l":1.4178338266962485,"x":0.2683,"y":57.5149},{"l":1.4178338266962485,"x":0.2875,"y":58.0801},{"l":1.4178338266962485,"x":0.3066,"y":58.6177},{"l":1.4178338266962485,"x":0.3258,"y":59.1297},{"l":1.4178338266962485,"x":0.345,"y":59.6191},{"l":1.4178338266962485,"x":0.3641,"y":60.0874},{"l":1.4178338266962485,"x":0.3833,"y":60.5357},{"l":1.4178338266962485,"x":0.4025,"y":60.9657},{"l":1.4178338266962485,"x":0.4216,"y":61.3793},{"l":1.4178338266962485,"x":0.4408,"y":61.7788},{"l":1.4178338266962485,"x":0.46,"y":62.1644},{"l":1.4178338266962485,"x":0.4791,"y":62.5376},{"l":1.4178338266962485,"x":0.4983,"y":62.8996},{"l":1.4178338266962485,"x":0.5175,"y":63.2529},{"l":1.4178338266962485,"x":0.5366,"y":63.5974},{"l":1.4178338266962485,"x":0.5558,"y":63.9338},{"l":1.4178338266962485,"x":0.5749,"y":64.2629},{"l":1.4178338266962485,"x":0.5941,"y":64.5862},{"l":1.4178338266962485,"x":0.6133,"y":64.9043},{"l":1.4178338266962485,"x":0.6324,"y":65.2171},{"l":1.4178338266962485,"x":0.6516,"y":65.5252},{"l":1.4178338266962485,"x":0.6708,"y":65.8292},{"l":1.4178338266962485,"x":0.6899,"y":66.1305},{"l":1.4178338266962485,"x":0.7091,"y":66.428},{"l":1.4178338266962485,"x":0.7283,"y":66.7218},{"l":1.4178338266962485,"x":0.7474,"y":67.0121},{"l":1.4178338266962485,"x":0.7666,"y":67.2991},{"l":1.4178338266962485,"x":0.7858,"y":67.5826},{"l":1.4178338266962485,"x":0.8049,"y":67.8628},{"l":1.4178338266962485,"x":0.8241,"y":68.1396},{"l":1.4178338266962485,"x":0.8433,"y":68.4132},{"l":1.4178338266962485,"x":0.8624,"y":68.6835},{"l":1.4178338266962485,"x":0.8816,"y":68.9507},{"l":1.4178338266962485,"x":0.9008,"y":69.2149},{"l":1.4178338266962485,"x":0.9199,"y":69.4763},{"l":1.4178338266962485,"x":0.9391,"y":69.7349},{"l":1.4178338266962485,"x":0.9582,"y":69.9908},{"l":1.4178338266962485,"x":0.9774,"y":70.2441},{"l":1.4178338266962485,"x":0.9966,"y":70.4948},{"l":1.4178338266962485,"x":1.0157,"y":70.7431},{"l":1.4178338266962485,"x":1.0349,"y":70.989},{"l":1.4178338266962485,"x":1.0541,"y":71.2326},{"l":1.4178338266962485,"x":1.0732,"y":71.4738},{"l":1.4178338266962485,"x":1.0924,"y":71.7129},{"l":1.4178338266962485,"x":1.1116,"y":71.9497},{"l":1.4178338266962485,"x":1.1307,"y":72.1844},{"l":1.4178338266962485,"x":1.1499,"y":72.4169},{"l":1.4178338266962485,"x":1.1691,"y":72.6474},{"l":1.4178338266962485,"x":1.1882,"y":72.8757},{"l":1.4178338266962485,"x":1.2074,"y":73.1021},{"l":1.4178338266962485,"x":1.2266,"y":73.3265},{"l":1.4178338266962485,"x":1.2457,"y":73.5492},{"l":1.4178338266962485,"x":1.2649,"y":73.7702},{"l":1.4178338266962485,"x":1.2841,"y":73.9895},{"l":1.4178338266962485,"x":1.3032,"y":74.2071},{"l":1.4178338266962485,"x":1.3224,"y":74.4229},{"l":1.4178338266962485,"x":1.3415,"y":74.637},{"l":1.4178338266962485,"x":1.3607,"y":74.8492},{"l":1.4178338266962485,"x":1.3799,"y":75.0598},{"l":1.4178338266962485,"x":1.399,"y":75.2689},{"l":1.4178338266962485,"x":1.4182,"y":75.4763},{"l":1.4178338266962485,"x":1.4374,"y":75.6825},{"l":1.4178338266962485,"x":1.4565,"y":75.8871},{"l":1.4178338266962485,"x":1.4757,"y":76.0902},{"l":1.4178338266962485,"x":1.4949,"y":76.2917},{"l":1.4178338266962485,"x":1.514,"y":76.4916},{"l":1.4178338266962485,"x":1.5332,"y":76.6898},{"l":1.4178338266962485,"x":1.5524,"y":76.8865},{"l":1.4178338266962485,"x":1.5715,"y":77.0817},{"l":1.4178338266962485,"x":1.5907,"y":77.2756},{"l":1.4178338266962485,"x":1.6099,"y":77.4681},{"l":1.4178338266962485,"x":1.629,"y":77.6592},{"l":1.4178338266962485,"x":1.6482,"y":77.8489},{"l":1.4178338266962485,"x":1.6674,"y":78.0372},{"l":1.4178338266962485,"x":1.6865,"y":78.2241},{"l":1.4178338266962485,"x":1.7057,"y":78.4096},{"l":1.4178338266962485,"x":1.7248,"y":78.5938},{"l":1.4178338266962485,"x":1.744,"y":78.7768},{"l":1.4178338266962485,"x":1.7632,"y":78.9587},{"l":1.4178338266962485,"x":1.7823,"y":79.1395},{"l":1.4178338266962485,"x":1.8015,"y":79.3191},{"l":1.4178338266962485,"x":1.8207,"y":79.4976},{"l":1.4178338266962485,"x":1.8398,"y":79.6749},{"l":1.4178338266962485,"x":1.859,"y":79.851},{"l":1.4178338266962485,"x":1.8782,"y":80.026},{"l":1.4178338266962485,"x":1.8973,"y":80.2001},{"l":1.4178338266962485,"x":1.9165,"y":80.3732},{"l":1.4178338266962485,"x":1.9357,"y":80.5443},{"l":1.4178338266962485,"x":1.9548,"y":80.7154},{"l":1.4178338266962485,"x":1.974,"y":80.8864},{"l":1.4178338266962485,"x":1.9932,"y":81.0573},{"l":1.4178338266962485,"x":2.0,"y":81.1183}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk_who_child":{"male":{"height":[{"sds":-2.19,"centile":1.4178338266962485,"data":[{"l":1.4178338266962485,"x":2.0,"y":80.4182},{"l":1.4178338266962485,"x":2.0192,"y":80.5845},{"l":1.4178338266962485,"x":2.1025,"y":81.3044},{"l":1.4178338266962485,"x":2.1858,"y":82.003},{"l":1.4178338266962485,"x":2.2692,"y":82.6818},{"l":1.4178338266962485,"x":2.3525,"y":83.3432},{"l":1.4178338266962485,"x":2.4358,"y":83.9845},{"l":1.4178338266962485,"x":2.5192,"y":84.6097},{"l":1.4178338266962485,"x":2.6025,"y":85.2181},{"l":1.4178338266962485,"x":2.6858,"y":85.8117},{"l":1.4178338266962485,"x":2.7692,"y":86.3939},{"l":1.4178338266962485,"x":2.8525,"y":86.965},{"l":1.4178338266962485,"x":2.9358,"y":87.5277},{"l":1.4178338266962485,"x":3.0192,"y":88.0841},{"l":1.4178338266962485,"x":3.1025,"y":88.6327},{"l":1.4178338266962485,"x":3.1858,"y":89.1734},{"l":1.4178338266962485,"x":3.2692,"y":89.7095},{"l":1.4178338266962485,"x":3.3525,"y":90.2394},{"l":1.4178338266962485,"x":3.4358,"y":90.7621},{"l":1.4178338266962485,"x":3.5192,"y":91.2771},{"l":1.4178338266962485,"x":3.6025,"y":91.7868},{"l":1.4178338266962485,"x":3.6858,"y":92.288},{"l":1.4178338266962485,"x":3.7692,"y":92.7851},{"l":1.4178338266962485,"x":3.8525,"y":93.2746},{"l":1.4178338266962485,"x":3.9358,"y":93.7607},{"l":1.4178338266962485,"x":4.0,"y":94.1326}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk90_child":{"male":{"height":[{"sds":-2.19,"centile":1.4178338266962485,"data":[{"l":1.4178338266962485,"x":4.0,"y":93.4844},{"l":1.4178338266962485,"x":4.0833,"y":93.9749},{"l":1.4178338266962485,"x":4.1667,"y":94.4766},{"l":1.4178338266962485,"x":4.25,"y":94.9779},{"l":1.4178338266962485,"x":4.3333,"y":95.4788},{"l":1.4178338266962485,"x":4.4167,"y":96.0001},{"l":1.4178338266962485,"x":4.5,"y":96.5233},{"l":1.4178338266962485,"x":4.5833,"y":97.044},{"l":1.4178338266962485,"x":4.6667,"y":97.5781},{"l":1.4178338266962485,"x":4.75,"y":98.103},{"l":1.4178338266962485,"x":4.8333,"y":98.6299},{"l":1.4178338266962485,"x":4.9167,"y":99.1567},{"l":1.4178338266962485,"x":5.0,"y":99.665},{"l":1.4178338266962485,"x":5.0833,"y":100.1689},{"l":1.4178338266962485,"x":5.1667,"y":100.6702},{"l":1.4178338266962485,"x":5.25,"y":101.1581},{"l":1.4178338266962485,"x":5.3333,"y":101.6251},{"l":1.4178338266962485,"x":5.4167,"y":102.1036},{"l":1.4178338266962485,"x":5.5,"y":102.5638},{"l":1.4178338266962485,"x":5.5833,"y":103.0148},{"l":1.4178338266962485,"x":5.6667,"y":103.4773},{"l":1.4178338266962485,"x":5.75,"y":103.9306},{"l":1.4178338266962485,"x":5.8333,"y":104.3838},{"l":1.4178338266962485,"x":5.9167,"y":104.8369},{"l":1.4178338266962485,"x":6.0,"y":105.2809},{"l":1.4178338266962485,"x":6.0833,"y":105.7364},{"l":1.4178338266962485,"x":6.1667,"y":106.1802},{"l":1.4178338266962485,"x":6.25,"y":106.6264},{"l":1.4178338266962485,"x":6.3333,"y":107.0726},{"l":1.4178338266962485,"x":6.4167,"y":107.5097},{"l":1.4178338266962485,"x":6.5,"y":107.9558},{"l":1.4178338266962485,"x":6.5833,"y":108.3927},{"l":1.4178338266962485,"x":6.6667,"y":108.827},{"l":1.4178338266962485,"x":6.75,"y":109.2728},{"l":1.4178338266962485,"x":6.8333,"y":109.7069},{"l":1.4178338266962485,"x":6.9167,"y":110.15},{"l":1.4178338266962485,"x":7.0,"y":110.5929},{"l":1.4178338266962485,"x":7.0833,"y":111.0331},{"l":1.4178338266962485,"x":7.1667,"y":111.4759},{"l":1.4178338266962485,"x":7.25,"y":111.9159},{"l":1.4178338266962485,"x":7.3333,"y":112.3585},{"l":1.4178338266962485,"x":7.4167,"y":112.7983},{"l":1.4178338266962485,"x":7.5,"y":113.238},{"l":1.4178338266962485,"x":7.5833,"y":113.6803},{"l":1.4178338266962485,"x":7.6667,"y":114.1135},{"l":1.4178338266962485,"x":7.75,"y":114.5528},{"l":1.4178338266962485,"x":7.8333,"y":114.9768},{"l":1.4178338266962485,"x":7.9167,"y":115.4097},{"l":1.4178338266962485,"x":8.0,"y":115.8425},{"l":1.4178338266962485,"x":8.0833,"y":116.2633},{"l":1.4178338266962485,"x":8.1667,"y":116.6778},{"l":1.4178338266962485,"x":8.25,"y":117.0923},{"l":1.4178338266962485,"x":8.3333,"y":117.5038},{"l":1.4178338266962485,"x":8.4167,"y":117.8971},{"l":1.4178338266962485,"x":8.5,"y":118.2903},{"l":1.4178338266962485,"x":8.5833,"y":118.6805},{"l":1.4178338266962485,"x":8.6667,"y":119.0706},{"l":1.4178338266962485,"x":8.75,"y":119.4424},{"l":1.4178338266962485,"x":8.8333,"y":119.8204},{"l":1.4178338266962485,"x":8.9167,"y":120.1891},{"l":1.4178338266962485,"x":9.0,"y":120.5667},{"l":1.4178338266962485,"x":9.0833,"y":120.9323},{"l":1.4178338266962485,"x":9.1667,"y":121.2976},{"l":1.4178338266962485,"x":9.25,"y":121.6599},{"l":1.4178338266962485,"x":9.3333,"y":122.016},{"l":1.4178338266962485,"x":9.4167,"y":122.3749},{"l":1.4178338266962485,"x":9.5,"y":122.7277},{"l":1.4178338266962485,"x":9.5833,"y":123.0773},{"l":1.4178338266962485,"x":9.6667,"y":123.4267},{"l":1.4178338266962485,"x":9.75,"y":123.7759},{"l":1.4178338266962485,"x":9.8333,"y":124.1309},{"l":1.4178338266962485,"x":9.9167,"y":124.4827},{"l":1.4178338266962485,"x":10.0,"y":124.8343},{"l":1.4178338266962485,"x":10.0833,"y":125.1857},{"l":1.4178338266962485,"x":10.1667,"y":125.5428},{"l":1.4178338266962485,"x":10.25,"y":125.8906},{"l":1.4178338266962485,"x":10.3333,"y":126.2351},{"l":1.4178338266962485,"x":10.4167,"y":126.5704},{"l":1.4178338266962485,"x":10.5,"y":126.9054},{"l":1.4178338266962485,"x":10.5833,"y":127.2311},{"l":1.4178338266962485,"x":10.6667,"y":127.5535},{"l":1.4178338266962485,"x":10.75,"y":127.8666},{"l":1.4178338266962485,"x":10.8333,"y":128.1794},{"l":1.4178338266962485,"x":10.9167,"y":128.4889},{"l":1.4178338266962485,"x":11.0,"y":128.7922},{"l":1.4178338266962485,"x":11.0833,"y":129.1011},{"l":1.4178338266962485,"x":11.1667,"y":129.4007},{"l":1.4178338266962485,"x":11.25,"y":129.6969},{"l":1.4178338266962485,"x":11.3333,"y":130.0018},{"l":1.4178338266962485,"x":11.4167,"y":130.2974},{"l":1.4178338266962485,"x":11.5,"y":130.6107},{"l":1.4178338266962485,"x":11.5833,"y":130.9236},{"l":1.4178338266962485,"x":11.6667,"y":131.2388},{"l":1.4178338266962485,"x":11.75,"y":131.5747},{"l":1.4178338266962485,"x":11.8333,"y":131.9103},{"l":1.4178338266962485,"x":11.9167,"y":132.2512},{"l":1.4178338266962485,"x":12.0,"y":132.5918},{"l":1.4178338266962485,"x":12.0833,"y":132.9466},{"l":1.4178338266962485,"x":12.1667,"y":133.3132},{"l":1.4178338266962485,"x":12.25,"y":133.6972},{"l":1.4178338266962485,"x":12.3333,"y":134.0775},{"l":1.4178338266962485,"x":12.4167,"y":134.4785},{"l":1.4178338266962485,"x":12.5,"y":134.8791},{"l":1.4178338266962485,"x":12.5833,"y":135.2971},{"l":1.4178338266962485,"x":12.6667,"y":135.7268},{"l":1.4178338266962485,"x":12.75,"y":136.165},{"l":1.4178338266962485,"x":12.8333,"y":136.6206},{"l":1.4178338266962485,"x":12.9167,"y":137.0914},{"l":1.4178338266962485,"x":13.0,"y":137.574},{"l":1.4178338266962485,"x":13.0833,"y":138.0652},{"l":1.4178338266962485,"x":13.1667,"y":138.575},{"l":1.4178338266962485,"x":13.25,"y":139.0935},{"l":1.4178338266962485,"x":13.3333,"y":139.6308},{"l":1.4178338266962485,"x":13.4167,"y":140.1748},{"l":1.4178338266962485,"x":13.5,"y":140.722},{"l":1.4178338266962485,"x":13.5833,"y":141.2885},{"l":1.4178338266962485,"x":13.6667,"y":141.8529},{"l":1.4178338266962485,"x":13.75,"y":142.4191},{"l":1.4178338266962485,"x":13.8333,"y":143.0048},{"l":1.4178338266962485,"x":13.9167,"y":143.5852},{"l":1.4178338266962485,"x":14.0,"y":144.1712},{"l":1.4178338266962485,"x":14.0833,"y":144.7558},{"l":1.4178338266962485,"x":14.1667,"y":145.3514},{"l":1.4178338266962485,"x":14.25,"y":145.9404},{"l":1.4178338266962485,"x":14.3333,"y":146.5283},{"l":1.4178338266962485,"x":14.4167,"y":147.1239},{"l":1.4178338266962485,"x":14.5,"y":147.7042},{"l":1.4178338266962485,"x":14.5833,"y":148.2925},{"l":1.4178338266962485,"x":14.6667,"y":148.8708},{"l":1.4178338266962485,"x":14.75,"y":149.4447},{"l":1.4178338266962485,"x":14.8333,"y":150.0123},{"l":1.4178338266962485,"x":14.9167,"y":150.5718},{"l":1.4178338266962485,"x":15.0,"y":151.1215},{"l":1.4178338266962485,"x":15.0833,"y":151.663},{"l":1.4178338266962485,"x":15.1667,"y":152.1909},{"l":1.4178338266962485,"x":15.25,"y":152.7054},{"l":1.4178338266962485,"x":15.3333,"y":153.2116},{"l":1.4178338266962485,"x":15.4167,"y":153.6967},{"l":1.4178338266962485,"x":15.5,"y":154.1644},{"l":1.4178338266962485,"x":15.5833,"y":154.6238},{"l":1.4178338266962485,"x":15.6667,"y":155.0746},{"l":1.4178338266962485,"x":15.75,"y":155.5095},{"l":1.4178338266962485,"x":15.8333,"y":155.9178},{"l":1.4178338266962485,"x":15.9167,"y":156.3227},{"l":1.4178338266962485,"x":16.0,"y":156.7063},{"l":1.4178338266962485,"x":16.0833,"y":157.0683},{"l":1.4178338266962485,"x":16.1667,"y":157.4269},{"l":1.4178338266962485,"x":16.25,"y":157.7601},{"l":1.4178338266962485,"x":16.3333,"y":158.0807},{"l":1.4178338266962485,"x":16.4167,"y":158.3835},{"l":1.4178338266962485,"x":16.5,"y":158.675},{"l":1.4178338266962485,"x":16.5833,"y":158.9486},{"l":1.4178338266962485,"x":16.6667,"y":159.2095},{"l":1.4178338266962485,"x":16.75,"y":159.4538},{"l":1.4178338266962485,"x":16.8333,"y":159.6944},{"l":1.4178338266962485,"x":16.9167,"y":159.917},{"l":1.4178338266962485,"x":17.0,"y":160.1229},{"l":1.4178338266962485,"x":17.0833,"y":160.325},{"l":1.4178338266962485,"x":17.1667,"y":160.5143},{"l":1.4178338266962485,"x":17.25,"y":160.6855},{"l":1.4178338266962485,"x":17.3333,"y":160.849},{"l":1.4178338266962485,"x":17.4167,"y":161.0087},{"l":1.4178338266962485,"x":17.5,"y":161.1464},{"l":1.4178338266962485,"x":17.5833,"y":161.2711},{"l":1.4178338266962485,"x":17.6667,"y":161.392},{"l":1.4178338266962485,"x":17.75,"y":161.4869},{"l":1.4178338266962485,"x":17.8333,"y":161.5818},{"l":1.4178338266962485,"x":17.9167,"y":161.6546},{"l":1.4178338266962485,"x":18.0,"y":161.7236},{"l":1.4178338266962485,"x":18.0833,"y":161.7795},{"l":1.4178338266962485,"x":18.1667,"y":161.8355},{"l":1.4178338266962485,"x":18.25,"y":161.8745},{"l":1.4178338266962485,"x":18.3333,"y":161.9136},{"l":1.4178338266962485,"x":18.4167,"y":161.9396},{"l":1.4178338266962485,"x":18.5,"y":161.9565},{"l":1.4178338266962485,"x":18.5833,"y":161.9696},{"l":1.4178338266962485,"x":18.6667,"y":161.9734},{"l":1.4178338266962485,"x":18.75,"y":161.9826},{"l":1.4178338266962485,"x":18.8333,"y":161.9826},{"l":1.4178338266962485,"x":18.9167,"y":161.9826},{"l":1.4178338266962485,"x":19.0,"y":161.9865},{"l":1.4178338266962485,"x":19.0833,"y":161.9956},{"l":1.4178338266962485,"x":19.1667,"y":161.9995},{"l":1.4178338266962485,"x":19.25,"y":161.9995},{"l":1.4178338266962485,"x":19.3333,"y":162.0086},{"l":1.4178338266962485,"x":19.4167,"y":162.0086},{"l":1.4178338266962485,"x":19.5,"y":162.0086},{"l":1.4178338266962485,"x":19.5833,"y":162.0125},{"l":1.4178338266962485,"x":19.6667,"y":162.0125},{"l":1.4178338266962485,"x":19.75,"y":162.0255},{"l":1.4178338266962485,"x":19.8333,"y":162.0386},{"l":1.4178338266962485,"x":19.9167,"y":162.0516},{"l":1.4178338266962485,"x":20.0,"y":162.0646},{"l":1.4178338266962485,"x":20.0,"y":162.0646}]}],"weight":null,"ofc":null,"bmi":null},"female":null}}],"mid_parental_height_upper_centile_data":[{"uk90_preterm":{"male":{"height":[{"sds":1.81,"centile":96.46721295603324,"data":[{"l":96.46721295603324,"x":-0.2875,"y":40.6318},{"l":96.46721295603324,"x":-0.2683,"y":41.6016},{"l":96.46721295603324,"x":-0.2491,"y":42.5634},{"l":96.46721295603324,"x":-0.23,"y":43.5089},{"l":96.46721295603324,"x":-0.2108,"y":44.4455},{"l":96.46721295603324,"x":-0.1916,"y":45.3991},{"l":96.46721295603324,"x":-0.1725,"y":46.392},{"l":96.46721295603324,"x":-0.1533,"y":47.4116},{"l":96.46721295603324,"x":-0.1342,"y":48.4379},{"l":96.46721295603324,"x":-0.115,"y":49.4526},{"l":96.46721295603324,"x":-0.0958,"y":50.4445},{"l":96.46721295603324,"x":-0.0767,"y":51.4133},{"l":96.46721295603324,"x":-0.0575,"y":52.358},{"l":96.46721295603324,"x":-0.0383,"y":53.2582},{"l":96.46721295603324,"x":-0.0192,"y":54.079},{"l":96.46721295603324,"x":-0.0,"y":54.8102},{"l":96.46721295603324,"x":0.0192,"y":55.4738},{"l":96.46721295603324,"x":0.0383,"y":56.0819},{"l":96.46721295603324,"x":0.0383,"y":56.0819}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk_who_infant":{"male":{"height":[{"sds":1.81,"centile":96.46721295603324,"data":[{"l":96.46721295603324,"x":0.0383,"y":55.8018},{"l":96.46721295603324,"x":0.0575,"y":56.8737},{"l":96.46721295603324,"x":0.0767,"y":57.898},{"l":96.46721295603324,"x":0.0958,"y":58.8725},{"l":96.46721295603324,"x":0.115,"y":59.7947},{"l":96.46721295603324,"x":0.1342,"y":60.6659},{"l":96.46721295603324,"x":0.1533,"y":61.4908},{"l":96.46721295603324,"x":0.1725,"y":62.2755},{"l":96.46721295603324,"x":0.1916,"y":63.0286},{"l":96.46721295603324,"x":0.2108,"y":63.7489},{"l":96.46721295603324,"x":0.23,"y":64.4378},{"l":96.46721295603324,"x":0.2491,"y":65.0963},{"l":96.46721295603324,"x":0.2683,"y":65.721},{"l":96.46721295603324,"x":0.2875,"y":66.3191},{"l":96.46721295603324,"x":0.3066,"y":66.8915},{"l":96.46721295603324,"x":0.3258,"y":67.4389},{"l":96.46721295603324,"x":0.345,"y":67.9603},{"l":96.46721295603324,"x":0.3641,"y":68.4577},{"l":96.46721295603324,"x":0.3833,"y":68.9342},{"l":96.46721295603324,"x":0.4025,"y":69.3917},{"l":96.46721295603324,"x":0.4216,"y":69.8323},{"l":96.46721295603324,"x":0.4408,"y":70.2582},{"l":96.46721295603324,"x":0.46,"y":70.6702},{"l":96.46721295603324,"x":0.4791,"y":71.0698},{"l":96.46721295603324,"x":0.4983,"y":71.4583},{"l":96.46721295603324,"x":0.5175,"y":71.839},{"l":96.46721295603324,"x":0.5366,"y":72.2113},{"l":96.46721295603324,"x":0.5558,"y":72.5761},{"l":96.46721295603324,"x":0.5749,"y":72.9342},{"l":96.46721295603324,"x":0.5941,"y":73.2875},{"l":96.46721295603324,"x":0.6133,"y":73.6365},{"l":96.46721295603324,"x":0.6324,"y":73.9809},{"l":96.46721295603324,"x":0.6516,"y":74.3213},{"l":96.46721295603324,"x":0.6708,"y":74.6585},{"l":96.46721295603324,"x":0.6899,"y":74.9933},{"l":96.46721295603324,"x":0.7091,"y":75.3252},{"l":96.46721295603324,"x":0.7283,"y":75.6541},{"l":96.46721295603324,"x":0.7474,"y":75.9803},{"l":96.46721295603324,"x":0.7666,"y":76.3042},{"l":96.46721295603324,"x":0.7858,"y":76.6255},{"l":96.46721295603324,"x":0.8049,"y":76.9441},{"l":96.46721295603324,"x":0.8241,"y":77.2602},{"l":96.46721295603324,"x":0.8433,"y":77.5734},{"l":96.46721295603324,"x":0.8624,"y":77.8839},{"l":96.46721295603324,"x":0.8816,"y":78.192},{"l":96.46721295603324,"x":0.9008,"y":78.4975},{"l":96.46721295603324,"x":0.9199,"y":78.8008},{"l":96.46721295603324,"x":0.9391,"y":79.1017},{"l":96.46721295603324,"x":0.9582,"y":79.4005},{"l":96.46721295603324,"x":0.9774,"y":79.6971},{"l":96.46721295603324,"x":0.9966,"y":79.9919},{"l":96.46721295603324,"x":1.0157,"y":80.285},{"l":96.46721295603324,"x":1.0349,"y":80.5763},{"l":96.46721295603324,"x":1.0541,"y":80.8658},{"l":96.46721295603324,"x":1.0732,"y":81.1533},{"l":96.46721295603324,"x":1.0924,"y":81.4389},{"l":96.46721295603324,"x":1.1116,"y":81.7225},{"l":96.46721295603324,"x":1.1307,"y":82.0043},{"l":96.46721295603324,"x":1.1499,"y":82.2843},{"l":96.46721295603324,"x":1.1691,"y":82.5626},{"l":96.46721295603324,"x":1.1882,"y":82.8392},{"l":96.46721295603324,"x":1.2074,"y":83.1141},{"l":96.46721295603324,"x":1.2266,"y":83.3875},{"l":96.46721295603324,"x":1.2457,"y":83.6593},{"l":96.46721295603324,"x":1.2649,"y":83.9296},{"l":96.46721295603324,"x":1.2841,"y":84.1983},{"l":96.46721295603324,"x":1.3032,"y":84.4657},{"l":96.46721295603324,"x":1.3224,"y":84.7317},{"l":96.46721295603324,"x":1.3415,"y":84.9965},{"l":96.46721295603324,"x":1.3607,"y":85.2601},{"l":96.46721295603324,"x":1.3799,"y":85.5224},{"l":96.46721295603324,"x":1.399,"y":85.7833},{"l":96.46721295603324,"x":1.4182,"y":86.0428},{"l":96.46721295603324,"x":1.4374,"y":86.3008},{"l":96.46721295603324,"x":1.4565,"y":86.5575},{"l":96.46721295603324,"x":1.4757,"y":86.8127},{"l":96.46721295603324,"x":1.4949,"y":87.0667},{"l":96.46721295603324,"x":1.514,"y":87.3194},{"l":96.46721295603324,"x":1.5332,"y":87.5708},{"l":96.46721295603324,"x":1.5524,"y":87.821},{"l":96.46721295603324,"x":1.5715,"y":88.0698},{"l":96.46721295603324,"x":1.5907,"y":88.3174},{"l":96.46721295603324,"x":1.6099,"y":88.5635},{"l":96.46721295603324,"x":1.629,"y":88.8085},{"l":96.46721295603324,"x":1.6482,"y":89.0523},{"l":96.46721295603324,"x":1.6674,"y":89.295},{"l":96.46721295603324,"x":1.6865,"y":89.5369},{"l":96.46721295603324,"x":1.7057,"y":89.7777},{"l":96.46721295603324,"x":1.7248,"y":90.0175},{"l":96.46721295603324,"x":1.744,"y":90.256},{"l":96.46721295603324,"x":1.7632,"y":90.4933},{"l":96.46721295603324,"x":1.7823,"y":90.7292},{"l":96.46721295603324,"x":1.8015,"y":90.9641},{"l":96.46721295603324,"x":1.8207,"y":91.1979},{"l":96.46721295603324,"x":1.8398,"y":91.4308},{"l":96.46721295603324,"x":1.859,"y":91.6629},{"l":96.46721295603324,"x":1.8782,"y":91.894},{"l":96.46721295603324,"x":1.8973,"y":92.1241},{"l":96.46721295603324,"x":1.9165,"y":92.3532},{"l":96.46721295603324,"x":1.9357,"y":92.5793},{"l":96.46721295603324,"x":1.9548,"y":92.8055},{"l":96.46721295603324,"x":1.974,"y":93.0317},{"l":96.46721295603324,"x":1.9932,"y":93.258},{"l":96.46721295603324,"x":2.0,"y":93.3388}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk_who_child":{"male":{"height":[{"sds":1.81,"centile":96.46721295603324,"data":[{"l":96.46721295603324,"x":2.0,"y":92.6389},{"l":96.46721295603324,"x":2.0192,"y":92.8609},{"l":96.46721295603324,"x":2.1025,"y":93.8234},{"l":96.46721295603324,"x":2.1858,"y":94.761},{"l":96.46721295603324,"x":2.2692,"y":95.6763},{"l":96.46721295603324,"x":2.3525,"y":96.5675},{"l":96.46721295603324,"x":2.4358,"y":97.4361},{"l":96.46721295603324,"x":2.5192,"y":98.2805},{"l":96.46721295603324,"x":2.6025,"y":99.1036},{"l":96.46721295603324,"x":2.6858,"y":99.9063},{"l":96.46721295603324,"x":2.7692,"y":100.6897},{"l":96.46721295603324,"x":2.8525,"y":101.4581},{"l":96.46721295603324,"x":2.9358,"y":102.2128},{"l":96.46721295603324,"x":3.0192,"y":102.9538},{"l":96.46721295603324,"x":3.1025,"y":103.6839},{"l":96.46721295603324,"x":3.1858,"y":104.4043},{"l":96.46721295603324,"x":3.2692,"y":105.1124},{"l":96.46721295603324,"x":3.3525,"y":105.8098},{"l":96.46721295603324,"x":3.4358,"y":106.4968},{"l":96.46721295603324,"x":3.5192,"y":107.1735},{"l":96.46721295603324,"x":3.6025,"y":107.8389},{"l":96.46721295603324,"x":3.6858,"y":108.4968},{"l":96.46721295603324,"x":3.7692,"y":109.1444},{"l":96.46721295603324,"x":3.8525,"y":109.7869},{"l":96.46721295603324,"x":3.9358,"y":110.422},{"l":96.46721295603324,"x":4.0,"y":110.9088}]}],"weight":null,"ofc":null,"bmi":null},"female":null}},{"uk90_child":{"male":{"height":[{"sds":1.81,"centile":96.46721295603324,"data":[{"l":96.46721295603324,"x":4.0,"y":109.9156},{"l":96.46721295603324,"x":4.0833,"y":110.5511},{"l":96.46721295603324,"x":4.1667,"y":111.1958},{"l":96.46721295603324,"x":4.25,"y":111.8407},{"l":96.46721295603324,"x":4.3333,"y":112.4858},{"l":96.46721295603324,"x":4.4167,"y":113.1508},{"l":96.46721295603324,"x":4.5,"y":113.814},{"l":96.46721295603324,"x":4.5833,"y":114.4795},{"l":96.46721295603324,"x":4.6667,"y":115.152},{"l":96.46721295603324,"x":4.75,"y":115.814},{"l":96.46721295603324,"x":4.8333,"y":116.4742},{"l":96.46721295603324,"x":4.9167,"y":117.1346},{"l":96.46721295603324,"x":5.0,"y":117.7737},{"l":96.46721295603324,"x":5.0833,"y":118.3982},{"l":96.46721295603324,"x":5.1667,"y":119.0248},{"l":96.46721295603324,"x":5.25,"y":119.6261},{"l":96.46721295603324,"x":5.3333,"y":120.208},{"l":96.46721295603324,"x":5.4167,"y":120.7987},{"l":96.46721295603324,"x":5.5,"y":121.368},{"l":96.46721295603324,"x":5.5833,"y":121.9266},{"l":96.46721295603324,"x":5.6667,"y":122.4941},{"l":96.46721295603324,"x":5.75,"y":123.0508},{"l":96.46721295603324,"x":5.8333,"y":123.6076},{"l":96.46721295603324,"x":5.9167,"y":124.1645},{"l":96.46721295603324,"x":6.0,"y":124.7108},{"l":96.46721295603324,"x":6.0833,"y":125.2657},{"l":96.46721295603324,"x":6.1667,"y":125.8121},{"l":96.46721295603324,"x":6.25,"y":126.3564},{"l":96.46721295603324,"x":6.3333,"y":126.9007},{"l":96.46721295603324,"x":6.4167,"y":127.4344},{"l":96.46721295603324,"x":6.5,"y":127.9788},{"l":96.46721295603324,"x":6.5833,"y":128.5126},{"l":96.46721295603324,"x":6.6667,"y":129.0486},{"l":96.46721295603324,"x":6.75,"y":129.5932},{"l":96.46721295603324,"x":6.8333,"y":130.1293},{"l":96.46721295603324,"x":6.9167,"y":130.6763},{"l":96.46721295603324,"x":7.0,"y":131.2233},{"l":96.46721295603324,"x":7.0833,"y":131.7726},{"l":96.46721295603324,"x":7.1667,"y":132.3198},{"l":96.46721295603324,"x":7.25,"y":132.8692},{"l":96.46721295603324,"x":7.3333,"y":133.4166},{"l":96.46721295603324,"x":7.4167,"y":133.9662},{"l":96.46721295603324,"x":7.5,"y":134.516},{"l":96.46721295603324,"x":7.5833,"y":135.0635},{"l":96.46721295603324,"x":7.6667,"y":135.6004},{"l":96.46721295603324,"x":7.75,"y":136.1504},{"l":96.46721295603324,"x":7.8333,"y":136.6766},{"l":96.46721295603324,"x":7.9167,"y":137.2137},{"l":96.46721295603324,"x":8.0,"y":137.7509},{"l":96.46721295603324,"x":8.0833,"y":138.2796},{"l":96.46721295603324,"x":8.1667,"y":138.7954},{"l":96.46721295603324,"x":8.25,"y":139.3112},{"l":96.46721295603324,"x":8.3333,"y":139.8294},{"l":96.46721295603324,"x":8.4167,"y":140.3262},{"l":96.46721295603324,"x":8.5,"y":140.823},{"l":96.46721295603324,"x":8.5833,"y":141.3223},{"l":96.46721295603324,"x":8.6667,"y":141.8217},{"l":96.46721295603324,"x":8.75,"y":142.2996},{"l":96.46721295603324,"x":8.8333,"y":142.7908},{"l":96.46721295603324,"x":8.9167,"y":143.2714},{"l":96.46721295603324,"x":9.0,"y":143.7628},{"l":96.46721295603324,"x":9.0833,"y":144.2459},{"l":96.46721295603324,"x":9.1667,"y":144.7292},{"l":96.46721295603324,"x":9.25,"y":145.2151},{"l":96.46721295603324,"x":9.3333,"y":145.6878},{"l":96.46721295603324,"x":9.4167,"y":146.1764},{"l":96.46721295603324,"x":9.5,"y":146.6518},{"l":96.46721295603324,"x":9.5833,"y":147.1299},{"l":96.46721295603324,"x":9.6667,"y":147.6081},{"l":96.46721295603324,"x":9.75,"y":148.0865},{"l":96.46721295603324,"x":9.8333,"y":148.5783},{"l":96.46721295603324,"x":9.9167,"y":149.0727},{"l":96.46721295603324,"x":10.0,"y":149.5674},{"l":96.46721295603324,"x":10.0833,"y":150.0622},{"l":96.46721295603324,"x":10.1667,"y":150.5706},{"l":96.46721295603324,"x":10.25,"y":151.0683},{"l":96.46721295603324,"x":10.3333,"y":151.5688},{"l":96.46721295603324,"x":10.4167,"y":152.0587},{"l":96.46721295603324,"x":10.5,"y":152.5488},{"l":96.46721295603324,"x":10.5833,"y":153.0283},{"l":96.46721295603324,"x":10.6667,"y":153.5105},{"l":96.46721295603324,"x":10.75,"y":153.9822},{"l":96.46721295603324,"x":10.8333,"y":154.4541},{"l":96.46721295603324,"x":10.9167,"y":154.9287},{"l":96.46721295603324,"x":11.0,"y":155.3902},{"l":96.46721295603324,"x":11.0833,"y":155.8653},{"l":96.46721295603324,"x":11.1667,"y":156.3298},{"l":96.46721295603324,"x":11.25,"y":156.7972},{"l":96.46721295603324,"x":11.3333,"y":157.2756},{"l":96.46721295603324,"x":11.4167,"y":157.7434},{"l":96.46721295603324,"x":11.5,"y":158.2332},{"l":96.46721295603324,"x":11.5833,"y":158.7232},{"l":96.46721295603324,"x":11.6667,"y":159.2297},{"l":96.46721295603324,"x":11.75,"y":159.7555},{"l":96.46721295603324,"x":11.8333,"y":160.2816},{"l":96.46721295603324,"x":11.9167,"y":160.8215},{"l":96.46721295603324,"x":12.0,"y":161.3618},{"l":96.46721295603324,"x":12.0833,"y":161.9267},{"l":96.46721295603324,"x":12.1667,"y":162.5003},{"l":96.46721295603324,"x":12.25,"y":163.0959},{"l":96.46721295603324,"x":12.3333,"y":163.6946},{"l":96.46721295603324,"x":12.4167,"y":164.3127},{"l":96.46721295603324,"x":12.5,"y":164.9312},{"l":96.46721295603324,"x":12.5833,"y":165.5718},{"l":96.46721295603324,"x":12.6667,"y":166.2209},{"l":96.46721295603324,"x":12.75,"y":166.8813},{"l":96.46721295603324,"x":12.8333,"y":167.5639},{"l":96.46721295603324,"x":12.9167,"y":168.2522},{"l":96.46721295603324,"x":13.0,"y":168.949},{"l":96.46721295603324,"x":13.0833,"y":169.657},{"l":96.46721295603324,"x":13.1667,"y":170.3678},{"l":96.46721295603324,"x":13.25,"y":171.0898},{"l":96.46721295603324,"x":13.3333,"y":171.8145},{"l":96.46721295603324,"x":13.4167,"y":172.5337},{"l":96.46721295603324,"x":13.5,"y":173.2501},{"l":96.46721295603324,"x":13.5833,"y":173.969},{"l":96.46721295603324,"x":13.6667,"y":174.6713},{"l":96.46721295603324,"x":13.75,"y":175.354},{"l":96.46721295603324,"x":13.8333,"y":176.0388},{"l":96.46721295603324,"x":13.9167,"y":176.7096},{"l":96.46721295603324,"x":14.0,"y":177.3576},{"l":96.46721295603324,"x":14.0833,"y":177.9886},{"l":96.46721295603324,"x":14.1667,"y":178.6105},{"l":96.46721295603324,"x":14.25,"y":179.2013},{"l":96.46721295603324,"x":14.3333,"y":179.7748},{"l":96.46721295603324,"x":14.4167,"y":180.342},{"l":96.46721295603324,"x":14.5,"y":180.8669},{"l":96.46721295603324,"x":14.5833,"y":181.3854},{"l":96.46721295603324,"x":14.6667,"y":181.8755},{"l":96.46721295603324,"x":14.75,"y":182.3511},{"l":96.46721295603324,"x":14.8333,"y":182.7953},{"l":96.46721295603324,"x":14.9167,"y":183.228},{"l":96.46721295603324,"x":15.0,"y":183.6323},{"l":96.46721295603324,"x":15.0833,"y":184.0251},{"l":96.46721295603324,"x":15.1667,"y":184.3926},{"l":96.46721295603324,"x":15.25,"y":184.7347},{"l":96.46721295603324,"x":15.3333,"y":185.0654},{"l":96.46721295603324,"x":15.4167,"y":185.377},{"l":96.46721295603324,"x":15.5,"y":185.6664},{"l":96.46721295603324,"x":15.5833,"y":185.9445},{"l":96.46721295603324,"x":15.6667,"y":186.2113},{"l":96.46721295603324,"x":15.75,"y":186.4731},{"l":96.46721295603324,"x":15.8333,"y":186.7021},{"l":96.46721295603324,"x":15.9167,"y":186.9338},{"l":96.46721295603324,"x":16.0,"y":187.1466},{"l":96.46721295603324,"x":16.0833,"y":187.3407},{"l":96.46721295603324,"x":16.1667,"y":187.5377},{"l":96.46721295603324,"x":16.25,"y":187.7191},{"l":96.46721295603324,"x":16.3333,"y":187.8926},{"l":96.46721295603324,"x":16.4167,"y":188.0444},{"l":96.46721295603324,"x":16.5,"y":188.2054},{"l":96.46721295603324,"x":16.5833,"y":188.3447},{"l":96.46721295603324,"x":16.6667,"y":188.4763},{"l":96.46721295603324,"x":16.75,"y":188.6032},{"l":96.46721295603324,"x":16.8333,"y":188.7333},{"l":96.46721295603324,"x":16.9167,"y":188.8417},{"l":96.46721295603324,"x":17.0,"y":188.9456},{"l":96.46721295603324,"x":17.0833,"y":189.0526},{"l":96.46721295603324,"x":17.1667,"y":189.152},{"l":96.46721295603324,"x":17.25,"y":189.2298},{"l":96.46721295603324,"x":17.3333,"y":189.3139},{"l":96.46721295603324,"x":17.4167,"y":189.4011},{"l":96.46721295603324,"x":17.5,"y":189.4701},{"l":96.46721295603324,"x":17.5833,"y":189.5315},{"l":96.46721295603324,"x":17.6667,"y":189.596},{"l":96.46721295603324,"x":17.75,"y":189.6455},{"l":96.46721295603324,"x":17.8333,"y":189.6949},{"l":96.46721295603324,"x":17.9167,"y":189.7261},{"l":96.46721295603324,"x":18.0,"y":189.7605},{"l":96.46721295603324,"x":18.0833,"y":189.7873},{"l":96.46721295603324,"x":18.1667,"y":189.8142},{"l":96.46721295603324,"x":18.25,"y":189.8367},{"l":96.46721295603324,"x":18.3333,"y":189.8592},{"l":96.46721295603324,"x":18.4167,"y":189.8742},{"l":96.46721295603324,"x":18.5,"y":189.8785},{"l":96.46721295603324,"x":18.5833,"y":189.886},{"l":96.46721295603324,"x":18.6667,"y":189.8828},{"l":96.46721295603324,"x":18.75,"y":189.8935},{"l":96.46721295603324,"x":18.8333,"y":189.8935},{"l":96.46721295603324,"x":18.9167,"y":189.8935},{"l":96.46721295603324,"x":19.0,"y":189.8903},{"l":96.46721295603324,"x":19.0833,"y":189.9011},{"l":96.46721295603324,"x":19.1667,"y":189.8979},{"l":96.46721295603324,"x":19.25,"y":189.8979},{"l":96.46721295603324,"x":19.3333,"y":189.9086},{"l":96.46721295603324,"x":19.4167,"y":189.9086},{"l":96.46721295603324,"x":19.5,"y":189.9086},{"l":96.46721295603324,"x":19.5833,"y":189.9054},{"l":96.46721295603324,"x":19.6667,"y":189.9054},{"l":96.46721295603324,"x":19.75,"y":189.9129},{"l":96.46721295603324,"x":19.8333,"y":189.9204},{"l":96.46721295603324,"x":19.9167,"y":189.9279},{"l":96.46721295603324,"x":20.0,"y":189.9354},{"l":96.46721295603324,"x":20.0,"y":189.9354}]}],"weight":null,"ofc":null,"bmi":null},"female":null}}],"mid_parental_height_upper_value":189.93537720000003,"mid_parental_height_lower_value":162.06462280000002} \ No newline at end of file diff --git a/tests/test_trisomy21.py b/tests/test_trisomy21.py index 9da89a92..8d306ba2 100644 --- a/tests/test_trisomy21.py +++ b/tests/test_trisomy21.py @@ -58,8 +58,6 @@ def test_trisomy_21_calculation_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) - # restructure the response to make it easier to assert tests specifically validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} assert ( validation_errors["birth_date"]["msg"] @@ -126,8 +124,6 @@ def test_trisomy_21_chart_data_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) - # restructure the response to make it easier to assert tests specifically validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} # check the validation errors are the ones we expect assert validation_errors["sex"]["msg"] == "Input should be 'male' or 'female'" @@ -137,13 +133,6 @@ def test_trisomy_21_chart_data_with_invalid_request(): ) -""" -Fictional child data generation seems to be failing this test - Pydantic does not allow any metrics of Hours or Minutes to be passed to dates - and somewhere -is setting datetime.datetime to have a time of 12:00 -""" - - -@pytest.mark.skip def test_trisomy_21_fictional_child_data_with_valid_request(): body = { @@ -167,8 +156,6 @@ def test_trisomy_21_fictional_child_data_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) - # load the known-correct response from file with open( r"tests/test_data/test_trisomy_21_fictional_child_data_valid.json", "r" ) as file: @@ -200,8 +187,6 @@ def test_trisomy_21_fictional_child_data_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) - # restructure the response to make it easier to assert tests specifically validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} assert ( validation_errors["measurement_method"]["msg"] diff --git a/tests/test_turner.py b/tests/test_turner.py index 21ac4d5e..678e69a4 100644 --- a/tests/test_turner.py +++ b/tests/test_turner.py @@ -32,12 +32,11 @@ def test_turner_calculation_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # load the known-correct response from file - # with open(r'tests/test_data/test_turner_calculation_valid.json', 'r') as file: - # calculation_file = file.read() + with open(r"tests/test_data/test_turner_calculation_valid.json", "r") as file: + calculation_file = file.read() # load the two JSON responses as Python Dicts so enable comparison (slow but more reliable) - # assert response.json() == json.loads(calculation_file) + assert response.json() == json.loads(calculation_file) def test_turner_calculation_with_invalid_request(): @@ -57,25 +56,37 @@ def test_turner_calculation_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) - # restructure the response to make it easier to assert tests specifically - # validation_errors = {error['loc'][1]: error for error in response.json( - # )['detail']} - # assert validation_errors['birth_date']['msg'] == "time data 'invalid_birth_date' does not match format '%Y-%m-%d'" - # assert validation_errors['gestation_days']['msg'] == "value is not a valid integer" - # assert validation_errors['gestation_weeks']['msg'] == "value is not a valid integer" - # assert validation_errors['measurement_method']['msg'] == "unexpected value; permitted: 'height', 'weight', 'ofc', 'bmi'" - # assert validation_errors['observation_date']['msg'] == "invalid date format" - # assert validation_errors['observation_value']['msg'] == "value is not a valid float" - # assert validation_errors['sex']['msg'] == "unexpected value; permitted: 'male', 'female'" - - -""" -The chart-coordinates -related tests seem to be failing, complaining that at loc response, centile_data, 0, RootModel is a required field -""" + validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} + assert ( + validation_errors["birth_date"]["msg"] + == "Value error, time data 'invalid_birth_date' does not match format '%Y-%m-%d'" + ) + assert ( + validation_errors["gestation_days"]["msg"] + == "Input should be a valid integer, unable to parse string as an integer" + ) + assert ( + validation_errors["gestation_weeks"]["msg"] + == "Input should be a valid integer, unable to parse string as an integer" + ) + assert ( + validation_errors["measurement_method"]["msg"] + == "Input should be 'height', 'weight', 'ofc' or 'bmi'" + ) + assert ( + validation_errors["observation_date"]["msg"] + == "Input should be a valid date or datetime, invalid character in year" + ) + assert ( + validation_errors["observation_value"]["msg"] + == "Input should be a valid number, unable to parse string as a number" + ) + assert validation_errors["sex"]["msg"] == "Input should be 'male' or 'female'" -@pytest.mark.skip +@pytest.mark.skip( + reason="chart coordinates are hashed - need a better way to test this. Unhashing takes too long." +) def test_turner_chart_data_with_valid_request(): body = { "measurement_method": "height", @@ -87,7 +98,7 @@ def test_turner_chart_data_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) + # COMMENTED OUT PENDING FIX NOT REQUIRING HASHING # load the known-correct response from file and create a hash of it # with open(r'tests/test_data/test_turner_female_height_valid.json', 'r') as file: # chart_data_file = file.read() @@ -110,7 +121,7 @@ def test_turner_chart_data_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) + # COMMENTED OUT PENDING FIX NOT REQUIRING HASHING # restructure the response to make it easier to assert tests specifically # validation_errors = {error['loc'][1]: error for error in response.json( # )['detail']} @@ -119,13 +130,6 @@ def test_turner_chart_data_with_invalid_request(): # assert validation_errors['measurement_method']['msg'] == "unexpected value; permitted: 'height', 'weight', 'ofc', 'bmi'" -""" -Failing for the same reason as the Trisomy21 fictional_child_data with valid request test -The generate_fictional_child_data function must be generating a time object which has Hours involved - but pydantic rejects that being passed to a Date-exclusive field -""" - - -@pytest.mark.skip def test_turner_fictional_child_data_with_valid_request(): body = { @@ -149,12 +153,13 @@ def test_turner_fictional_child_data_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # load the known-correct response from file - # with open(r'tests/test_data/test_turner_fictional_child_data_valid.json', 'r') as file: - # fictional_child_data_file = file.read() + with open( + r"tests/test_data/test_turner_fictional_child_data_valid.json", "r" + ) as file: + fictional_child_data_file = file.read() # load the two JSON responses as Python Dicts so enable comparison (slow but more reliable) - # assert response.json() == json.loads(fictional_child_data_file) + assert response.json() == json.loads(fictional_child_data_file) def test_turner_fictional_child_data_with_invalid_request(): @@ -180,7 +185,6 @@ def test_turner_fictional_child_data_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # restructure the response to make it easier to assert tests specifically validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} assert ( diff --git a/tests/test_ukwho.py b/tests/test_ukwho.py index 754bdbe2..f1930722 100644 --- a/tests/test_ukwho.py +++ b/tests/test_ukwho.py @@ -38,12 +38,11 @@ def test_ukwho_calculation_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # load the known-correct response from file with open(r"tests/test_data/test_ukwho_calculation_valid.json", "r") as file: calculation_file = file.read() # load the two JSON responses as Python Dicts so enable comparison (slow but more reliable) - # assert response.json() == json.loads(calculation_file) + assert response.json() == json.loads(calculation_file) def test_ukwho_calculation_with_invalid_request(): @@ -63,22 +62,33 @@ def test_ukwho_calculation_with_invalid_request(): assert response.status_code == 422 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # restructure the response to make it easier to assert tests specifically - # validation_errors = {error['loc'][1]: error for error in response.json( - # )['detail']} - # assert validation_errors['birth_date']['msg'] == "time data 'invalid_birth_date' does not match format '%Y-%m-%d'" - # assert validation_errors['gestation_days']['msg'] == "value is not a valid integer" - # assert validation_errors['gestation_weeks']['msg'] == "value is not a valid integer" - # assert validation_errors['measurement_method']['msg'] == "unexpected value; permitted: 'height', 'weight', 'ofc', 'bmi'" - # assert validation_errors['observation_date']['msg'] == "invalid date format" - # assert validation_errors['observation_value']['msg'] == "value is not a valid float" - # assert validation_errors['sex']['msg'] == "unexpected value; permitted: 'male', 'female'" - - -""" -Fails for the same reason as chart coordinates - missing input from response, centile_data, 0, RootModel -""" + validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} + assert ( + validation_errors["birth_date"]["msg"] + == "Value error, time data 'invalid_birth_date' does not match format '%Y-%m-%d'" + ) + assert ( + validation_errors["gestation_days"]["msg"] + == "Input should be a valid integer, unable to parse string as an integer" + ) + assert ( + validation_errors["gestation_weeks"]["msg"] + == "Input should be a valid integer, unable to parse string as an integer" + ) + assert ( + validation_errors["measurement_method"]["msg"] + == "Input should be 'height', 'weight', 'ofc' or 'bmi'" + ) + assert ( + validation_errors["observation_date"]["msg"] + == "Input should be a valid date or datetime, invalid character in year" + ) + assert ( + validation_errors["observation_value"]["msg"] + == "Input should be a valid number, unable to parse string as a number" + ) + assert validation_errors["sex"]["msg"] == "Input should be 'male' or 'female'" @pytest.mark.skip( @@ -96,7 +106,6 @@ def test_ukwho_chart_data_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # load the known-correct response from file and create a hash of it # with open(r'tests/test_data/test_uk_who_male_height_valid.json', 'r') as file: # chart_data_file = file.read() @@ -128,7 +137,6 @@ def test_ukwho_chart_data_with_invalid_request(): # assert validation_errors['measurement_method']['msg'] == "unexpected value; permitted: 'height', 'weight', 'ofc', 'bmi'" -@pytest.mark.skip def test_ukwho_fictional_child_data_with_valid_request(): body = { @@ -152,12 +160,13 @@ def test_ukwho_fictional_child_data_with_valid_request(): assert response.status_code == 200 - # COMMENTED OUT FOR BRANCH 'dockerise' PENDING DECISION ON #166 (API Test Suite) (pacharanero, 2024-02-07 ) # load the known-correct response from file - # with open(r'tests/test_data/test_ukwho_fictional_child_data_valid.json', 'r') as file: - # fictional_child_data_file = file.read() + with open( + r"tests/test_data/test_ukwho_fictional_child_data_valid.json", "r" + ) as file: + fictional_child_data_file = file.read() # load the two JSON responses as Python Dicts so enable comparison (slow but more reliable) - # assert response.json() == json.loads(fictional_child_data_file) + assert response.json() == json.loads(fictional_child_data_file) def test_ukwho_fictional_child_data_with_invalid_request(): diff --git a/tests/test_utilities.py b/tests/test_utilities.py new file mode 100644 index 00000000..92a9b5a8 --- /dev/null +++ b/tests/test_utilities.py @@ -0,0 +1,119 @@ +""" +Tests for the utilities endpoints +""" + +# standard imports +import json +import hashlib + +# third party imports +from fastapi.testclient import TestClient + +# local / rcpch imports +from main import app + +client = TestClient(app) + + +def test_midparental_height_with_valid_request(): + body = {"height_paternal": 171, "height_maternal": 168, "sex": "male"} + + response = client.post("/utilities/mid-parental-height", json=body) + + # load the known-correct response from file + with open(r"tests/test_data/test_midparental_height_valid.json", "r") as file: + calculation_file = file.read() + + assert response.status_code == 200 + + # load the two JSON responses as Python Dicts so enable comparison (slow but more reliable) + assert response.json() == json.loads(calculation_file) + + +def test_midparental_height_with_invalid_request(): + body = { + "height_paternal": "invalid_height_paternal", + "height_maternal": "invalid_height_maternal", + "sex": "invalid_sex", + } + + response = client.post("/utilities/mid-parental-height", json=body) + + # load the known-correct response from file + with open(r"tests/test_data/test_midparental_height_valid.json", "r") as file: + calculation_file = file.read() + + assert response.status_code == 422 + + # restructure the response to make it easier to assert tests specifically + validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} + + assert ( + validation_errors["height_paternal"]["msg"] + == "Input should be a valid number, unable to parse string as a number" + ) + assert ( + validation_errors["height_maternal"]["msg"] + == "Input should be a valid number, unable to parse string as a number" + ) + assert validation_errors["sex"]["msg"] == "Input should be 'male' or 'female'" + + +def test_midparental_height_parental_heights_ge_fifty_expected_fail(): + body = { + "height_paternal": "45", + "height_maternal": "45", + "sex": "male", + } + + response = client.post("/utilities/mid-parental-height", json=body) + + assert response.status_code == 422 + + # restructure the response to make it easier to assert tests specifically + validation_errors = {error["loc"][1]: error for error in response.json()["detail"]} + + assert ( + validation_errors["height_paternal"]["msg"] + == "Input should be greater than or equal to 50" + ) + assert ( + validation_errors["height_maternal"]["msg"] + == "Input should be greater than or equal to 50" + ) + + +def test_midparental_height_paternal_height_lt_twofortyfive_expected_fail(): + body = { + "height_paternal": "251", + "height_maternal": "168", + "sex": "male", + } + + response = client.post("/utilities/mid-parental-height", json=body) + + assert response.status_code == 422 + + paternal_validation_errors = response.json()["detail"][0] + + assert ( + paternal_validation_errors["msg"] == "Input should be less than or equal to 245" + ) + + +def test_midparental_height_maternal_height_lt_twofortyfive_expected_fail(): + body = { + "height_paternal": "171", + "height_maternal": "267", + "sex": "male", + } + + response = client.post("/utilities/mid-parental-height", json=body) + + assert response.status_code == 422 + + maternal_validation_errors = response.json()["detail"][0] + + assert ( + maternal_validation_errors["msg"] == "Input should be less than or equal to 245" + )