Skip to content

Commit 0b0d0e3

Browse files
Credit for #6904 (#6925)
* feat: add full support for ValueSet filters in in-memory terminology validation This adds support for all FHIR-defined ValueSet filter operators (e.g. is-a, descendent-of, is-not-a, in, regex, exists, etc.) to the in-memory terminology validator (InMemoryTerminologyServerValidationSupport). Supports: - Structural filters: is-a, descendent-of, is-not-a, generalizes, child-of, descendent-leaf - Equality/regex/inclusion: equal (=), regex, in, not-in - Existence: exists Adds internal indexing for concept code/display fields to enable efficient traversal and matching. Follows case-sensitivity rules defined by CodeSystem. Also includes a full unit test suite for all filters, covering both code and display properties where relevant. Fixes issues where descendant-based filters were not honored during expansion in tests relying on in-memory terminology (e.g. no JPA preload). Fixes #4447, #6255 * fix(validation): error on filtered ValueSet includes against ignored CodeSystem When a ValueSet include specifies filters (e.g. “is-a”) but the referenced CodeSystem is configured as NOT_PRESENT/ignored, in-memory expansion cannot apply structural filters. Add a guard to throw an ExpansionCouldNotBeCompletedInternallyException in this scenario rather than silently returning an empty result. * test(validation): expect in-memory validation to fail for delta-based hierarchy Previously we asserted success on an in-memory hierarchy check, but the expander cannot apply ISA filters against a NOT_PRESENT CodeSystem patched only via `$apply-codesystem-delta-add`. Update the test to assert that `validateCode(...)` returns a non-OK outcome containing “cannot apply filters” for the in-memory pass, then continue to validate via the deferred/pre-expanded path. * Add changelog for #6904 --------- Co-authored-by: Ibrahim Tallouzi <[email protected]>
1 parent 6f49864 commit 0b0d0e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: add
3+
issue: 6904
4+
title: "The in-memory ValueSet expander, used for validation outside of JPA, and for validation
5+
of ad-hoc and not pre-expanded ValueSets, now supports filtered inclusion/exclusion with a
6+
similar scope to the JPA pre-expander. Thanks to Ibrahim Tallouzi for the contribution!"

0 commit comments

Comments
 (0)