Search in sources :

Example 71 with Device

use of org.hl7.fhir.dstu3.model.Device 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);
    if (element.hasTypeElement())
        composeEnum(t, "Media", "type", element.getTypeElement(), -1);
    if (element.hasSubtype())
        composeCodeableConcept(t, "Media", "subtype", element.getSubtype(), -1);
    if (element.hasView())
        composeCodeableConcept(t, "Media", "view", element.getView(), -1);
    if (element.hasSubject())
        composeReference(t, "Media", "subject", element.getSubject(), -1);
    if (element.hasContext())
        composeReference(t, "Media", "context", element.getContext(), -1);
    if (element.hasOccurrence())
        composeType(t, "Media", "occurrence", element.getOccurrence(), -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.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())
        composeUnsignedInt(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.dstu3.utils.formats.Turtle.Complex)

Example 72 with Device

use of org.hl7.fhir.dstu3.model.Device in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDeviceDeviceUdiComponent.

protected void composeDeviceDeviceUdiComponent(Complex parent, String parentType, String name, Device.DeviceUdiComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "udi", name, element, index);
    if (element.hasDeviceIdentifierElement())
        composeString(t, "Device", "deviceIdentifier", element.getDeviceIdentifierElement(), -1);
    if (element.hasNameElement())
        composeString(t, "Device", "name", element.getNameElement(), -1);
    if (element.hasJurisdictionElement())
        composeUri(t, "Device", "jurisdiction", element.getJurisdictionElement(), -1);
    if (element.hasCarrierHRFElement())
        composeString(t, "Device", "carrierHRF", element.getCarrierHRFElement(), -1);
    if (element.hasCarrierAIDCElement())
        composeBase64Binary(t, "Device", "carrierAIDC", element.getCarrierAIDCElement(), -1);
    if (element.hasIssuerElement())
        composeUri(t, "Device", "issuer", element.getIssuerElement(), -1);
    if (element.hasEntryTypeElement())
        composeEnum(t, "Device", "entryType", element.getEntryTypeElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 73 with Device

use of org.hl7.fhir.dstu3.model.Device in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMolecularSequence.

protected void composeMolecularSequence(Complex parent, String parentType, String name, MolecularSequence element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "MolecularSequence", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MolecularSequence", "identifier", element.getIdentifier().get(i), i);
    if (element.hasTypeElement())
        composeEnum(t, "MolecularSequence", "type", element.getTypeElement(), -1);
    if (element.hasCoordinateSystemElement())
        composeInteger(t, "MolecularSequence", "coordinateSystem", element.getCoordinateSystemElement(), -1);
    if (element.hasPatient())
        composeReference(t, "MolecularSequence", "patient", element.getPatient(), -1);
    if (element.hasSpecimen())
        composeReference(t, "MolecularSequence", "specimen", element.getSpecimen(), -1);
    if (element.hasDevice())
        composeReference(t, "MolecularSequence", "device", element.getDevice(), -1);
    if (element.hasPerformer())
        composeReference(t, "MolecularSequence", "performer", element.getPerformer(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "MolecularSequence", "quantity", element.getQuantity(), -1);
    if (element.hasReferenceSeq())
        composeMolecularSequenceMolecularSequenceReferenceSeqComponent(t, "MolecularSequence", "referenceSeq", element.getReferenceSeq(), -1);
    for (int i = 0; i < element.getVariant().size(); i++) composeMolecularSequenceMolecularSequenceVariantComponent(t, "MolecularSequence", "variant", element.getVariant().get(i), i);
    if (element.hasObservedSeqElement())
        composeString(t, "MolecularSequence", "observedSeq", element.getObservedSeqElement(), -1);
    for (int i = 0; i < element.getQuality().size(); i++) composeMolecularSequenceMolecularSequenceQualityComponent(t, "MolecularSequence", "quality", element.getQuality().get(i), i);
    if (element.hasReadCoverageElement())
        composeInteger(t, "MolecularSequence", "readCoverage", element.getReadCoverageElement(), -1);
    for (int i = 0; i < element.getRepository().size(); i++) composeMolecularSequenceMolecularSequenceRepositoryComponent(t, "MolecularSequence", "repository", element.getRepository().get(i), i);
    for (int i = 0; i < element.getPointer().size(); i++) composeReference(t, "MolecularSequence", "pointer", element.getPointer().get(i), i);
    for (int i = 0; i < element.getStructureVariant().size(); i++) composeMolecularSequenceMolecularSequenceStructureVariantComponent(t, "MolecularSequence", "structureVariant", element.getStructureVariant().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 74 with Device

use of org.hl7.fhir.dstu3.model.Device in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_device_example.

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

Example 75 with Device

use of org.hl7.fhir.dstu3.model.Device in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_device_example_software.

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

Aggregations

Device (com.google.api.services.cloudiot.v1.model.Device)21 HttpRequestInitializer (com.google.api.client.http.HttpRequestInitializer)13 JsonFactory (com.google.api.client.json.JsonFactory)13 CloudIot (com.google.api.services.cloudiot.v1.CloudIot)13 HttpCredentialsAdapter (com.google.auth.http.HttpCredentialsAdapter)13 GoogleCredentials (com.google.auth.oauth2.GoogleCredentials)13 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)13 Test (org.junit.jupiter.api.Test)9 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)7 Device (org.hl7.fhir.r4.model.Device)7 Practitioner (org.hl7.fhir.r4.model.Practitioner)7 Reference (org.hl7.fhir.r4.model.Reference)7 ArrayList (java.util.ArrayList)6 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)6 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)6 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)6 DeviceCredential (com.google.api.services.cloudiot.v1.model.DeviceCredential)5 PublicKeyCredential (com.google.api.services.cloudiot.v1.model.PublicKeyCredential)5 Coding (org.hl7.fhir.r4.model.Coding)5 Identifier (org.hl7.fhir.r4.model.Identifier)5