-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix exception when passing url/code combinations to an external terminology server #6984
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
base: master
Are you sure you want to change the base?
Fix exception when passing url/code combinations to an external terminology server #6984
Conversation
…ination for code-validation
[spotless]: Formatting check succeeded! |
[spotless]: Formatting check succeeded! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6984 +/- ##
============================================
- Coverage 83.41% 83.41% -0.01%
- Complexity 29193 29249 +56
============================================
Files 1843 1846 +3
Lines 113422 113529 +107
Branches 14251 14261 +10
============================================
+ Hits 94608 94696 +88
- Misses 12730 12736 +6
- Partials 6084 6097 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…eption-when-executing-a-validate-code-operation
[spotless]: Formatting check succeeded! |
...6987-fix-exception-when-passing-url-code-combinations-to-an-external-terminology-server.yaml
Show resolved
Hide resolved
...jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCodeSystem.java
Show resolved
Hide resolved
...jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCodeSystem.java
Show resolved
Hide resolved
...ir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderCodeSystemTest.java
Show resolved
Hide resolved
...jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderCodeSystem.java
Show resolved
Hide resolved
[spotless]: This Pull Request has failed the formatting check Please run You can automate this auto-formatting process to execute on the git pre-push hook, by installing pre-commit and then calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, would prefer not to add a whole new mock test class for this tiny behaviour. Could this be tested in an existing test class like ValidateCodeWithRemoteTerminologyR4Test
?
@@ -39,6 +39,7 @@ | |||
import org.hl7.fhir.instance.model.api.IBaseResource; | |||
import org.hl7.fhir.instance.model.api.IIdType; | |||
import org.hl7.fhir.instance.model.api.IPrimitiveType; | |||
import org.jetbrains.annotations.Nullable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: jetbrains imports are not permitted. Use the jakartax libraries for this.
|
||
assertThat(expectedUrl.getValue()).isEqualTo(myUrlCaptor.getValue()); | ||
assertThat(expectedCode.getValue()).isEqualTo(myCodeCaptor.getValue()); | ||
assertThat(expectedDisplay.getValue()).isEqualTo(myDisplayCaptor.getValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue(non-blocking): this mock test is very brittle, is there any way we could actually test this under one of the R4 Provider tests with an actual running set of providers?
[spotless]: This Pull Request has failed the formatting check Please run You can automate this auto-formatting process to execute on the git pre-push hook, by installing pre-commit and then calling |
What was done:
When an external terminology server is being used, we were incorrectly handling the codeableConcept and url/code combination of input parameters. We were only handling the Coding case. We now handle Coding and url/code, and fail gracefully when codeableConcept is used.