Search in sources :

Example 16 with Coding

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

the class OutpatientClaimTransformerV2Test 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("2011-02-26"));
    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 17 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrPrvdrPmtAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrPrvdrPmtAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_prvdr_pmt_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "paidtoprovider", "Paid to provider"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_prvdr_pmt_amt", "Revenue Center (Medicare) Provider Payment Amount")))).setAmount(new Money().setValue(200).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) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 18 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrCoinsrncWgeAdjstdC.

@Test
public void shouldHaveLineItemAdjudicationRevCntrCoinsrncWgeAdjstdC() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_coinsrnc_wge_adjstd_c", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "coinsurance", "Co-insurance"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_coinsrnc_wge_adjstd_c", "Revenue Center Coinsurance/Wage Adjusted Coinsurance Amount")))).setAmount(new Money().setValue(15.23).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) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 19 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveFiNumberExtension.

/**
 * Ensures the fi_num is correctly mapped to an eob as an extension when the
 * fiscalIntermediaryNumber is present.
 */
@Test
public void shouldHaveFiNumberExtension() {
    String expectedDiscriminator = "https://bluebutton.cms.gov/resources/variables/fi_num";
    assertNotNull(eob.getExtension());
    assertFalse(eob.getExtension().isEmpty());
    Extension fiNumExtension = eob.getExtension().stream().filter(e -> expectedDiscriminator.equals(e.getUrl())).findFirst().orElse(null);
    assertNotNull(fiNumExtension);
    assertEquals("15444", ((Coding) fiNumExtension.getValue()).getCode());
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Test(org.junit.jupiter.api.Test)

Example 20 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrCashDdctblAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrCashDdctblAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_cash_ddctbl_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "deductible", "Deductible"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_cash_ddctbl_amt", "Revenue Center Cash Deductible Amount")))).setAmount(new Money().setValue(12.89).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) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) 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