Search in sources :

Example 46 with Coverage

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

the class RdfParser method composeEnrollmentRequest.

protected void composeEnrollmentRequest(Complex parent, String parentType, String name, EnrollmentRequest element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "EnrollmentRequest", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "EnrollmentRequest", "identifier", element.getIdentifier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "EnrollmentRequest", "status", element.getStatusElement(), -1);
    if (element.hasCreatedElement())
        composeDateTime(t, "EnrollmentRequest", "created", element.getCreatedElement(), -1);
    if (element.hasInsurer())
        composeReference(t, "EnrollmentRequest", "insurer", element.getInsurer(), -1);
    if (element.hasProvider())
        composeReference(t, "EnrollmentRequest", "provider", element.getProvider(), -1);
    if (element.hasOrganization())
        composeReference(t, "EnrollmentRequest", "organization", element.getOrganization(), -1);
    if (element.hasSubject())
        composeReference(t, "EnrollmentRequest", "subject", element.getSubject(), -1);
    if (element.hasCoverage())
        composeReference(t, "EnrollmentRequest", "coverage", element.getCoverage(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 47 with Coverage

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

the class RdfParser method composeEligibilityRequest.

protected void composeEligibilityRequest(Complex parent, String parentType, String name, EligibilityRequest element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "EligibilityRequest", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "EligibilityRequest", "identifier", element.getIdentifier().get(i), i);
    if (element.hasRuleset())
        composeCoding(t, "EligibilityRequest", "ruleset", element.getRuleset(), -1);
    if (element.hasOriginalRuleset())
        composeCoding(t, "EligibilityRequest", "originalRuleset", element.getOriginalRuleset(), -1);
    if (element.hasCreatedElement())
        composeDateTime(t, "EligibilityRequest", "created", element.getCreatedElement(), -1);
    if (element.hasTarget())
        composeType(t, "EligibilityRequest", "target", element.getTarget(), -1);
    if (element.hasProvider())
        composeType(t, "EligibilityRequest", "provider", element.getProvider(), -1);
    if (element.hasOrganization())
        composeType(t, "EligibilityRequest", "organization", element.getOrganization(), -1);
    if (element.hasPriority())
        composeCoding(t, "EligibilityRequest", "priority", element.getPriority(), -1);
    if (element.hasEnterer())
        composeType(t, "EligibilityRequest", "enterer", element.getEnterer(), -1);
    if (element.hasFacility())
        composeType(t, "EligibilityRequest", "facility", element.getFacility(), -1);
    if (element.hasPatient())
        composeType(t, "EligibilityRequest", "patient", element.getPatient(), -1);
    if (element.hasCoverage())
        composeType(t, "EligibilityRequest", "coverage", element.getCoverage(), -1);
    if (element.hasBusinessArrangementElement())
        composeString(t, "EligibilityRequest", "businessArrangement", element.getBusinessArrangementElement(), -1);
    if (element.hasServiced())
        composeType(t, "EligibilityRequest", "serviced", element.getServiced(), -1);
    if (element.hasBenefitCategory())
        composeCoding(t, "EligibilityRequest", "benefitCategory", element.getBenefitCategory(), -1);
    if (element.hasBenefitSubCategory())
        composeCoding(t, "EligibilityRequest", "benefitSubCategory", element.getBenefitSubCategory(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 48 with Coverage

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

the class RdfParser method composeClaimCoverageComponent.

protected void composeClaimCoverageComponent(Complex parent, String parentType, String name, Claim.CoverageComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "coverage", name, element, index);
    if (element.hasSequenceElement())
        composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1);
    if (element.hasFocalElement())
        composeBoolean(t, "Claim", "focal", element.getFocalElement(), -1);
    if (element.hasCoverage())
        composeType(t, "Claim", "coverage", element.getCoverage(), -1);
    if (element.hasBusinessArrangementElement())
        composeString(t, "Claim", "businessArrangement", element.getBusinessArrangementElement(), -1);
    for (int i = 0; i < element.getPreAuthRef().size(); i++) composeString(t, "Claim", "preAuthRef", element.getPreAuthRef().get(i), i);
    if (element.hasClaimResponse())
        composeReference(t, "Claim", "claimResponse", element.getClaimResponse(), -1);
    if (element.hasOriginalRuleset())
        composeCoding(t, "Claim", "originalRuleset", element.getOriginalRuleset(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 49 with Coverage

use of org.hl7.fhir.r4.model.Coverage 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);
    for (int i = 0; i < element.getSubject().size(); i++) composeReference(t, "Account", "subject", element.getSubject().get(i), i);
    if (element.hasServicePeriod())
        composePeriod(t, "Account", "servicePeriod", element.getServicePeriod(), -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);
    if (element.hasPartOf())
        composeReference(t, "Account", "partOf", element.getPartOf(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 50 with Coverage

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

the class RdfParser method composeClaimResponseInsuranceComponent.

protected void composeClaimResponseInsuranceComponent(Complex parent, String parentType, String name, ClaimResponse.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.hasSequenceElement())
        composePositiveInt(t, "ClaimResponse", "sequence", element.getSequenceElement(), -1);
    if (element.hasFocalElement())
        composeBoolean(t, "ClaimResponse", "focal", element.getFocalElement(), -1);
    if (element.hasCoverage())
        composeReference(t, "ClaimResponse", "coverage", element.getCoverage(), -1);
    if (element.hasBusinessArrangementElement())
        composeString(t, "ClaimResponse", "businessArrangement", element.getBusinessArrangementElement(), -1);
    if (element.hasClaimResponse())
        composeReference(t, "ClaimResponse", "claimResponse", element.getClaimResponse(), -1);
}
Also used : Complex(org.hl7.fhir.r4.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