Skip to content

fix: assign age two to younger WHO chart component - #102

Open
pacharanero wants to merge 2 commits into
livefrom
fix/age-two-younger-reference
Open

fix: assign age two to younger WHO chart component#102
pacharanero wants to merge 2 commits into
livefrom
fix/age-two-younger-reference

Conversation

@pacharanero

Copy link
Copy Markdown
Member

Clinical/reference-data question

At exactly 2 years, should the chart boundary point belong to the younger WHO infant component, with the older child component beginning after 2 years?

The infant daily table ends at day 730, fractionally before 2.0 decimal years, while the child table begins fractionally after 2.0. Chart generation currently asks for exactly 2.0, so both source tables reject it and neither adjoining component contains the boundary point.

Proposed fix

  • When chart overlap generation explicitly selects the younger WHO or UK-WHO reference at age 2, calculate from the final available infant LMS row while retaining x = 2 on the chart.
  • Leave ordinary measurement calculations and all other references unchanged.
  • Test both sexes and all supported infant measurement methods, including exclusive ownership by the younger component.

Clinical safety

The fallback is limited to the existing explicit younger-reference overlap path. It does not alter ordinary age-2 measurement selection or extrapolate beyond the infant table.

Testing

  • docker run --rm rcpchgrowth-age-two-overlap-rcpchgrowth-python pytest
  • 145,117 passed, 1,700 skipped
  • Focused ownership assertion after final test tightening: 16 passed

@pacharanero

Copy link
Copy Markdown
Member Author

@eatyourpeas again this is one I'm just checking with you - we don't want an overlap at age exactly 2, equally there should be a response at exactly 2. Or is it a deliberate omission due to lack of underlying exact data? Happy to close and document if so. Just dotting t's and crossing the i's 🤣

@eatyourpeas

Copy link
Copy Markdown
Member

There are two measurements at 2y, one when lying down (length), one when standing. It makes no difference for weight or head circumference but there are two values in the reference. If you are plotting centiles then you need both the height and the length. This is why there is a default_youngest_reference parameter. In the centile charts you want to plot both values at 2y, so that the lines at 2y have a clean break and there is no gap. In previous versions where we did not do this the charts would plot only one value at 2y and they looked wrong. For the other way (going from measurement -> SDS) we default to the older reference.

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