Search in sources :

Example 21 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntr1stAnsiCd.

@Test
public void shouldHaveLineItemAdjudicationRevCntr1stAnsiCd() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByReason("CO120", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", "denialreason", "Denial Reason")))).setReason(new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/variables/rev_cntr_1st_ansi_cd", "CO120", null))));
    assertTrue(compare.equalsDeep(adjudication));
}
Also used : 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 22 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntr2ndMspPdAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntr2ndMspPdAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_2nd_msp_pd_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", "priorpayerpaid", "Prior payer paid"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_2nd_msp_pd_amt", "Revenue Center 2nd Medicare Secondary Payer (MSP) Paid Amount")))).setAmount(new Money().setValue(0).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 23 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemProductOrServiceExtension.

@Test
public void shouldHaveLineItemProductOrServiceExtension() {
    assertNotNull(eob.getItemFirstRep().getProductOrService());
    assertEquals(1, eob.getItemFirstRep().getProductOrService().getExtension().size());
    Extension ex = TransformerTestUtilsV2.findExtensionByUrl("http://hl7.org/fhir/sid/ndc", eob.getItemFirstRep().getProductOrService().getExtension());
    Extension compare = new Extension("http://hl7.org/fhir/sid/ndc", new Coding("http://hl7.org/fhir/sid/ndc", "987654321", 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 24 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrRdcdCoinsrncAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrRdcdCoinsrncAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_rdcd_coinsrnc_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", "coinsurance", "Co-insurance"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_rdcd_coinsrnc_amt", "Revenue Center Reduced Coinsurance Amount")))).setAmount(// .0 and fail
    new Money().setValueElement(new DecimalType("11.00")).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) DecimalType(org.hl7.fhir.r4.model.DecimalType) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 25 with Coding

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntr2ndAnsiCd.

@Test
public void shouldHaveLineItemAdjudicationRevCntr2ndAnsiCd() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByReason("CR121", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", "denialreason", "Denial Reason")))).setReason(new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/variables/rev_cntr_2nd_ansi_cd", "CR121", null))));
    assertTrue(compare.equalsDeep(adjudication));
}
Also used : 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