Skip to content

Commit

Permalink
Merge branch 'master' into feature-add-cql-export
Browse files Browse the repository at this point in the history
  • Loading branch information
JPercival authored Jan 25, 2024
2 parents 83f8ead + 173f7c7 commit ce24b38
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 44 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

<groupId>org.opencds.cqf</groupId>
<artifactId>tooling-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>

<packaging>pom</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<cql.version>3.5.1</cql.version>
<hapi.version>6.10.0</hapi.version>
<cql.version>3.6.0</cql.version>
<hapi.version>6.10.2</hapi.version>
<core.version>6.1.2.2</core.version>
<spring-boot.version>2.1.5.RELEASE</spring-boot.version>
<slf4j.version>2.0.5</slf4j.version>
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi
# Import maven settings
cp .travis.settings.xml $HOME/.m2/settings.xml

CMD="mvn deploy -DskipTests=true -Dmaven.test.skip=true -B"
CMD="./mvnw deploy -DskipTests=true -Dmaven.test.skip=true -B"

# Import signing key and publish a release on a tag
if [[ ! -z "$TRAVIS_TAG" ]]
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
set -euxo pipefail
bash -n "$0"

mvn install -U -DskipTests=true -Dmaven.javadoc.skip=true -B -V
./mvnw install -U -DskipTests=true -Dmaven.javadoc.skip=true -B -V
2 changes: 1 addition & 1 deletion scripts/maintenance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
set -euxo pipefail
bash -n "$0"

mvn versions:update-properties versions:use-releases versions:use-latest-releases -Dexcludes=com.github.ben-manes.caffeine:caffeine:jar:\*,org.slf4j:\*,org.glassfish.jaxb:\*,com.sun.istack:\*,com.sun.xml.fastinfoset:\*,net.sf.jopt-simple:\*,ch.qos.logback:\*
./mvnw versions:update-properties versions:use-releases versions:use-latest-releases -Dexcludes=com.github.ben-manes.caffeine:caffeine:jar:\*,org.slf4j:\*,org.glassfish.jaxb:\*,com.sun.istack:\*,com.sun.xml.fastinfoset:\*,net.sf.jopt-simple:\*,ch.qos.logback:\*
2 changes: 1 addition & 1 deletion scripts/setversion.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh

# usage ./scripts/setversion.sh N.N.N (or N.N.N-SNAPSHOT)
mvn versions:set -DnewVersion=$1
./mvnw versions:set -DnewVersion=$1
6 changes: 3 additions & 3 deletions tooling-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>org.opencds.cqf</groupId>
<artifactId>tooling-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
</parent>

<artifactId>tooling-cli</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
<packaging>jar</packaging>

<description>CQF Tooling CLI</description>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>org.opencds.cqf</groupId>
<artifactId>tooling</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions tooling-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>org.opencds.cqf</groupId>
<artifactId>tooling-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
</parent>

<artifactId>tooling-ui</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
<packaging>jar</packaging>

<description>CQF Tooling UI</description>
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>org.opencds.cqf</groupId>
<artifactId>tooling</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
Expand Down
4 changes: 2 additions & 2 deletions tooling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>org.opencds.cqf</groupId>
<artifactId>tooling-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
</parent>

<artifactId>tooling</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public class Api {

private Api() {}

public static final String RXMIX_WORKFLOW_URL = "https://mor.nlm.nih.gov/RxMix/executeConfig.do";
public static final String RXMIX_WORKFLOW_URL = "https://rxmix-legacy.nlm.nih.gov/RxMix/executeConfig.do";
public static final String LOINC_HIERARCHY_QUERY_URL = "https://loinc.regenstrief.org/searchapi/hierarchy/component-system/search?searchString=";
public static final String LOINC_FHIR_SERVER_URL = "https://fhir.loinc.org";
public static final String FHIR_LOOKUP_OPERATION_NAME = "$lookup";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
import java.util.Stack;

import org.apache.commons.lang3.tuple.Pair;
import org.cqframework.cql.cql2elm.CqlCompilerOptions;
import org.cqframework.cql.cql2elm.CqlTranslatorOptions;
import org.cqframework.cql.cql2elm.LibraryBuilder;
import org.cqframework.cql.cql2elm.LibraryManager;
import org.cqframework.cql.cql2elm.ModelManager;
import org.cqframework.cql.elm.IdObjectFactory;
import org.fhir.ucum.UcumEssenceService;
import org.fhir.ucum.UcumException;
import org.fhir.ucum.UcumService;
Expand Down Expand Up @@ -60,8 +59,7 @@ public void newLibraryBuilder(Pair<VersionedIdentifier, ContextDef> libraryInfo)
UcumService ucumService = new UcumEssenceService(
UcumEssenceService.class.getResourceAsStream("/ucum-essence.xml"));
libraryManager.setUcumService(ucumService);
this.libraryBuilder = new LibraryBuilder(libraryManager);
this.libraryBuilder.setCompilerOptions(CqlCompilerOptions.defaultOptions());
this.libraryBuilder = new LibraryBuilder(libraryManager, new IdObjectFactory());
this.libraryBuilder.setLibraryIdentifier(libraryInfo.getLeft());
this.libraryBuilder.getModel(new UsingDef().withUri(modelBuilder.getModelUri())
.withLocalIdentifier(modelBuilder.getModelIdentifier()).withVersion(modelBuilder.getModelVersion()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Stack;
import java.util.stream.Collectors;

import org.cqframework.cql.elm.visiting.ElmBaseLibraryVisitor;
import org.cqframework.cql.elm.visiting.BaseElmLibraryVisitor;
import org.hl7.elm.r1.*;
import org.hl7.elm.r1.Library.Statements;
import org.opencds.cqf.tooling.cql_generation.context.ElmContext;
Expand All @@ -19,7 +19,7 @@
* @author Joshua Reynolds
* @since 2021-04-05
*/
public class ElmToCqlVisitor extends ElmBaseLibraryVisitor<Void, ElmContext> {
public class ElmToCqlVisitor extends BaseElmLibraryVisitor<Void, ElmContext> {
private static final Logger logger = LoggerFactory.getLogger(ElmToCqlVisitor.class);
private boolean useSpaces = true;

Expand Down Expand Up @@ -864,7 +864,7 @@ public Void visitQuery(Query query, ElmContext context) {
query.getRelationship().stream().forEach(relationship -> visitRelationshipClause(relationship, context));
}
if (query.getWhere() != null) {
visitWhereClause(query.getWhere(), context);
visitExpression(query.getWhere(), context);
}
if (query.getReturn() != null) {
visitReturnClause(query.getReturn(), context);
Expand Down Expand Up @@ -961,27 +961,6 @@ public Void visitLetClause(LetClause let, ElmContext context) {
return null;
}

/**
* Visit WhereClause. This method will be called for
* WhereClause expression nodes.
*
* @param where the Expression
* @param context the context passed to the visitor
* @return the visitor result
*/
@Override
public Void visitWhereClause(Expression where, ElmContext context) {
try {
enterClause();
output.append("where");
visitElement(where, context);
return null;
}
finally {
exitClause();
}
}

/**
* Visit ReturnClause. This method will be called for
* every node in the tree that is a ReturnClause.
Expand Down

0 comments on commit ce24b38

Please sign in to comment.