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

Mid parental height 123 causes chart error #137

Open
ryanlewis94 opened this issue Dec 19, 2024 · 3 comments
Open

Mid parental height 123 causes chart error #137

ryanlewis94 opened this issue Dec 19, 2024 · 3 comments

Comments

@ryanlewis94
Copy link

entering 123 for both maternal and paternal height causes an error when displaying the chart
image

@eatyourpeas
Copy link
Member

Thanks for picking this up @ryanlewis94 - I can look into better error handling for the midparental heights within the charts themselves, and our client. Just to be aware though that 123 cm is impossibly small for two parents and this sort of error should be trapped further back in any work flow outside of the charts.

@raspberrycodes
Copy link

@eatyourpeas Hi Simon, I am looking into this to see if there is validation that we need to do on our end and I can see that we have set input validation on the maternal and paternal fields to between 50-245.

The minimum value of 50 was set based on the arbitrary value from this file (line 44): https://github.com/rcpch/rcpchgrowth-python/blob/live/rcpchgrowth/constants/validation_constants.py

I did some more testing and found that the maximum height that I could enter where the value is the same for maternal and paternal is 130cm each. If I enter them both as 131cm or higher (up to the maximum of 245 each) then the mid-parental height returns and plots fine. But 130 each or lower gives us the error that Ryan posted above.

Also just to add, the testing that I did was on a patient who had 40 weeks gestation and I didn't change this at all, so I am curious about the 'uk90_preterm' message. Is this a red herring?

Thank you!

@eatyourpeas
Copy link
Member

eatyourpeas commented Dec 25, 2024

Sorry this is a red herring. It happens because there is no validation for parental heights in the server, which there should be. The actual error here reported does need looking at but that is not the cause. Thank you very much for picking this up.

We recently overhauled midparental height calculations but forgot to apply any validation to the parameters.

Validation for all measurements was only recently agreed because although the intention was to have SD-based validation, well that is complicated - see discussion here for the detail. This is now implemented but this endpoint was forgotten - so that is my bad.

I will imminently release a fix in the server and that should fix this, but we will need a fall back so I will leave this open til I have done that.

For reference,±8 SDS cut offs are:

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

ADDENDUM
Note this comment has been updated - SDS cut offs are ±8, not 6. I have updated the table above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants