use of org.hl7.fhir.r4.utils.formats.Turtle.Subject in project cqf-ruler by DBCG.
the class ReportProviderIT method testSubjectPatientNotFoundInGroup.
// This test requires the following application setting:
// enforce_referential_integrity_on_write: false
@Disabled("Provider needs to be updated to use parameter validation and then this test should be re-enabled")
@Test
public void testSubjectPatientNotFoundInGroup() throws IOException {
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType("2021-01-01"));
params.addParameter().setName("periodEnd").setValue(new StringType("2021-12-31"));
params.addParameter().setName("subject").setValue(new StringType("Group/ra-group00"));
loadResource("Group-ra-group00.json");
Group group = getClient().read().resource(Group.class).withId("ra-group00").execute();
assertNotNull(group);
assertThrows(ResourceNotFoundException.class, () -> {
getClient().operation().onType(MeasureReport.class).named("$report").withParameters(params).returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.r4.utils.formats.Turtle.Subject in project cqf-ruler by DBCG.
the class CareGapsProviderIT method testPeriodInvalid.
@SuppressWarnings("java:S5778")
@Test
public void testPeriodInvalid() throws Exception {
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType(periodEndValid));
params.addParameter().setName("periodEnd").setValue(new StringType(periodStartValid));
params.addParameter().setName("subject").setValue(new StringType(subjectPatientValid));
params.addParameter().setName("status").setValue(new StringType(statusValid));
params.addParameter().setName("measureId").setValue(new StringType(measureIdValid));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(Measure.class).named("$care-gaps").withParameters(params).useHttpGet().returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.r4.utils.formats.Turtle.Subject in project cqf-ruler by DBCG.
the class CareGapsProviderIT method testStatusInvalid.
@SuppressWarnings("java:S5778")
@Test
public void testStatusInvalid() throws Exception {
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType(periodStartValid));
params.addParameter().setName("periodEnd").setValue(new StringType(periodEndValid));
params.addParameter().setName("subject").setValue(new StringType(subjectPatientValid));
params.addParameter().setName("status").setValue(new StringType(statusInvalid));
params.addParameter().setName("measureId").setValue(new StringType(measureIdValid));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(Measure.class).named("$care-gaps").withParameters(params).useHttpGet().returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.r4.utils.formats.Turtle.Subject in project cqf-ruler by DBCG.
the class CareGapsProviderIT method testSubjectGroupValid.
@Test
public void testSubjectGroupValid() throws Exception {
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType(periodStartValid));
params.addParameter().setName("periodEnd").setValue(new StringType(periodEndValid));
params.addParameter().setName("subject").setValue(new StringType(subjectGroupValid));
params.addParameter().setName("status").setValue(new StringType(statusValid));
params.addParameter().setName("measureId").setValue(new StringType(measureIdValid));
loadResource("gic-gr-1.json");
assertDoesNotThrow(() -> {
getClient().operation().onType(Measure.class).named("$care-gaps").withParameters(params).useHttpGet().returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.r4.utils.formats.Turtle.Subject in project cqf-ruler by DBCG.
the class CareGapsProviderIT method testPeriodEndNull.
@SuppressWarnings("java:S5778")
@Test
public void testPeriodEndNull() throws Exception {
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType(periodStartValid));
params.addParameter().setName("subject").setValue(new StringType(subjectPatientValid));
params.addParameter().setName("status").setValue(new StringType(statusValid));
params.addParameter().setName("measureId").setValue(new StringType(measureIdValid));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(Measure.class).named("$care-gaps").withParameters(params).useHttpGet().returnResourceType(Parameters.class).execute();
});
}
Aggregations