use of org.opencds.cqf.cql.engine.terminology.ValueSetInfo in project quality-measure-and-cohort-service by Alvearie.
the class R4FileSystemFhirTerminologyProviderTest method inOperationReturnsFalseWithBadVersion.
@Test
public void inOperationReturnsFalseWithBadVersion() throws Exception {
ValueSetInfo info = new ValueSetInfo();
info.setId(setId);
Code code = new Code();
code.setSystem(TEST_SYSTEM);
code.setCode(TEST_CODE);
code.setDisplay(TEST_DISPLAY_FOR_VERSION2);
code.setVersion("Bad Version");
boolean result = provider.in(code, info);
assertTrue(result);
}
use of org.opencds.cqf.cql.engine.terminology.ValueSetInfo in project quality-measure-and-cohort-service by Alvearie.
the class R4FileSystemFhirTerminologyProviderTest method inOperationReturnsFalse.
@Test
public void inOperationReturnsFalse() throws Exception {
ValueSetInfo info = new ValueSetInfo();
info.setId(setId);
Code code = new Code();
code.setSystem(TEST_SYSTEM);
code.setCode("Bad_Code");
code.setDisplay(TEST_DISPLAY);
boolean result = provider.in(code, info);
assertFalse(result);
}
use of org.opencds.cqf.cql.engine.terminology.ValueSetInfo in project quality-measure-and-cohort-service by Alvearie.
the class R4FileSystemFhirTerminologyProviderTest method inOperationReturnsTrueWithCodeOnly.
@Test
public void inOperationReturnsTrueWithCodeOnly() throws Exception {
ValueSetInfo info = new ValueSetInfo();
info.setId(setId);
Code code = new Code();
code.setCode(TEST_CODE);
boolean result = provider.in(code, info);
assertTrue(result);
}
use of org.opencds.cqf.cql.engine.terminology.ValueSetInfo in project quality-measure-and-cohort-service by Alvearie.
the class R4FileSystemFhirTerminologyProviderTest method inOperationReturnsFalseWithBadCodeSystem.
@Test
public void inOperationReturnsFalseWithBadCodeSystem() throws Exception {
ValueSetInfo info = new ValueSetInfo();
info.setId(setId);
Code code = new Code();
code.setSystem("bad system");
code.setCode(TEST_CODE);
code.setDisplay(TEST_DISPLAY);
boolean result = provider.in(code, info);
assertFalse(result);
}
use of org.opencds.cqf.cql.engine.terminology.ValueSetInfo in project quality-measure-and-cohort-service by Alvearie.
the class R4RestFhirTerminologyProviderTest method inOperationHandlesNullSystem.
@Test
public void inOperationHandlesNullSystem() throws Exception {
ValueSetInfo info = new ValueSetInfo();
info.setId("urn:oid:Test");
Code code = new Code();
code.setCode(TEST_CODE);
code.setDisplay(TEST_DISPLAY);
Parameters parameters = new Parameters();
parameters.getParameterFirstRep().setName("result").setValue(new BooleanType(true));
mockFhirResourceRetrieval("/ValueSet/Test/$validate-code?code=" + urlencode(code.getCode()) + "&_format=json", parameters);
boolean result = provider.in(code, info);
assertTrue(result);
}
Aggregations