Search in sources :

Example 76 with DecimalType

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

the class HospiceClaimTransformerV2Test method shouldHaveLineItemRevCenterMedicarePaymentAmtAdjudication.

@Test
public void shouldHaveLineItemRevCenterMedicarePaymentAmtAdjudication() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_pmt_amt_amt", eob.getItemFirstRep().getAdjudication());
    assertNotNull(adjudication);
    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().setValueElement(new DecimalType("26.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 77 with DecimalType

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

the class HospiceClaimTransformerV2Test method shouldHaveLineItemRevCenterMedicareProviderAmtAdjudication.

@Test
public void shouldHaveLineItemRevCenterMedicareProviderAmtAdjudication() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_prvdr_pmt_amt", eob.getItemFirstRep().getAdjudication());
    assertNotNull(adjudication);
    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().setValueElement(new DecimalType("29.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 78 with DecimalType

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

the class HospiceClaimTransformerV2Test method shouldHavePaymentTotal.

@Test
public void shouldHavePaymentTotal() {
    PaymentComponent expected = eob.getPayment();
    PaymentComponent compare = new PaymentComponent().setAmount(new Money().setValueElement(new DecimalType("130.32")).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(expected));
}
Also used : Money(org.hl7.fhir.r4.model.Money) DecimalType(org.hl7.fhir.r4.model.DecimalType) PaymentComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.PaymentComponent) Test(org.junit.jupiter.api.Test)

Example 79 with DecimalType

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

the class OutpatientClaimTransformerV2Test method shouldHaveClmOpBenePmtAmtFinancial.

@Test
public void shouldHaveClmOpBenePmtAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/clm_op_bene_pmt_amt", eob.getBenefitBalanceFirstRep().getFinancial());
    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/clm_op_bene_pmt_amt", "Claim Outpatient Payment Amount to Beneficiary")))).setUsed(new Money().setValueElement(new DecimalType("44.00")).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) DecimalType(org.hl7.fhir.r4.model.DecimalType) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 80 with DecimalType

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

the class InpatientClaimTransformerV2Test method shouldHaveClmPassThruPerDiemAmtFinancial.

@Test
public void shouldHaveClmPassThruPerDiemAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/clm_pass_thru_per_diem_amt", eob.getBenefitBalanceFirstRep().getFinancial());
    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/clm_pass_thru_per_diem_amt", "Claim Pass Thru Per Diem Amount")))).setUsed(new Money().setValueElement(new DecimalType("10.00")).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) DecimalType(org.hl7.fhir.r4.model.DecimalType) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Aggregations

DecimalType (org.hl7.fhir.r4.model.DecimalType)48 Test (org.junit.jupiter.api.Test)47 Coding (org.hl7.fhir.r4.model.Coding)44 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)42 Money (org.hl7.fhir.r4.model.Money)41 BigDecimal (java.math.BigDecimal)40 ArrayList (java.util.ArrayList)38 PathEngineException (org.hl7.fhir.exceptions.PathEngineException)36 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)31 UcumException (org.fhir.ucum.UcumException)29 DecimalType (org.hl7.fhir.r4b.model.DecimalType)22 DecimalType (org.hl7.fhir.r5.model.DecimalType)20 FHIRException (org.hl7.fhir.exceptions.FHIRException)19 Decimal (org.fhir.ucum.Decimal)14 DefinitionException (org.hl7.fhir.exceptions.DefinitionException)14 NotImplementedException (org.apache.commons.lang3.NotImplementedException)12 Pair (org.fhir.ucum.Pair)12 Base (org.hl7.fhir.r4b.model.Base)12 Base (org.hl7.fhir.r5.model.Base)12 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)8