Search in sources :

Example 96 with CodeableConcept

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

the class SNFClaimTransformerV2Test method shouldHaveClmTotChrgAmtTotal.

@Test
public void shouldHaveClmTotChrgAmtTotal() {
    // Only one so just pull it directly and compare
    TotalComponent total = eob.getTotalFirstRep();
    TotalComponent compare = new TotalComponent().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/clm_tot_chrg_amt", "Claim Total Charge Amount")))).setAmount(new Money().setValue(5555.03).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(total));
}
Also used : TotalComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.TotalComponent) Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 97 with CodeableConcept

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

the class SNFClaimTransformerV2Test method shouldHaveBeneTotCoinsrncDaysCntFinancial.

@Test
public void shouldHaveBeneTotCoinsrncDaysCntFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/bene_tot_coinsrnc_days_cnt", 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/bene_tot_coinsrnc_days_cnt", "Beneficiary Total Coinsurance Days Count")))).setUsed(new UnsignedIntType().setValue(17));
    assertTrue(compare.equalsDeep(benefit));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) UnsignedIntType(org.hl7.fhir.r4.model.UnsignedIntType) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 98 with CodeableConcept

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

the class SNFClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrTotChrgAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrTotChrgAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_tot_chrg_amt", eob.getItemFirstRep().getAdjudication());
    // Need to maintain trailing 0s in USD amount
    BigDecimal amt = new BigDecimal(95.00);
    amt = amt.setScale(2, RoundingMode.HALF_DOWN);
    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_tot_chrg_amt", "Revenue Center Total Charge 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)

Example 99 with CodeableConcept

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

the class SNFClaimTransformerV2Test method shouldHaveNchIpTotDdctnAmtFinancial.

@Test
public void shouldHaveNchIpTotDdctnAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/nch_ip_tot_ddctn_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_ip_tot_ddctn_amt", "NCH Inpatient (or other Part A) Total Deductible/Coinsurance Amount")))).setUsed(new Money().setValueElement(new DecimalType("14.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 100 with CodeableConcept

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

the class SamhsaMatcherR4FromClaimTransformerV2Test method verifySamhsaMatcherForItemWithMultiCoding.

/**
 * Verify SAMHSA matcher for item with the given system, code and if the expectation is that there
 * should be a match for this combination.
 *
 * @param system the system value of the first coding
 * @param code the code of the first coding
 * @param system2 the system value of the second coding
 * @param code2 the code of the second coding
 * @param shouldMatch if the matcher should match on this combination
 * @param explanationOfBenefit the explanation of benefit
 */
private void verifySamhsaMatcherForItemWithMultiCoding(String system, String code, String system2, String code2, boolean shouldMatch, ExplanationOfBenefit explanationOfBenefit) {
    ExplanationOfBenefit modifiedEob = explanationOfBenefit.copy();
    // Set Top level diagnosis and package code to null so we can test item logic
    for (ExplanationOfBenefit.DiagnosisComponent diagnosisComponent : modifiedEob.getDiagnosis()) {
        CodeableConcept codeableConcept = diagnosisComponent.getDiagnosisCodeableConcept();
        codeableConcept.setCoding(new ArrayList<>());
        diagnosisComponent.setPackageCode(null);
    }
    List<Coding> codings = new ArrayList<>();
    Coding coding = new Coding();
    coding.setSystem(system);
    coding.setCode(code);
    Coding coding2 = new Coding();
    coding2.setSystem(system2);
    coding2.setCode(code2);
    codings.add(coding);
    codings.add(coding2);
    modifiedEob.getItem().get(0).getProductOrService().setCoding(codings);
    assertEquals(shouldMatch, samhsaMatcherV2.test(modifiedEob));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) ArrayList(java.util.ArrayList) ExplanationOfBenefit(org.hl7.fhir.r4.model.ExplanationOfBenefit) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

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