Search in sources :

Example 6 with Coverage

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

the class DMEClaimTransformerV2Test 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 7 with Coverage

use of org.hl7.fhir.r4.model.Coverage 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 8 with Coverage

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

the class CoverageTransformerV2Test method verifyCoverageClass.

private static void verifyCoverageClass(String className) {
    assertEquals(2, coverage.getClass_().size());
    Coverage compare = new Coverage();
    compare.addClass_().setValue("Medicare").getType().addCoding().setCode("group").setDisplay("Group").setSystem("http://terminology.hl7.org/CodeSystem/coverage-class");
    compare.addClass_().setValue(className).getType().addCoding().setCode("plan").setDisplay("Plan").setSystem("http://terminology.hl7.org/CodeSystem/coverage-class");
    assertTrue(compare.getClass_().get(0).equalsDeep(coverage.getClass_().get(0)));
    assertTrue(compare.getClass_().get(1).equalsDeep(coverage.getClass_().get(1)));
}
Also used : Coverage(org.hl7.fhir.r4.model.Coverage)

Example 9 with Coverage

use of org.hl7.fhir.r4.model.Coverage 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 10 with Coverage

use of org.hl7.fhir.r4.model.Coverage 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)

Aggregations

Test (org.junit.jupiter.api.Test)32 Coverage (org.hl7.fhir.r4.model.Coverage)31 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)18 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