-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
Description
Bug
When a ValueSet compose includes codes via is-a filter and excludes specific codes, expansion.total reflects the pre-exclude count rather than the post-exclude count. The contains array is correctly filtered.
Repro
curl -s -X POST 'https://tx-dev.fhir.org/r4/ValueSet/$expand' \
-H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' \
-d '{
"resourceType": "Parameters",
"parameter": [
{"name": "count", "valueInteger": 200},
{"name": "valueSet", "resource": {
"resourceType": "ValueSet", "status": "active",
"compose": {
"include": [{"system": "http://snomed.info/sct",
"filter": [{"property": "concept", "op": "is-a", "value": "73211009"}]}],
"exclude": [{"system": "http://snomed.info/sct",
"concept": [{"code": "73211009"}]}]
}
}}
]
}' | jq '{total: .expansion.total, actual: (.expansion.contains | length)}'
# Returns: {"total": 124, "actual": 123}
# Expected: {"total": 123, "actual": 123}Reactions are currently unavailable