use of org.hl7.fhir.r5.model in project cqf-ruler by DBCG.
the class DetectedIssueBuilder method initializeR4.
@Override
protected void initializeR4(T theResource) {
super.initializeR4(theResource);
org.hl7.fhir.r4.model.DetectedIssue detectedIssue = (org.hl7.fhir.r4.model.DetectedIssue) theResource;
List<org.hl7.fhir.r4.model.Identifier> identifier = new ArrayList<>();
identifier.add(new org.hl7.fhir.r4.model.Identifier().setSystem(getIdentifier().getKey()).setValue(getIdentifier().getValue()));
detectedIssue.setIdentifier(identifier).setPatient(new org.hl7.fhir.r4.model.Reference(myPatient)).setStatus(org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueStatus.valueOf(myStatus)).setCode(new CodeableConcept().addCoding(new Coding().setSystem(getCodeSetting().getSystem()).setCode(getCodeSetting().getCode()).setDisplay(getCodeSetting().getDisplay())));
getEvidenceDetails().forEach(evidence -> detectedIssue.addEvidence(new DetectedIssueEvidenceComponent().addDetail(new org.hl7.fhir.r4.model.Reference(evidence))));
}
use of org.hl7.fhir.r5.model in project cqf-ruler by DBCG.
the class DetectedIssueBuilder method initializeDstu2_1.
@Override
protected void initializeDstu2_1(T theResource) {
super.initializeDstu2_1(theResource);
org.hl7.fhir.dstu2016may.model.DetectedIssue detectedIssue = (org.hl7.fhir.dstu2016may.model.DetectedIssue) theResource;
detectedIssue.setIdentifier(new Identifier().setSystem(getIdentifier().getKey()).setValue(getIdentifier().getValue())).setPatient(new Reference(myPatient));
getEvidenceDetails().forEach(detectedIssue::setReference);
}
use of org.hl7.fhir.r5.model in project cqf-ruler by DBCG.
the class IdsTest method testContextSupported.
@Test
public void testContextSupported() {
IIdType id = Ids.newId(FhirContext.forDstu3Cached(), "Patient/123");
assertTrue(id instanceof org.hl7.fhir.dstu3.model.IdType);
}
use of org.hl7.fhir.r5.model in project cqf-ruler by DBCG.
the class IdsTest method testPartsSupported.
@Test
public void testPartsSupported() {
IIdType id = Ids.newId(FhirVersionEnum.DSTU3, "Patient", "123");
assertTrue(id instanceof org.hl7.fhir.dstu3.model.IdType);
assertEquals("Patient", id.getResourceType());
assertEquals("123", id.getIdPart());
}
use of org.hl7.fhir.r5.model in project cqf-ruler by DBCG.
the class IdsTest method testClassSupported.
@Test
public void testClassSupported() {
IIdType id = Ids.newId(org.hl7.fhir.dstu3.model.Library.class, "123");
assertTrue(id instanceof org.hl7.fhir.dstu3.model.IdType);
assertEquals("Library", id.getResourceType());
assertEquals("123", id.getIdPart());
}
Aggregations