Search in sources :

Example 11 with Money

use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.

the class OutpatientClaimTransformerV2Test 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(8888.85).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 12 with Money

use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrPmtAmtAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrPmtAmtAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_pmt_amt_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().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/rev_cntr_pmt_amt_amt", "Revenue Center (Medicare) Payment Amount")))).setAmount(new Money().setValue(5000).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 13 with Money

use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrNcvrdChrgAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrNcvrdChrgAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_ncvrd_chrg_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", "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(134).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 14 with Money

use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLineCoinsrncAmt.

@Test
public void shouldHaveLineItemAdjudicationLineCoinsrncAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", eob.getItemFirstRep().getAdjudication());
    // Need to maintain trailing 0s in USD amount
    BigDecimal amt = new BigDecimal(20.20);
    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", "coinsurance", "Co-insurance"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", "Line Beneficiary Coinsurance 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 15 with Money

use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveCarrClmCashDdctblAmtFinancial.

@Test
public void shouldHaveCarrClmCashDdctblAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/carr_clm_cash_ddctbl_apld_amt", eob.getBenefitBalanceFirstRep().getFinancial());
    // Need to maintain trailing 0s in USD amount
    BigDecimal amt = new BigDecimal(777.00);
    amt = amt.setScale(2, RoundingMode.HALF_DOWN);
    BenefitComponent compare = new BenefitComponent().setType(new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/codesystem/benefit-balance", "https://bluebutton.cms.gov/resources/variables/carr_clm_cash_ddctbl_apld_amt", "Carrier Claim Cash Deductible Applied Amount (sum of all line-level deductible amounts)")))).setUsed(new Money().setValue(amt).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(benefit));
}
Also used : Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) BigDecimal(java.math.BigDecimal) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Aggregations

Money (org.hl7.fhir.r4.model.Money)129 Test (org.junit.jupiter.api.Test)122 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)117 Coding (org.hl7.fhir.r4.model.Coding)115 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)61 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)48 DecimalType (org.hl7.fhir.r4.model.DecimalType)42 BigDecimal (java.math.BigDecimal)18 TotalComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent)9 Money (org.hl7.fhir.dstu3.model.Money)6 Extension (org.hl7.fhir.r4.model.Extension)6 Claim (org.mitre.synthea.world.concepts.Claim)6 Encounter (org.mitre.synthea.world.concepts.HealthRecord.Encounter)6 PaymentComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent)5 NotImplementedException (org.apache.commons.lang3.NotImplementedException)4 EncounterType (org.mitre.synthea.world.concepts.HealthRecord.EncounterType)4 InsuranceComponent (org.hl7.fhir.r4.model.Claim.InsuranceComponent)3 ItemComponent (org.hl7.fhir.r4.model.Claim.ItemComponent)3 DocumentReference (org.hl7.fhir.r4.model.DocumentReference)3 Reference (org.hl7.fhir.r4.model.Reference)3