Search in sources :

Example 76 with Coverage

use of org.hl7.fhir.r4.model.Coverage in project beneficiary-fhir-data by CMSgov.

the class BeneficiaryTransformerTest method transformBeneficiaryWithIncludeAddressFieldsAllOptEmpty.

/**
 * Notes for reviewer: for header related coverage, do not test on the combination of headers
 * values if there is no correlation between the headers, hence removed includeAddressFields
 * header tests out of includeIdentifiers header tests to speed up tests and keep the same level
 * of coverage at the same time.
 */
/**
 * Verifies that {@link gov.cms.bfd.server.war.stu3.providers.BeneficiaryTransformer} works
 * correctly when passed a {@link Beneficiary} where all {@link Optional} fields are set to {@link
 * Optional#empty()} and includeAddressFields header take all possible values.
 */
@Test
public void transformBeneficiaryWithIncludeAddressFieldsAllOptEmpty() {
    List<Object> parsedRecords = ServerTestUtils.parseData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    Beneficiary beneficiary = parsedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    TransformerTestUtils.setAllOptionalsToEmpty(beneficiary);
    RequestHeaders requestHeader = getRHwithIncldAddrFldHdr("true");
    Patient patient = BeneficiaryTransformer.transform(new MetricRegistry(), beneficiary, requestHeader);
    assertMatches(beneficiary, patient, requestHeader);
    requestHeader = getRHwithIncldAddrFldHdr("false");
    patient = BeneficiaryTransformer.transform(new MetricRegistry(), beneficiary, requestHeader);
    assertMatches(beneficiary, patient, requestHeader);
    requestHeader = getRHwithIncldAddrFldHdr("");
    patient = BeneficiaryTransformer.transform(new MetricRegistry(), beneficiary, requestHeader);
    assertMatches(beneficiary, patient, requestHeader);
    requestHeader = RequestHeaders.getHeaderWrapper();
    patient = BeneficiaryTransformer.transform(new MetricRegistry(), beneficiary, requestHeader);
    assertMatches(beneficiary, patient, requestHeader);
}
Also used : SkippedRifRecord(gov.cms.bfd.model.rif.SkippedRifRecord) Arrays(java.util.Arrays) StaticRifResource(gov.cms.bfd.model.rif.samples.StaticRifResource) Identifier(org.hl7.fhir.dstu3.model.Identifier) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) Sex(gov.cms.bfd.server.war.commons.Sex) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) MetricRegistry(com.codahale.metrics.MetricRegistry) Set(java.util.Set) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) AdministrativeGender(org.hl7.fhir.dstu3.model.Enumerations.AdministrativeGender) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) Patient(org.hl7.fhir.dstu3.model.Patient) Optional(java.util.Optional) MetricRegistry(com.codahale.metrics.MetricRegistry) Patient(org.hl7.fhir.dstu3.model.Patient) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Test(org.junit.jupiter.api.Test)

Example 77 with Coverage

use of org.hl7.fhir.r4.model.Coverage in project beneficiary-fhir-data by CMSgov.

the class SNFClaimTransformerV2Test method shouldReferenceCoverageInInsurance.

/**
 * Insurance
 */
@Test
public void shouldReferenceCoverageInInsurance() {
    // Only one insurance object
    assertEquals(1, eob.getInsurance().size());
    InsuranceComponent insurance = eob.getInsuranceFirstRep();
    InsuranceComponent compare = new InsuranceComponent().setCoverage(new Reference().setReference("Coverage/part-a-567834"));
    assertTrue(compare.equalsDeep(insurance));
}
Also used : Reference(org.hl7.fhir.r4.model.Reference) InsuranceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.InsuranceComponent) Test(org.junit.jupiter.api.Test)

Example 78 with Coverage

use of org.hl7.fhir.r4.model.Coverage in project beneficiary-fhir-data by CMSgov.

the class TransformerUtilsV2 method mapEobCommonClaimHeaderData.

/**
 * Transforms the common group level header fields between all claim types
 *
 * @param eob the {@link ExplanationOfBenefit} to modify
 * @param claimId CLM_ID
 * @param beneficiaryId BENE_ID
 * @param claimType {@link ClaimTypeV2} to process
 * @param claimGroupId CLM_GRP_ID
 * @param coverageType {@link MedicareSegment}
 * @param dateFrom CLM_FROM_DT || SRVC_DT (For Part D Events)
 * @param dateThrough CLM_THRU_DT || SRVC_DT (For Part D Events)
 * @param paymentAmount CLM_PMT_AMT
 * @param finalAction FINAL_ACTION
 */
static void mapEobCommonClaimHeaderData(ExplanationOfBenefit eob, String claimId, String beneficiaryId, ClaimTypeV2 claimType, String claimGroupId, MedicareSegment coverageType, Optional<LocalDate> dateFrom, Optional<LocalDate> dateThrough, Optional<BigDecimal> paymentAmount, char finalAction) {
    // Claim Type + Claim ID => ExplanationOfBenefit.id
    eob.setId(buildEobId(claimType, claimId));
    // Current timestamp => Created
    eob.setCreated(new Date());
    // "claim" => ExplanationOfBenefit.use
    eob.setUse(Use.CLAIM);
    if (claimType.equals(ClaimTypeV2.PDE)) {
        // PDE_ID => ExplanationOfBenefit.identifier
        eob.addIdentifier(createClaimIdentifier(CcwCodebookVariable.PDE_ID, claimId));
    } else {
        // CLM_ID => ExplanationOfBenefit.identifier
        eob.addIdentifier(createClaimIdentifier(CcwCodebookVariable.CLM_ID, claimId));
    }
    // CLM_GRP_ID => ExplanationOfBenefit.identifier
    eob.addIdentifier().setSystem(TransformerConstants.IDENTIFIER_SYSTEM_BBAPI_CLAIM_GROUP_ID).setValue(claimGroupId).setType(createC4BBClaimCodeableConcept());
    // BENE_ID + Coverage Type => ExplanationOfBenefit.insurance.coverage (ref)
    eob.addInsurance().setCoverage(referenceCoverage(beneficiaryId, coverageType));
    // BENE_ID => ExplanationOfBenefit.patient (reference)
    eob.setPatient(referencePatient(beneficiaryId));
    // "insurer" => ExplanationOfBenefit.insurer
    eob.setInsurer(new Reference().setIdentifier(new Identifier().setValue("CMS")));
    // "outcome" => ExplanationOfBenefit.outcome
    eob.setOutcome(RemittanceOutcome.COMPLETE);
    // FINAL_ACTION => ExplanationOfBenefit.status
    switch(finalAction) {
        case 'F':
            eob.setStatus(ExplanationOfBenefitStatus.ACTIVE);
            break;
        case 'N':
            eob.setStatus(ExplanationOfBenefitStatus.CANCELLED);
            break;
        default:
            // unknown final action value
            throw new BadCodeMonkeyException();
    }
    // CLM_THRU_DT || SRVC_DT (For Part D Events) => ExplanationOfBenefit.billablePeriod.end
    if (dateFrom.isPresent()) {
        validatePeriodDates(dateFrom, dateThrough);
        setPeriodStart(eob.getBillablePeriod(), dateFrom.get());
        setPeriodEnd(eob.getBillablePeriod(), dateThrough.get());
    }
    // CLM_PMT_AMT => ExplanationOfBenefit.payment.amount
    if (paymentAmount.isPresent()) {
        eob.getPayment().setAmount(createMoney(paymentAmount));
    }
}
Also used : Identifier(org.hl7.fhir.r4.model.Identifier) CurrencyIdentifier(gov.cms.bfd.server.war.r4.providers.BeneficiaryTransformerV2.CurrencyIdentifier) BadCodeMonkeyException(gov.cms.bfd.sharedutils.exceptions.BadCodeMonkeyException) Reference(org.hl7.fhir.r4.model.Reference) Date(java.util.Date) LocalDate(java.time.LocalDate)

Example 79 with Coverage

use of org.hl7.fhir.r4.model.Coverage in project beneficiary-fhir-data by CMSgov.

the class TransformerUtilsV2 method createBundle.

/**
 * Create a bundle from the entire search result
 *
 * @param paging contains the {@link OffsetLinkBuilder} information
 * @param resources a list of {@link ExplanationOfBenefit}s, {@link Coverage}s, or {@link
 *     Patient}s, of which a portion or all will be added to the bundle based on the paging values
 * @param transactionTime date for the bundle
 * @return Returns a {@link Bundle} of either {@link ExplanationOfBenefit}s, {@link Coverage}s, or
 *     {@link Patient}s, which may contain multiple matching resources, or may also be empty.
 */
public static Bundle createBundle(OffsetLinkBuilder paging, List<IBaseResource> resources, Instant transactionTime) {
    Bundle bundle = new Bundle();
    if (paging.isPagingRequested()) {
        /*
       * FIXME: Due to a bug in HAPI-FHIR described here
       * https://github.com/jamesagnew/hapi-fhir/issues/1074 paging for count=0 is not working
       * correctly.
       */
        int endIndex = Math.min(paging.getStartIndex() + paging.getPageSize(), resources.size());
        List<IBaseResource> resourcesSubList = resources.subList(paging.getStartIndex(), endIndex);
        bundle = TransformerUtilsV2.addResourcesToBundle(bundle, resourcesSubList);
        paging.setTotal(resources.size()).addLinks(bundle);
    } else {
        bundle = TransformerUtilsV2.addResourcesToBundle(bundle, resources);
    }
    /*
     * Dev Note: the Bundle's lastUpdated timestamp is the known last update time for the whole
     * database. Because the filterManager's tracking of this timestamp is lazily updated for
     * performance reason, the resources of the bundle may be after the filter manager's version of
     * the timestamp.
     */
    Instant maxBundleDate = resources.stream().map(r -> r.getMeta().getLastUpdated().toInstant()).filter(Objects::nonNull).max(Instant::compareTo).orElse(transactionTime);
    bundle.getMeta().setLastUpdated(transactionTime.isAfter(maxBundleDate) ? Date.from(transactionTime) : Date.from(maxBundleDate));
    bundle.setTotal(resources.size());
    return bundle;
}
Also used : Arrays(java.util.Arrays) CcwCodebookInterface(gov.cms.bfd.model.codebook.model.CcwCodebookInterface) SimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity) Constants(ca.uhn.fhir.rest.api.Constants) Identifier(org.hl7.fhir.r4.model.Identifier) Reference(org.hl7.fhir.r4.model.Reference) StringUtils(org.apache.commons.lang3.StringUtils) BigDecimal(java.math.BigDecimal) ItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource) SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Map(java.util.Map) CcwCodebookMissingVariable(gov.cms.bfd.model.codebook.data.CcwCodebookMissingVariable) TemporalPrecisionEnum(ca.uhn.fhir.model.api.TemporalPrecisionEnum) Value(gov.cms.bfd.model.codebook.model.Value) Coverage(org.hl7.fhir.r4.model.Coverage) IdDt(ca.uhn.fhir.model.primitive.IdDt) ReflectionUtils(gov.cms.bfd.server.war.commons.ReflectionUtils) MedicareSegment(gov.cms.bfd.server.war.commons.MedicareSegment) BenefitBalanceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent) Period(org.hl7.fhir.r4.model.Period) Set(java.util.Set) StandardCharsets(java.nio.charset.StandardCharsets) ZoneId(java.time.ZoneId) UncheckedIOException(java.io.UncheckedIOException) Coding(org.hl7.fhir.r4.model.Coding) CarrierClaim(gov.cms.bfd.model.rif.CarrierClaim) RaceCategory(gov.cms.bfd.server.war.commons.RaceCategory) ExplanationOfBenefitStatus(org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus) Use(org.hl7.fhir.r4.model.ExplanationOfBenefit.Use) C4BBClaimIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBClaimIdentifierType) IAnyResource(org.hl7.fhir.instance.model.api.IAnyResource) Money(org.hl7.fhir.r4.model.Money) Strings(com.google.common.base.Strings) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) RequestDetails(ca.uhn.fhir.rest.api.server.RequestDetails) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) UnsignedIntType(org.hl7.fhir.r4.model.UnsignedIntType) CCWProcedure(gov.cms.bfd.server.war.commons.CCWProcedure) Quantity(org.hl7.fhir.r4.model.Quantity) CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) OffsetLinkBuilder(gov.cms.bfd.server.war.commons.OffsetLinkBuilder) LinkBuilder(gov.cms.bfd.server.war.commons.LinkBuilder) BadCodeMonkeyException(gov.cms.bfd.sharedutils.exceptions.BadCodeMonkeyException) IOException(java.io.IOException) C4BBClaimProfessionalAndNonClinicianCareTeamRole(gov.cms.bfd.server.war.commons.carin.C4BBClaimProfessionalAndNonClinicianCareTeamRole) InputStreamReader(java.io.InputStreamReader) FDADrugDataUtilityApp(gov.cms.bfd.server.war.FDADrugDataUtilityApp) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) MDC(org.slf4j.MDC) Bundle(org.hl7.fhir.r4.model.Bundle) BufferedReader(java.io.BufferedReader) TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) ProcedureComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent) BundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent) C4BBAdjudicationDiscriminator(gov.cms.bfd.server.war.commons.carin.C4BBAdjudicationDiscriminator) Patient(org.hl7.fhir.r4.model.Patient) DateType(org.hl7.fhir.r4.model.DateType) Collection(java.util.Collection) Resource(org.hl7.fhir.r4.model.Resource) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) C4BBOrganizationIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBOrganizationIdentifierType) LocalDate(java.time.LocalDate) Optional(java.util.Optional) Extension(org.hl7.fhir.r4.model.Extension) PositiveIntType(org.hl7.fhir.r4.model.PositiveIntType) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ClaimCareteamrole(org.hl7.fhir.r4.model.codesystems.ClaimCareteamrole) DataFormatException(ca.uhn.fhir.parser.DataFormatException) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) ProfileConstants(gov.cms.bfd.server.war.commons.ProfileConstants) HashMap(java.util.HashMap) ExBenefitcategory(org.hl7.fhir.r4.model.codesystems.ExBenefitcategory) HashSet(java.util.HashSet) C4BBClaimPharmacyTeamRole(gov.cms.bfd.server.war.commons.carin.C4BBClaimPharmacyTeamRole) C4BBIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBIdentifierType) Address(org.hl7.fhir.r4.model.Address) InvalidRifValueException(gov.cms.bfd.model.rif.parse.InvalidRifValueException) NoSuchElementException(java.util.NoSuchElementException) Nonnull(javax.annotation.Nonnull) C4BBAdjudication(gov.cms.bfd.server.war.commons.carin.C4BBAdjudication) Observation(org.hl7.fhir.r4.model.Observation) ObservationStatus(org.hl7.fhir.r4.model.Observation.ObservationStatus) C4BBPractitionerIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBPractitionerIdentifierType) C4BBSupportingInfoType(gov.cms.bfd.server.war.commons.carin.C4BBSupportingInfoType) Logger(org.slf4j.Logger) C4BBClaimInstitutionalCareTeamRole(gov.cms.bfd.server.war.commons.carin.C4BBClaimInstitutionalCareTeamRole) Organization(org.hl7.fhir.r4.model.Organization) ResourceType(org.hl7.fhir.r4.model.ResourceType) CurrencyIdentifier(gov.cms.bfd.server.war.r4.providers.BeneficiaryTransformerV2.CurrencyIdentifier) URLEncoder(java.net.URLEncoder) RemittanceOutcome(org.hl7.fhir.r4.model.ExplanationOfBenefit.RemittanceOutcome) InputStream(java.io.InputStream) Assert(org.springframework.util.Assert) Bundle(org.hl7.fhir.r4.model.Bundle) Instant(java.time.Instant) Objects(java.util.Objects) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource)

Example 80 with Coverage

use of org.hl7.fhir.r4.model.Coverage in project beneficiary-fhir-data by CMSgov.

the class TransformerUtilsV2 method createBundle.

/**
 * Create a bundle from the entire search result
 *
 * @param resources a list of {@link ExplanationOfBenefit}s, {@link Coverage}s, or {@link
 *     Patient}s, all of which will be added to the bundle
 * @param paging contains the {@link LinkBuilder} information to add to the bundle
 * @param transactionTime date for the bundle
 * @return Returns a {@link Bundle} of either {@link ExplanationOfBenefit}s, {@link Coverage}s, or
 *     {@link Patient}s, which may contain multiple matching resources, or may also be empty.
 */
public static Bundle createBundle(List<IBaseResource> resources, LinkBuilder paging, Instant transactionTime) {
    Bundle bundle = new Bundle();
    TransformerUtilsV2.addResourcesToBundle(bundle, resources);
    paging.addLinks(bundle);
    bundle.setTotalElement(paging.isPagingRequested() ? new UnsignedIntType() : new UnsignedIntType(resources.size()));
    /*
     * Dev Note: the Bundle's lastUpdated timestamp is the known last update time for the whole
     * database. Because the filterManager's tracking of this timestamp is lazily updated for
     * performance reason, the resources of the bundle may be after the filter manager's version of
     * the timestamp.
     */
    Instant maxBundleDate = resources.stream().map(r -> r.getMeta().getLastUpdated().toInstant()).filter(Objects::nonNull).max(Instant::compareTo).orElse(transactionTime);
    bundle.getMeta().setLastUpdated(transactionTime.isAfter(maxBundleDate) ? Date.from(transactionTime) : Date.from(maxBundleDate));
    return bundle;
}
Also used : Arrays(java.util.Arrays) CcwCodebookInterface(gov.cms.bfd.model.codebook.model.CcwCodebookInterface) SimpleQuantity(org.hl7.fhir.r4.model.SimpleQuantity) Constants(ca.uhn.fhir.rest.api.Constants) Identifier(org.hl7.fhir.r4.model.Identifier) Reference(org.hl7.fhir.r4.model.Reference) StringUtils(org.apache.commons.lang3.StringUtils) BigDecimal(java.math.BigDecimal) ItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource) SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Map(java.util.Map) CcwCodebookMissingVariable(gov.cms.bfd.model.codebook.data.CcwCodebookMissingVariable) TemporalPrecisionEnum(ca.uhn.fhir.model.api.TemporalPrecisionEnum) Value(gov.cms.bfd.model.codebook.model.Value) Coverage(org.hl7.fhir.r4.model.Coverage) IdDt(ca.uhn.fhir.model.primitive.IdDt) ReflectionUtils(gov.cms.bfd.server.war.commons.ReflectionUtils) MedicareSegment(gov.cms.bfd.server.war.commons.MedicareSegment) BenefitBalanceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent) Period(org.hl7.fhir.r4.model.Period) Set(java.util.Set) StandardCharsets(java.nio.charset.StandardCharsets) ZoneId(java.time.ZoneId) UncheckedIOException(java.io.UncheckedIOException) Coding(org.hl7.fhir.r4.model.Coding) CarrierClaim(gov.cms.bfd.model.rif.CarrierClaim) RaceCategory(gov.cms.bfd.server.war.commons.RaceCategory) ExplanationOfBenefitStatus(org.hl7.fhir.r4.model.ExplanationOfBenefit.ExplanationOfBenefitStatus) Use(org.hl7.fhir.r4.model.ExplanationOfBenefit.Use) C4BBClaimIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBClaimIdentifierType) IAnyResource(org.hl7.fhir.instance.model.api.IAnyResource) Money(org.hl7.fhir.r4.model.Money) Strings(com.google.common.base.Strings) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) RequestDetails(ca.uhn.fhir.rest.api.server.RequestDetails) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) UnsignedIntType(org.hl7.fhir.r4.model.UnsignedIntType) CCWProcedure(gov.cms.bfd.server.war.commons.CCWProcedure) Quantity(org.hl7.fhir.r4.model.Quantity) CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) OffsetLinkBuilder(gov.cms.bfd.server.war.commons.OffsetLinkBuilder) LinkBuilder(gov.cms.bfd.server.war.commons.LinkBuilder) BadCodeMonkeyException(gov.cms.bfd.sharedutils.exceptions.BadCodeMonkeyException) IOException(java.io.IOException) C4BBClaimProfessionalAndNonClinicianCareTeamRole(gov.cms.bfd.server.war.commons.carin.C4BBClaimProfessionalAndNonClinicianCareTeamRole) InputStreamReader(java.io.InputStreamReader) FDADrugDataUtilityApp(gov.cms.bfd.server.war.FDADrugDataUtilityApp) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) MDC(org.slf4j.MDC) Bundle(org.hl7.fhir.r4.model.Bundle) BufferedReader(java.io.BufferedReader) TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) ProcedureComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ProcedureComponent) BundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent) C4BBAdjudicationDiscriminator(gov.cms.bfd.server.war.commons.carin.C4BBAdjudicationDiscriminator) Patient(org.hl7.fhir.r4.model.Patient) DateType(org.hl7.fhir.r4.model.DateType) Collection(java.util.Collection) Resource(org.hl7.fhir.r4.model.Resource) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) C4BBOrganizationIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBOrganizationIdentifierType) LocalDate(java.time.LocalDate) Optional(java.util.Optional) Extension(org.hl7.fhir.r4.model.Extension) PositiveIntType(org.hl7.fhir.r4.model.PositiveIntType) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ClaimCareteamrole(org.hl7.fhir.r4.model.codesystems.ClaimCareteamrole) DataFormatException(ca.uhn.fhir.parser.DataFormatException) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) ProfileConstants(gov.cms.bfd.server.war.commons.ProfileConstants) HashMap(java.util.HashMap) ExBenefitcategory(org.hl7.fhir.r4.model.codesystems.ExBenefitcategory) HashSet(java.util.HashSet) C4BBClaimPharmacyTeamRole(gov.cms.bfd.server.war.commons.carin.C4BBClaimPharmacyTeamRole) C4BBIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBIdentifierType) Address(org.hl7.fhir.r4.model.Address) InvalidRifValueException(gov.cms.bfd.model.rif.parse.InvalidRifValueException) NoSuchElementException(java.util.NoSuchElementException) Nonnull(javax.annotation.Nonnull) C4BBAdjudication(gov.cms.bfd.server.war.commons.carin.C4BBAdjudication) Observation(org.hl7.fhir.r4.model.Observation) ObservationStatus(org.hl7.fhir.r4.model.Observation.ObservationStatus) C4BBPractitionerIdentifierType(gov.cms.bfd.server.war.commons.carin.C4BBPractitionerIdentifierType) C4BBSupportingInfoType(gov.cms.bfd.server.war.commons.carin.C4BBSupportingInfoType) Logger(org.slf4j.Logger) C4BBClaimInstitutionalCareTeamRole(gov.cms.bfd.server.war.commons.carin.C4BBClaimInstitutionalCareTeamRole) Organization(org.hl7.fhir.r4.model.Organization) ResourceType(org.hl7.fhir.r4.model.ResourceType) CurrencyIdentifier(gov.cms.bfd.server.war.r4.providers.BeneficiaryTransformerV2.CurrencyIdentifier) URLEncoder(java.net.URLEncoder) RemittanceOutcome(org.hl7.fhir.r4.model.ExplanationOfBenefit.RemittanceOutcome) InputStream(java.io.InputStream) Assert(org.springframework.util.Assert) Bundle(org.hl7.fhir.r4.model.Bundle) Instant(java.time.Instant) Objects(java.util.Objects) UnsignedIntType(org.hl7.fhir.r4.model.UnsignedIntType)

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