Search in sources :

Example 31 with Patient

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

the class PatientResourceProviderIT method searchForExistingPatientByLogicalId.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.stu3.providers.PatientResourceProvider#searchByLogicalId(ca.uhn.fhir.rest.param.TokenParam)}
 * works as expected for a {@link Patient} that does exist in the DB.
 */
@Test
public void searchForExistingPatientByLogicalId() {
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    IGenericClient fhirClient = createFhirClient();
    Beneficiary beneficiary = loadedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    Bundle searchResults = fhirClient.search().forResource(Patient.class).where(Patient.RES_ID.exactly().systemAndIdentifier(null, beneficiary.getBeneficiaryId())).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    /*
     * Verify that no paging links exist within the bundle.
     */
    assertNull(searchResults.getLink(Constants.LINK_FIRST));
    assertNull(searchResults.getLink(Constants.LINK_NEXT));
    assertNull(searchResults.getLink(Constants.LINK_PREVIOUS));
    assertNull(searchResults.getLink(Constants.LINK_LAST));
    assertEquals(1, searchResults.getTotal());
    Patient patientFromSearchResult = (Patient) searchResults.getEntry().get(0).getResource();
    BeneficiaryTransformerTest.assertMatches(beneficiary, patientFromSearchResult, getRHwithIncldAddrFldHdr("false"));
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) Bundle(org.hl7.fhir.dstu3.model.Bundle) StaticRifResource(gov.cms.bfd.model.rif.samples.StaticRifResource) Date(java.util.Date) Identifier(org.hl7.fhir.dstu3.model.Identifier) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Constants(ca.uhn.fhir.rest.api.Constants) DateTimeDt(ca.uhn.fhir.model.primitive.DateTimeDt) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) PipelineTestUtils(gov.cms.bfd.pipeline.sharedutils.PipelineTestUtils) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) CriteriaUpdate(javax.persistence.criteria.CriteriaUpdate) BeforeAll(org.junit.jupiter.api.BeforeAll) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) CommonHeaders(gov.cms.bfd.server.war.commons.CommonHeaders) Root(javax.persistence.criteria.Root) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) Iterator(java.util.Iterator) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) BeneficiaryMonthly_(gov.cms.bfd.model.rif.BeneficiaryMonthly_) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) BeneficiaryMonthly(gov.cms.bfd.model.rif.BeneficiaryMonthly) Test(org.junit.jupiter.api.Test) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) Stream(java.util.stream.Stream) Year(java.time.Year) Patient(org.hl7.fhir.dstu3.model.Patient) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LocalDate(java.time.LocalDate) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Bundle(org.hl7.fhir.dstu3.model.Bundle) Patient(org.hl7.fhir.dstu3.model.Patient) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Test(org.junit.jupiter.api.Test)

Example 32 with Patient

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

the class PatientResourceProviderIT method searchForExistingPatientByMbiHashIncludeIdentifiersFalse.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.stu3.providers.PatientResourceProvider#searchByIdentifier(ca.uhn.fhir.rest.param.TokenParam)}
 * works as expected for a {@link Patient} that does exist in the DB, including identifiers to
 * return the unhashed HICN and MBI.
 */
@Test
public void searchForExistingPatientByMbiHashIncludeIdentifiersFalse() {
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    IGenericClient fhirClient = createFhirClient("false", "true");
    Beneficiary beneficiary = loadedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    Bundle searchResults = fhirClient.search().forResource(Patient.class).where(Patient.IDENTIFIER.exactly().systemAndIdentifier(TransformerConstants.CODING_BBAPI_BENE_MBI_HASH, beneficiary.getMbiHash().get())).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    Patient patientFromSearchResult = (Patient) searchResults.getEntry().get(0).getResource();
    /*
     * Ensure the unhashed values for HICN and MBI are *not* present.
     */
    Boolean hicnUnhashedPresent = false;
    Boolean mbiUnhashedPresent = false;
    Iterator<Identifier> identifiers = patientFromSearchResult.getIdentifier().iterator();
    while (identifiers.hasNext()) {
        Identifier identifier = identifiers.next();
        if (identifier.getSystem().equals(TransformerConstants.CODING_BBAPI_BENE_HICN_UNHASHED))
            hicnUnhashedPresent = true;
        if (identifier.getSystem().equals(TransformerConstants.CODING_BBAPI_MEDICARE_BENEFICIARY_ID_UNHASHED))
            mbiUnhashedPresent = true;
    }
    assertFalse(hicnUnhashedPresent);
    assertFalse(mbiUnhashedPresent);
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) Bundle(org.hl7.fhir.dstu3.model.Bundle) StaticRifResource(gov.cms.bfd.model.rif.samples.StaticRifResource) Date(java.util.Date) Identifier(org.hl7.fhir.dstu3.model.Identifier) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Constants(ca.uhn.fhir.rest.api.Constants) DateTimeDt(ca.uhn.fhir.model.primitive.DateTimeDt) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) PipelineTestUtils(gov.cms.bfd.pipeline.sharedutils.PipelineTestUtils) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) CriteriaUpdate(javax.persistence.criteria.CriteriaUpdate) BeforeAll(org.junit.jupiter.api.BeforeAll) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) CommonHeaders(gov.cms.bfd.server.war.commons.CommonHeaders) Root(javax.persistence.criteria.Root) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) Iterator(java.util.Iterator) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) BeneficiaryMonthly_(gov.cms.bfd.model.rif.BeneficiaryMonthly_) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) BeneficiaryMonthly(gov.cms.bfd.model.rif.BeneficiaryMonthly) Test(org.junit.jupiter.api.Test) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) Stream(java.util.stream.Stream) Year(java.time.Year) Patient(org.hl7.fhir.dstu3.model.Patient) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LocalDate(java.time.LocalDate) Identifier(org.hl7.fhir.dstu3.model.Identifier) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Bundle(org.hl7.fhir.dstu3.model.Bundle) Patient(org.hl7.fhir.dstu3.model.Patient) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Test(org.junit.jupiter.api.Test)

Example 33 with Patient

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

the class PatientResourceProviderIT method searchForExistingPatientByHicnHash.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.stu3.providers.PatientResourceProvider#searchByIdentifier(ca.uhn.fhir.rest.param.TokenParam)}
 * works as expected for a {@link Patient} that does exist in the DB.
 */
@Test
public void searchForExistingPatientByHicnHash() {
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    IGenericClient fhirClient = createFhirClient();
    Beneficiary beneficiary = loadedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    Bundle searchResults = fhirClient.search().forResource(Patient.class).where(Patient.IDENTIFIER.exactly().systemAndIdentifier(TransformerConstants.CODING_BBAPI_BENE_HICN_HASH, beneficiary.getHicn())).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    /*
     * Verify that no paging links exist within the bundle.
     */
    assertNull(searchResults.getLink(Constants.LINK_FIRST));
    assertNull(searchResults.getLink(Constants.LINK_NEXT));
    assertNull(searchResults.getLink(Constants.LINK_PREVIOUS));
    assertNull(searchResults.getLink(Constants.LINK_LAST));
    assertEquals(1, searchResults.getTotal());
    Patient patientFromSearchResult = (Patient) searchResults.getEntry().get(0).getResource();
    BeneficiaryTransformerTest.assertMatches(beneficiary, patientFromSearchResult, getRHwithIncldAddrFldHdr("false"));
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) Bundle(org.hl7.fhir.dstu3.model.Bundle) StaticRifResource(gov.cms.bfd.model.rif.samples.StaticRifResource) Date(java.util.Date) Identifier(org.hl7.fhir.dstu3.model.Identifier) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Constants(ca.uhn.fhir.rest.api.Constants) DateTimeDt(ca.uhn.fhir.model.primitive.DateTimeDt) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) PipelineTestUtils(gov.cms.bfd.pipeline.sharedutils.PipelineTestUtils) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) CriteriaUpdate(javax.persistence.criteria.CriteriaUpdate) BeforeAll(org.junit.jupiter.api.BeforeAll) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) CommonHeaders(gov.cms.bfd.server.war.commons.CommonHeaders) Root(javax.persistence.criteria.Root) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) Iterator(java.util.Iterator) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) BeneficiaryMonthly_(gov.cms.bfd.model.rif.BeneficiaryMonthly_) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) BeneficiaryMonthly(gov.cms.bfd.model.rif.BeneficiaryMonthly) Test(org.junit.jupiter.api.Test) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) Stream(java.util.stream.Stream) Year(java.time.Year) Patient(org.hl7.fhir.dstu3.model.Patient) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LocalDate(java.time.LocalDate) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Bundle(org.hl7.fhir.dstu3.model.Bundle) Patient(org.hl7.fhir.dstu3.model.Patient) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Test(org.junit.jupiter.api.Test)

Example 34 with Patient

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

the class PatientResourceProviderIT method searchByPartDContractWithoutYear.

/**
 * Verifies that {@link
 * PatientResourceProvider#searchByCoverageContract(ca.uhn.fhir.rest.param.TokenParam,
 * ca.uhn.fhir.rest.param.TokenParam, String, ca.uhn.fhir.rest.api.server.RequestDetails)} works
 * as expected, when no year is specified (hopefully causing it to substitute the current year).
 */
@Test
public void searchByPartDContractWithoutYear() {
    /*
     * TODO Once AB2D has switched to always specifying the year, this needs to become an invalid
     * request and this test will need to be updated to reflect that, then.
     */
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResource.SAMPLE_A_BENES));
    IGenericClient fhirClient = createFhirClientWithIncludeIdentifiersMbi();
    // First, adjust the bene's reference year in the DB.
    ServerTestUtils.get().doTransaction((entityManager) -> {
        CriteriaBuilder builder = entityManager.getCriteriaBuilder();
        CriteriaQuery<BeneficiaryMonthly> select = builder.createQuery(BeneficiaryMonthly.class);
        select.from(BeneficiaryMonthly.class);
        List<BeneficiaryMonthly> beneMonthlys = entityManager.createQuery(select).getResultList();
        for (BeneficiaryMonthly beneMonthly : beneMonthlys) {
            LocalDate yearMonth = beneMonthly.getYearMonth();
            CriteriaUpdate<BeneficiaryMonthly> update = builder.createCriteriaUpdate(BeneficiaryMonthly.class);
            Root<BeneficiaryMonthly> beneMonthlyRoot = update.from(BeneficiaryMonthly.class);
            update.set(BeneficiaryMonthly_.yearMonth, LocalDate.of(Year.now().getValue(), yearMonth.getMonthValue(), yearMonth.getDayOfMonth()));
            update.where(builder.equal(beneMonthlyRoot.get(BeneficiaryMonthly_.parentBeneficiary), beneMonthly.getParentBeneficiary()), builder.equal(beneMonthlyRoot.get(BeneficiaryMonthly_.yearMonth), yearMonth));
            entityManager.createQuery(update).executeUpdate();
        }
    });
    // Should return a single match
    Bundle searchResults = fhirClient.search().forResource(Patient.class).where(new TokenClientParam("_has:Coverage.extension").exactly().systemAndIdentifier(CCWUtils.calculateVariableReferenceUrl(CcwCodebookVariable.PTDCNTRCT01), "S4607")).returnBundle(Bundle.class).execute();
    // Verify that it found the expected bene.
    assertNotNull(searchResults);
    assertEquals(1, searchResults.getEntry().size());
    Patient patientFromSearchResult = (Patient) searchResults.getEntry().get(0).getResource();
    Beneficiary expectedBene = (Beneficiary) loadedRecords.get(0);
    assertEquals(expectedBene.getBeneficiaryId(), patientFromSearchResult.getIdElement().getIdPart());
}
Also used : CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Bundle(org.hl7.fhir.dstu3.model.Bundle) Patient(org.hl7.fhir.dstu3.model.Patient) BeneficiaryMonthly(gov.cms.bfd.model.rif.BeneficiaryMonthly) LocalDate(java.time.LocalDate) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Test(org.junit.jupiter.api.Test)

Example 35 with Patient

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

the class PatientResourceProviderIT method searchForExistingPatientByLogicalIdIncludeIdentifiersTrue.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.stu3.providers.PatientResourceProvider#searchByLogicalId(ca.uhn.fhir.rest.param.TokenParam)}
 * works as expected for a {@link Patient} that does exist in the DB, including identifiers to
 * return the unhashed HICN and MBI.
 */
@Test
public void searchForExistingPatientByLogicalIdIncludeIdentifiersTrue() {
    List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
    IGenericClient fhirClient = createFhirClient("true", "true");
    Beneficiary beneficiary = loadedRecords.stream().filter(r -> r instanceof Beneficiary).map(r -> (Beneficiary) r).findFirst().get();
    Bundle searchResults = fhirClient.search().forResource(Patient.class).where(Patient.RES_ID.exactly().systemAndIdentifier(null, beneficiary.getBeneficiaryId())).returnBundle(Bundle.class).execute();
    assertNotNull(searchResults);
    Patient patientFromSearchResult = (Patient) searchResults.getEntry().get(0).getResource();
    /*
     * Ensure the unhashed values for HICN and MBI are present.
     */
    Boolean hicnUnhashedPresent = false;
    Boolean mbiUnhashedPresent = false;
    Iterator<Identifier> identifiers = patientFromSearchResult.getIdentifier().iterator();
    while (identifiers.hasNext()) {
        Identifier identifier = identifiers.next();
        if (identifier.getSystem().equals(TransformerConstants.CODING_BBAPI_BENE_HICN_UNHASHED))
            hicnUnhashedPresent = true;
        if (identifier.getSystem().equals(TransformerConstants.CODING_BBAPI_MEDICARE_BENEFICIARY_ID_UNHASHED))
            mbiUnhashedPresent = true;
    }
    assertTrue(hicnUnhashedPresent);
    assertTrue(mbiUnhashedPresent);
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) Bundle(org.hl7.fhir.dstu3.model.Bundle) StaticRifResource(gov.cms.bfd.model.rif.samples.StaticRifResource) Date(java.util.Date) Identifier(org.hl7.fhir.dstu3.model.Identifier) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) Constants(ca.uhn.fhir.rest.api.Constants) DateTimeDt(ca.uhn.fhir.model.primitive.DateTimeDt) RequestHeaders(gov.cms.bfd.server.war.commons.RequestHeaders) CCWUtils(gov.cms.bfd.server.war.commons.CCWUtils) PipelineTestUtils(gov.cms.bfd.pipeline.sharedutils.PipelineTestUtils) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) CriteriaUpdate(javax.persistence.criteria.CriteriaUpdate) BeforeAll(org.junit.jupiter.api.BeforeAll) CcwCodebookVariable(gov.cms.bfd.model.codebook.data.CcwCodebookVariable) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) BeneficiaryHistory(gov.cms.bfd.model.rif.BeneficiaryHistory) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) ResourceNotFoundException(ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException) StaticRifResourceGroup(gov.cms.bfd.model.rif.samples.StaticRifResourceGroup) ServerTestUtils(gov.cms.bfd.server.war.ServerTestUtils) CommonHeaders(gov.cms.bfd.server.war.commons.CommonHeaders) Root(javax.persistence.criteria.Root) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) Iterator(java.util.Iterator) TokenClientParam(ca.uhn.fhir.rest.gclient.TokenClientParam) InvalidRequestException(ca.uhn.fhir.rest.server.exceptions.InvalidRequestException) BeneficiaryMonthly_(gov.cms.bfd.model.rif.BeneficiaryMonthly_) MedicareBeneficiaryIdHistory(gov.cms.bfd.model.rif.MedicareBeneficiaryIdHistory) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) BeneficiaryMonthly(gov.cms.bfd.model.rif.BeneficiaryMonthly) Test(org.junit.jupiter.api.Test) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) TransformerConstants(gov.cms.bfd.server.war.commons.TransformerConstants) Stream(java.util.stream.Stream) Year(java.time.Year) Patient(org.hl7.fhir.dstu3.model.Patient) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LocalDate(java.time.LocalDate) Identifier(org.hl7.fhir.dstu3.model.Identifier) IGenericClient(ca.uhn.fhir.rest.client.api.IGenericClient) Bundle(org.hl7.fhir.dstu3.model.Bundle) Patient(org.hl7.fhir.dstu3.model.Patient) Beneficiary(gov.cms.bfd.model.rif.Beneficiary) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.Test)576 Test (org.junit.jupiter.api.Test)442 Patient (org.hl7.fhir.r4.model.Patient)437 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)255 HashMap (java.util.HashMap)251 Patient (org.hl7.fhir.dstu3.model.Patient)249 IBundleProvider (ca.uhn.fhir.rest.api.server.IBundleProvider)228 Bundle (org.hl7.fhir.r4.model.Bundle)203 Path (javax.ws.rs.Path)188 Date (java.util.Date)171 Produces (javax.ws.rs.Produces)163 ArrayList (java.util.ArrayList)156 JsonObject (javax.json.JsonObject)141 SearchParameterMap (org.openmrs.module.fhir2.api.search.param.SearchParameterMap)140 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)138 ReferenceParam (ca.uhn.fhir.rest.param.ReferenceParam)137 ReferenceAndListParam (ca.uhn.fhir.rest.param.ReferenceAndListParam)128 ReferenceOrListParam (ca.uhn.fhir.rest.param.ReferenceOrListParam)128 BaseModuleContextSensitiveTest (org.openmrs.test.BaseModuleContextSensitiveTest)125 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)120