Search in sources :

Example 81 with Money

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

the class HHAClaimTransformerV2Test method shouldHavePayment.

/**
 * Payment
 */
@Test
public void shouldHavePayment() {
    // Need to maintain trailing 0s in USD amount
    BigDecimal amt = new BigDecimal(188.00);
    amt = amt.setScale(2, RoundingMode.HALF_DOWN);
    PaymentComponent compare = new PaymentComponent().setAmount(new Money().setValue(amt).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(eob.getPayment()));
}
Also used : Money(org.hl7.fhir.r4.model.Money) PaymentComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent) BigDecimal(java.math.BigDecimal) Test(org.junit.jupiter.api.Test)

Example 82 with Money

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

the class HHAClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrRateAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrRateAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_rate_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_rate_amt", "Revenue Center Rate 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 83 with Money

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

the class CarrierClaimTransformerV2Test method shouldHaveLineItemCoInsuranceAdjudication.

@Test
public void shouldHaveLineItemCoInsuranceAdjudication() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("coinsurance", 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/line_coinsrnc_amt", "Line Beneficiary Coinsurance Amount")))).setAmount(new Money().setValue(9.57).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 84 with Money

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

the class CarrierClaimTransformerV2Test method shouldHaveLineItemSubmittedAdjudication.

@Test
public void shouldHaveLineItemSubmittedAdjudication() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("submitted", 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/line_sbmtd_chrg_amt", "Line Submitted Charge Amount")))).setAmount(new Money().setValue(75).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 85 with Money

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

the class CarrierClaimTransformerV2Test method shouldHaveLineItemBenefitAdjudication.

@Test
public void shouldHaveLineItemBenefitAdjudication() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("benefit", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "benefit", "Benefit Amount"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", "Line NCH Medicare Payment Amount")))).setAmount(new Money().setValue(37.5).setCurrency(TransformerConstants.CODED_MONEY_USD));
    compare.setExtension(Arrays.asList(new Extension("https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd").setValue(new Coding("https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", "0", "80%"))));
    assertTrue(compare.equalsDeep(adjudication));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) 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

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 NotImplementedException (org.apache.commons.lang3.NotImplementedException)5 PaymentComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent)5 EncounterType (org.mitre.synthea.world.concepts.HealthRecord.EncounterType)4 ItemComponent (org.hl7.fhir.dstu3.model.Claim.ItemComponent)3 Extension (org.hl7.fhir.dstu3.model.Extension)3 Reference (org.hl7.fhir.dstu3.model.Reference)3 SupplyDeliverySuppliedItemComponent (org.hl7.fhir.dstu3.model.SupplyDelivery.SupplyDeliverySuppliedItemComponent)3