hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

Add support for response parameter `issues` for `validate-code` operation #6360

Closed codeforgreen closed 1 month ago

codeforgreen commented 1 month ago

Fixes #6359 Workaround for https://github.com/hapifhir/org.hl7.fhir.core/issues/1766

The fix only includes changes for Remote Terminology validator. I checked all the other validators we have and we seem to have implemented a similar approach by explicitly adding issue to the response of validateCode call (e.g. InMemoryTerminologyServerValidationSupport, CommonCodeSystemsTerminologyService, TermReadSvcImpl) which was implemented when the upgrade of the org.hl7.fhir.core library was done in #5772.

You will notice test testValidateResourceContainingLoincCode has boolean parameter added which controls the output of the mocked validateCode response. If the error response has a message, the FHIR Validator will not act on it unless it has issues populated as well. For Remote Terminology specifically a workaround has been implemented.

github-actions[bot] commented 1 month ago

Formatting check succeeded!

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.54%. Comparing base (406db33) to head (76b6fd5). Report is 66 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6360 +/- ## ========================================== Coverage 83.54% 83.54% - Complexity 27432 27666 +234 ========================================== Files 1707 1723 +16 Lines 106185 107094 +909 Branches 13397 13465 +68 ========================================== + Hits 88710 89474 +764 - Misses 11750 11843 +93 - Partials 5725 5777 +52 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.