Search in sources :

Example 1 with CachingModelResolverDecorator

use of com.ibm.cohort.engine.r4.cache.CachingModelResolverDecorator in project quality-measure-and-cohort-service by Alvearie.

the class R4MeasureEvaluatorBuilder method build.

public MeasureEvaluator build() {
    if (clientContext == null) {
        throw new IllegalArgumentException("Client context not provided");
    }
    CqlTerminologyProvider terminologyProvider = new R4RestFhirTerminologyProvider(clientContext.getTerminologyClient());
    Map<String, CqlDataProvider> dataProviders = R4DataProviderFactory.createDataProviderMap(clientContext.getDataClient(), terminologyProvider, cacheContext, isCachingModelResolver ? new CachingModelResolverDecorator(modelResolver) : modelResolver, isExpandValueSets, pageSize);
    FhirResourceResolver<Measure> measureResolver = R4FhirServerResourceResolverFactory.createMeasureResolver(clientContext.getMeasureClient());
    FhirResourceResolver<Library> libraryResolver = R4FhirServerResourceResolverFactory.createLibraryResolver(clientContext.getLibraryClient());
    R4LibraryDependencyGatherer libraryDependencyGatherer = new R4LibraryDependencyGatherer(libraryResolver);
    return new MeasureEvaluator(measureResolver, libraryResolver, libraryDependencyGatherer, terminologyProvider, dataProviders);
}
Also used : CachingModelResolverDecorator(com.ibm.cohort.engine.r4.cache.CachingModelResolverDecorator) R4RestFhirTerminologyProvider(com.ibm.cohort.engine.terminology.R4RestFhirTerminologyProvider) Measure(org.hl7.fhir.r4.model.Measure) R4LibraryDependencyGatherer(com.ibm.cohort.cql.hapi.R4LibraryDependencyGatherer) Library(org.hl7.fhir.r4.model.Library) CqlTerminologyProvider(com.ibm.cohort.cql.terminology.CqlTerminologyProvider) CqlDataProvider(com.ibm.cohort.cql.data.CqlDataProvider)

Aggregations

CqlDataProvider (com.ibm.cohort.cql.data.CqlDataProvider)1 R4LibraryDependencyGatherer (com.ibm.cohort.cql.hapi.R4LibraryDependencyGatherer)1 CqlTerminologyProvider (com.ibm.cohort.cql.terminology.CqlTerminologyProvider)1 CachingModelResolverDecorator (com.ibm.cohort.engine.r4.cache.CachingModelResolverDecorator)1 R4RestFhirTerminologyProvider (com.ibm.cohort.engine.terminology.R4RestFhirTerminologyProvider)1 Library (org.hl7.fhir.r4.model.Library)1 Measure (org.hl7.fhir.r4.model.Measure)1