Search in sources :

Example 1 with Media

use of org.hl7.fhir.r4.model.Media in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeAuditEventAuditEventAgentComponent.

protected void composeAuditEventAuditEventAgentComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "agent", name, element, index);
    for (int i = 0; i < element.getRole().size(); i++) composeCodeableConcept(t, "AuditEvent", "role", element.getRole().get(i), i);
    if (element.hasReference())
        composeReference(t, "AuditEvent", "reference", element.getReference(), -1);
    if (element.hasUserId())
        composeIdentifier(t, "AuditEvent", "userId", element.getUserId(), -1);
    if (element.hasAltIdElement())
        composeString(t, "AuditEvent", "altId", element.getAltIdElement(), -1);
    if (element.hasNameElement())
        composeString(t, "AuditEvent", "name", element.getNameElement(), -1);
    if (element.hasRequestorElement())
        composeBoolean(t, "AuditEvent", "requestor", element.getRequestorElement(), -1);
    if (element.hasLocation())
        composeReference(t, "AuditEvent", "location", element.getLocation(), -1);
    for (int i = 0; i < element.getPolicy().size(); i++) composeUri(t, "AuditEvent", "policy", element.getPolicy().get(i), i);
    if (element.hasMedia())
        composeCoding(t, "AuditEvent", "media", element.getMedia(), -1);
    if (element.hasNetwork())
        composeAuditEventAuditEventAgentNetworkComponent(t, "AuditEvent", "network", element.getNetwork(), -1);
    for (int i = 0; i < element.getPurposeOfUse().size(); i++) composeCoding(t, "AuditEvent", "purposeOfUse", element.getPurposeOfUse().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 2 with Media

use of org.hl7.fhir.r4.model.Media in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDiagnosticReportDiagnosticReportMediaComponent.

protected void composeDiagnosticReportDiagnosticReportMediaComponent(Complex parent, String parentType, String name, DiagnosticReport.DiagnosticReportMediaComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "media", name, element, index);
    if (element.hasCommentElement())
        composeString(t, "DiagnosticReport", "comment", element.getCommentElement(), -1);
    if (element.hasLink())
        composeReference(t, "DiagnosticReport", "link", element.getLink(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 3 with Media

use of org.hl7.fhir.r4.model.Media in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMedia.

protected void composeMedia(Complex parent, String parentType, String name, Media element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Media", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Media", "identifier", element.getIdentifier().get(i), i);
    for (int i = 0; i < element.getBasedOn().size(); i++) composeReference(t, "Media", "basedOn", element.getBasedOn().get(i), i);
    for (int i = 0; i < element.getPartOf().size(); i++) composeReference(t, "Media", "partOf", element.getPartOf().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "Media", "status", element.getStatusElement(), -1);
    if (element.hasType())
        composeCodeableConcept(t, "Media", "type", element.getType(), -1);
    if (element.hasModality())
        composeCodeableConcept(t, "Media", "modality", element.getModality(), -1);
    if (element.hasView())
        composeCodeableConcept(t, "Media", "view", element.getView(), -1);
    if (element.hasSubject())
        composeReference(t, "Media", "subject", element.getSubject(), -1);
    if (element.hasEncounter())
        composeReference(t, "Media", "encounter", element.getEncounter(), -1);
    if (element.hasCreated())
        composeType(t, "Media", "created", element.getCreated(), -1);
    if (element.hasIssuedElement())
        composeInstant(t, "Media", "issued", element.getIssuedElement(), -1);
    if (element.hasOperator())
        composeReference(t, "Media", "operator", element.getOperator(), -1);
    for (int i = 0; i < element.getReasonCode().size(); i++) composeCodeableConcept(t, "Media", "reasonCode", element.getReasonCode().get(i), i);
    if (element.hasBodySite())
        composeCodeableConcept(t, "Media", "bodySite", element.getBodySite(), -1);
    if (element.hasDeviceNameElement())
        composeString(t, "Media", "deviceName", element.getDeviceNameElement(), -1);
    if (element.hasDevice())
        composeReference(t, "Media", "device", element.getDevice(), -1);
    if (element.hasHeightElement())
        composePositiveInt(t, "Media", "height", element.getHeightElement(), -1);
    if (element.hasWidthElement())
        composePositiveInt(t, "Media", "width", element.getWidthElement(), -1);
    if (element.hasFramesElement())
        composePositiveInt(t, "Media", "frames", element.getFramesElement(), -1);
    if (element.hasDurationElement())
        composeDecimal(t, "Media", "duration", element.getDurationElement(), -1);
    if (element.hasContent())
        composeAttachment(t, "Media", "content", element.getContent(), -1);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "Media", "note", element.getNote().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 4 with Media

use of org.hl7.fhir.r4.model.Media in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_media_example_dicom.

@Test
public void test_media_example_dicom() throws FileNotFoundException, IOException, Exception {
    System.out.println("media-example-dicom.ttl");
    new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\media-example-dicom.ttl"));
}
Also used : Turtle(org.hl7.fhir.dstu3.utils.formats.Turtle) Test(org.junit.jupiter.api.Test)

Example 5 with Media

use of org.hl7.fhir.r4.model.Media in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_media_example.

@Test
public void test_media_example() throws FileNotFoundException, IOException, Exception {
    System.out.println("media-example.ttl");
    new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\media-example.ttl"));
}
Also used : Turtle(org.hl7.fhir.dstu3.utils.formats.Turtle) Test(org.junit.jupiter.api.Test)

Aggregations

FhirContext (ca.uhn.fhir.context.FhirContext)4 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)4 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)4 Attachment (org.mitre.synthea.engine.Components.Attachment)4 Person (org.mitre.synthea.world.agents.Person)4 Provider (org.mitre.synthea.world.agents.Provider)4 HealthRecord (org.mitre.synthea.world.concepts.HealthRecord)4 CarePlan (org.mitre.synthea.world.concepts.HealthRecord.CarePlan)4 Encounter (org.mitre.synthea.world.concepts.HealthRecord.Encounter)4 ImagingStudy (org.mitre.synthea.world.concepts.HealthRecord.ImagingStudy)4 Medication (org.mitre.synthea.world.concepts.HealthRecord.Medication)4 Observation (org.mitre.synthea.world.concepts.HealthRecord.Observation)4 Procedure (org.mitre.synthea.world.concepts.HealthRecord.Procedure)4 Report (org.mitre.synthea.world.concepts.HealthRecord.Report)4 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 Bundle (org.hl7.fhir.dstu3.model.Bundle)3 BundleEntryComponent (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent)3 XhtmlComposer (org.hl7.fhir.utilities.xhtml.XhtmlComposer)3 HashBasedTable (com.google.common.collect.HashBasedTable)2