Search in sources :

Example 6 with DecimalType

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

the class InpatientClaimTransformerV2Test method shouldHavePrPayAmtFinancial.

@Test
public void shouldHavePrPayAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/prpayamt", 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/prpayamt", "NCH Primary Payer (if not Medicare) Claim Paid Amount")))).setUsed(new Money().setValueElement(new DecimalType("11.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 7 with DecimalType

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

the class InpatientClaimTransformerV2Test method shouldHaveLineItemRevCentrNcvrdChrgAmtAdjudication.

@Test
public void shouldHaveLineItemRevCentrNcvrdChrgAmtAdjudication() {
    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().setValueElement(new DecimalType("3699.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 8 with DecimalType

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

the class CarrierClaimTransformerV2Test method shouldHaveClmPassThruClaimSubmittedChargeFinancial.

@Test
public void shouldHaveClmPassThruClaimSubmittedChargeFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_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/nch_carr_clm_sbmtd_chrg_amt", "NCH Carrier Claim Submitted Charge Amount (sum of all line-level submitted charges)")))).setUsed(new Money().setValueElement(new DecimalType("245.04")).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 9 with DecimalType

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

the class CarrierClaimTransformerV2Test method shouldHaveClmPassThruClaimAllowedChargeFinancial.

@Test
public void shouldHaveClmPassThruClaimAllowedChargeFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/nch_carr_clm_alowd_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/nch_carr_clm_alowd_amt", "NCH Carrier Claim Allowed Charge Amount (sum of all line-level allowed charges)")))).setUsed(new Money().setValueElement(new DecimalType("166.23")).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 10 with DecimalType

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

the class SNFClaimTransformerV2Test method shouldHavePrpayamtFinancial.

@Test
public void shouldHavePrpayamtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/prpayamt", 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/prpayamt", "NCH Primary Payer (if not Medicare) Claim Paid Amount")))).setUsed(new Money().setValueElement(new DecimalType("11.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