COnfirm validation support comntains codesystem

This commit is contained in:
James Agnew 2019-05-02 07:50:59 -04:00
parent 8c7f065440
commit 5132f1f4ed
3 changed files with 16 additions and 7 deletions

View File

@ -94,9 +94,11 @@ public class ValidationSupportChain implements IValidationSupport {
@Override
public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) {
for (IValidationSupport next : myChain) {
CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem);
if (retVal != null) {
return retVal;
if (next.isCodeSystemSupported(theCtx, theSystem)) {
CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem);
if (retVal != null) {
return retVal;
}
}
}
return null;

View File

@ -71,11 +71,13 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public CodeSystem fetchCodeSystem(FhirContext theCtx, String uri) {
public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) {
for (IValidationSupport next : myChain) {
CodeSystem retVal = next.fetchCodeSystem(theCtx, uri);
if (retVal != null) {
return retVal;
if (next.isCodeSystemSupported(theCtx, theSystem)) {
CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem);
if (retVal != null) {
return retVal;
}
}
}
return null;

View File

@ -198,6 +198,11 @@
Fixed "because at least one resource has a reference to this resource" delete error message that mistakingly reported
the target instead of the source with the reference.
</action>
<action type="add">
ValidationSupportChain will now call isCodeSystemSupported() on each entry in the chain before
calling fetchCodeSystem() in order to reduce the work required by chain entries. Thanks to
Anders Havn for the suggestion!
</action>
</release>
<release version="3.7.0" date="2019-02-06" description="Gale">
<action type="add">