use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveLineItemPaidToPatientAdjudication.
@Test
public void shouldHaveLineItemPaidToPatientAdjudication() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("paidtopatient", eob.getItemFirstRep().getAdjudication());
AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "paidtopatient", "Paid to patient"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", "Line Payment Amount to Beneficiary")))).setAmount(new Money().setValue(0).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveLineItemDeductibleAdjudication.
@Test
public void shouldHaveLineItemDeductibleAdjudication() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("deductible", eob.getItemFirstRep().getAdjudication());
AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "deductible", "Deductible"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", "Line Beneficiary Part B Deductible Amount")))).setAmount(new Money().setValue(0).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveClmPassThruClaimProviderPaymentAmountToBeneficiaryFinancial.
@Test
public void shouldHaveClmPassThruClaimProviderPaymentAmountToBeneficiaryFinancial() {
BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/nch_clm_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/nch_clm_bene_pmt_amt", "NCH Claim Payment Amount to Beneficiary")))).setUsed(new Money().setValueElement(new DecimalType("888.00")).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(benefit));
}
use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLineBenePmtAmt2.
@Test
public void shouldHaveLineItemAdjudicationLineBenePmtAmt2() {
BigDecimal amt = new BigDecimal(82.29);
amt = amt.setScale(2, RoundingMode.HALF_DOWN);
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategoryAndAmount("https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", 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", "paidtoprovider", "Paid to provider"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", "Line Payment Amount to Beneficiary")))).setAmount(new Money().setValue(amt).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
use of org.hl7.fhir.r5.model.Money in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLineBenePrmryPyrPdAmt.
@Test
public void shouldHaveLineItemAdjudicationLineBenePrmryPyrPdAmt() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", eob.getItemFirstRep().getAdjudication());
// Need to maintain trailing 0s in USD amount
BigDecimal amt = new BigDecimal(11.00);
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", "priorpayerpaid", "Prior payer paid"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", "Line Primary Payer (if not Medicare) Paid Amount")))).setAmount(new Money().setValue(amt).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
Aggregations