use of org.hl7.fhir.utilities.turtle.Turtle.Subject in project cqf-ruler by DBCG.
the class ReportProviderIT method testSubjectIsNotPatientOrGroup.
@Test
public void testSubjectIsNotPatientOrGroup() 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("ra-patient01"));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(MeasureReport.class).named("$report").withParameters(params).returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.utilities.turtle.Turtle.Subject in project cqf-ruler by DBCG.
the class ReportProviderIT method testMissingPeriodStartParam.
@Test
public void testMissingPeriodStartParam() throws IOException {
Parameters params = new Parameters();
params.addParameter().setName("periodEnd").setValue(new StringType("2021-12-31"));
params.addParameter().setName("subject").setValue(new StringType("Patient/testReport01"));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(MeasureReport.class).named("$report").withParameters(params).returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.utilities.turtle.Turtle.Subject in project cqf-ruler by DBCG.
the class ReportProviderIT method testMissingPeriodEndParam.
@Test
public void testMissingPeriodEndParam() throws IOException {
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType("2021-01-01"));
params.addParameter().setName("subject").setValue(new StringType("Patient/testReport01"));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(MeasureReport.class).named("$report").withParameters(params).returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.utilities.turtle.Turtle.Subject in project cqf-ruler by DBCG.
the class ReportProviderIT method testPatientSubjectNotFound.
@Test
public void testPatientSubjectNotFound() 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("Patient/bad-patient"));
assertThrows(ResourceNotFoundException.class, () -> {
getClient().operation().onType(MeasureReport.class).named("$report").withParameters(params).returnResourceType(Parameters.class).execute();
});
}
use of org.hl7.fhir.utilities.turtle.Turtle.Subject in project cqf-ruler by DBCG.
the class ReportProviderIT method testSubjectGroup.
// TODO: add the count of patients returned
@Test
public void testSubjectGroup() 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-group01"));
loadResource("Patient-ra-patient01.json");
loadResource("Group-ra-group01.json");
assertDoesNotThrow(() -> {
getClient().operation().onType(MeasureReport.class).named("$report").withParameters(params).returnResourceType(Parameters.class).execute();
});
}
Aggregations