Search in sources :

Example 11 with FhirClientBuilder

use of com.ibm.cohort.fhir.client.config.FhirClientBuilder 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 12 with FhirClientBuilder

use of com.ibm.cohort.fhir.client.config.FhirClientBuilder 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 13 with FhirClientBuilder

use of com.ibm.cohort.fhir.client.config.FhirClientBuilder 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

FhirClientBuilder (com.ibm.cohort.fhir.client.config.FhirClientBuilder)13 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)11 FhirClientBuilderFactory (com.ibm.cohort.fhir.client.config.FhirClientBuilderFactory)8 FhirServerConfig (com.ibm.cohort.fhir.client.config.FhirServerConfig)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 IAttachment (com.ibm.websphere.jaxrs20.multipart.IAttachment)5 ApiImplicitParams (io.swagger.annotations.ApiImplicitParams)5 ApiOperation (io.swagger.annotations.ApiOperation)5 ApiResponse (io.swagger.annotations.ApiResponse)5 ApiResponses (io.swagger.annotations.ApiResponses)5 CqlTerminologyProvider (com.ibm.cohort.cql.terminology.CqlTerminologyProvider)4 R4RestFhirTerminologyProvider (com.ibm.cohort.engine.terminology.R4RestFhirTerminologyProvider)4 Consumes (javax.ws.rs.Consumes)4 POST (javax.ws.rs.POST)4 Path (javax.ws.rs.Path)4 Produces (javax.ws.rs.Produces)4 Response (javax.ws.rs.core.Response)4 Before (org.junit.Before)4 CqlDataProvider (com.ibm.cohort.cql.data.CqlDataProvider)3 ClasspathCqlLibraryProvider (com.ibm.cohort.cql.library.ClasspathCqlLibraryProvider)3