Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very tall Y axis for high BMI on trisomy 21 charts #93

Closed
mbarton opened this issue Jul 16, 2024 · 4 comments · Fixed by #96
Closed

Very tall Y axis for high BMI on trisomy 21 charts #93

mbarton opened this issue Jul 16, 2024 · 4 comments · Fixed by #96
Assignees
Labels
bug Something isn't working

Comments

@mbarton
Copy link
Member

mbarton commented Jul 16, 2024

Porting across rcpch/digital-growth-charts-server#220 to this repo as it seems to be an issue with the chart rendering rather than the data returned from the API.

Birth Date: 08/05/2006
Measurement Date: 01/11/2022
BMI: 36.3 kg/m²

image

Storybook story to reproduce in the mbarton/trisomy21-bmi-rendering-issue branch: 6aa9181

@mbarton
Copy link
Member Author

mbarton commented Jul 16, 2024

I think the issue is with the bmiSDSData returned from getDomainsAndData:

For the 3.33 SDS line (the rightmost tallest one in the screenshot) the values ramp up quickly and then end up null:

Screenshot 2024-07-16 13 58 10

@mbarton
Copy link
Member Author

mbarton commented Jul 16, 2024

Ah I see those are the actual values from the reference set:

I think I will need @eatyourpeas input here on how that reference was calculated. There's also rcpch/digital-growth-charts-server#217 raised already for the nulls

@eatyourpeas
Copy link
Member

These values were calculated from our chart-coordinates endpoint and are possibly correct because of the way the maths works at higher values. The BMI curves in trisomy I find much less useful clinically for this reason. @statist7 would better be able to comment whether this is an actual error or whether this is more an issue for rendering where we simply apply an arbitrary upper limit to the visible value of y.

@statist7
Copy link

For particular configurations of L, M, S and z, BMI heads off to infinity. The relevant formula is Centile = M(1+LSz)^(1/L) so if 1+LSz = 0 then there is a problem.

This happens when L is negative (which it nearly always is with BMI) and z is sufficiently large and positive. As @eatyourpeas says, perhaps test for and trap large BMI values.

@eatyourpeas eatyourpeas self-assigned this Jul 21, 2024
@eatyourpeas eatyourpeas added the bug Something isn't working label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants