Search in sources :

Example 96 with ExplanationOfBenefit

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

the class RdfParser method composeExplanationOfBenefitSupportingInformationComponent.

protected void composeExplanationOfBenefitSupportingInformationComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.SupportingInformationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "information", name, element, index);
    if (element.hasSequenceElement())
        composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1);
    if (element.hasCategory())
        composeCodeableConcept(t, "ExplanationOfBenefit", "category", element.getCategory(), -1);
    if (element.hasCode())
        composeCodeableConcept(t, "ExplanationOfBenefit", "code", element.getCode(), -1);
    if (element.hasTiming())
        composeType(t, "ExplanationOfBenefit", "timing", element.getTiming(), -1);
    if (element.hasValue())
        composeType(t, "ExplanationOfBenefit", "value", element.getValue(), -1);
    if (element.hasReason())
        composeCoding(t, "ExplanationOfBenefit", "reason", element.getReason(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 97 with ExplanationOfBenefit

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

the class RdfParser method composeExplanationOfBenefitPaymentComponent.

protected void composeExplanationOfBenefitPaymentComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.PaymentComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "payment", name, element, index);
    if (element.hasType())
        composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType(), -1);
    if (element.hasAdjustment())
        composeMoney(t, "ExplanationOfBenefit", "adjustment", element.getAdjustment(), -1);
    if (element.hasAdjustmentReason())
        composeCodeableConcept(t, "ExplanationOfBenefit", "adjustmentReason", element.getAdjustmentReason(), -1);
    if (element.hasDateElement())
        composeDate(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1);
    if (element.hasAmount())
        composeMoney(t, "ExplanationOfBenefit", "amount", element.getAmount(), -1);
    if (element.hasIdentifier())
        composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 98 with ExplanationOfBenefit

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

the class RdfParser method composeExplanationOfBenefitMissingTeethComponent.

protected void composeExplanationOfBenefitMissingTeethComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.MissingTeethComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "missingTeeth", name, element, index);
    if (element.hasTooth())
        composeCoding(t, "ExplanationOfBenefit", "tooth", element.getTooth(), -1);
    if (element.hasReason())
        composeCoding(t, "ExplanationOfBenefit", "reason", element.getReason(), -1);
    if (element.hasExtractionDateElement())
        composeDate(t, "ExplanationOfBenefit", "extractionDate", element.getExtractionDateElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 99 with ExplanationOfBenefit

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

the class RdfParser method composeExplanationOfBenefitRelatedClaimComponent.

protected void composeExplanationOfBenefitRelatedClaimComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.RelatedClaimComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "related", name, element, index);
    if (element.hasClaim())
        composeReference(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1);
    if (element.hasRelationship())
        composeCodeableConcept(t, "ExplanationOfBenefit", "relationship", element.getRelationship(), -1);
    if (element.hasReference())
        composeIdentifier(t, "ExplanationOfBenefit", "reference", element.getReference(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 100 with ExplanationOfBenefit

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

the class RdfParser method composeExplanationOfBenefitCareTeamComponent.

protected void composeExplanationOfBenefitCareTeamComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.CareTeamComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "careTeam", name, element, index);
    if (element.hasSequenceElement())
        composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1);
    if (element.hasProvider())
        composeReference(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1);
    if (element.hasResponsibleElement())
        composeBoolean(t, "ExplanationOfBenefit", "responsible", element.getResponsibleElement(), -1);
    if (element.hasRole())
        composeCodeableConcept(t, "ExplanationOfBenefit", "role", element.getRole(), -1);
    if (element.hasQualification())
        composeCodeableConcept(t, "ExplanationOfBenefit", "qualification", element.getQualification(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

ExplanationOfBenefit (org.hl7.fhir.dstu3.model.ExplanationOfBenefit)67 ExplanationOfBenefit (org.hl7.fhir.r4.model.ExplanationOfBenefit)63 Test (org.junit.jupiter.api.Test)53 Optional (java.util.Optional)47 Arrays (java.util.Arrays)45 List (java.util.List)44 ArrayList (java.util.ArrayList)42 CarrierClaim (gov.cms.bfd.model.rif.CarrierClaim)39 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)38 MetricRegistry (com.codahale.metrics.MetricRegistry)37 TransformerConstants (gov.cms.bfd.server.war.commons.TransformerConstants)37 BadCodeMonkeyException (gov.cms.bfd.sharedutils.exceptions.BadCodeMonkeyException)36 Instant (java.time.Instant)36 Date (java.util.Date)35 Collectors (java.util.stream.Collectors)35 OutpatientClaim (gov.cms.bfd.model.rif.OutpatientClaim)34 ItemComponent (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.ItemComponent)34 InpatientClaim (gov.cms.bfd.model.rif.InpatientClaim)32 IdDt (ca.uhn.fhir.model.primitive.IdDt)31 Constants (ca.uhn.fhir.rest.api.Constants)31