Search in sources :

Example 6 with DetectedIssue

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

the class RdfParser method composeMedicationDispense.

protected void composeMedicationDispense(Complex parent, String parentType, String name, MedicationDispense element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "MedicationDispense", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MedicationDispense", "identifier", element.getIdentifier().get(i), i);
    for (int i = 0; i < element.getPartOf().size(); i++) composeReference(t, "MedicationDispense", "partOf", element.getPartOf().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "MedicationDispense", "status", element.getStatusElement(), -1);
    if (element.hasCategory())
        composeCodeableConcept(t, "MedicationDispense", "category", element.getCategory(), -1);
    if (element.hasMedication())
        composeType(t, "MedicationDispense", "medication", element.getMedication(), -1);
    if (element.hasSubject())
        composeReference(t, "MedicationDispense", "subject", element.getSubject(), -1);
    if (element.hasContext())
        composeReference(t, "MedicationDispense", "context", element.getContext(), -1);
    for (int i = 0; i < element.getSupportingInformation().size(); i++) composeReference(t, "MedicationDispense", "supportingInformation", element.getSupportingInformation().get(i), i);
    for (int i = 0; i < element.getPerformer().size(); i++) composeMedicationDispenseMedicationDispensePerformerComponent(t, "MedicationDispense", "performer", element.getPerformer().get(i), i);
    for (int i = 0; i < element.getAuthorizingPrescription().size(); i++) composeReference(t, "MedicationDispense", "authorizingPrescription", element.getAuthorizingPrescription().get(i), i);
    if (element.hasType())
        composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "MedicationDispense", "quantity", element.getQuantity(), -1);
    if (element.hasDaysSupply())
        composeQuantity(t, "MedicationDispense", "daysSupply", element.getDaysSupply(), -1);
    if (element.hasWhenPreparedElement())
        composeDateTime(t, "MedicationDispense", "whenPrepared", element.getWhenPreparedElement(), -1);
    if (element.hasWhenHandedOverElement())
        composeDateTime(t, "MedicationDispense", "whenHandedOver", element.getWhenHandedOverElement(), -1);
    if (element.hasDestination())
        composeReference(t, "MedicationDispense", "destination", element.getDestination(), -1);
    for (int i = 0; i < element.getReceiver().size(); i++) composeReference(t, "MedicationDispense", "receiver", element.getReceiver().get(i), i);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "MedicationDispense", "note", element.getNote().get(i), i);
    for (int i = 0; i < element.getDosageInstruction().size(); i++) composeDosage(t, "MedicationDispense", "dosageInstruction", element.getDosageInstruction().get(i), i);
    if (element.hasSubstitution())
        composeMedicationDispenseMedicationDispenseSubstitutionComponent(t, "MedicationDispense", "substitution", element.getSubstitution(), -1);
    for (int i = 0; i < element.getDetectedIssue().size(); i++) composeReference(t, "MedicationDispense", "detectedIssue", element.getDetectedIssue().get(i), i);
    if (element.hasNotDoneElement())
        composeBoolean(t, "MedicationDispense", "notDone", element.getNotDoneElement(), -1);
    if (element.hasNotDoneReason())
        composeType(t, "MedicationDispense", "notDoneReason", element.getNotDoneReason(), -1);
    for (int i = 0; i < element.getEventHistory().size(); i++) composeReference(t, "MedicationDispense", "eventHistory", element.getEventHistory().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 7 with DetectedIssue

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

the class RdfParser method composeDetectedIssueDetectedIssueMitigationComponent.

protected void composeDetectedIssueDetectedIssueMitigationComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueMitigationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "mitigation", name, element, index);
    if (element.hasAction())
        composeCodeableConcept(t, "DetectedIssue", "action", element.getAction(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1);
    if (element.hasAuthor())
        composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 8 with DetectedIssue

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

the class RdfParser method composeDetectedIssueDetectedIssueMitigationComponent.

protected void composeDetectedIssueDetectedIssueMitigationComponent(Complex parent, String parentType, String name, DetectedIssue.DetectedIssueMitigationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "mitigation", name, element, index);
    if (element.hasAction())
        composeCodeableConcept(t, "DetectedIssue", "action", element.getAction(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1);
    if (element.hasAuthor())
        composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 9 with DetectedIssue

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

the class RdfParser method composeMedicationDispense.

protected void composeMedicationDispense(Complex parent, String parentType, String name, MedicationDispense element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "MedicationDispense", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "MedicationDispense", "identifier", element.getIdentifier().get(i), i);
    for (int i = 0; i < element.getPartOf().size(); i++) composeReference(t, "MedicationDispense", "partOf", element.getPartOf().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "MedicationDispense", "status", element.getStatusElement(), -1);
    if (element.hasStatusReason())
        composeType(t, "MedicationDispense", "statusReason", element.getStatusReason(), -1);
    if (element.hasCategory())
        composeCodeableConcept(t, "MedicationDispense", "category", element.getCategory(), -1);
    if (element.hasMedication())
        composeType(t, "MedicationDispense", "medication", element.getMedication(), -1);
    if (element.hasSubject())
        composeReference(t, "MedicationDispense", "subject", element.getSubject(), -1);
    if (element.hasContext())
        composeReference(t, "MedicationDispense", "context", element.getContext(), -1);
    for (int i = 0; i < element.getSupportingInformation().size(); i++) composeReference(t, "MedicationDispense", "supportingInformation", element.getSupportingInformation().get(i), i);
    for (int i = 0; i < element.getPerformer().size(); i++) composeMedicationDispenseMedicationDispensePerformerComponent(t, "MedicationDispense", "performer", element.getPerformer().get(i), i);
    if (element.hasLocation())
        composeReference(t, "MedicationDispense", "location", element.getLocation(), -1);
    for (int i = 0; i < element.getAuthorizingPrescription().size(); i++) composeReference(t, "MedicationDispense", "authorizingPrescription", element.getAuthorizingPrescription().get(i), i);
    if (element.hasType())
        composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "MedicationDispense", "quantity", element.getQuantity(), -1);
    if (element.hasDaysSupply())
        composeQuantity(t, "MedicationDispense", "daysSupply", element.getDaysSupply(), -1);
    if (element.hasWhenPreparedElement())
        composeDateTime(t, "MedicationDispense", "whenPrepared", element.getWhenPreparedElement(), -1);
    if (element.hasWhenHandedOverElement())
        composeDateTime(t, "MedicationDispense", "whenHandedOver", element.getWhenHandedOverElement(), -1);
    if (element.hasDestination())
        composeReference(t, "MedicationDispense", "destination", element.getDestination(), -1);
    for (int i = 0; i < element.getReceiver().size(); i++) composeReference(t, "MedicationDispense", "receiver", element.getReceiver().get(i), i);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "MedicationDispense", "note", element.getNote().get(i), i);
    for (int i = 0; i < element.getDosageInstruction().size(); i++) composeDosage(t, "MedicationDispense", "dosageInstruction", element.getDosageInstruction().get(i), i);
    if (element.hasSubstitution())
        composeMedicationDispenseMedicationDispenseSubstitutionComponent(t, "MedicationDispense", "substitution", element.getSubstitution(), -1);
    for (int i = 0; i < element.getDetectedIssue().size(); i++) composeReference(t, "MedicationDispense", "detectedIssue", element.getDetectedIssue().get(i), i);
    for (int i = 0; i < element.getEventHistory().size(); i++) composeReference(t, "MedicationDispense", "eventHistory", element.getEventHistory().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 10 with DetectedIssue

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

the class TurtleTests method test_detectedissue_example_lab.

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

Aggregations

Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)5 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)4 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)4 Test (org.junit.jupiter.api.Test)4 ArrayList (java.util.ArrayList)3 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)2 Identifier (org.hl7.fhir.dstu2016may.model.Identifier)2 DetectedIssue (org.hl7.fhir.r4.model.DetectedIssue)2 MeasureReport (org.hl7.fhir.r4.model.MeasureReport)2 HashMap (java.util.HashMap)1 Reference (org.hl7.fhir.dstu2016may.model.Reference)1 Bundle (org.hl7.fhir.r4.model.Bundle)1 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)1 Coding (org.hl7.fhir.r4.model.Coding)1 Composition (org.hl7.fhir.r4.model.Composition)1 DetectedIssueEvidenceComponent (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueEvidenceComponent)1 Measure (org.hl7.fhir.r4.model.Measure)1 Resource (org.hl7.fhir.r4.model.Resource)1