Skip to content

Conversation

@karokojnr
Copy link
Collaborator

The tree structure for measurements is flat (e.g., 'BMI (body mass index) centile' is a direct child of 'PHYSICAL EXAMINATION', not nested under 'Body measure'). Path configs use 3-segment paths for clarity, but the actual tree only has 2 levels.

This fix:

  • Extracts leaf texts from all PHYSICAL EXAMINATION path_config entries
  • Filters top.values to keep only children whose key matches these leaf texts
  • Renames BMI from 'centile' to 'range' during filtering
  • Ensures BMI appears only in cases where it's in path_config (~50%)

The tree structure for measurements is flat (e.g., 'BMI (body mass index) centile'
is a direct child of 'PHYSICAL EXAMINATION', not nested under 'Body measure').
Path configs use 3-segment paths for clarity, but the actual tree only has 2 levels.

This fix:
- Extracts leaf texts from all PHYSICAL EXAMINATION path_config entries
- Filters top.values to keep only children whose key matches these leaf texts
- Renames BMI from 'centile' to 'range' during filtering
- Ensures BMI appears only in cases where it's in path_config (~50%)
@karokojnr karokojnr merged commit 15a439c into main Nov 19, 2025
1 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.

2 participants