Search in sources :

Example 16 with Reference

use of org.hl7.fhir.dstu2016may.model.Reference in project beneficiary-fhir-data by CMSgov.

the class CoverageTransformerV2Test method verifyPayor.

private static void verifyPayor() {
    List<Reference> payers = coverage.getPayor();
    assertNotNull(payers);
    assertEquals(1, payers.size());
    Coverage compare = new Coverage();
    compare.addPayor().setIdentifier(new Identifier().setValue("Centers for Medicare and Medicaid Services"));
    assertTrue(compare.getPayor().get(0).equalsDeep(coverage.getPayor().get(0)));
}
Also used : Identifier(org.hl7.fhir.r4.model.Identifier) Reference(org.hl7.fhir.r4.model.Reference) Coverage(org.hl7.fhir.r4.model.Coverage)

Example 17 with Reference

use of org.hl7.fhir.dstu2016may.model.Reference in project beneficiary-fhir-data by CMSgov.

the class InpatientClaimTransformerV2Test 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 18 with Reference

use of org.hl7.fhir.dstu2016may.model.Reference in project beneficiary-fhir-data by CMSgov.

the class HospiceClaimTransformerV2Test method shouldSetInsurer.

@Test
public void shouldSetInsurer() throws Exception {
    Reference expected = eob.getInsurer();
    assertNotNull(expected);
    Reference compare = new Reference();
    compare.getIdentifier().setValue("CMS");
    assertTrue(compare.equalsDeep(expected));
}
Also used : Reference(org.hl7.fhir.r4.model.Reference) Test(org.junit.jupiter.api.Test)

Example 19 with Reference

use of org.hl7.fhir.dstu2016may.model.Reference in project beneficiary-fhir-data by CMSgov.

the class HospiceClaimTransformerV2Test 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 20 with Reference

use of org.hl7.fhir.dstu2016may.model.Reference in project beneficiary-fhir-data by CMSgov.

the class HospiceClaimTransformerV2Test method shouldHaveCareTeamMembers.

@Test
public void shouldHaveCareTeamMembers() {
    // First member
    CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
    CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "8888888888", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "attending", "Attending");
    assertTrue(compare1.equalsDeep(member1));
    // Second member
    CareTeamComponent member2 = TransformerTestUtilsV2.findCareTeamBySequence(2, eob.getCareTeam());
    CareTeamComponent compare2 = new CareTeamComponent().setSequence(2).setProvider(new Reference().setIdentifier(TransformerTestUtilsV2.createIdentifier(null, "0", "http://terminology.hl7.org/CodeSystem/v2-0203", "UPIN", "Medicare/CMS (formerly HCFA)'s Universal Physician Identification numbers"))).setRole(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider"))));
    assertTrue(compare2.equalsDeep(member2));
    // // Third member
    CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
    CareTeamComponent compare3 = new CareTeamComponent().setSequence(3).setProvider(new Reference().setIdentifier(TransformerTestUtilsV2.createIdentifier(null, "345345345", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", "npi", "National Provider Identifier"))).setRole(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider"))));
    assertTrue(compare3.equalsDeep(member3));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) Reference(org.hl7.fhir.r4.model.Reference) CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Aggregations

Reference (org.hl7.fhir.r4.model.Reference)363 Test (org.junit.Test)251 ArrayList (java.util.ArrayList)190 Reference (org.hl7.fhir.dstu3.model.Reference)156 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)91 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)85 Resource (org.hl7.fhir.r4.model.Resource)85 Test (org.junit.jupiter.api.Test)85 Bundle (org.hl7.fhir.r4.model.Bundle)82 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)80 Coding (org.hl7.fhir.r4.model.Coding)76 Observation (org.hl7.fhir.r4.model.Observation)69 FHIRException (org.hl7.fhir.exceptions.FHIRException)67 Date (java.util.Date)62 Identifier (org.hl7.fhir.r4.model.Identifier)58 List (java.util.List)57 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)49 Encounter (org.hl7.fhir.r4.model.Encounter)48 HashMap (java.util.HashMap)45 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)44