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

Bump org.hl7.fhir.core to 6.3.25 #6293

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void testValidateCodeInEnumeratedValueSetWithUnknownCodeSystem_Warning()
encoded = encode(oo);
ourLog.info(encoded);
assertThat(oo.getIssue()).hasSize(1);
assertEquals("CodeSystem is unknown and can't be validated: http://cs for 'http://cs#code1' (error because this is a required binding)", oo.getIssueFirstRep().getDiagnostics());
assertEquals("CodeSystem is unknown and can't be validated: http://cs for 'http://cs#code1'", oo.getIssueFirstRep().getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.WARNING, oo.getIssueFirstRep().getSeverity());

// Invalid code
Expand Down Expand Up @@ -334,7 +334,7 @@ public void testValidateCodeInNonEnumeratedValueSetWithUnknownCodeSystem_Warning
encoded = encode(oo);
ourLog.info(encoded);
assertThat(oo.getIssue()).hasSize(1);
assertEquals("CodeSystem is unknown and can't be validated: http://cs for 'http://cs#code1' (error because this is a required binding)", oo.getIssueFirstRep().getDiagnostics());
assertEquals("CodeSystem is unknown and can't be validated: http://cs for 'http://cs#code1'", oo.getIssueFirstRep().getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.WARNING, oo.getIssueFirstRep().getSeverity());

// Invalid code
Expand All @@ -343,7 +343,7 @@ public void testValidateCodeInNonEnumeratedValueSetWithUnknownCodeSystem_Warning
encoded = encode(oo);
ourLog.info(encoded);
assertThat(oo.getIssue()).hasSize(1);
assertEquals("CodeSystem is unknown and can't be validated: http://cs for 'http://cs#code99' (error because this is a required binding)", oo.getIssue().get(0).getDiagnostics());
assertEquals("CodeSystem is unknown and can't be validated: http://cs for 'http://cs#code99'", oo.getIssue().get(0).getDiagnostics());
assertEquals(OperationOutcome.IssueSeverity.WARNING, oo.getIssue().get(0).getSeverity());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta
private boolean noBindingMsgSuppressed = false;
private volatile VersionSpecificWorkerContextWrapper myWrappedWorkerContext;
private boolean errorForUnknownProfiles = true;
private boolean myUnknownSystemsCauseErrors = true;
private boolean assumeValidRestReferences;
private List<String> myExtensionDomains = Collections.emptyList();
private IValidatorResourceFetcher validatorResourceFetcher;
Expand Down Expand Up @@ -132,6 +133,14 @@ public void setBestPracticeWarningLevel(BestPracticeWarningLevel theBestPractice
myBestPracticeWarningLevel = theBestPracticeWarningLevel;
}

public void setUnknownSystemsCauseErrors(boolean theUnknownSystemsCauseErrors) {
dotasek marked this conversation as resolved.
Show resolved Hide resolved
myUnknownSystemsCauseErrors = theUnknownSystemsCauseErrors;
}

public boolean isUnknownSystemsCauseErrors() {
return myUnknownSystemsCauseErrors;
}

/**
* Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of
* DefaultProfileValidationSupport if the no-arguments constructor for this object was used.
Expand Down Expand Up @@ -229,6 +238,7 @@ protected List<ValidationMessage> validate(IValidationContext<?> theValidationCt
.setAnyExtensionsAllowed(isAnyExtensionsAllowed())
.setBestPracticeWarningLevel(getBestPracticeWarningLevel())
.setErrorForUnknownProfiles(isErrorForUnknownProfiles())
.setUnknownSystemsCauseErrors(isUnknownSystemsCauseErrors())
.setExtensionDomains(getExtensionDomains())
.setValidationPolicyAdvisor(validatorPolicyAdvisor)
.setNoTerminologyChecks(isNoTerminologyChecks())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class ValidatorWrapper {
private boolean myAssumeValidRestReferences;
private boolean myNoExtensibleWarnings;
private boolean myNoBindingMsgSuppressed;
private boolean myUnknownSystemsCauseErrors;
private Collection<? extends String> myExtensionDomains;
private IValidatorResourceFetcher myValidatorResourceFetcher;
private IValidationPolicyAdvisor myValidationPolicyAdvisor;
Expand Down Expand Up @@ -82,6 +83,11 @@ public ValidatorWrapper setErrorForUnknownProfiles(boolean theErrorForUnknownPro
return this;
}

public ValidatorWrapper setUnknownSystemsCauseErrors(boolean theUnknownSystemsCauseErrors) {
myUnknownSystemsCauseErrors = theUnknownSystemsCauseErrors;
return this;
}

public ValidatorWrapper setNoTerminologyChecks(boolean theNoTerminologyChecks) {
myNoTerminologyChecks = theNoTerminologyChecks;
return this;
Expand Down Expand Up @@ -129,6 +135,7 @@ public List<ValidationMessage> validate(
v.setResourceIdRule(IdStatus.OPTIONAL);
v.setNoTerminologyChecks(myNoTerminologyChecks);
v.setErrorForUnknownProfiles(myErrorForUnknownProfiles);
v.setUnknownCodeSystemsCauseErrors(myUnknownSystemsCauseErrors);
v.getExtensionDomains().addAll(myExtensionDomains);
v.setFetcher(myValidatorResourceFetcher);
v.setPolicyAdvisor(myValidationPolicyAdvisor);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@
</licenses>

<properties>
<fhir_core_version>6.3.23</fhir_core_version>
<fhir_core_version>6.3.25</fhir_core_version>
<spotless_version>2.41.1</spotless_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>

Expand Down
Loading