Skip to content
Draft
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
8 changes: 4 additions & 4 deletions cqf-fhir-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@

<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-benchmark</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
<name>FHIR Clinical Reasoning (Benchmarks)</name>
<description>Tests validating performance of FHIR Clinical Reasoning operations</description>

<parent>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-test</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
Expand Down
18 changes: 9 additions & 9 deletions cqf-fhir-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,53 @@

<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-bom</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
<packaging>pom</packaging>
<name>FHIR Clinical Reasoning (Bill Of Materials)</name>
<description>This bom can be used to simplify dependency management when using this project</description>

<parent>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</parent>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-test</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-utility</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cql</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr-cli</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr-hapi</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr-spring</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
8 changes: 4 additions & 4 deletions cqf-fhir-cql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

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

<parent>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-utility</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.cqframework</groupId>
Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-test</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
12 changes: 6 additions & 6 deletions cqf-fhir-cr-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@

<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr-cli</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
<name>FHIR Clinical Reasoning (CLI)</name>
<description>CLI for running FHIR Clincial Reasoning operations</description>

<parent>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-utility</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cql</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
Expand Down Expand Up @@ -58,13 +58,13 @@
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-test</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion cqf-fhir-cr-hapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir</artifactId>
<version>4.2.0-SNAPSHOT</version>
<version>4.2.0-HAPI-SNAPSHOT</version>
</parent>

<artifactId>cqf-fhir-cr-hapi</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.opencds.cqf.fhir.cr.hapi.config;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerRegistry;
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
import ca.uhn.fhir.repository.IRepository;
import ca.uhn.fhir.rest.api.server.IRepositoryFactory;
Expand Down Expand Up @@ -124,6 +126,7 @@ public CdsServiceInterceptor cdsServiceInterceptor(
CdsServiceRegistryImpl cdsServiceRegistry,
ICrDiscoveryServiceFactory discoveryServiceFactory,
ICdsCrServiceFactory crServiceFactory,
PartitionSettings partitionSettings,
Optional<IResourceChangeListenerRegistry> resourceChangeListenerRegistry) {
if (resourceChangeListenerRegistry.isEmpty()) {
return null;
Expand All @@ -132,7 +135,11 @@ public CdsServiceInterceptor cdsServiceInterceptor(
resourceChangeListenerRegistry
.get()
.registerResourceResourceChangeListener(
PLAN_DEFINITION_RESOURCE_NAME, SearchParameterMap.newSynchronous(), listener, 1000);
PLAN_DEFINITION_RESOURCE_NAME,
RequestPartitionId.defaultPartition(partitionSettings),
SearchParameterMap.newSynchronous(),
listener,
1000);
return listener;
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
package org.opencds.cqf.fhir.cr.hapi.config.test;

import ca.uhn.fhir.batch2.jobs.reindex.ReindexProvider;
import ca.uhn.fhir.batch2.jobs.bulkmodify.reindex.ReindexProvider;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
import ca.uhn.fhir.jpa.cache.IResourceChangeListener;
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerCacheRefresher;
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerRegistry;
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerCacheFactory;
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerCacheRefresherImpl;
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryImpl;
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryInterceptor;
import ca.uhn.fhir.jpa.graphql.GraphQLProvider;
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
import ca.uhn.fhir.jpa.provider.DiffProvider;
import ca.uhn.fhir.jpa.provider.IJpaSystemProvider;
import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider;
Expand All @@ -26,6 +29,7 @@
import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import jakarta.annotation.Nonnull;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand All @@ -34,6 +38,7 @@
import org.cqframework.cql.cql2elm.model.Model;
import org.hl7.cql.model.ModelIdentifier;
import org.hl7.elm.r1.VersionedIdentifier;
import org.hl7.fhir.r4.model.ResourceType;
import org.opencds.cqf.cql.engine.runtime.Code;
import org.opencds.cqf.fhir.cql.EvaluationSettings;
import org.opencds.cqf.fhir.cr.hapi.common.CodeCacheResourceChangeListener;
Expand Down Expand Up @@ -116,26 +121,28 @@ public Map<String, List<Code>> globalValueSetCache() {
@Bean
public ElmCacheResourceChangeListener elmCacheResourceChangeListener(
IResourceChangeListenerRegistry resourceChangeListenerRegistry,
PartitionSettings partitionSettings,
DaoRegistry daoRegistry,
EvaluationSettings evaluationSettings) {
ElmCacheResourceChangeListener listener =
new ElmCacheResourceChangeListener(daoRegistry, evaluationSettings.getLibraryCache());
resourceChangeListenerRegistry.registerResourceResourceChangeListener(
"Library", SearchParameterMap.newSynchronous(), listener, 1000);
registerResourceResourceChangeListener(
resourceChangeListenerRegistry, partitionSettings, listener, ResourceType.Library);
return listener;
}

@Bean
public CodeCacheResourceChangeListener codeCacheResourceChangeListener(
IResourceChangeListenerRegistry resourceChangeListenerRegistry,
EvaluationSettings evaluationSettings,
PartitionSettings partitionSettings,
DaoRegistry daoRegistry) {

CodeCacheResourceChangeListener listener =
new CodeCacheResourceChangeListener(daoRegistry, evaluationSettings.getValueSetCache());
// registry
resourceChangeListenerRegistry.registerResourceResourceChangeListener(
"ValueSet", SearchParameterMap.newSynchronous(), listener, 1000);
registerResourceResourceChangeListener(
resourceChangeListenerRegistry, partitionSettings, listener, ResourceType.ValueSet);

return listener;
}
Expand All @@ -144,9 +151,10 @@ public CodeCacheResourceChangeListener codeCacheResourceChangeListener(
public IResourceChangeListenerRegistry resourceChangeListenerRegistry(
InMemoryResourceMatcher inMemoryResourceMatcher,
FhirContext fhirContext,
PartitionSettings partitionSettings,
ResourceChangeListenerCacheFactory resourceChangeListenerCacheFactory) {
return new ResourceChangeListenerRegistryImpl(
fhirContext, resourceChangeListenerCacheFactory, inMemoryResourceMatcher);
fhirContext, partitionSettings, resourceChangeListenerCacheFactory, inMemoryResourceMatcher);
}

@Bean
Expand All @@ -158,4 +166,28 @@ IResourceChangeListenerCacheRefresher resourceChangeListenerCacheRefresher() {
public ResourceChangeListenerRegistryInterceptor resourceChangeListenerRegistryInterceptor() {
return new ResourceChangeListenerRegistryInterceptor();
}

@Bean
public PartitionSettings partitionSettings() {
return new PartitionSettings();
}

private void registerResourceResourceChangeListener(
IResourceChangeListenerRegistry resourceChangeListenerRegistry,
PartitionSettings partitionSettings,
IResourceChangeListener listener,
ResourceType resourceType) {

resourceChangeListenerRegistry.registerResourceResourceChangeListener(
resourceType.name(),
getRequestPartitionId(partitionSettings),
SearchParameterMap.newSynchronous(),
listener,
1000);
}

@Nonnull
private RequestPartitionId getRequestPartitionId(PartitionSettings partitionSettings) {
return RequestPartitionId.defaultPartition(partitionSettings);
}
}
Loading