Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-3565: Bump core validator to 6.5.0 #80

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Dec 18, 2024

Summary

Bumps the core validator library to 6.5.0, with one trivial and one nontrivial change to keep up with the core engine.

Trivial change: add a null to support a changing method signature.

Nontrivial change: Adds an explicit "policy advisor" to the engine that ensures it doesn't try to validate missing references beyond what is expected. The logic is derived from how it's done upstream in the ValidationService:
https://github.com/hapifhir/org.hl7.fhir.core/blob/e021fb31fd2303f5ad702c02b81a9c1c391697a8/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/cli/services/ValidationService.java#L610

Here we are essentially working with disableDefaultResourceFetcher:true so the logic is cloned from lines 616-618 and line 627, and slightly cleaned up. I don't know why there are 2 levels of PolicyAdvisor but that's how it works.

Testing Guidance

The main reason we are bumping this is to fix a regression where references to resources not included in the validation request would always return a "not found" type error.

Sample resource:

{ "resourceType": "Observation", "subject": { "reference": "Patient/A" } }

Run this on https://inferno.healthit.gov/validator/:

Observation.subject: Unable to resolve resource with reference 'Patient/A' on line 1.

Run this locally (eg, run with ./gradlew run and POST that in the body to http://localhost:4567/validate ) and that error should not occur. Other errors such as missing required fields should still be present.

@dehall dehall merged commit 24e2ae5 into main Dec 19, 2024
3 checks passed
@dehall dehall deleted the fi-3565-bump-validator branch December 19, 2024 17:42
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