Search in sources :

Example 76 with Period

use of org.hl7.fhir.dstu2.model.Period in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeAccount.

protected void composeAccount(Complex parent, String parentType, String name, Account element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Account", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Account", "identifier", element.getIdentifier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "Account", "status", element.getStatusElement(), -1);
    if (element.hasType())
        composeCodeableConcept(t, "Account", "type", element.getType(), -1);
    if (element.hasNameElement())
        composeString(t, "Account", "name", element.getNameElement(), -1);
    if (element.hasSubject())
        composeReference(t, "Account", "subject", element.getSubject(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Account", "period", element.getPeriod(), -1);
    if (element.hasActive())
        composePeriod(t, "Account", "active", element.getActive(), -1);
    if (element.hasBalance())
        composeMoney(t, "Account", "balance", element.getBalance(), -1);
    for (int i = 0; i < element.getCoverage().size(); i++) composeAccountCoverageComponent(t, "Account", "coverage", element.getCoverage().get(i), i);
    if (element.hasOwner())
        composeReference(t, "Account", "owner", element.getOwner(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "Account", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getGuarantor().size(); i++) composeAccountGuarantorComponent(t, "Account", "guarantor", element.getGuarantor().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 77 with Period

use of org.hl7.fhir.dstu2.model.Period in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCoverage.

protected void composeCoverage(Complex parent, String parentType, String name, Coverage element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Coverage", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Coverage", "identifier", element.getIdentifier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "Coverage", "status", element.getStatusElement(), -1);
    if (element.hasType())
        composeCodeableConcept(t, "Coverage", "type", element.getType(), -1);
    if (element.hasPolicyHolder())
        composeReference(t, "Coverage", "policyHolder", element.getPolicyHolder(), -1);
    if (element.hasSubscriber())
        composeReference(t, "Coverage", "subscriber", element.getSubscriber(), -1);
    if (element.hasSubscriberIdElement())
        composeString(t, "Coverage", "subscriberId", element.getSubscriberIdElement(), -1);
    if (element.hasBeneficiary())
        composeReference(t, "Coverage", "beneficiary", element.getBeneficiary(), -1);
    if (element.hasRelationship())
        composeCodeableConcept(t, "Coverage", "relationship", element.getRelationship(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Coverage", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getPayor().size(); i++) composeReference(t, "Coverage", "payor", element.getPayor().get(i), i);
    if (element.hasGrouping())
        composeCoverageGroupComponent(t, "Coverage", "grouping", element.getGrouping(), -1);
    if (element.hasDependentElement())
        composeString(t, "Coverage", "dependent", element.getDependentElement(), -1);
    if (element.hasSequenceElement())
        composeString(t, "Coverage", "sequence", element.getSequenceElement(), -1);
    if (element.hasOrderElement())
        composePositiveInt(t, "Coverage", "order", element.getOrderElement(), -1);
    if (element.hasNetworkElement())
        composeString(t, "Coverage", "network", element.getNetworkElement(), -1);
    for (int i = 0; i < element.getContract().size(); i++) composeReference(t, "Coverage", "contract", element.getContract().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 78 with Period

use of org.hl7.fhir.dstu2.model.Period in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTaskTaskRestrictionComponent.

protected void composeTaskTaskRestrictionComponent(Complex parent, String parentType, String name, Task.TaskRestrictionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "restriction", name, element, index);
    if (element.hasRepetitionsElement())
        composePositiveInt(t, "Task", "repetitions", element.getRepetitionsElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Task", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getRecipient().size(); i++) composeReference(t, "Task", "recipient", element.getRecipient().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 79 with Period

use of org.hl7.fhir.dstu2.model.Period in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeRelatedPerson.

protected void composeRelatedPerson(Complex parent, String parentType, String name, RelatedPerson element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "RelatedPerson", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "RelatedPerson", "identifier", element.getIdentifier().get(i), i);
    if (element.hasActiveElement())
        composeBoolean(t, "RelatedPerson", "active", element.getActiveElement(), -1);
    if (element.hasPatient())
        composeReference(t, "RelatedPerson", "patient", element.getPatient(), -1);
    if (element.hasRelationship())
        composeCodeableConcept(t, "RelatedPerson", "relationship", element.getRelationship(), -1);
    for (int i = 0; i < element.getName().size(); i++) composeHumanName(t, "RelatedPerson", "name", element.getName().get(i), i);
    for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "RelatedPerson", "telecom", element.getTelecom().get(i), i);
    if (element.hasGenderElement())
        composeEnum(t, "RelatedPerson", "gender", element.getGenderElement(), -1);
    if (element.hasBirthDateElement())
        composeDate(t, "RelatedPerson", "birthDate", element.getBirthDateElement(), -1);
    for (int i = 0; i < element.getAddress().size(); i++) composeAddress(t, "RelatedPerson", "address", element.getAddress().get(i), i);
    for (int i = 0; i < element.getPhoto().size(); i++) composeAttachment(t, "RelatedPerson", "photo", element.getPhoto().get(i), i);
    if (element.hasPeriod())
        composePeriod(t, "RelatedPerson", "period", element.getPeriod(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 80 with Period

use of org.hl7.fhir.dstu2.model.Period in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCompositionCompositionEventComponent.

protected void composeCompositionCompositionEventComponent(Complex parent, String parentType, String name, Composition.CompositionEventComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "event", name, element, index);
    for (int i = 0; i < element.getCode().size(); i++) composeCodeableConcept(t, "Composition", "code", element.getCode().get(i), i);
    if (element.hasPeriod())
        composePeriod(t, "Composition", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getDetail().size(); i++) composeReference(t, "Composition", "detail", element.getDetail().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

Period (org.hl7.fhir.r4.model.Period)87 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)44 Date (java.util.Date)42 Test (org.junit.Test)42 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)40 Coding (org.hl7.fhir.r4.model.Coding)34 Test (org.junit.jupiter.api.Test)34 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)32 Period (org.hl7.fhir.dstu3.model.Period)30 ArrayList (java.util.ArrayList)29 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)27 DateTimeType (org.hl7.fhir.r4.model.DateTimeType)20 Encounter (org.hl7.fhir.r4.model.Encounter)20 Reference (org.hl7.fhir.r4.model.Reference)20 Patient (org.hl7.fhir.r4.model.Patient)19 Reference (org.hl7.fhir.dstu3.model.Reference)18 HashMap (java.util.HashMap)17 Identifier (org.hl7.fhir.r4.model.Identifier)17 NotImplementedException (org.apache.commons.lang3.NotImplementedException)15 List (java.util.List)14