Search in sources :

Example 71 with Period

use of org.hl7.fhir.r4b.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);
    if (element.hasIssuer())
        composeType(t, "Coverage", "issuer", element.getIssuer(), -1);
    if (element.hasBinElement())
        composeString(t, "Coverage", "bin", element.getBinElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Coverage", "period", element.getPeriod(), -1);
    if (element.hasType())
        composeCoding(t, "Coverage", "type", element.getType(), -1);
    if (element.hasPlanholder())
        composeType(t, "Coverage", "planholder", element.getPlanholder(), -1);
    if (element.hasBeneficiary())
        composeType(t, "Coverage", "beneficiary", element.getBeneficiary(), -1);
    if (element.hasRelationship())
        composeCoding(t, "Coverage", "relationship", element.getRelationship(), -1);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Coverage", "identifier", element.getIdentifier().get(i), i);
    if (element.hasGroupElement())
        composeString(t, "Coverage", "group", element.getGroupElement(), -1);
    if (element.hasPlanElement())
        composeString(t, "Coverage", "plan", element.getPlanElement(), -1);
    if (element.hasSubPlanElement())
        composeString(t, "Coverage", "subPlan", element.getSubPlanElement(), -1);
    if (element.hasDependentElement())
        composePositiveInt(t, "Coverage", "dependent", element.getDependentElement(), -1);
    if (element.hasSequenceElement())
        composePositiveInt(t, "Coverage", "sequence", element.getSequenceElement(), -1);
    for (int i = 0; i < element.getException().size(); i++) composeCoding(t, "Coverage", "exception", element.getException().get(i), i);
    if (element.hasSchoolElement())
        composeString(t, "Coverage", "school", element.getSchoolElement(), -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.dstu2016may.formats.RdfGenerator.Complex)

Example 72 with Period

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

the class RdfParser method composeEncounterStatusHistoryComponent.

protected void composeEncounterStatusHistoryComponent(Complex parent, String parentType, String name, Encounter.StatusHistoryComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "statusHistory", name, element, index);
    if (element.hasStatusElement())
        composeEnum(t, "Encounter", "status", element.getStatusElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Encounter", "period", element.getPeriod(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 73 with Period

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

the class RdfParser method composeEpisodeOfCare.

protected void composeEpisodeOfCare(Complex parent, String parentType, String name, EpisodeOfCare element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "EpisodeOfCare", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "EpisodeOfCare", "identifier", element.getIdentifier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "EpisodeOfCare", "status", element.getStatusElement(), -1);
    for (int i = 0; i < element.getStatusHistory().size(); i++) composeEpisodeOfCareEpisodeOfCareStatusHistoryComponent(t, "EpisodeOfCare", "statusHistory", element.getStatusHistory().get(i), i);
    for (int i = 0; i < element.getType().size(); i++) composeCodeableConcept(t, "EpisodeOfCare", "type", element.getType().get(i), i);
    for (int i = 0; i < element.getDiagnosis().size(); i++) composeEpisodeOfCareDiagnosisComponent(t, "EpisodeOfCare", "diagnosis", element.getDiagnosis().get(i), i);
    if (element.hasPatient())
        composeReference(t, "EpisodeOfCare", "patient", element.getPatient(), -1);
    if (element.hasManagingOrganization())
        composeReference(t, "EpisodeOfCare", "managingOrganization", element.getManagingOrganization(), -1);
    if (element.hasPeriod())
        composePeriod(t, "EpisodeOfCare", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getReferralRequest().size(); i++) composeReference(t, "EpisodeOfCare", "referralRequest", element.getReferralRequest().get(i), i);
    if (element.hasCareManager())
        composeReference(t, "EpisodeOfCare", "careManager", element.getCareManager(), -1);
    for (int i = 0; i < element.getTeam().size(); i++) composeReference(t, "EpisodeOfCare", "team", element.getTeam().get(i), i);
    for (int i = 0; i < element.getAccount().size(); i++) composeReference(t, "EpisodeOfCare", "account", element.getAccount().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 74 with Period

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

the class RdfParser method composePeriod.

protected void composePeriod(Complex parent, String parentType, String name, Period element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "Period", name, element, index);
    if (element.hasStartElement())
        composeDateTime(t, "Period", "start", element.getStartElement(), -1);
    if (element.hasEndElement())
        composeDateTime(t, "Period", "end", element.getEndElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 75 with Period

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

the class RdfParser method composeConsentExceptComponent.

protected void composeConsentExceptComponent(Complex parent, String parentType, String name, Consent.ExceptComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "except", name, element, index);
    if (element.hasTypeElement())
        composeEnum(t, "Consent", "type", element.getTypeElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Consent", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getActor().size(); i++) composeConsentExceptActorComponent(t, "Consent", "actor", element.getActor().get(i), i);
    for (int i = 0; i < element.getAction().size(); i++) composeCodeableConcept(t, "Consent", "action", element.getAction().get(i), i);
    for (int i = 0; i < element.getSecurityLabel().size(); i++) composeCoding(t, "Consent", "securityLabel", element.getSecurityLabel().get(i), i);
    for (int i = 0; i < element.getPurpose().size(); i++) composeCoding(t, "Consent", "purpose", element.getPurpose().get(i), i);
    for (int i = 0; i < element.getClass_().size(); i++) composeCoding(t, "Consent", "class", element.getClass_().get(i), i);
    for (int i = 0; i < element.getCode().size(); i++) composeCoding(t, "Consent", "code", element.getCode().get(i), i);
    if (element.hasDataPeriod())
        composePeriod(t, "Consent", "dataPeriod", element.getDataPeriod(), -1);
    for (int i = 0; i < element.getData().size(); i++) composeConsentExceptDataComponent(t, "Consent", "data", element.getData().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