Search in sources :

Example 61 with Coding

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

the class HHAClaimTransformerV2Test method shouldHaveLineItemRevenue.

@Test
public void shouldHaveLineItemRevenue() {
    CodeableConcept revenue = eob.getItemFirstRep().getRevenue();
    Coding code1 = revenue.getCoding().stream().filter(coding -> coding.getSystem().equals("https://bluebutton.cms.gov/resources/variables/rev_cntr")).findFirst().orElse(null);
    Coding code2 = revenue.getCoding().stream().filter(coding -> coding.getSystem().equals("https://www.nubc.org/CodeSystem/RevenueCodes")).findFirst().orElse(null);
    Coding code3 = revenue.getCoding().stream().filter(coding -> coding.getSystem().equals("https://bluebutton.cms.gov/resources/variables/rev_cntr_ddctbl_coinsrnc_cd")).findFirst().orElse(null);
    assertNotNull(code1, "Missing expected rev_cntr coding");
    assertEquals("0023", code1.getCode());
    assertEquals("Home Health services paid under PPS submitted as TOB 32X and 33X, effective 10/00. This code may appear multiple times on a claim to identify different HIPPS/Home Health Resource Groups (HRG).", code1.getDisplay());
    assertNotNull(code2, "Missing expected RevenueCodes coding");
    assertEquals("4", code2.getCode());
    assertNull(code2.getDisplay());
    assertNotNull(code3, "Missing expected rev_cntr_ddctbl_coinsrnc_cd coding");
    assertEquals("4", code3.getCode());
    assertEquals("No charge or units associated with this revenue center code. (For multiple HCPCS per single revenue center code) For revenue center code 0001, the following MSP override values may be present:", code3.getDisplay());
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 62 with Coding

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

the class HHAClaimTransformerV2Test method shouldHaveClaimReceivedDateSupInfo.

@Test
public void shouldHaveClaimReceivedDateSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("clmrecvddate", eob.getSupportingInfo());
    SupportingInformationComponent compare = TransformerTestUtilsV2.createSupportingInfo(// We don't care what the sequence number is here
    sic.getSequence(), // Category
    Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", "clmrecvddate", "Claim Received Date"), new Coding("https://bluebutton.cms.gov/resources/codesystem/information", "https://bluebutton.cms.gov/resources/variables/nch_wkly_proc_dt", "NCH Weekly Claim Processing Date"))).setTiming(new DateType("2015-11-06"));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) DateType(org.hl7.fhir.r4.model.DateType) Test(org.junit.jupiter.api.Test)

Example 63 with Coding

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

the class HHAClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrNcrvdChrgAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrNcrvdChrgAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_ncvrd_chrg_amt", eob.getItemFirstRep().getAdjudication());
    // Need to maintain trailing 0s in USD amount
    BigDecimal amt = new BigDecimal(24.00);
    amt = amt.setScale(2, RoundingMode.HALF_DOWN);
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "noncovered", "Noncovered"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_ncvrd_chrg_amt", "Revenue Center Non-Covered Charge Amount")))).setAmount(new Money().setValue(amt).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(adjudication));
}
Also used : Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) BigDecimal(java.math.BigDecimal) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 64 with Coding

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

the class HHAClaimTransformerV2Test method shouldHaveClmTotChrgAmtTotal.

@Test
public void shouldHaveClmTotChrgAmtTotal() {
    // Only one so just pull it directly and compare
    TotalComponent total = eob.getTotalFirstRep();
    TotalComponent compare = new TotalComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "submitted", "Submitted Amount"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/clm_tot_chrg_amt", "Claim Total Charge Amount")))).setAmount(new Money().setValue(199.99).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(total));
}
Also used : TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 65 with Coding

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

Aggregations

Coding (org.hl7.fhir.r4.model.Coding)633 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)373 Test (org.junit.jupiter.api.Test)344 Test (org.junit.Test)175 ArrayList (java.util.ArrayList)133 Money (org.hl7.fhir.r4.model.Money)117 Coding (org.hl7.fhir.dstu3.model.Coding)114 Extension (org.hl7.fhir.r4.model.Extension)77 CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)73 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)68 Date (java.util.Date)66 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)65 Reference (org.hl7.fhir.r4.model.Reference)65 FHIRException (org.hl7.fhir.exceptions.FHIRException)63 SupportingInformationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)62 Bundle (org.hl7.fhir.r4.model.Bundle)58 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)57 Coding (org.hl7.fhir.r5.model.Coding)54 Observation (org.hl7.fhir.r4.model.Observation)49 DecimalType (org.hl7.fhir.r4.model.DecimalType)46