Search in sources :

Example 6 with FhirClientBuilderFactory

use of com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory in project quality-measure-and-cohort-service by Alvearie.

the class MeasureHelperTest method setUp.

@Before
public void setUp() {
    FhirClientBuilderFactory factory = FhirClientBuilderFactory.newInstance();
    FhirClientBuilder builder = factory.newFhirClientBuilder(fhirContext);
    IGenericClient client = builder.createFhirClient(getFhirServerConfig());
    resolver = R4FhirServerResourceResolverFactory.createMeasureResolver(client);
    mockFhirResourceRetrieval("/metadata?_format=json", getCapabilityStatement());
}
Also used : FhirClientBuilder(com.ibm.cohort.fhir.client.config.FhirClientBuilder) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) FhirClientBuilderFactory(com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory) Before(org.junit.Before)

Example 7 with FhirClientBuilderFactory

use of com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory in project quality-measure-and-cohort-service by Alvearie.

the class MeasureTestBase method setUp.

@Before
public void setUp() {
    FhirServerConfig config = getFhirServerConfig();
    FhirClientBuilderFactory factory = FhirClientBuilderFactory.newInstance();
    FhirClientBuilder builder = factory.newFhirClientBuilder(fhirContext);
    client = builder.createFhirClient(config);
    expressionsByPopulationType = new HashMap<>();
    expressionsByPopulationType.put(MeasurePopulationType.INITIALPOPULATION, INITIAL_POPULATION);
    expressionsByPopulationType.put(MeasurePopulationType.DENOMINATOR, DENOMINATOR);
    expressionsByPopulationType.put(MeasurePopulationType.DENOMINATOREXCLUSION, DENOMINATOR_EXCLUSION);
    expressionsByPopulationType.put(MeasurePopulationType.DENOMINATOREXCEPTION, DENOMINATOR_EXCEPTION);
    expressionsByPopulationType.put(MeasurePopulationType.NUMERATOR, NUMERATOR);
    expressionsByPopulationType.put(MeasurePopulationType.NUMERATOREXCLUSION, NUMERATOR_EXCLUSION);
    expectationsByPopulationType = new HashMap<>();
    expectationsByPopulationType.put(MeasurePopulationType.INITIALPOPULATION, 1);
    expectationsByPopulationType.put(MeasurePopulationType.DENOMINATOR, 1);
    expectationsByPopulationType.put(MeasurePopulationType.DENOMINATOREXCLUSION, 0);
    expectationsByPopulationType.put(MeasurePopulationType.DENOMINATOREXCEPTION, 0);
    expectationsByPopulationType.put(MeasurePopulationType.NUMERATOR, 0);
    expectationsByPopulationType.put(MeasurePopulationType.NUMERATOREXCLUSION, 0);
}
Also used : FhirClientBuilder(com.ibm.cohort.fhir.client.config.FhirClientBuilder) FhirClientBuilderFactory(com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory) FhirServerConfig(com.ibm.cohort.fhir.client.config.FhirServerConfig) Before(org.junit.Before)

Example 8 with FhirClientBuilderFactory

use of com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory in project quality-measure-and-cohort-service by Alvearie.

the class RestFhirLibraryResolverIntegrationTest method setUp.

@Before
public void setUp() {
    FhirClientBuilderFactory factory = FhirClientBuilderFactory.newInstance();
    FhirClientBuilder builder = factory.newFhirClientBuilder(fhirContext);
    IGenericClient client = builder.createFhirClient(getFhirServerConfig());
    resolver = R4FhirServerResourceResolverFactory.createLibraryResolver(client);
}
Also used : FhirClientBuilder(com.ibm.cohort.fhir.client.config.FhirClientBuilder) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) FhirClientBuilderFactory(com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory) Before(org.junit.Before)

Example 9 with FhirClientBuilderFactory

use of com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory in project quality-measure-and-cohort-service by Alvearie.

the class RestFhirMeasureResolverIntegrationTest method setUp.

@Before
public void setUp() {
    FhirClientBuilderFactory factory = FhirClientBuilderFactory.newInstance();
    FhirClientBuilder builder = factory.newFhirClientBuilder(fhirContext);
    IGenericClient client = builder.createFhirClient(getFhirServerConfig());
    resolver = R4FhirServerResourceResolverFactory.createMeasureResolver(client);
    mockFhirResourceRetrieval("/metadata?_format=json", getCapabilityStatement());
}
Also used : FhirClientBuilder(com.ibm.cohort.fhir.client.config.FhirClientBuilder) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) FhirClientBuilderFactory(com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory) Before(org.junit.Before)

Aggregations

FhirClientBuilderFactory (com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory)9 FhirClientBuilder (com.ibm.cohort.fhir.client.config.FhirClientBuilder)8 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)7 CqlTerminologyProvider (com.ibm.cohort.cql.terminology.CqlTerminologyProvider)4 R4RestFhirTerminologyProvider (com.ibm.cohort.engine.terminology.R4RestFhirTerminologyProvider)4 Before (org.junit.Before)4 CqlDataProvider (com.ibm.cohort.cql.data.CqlDataProvider)3 ClasspathCqlLibraryProvider (com.ibm.cohort.cql.library.ClasspathCqlLibraryProvider)3 CqlLibraryProvider (com.ibm.cohort.cql.library.CqlLibraryProvider)3 CqlToElmTranslator (com.ibm.cohort.cql.translation.CqlToElmTranslator)3 TranslatingCqlLibraryProvider (com.ibm.cohort.cql.translation.TranslatingCqlLibraryProvider)3 DefaultRetrieveCacheContext (com.ibm.cohort.engine.measure.cache.DefaultRetrieveCacheContext)3 RetrieveCacheContext (com.ibm.cohort.engine.measure.cache.RetrieveCacheContext)3 JCommander (com.beust.jcommander.JCommander)2 Console (com.beust.jcommander.internal.Console)2 DefaultConsole (com.beust.jcommander.internal.DefaultConsole)2 CqlEvaluator (com.ibm.cohort.cql.evaluation.CqlEvaluator)2 R4LibraryDependencyGatherer (com.ibm.cohort.cql.hapi.R4LibraryDependencyGatherer)2 MapCqlLibraryProviderFactory (com.ibm.cohort.cql.library.MapCqlLibraryProviderFactory)2 PriorityCqlLibraryProvider (com.ibm.cohort.cql.library.PriorityCqlLibraryProvider)2