Search in sources :

Example 1 with DefaultCqlDataProvider

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);
}
Also used : SearchParameterResolver(org.opencds.cqf.cql.engine.fhir.searchparam.SearchParameterResolver) RestFhirRetrieveProvider(org.opencds.cqf.cql.engine.fhir.retrieve.RestFhirRetrieveProvider) CachingRetrieveProvider(com.ibm.cohort.engine.measure.cache.CachingRetrieveProvider) DefaultCqlDataProvider(com.ibm.cohort.cql.data.DefaultCqlDataProvider) RetrieveProvider(org.opencds.cqf.cql.engine.retrieve.RetrieveProvider) CachingRetrieveProvider(com.ibm.cohort.engine.measure.cache.CachingRetrieveProvider) RestFhirRetrieveProvider(org.opencds.cqf.cql.engine.fhir.retrieve.RestFhirRetrieveProvider)

Aggregations

DefaultCqlDataProvider (com.ibm.cohort.cql.data.DefaultCqlDataProvider)1 CachingRetrieveProvider (com.ibm.cohort.engine.measure.cache.CachingRetrieveProvider)1 RestFhirRetrieveProvider (org.opencds.cqf.cql.engine.fhir.retrieve.RestFhirRetrieveProvider)1 SearchParameterResolver (org.opencds.cqf.cql.engine.fhir.searchparam.SearchParameterResolver)1 RetrieveProvider (org.opencds.cqf.cql.engine.retrieve.RetrieveProvider)1