-
Notifications
You must be signed in to change notification settings - Fork 2
resolve() raises an error instead of returning an empty collection for non-URI inputs #307
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingfhir.pathRelated to the FHIRPath moduleRelated to the FHIRPath module
Description
Resolve.evaluate() raises FHIRPathError when the input item is not a string URI or a
Reference object. The FHIRPath spec states that items that cannot be resolved must be
silently skipped (i.e. contribute an empty result), not raise an error.
Additionally, external http:// / https:// URL resolution is completely absent. A warning
is logged but no attempt is made. The spec does allow engines to return empty for external
references when no resolution service is configured, but this should be a documented opt-out,
not a hard block.
Expected behaviour (per spec)
- Non-URI, non-Reference inputs: silently produce no output (empty collection).
- External URLs with no resolution service configured: return empty collection (no error, no warning spam).
- External URLs with a resolution service configured: delegate to the service.
Actual behaviour
- Non-URI inputs: raises
FHIRPathError. - External URLs: emits a
warnings.warn()and still returns[]— the warn adds noise in
production validation runs whereresolve()is common.
Suggested fix
Replace the raise FHIRPathError(...) branch for non-URI items with a continue (skip).
Tie external URL resolution to the proposed TerminologyService/ResolutionService interface
so it can be opted into.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfhir.pathRelated to the FHIRPath moduleRelated to the FHIRPath module