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));
}
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));
}
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));
}
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));
}
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));
}
Aggregations