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);
}
Aggregations