Bump to core 6.2.6 + fix compilation errors

This commit is contained in:
dotasek 2023-12-13 17:57:09 -05:00
parent 592856c779
commit 89de2b1068
26 changed files with 486 additions and 107 deletions

View File

@ -747,14 +747,18 @@ public interface IValidationSupport {
private final IBaseResource myValueSet;
private final String myError;
public ValueSetExpansionOutcome(String theError) {
private boolean myErrorIsFromServer;
public ValueSetExpansionOutcome(String theError, boolean theErrorIsFromServer) {
myValueSet = null;
myError = theError;
myErrorIsFromServer = theErrorIsFromServer;
}
public ValueSetExpansionOutcome(IBaseResource theValueSet) {
myValueSet = theValueSet;
myError = null;
myErrorIsFromServer = false;
}
public String getError() {
@ -764,6 +768,10 @@ public interface IValidationSupport {
public IBaseResource getValueSet() {
return myValueSet;
}
public boolean getErrorIsFromServer() {
return myErrorIsFromServer;
}
}
class LookupCodeResult {

View File

@ -250,7 +250,8 @@ public class VersionCanonicalizer {
String packageUserData = (String) theResource.getUserData("package");
if (packageUserData != null) {
retVal.setUserData("package", packageUserData);
retVal.setSourcePackage(new PackageInformation(packageUserData, new Date()));
retVal.setSourcePackage(new PackageInformation(
packageUserData, theResource.getStructureFhirVersionEnum().getFhirVersionString(), new Date()));
}
return retVal;
}

View File

@ -26,9 +26,9 @@ import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import com.google.common.annotations.VisibleForTesting;
import jakarta.annotation.PostConstruct;
import org.hl7.fhir.dstu3.context.IWorkerContext;
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
import org.hl7.fhir.instance.model.api.IBase;
import java.util.ArrayList;

View File

@ -31,16 +31,16 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4.context.IWorkerContext;
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r4.fhirpath.TypeDetails;
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4.model.Base;
import org.hl7.fhir.r4.model.ExpressionNode;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.Resource;
import org.hl7.fhir.r4.model.ResourceType;
import org.hl7.fhir.r4.model.TypeDetails;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.Collections;
import java.util.HashMap;
@ -105,13 +105,16 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
private final Map<String, Base> myResourceTypeToStub = Collections.synchronizedMap(new HashMap<>());
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine, Object appContext, String name, boolean beforeContext, boolean explicitConstant)
throws PathEngineException {
return Collections.emptyList();
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -121,24 +124,34 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
}
@Override
public FunctionDetails resolveFunction(String functionName) {
public FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object theAppContext, String theUrl, Base theRefContext) throws FHIRException {
public Base resolveReference(FHIRPathEngine engine, Object theAppContext, String theUrl, Base refContext)
throws FHIRException {
Base retVal = resolveResourceInBundleWithPlaceholderId(theAppContext, theUrl);
if (retVal != null) {
return retVal;
@ -186,12 +199,13 @@ public class SearchParamExtractorR4 extends BaseSearchParamExtractor implements
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object appContext, String url) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
}

View File

@ -31,16 +31,16 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4b.context.IWorkerContext;
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
import org.hl7.fhir.r4b.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4b.model.Base;
import org.hl7.fhir.r4b.model.ExpressionNode;
import org.hl7.fhir.r4b.model.IdType;
import org.hl7.fhir.r4b.model.Resource;
import org.hl7.fhir.r4b.model.ResourceType;
import org.hl7.fhir.r4b.model.TypeDetails;
import org.hl7.fhir.r4b.model.ValueSet;
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.Collections;
import java.util.HashMap;
@ -105,13 +105,16 @@ public class SearchParamExtractorR4B extends BaseSearchParamExtractor implements
private final Map<String, Base> myResourceTypeToStub = Collections.synchronizedMap(new HashMap<>());
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine, Object appContext, String name, boolean beforeContext, boolean explicitConstant)
throws PathEngineException {
return Collections.emptyList();
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -121,24 +124,34 @@ public class SearchParamExtractorR4B extends BaseSearchParamExtractor implements
}
@Override
public FunctionDetails resolveFunction(String functionName) {
public FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object theAppContext, String theUrl, Base refContext) throws FHIRException {
public Base resolveReference(FHIRPathEngine engine, Object theAppContext, String theUrl, Base refContext)
throws FHIRException {
Base retVal = resolveResourceInBundleWithPlaceholderId(theAppContext, theUrl);
if (retVal != null) {
return retVal;
@ -186,12 +199,13 @@ public class SearchParamExtractorR4B extends BaseSearchParamExtractor implements
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object appContext, String url) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
}

View File

@ -30,16 +30,16 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r5.fhirpath.TypeDetails;
import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r5.model.Base;
import org.hl7.fhir.r5.model.ExpressionNode;
import org.hl7.fhir.r5.model.IdType;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.ResourceType;
import org.hl7.fhir.r5.model.TypeDetails;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.Collections;
import java.util.HashMap;
@ -102,13 +102,16 @@ public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements
private final Map<String, Base> myResourceTypeToStub = Collections.synchronizedMap(new HashMap<>());
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine, Object appContext, String name, boolean beforeContext, boolean explicitConstant)
throws PathEngineException {
return Collections.emptyList();
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -118,24 +121,34 @@ public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements
}
@Override
public FunctionDetails resolveFunction(String functionName) {
public FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object appContext, String theUrl, Base refContext) throws FHIRException {
public Base resolveReference(FHIRPathEngine engine, Object appContext, String theUrl, Base refContext)
throws FHIRException {
Base retVal = resolveResourceInBundleWithPlaceholderId(appContext, theUrl);
if (retVal != null) {
return retVal;
@ -183,13 +196,19 @@ public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object theO, String theS) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
@Override
public boolean paramIsType(String name, int index) {
return false;
}
}
}

View File

@ -78,6 +78,12 @@
<groupId>info.debatty</groupId>
<artifactId>java-string-similarity</artifactId>
<version>1.2.1</version>
<exclusions>
<exclusion>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>

View File

@ -31,6 +31,7 @@ import org.hl7.fhir.dstu3.terminologies.ValueSetExpander;
import org.hl7.fhir.dstu3.utils.INarrativeGenerator;
import org.hl7.fhir.dstu3.utils.validation.IResourceValidator;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.utilities.FhirPublication;
import org.hl7.fhir.utilities.i18n.I18nBase;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
import org.hl7.fhir.utilities.validation.ValidationOptions;
@ -313,7 +314,8 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) {
ValidationOptions options = new ValidationOptions();
ValidationOptions options = new ValidationOptions(FhirPublication.fromCode(
myValidationSupport.getFhirContext().getVersion().toString()));
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(
new ValidationSupportContext(myValidationSupport),
convertConceptValidationOptions(options),
@ -351,7 +353,8 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
public ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ValueSet theVs) {
IValidationSupport.CodeValidationResult outcome;
ValidationOptions options = new ValidationOptions();
ValidationOptions options = new ValidationOptions(FhirPublication.fromCode(
myValidationSupport.getFhirContext().getVersion().toString()));
if (isNotBlank(theVs.getUrl())) {
outcome = myValidationSupport.validateCode(
new ValidationSupportContext(myValidationSupport),

View File

@ -7,13 +7,13 @@ import ca.uhn.fhir.fhirpath.IFhirPath;
import ca.uhn.fhir.fhirpath.IFhirPathEvaluationContext;
import ca.uhn.fhir.i18n.Msg;
import jakarta.annotation.Nonnull;
import org.hl7.fhir.dstu3.fhirpath.ExpressionNode;
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
import org.hl7.fhir.dstu3.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.dstu3.fhirpath.TypeDetails;
import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.model.ExpressionNode;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.TypeDetails;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;

View File

@ -410,6 +410,12 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
}
@Override
public <T extends org.hl7.fhir.r4.model.Resource> T fetchResource(
Class<T> theClass, String theUri, String theVersion) {
return fetchResource(theClass, theUri + "|" + theVersion);
}
@Override
public <T extends org.hl7.fhir.r4.model.Resource> T fetchResourceWithException(Class<T> theClass, String theUri)
throws FHIRException {
@ -454,4 +460,31 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
return retVal;
}
@Override
public boolean isPrimitiveType(String theType) {
return List.of(
"boolean",
"integer",
"integer64",
"string",
"decimal",
"uri",
"base64Binary",
"instant",
"date",
"dateTime",
"time",
"code",
"oid",
"id",
"markdown",
"unsignedInt",
"positiveInt",
"uuid",
"xhtml",
"url",
"canonical")
.contains(theType);
}
}

View File

@ -10,14 +10,14 @@ import jakarta.annotation.Nonnull;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r4.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r4.fhirpath.TypeDetails;
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4.model.Base;
import org.hl7.fhir.r4.model.ExpressionNode;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.TypeDetails;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.List;
import java.util.Optional;
@ -94,13 +94,20 @@ public class FhirPathR4 implements IFhirPath {
myEngine.setHostServices(new FHIRPathEngine.IEvaluationContext() {
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine,
Object appContext,
String name,
boolean beforeContext,
boolean explicitConstant)
throws PathEngineException {
return null;
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -110,34 +117,45 @@ public class FhirPathR4 implements IFhirPath {
}
@Override
public FunctionDetails resolveFunction(String functionName) {
public FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object appContext, String theUrl, Base theRefContext) throws FHIRException {
return (Base) theEvaluationContext.resolveReference(new IdType(theUrl), theRefContext);
public Base resolveReference(FHIRPathEngine engine, Object appContext, String url, Base refContext)
throws FHIRException {
return (Base) theEvaluationContext.resolveReference(new IdType(url), refContext);
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object appContext, String url) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
});

View File

@ -10,14 +10,14 @@ import jakarta.annotation.Nonnull;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4b.fhirpath.ExpressionNode;
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r4b.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r4b.fhirpath.TypeDetails;
import org.hl7.fhir.r4b.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4b.model.Base;
import org.hl7.fhir.r4b.model.ExpressionNode;
import org.hl7.fhir.r4b.model.IdType;
import org.hl7.fhir.r4b.model.TypeDetails;
import org.hl7.fhir.r4b.model.ValueSet;
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.List;
import java.util.Optional;
@ -91,13 +91,20 @@ public class FhirPathR4B implements IFhirPath {
myEngine.setHostServices(new FHIRPathEngine.IEvaluationContext() {
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine,
Object appContext,
String name,
boolean beforeContext,
boolean explicitConstant)
throws PathEngineException {
return null;
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -107,34 +114,45 @@ public class FhirPathR4B implements IFhirPath {
}
@Override
public FunctionDetails resolveFunction(String functionName) {
public FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object appContext, String theUrl, Base refContext) throws FHIRException {
return (Base) theEvaluationContext.resolveReference(new IdType(theUrl), refContext);
public Base resolveReference(FHIRPathEngine engine, Object appContext, String url, Base refContext)
throws FHIRException {
return (Base) theEvaluationContext.resolveReference(new IdType(url), refContext);
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object appContext, String url) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
});

View File

@ -13,6 +13,8 @@ import org.apache.commons.lang3.Validate;
import org.fhir.ucum.UcumService;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.TerminologyServiceException;
import org.hl7.fhir.r5.context.IContextResourceLoader;
import org.hl7.fhir.r5.context.ILoggingService;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.IWorkerContextManager;
import org.hl7.fhir.r5.model.CodeSystem;
@ -30,8 +32,11 @@ import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.r5.profilemodel.PEBuilder;
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
import org.hl7.fhir.r5.terminologies.utilities.CodingValidationRequest;
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
import org.hl7.fhir.utilities.FhirPublication;
import org.hl7.fhir.utilities.TimeTracker;
import org.hl7.fhir.utilities.TranslationServices;
import org.hl7.fhir.utilities.i18n.I18nBase;
@ -90,6 +95,16 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
}
@Override
public CodeSystem fetchCodeSystem(String system, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2462));
}
@Override
public CodeSystem fetchCodeSystem(String system, String version, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2463));
}
@Override
public CodeSystem fetchSupplementedCodeSystem(String theS) {
return null;
@ -100,6 +115,16 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return null;
}
@Override
public CodeSystem fetchSupplementedCodeSystem(String system, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2464));
}
@Override
public CodeSystem fetchSupplementedCodeSystem(String system, String version, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2465));
}
@Override
public List<String> getResourceNames() {
List<String> result = new ArrayList<>();
@ -110,6 +135,11 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return result;
}
@Override
public List<String> getResourceNames(FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2466));
}
@Override
public IResourceValidator newValidator() {
throw new UnsupportedOperationException(Msg.code(206));
@ -130,6 +160,11 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
}
@Override
public boolean supportsSystem(String system, FhirPublication fhirVersion) throws TerminologyServiceException {
throw new UnsupportedOperationException(Msg.code(2467));
}
@Override
public ValidationResult validateCode(ValidationOptions theOptions, CodeableConcept theCode, ValueSet theVs) {
for (Coding next : theCode.getCoding()) {
@ -264,7 +299,8 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
input.getCompose().addInclude(theInc);
IValidationSupport.ValueSetExpansionOutcome output =
myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
return new ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null);
return new ValueSetExpansionOutcome(
(ValueSet) output.getValueSet(), output.getError(), null, output.getErrorIsFromServer());
}
@Override
@ -322,11 +358,31 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName);
}
@Override
public boolean isPrimitiveType(String s) {
throw new UnsupportedOperationException(Msg.code(2456));
}
@Override
public boolean isDataType(String s) {
throw new UnsupportedOperationException(Msg.code(2457));
}
@Override
public StructureDefinition fetchTypeDefinition(String typeName, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2458));
}
@Override
public List<StructureDefinition> fetchTypeDefinitions(String n) {
throw new UnsupportedOperationException(Msg.code(234));
}
@Override
public List<StructureDefinition> fetchTypeDefinitions(String n, FhirPublication fhirPublication) {
throw new UnsupportedOperationException(Msg.code(2459));
}
@Override
public <T extends Resource> T fetchResourceRaw(Class<T> class_, String uri) {
return fetchResource(class_, uri);
@ -343,6 +399,10 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
}
public <T extends Resource> T fetchResource(Class<T> class_, String uri, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2460));
}
@Override
public <T extends org.hl7.fhir.r5.model.Resource> T fetchResourceWithException(Class<T> theClass, String theUri)
throws FHIRException {
@ -364,21 +424,47 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return fetchResource(theClass, theUri + "|" + theVersion);
}
@Override
public <T extends Resource> T fetchResource(
Class<T> class_, String uri, String version, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2461));
}
@Override
public <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource canonicalForSource) {
return fetchResource(class_, uri);
}
@Override
public <T extends Resource> List<T> fetchResourcesByType(Class<T> class_, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2468));
}
@Override
public org.hl7.fhir.r5.model.Resource fetchResourceById(String theType, String theUri) {
throw new UnsupportedOperationException(Msg.code(226));
}
@Override
public Resource fetchResourceById(String type, String uri, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2469));
}
@Override
public <T extends org.hl7.fhir.r5.model.Resource> boolean hasResource(Class<T> theClass_, String theUri) {
throw new UnsupportedOperationException(Msg.code(227));
}
@Override
public <T extends Resource> boolean hasResource(Class<T> class_, String uri, Resource sourceOfReference) {
throw new UnsupportedOperationException(Msg.code(2470));
}
@Override
public <T extends Resource> boolean hasResource(Class<T> class_, String uri, FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2471));
}
@Override
public void cacheResource(org.hl7.fhir.r5.model.Resource theRes) throws FHIRException {
throw new UnsupportedOperationException(Msg.code(228));
@ -397,6 +483,11 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return myCtx.getResourceTypes();
}
@Override
public Set<String> getResourceNamesAsSet(FhirPublication fhirVersion) {
throw new UnsupportedOperationException(Msg.code(2472));
}
@Override
public ValueSetExpansionOutcome expandVS(
Resource src, ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical)
@ -518,4 +609,9 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
public void setForPublication(boolean b) {
throw new UnsupportedOperationException(Msg.code(2350));
}
@Override
public Set<String> urlsForOid(boolean codeSystem, String oid) {
throw new UnsupportedOperationException(Msg.code(2473));
}
}

View File

@ -10,14 +10,14 @@ import jakarta.annotation.Nonnull;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r5.fhirpath.ExpressionNode;
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses;
import org.hl7.fhir.r5.fhirpath.TypeDetails;
import org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r5.model.Base;
import org.hl7.fhir.r5.model.ExpressionNode;
import org.hl7.fhir.r5.model.IdType;
import org.hl7.fhir.r5.model.TypeDetails;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses;
import java.util.List;
import java.util.Optional;
@ -92,13 +92,20 @@ public class FhirPathR5 implements IFhirPath {
myEngine.setHostServices(new FHIRPathEngine.IEvaluationContext() {
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine,
Object appContext,
String name,
boolean beforeContext,
boolean explicitConstant)
throws PathEngineException {
return null;
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -108,36 +115,52 @@ public class FhirPathR5 implements IFhirPath {
}
@Override
public FHIRPathUtilityClasses.FunctionDetails resolveFunction(String functionName) {
public FHIRPathUtilityClasses.FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object appContext, String theUrl, Base refContext) throws FHIRException {
return (Base) theEvaluationContext.resolveReference(new IdType(theUrl), refContext);
public Base resolveReference(FHIRPathEngine engine, Object appContext, String url, Base refContext)
throws FHIRException {
return (Base) theEvaluationContext.resolveReference(new IdType(url), refContext);
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object appContext, String url) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
@Override
public boolean paramIsType(String name, int index) {
return false;
}
});
}

View File

@ -134,7 +134,7 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
expansionR5 = expandValueSetToCanonical(
theValidationSupportContext, theValueSetToExpand, theWantSystemAndVersion, theWantCode);
} catch (ExpansionCouldNotBeCompletedInternallyException e) {
return new ValueSetExpansionOutcome(e.getMessage());
return new ValueSetExpansionOutcome(e.getMessage(), false);
}
if (expansionR5 == null) {
return null;

View File

@ -8,10 +8,10 @@ import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.ICompositeType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.r4.fhirpath.ExpressionNode;
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4.model.ExpressionNode;
import org.hl7.fhir.r4.model.Resource;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -10,11 +10,11 @@ import jakarta.annotation.Nonnull;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r5.fhirpath.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r5.fhirpath.TypeDetails;
import org.hl7.fhir.r5.model.Base;
import org.hl7.fhir.r5.model.TypeDetails;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;
import org.hl7.fhir.r5.utils.validation.constants.BestPracticeWarningLevel;
@ -288,13 +288,16 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta
public static class NullEvaluationContext implements FHIRPathEngine.IEvaluationContext {
@Override
public List<Base> resolveConstant(Object appContext, String name, boolean beforeContext)
public List<Base> resolveConstant(
FHIRPathEngine engine, Object appContext, String name, boolean beforeContext, boolean explicitConstant)
throws PathEngineException {
return Collections.emptyList();
}
@Override
public TypeDetails resolveConstantType(Object appContext, String name) throws PathEngineException {
public TypeDetails resolveConstantType(
FHIRPathEngine engine, Object appContext, String name, boolean explicitConstant)
throws PathEngineException {
return null;
}
@ -304,35 +307,51 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta
}
@Override
public FunctionDetails resolveFunction(String functionName) {
public FunctionDetails resolveFunction(FHIRPathEngine engine, String functionName) {
return null;
}
@Override
public TypeDetails checkFunction(Object appContext, String functionName, List<TypeDetails> parameters)
public TypeDetails checkFunction(
FHIRPathEngine engine,
Object appContext,
String functionName,
TypeDetails focus,
List<TypeDetails> parameters)
throws PathEngineException {
return null;
}
@Override
public List<Base> executeFunction(
Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) {
FHIRPathEngine engine,
Object appContext,
List<Base> focus,
String functionName,
List<List<Base>> parameters) {
return null;
}
@Override
public Base resolveReference(Object appContext, String url, Base refContext) throws FHIRException {
public Base resolveReference(FHIRPathEngine engine, Object appContext, String url, Base refContext)
throws FHIRException {
return null;
}
@Override
public boolean conformsToProfile(Object appContext, Base item, String url) throws FHIRException {
public boolean conformsToProfile(FHIRPathEngine engine, Object appContext, Base item, String url)
throws FHIRException {
return false;
}
@Override
public ValueSet resolveValueSet(Object appContext, String url) {
public ValueSet resolveValueSet(FHIRPathEngine engine, Object appContext, String url) {
return null;
}
@Override
public boolean paramIsType(String name, int index) {
return false;
}
}
}

View File

@ -14,8 +14,8 @@ import org.apache.commons.io.input.ReaderInputStream;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.elementmodel.Manager;
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.XVerExtensionManager;
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;

View File

@ -19,6 +19,8 @@ import org.fhir.ucum.UcumService;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.TerminologyServiceException;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r5.context.IContextResourceLoader;
import org.hl7.fhir.r5.context.ILoggingService;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.IWorkerContextManager;
import org.hl7.fhir.r5.model.CodeSystem;
@ -30,9 +32,12 @@ import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.profilemodel.PEBuilder;
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
import org.hl7.fhir.r5.terminologies.utilities.CodingValidationRequest;
import org.hl7.fhir.r5.terminologies.utilities.TerminologyServiceErrorClass;
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
import org.hl7.fhir.utilities.FhirPublication;
import org.hl7.fhir.utilities.TimeTracker;
import org.hl7.fhir.utilities.TranslationServices;
import org.hl7.fhir.utilities.i18n.I18nBase;
@ -313,7 +318,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
String error = expanded.getError();
TerminologyServiceErrorClass result = null;
return new ValueSetExpansionOutcome(convertedResult, error, result);
return new ValueSetExpansionOutcome(convertedResult, error, result, expanded.getErrorIsFromServer());
}
@Override
@ -373,6 +378,16 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
}
@Override
public CodeSystem fetchCodeSystem(String system, FhirPublication fhirVersion) {
return null;
}
@Override
public CodeSystem fetchCodeSystem(String system, String version, FhirPublication fhirVersion) {
return null;
}
@Override
public CodeSystem fetchSupplementedCodeSystem(String system) {
return null;
@ -383,6 +398,16 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
return null;
}
@Override
public CodeSystem fetchSupplementedCodeSystem(String system, FhirPublication fhirVersion) {
return null;
}
@Override
public CodeSystem fetchSupplementedCodeSystem(String system, String version, FhirPublication fhirVersion) {
return null;
}
@Override
public <T extends Resource> T fetchResourceRaw(Class<T> class_, String uri) {
return fetchResource(class_, uri);
@ -407,6 +432,11 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
throw new UnsupportedOperationException(Msg.code(666));
}
@Override
public Resource fetchResourceById(String type, String uri, FhirPublication fhirVersion) {
return null;
}
@Override
public <T extends Resource> T fetchResourceWithException(Class<T> class_, String uri) throws FHIRException {
T retVal = fetchResource(class_, uri);
@ -422,11 +452,27 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
return fetchResource(class_, uri + "|" + version);
}
@Override
public <T extends Resource> T fetchResource(Class<T> class_, String uri, FhirPublication fhirVersion) {
return null;
}
@Override
public <T extends Resource> T fetchResource(
Class<T> class_, String uri, String version, FhirPublication fhirVersion) {
return null;
}
@Override
public <T extends Resource> T fetchResource(Class<T> class_, String uri, Resource canonicalForSource) {
return fetchResource(class_, uri);
}
@Override
public <T extends Resource> List<T> fetchResourcesByType(Class<T> class_, FhirPublication fhirVersion) {
return null;
}
@Override
public <T extends Resource> T fetchResourceWithException(Class<T> class_, String uri, Resource sourceOfReference)
throws FHIRException {
@ -441,6 +487,11 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
.getResourceTypes());
}
@Override
public List<String> getResourceNames(FhirPublication fhirVersion) {
return null;
}
@Override
public Set<String> getResourceNamesAsSet() {
return myValidationSupportContext
@ -449,11 +500,21 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
.getResourceTypes();
}
@Override
public Set<String> getResourceNamesAsSet(FhirPublication fhirVersion) {
return null;
}
@Override
public StructureDefinition fetchTypeDefinition(String typeName) {
return fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/" + typeName);
}
@Override
public StructureDefinition fetchTypeDefinition(String typeName, FhirPublication fhirVersion) {
return null;
}
@Override
public List<StructureDefinition> fetchTypeDefinitions(String typeName) {
List<StructureDefinition> allStructures = new ArrayList<>(allStructures());
@ -461,6 +522,29 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
return allStructures;
}
@Override
public List<StructureDefinition> fetchTypeDefinitions(String n, FhirPublication fhirVersion) {
return null;
}
@Override
public boolean isPrimitiveType(String s) {
List<StructureDefinition> allStructures = new ArrayList<>(allStructures());
return allStructures.stream()
.filter(structureDefinition ->
structureDefinition.getKind() == StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE)
.anyMatch(structureDefinition -> s.equals(structureDefinition.getType()));
}
@Override
public boolean isDataType(String s) {
List<StructureDefinition> allStructures = new ArrayList<>(allStructures());
return allStructures.stream()
.filter(structureDefinition ->
structureDefinition.getKind() == StructureDefinition.StructureDefinitionKind.COMPLEXTYPE)
.anyMatch(structureDefinition -> s.equals(structureDefinition.getType()));
}
@Override
public UcumService getUcumService() {
throw new UnsupportedOperationException(Msg.code(676));
@ -486,6 +570,16 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
throw new UnsupportedOperationException(Msg.code(680));
}
@Override
public <T extends Resource> boolean hasResource(Class<T> class_, String uri, Resource sourceOfReference) {
return false;
}
@Override
public <T extends Resource> boolean hasResource(Class<T> class_, String uri, FhirPublication fhirVersion) {
return false;
}
@Override
public boolean isNoTerminologyServer() {
return false;
@ -523,6 +617,11 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
.isCodeSystemSupported(myValidationSupportContext, system);
}
@Override
public boolean supportsSystem(String system, FhirPublication fhirVersion) throws TerminologyServiceException {
return false;
}
@Override
public TranslationServices translator() {
throw new UnsupportedOperationException(Msg.code(688));
@ -701,6 +800,11 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
throw new UnsupportedOperationException(Msg.code(2351));
}
@Override
public Set<String> urlsForOid(boolean codeSystem, String oid) {
return null;
}
public static ConceptValidationOptions convertConceptValidationOptions(ValidationOptions theOptions) {
ConceptValidationOptions retVal = new ConceptValidationOptions();
if (theOptions.isGuessSystem()) {

View File

@ -21,6 +21,7 @@ import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationS
import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain;
import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator;
import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.Bundle;
@ -52,7 +53,6 @@ import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;

View File

@ -6,13 +6,13 @@ import ca.uhn.fhir.util.TestUtil;
import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.dstu3.model.Base;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.ContactPoint;
import org.hl7.fhir.dstu3.model.DateTimeType;
import org.hl7.fhir.dstu3.model.Observation;
import org.hl7.fhir.dstu3.model.Patient;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.dstu3.model.Specimen;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.fhirpath.FHIRPathEngine;
import org.hl7.fhir.exceptions.FHIRException;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;

View File

@ -6,6 +6,7 @@ import ca.uhn.fhir.util.TestUtil;
import org.hl7.fhir.dstu3.utils.FhirPathEngineTest;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4.model.Base;
import org.hl7.fhir.r4.model.BooleanType;

View File

@ -68,7 +68,7 @@ import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.r4.terminologies.ValueSetExpander;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import org.hl7.fhir.r4.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r5.elementmodel.JsonParser;
import org.hl7.fhir.r5.test.utils.ClassesLoadedFlags;
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;

View File

@ -13,6 +13,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4.context.IWorkerContext;
import org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.utilities.FhirPublication;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import org.junit.jupiter.api.Test;
import org.springframework.core.io.Resource;
@ -57,7 +58,8 @@ public class HapiWorkerContextTest extends BaseTest {
// Built-in Codes
vs.setUrl("http://hl7.org/fhir/ValueSet/fm-status");
ValidationOptions options = new ValidationOptions().withGuessSystem();
ValidationOptions options = new ValidationOptions(FhirPublication.fromCode(
workerCtx.getVersion().toString())).withGuessSystem();
outcome = workerCtx.validateCode(options, "active", vs);
assertEquals(true, outcome.isOk(), outcome.getMessage());

View File

@ -61,7 +61,7 @@ import org.hl7.fhir.r4b.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r4b.model.ValueSet;
import org.hl7.fhir.r4b.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.r4b.terminologies.ValueSetExpander;
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
import org.hl7.fhir.r4b.fhirpath.FHIRPathEngine;
import org.hl7.fhir.r5.test.utils.ClassesLoadedFlags;
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;

View File

@ -897,7 +897,7 @@
</licenses>
<properties>
<fhir_core_version>6.1.2.2</fhir_core_version>
<fhir_core_version>6.2.6</fhir_core_version>
<spotless_version>2.41.1</spotless_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>