Skip to content

Fix isObesityCode individual check to match obesity_diag_ranges E65-E68#33

Open
ethael wants to merge 1 commit intomasterfrom
fix/obesity-code-range-mismatch
Open

Fix isObesityCode individual check to match obesity_diag_ranges E65-E68#33
ethael wants to merge 1 commit intomasterfrom
fix/obesity-code-range-mismatch

Conversation

@ethael
Copy link
Copy Markdown
Collaborator

@ethael ethael commented Mar 18, 2026

Summary

  • isObesityCode only matched E66 for individual codes, while obesity_diag_ranges declares E65-E68. This meant passing "E65-E68" as a range returned True, but passing "E65" individually returned False — inconsistent behavior.
  • Widened the individual code check to match the full E65-E68 range.

Note for reviewer

Strictly speaking, only E66 is obesity per se. E65 (localized adiposity), E67 (other hyperalimentation), and E68 (sequelae of hyperalimentation) are related but not obesity diagnoses. The alternative fix would be to narrow obesity_diag_ranges from ['E65-E68'] to ['E66-E66'] and keep the individual check as == 66. Either way, the two code paths need to agree.

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