use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class Patients method john_doe.
public static Patient john_doe() {
Patient patient = new Patient();
patient.setId("john-doe");
patient.setName(Arrays.asList(new HumanName().setFamily("Doe").setGiven(Arrays.asList(new StringType("John")))));
patient.setBirthDate(new Date());
patient.setGender(AdministrativeGender.MALE);
Extension usCoreRace = new Extension();
usCoreRace.setUrl(EXT_URL_US_CORE_RACE).addExtension().setUrl(OMB_CATEGORY).setValue(new Coding().setSystem(URL_SYSTEM_RACE).setCode(OMB_CATEGORY_RACE_BLACK).setDisplay(BLACK_OR_AFRICAN_AMERICAN));
patient.getExtension().add(usCoreRace);
return patient;
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class CareGapsProviderIT method testPractitionerAndOrganization.
@Test
public void testPractitionerAndOrganization() 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("status").setValue(new StringType(statusValid));
params.addParameter().setName("measureId").setValue(new StringType(measureIdValid));
params.addParameter().setName("organization").setValue(new StringType(organizationValid));
params.addParameter().setName("practitioner").setValue(new StringType(practitionerValid));
assertThrows(InternalErrorException.class, () -> {
getClient().operation().onType(Measure.class).named("$care-gaps").withParameters(params).useHttpGet().returnResourceType(Parameters.class).execute();
});
// TODO: implement practitioner and organization
// assertDoesNotThrow(() -> {
// getClient().operation().onType(Measure.class).named("$care-gaps")
// .withParameters(params)
// .useHttpGet()
// .returnResourceType(Parameters.class)
// .execute();
// });
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class Patients method john_doe.
public static Patient john_doe() {
Patient patient = new Patient();
patient.setId("john-doe");
patient.setName(Arrays.asList(new HumanName().setFamily("Doe").setGiven(Arrays.asList(new StringType("John")))));
patient.setBirthDate(new Date());
patient.setGender(AdministrativeGender.MALE);
Extension usCoreRace = new Extension();
usCoreRace.setUrl(EXT_URL_US_CORE_RACE).addExtension().setUrl(OMB_CATEGORY).setValue(new Coding().setSystem(URL_SYSTEM_RACE).setCode(OMB_CATEGORY_RACE_BLACK).setDisplay(BLACK_OR_AFRICAN_AMERICAN));
patient.getExtension().add(usCoreRace);
return patient;
}
use of org.hl7.fhir.dstu2.model.StringType in project cqf-ruler by DBCG.
the class DataOperationProviderIT method testDstu3MeasureDataRequirementsOperation.
@Disabled("Erroring because could not convert r5 Library to dstu3")
@Test
public void testDstu3MeasureDataRequirementsOperation() throws IOException {
String bundleAsText = stringFromResource("Exm105Dstu3MeasureBundle.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-EXM105-FHIR3-8.0.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 ActivityDefinitionApplyProvider method resolveCommunicationRequest.
// TODO - extend this to be more complete
private CommunicationRequest resolveCommunicationRequest(ActivityDefinition activityDefinition, String patientId) {
CommunicationRequest communicationRequest = new CommunicationRequest();
communicationRequest.setStatus(CommunicationRequest.CommunicationRequestStatus.UNKNOWN);
communicationRequest.setSubject(new Reference(patientId));
// Unsure if this is correct - this is the way Motive is doing it...
if (activityDefinition.hasCode()) {
if (activityDefinition.getCode().hasText()) {
communicationRequest.addPayload().setContent(new StringType(activityDefinition.getCode().getText()));
}
}
return communicationRequest;
}
Aggregations