Search in sources :

Example 36 with Claim

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

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

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

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

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

the class HospiceClaimTransformerV2Test method createEOB.

private void createEOB(Optional<Boolean> includeTaxNumber) {
    ExplanationOfBenefit genEob = HospiceClaimTransformerV2.transform(new MetricRegistry(), claim, includeTaxNumber);
    IParser parser = fhirContext.newJsonParser();
    String json = parser.encodeResourceToString(genEob);
    eob = parser.parseResource(ExplanationOfBenefit.class, json);
}
Also used : MetricRegistry(com.codahale.metrics.MetricRegistry) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) IParser(ca.uhn.fhir.parser.IParser)

Aggregations

Test (org.junit.jupiter.api.Test)149 Coding (org.hl7.fhir.r4.model.Coding)92 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)62 Money (org.hl7.fhir.r4.model.Money)61 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)56 Optional (java.util.Optional)50 Arrays (java.util.Arrays)49 List (java.util.List)49 ExplanationOfBenefit (org.hl7.fhir.r4.model.ExplanationOfBenefit)49 FHIRException (org.hl7.fhir.exceptions.FHIRException)48 SupportingInformationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)48 ExplanationOfBenefit (org.hl7.fhir.dstu3.model.ExplanationOfBenefit)47 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)47 StaticRifResourceGroup (gov.cms.bfd.model.rif.samples.StaticRifResourceGroup)45 ServerTestUtils (gov.cms.bfd.server.war.ServerTestUtils)45 TransformerConstants (gov.cms.bfd.server.war.commons.TransformerConstants)41 Instant (java.time.Instant)40 ArrayList (java.util.ArrayList)39 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)37 Beneficiary (gov.cms.bfd.model.rif.Beneficiary)37