Skip to content

fix: align Trisomy 21 BMI upper bound - #110

Merged
pacharanero merged 2 commits into
livefrom
fix/trisomy-21-bmi-upper-bound
Sep 24, 2026
Merged

pacharanero merged 2 commits into
livefrom
fix/trisomy-21-bmi-upper-bound

Conversation

@pacharanero

Copy link
Copy Markdown
Member

Summary

  • Accept UK Trisomy 21 BMI calculations through the final source-table age of 18.92 years.
  • Reject ages immediately above 18.92 with the existing LookupError path and corrected message.
  • Add exact endpoint regression tests for both sexes using the final two source rows and math.nextafter() beyond the endpoint.

Source evidence

The canonical source workbook rcpch/growth-references/trisomy21/UKReference/LMS_Downs.xlsx contains BMI LMS values for both sexes at 18.83 and 18.92 years, then blank BMI cells from 19.00 onward. The packaged trisomy_21.json accurately contains those same final two rows.

The previous 18.82 guard did not correspond to a source-table age and made both final rows unreachable. This PR changes no reference values.

Follow-up

Issue #109 and roadmap item R25 track replacing duplicated age literals across all references with validated source/applicability metadata. That work must distinguish raw table extent from clinical applicability and hybrid-reference overlap policy.

Verification

  • Focused boundary tests: 6 passed
  • s/test --running -q: 145161 passed
  • Ruff fatal-error checks on changed files: passed
  • git diff --check: passed

@pacharanero
pacharanero force-pushed the fix/trisomy-21-bmi-upper-bound branch from deaf203 to 2f72029 Compare September 24, 2026 13:33
@pacharanero
pacharanero merged commit d82eafa into live Sep 24, 2026
4 checks passed
@pacharanero
pacharanero deleted the fix/trisomy-21-bmi-upper-bound branch September 24, 2026 14:39
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.

1 participant