use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class DataOperationProviderIT method testR4MeasureDataRequirementsOperation.
@Test
public void testR4MeasureDataRequirementsOperation() throws IOException {
String bundleAsText = stringFromResource("Exm104FhirR4MeasureBundle.json");
Bundle bundle = (Bundle) getFhirContext().newJsonParser().parseResource(bundleAsText);
getClient().transaction().withBundle(bundle).execute();
Parameters params = new Parameters();
params.addParameter().setName("startPeriod").setValue(new StringType("2019-01-01"));
params.addParameter().setName("endPeriod").setValue(new StringType("2020-01-01"));
Library returnLibrary = getClient().operation().onInstance(new IdType("Measure", "measure-EXM104-8.2.000")).named("$data-requirements").withParameters(params).returnResourceType(Library.class).execute();
assertNotNull(returnLibrary);
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class DataOperationProviderIT method testR4LibraryDataRequirementsOperation.
@Test
public void testR4LibraryDataRequirementsOperation() throws IOException {
String bundleAsText = stringFromResource("DataReqLibraryTransactionBundle.json");
Bundle bundle = (Bundle) getFhirContext().newJsonParser().parseResource(bundleAsText);
getClient().transaction().withBundle(bundle).execute();
Parameters params = new Parameters();
params.addParameter().setName("target").setValue(new StringType("dummy"));
Library returnLibrary = getClient().operation().onInstance(new IdType("Library", "LibraryEvaluationTest")).named("$data-requirements").withParameters(params).returnResourceType(Library.class).execute();
assertNotNull(returnLibrary);
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class MeasureEvaluateProviderIT method testMeasureEvaluate.
@Test
public void testMeasureEvaluate() throws Exception {
String bundleAsText = stringFromResource("Exm104FhirR4MeasureBundle.json");
Bundle bundle = (Bundle) getFhirContext().newJsonParser().parseResource(bundleAsText);
getClient().transaction().withBundle(bundle).execute();
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType("2019-01-01"));
params.addParameter().setName("periodEnd").setValue(new StringType("2020-01-01"));
params.addParameter().setName("reportType").setValue(new StringType("individual"));
params.addParameter().setName("subject").setValue(new StringType("Patient/numer-EXM104"));
params.addParameter().setName("lastReceivedOn").setValue(new StringType("2019-12-12"));
MeasureReport returnMeasureReport = getClient().operation().onInstance(new IdType("Measure", "measure-EXM104-8.2.000")).named("$evaluate-measure").withParameters(params).returnResourceType(MeasureReport.class).execute();
assertNotNull(returnMeasureReport);
// System.out.println("Resource:"+this.getFhirContext().newJsonParser().setPrettyPrint(true).encodeResourceToString(returnMeasureReport));
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class MeasureEvaluateProviderIT method testMeasureEvaluateWithAdditionalData.
@Test
public void testMeasureEvaluateWithAdditionalData() throws Exception {
String mainBundleAsText = stringFromResource("Exm104FhirR4MeasurePartBundle.json");
Bundle bundle = (Bundle) getFhirContext().newJsonParser().parseResource(mainBundleAsText);
getClient().transaction().withBundle(bundle).execute();
String additionalBundleAsText = stringFromResource("Exm104FhirR4MeasureAdditionalData.json");
Bundle additionalData = (Bundle) getFhirContext().newJsonParser().parseResource(additionalBundleAsText);
Parameters params = new Parameters();
params.addParameter().setName("periodStart").setValue(new StringType("2019-01-01"));
params.addParameter().setName("periodEnd").setValue(new StringType("2020-01-01"));
params.addParameter().setName("reportType").setValue(new StringType("subject"));
params.addParameter().setName("subject").setValue(new StringType("Patient/numer-EXM104"));
params.addParameter().setName("lastReceivedOn").setValue(new StringType("2019-12-12"));
params.addParameter().setName("additionalData").setResource(additionalData);
MeasureReport returnMeasureReport = getClient().operation().onInstance(new IdType("Measure", "measure-EXM104-8.2.000")).named("$evaluate-measure").withParameters(params).returnResourceType(MeasureReport.class).execute();
assertNotNull(returnMeasureReport);
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class CareGapsProviderIT method testSubjectMultiple.
@SuppressWarnings("java:S5778")
@Test
public void testSubjectMultiple() 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("subject").setValue(new StringType(subjectGroupValid));
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