Skip to content

fix: include exact gestational chart boundaries - #101

Open
pacharanero wants to merge 1 commit into
livefrom
fix/exact-chart-boundaries
Open

fix: include exact gestational chart boundaries#101
pacharanero wants to merge 1 commit into
livefrom
fix/exact-chart-boundaries

Conversation

@pacharanero

Copy link
Copy Markdown
Member

Clinical/reference-data question

Should UK-WHO charts include the exact first valid points at 23 weeks for weight and head circumference, 25 weeks for height, and 42 weeks for infant BMI?

The current chart age arrays use rounded decimal-year values that are fractionally below those exact thresholds. Validation therefore rejects the points even though data below the thresholds remains deliberately unsupported.

Proposed fix

  • Use the existing exact gestational-age constants at those chart boundaries.
  • Keep all below-boundary behavior unchanged.
  • Add focused regression coverage for each affected measurement method.

Clinical safety

This does not extrapolate reference data or expand the supported gestational range. It restores only the exact valid boundary points using the existing reference calculations.

Testing

  • docker run --rm rcpchgrowth-exact-chart-boundaries-rcpchgrowth-python pytest
  • 145,105 passed, 1,700 skipped

@pacharanero

Copy link
Copy Markdown
Member Author

@eatyourpeas this is a question for you really. I'm reviewing as much of the dGC Python/API/Chart/Demo code as possible, bit by bit. Where I find possible inconsistencies I'm flagging them, in case they were not deliberate. This one could have been deliberate - if it was then that's fine we can close the PR and make some comments in the code that explain the decision.

@eatyourpeas

Copy link
Copy Markdown
Member

I am not sure i understand this but yes, 25 weeks should be exactly 25 weeks and so on. It is important that the charting allows plotting of values below these gestations as babies these days are born and save at 22 w, so they need to be plottable even if there is no reference data down there to generate and SDS.

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

Successfully merging this pull request may close these issues.

2 participants