Search in sources :

Example 16 with Extension

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

the class InpatientClaimTransformerV2Test method shouldContainNchNearLineRecIdentCdExt.

@Test
public void shouldContainNchNearLineRecIdentCdExt() {
    Extension ex = TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", eob.getExtension());
    Extension compare = new Extension("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", new Coding("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", "V", "Part A institutional claim record (inpatient [IP], skilled nursing facility" + " [SNF], hospice [HOS], or home health agency [HHA])"));
    assertTrue(compare.equalsDeep(ex));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 17 with Extension

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

the class InpatientClaimTransformerV2Test method shouldContainClmSrvcClsfctnTypeCdExt.

@Test
public void shouldContainClmSrvcClsfctnTypeCdExt() {
    Extension ex = TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/clm_srvc_clsfctn_type_cd", eob.getExtension());
    Extension compare = new Extension("https://bluebutton.cms.gov/resources/variables/clm_srvc_clsfctn_type_cd", new Coding("https://bluebutton.cms.gov/resources/variables/clm_srvc_clsfctn_type_cd", "1", null));
    assertTrue(compare.equalsDeep(ex));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 18 with Extension

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

the class HospiceClaimTransformerV2Test method shouldHaveFacilityTypeExtension.

@Test
public void shouldHaveFacilityTypeExtension() {
    assertNotNull(eob.getFacility());
    assertEquals(1, eob.getFacility().getExtension().size());
    Extension ex = TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/clm_fac_type_cd", eob.getFacility().getExtension());
    Extension compare = new Extension("https://bluebutton.cms.gov/resources/variables/clm_fac_type_cd", new Coding("https://bluebutton.cms.gov/resources/variables/clm_fac_type_cd", "8", "Ambulatory Surgery Center (ASC) or other special facility (e.g. hospice)"));
    assertTrue(compare.equalsDeep(ex));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 19 with Extension

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

the class HospiceClaimTransformerV2Test method shouldHaveExtensions.

@Test
public void shouldHaveExtensions() {
    List<Extension> expected = eob.getExtension();
    assertEquals(4, expected.size());
    assertNotNull(TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", eob.getExtension()));
    assertNotNull(TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/clm_mdcr_non_pmt_rsn_cd", eob.getExtension()));
    assertNotNull(TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/clm_srvc_clsfctn_type_cd", eob.getExtension()));
    List<Extension> compare = Arrays.asList(new Extension("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", new Coding("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", "V", "Part A institutional claim record (inpatient [IP], skilled nursing facility [SNF], hospice [HOS], or home health agency [HHA])")), new Extension("https://bluebutton.cms.gov/resources/variables/clm_mdcr_non_pmt_rsn_cd", new Coding("https://bluebutton.cms.gov/resources/variables/clm_mdcr_non_pmt_rsn_cd", "P", "Payment requested")), new Extension("https://bluebutton.cms.gov/resources/variables/clm_srvc_clsfctn_type_cd", new Coding("https://bluebutton.cms.gov/resources/variables/clm_srvc_clsfctn_type_cd", "1", null)), new Extension("https://bluebutton.cms.gov/resources/variables/fi_num", new Coding("https://bluebutton.cms.gov/resources/variables/fi_num", "6666", null)));
    for (int i = 0; i < expected.size(); i++) {
        assertTrue(compare.get(i).equalsDeep(expected.get(i)));
    }
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 20 with Extension

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

the class HHAClaimTransformerV2Test method shouldHaveRevenueStatusCode.

/**
 * Ensure that when the revenue status code exists in the claim, it should be mapped to an
 * extension.
 *
 * <p>The specific code value of the extension is tested in {@link
 * TransformerUtilsV2Test#mapEobCommonItemRevenueStatusCodeWhenStatusCodeExistsExpectExtensionOnItem()}
 */
@Test
public void shouldHaveRevenueStatusCode() {
    String expectedExtensionUrl = "https://bluebutton.cms.gov/resources/variables/rev_cntr_stus_ind_cd";
    assertNotNull(eob.getItem());
    assertTrue(eob.getItem().size() > 0);
    ExplanationOfBenefit.ItemComponent item = eob.getItem().get(0);
    assertNotNull(item);
    assertNotNull(item.getRevenue());
    assertNotNull(item.getRevenue().getExtension());
    assertEquals(1, item.getRevenue().getExtension().size());
    Extension ext = item.getRevenue().getExtensionByUrl(expectedExtensionUrl);
    assertNotNull(ext);
    assertEquals(expectedExtensionUrl, ext.getUrl());
    assertTrue(ext.getValue() instanceof Coding);
    assertNotNull(((Coding) ext.getValue()).getCode());
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) Test(org.junit.jupiter.api.Test)

Aggregations

Extension (org.hl7.fhir.r4.model.Extension)154 ArrayList (java.util.ArrayList)104 Coding (org.hl7.fhir.r4.model.Coding)69 Test (org.junit.jupiter.api.Test)69 Extension (org.hl7.fhir.dstu3.model.Extension)67 FHIRException (org.hl7.fhir.exceptions.FHIRException)55 StructureDefinition (org.hl7.fhir.r5.model.StructureDefinition)46 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)42 Extension (org.hl7.fhir.r5.model.Extension)41 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)39 Test (org.junit.Test)36 Cell (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell)35 List (java.util.List)34 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)34 Date (java.util.Date)30 Coding (org.hl7.fhir.dstu3.model.Coding)29 Piece (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece)27 Row (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Row)27 Reference (org.hl7.fhir.dstu3.model.Reference)26 Patient (org.hl7.fhir.r4.model.Patient)26