Search in sources :

Example 16 with Device

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

the class RdfParser method composeDeviceUseStatement.

protected void composeDeviceUseStatement(Complex parent, String parentType, String name, DeviceUseStatement element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "DeviceUseStatement", name, element, index);
    if (element.hasBodySite())
        composeType(t, "DeviceUseStatement", "bodySite", element.getBodySite(), -1);
    if (element.hasWhenUsed())
        composePeriod(t, "DeviceUseStatement", "whenUsed", element.getWhenUsed(), -1);
    if (element.hasDevice())
        composeReference(t, "DeviceUseStatement", "device", element.getDevice(), -1);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "DeviceUseStatement", "identifier", element.getIdentifier().get(i), i);
    for (int i = 0; i < element.getIndication().size(); i++) composeCodeableConcept(t, "DeviceUseStatement", "indication", element.getIndication().get(i), i);
    for (int i = 0; i < element.getNotes().size(); i++) composeString(t, "DeviceUseStatement", "notes", element.getNotes().get(i), i);
    if (element.hasRecordedOnElement())
        composeDateTime(t, "DeviceUseStatement", "recordedOn", element.getRecordedOnElement(), -1);
    if (element.hasSubject())
        composeReference(t, "DeviceUseStatement", "subject", element.getSubject(), -1);
    if (element.hasTiming())
        composeType(t, "DeviceUseStatement", "timing", element.getTiming(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 17 with Device

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

the class RdfParser method composeMedicationAdministration.

protected void composeMedicationAdministration(Complex parent, String parentType, String name, MedicationAdministration element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "MedicationAdministration", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MedicationAdministration", "identifier", element.getIdentifier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "MedicationAdministration", "status", element.getStatusElement(), -1);
    if (element.hasMedication())
        composeType(t, "MedicationAdministration", "medication", element.getMedication(), -1);
    if (element.hasPatient())
        composeReference(t, "MedicationAdministration", "patient", element.getPatient(), -1);
    if (element.hasEncounter())
        composeReference(t, "MedicationAdministration", "encounter", element.getEncounter(), -1);
    if (element.hasEffectiveTime())
        composeType(t, "MedicationAdministration", "effectiveTime", element.getEffectiveTime(), -1);
    if (element.hasPractitioner())
        composeReference(t, "MedicationAdministration", "practitioner", element.getPractitioner(), -1);
    if (element.hasPrescription())
        composeReference(t, "MedicationAdministration", "prescription", element.getPrescription(), -1);
    if (element.hasWasNotGivenElement())
        composeBoolean(t, "MedicationAdministration", "wasNotGiven", element.getWasNotGivenElement(), -1);
    for (int i = 0; i < element.getReasonNotGiven().size(); i++) composeCodeableConcept(t, "MedicationAdministration", "reasonNotGiven", element.getReasonNotGiven().get(i), i);
    for (int i = 0; i < element.getReasonGiven().size(); i++) composeCodeableConcept(t, "MedicationAdministration", "reasonGiven", element.getReasonGiven().get(i), i);
    for (int i = 0; i < element.getDevice().size(); i++) composeReference(t, "MedicationAdministration", "device", element.getDevice().get(i), i);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "MedicationAdministration", "note", element.getNote().get(i), i);
    if (element.hasDosage())
        composeMedicationAdministrationMedicationAdministrationDosageComponent(t, "MedicationAdministration", "dosage", element.getDosage(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 18 with Device

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

the class RdfParser method composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent.

protected void composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(Complex parent, String parentType, String name, MedicinalProductPackaged.MedicinalProductPackagedPackageItemComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "packageItem", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MedicinalProductPackaged", "identifier", element.getIdentifier().get(i), i);
    if (element.hasType())
        composeCodeableConcept(t, "MedicinalProductPackaged", "type", element.getType(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "MedicinalProductPackaged", "quantity", element.getQuantity(), -1);
    for (int i = 0; i < element.getMaterial().size(); i++) composeCodeableConcept(t, "MedicinalProductPackaged", "material", element.getMaterial().get(i), i);
    for (int i = 0; i < element.getAlternateMaterial().size(); i++) composeCodeableConcept(t, "MedicinalProductPackaged", "alternateMaterial", element.getAlternateMaterial().get(i), i);
    for (int i = 0; i < element.getDevice().size(); i++) composeReference(t, "MedicinalProductPackaged", "device", element.getDevice().get(i), i);
    for (int i = 0; i < element.getManufacturedItem().size(); i++) composeReference(t, "MedicinalProductPackaged", "manufacturedItem", element.getManufacturedItem().get(i), i);
    for (int i = 0; i < element.getPackageItem().size(); i++) composeMedicinalProductPackagedMedicinalProductPackagedPackageItemComponent(t, "MedicinalProductPackaged", "packageItem", element.getPackageItem().get(i), i);
    if (element.hasPhysicalCharacteristics())
        composeProdCharacteristic(t, "MedicinalProductPackaged", "physicalCharacteristics", element.getPhysicalCharacteristics(), -1);
    for (int i = 0; i < element.getOtherCharacteristics().size(); i++) composeCodeableConcept(t, "MedicinalProductPackaged", "otherCharacteristics", element.getOtherCharacteristics().get(i), i);
    for (int i = 0; i < element.getShelfLifeStorage().size(); i++) composeProductShelfLife(t, "MedicinalProductPackaged", "shelfLifeStorage", element.getShelfLifeStorage().get(i), i);
    for (int i = 0; i < element.getManufacturer().size(); i++) composeReference(t, "MedicinalProductPackaged", "manufacturer", element.getManufacturer().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 19 with Device

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

the class RdfParser method composeDevice.

protected void composeDevice(Complex parent, String parentType, String name, Device element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Device", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Device", "identifier", element.getIdentifier().get(i), i);
    if (element.hasDefinition())
        composeReference(t, "Device", "definition", element.getDefinition(), -1);
    for (int i = 0; i < element.getUdiCarrier().size(); i++) composeDeviceDeviceUdiCarrierComponent(t, "Device", "udiCarrier", element.getUdiCarrier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "Device", "status", element.getStatusElement(), -1);
    for (int i = 0; i < element.getStatusReason().size(); i++) composeCodeableConcept(t, "Device", "statusReason", element.getStatusReason().get(i), i);
    if (element.hasDistinctIdentifierElement())
        composeString(t, "Device", "distinctIdentifier", element.getDistinctIdentifierElement(), -1);
    if (element.hasManufacturerElement())
        composeString(t, "Device", "manufacturer", element.getManufacturerElement(), -1);
    if (element.hasManufactureDateElement())
        composeDateTime(t, "Device", "manufactureDate", element.getManufactureDateElement(), -1);
    if (element.hasExpirationDateElement())
        composeDateTime(t, "Device", "expirationDate", element.getExpirationDateElement(), -1);
    if (element.hasLotNumberElement())
        composeString(t, "Device", "lotNumber", element.getLotNumberElement(), -1);
    if (element.hasSerialNumberElement())
        composeString(t, "Device", "serialNumber", element.getSerialNumberElement(), -1);
    for (int i = 0; i < element.getDeviceName().size(); i++) composeDeviceDeviceDeviceNameComponent(t, "Device", "deviceName", element.getDeviceName().get(i), i);
    if (element.hasModelNumberElement())
        composeString(t, "Device", "modelNumber", element.getModelNumberElement(), -1);
    if (element.hasPartNumberElement())
        composeString(t, "Device", "partNumber", element.getPartNumberElement(), -1);
    if (element.hasType())
        composeCodeableConcept(t, "Device", "type", element.getType(), -1);
    for (int i = 0; i < element.getSpecialization().size(); i++) composeDeviceDeviceSpecializationComponent(t, "Device", "specialization", element.getSpecialization().get(i), i);
    for (int i = 0; i < element.getVersion().size(); i++) composeDeviceDeviceVersionComponent(t, "Device", "version", element.getVersion().get(i), i);
    for (int i = 0; i < element.getProperty().size(); i++) composeDeviceDevicePropertyComponent(t, "Device", "property", element.getProperty().get(i), i);
    if (element.hasPatient())
        composeReference(t, "Device", "patient", element.getPatient(), -1);
    if (element.hasOwner())
        composeReference(t, "Device", "owner", element.getOwner(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeContactPoint(t, "Device", "contact", element.getContact().get(i), i);
    if (element.hasLocation())
        composeReference(t, "Device", "location", element.getLocation(), -1);
    if (element.hasUrlElement())
        composeUri(t, "Device", "url", element.getUrlElement(), -1);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "Device", "note", element.getNote().get(i), i);
    for (int i = 0; i < element.getSafety().size(); i++) composeCodeableConcept(t, "Device", "safety", element.getSafety().get(i), i);
    if (element.hasParent())
        composeReference(t, "Device", "parent", element.getParent(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 20 with Device

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

the class RdfParser method composeDeviceDeviceDeviceNameComponent.

protected void composeDeviceDeviceDeviceNameComponent(Complex parent, String parentType, String name, Device.DeviceDeviceNameComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "deviceName", name, element, index);
    if (element.hasNameElement())
        composeString(t, "Device", "name", element.getNameElement(), -1);
    if (element.hasTypeElement())
        composeEnum(t, "Device", "type", element.getTypeElement(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

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