Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/cases/service/case_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@ def get_case_review(self, case_config_id): # pragma: no cover
# Filter child.values - handle both string lists and TreeNode lists
if child.values and isinstance(child.values[0], TreeNode):
# child.values is a list of TreeNode objects
child.values = [v for v in child.values if v.key in keep]
# Special handling for BMI - accept both 'range' and 'centile' versions
keep_with_bmi = keep.copy()
if "BMI (body mass index) centile" in keep:
keep_with_bmi.add("BMI (body mass index) range")
child.values = [v for v in child.values if v.key in keep_with_bmi]
else:
# child.values is a list of strings
child.values = [v for v in child.values if v in keep]
Expand Down
Loading