Add shim interfaces and classes for CR project compatibility
This commit is contained in:
parent
b65f7afb1d
commit
3317d8bd86
|
@ -277,7 +277,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
protected boolean canRunWithoutTerminology;
|
||||
protected boolean noTerminologyServer;
|
||||
private int expandCodesLimit = 1000;
|
||||
protected ILoggingService logger = new SystemOutLoggingService();
|
||||
protected org.hl7.fhir.r5.context.ILoggingService logger = new SystemOutLoggingService();
|
||||
protected Parameters expParameters;
|
||||
private Map<String, PackageInformation> packages = new HashMap<>();
|
||||
|
||||
|
@ -1985,7 +1985,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
this.canRunWithoutTerminology = canRunWithoutTerminology;
|
||||
}
|
||||
|
||||
public void setLogger(@Nonnull ILoggingService logger) {
|
||||
public void setLogger(@Nonnull org.hl7.fhir.r5.context.ILoggingService logger) {
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
|
@ -2810,7 +2810,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
}
|
||||
|
||||
@Override
|
||||
public ILoggingService getLogger() {
|
||||
public org.hl7.fhir.r5.context.ILoggingService getLogger() {
|
||||
return logger;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,18 @@ import javax.annotation.Nonnull;
|
|||
|
||||
public interface IWorkerContext {
|
||||
|
||||
/**
|
||||
@deprecated This interface only exists to provide backward compatibility for the following two projects:
|
||||
<a href="https://github.com/cqframework/clinical-reasoning">clinical-reasoning</a>
|
||||
<a href="https://github.com/cqframework/clinical_quality_language/">clinical_quality-language</a>
|
||||
|
||||
Due to a circular dependency, they cannot be updated without a release of HAPI, which requires backwards
|
||||
compatibility with core version 6.1.2.2
|
||||
**/
|
||||
@Deprecated(forRemoval = true)
|
||||
public interface ILoggingService extends org.hl7.fhir.r5.context.ILoggingService{
|
||||
|
||||
}
|
||||
public class OIDDefinitionComparer implements Comparator<OIDDefinition> {
|
||||
|
||||
@Override
|
||||
|
@ -630,8 +642,8 @@ public interface IWorkerContext {
|
|||
// todo: figure these out
|
||||
public Map<String, NamingSystem> getNSUrlMap();
|
||||
|
||||
public void setLogger(@Nonnull ILoggingService logger);
|
||||
public ILoggingService getLogger();
|
||||
public void setLogger(@Nonnull org.hl7.fhir.r5.context.ILoggingService logger);
|
||||
public org.hl7.fhir.r5.context.ILoggingService getLogger();
|
||||
|
||||
public boolean isNoTerminologyServer();
|
||||
public Set<String> getCodeSystemsUsed();
|
||||
|
|
|
@ -214,7 +214,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||
private final boolean allowLoadingDuplicates;
|
||||
|
||||
@With
|
||||
private final ILoggingService loggingService;
|
||||
private final org.hl7.fhir.r5.context.ILoggingService loggingService;
|
||||
|
||||
public SimpleWorkerContextBuilder() {
|
||||
cacheTerminologyClientErrors = false;
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
package org.hl7.fhir.r5.model;
|
||||
|
||||
import org.hl7.fhir.r5.fhirpath.TypeDetails;
|
||||
import org.hl7.fhir.utilities.SourceLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@deprecated This interface only exists to provide backward compatibility for the following two projects:
|
||||
<a href="https://github.com/cqframework/clinical-reasoning">clinical-reasoning</a>
|
||||
<a href="https://github.com/cqframework/clinical_quality_language/">clinical_quality-language</a>
|
||||
|
||||
Due to a circular dependency, they cannot be updated without a release of HAPI, which requires backwards
|
||||
compatibility with core version 6.1.2.2
|
||||
**/
|
||||
public class ExpressionNode extends org.hl7.fhir.r5.fhirpath.ExpressionNode{
|
||||
|
||||
private final org.hl7.fhir.r5.fhirpath.ExpressionNode wrappedExpressionNode;
|
||||
public ExpressionNode(int uniqueId) {
|
||||
super(0);
|
||||
wrappedExpressionNode = new org.hl7.fhir.r5.fhirpath.ExpressionNode(uniqueId);
|
||||
}
|
||||
|
||||
public ExpressionNode(org.hl7.fhir.r5.fhirpath.ExpressionNode wrappedExpressionNode) {
|
||||
super(0);
|
||||
this.wrappedExpressionNode = wrappedExpressionNode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return wrappedExpressionNode.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return wrappedExpressionNode.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
wrappedExpressionNode.setName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Base getConstant() {
|
||||
return wrappedExpressionNode.getConstant();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConstant(Base constant) {
|
||||
wrappedExpressionNode.setConstant(constant);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Function getFunction() {
|
||||
return wrappedExpressionNode.getFunction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFunction(Function function) {
|
||||
wrappedExpressionNode.setFunction(function);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isProximal() {
|
||||
return wrappedExpressionNode.isProximal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProximal(boolean proximal) {
|
||||
wrappedExpressionNode.setProximal(proximal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Operation getOperation() {
|
||||
return wrappedExpressionNode.getOperation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOperation(Operation operation) {
|
||||
wrappedExpressionNode.setOperation(operation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.hl7.fhir.r5.fhirpath.ExpressionNode getInner() {
|
||||
return wrappedExpressionNode.getInner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInner(org.hl7.fhir.r5.fhirpath.ExpressionNode value) {
|
||||
wrappedExpressionNode.setInner(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.hl7.fhir.r5.fhirpath.ExpressionNode getOpNext() {
|
||||
return wrappedExpressionNode.getOpNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpNext(org.hl7.fhir.r5.fhirpath.ExpressionNode value) {
|
||||
wrappedExpressionNode.setOpNext(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<org.hl7.fhir.r5.fhirpath.ExpressionNode> getParameters() {
|
||||
return wrappedExpressionNode.getParameters();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkName() {
|
||||
return wrappedExpressionNode.checkName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Kind getKind() {
|
||||
return wrappedExpressionNode.getKind();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setKind(Kind kind) {
|
||||
wrappedExpressionNode.setKind(kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.hl7.fhir.r5.fhirpath.ExpressionNode getGroup() {
|
||||
return wrappedExpressionNode.getGroup();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGroup(org.hl7.fhir.r5.fhirpath.ExpressionNode group) {
|
||||
wrappedExpressionNode.setGroup(group);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SourceLocation getStart() {
|
||||
return wrappedExpressionNode.getStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStart(SourceLocation start) {
|
||||
wrappedExpressionNode.setStart(start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SourceLocation getEnd() {
|
||||
return wrappedExpressionNode.getEnd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnd(SourceLocation end) {
|
||||
wrappedExpressionNode.setEnd(end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SourceLocation getOpStart() {
|
||||
return wrappedExpressionNode.getOpStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpStart(SourceLocation opStart) {
|
||||
wrappedExpressionNode.setOpStart(opStart);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SourceLocation getOpEnd() {
|
||||
return wrappedExpressionNode.getOpEnd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpEnd(SourceLocation opEnd) {
|
||||
wrappedExpressionNode.setOpEnd(opEnd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueId() {
|
||||
return wrappedExpressionNode.getUniqueId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int parameterCount() {
|
||||
return wrappedExpressionNode.parameterCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String Canonical() {
|
||||
return wrappedExpressionNode.Canonical();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String summary() {
|
||||
return wrappedExpressionNode.summary();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String check() {
|
||||
return wrappedExpressionNode.check();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeDetails getTypes() {
|
||||
return wrappedExpressionNode.getTypes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypes(TypeDetails types) {
|
||||
wrappedExpressionNode.setTypes(types);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeDetails getOpTypes() {
|
||||
return wrappedExpressionNode.getOpTypes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpTypes(TypeDetails opTypes) {
|
||||
wrappedExpressionNode.setOpTypes(opTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDistalNames() {
|
||||
return wrappedExpressionNode.getDistalNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNullSet() {
|
||||
return wrappedExpressionNode.isNullSet();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@deprecated This interface only exists to provide backward compatibility for the following two projects:
|
||||
<a href="https://github.com/cqframework/clinical-reasoning">clinical-reasoning</a>
|
||||
<a href="https://github.com/cqframework/clinical_quality_language/">clinical_quality-language</a>
|
||||
|
||||
Due to a circular dependency, they cannot be updated without a release of HAPI, which requires backwards
|
||||
compatibility with core version 6.1.2.2
|
||||
**/
|
||||
public class FHIRPathEngine extends org.hl7.fhir.r5.fhirpath.FHIRPathEngine {
|
||||
|
||||
public interface IEvaluationContext extends org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext{ }
|
||||
public FHIRPathEngine(IWorkerContext worker) {
|
||||
super(worker);
|
||||
}
|
||||
|
||||
public org.hl7.fhir.r5.model.ExpressionNode parse(String string) {
|
||||
return new org.hl7.fhir.r5.model.ExpressionNode(super.parse(string));
|
||||
}
|
||||
|
||||
public List<Base> evaluate(Base base, org.hl7.fhir.r5.model.ExpressionNode expressionNode) {
|
||||
return super.evaluate(base, expressionNode);
|
||||
}
|
||||
}
|
|
@ -39,6 +39,8 @@ import org.hl7.fhir.utilities.validation.ValidationOptions;
|
|||
*/
|
||||
public class TerminologyServiceOptions extends ValidationOptions {
|
||||
|
||||
public TerminologyServiceOptions() { this(FhirPublication.R5); }
|
||||
|
||||
public TerminologyServiceOptions(FhirPublication fhirVersion) {
|
||||
super(fhirVersion);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ public class ValidationOptions {
|
|||
private boolean exampleOK = false;
|
||||
private FhirPublication fhirVersion;
|
||||
|
||||
public ValidationOptions() { this(FhirPublication.R5); }
|
||||
|
||||
public ValidationOptions(FhirPublication fhirVersion) {
|
||||
super();
|
||||
this.fhirVersion = fhirVersion;
|
||||
|
|
Loading…
Reference in New Issue