diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java index e408f6b35..49521c97d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java @@ -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 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; } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java index 3a58fd8ba..256868682 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java @@ -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: + clinical-reasoning + clinical_quality-language + + 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 { @Override @@ -630,8 +642,8 @@ public interface IWorkerContext { // todo: figure these out public Map 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 getCodeSystemsUsed(); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java index 66581d063..0b09ee369 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java @@ -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; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExpressionNode.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExpressionNode.java new file mode 100644 index 000000000..b37397775 --- /dev/null +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ExpressionNode.java @@ -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: + clinical-reasoning + clinical_quality-language + + 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 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 getDistalNames() { + return wrappedExpressionNode.getDistalNames(); + } + + @Override + public boolean isNullSet() { + return wrappedExpressionNode.isNullSet(); + } +} diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java new file mode 100644 index 000000000..3d6633604 --- /dev/null +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java @@ -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: + clinical-reasoning + clinical_quality-language + + 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 evaluate(Base base, org.hl7.fhir.r5.model.ExpressionNode expressionNode) { + return super.evaluate(base, expressionNode); + } +} \ No newline at end of file diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/TerminologyServiceOptions.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/TerminologyServiceOptions.java index 2dd989c9a..7666bbed5 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/TerminologyServiceOptions.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/TerminologyServiceOptions.java @@ -1,7 +1,7 @@ -package org.hl7.fhir.utilities; - -import org.hl7.fhir.utilities.validation.ValidationOptions; - +package org.hl7.fhir.utilities; + +import org.hl7.fhir.utilities.validation.ValidationOptions; + /* Copyright (c) 2011+, HL7, Inc. All rights reserved. @@ -30,21 +30,23 @@ import org.hl7.fhir.utilities.validation.ValidationOptions; POSSIBILITY OF SUCH DAMAGE. */ - - -/** - * This class is superceded by TerminologyValidationOptions but retained here for backwards compatibility - * @author graha - * - */ -public class TerminologyServiceOptions extends ValidationOptions { - - public TerminologyServiceOptions(FhirPublication fhirVersion) { - super(fhirVersion); - } - - public TerminologyServiceOptions(FhirPublication fhirVersion, String lang) { - super(fhirVersion, lang); - } - + + +/** + * This class is superceded by TerminologyValidationOptions but retained here for backwards compatibility + * @author graha + * + */ +public class TerminologyServiceOptions extends ValidationOptions { + + public TerminologyServiceOptions() { this(FhirPublication.R5); } + + public TerminologyServiceOptions(FhirPublication fhirVersion) { + super(fhirVersion); + } + + public TerminologyServiceOptions(FhirPublication fhirVersion, String lang) { + super(fhirVersion, lang); + } + } \ No newline at end of file diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationOptions.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationOptions.java index 47a32d217..3657e9e8d 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationOptions.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/validation/ValidationOptions.java @@ -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;