Search in sources :

Example 96 with Coverage

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

the class RdfParser method composeExplanationOfBenefit.

protected void composeExplanationOfBenefit(Complex parent, String parentType, String name, ExplanationOfBenefit element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "ExplanationOfBenefit", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier().get(i), i);
    if (element.hasClaim())
        composeType(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1);
    if (element.hasClaimResponse())
        composeType(t, "ExplanationOfBenefit", "claimResponse", element.getClaimResponse(), -1);
    for (int i = 0; i < element.getSubType().size(); i++) composeCoding(t, "ExplanationOfBenefit", "subType", element.getSubType().get(i), i);
    if (element.hasRuleset())
        composeCoding(t, "ExplanationOfBenefit", "ruleset", element.getRuleset(), -1);
    if (element.hasOriginalRuleset())
        composeCoding(t, "ExplanationOfBenefit", "originalRuleset", element.getOriginalRuleset(), -1);
    if (element.hasCreatedElement())
        composeDateTime(t, "ExplanationOfBenefit", "created", element.getCreatedElement(), -1);
    if (element.hasBillablePeriod())
        composePeriod(t, "ExplanationOfBenefit", "billablePeriod", element.getBillablePeriod(), -1);
    if (element.hasDispositionElement())
        composeString(t, "ExplanationOfBenefit", "disposition", element.getDispositionElement(), -1);
    if (element.hasProvider())
        composeType(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1);
    if (element.hasOrganization())
        composeType(t, "ExplanationOfBenefit", "organization", element.getOrganization(), -1);
    if (element.hasFacility())
        composeType(t, "ExplanationOfBenefit", "facility", element.getFacility(), -1);
    for (int i = 0; i < element.getRelated().size(); i++) composeExplanationOfBenefitRelatedClaimsComponent(t, "ExplanationOfBenefit", "related", element.getRelated().get(i), i);
    if (element.hasPrescription())
        composeType(t, "ExplanationOfBenefit", "prescription", element.getPrescription(), -1);
    if (element.hasOriginalPrescription())
        composeType(t, "ExplanationOfBenefit", "originalPrescription", element.getOriginalPrescription(), -1);
    if (element.hasPayee())
        composeExplanationOfBenefitPayeeComponent(t, "ExplanationOfBenefit", "payee", element.getPayee(), -1);
    if (element.hasReferral())
        composeType(t, "ExplanationOfBenefit", "referral", element.getReferral(), -1);
    for (int i = 0; i < element.getOccurrenceCode().size(); i++) composeCoding(t, "ExplanationOfBenefit", "occurrenceCode", element.getOccurrenceCode().get(i), i);
    for (int i = 0; i < element.getOccurenceSpanCode().size(); i++) composeCoding(t, "ExplanationOfBenefit", "occurenceSpanCode", element.getOccurenceSpanCode().get(i), i);
    for (int i = 0; i < element.getValueCode().size(); i++) composeCoding(t, "ExplanationOfBenefit", "valueCode", element.getValueCode().get(i), i);
    for (int i = 0; i < element.getDiagnosis().size(); i++) composeExplanationOfBenefitDiagnosisComponent(t, "ExplanationOfBenefit", "diagnosis", element.getDiagnosis().get(i), i);
    for (int i = 0; i < element.getProcedure().size(); i++) composeExplanationOfBenefitProcedureComponent(t, "ExplanationOfBenefit", "procedure", element.getProcedure().get(i), i);
    for (int i = 0; i < element.getSpecialCondition().size(); i++) composeCoding(t, "ExplanationOfBenefit", "specialCondition", element.getSpecialCondition().get(i), i);
    if (element.hasPatient())
        composeType(t, "ExplanationOfBenefit", "patient", element.getPatient(), -1);
    if (element.hasPrecedenceElement())
        composePositiveInt(t, "ExplanationOfBenefit", "precedence", element.getPrecedenceElement(), -1);
    if (element.hasCoverage())
        composeExplanationOfBenefitCoverageComponent(t, "ExplanationOfBenefit", "coverage", element.getCoverage(), -1);
    if (element.hasAccidentDateElement())
        composeDate(t, "ExplanationOfBenefit", "accidentDate", element.getAccidentDateElement(), -1);
    if (element.hasAccidentType())
        composeCoding(t, "ExplanationOfBenefit", "accidentType", element.getAccidentType(), -1);
    if (element.hasAccidentLocation())
        composeType(t, "ExplanationOfBenefit", "accidentLocation", element.getAccidentLocation(), -1);
    for (int i = 0; i < element.getInterventionException().size(); i++) composeCoding(t, "ExplanationOfBenefit", "interventionException", element.getInterventionException().get(i), i);
    for (int i = 0; i < element.getOnset().size(); i++) composeExplanationOfBenefitOnsetComponent(t, "ExplanationOfBenefit", "onset", element.getOnset().get(i), i);
    if (element.hasEmploymentImpacted())
        composePeriod(t, "ExplanationOfBenefit", "employmentImpacted", element.getEmploymentImpacted(), -1);
    if (element.hasHospitalization())
        composePeriod(t, "ExplanationOfBenefit", "hospitalization", element.getHospitalization(), -1);
    for (int i = 0; i < element.getItem().size(); i++) composeExplanationOfBenefitItemsComponent(t, "ExplanationOfBenefit", "item", element.getItem().get(i), i);
    for (int i = 0; i < element.getAddItem().size(); i++) composeExplanationOfBenefitAddedItemComponent(t, "ExplanationOfBenefit", "addItem", element.getAddItem().get(i), i);
    for (int i = 0; i < element.getMissingTeeth().size(); i++) composeExplanationOfBenefitMissingTeethComponent(t, "ExplanationOfBenefit", "missingTeeth", element.getMissingTeeth().get(i), i);
    if (element.hasTotalCost())
        composeQuantity(t, "ExplanationOfBenefit", "totalCost", element.getTotalCost(), -1);
    if (element.hasUnallocDeductable())
        composeQuantity(t, "ExplanationOfBenefit", "unallocDeductable", element.getUnallocDeductable(), -1);
    if (element.hasTotalBenefit())
        composeQuantity(t, "ExplanationOfBenefit", "totalBenefit", element.getTotalBenefit(), -1);
    if (element.hasPaymentAdjustment())
        composeQuantity(t, "ExplanationOfBenefit", "paymentAdjustment", element.getPaymentAdjustment(), -1);
    if (element.hasPaymentAdjustmentReason())
        composeCoding(t, "ExplanationOfBenefit", "paymentAdjustmentReason", element.getPaymentAdjustmentReason(), -1);
    if (element.hasPaymentDateElement())
        composeDate(t, "ExplanationOfBenefit", "paymentDate", element.getPaymentDateElement(), -1);
    if (element.hasPaymentAmount())
        composeQuantity(t, "ExplanationOfBenefit", "paymentAmount", element.getPaymentAmount(), -1);
    if (element.hasPaymentRef())
        composeIdentifier(t, "ExplanationOfBenefit", "paymentRef", element.getPaymentRef(), -1);
    if (element.hasReserved())
        composeCoding(t, "ExplanationOfBenefit", "reserved", element.getReserved(), -1);
    if (element.hasForm())
        composeCoding(t, "ExplanationOfBenefit", "form", element.getForm(), -1);
    for (int i = 0; i < element.getNote().size(); i++) composeExplanationOfBenefitNotesComponent(t, "ExplanationOfBenefit", "note", element.getNote().get(i), i);
    for (int i = 0; i < element.getBenefitBalance().size(); i++) composeExplanationOfBenefitBenefitBalanceComponent(t, "ExplanationOfBenefit", "benefitBalance", element.getBenefitBalance().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 97 with Coverage

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

the class RdfParser method composeModuleMetadata.

protected void composeModuleMetadata(Complex parent, String parentType, String name, ModuleMetadata element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "ModuleMetadata", name, element, index);
    if (element.hasUrlElement())
        composeUri(t, "ModuleMetadata", "url", element.getUrlElement(), -1);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ModuleMetadata", "identifier", element.getIdentifier().get(i), i);
    if (element.hasVersionElement())
        composeString(t, "ModuleMetadata", "version", element.getVersionElement(), -1);
    if (element.hasNameElement())
        composeString(t, "ModuleMetadata", "name", element.getNameElement(), -1);
    if (element.hasTitleElement())
        composeString(t, "ModuleMetadata", "title", element.getTitleElement(), -1);
    if (element.hasTypeElement())
        composeEnum(t, "ModuleMetadata", "type", element.getTypeElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "ModuleMetadata", "status", element.getStatusElement(), -1);
    if (element.hasExperimentalElement())
        composeBoolean(t, "ModuleMetadata", "experimental", element.getExperimentalElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "ModuleMetadata", "description", element.getDescriptionElement(), -1);
    if (element.hasPurposeElement())
        composeString(t, "ModuleMetadata", "purpose", element.getPurposeElement(), -1);
    if (element.hasUsageElement())
        composeString(t, "ModuleMetadata", "usage", element.getUsageElement(), -1);
    if (element.hasPublicationDateElement())
        composeDate(t, "ModuleMetadata", "publicationDate", element.getPublicationDateElement(), -1);
    if (element.hasLastReviewDateElement())
        composeDate(t, "ModuleMetadata", "lastReviewDate", element.getLastReviewDateElement(), -1);
    if (element.hasEffectivePeriod())
        composePeriod(t, "ModuleMetadata", "effectivePeriod", element.getEffectivePeriod(), -1);
    for (int i = 0; i < element.getCoverage().size(); i++) composeModuleMetadataModuleMetadataCoverageComponent(t, "ModuleMetadata", "coverage", element.getCoverage().get(i), i);
    for (int i = 0; i < element.getTopic().size(); i++) composeCodeableConcept(t, "ModuleMetadata", "topic", element.getTopic().get(i), i);
    for (int i = 0; i < element.getContributor().size(); i++) composeModuleMetadataModuleMetadataContributorComponent(t, "ModuleMetadata", "contributor", element.getContributor().get(i), i);
    if (element.hasPublisherElement())
        composeString(t, "ModuleMetadata", "publisher", element.getPublisherElement(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeModuleMetadataModuleMetadataContactComponent(t, "ModuleMetadata", "contact", element.getContact().get(i), i);
    if (element.hasCopyrightElement())
        composeString(t, "ModuleMetadata", "copyright", element.getCopyrightElement(), -1);
    for (int i = 0; i < element.getRelatedResource().size(); i++) composeModuleMetadataModuleMetadataRelatedResourceComponent(t, "ModuleMetadata", "relatedResource", element.getRelatedResource().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 98 with Coverage

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

the class RdfParser method composeClaimResponse.

protected void composeClaimResponse(Complex parent, String parentType, String name, ClaimResponse element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "ClaimResponse", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ClaimResponse", "identifier", element.getIdentifier().get(i), i);
    if (element.hasRequest())
        composeType(t, "ClaimResponse", "request", element.getRequest(), -1);
    if (element.hasRuleset())
        composeCoding(t, "ClaimResponse", "ruleset", element.getRuleset(), -1);
    if (element.hasOriginalRuleset())
        composeCoding(t, "ClaimResponse", "originalRuleset", element.getOriginalRuleset(), -1);
    if (element.hasCreatedElement())
        composeDateTime(t, "ClaimResponse", "created", element.getCreatedElement(), -1);
    if (element.hasOrganization())
        composeType(t, "ClaimResponse", "organization", element.getOrganization(), -1);
    if (element.hasRequestProvider())
        composeType(t, "ClaimResponse", "requestProvider", element.getRequestProvider(), -1);
    if (element.hasRequestOrganization())
        composeType(t, "ClaimResponse", "requestOrganization", element.getRequestOrganization(), -1);
    if (element.hasOutcomeElement())
        composeEnum(t, "ClaimResponse", "outcome", element.getOutcomeElement(), -1);
    if (element.hasDispositionElement())
        composeString(t, "ClaimResponse", "disposition", element.getDispositionElement(), -1);
    if (element.hasPayeeType())
        composeCoding(t, "ClaimResponse", "payeeType", element.getPayeeType(), -1);
    for (int i = 0; i < element.getItem().size(); i++) composeClaimResponseItemsComponent(t, "ClaimResponse", "item", element.getItem().get(i), i);
    for (int i = 0; i < element.getAddItem().size(); i++) composeClaimResponseAddedItemComponent(t, "ClaimResponse", "addItem", element.getAddItem().get(i), i);
    for (int i = 0; i < element.getError().size(); i++) composeClaimResponseErrorsComponent(t, "ClaimResponse", "error", element.getError().get(i), i);
    if (element.hasTotalCost())
        composeQuantity(t, "ClaimResponse", "totalCost", element.getTotalCost(), -1);
    if (element.hasUnallocDeductable())
        composeQuantity(t, "ClaimResponse", "unallocDeductable", element.getUnallocDeductable(), -1);
    if (element.hasTotalBenefit())
        composeQuantity(t, "ClaimResponse", "totalBenefit", element.getTotalBenefit(), -1);
    if (element.hasPaymentAdjustment())
        composeQuantity(t, "ClaimResponse", "paymentAdjustment", element.getPaymentAdjustment(), -1);
    if (element.hasPaymentAdjustmentReason())
        composeCoding(t, "ClaimResponse", "paymentAdjustmentReason", element.getPaymentAdjustmentReason(), -1);
    if (element.hasPaymentDateElement())
        composeDate(t, "ClaimResponse", "paymentDate", element.getPaymentDateElement(), -1);
    if (element.hasPaymentAmount())
        composeQuantity(t, "ClaimResponse", "paymentAmount", element.getPaymentAmount(), -1);
    if (element.hasPaymentRef())
        composeIdentifier(t, "ClaimResponse", "paymentRef", element.getPaymentRef(), -1);
    if (element.hasReserved())
        composeCoding(t, "ClaimResponse", "reserved", element.getReserved(), -1);
    if (element.hasForm())
        composeCoding(t, "ClaimResponse", "form", element.getForm(), -1);
    for (int i = 0; i < element.getNote().size(); i++) composeClaimResponseNotesComponent(t, "ClaimResponse", "note", element.getNote().get(i), i);
    for (int i = 0; i < element.getCoverage().size(); i++) composeClaimResponseCoverageComponent(t, "ClaimResponse", "coverage", element.getCoverage().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 99 with Coverage

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

the class RdfParser method composeCoverageGroupComponent.

protected void composeCoverageGroupComponent(Complex parent, String parentType, String name, Coverage.GroupComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "grouping", name, element, index);
    if (element.hasGroupElement())
        composeString(t, "Coverage", "group", element.getGroupElement(), -1);
    if (element.hasGroupDisplayElement())
        composeString(t, "Coverage", "groupDisplay", element.getGroupDisplayElement(), -1);
    if (element.hasSubGroupElement())
        composeString(t, "Coverage", "subGroup", element.getSubGroupElement(), -1);
    if (element.hasSubGroupDisplayElement())
        composeString(t, "Coverage", "subGroupDisplay", element.getSubGroupDisplayElement(), -1);
    if (element.hasPlanElement())
        composeString(t, "Coverage", "plan", element.getPlanElement(), -1);
    if (element.hasPlanDisplayElement())
        composeString(t, "Coverage", "planDisplay", element.getPlanDisplayElement(), -1);
    if (element.hasSubPlanElement())
        composeString(t, "Coverage", "subPlan", element.getSubPlanElement(), -1);
    if (element.hasSubPlanDisplayElement())
        composeString(t, "Coverage", "subPlanDisplay", element.getSubPlanDisplayElement(), -1);
    if (element.hasClass_Element())
        composeString(t, "Coverage", "class", element.getClass_Element(), -1);
    if (element.hasClassDisplayElement())
        composeString(t, "Coverage", "classDisplay", element.getClassDisplayElement(), -1);
    if (element.hasSubClassElement())
        composeString(t, "Coverage", "subClass", element.getSubClassElement(), -1);
    if (element.hasSubClassDisplayElement())
        composeString(t, "Coverage", "subClassDisplay", element.getSubClassDisplayElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 100 with Coverage

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

the class RdfParser method composeExplanationOfBenefitInsuranceComponent.

protected void composeExplanationOfBenefitInsuranceComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.InsuranceComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "insurance", name, element, index);
    if (element.hasCoverage())
        composeReference(t, "ExplanationOfBenefit", "coverage", element.getCoverage(), -1);
    for (int i = 0; i < element.getPreAuthRef().size(); i++) composeString(t, "ExplanationOfBenefit", "preAuthRef", element.getPreAuthRef().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

Test (org.junit.jupiter.api.Test)34 Coverage (org.hl7.fhir.r4.model.Coverage)31 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)17 Beneficiary (gov.cms.bfd.model.rif.Beneficiary)16 MedicareSegment (gov.cms.bfd.server.war.commons.MedicareSegment)15 Coverage (org.hl7.fhir.dstu3.model.Coverage)15 List (java.util.List)14 Reference (org.hl7.fhir.r4.model.Reference)14 Resource (org.hl7.fhir.r4.model.Resource)14 TransformerConstants (gov.cms.bfd.server.war.commons.TransformerConstants)13 Arrays (java.util.Arrays)13 Instant (java.time.Instant)12 Bundle (org.hl7.fhir.r4.model.Bundle)12 Logger (org.slf4j.Logger)12 LoggerFactory (org.slf4j.LoggerFactory)12 Date (java.util.Date)11 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)11 Constants (ca.uhn.fhir.rest.api.Constants)10 Timer (com.codahale.metrics.Timer)10 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)10