use of com.ibm.cohort.cql.data.DefaultCqlDataProvider in project quality-measure-and-cohort-service by Alvearie.
the class R4DataProviderFactory method createDataProvider.
public static CqlDataProvider createDataProvider(IGenericClient client, CqlTerminologyProvider terminologyProvider, RetrieveCacheContext retrieveCacheContext, ModelResolver modelResolver, boolean isExpandValueSets, Integer pageSize) {
SearchParameterResolver resolver = new SearchParameterResolver(client.getFhirContext());
RestFhirRetrieveProvider baseRetrieveProvider = new RestFhirRetrieveProvider(resolver, client);
baseRetrieveProvider.setExpandValueSets(isExpandValueSets);
if (pageSize != null && pageSize > 0) {
baseRetrieveProvider.setPageSize(pageSize);
}
baseRetrieveProvider.setTerminologyProvider(terminologyProvider);
RetrieveProvider retrieveProvider = retrieveCacheContext != null ? new CachingRetrieveProvider(baseRetrieveProvider, retrieveCacheContext) : baseRetrieveProvider;
return new DefaultCqlDataProvider(modelResolver, retrieveProvider);
}
Aggregations