Skip to content

fix: align Trisomy 21 BMI upper bound - #110

Open
pacharanero wants to merge 1 commit into
livefrom
fix/trisomy-21-bmi-upper-bound
Open

pacharanero wants to merge 1 commit 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

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