Search in sources :

Example 41 with CodeSystem

use of org.hl7.fhir.dstu3.model.CodeSystem in project beneficiary-fhir-data by CMSgov.

the class InpatientClaimTransformerV2Test method shouldHaveExpectedCodingValues.

@Test
public void shouldHaveExpectedCodingValues() {
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/variables/nch_clm_type_cd", "60", "Inpatient claim"), new Coding("https://bluebutton.cms.gov/resources/codesystem/eob-type", "INPATIENT", null), new Coding("http://terminology.hl7.org/CodeSystem/claim-type", "institutional", "Institutional")));
    assertTrue(compare.equalsDeep(eob.getType()));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 42 with CodeSystem

use of org.hl7.fhir.dstu3.model.CodeSystem 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 43 with CodeSystem

use of org.hl7.fhir.dstu3.model.CodeSystem 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 44 with CodeSystem

use of org.hl7.fhir.dstu3.model.CodeSystem 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 45 with CodeSystem

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

Aggregations

Test (org.junit.jupiter.api.Test)314 Coding (org.hl7.fhir.r4.model.Coding)271 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)214 Money (org.hl7.fhir.r4.model.Money)118 ArrayList (java.util.ArrayList)80 CodeSystem (org.hl7.fhir.r5.model.CodeSystem)70 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)64 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)64 SupportingInformationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)59 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)56 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)54 Identifier (org.hl7.fhir.r4.model.Identifier)50 Resource (org.hl7.fhir.r4.model.Resource)45 DecimalType (org.hl7.fhir.r4.model.DecimalType)44 FHIRException (org.hl7.fhir.exceptions.FHIRException)39 ConceptDefinitionComponent (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent)36 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)34 ValueSet (org.hl7.fhir.r5.model.ValueSet)33 CodeSystem (org.hl7.fhir.r4.model.CodeSystem)32 IOException (java.io.IOException)31