Search in sources :

Example 26 with CodeableConcept

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

the class OutpatientClaimTransformerV2Test method shouldHaveBenefitBalance.

/**
 * Benefit Balance
 */
@Test
public void shouldHaveBenefitBalance() {
    assertEquals(1, eob.getBenefitBalance().size());
    // Test Category here
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/ex-benefitcategory", "1", "Medical Care")));
    assertTrue(compare.equalsDeep(eob.getBenefitBalanceFirstRep().getCategory()));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 27 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept 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 28 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept 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 29 with CodeableConcept

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

the class DMEClaimTransformerV2Test method shouldHaveLineItemLocationCodeableConcept.

@Test
public void shouldHaveLineItemLocationCodeableConcept() {
    CodeableConcept location = eob.getItemFirstRep().getLocationCodeableConcept();
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", "12", "Home. Location, other than a hospital or other facility, where the patient receives care in a private residence.")));
    compare.setExtension(Arrays.asList(new Extension("https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", new Coding("https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", "MO", null))));
    assertTrue(compare.equalsDeep(location));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 30 with CodeableConcept

use of org.hl7.fhir.dstu2016may.model.CodeableConcept 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)

Aggregations

CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)566 Coding (org.hl7.fhir.r4.model.Coding)368 Test (org.junit.jupiter.api.Test)260 Test (org.junit.Test)155 CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)152 ArrayList (java.util.ArrayList)126 Money (org.hl7.fhir.r4.model.Money)122 Coding (org.hl7.fhir.dstu3.model.Coding)71 Date (java.util.Date)70 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)67 Reference (org.hl7.fhir.r4.model.Reference)64 Identifier (org.hl7.fhir.r4.model.Identifier)61 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)60 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)50 CodeableConcept (org.hl7.fhir.r5.model.CodeableConcept)47 DecimalType (org.hl7.fhir.r4.model.DecimalType)44 Concept (org.openmrs.Concept)42 Extension (org.hl7.fhir.r4.model.Extension)38 Resource (org.hl7.fhir.r4.model.Resource)38 List (java.util.List)37