Search in sources :

Example 11 with Bundle

use of org.hl7.fhir.r4b.model.Bundle in project beneficiary-fhir-data by CMSgov.

the class R4ExplanationOfBenefitResourceProviderIT method assertEobEquals.

/**
 * Compares two ExplanationOfBenefit objects in detail while working around serialization issues
 * like comparing "0" and "0.0" or creation differences like using "Quantity" vs "SimpleQuantity"
 *
 * @param expected the expected
 * @param actual the actual
 */
private static void assertEobEquals(ExplanationOfBenefit expected, ExplanationOfBenefit actual) {
    // ID in the bundle will have `ExplanationOfBenefit/` in front, so make sure the last bit
    // matches up
    assertTrue(actual.getId().endsWith(expected.getId()));
    // Clean them out so we can do a deep compare later
    actual.setId("");
    expected.setId("");
    // If there are any contained resources, they might have lastupdate times in them too
    assertEquals(expected.getContained().size(), actual.getContained().size());
    for (int i = 0; i < expected.getContained().size(); i++) {
        Resource expectedContained = expected.getContained().get(i);
        Resource actualContained = actual.getContained().get(i);
        expectedContained.getMeta().setLastUpdated(null);
        actualContained.getMeta().setLastUpdated(null);
        // TODO: HAPI seems to be inserting the `#` in the ID of the contained element.
        // This is incorrect according to the FHIR spec:
        // https://build.fhir.org/references.html#contained
        // This works around that problem
        assertEquals("#" + expectedContained.getId(), actualContained.getId());
        expectedContained.setId("");
        actualContained.setId("");
    }
    // Dates are not easy to compare so just make sure they are there
    assertNotNull(actual.getMeta().getLastUpdated());
    // We compared all of meta that we care about so get it out of the way
    expected.getMeta().setLastUpdated(null);
    actual.getMeta().setLastUpdated(null);
    // Created is required, but can't be compared
    assertNotNull(actual.getCreated());
    expected.setCreated(null);
    actual.setCreated(null);
    // Extensions may have `valueMoney` elements
    assertEquals(expected.getExtension().size(), actual.getExtension().size());
    for (int i = 0; i < expected.getExtension().size(); i++) {
        Extension expectedEx = expected.getExtension().get(i);
        Extension actualEx = actual.getExtension().get(i);
        // We have to deal with Money objects separately
        if (expectedEx.hasValue() && expectedEx.getValue() instanceof Money) {
            assertTrue(actualEx.getValue() instanceof Money);
            assertCurrencyEquals((Money) expectedEx.getValue(), (Money) actualEx.getValue());
            // Now remove since we validated so we can compare the rest directly
            expectedEx.setValue(null);
            actualEx.setValue(null);
        }
    }
    // SupportingInfo can have `valueQuantity` that has the 0 vs 0.0 issue
    assertEquals(expected.getSupportingInfo().size(), actual.getSupportingInfo().size());
    for (int i = 0; i < expected.getSupportingInfo().size(); i++) {
        SupportingInformationComponent expectedSup = expected.getSupportingInfo().get(i);
        SupportingInformationComponent actualSup = actual.getSupportingInfo().get(i);
        // We have to deal with Money objects separately
        if (expectedSup.hasValueQuantity()) {
            assertTrue(actualSup.hasValueQuantity());
            assertEquals(expectedSup.getValueQuantity().getValue().floatValue(), actualSup.getValueQuantity().getValue().floatValue(), 0.0);
            // Now remove since we validated so we can compare the rest directly
            expectedSup.setValue(null);
            actualSup.setValue(null);
        }
    }
    // line items
    assertEquals(expected.getItem().size(), actual.getItem().size());
    for (int i = 0; i < expected.getItem().size(); i++) {
        ItemComponent expectedItem = expected.getItem().get(i);
        ItemComponent actualItem = actual.getItem().get(i);
        // Compare value directly because SimpleQuantity vs Quantity can't be compared
        assertEquals(expectedItem.getQuantity().getValue().floatValue(), actualItem.getQuantity().getValue().floatValue(), 0.0);
        expectedItem.setQuantity(null);
        actualItem.setQuantity(null);
        assertEquals(expectedItem.getAdjudication().size(), actualItem.getAdjudication().size());
        for (int j = 0; j < expectedItem.getAdjudication().size(); j++) {
            AdjudicationComponent expectedAdj = expectedItem.getAdjudication().get(j);
            AdjudicationComponent actualAdj = actualItem.getAdjudication().get(j);
            // Here is where we start getting into trouble with "0" vs "0.0", so we do this manually
            if (expectedAdj.hasAmount()) {
                assertNotNull(actualAdj.getAmount());
                assertCurrencyEquals(expectedAdj.getAmount(), actualAdj.getAmount());
            } else {
                // If expected doesn't have an amount, actual shouldn't
                assertFalse(actualAdj.hasAmount());
            }
            // We just checked manually, so null them out and check the rest of the fields
            expectedAdj.setAmount(null);
            actualAdj.setAmount(null);
        }
    }
    // Total has the same problem with values
    assertEquals(expected.getTotal().size(), actual.getTotal().size());
    for (int i = 0; i < expected.getTotal().size(); i++) {
        TotalComponent expectedTot = expected.getTotal().get(i);
        TotalComponent actualTot = actual.getTotal().get(i);
        if (expectedTot.hasAmount()) {
            assertNotNull(actualTot.getAmount());
            assertCurrencyEquals(expectedTot.getAmount(), actualTot.getAmount());
        } else {
            // If expected doesn't have an amount, actual shouldn't
            assertFalse(actualTot.hasAmount());
        }
        expectedTot.setAmount(null);
        actualTot.setAmount(null);
    }
    // Benefit Balance Financial components
    assertEquals(expected.getBenefitBalance().size(), actual.getBenefitBalance().size());
    for (int i = 0; i < expected.getBenefitBalance().size(); i++) {
        BenefitBalanceComponent expectedBen = expected.getBenefitBalance().get(i);
        BenefitBalanceComponent actualBen = actual.getBenefitBalance().get(i);
        assertEquals(expectedBen.getFinancial().size(), actualBen.getFinancial().size());
        for (int j = 0; j < expectedBen.getFinancial().size(); j++) {
            BenefitComponent expectedFinancial = expectedBen.getFinancial().get(j);
            BenefitComponent actualFinancial = actualBen.getFinancial().get(j);
            // Are we dealing with Money?
            if (expectedFinancial.hasUsedMoney()) {
                assertNotNull(actualFinancial.getUsedMoney());
                assertCurrencyEquals(expectedFinancial.getUsedMoney(), actualFinancial.getUsedMoney());
                // Clean up
                expectedFinancial.setUsed(null);
                actualFinancial.setUsed(null);
            }
        }
    }
    // As does payment
    if (expected.hasPayment()) {
        assertTrue(actual.hasPayment());
        assertCurrencyEquals(expected.getPayment().getAmount(), actual.getPayment().getAmount());
    } else {
        // If expected doesn't have an amount, actual shouldn't
        assertFalse(actual.hasPayment());
    }
    expected.getPayment().setAmount(null);
    actual.getPayment().setAmount(null);
    // Now for the grand finale, we can do an `equalsDeep` on the rest
    assertTrue(expected.equalsDeep(actual));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) Money(org.hl7.fhir.r4.model.Money) SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) ItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource) Resource(org.hl7.fhir.r4.model.Resource) BenefitBalanceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)

Example 12 with Bundle

use of org.hl7.fhir.r4b.model.Bundle in project beneficiary-fhir-data by CMSgov.

the class R4ExplanationOfBenefitResourceProviderIT method searchForSamhsaEobsWithExcludeSamhsaTrue.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.r4.providers.R4ExplanationOfBenefitResourceProvider#findByPatient} with
 * <code>excludeSAMHSA=true</code> properly filters out SAMHSA-related claims.
 *
 * @throws FHIRException (indicates test failure)
 */
@Test
public void searchForSamhsaEobsWithExcludeSamhsaTrue() throws FHIRException {
    Beneficiary beneficiary = loadSampleAWithSamhsa();
    IGenericClient fhirClient = ServerTestUtils.get().createFhirClientV2();
    Bundle searchResults = fhirClient.search().forResource(ExplanationOfBenefit.class).where(ExplanationOfBenefit.PATIENT.hasId(TransformerUtilsV2.buildPatientId(beneficiary.getBeneficiaryId()))).and(new StringClientParam(EXCLUDE_SAMHSA_PARAM).matches().value("true")).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    for (ClaimTypeV2 claimType : ClaimTypeV2.values()) {
        /*
       * SAMHSA fields are present on all claim types except for PDE so we should not
       * get any claims back in the results except for PDE.
       */
        if (claimType == ClaimTypeV2.PDE) {
            assertEquals(1, filterToClaimType(searchResults, claimType).size());
        } else {
            assertEquals(0, filterToClaimType(searchResults, claimType).size());
        }
    }
}
Also used : StringClientParam(ca.uhn.fhir.rest.gclient.StringClientParam) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) IBaseBundle(org.hl7.fhir.instance.model.api.IBaseBundle) Bundle(org.hl7.fhir.r4.model.Bundle) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Stu3EobSamhsaMatcherTest(gov.cms.bfd.server.war.stu3.providers.Stu3EobSamhsaMatcherTest) Test(org.junit.jupiter.api.Test)

Example 13 with Bundle

use of org.hl7.fhir.r4b.model.Bundle in project beneficiary-fhir-data by CMSgov.

the class R4ExplanationOfBenefitResourceProviderIT method searchForEobsByExistingPatientAndType.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.r4.providers.ExplanationOfBenefitResourceProvider#findByPatient(ca.uhn.fhir.rest.param.ReferenceParam)}
 * works as expected for a {@link Patient} that does exist in the DB, with filtering by claim
 * type.
 *
 * @throws FHIRException (indicates test failure)
 */
@Test
public void searchForEobsByExistingPatientAndType() throws FHIRException {
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    IGenericClient fhirClient = ServerTestUtils.get().createFhirClientV2();
    Beneficiary beneficiary = loadedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    Bundle searchResults = fhirClient.search().forResource(ExplanationOfBenefit.class).where(ExplanationOfBenefit.PATIENT.hasId(TransformerUtilsV2.buildPatientId(beneficiary))).where(new TokenClientParam("type").exactly().code(ClaimTypeV2.PDE.name())).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    /*
     * Verify the bundle contains a key for total and that the value matches the
     * number of entries in the bundle
     */
    assertEquals(loadedRecords.stream().filter(r -> (r instanceof PartDEvent)).filter(r -> !(r instanceof BeneficiaryHistory)).count(), searchResults.getTotal());
    PartDEvent partDEvent = loadedRecords.stream().filter(r -> r instanceof PartDEvent).map(r -> (PartDEvent) r).findFirst().get();
    // Compare result to transformed EOB
    assertEobEquals(PartDEventTransformerV2.transform(PipelineTestUtils.get().getPipelineApplicationState().getMetrics(), partDEvent, Optional.of(false)), filterToClaimType(searchResults, ClaimTypeV2.PDE).get(0));
}
Also used : Arrays(java.util.Arrays) Date(java.util.Date) Constants(ca.uhn.fhir.rest.api.Constants) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) InpatientClaim(gov.cms.bfd.model.rif.InpatientClaim) DateTimeDt(ca.uhn.fhir.model.primitive.DateTimeDt) Stu3EobSamhsaMatcherTest(gov.cms.bfd.server.war.stu3.providers.Stu3EobSamhsaMatcherTest) PartDEvent(gov.cms.bfd.model.rif.PartDEvent) SNFClaim(gov.cms.bfd.model.rif.SNFClaim) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) DateRangeParam(ca.uhn.fhir.rest.param.DateRangeParam) ItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent) BeforeAll(org.junit.jupiter.api.BeforeAll) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource) SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Triple(org.apache.commons.lang3.tuple.Triple) OutpatientClaim(gov.cms.bfd.model.rif.OutpatientClaim) IdDt(ca.uhn.fhir.model.primitive.IdDt) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) BenefitBalanceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent) Resource(org.hl7.fhir.r4.model.Resource) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) ExplanationOfBenefitResourceProvider(gov.cms.bfd.server.war.stu3.providers.ExplanationOfBenefitResourceProvider) Test(org.junit.jupiter.api.Test) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) EntityManagerFactory(javax.persistence.EntityManagerFactory) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) CarrierClaim(gov.cms.bfd.model.rif.CarrierClaim) Optional(java.util.Optional) Extension(org.hl7.fhir.r4.model.Extension) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) IBaseBundle(org.hl7.fhir.instance.model.api.IBaseBundle) Money(org.hl7.fhir.r4.model.Money) ArrayList(java.util.ArrayList) HHAClaim(gov.cms.bfd.model.rif.HHAClaim) PipelineTestUtils(gov.cms.bfd.pipeline.sharedutils.PipelineTestUtils) ImmutableList(com.google.common.collect.ImmutableList) DMEClaim(gov.cms.bfd.model.rif.DMEClaim) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) StringClientParam(ca.uhn.fhir.rest.gclient.StringClientParam) CommonHeaders(gov.cms.bfd.server.war.commons.CommonHeaders) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) HospiceClaim(gov.cms.bfd.model.rif.HospiceClaim) EntityManager(javax.persistence.EntityManager) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) AfterEach(org.junit.jupiter.api.AfterEach) ChronoUnit(java.time.temporal.ChronoUnit) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) FHIRException(org.hl7.fhir.exceptions.FHIRException) Bundle(org.hl7.fhir.r4.model.Bundle) TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) IBaseBundle(org.hl7.fhir.instance.model.api.IBaseBundle) Bundle(org.hl7.fhir.r4.model.Bundle) PartDEvent(gov.cms.bfd.model.rif.PartDEvent) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Stu3EobSamhsaMatcherTest(gov.cms.bfd.server.war.stu3.providers.Stu3EobSamhsaMatcherTest) Test(org.junit.jupiter.api.Test)

Example 14 with Bundle

use of org.hl7.fhir.r4b.model.Bundle in project beneficiary-fhir-data by CMSgov.

the class R4ExplanationOfBenefitResourceProviderIT method searchForEobsByMissingPatient.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.r4.providers.ExplanationOfBenefitResourceProvider#findByPatient(ca.uhn.fhir.rest.param.ReferenceParam)}
 * works as expected for a {@link Patient} that does not exist in the DB.
 */
@Test
public void searchForEobsByMissingPatient() {
    IGenericClient fhirClient = ServerTestUtils.get().createFhirClientV2();
    // No data is loaded, so this should return 0 matches.
    Bundle searchResults = fhirClient.search().forResource(ExplanationOfBenefit.class).where(ExplanationOfBenefit.PATIENT.hasId(new IdDt("Patient", "1234"))).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    assertEquals(0, searchResults.getTotal());
}
Also used : IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) IBaseBundle(org.hl7.fhir.instance.model.api.IBaseBundle) Bundle(org.hl7.fhir.r4.model.Bundle) IdDt(ca.uhn.fhir.model.primitive.IdDt) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) Stu3EobSamhsaMatcherTest(gov.cms.bfd.server.war.stu3.providers.Stu3EobSamhsaMatcherTest) Test(org.junit.jupiter.api.Test)

Example 15 with Bundle

use of org.hl7.fhir.r4b.model.Bundle in project beneficiary-fhir-data by CMSgov.

the class R4ExplanationOfBenefitResourceProviderIT method searchForEobsByExistingPatientWithPageSizeNotProvided.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.r4.providers.ExplanationOfBenefitResourceProvider#findByPatient} works
 * as expected for a {@link Patient} that does exist in the DB, with paging, providing the
 * startIndex but not the pageSize (count).
 *
 * @throws FHIRException (indicates test failure)
 */
@Test
public void searchForEobsByExistingPatientWithPageSizeNotProvided() throws FHIRException {
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    IGenericClient fhirClient = ServerTestUtils.get().createFhirClientV2();
    Beneficiary beneficiary = loadedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    Bundle searchResults = fhirClient.search().forResource(ExplanationOfBenefit.class).where(ExplanationOfBenefit.PATIENT.hasId(TransformerUtilsV2.buildPatientId(beneficiary))).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    /*
     * Verify that no paging links exist in the bundle.
     */
    assertNull(searchResults.getLink(Constants.LINK_NEXT));
    assertNull(searchResults.getLink(Constants.LINK_PREVIOUS));
    assertNull(searchResults.getLink(Constants.LINK_FIRST));
    assertNull(searchResults.getLink(Constants.LINK_LAST));
    /*
     * Access a created link of this bundle, providing the startIndex but not the
     * pageSize (count).
     */
    Bundle pagedResults = fhirClient.loadPage().byUrl(searchResults.getLink(Bundle.LINK_SELF).getUrl() + "&startIndex=4").andReturnBundle(Bundle.class).execute();
    assertNotNull(pagedResults);
    /*
     * Verify that paging links exist in this paged bundle.
     */
    assertNull(pagedResults.getLink(Constants.LINK_NEXT));
    assertNotNull(pagedResults.getLink(Constants.LINK_PREVIOUS));
    assertNotNull(pagedResults.getLink(Constants.LINK_FIRST));
    assertNotNull(pagedResults.getLink(Constants.LINK_LAST));
    /*
     * Add the entries in the paged results to a list and verify that only the last
     * 4 entries in the original searchResults were returned in the pagedResults.
     */
    List<IBaseResource> pagedEntries = new ArrayList<>();
    pagedResults.getEntry().forEach(e -> pagedEntries.add(e.getResource()));
    assertEquals(4, pagedEntries.size());
}
Also used : Arrays(java.util.Arrays) Date(java.util.Date) Constants(ca.uhn.fhir.rest.api.Constants) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) InpatientClaim(gov.cms.bfd.model.rif.InpatientClaim) DateTimeDt(ca.uhn.fhir.model.primitive.DateTimeDt) Stu3EobSamhsaMatcherTest(gov.cms.bfd.server.war.stu3.providers.Stu3EobSamhsaMatcherTest) PartDEvent(gov.cms.bfd.model.rif.PartDEvent) SNFClaim(gov.cms.bfd.model.rif.SNFClaim) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) DateRangeParam(ca.uhn.fhir.rest.param.DateRangeParam) ItemComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.ItemComponent) BeforeAll(org.junit.jupiter.api.BeforeAll) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource) SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Triple(org.apache.commons.lang3.tuple.Triple) OutpatientClaim(gov.cms.bfd.model.rif.OutpatientClaim) IdDt(ca.uhn.fhir.model.primitive.IdDt) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) BenefitBalanceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitBalanceComponent) Resource(org.hl7.fhir.r4.model.Resource) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) ExplanationOfBenefitResourceProvider(gov.cms.bfd.server.war.stu3.providers.ExplanationOfBenefitResourceProvider) Test(org.junit.jupiter.api.Test) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) EntityManagerFactory(javax.persistence.EntityManagerFactory) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) CarrierClaim(gov.cms.bfd.model.rif.CarrierClaim) Optional(java.util.Optional) Extension(org.hl7.fhir.r4.model.Extension) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) IBaseBundle(org.hl7.fhir.instance.model.api.IBaseBundle) Money(org.hl7.fhir.r4.model.Money) ArrayList(java.util.ArrayList) HHAClaim(gov.cms.bfd.model.rif.HHAClaim) PipelineTestUtils(gov.cms.bfd.pipeline.sharedutils.PipelineTestUtils) ImmutableList(com.google.common.collect.ImmutableList) DMEClaim(gov.cms.bfd.model.rif.DMEClaim) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) StringClientParam(ca.uhn.fhir.rest.gclient.StringClientParam) CommonHeaders(gov.cms.bfd.server.war.commons.CommonHeaders) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) HospiceClaim(gov.cms.bfd.model.rif.HospiceClaim) EntityManager(javax.persistence.EntityManager) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) AfterEach(org.junit.jupiter.api.AfterEach) ChronoUnit(java.time.temporal.ChronoUnit) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) FHIRException(org.hl7.fhir.exceptions.FHIRException) Bundle(org.hl7.fhir.r4.model.Bundle) TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) IBaseBundle(org.hl7.fhir.instance.model.api.IBaseBundle) Bundle(org.hl7.fhir.r4.model.Bundle) ArrayList(java.util.ArrayList) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) IBaseResource(org.hl7.fhir.instance.model.api.IBaseResource) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Stu3EobSamhsaMatcherTest(gov.cms.bfd.server.war.stu3.providers.Stu3EobSamhsaMatcherTest) Test(org.junit.jupiter.api.Test)

Aggregations

Bundle (org.hl7.fhir.r4.model.Bundle)603 Bundle (org.hl7.fhir.dstu3.model.Bundle)357 Test (org.junit.Test)343 Test (org.junit.jupiter.api.Test)316 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)306 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)192 IBaseBundle (org.hl7.fhir.instance.model.api.IBaseBundle)167 Date (java.util.Date)159 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)151 ArrayList (java.util.ArrayList)147 List (java.util.List)143 Resource (org.hl7.fhir.r4.model.Resource)128 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)116 HashMap (java.util.HashMap)113 Collectors (java.util.stream.Collectors)108 ResourceNotFoundException (ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException)106 Patient (org.hl7.fhir.r4.model.Patient)93 Beneficiary (gov.cms.bfd.model.rif.Beneficiary)85 Observation (org.hl7.fhir.r4.model.Observation)79 IOException (java.io.IOException)77