Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cqf-fhir-cql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.opencds.cqf.fhir</groupId>
<groupId>org.smartregister</groupId>
<artifactId>cqf-fhir-cql</artifactId>
<version>3.8.0</version>
<version>3.8.0-opensrp-hotfix-SNAPSHOT</version>
<name>FHIR Clinical Reasoning (CQL)</name>
<description>Tools, utilities, code gen to support CQL in FHIR Clinical Reasoning operations</description>

Expand Down Expand Up @@ -73,4 +73,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public IBaseParameters evaluate(
var cqlFhirParametersConverter = Engines.getCqlFhirParametersConverter(repository.fhirContext());
var engine = Engines.forRepositoryAndSettings(settings, repository, additionalData, npmProcessor, true);
var evaluationParameters = cqlFhirParametersConverter.toCqlParameters(parameters);
var result = engine.evaluate(id.getId(), expressions, buildContextParameter(patientId), evaluationParameters);
var result = engine.evaluate(id, expressions, buildContextParameter(patientId), evaluationParameters, null);

return cqlFhirParametersConverter.toFhirParameters(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public static VersionedIdentifier forUrl(String url) {
versionedIdentifier.setId(cqlName);
}

versionedIdentifier.setSystem(urlSplit.length == 2 ? urlSplit[0] + "Library/" : null);

return versionedIdentifier;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,29 @@ protected IBaseResource getLibrary(VersionedIdentifier libraryIdentifier) {
this.fhirContext.getResourceDefinition("Bundle").getImplementingClass();
var lt = this.fhirContext.getResourceDefinition("Library").getImplementingClass();

var libs = repository.search(
bt, lt, Searches.byNameAndVersion(libraryIdentifier.getId(), libraryIdentifier.getVersion()));
IBaseBundle libs;

if (libraryIdentifier.getSystem() != null
&& libraryIdentifier.getId() != null
&& libraryIdentifier.getVersion() != null) {
libs =
repository.search(
bt,
lt,
Searches.byUrlAndVersion(
libraryIdentifier.getSystem() + libraryIdentifier.getId(),
libraryIdentifier.getVersion()));
} else if (libraryIdentifier.getSystem() != null && libraryIdentifier.getId() != null) {
libs =
repository.search(
bt, lt, Searches.byUrl(libraryIdentifier.getSystem() + libraryIdentifier.getId()));
} else {
libs =
repository.search(
bt,
lt,
Searches.byNameAndVersion(libraryIdentifier.getId(), libraryIdentifier.getVersion()));
}

var iter = new BundleIterable<>(repository, libs).iterator();

Expand Down
36 changes: 15 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@

<repositories>
<repository>
<id>oss-sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>central-portal-snapshots</id>
<name>Central Portal Snapshots</name>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>oss-sonatype-public</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<id>central-portal-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>central-portal-snapshots</id>
<url>https://central.sonatype.com</url>
</repository>
</distributionManagement>

Expand Down Expand Up @@ -502,13 +502,11 @@
<version>3.2.4</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version> <extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -668,10 +666,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Loading