diff --git a/cqf-fhir-cql/pom.xml b/cqf-fhir-cql/pom.xml index fa5cd2657b..9d131254fc 100644 --- a/cqf-fhir-cql/pom.xml +++ b/cqf-fhir-cql/pom.xml @@ -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"> 4.0.0 - org.opencds.cqf.fhir + org.smartregister cqf-fhir-cql - 3.8.0 + 3.8.0-opensrp-hotfix-SNAPSHOT FHIR Clinical Reasoning (CQL) Tools, utilities, code gen to support CQL in FHIR Clinical Reasoning operations @@ -73,4 +73,4 @@ test - \ No newline at end of file + diff --git a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java index 137b1ab87d..ca3cdd912e 100644 --- a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java +++ b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java @@ -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); } diff --git a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/VersionedIdentifiers.java b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/VersionedIdentifiers.java index a85a1fa7da..2d9a075b71 100644 --- a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/VersionedIdentifiers.java +++ b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/VersionedIdentifiers.java @@ -32,6 +32,8 @@ public static VersionedIdentifier forUrl(String url) { versionedIdentifier.setId(cqlName); } + versionedIdentifier.setSystem(urlSplit.length == 2 ? urlSplit[0] + "Library/" : null); + return versionedIdentifier; } } diff --git a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/cql2elm/content/RepositoryFhirLibrarySourceProvider.java b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/cql2elm/content/RepositoryFhirLibrarySourceProvider.java index 9f44cc5be7..a3721a9477 100644 --- a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/cql2elm/content/RepositoryFhirLibrarySourceProvider.java +++ b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/cql2elm/content/RepositoryFhirLibrarySourceProvider.java @@ -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(); diff --git a/pom.xml b/pom.xml index d26dfdf610..36a1f012ad 100644 --- a/pom.xml +++ b/pom.xml @@ -51,26 +51,26 @@ - oss-sonatype - https://oss.sonatype.org/content/repositories/snapshots + central-portal-snapshots + Central Portal Snapshots + https://central.sonatype.com/repository/maven-snapshots/ + + false + true - - oss-sonatype-public - https://oss.sonatype.org/content/groups/public/ - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - + central-portal-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + central-portal-snapshots + https://central.sonatype.com @@ -502,13 +502,11 @@ 3.2.4 - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 true - ossrh - https://oss.sonatype.org/ + central @@ -668,10 +666,6 @@ org.apache.maven.plugins maven-gpg-plugin - - org.sonatype.plugins - nexus-staging-maven-plugin -