fixed dstu2.1 build

This commit is contained in:
patrick-werner 2019-03-30 14:55:40 +01:00
parent 15fda25771
commit 609053bc56
2 changed files with 22 additions and 4 deletions

View File

@ -99,8 +99,13 @@ public class PrePopulatedValidationSupport implements IValidationSupport {
} }
@Override @Override
public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { public CodeSystem fetchCodeSystem(FhirContext theContext, String uri) {
return myCodeSystems.get(theSystem); return myCodeSystems.get(uri);
}
@Override
public ValueSet fetchValueSet(FhirContext theContext, String uri) {
return myValueSets.get(uri);
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.dstu2016may.hapi.validation;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import org.hl7.fhir.dstu2016may.model.CodeSystem; import org.hl7.fhir.dstu2016may.model.CodeSystem;
import org.hl7.fhir.dstu2016may.model.StructureDefinition; import org.hl7.fhir.dstu2016may.model.StructureDefinition;
import org.hl7.fhir.dstu2016may.model.ValueSet;
import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IBaseResource;
@ -78,9 +79,9 @@ public class ValidationSupportChain implements IValidationSupport {
} }
@Override @Override
public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) { public CodeSystem fetchCodeSystem(FhirContext theCtx, String uri) {
for (IValidationSupport next : myChain) { for (IValidationSupport next : myChain) {
CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem); CodeSystem retVal = next.fetchCodeSystem(theCtx, uri);
if (retVal != null) { if (retVal != null) {
return retVal; return retVal;
} }
@ -88,6 +89,18 @@ public class ValidationSupportChain implements IValidationSupport {
return null; return null;
} }
@Override
public ValueSet fetchValueSet(FhirContext theCtx, String uri) {
for (IValidationSupport next : myChain) {
ValueSet retVal = next.fetchValueSet(theCtx, uri);
if (retVal != null) {
return retVal;
}
}
return null;
}
@Override @Override
public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) { public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) {
for (IValidationSupport next : myChain) { for (IValidationSupport next : myChain) {