use of org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent in project beneficiary-fhir-data by CMSgov.
the class TransformerUtils method createAdjudicationCategory.
/**
* @param ccwVariable the {@link CcwCodebookInterface} being mapped
* @return the {@link AdjudicationComponent#getCategory()} {@link CodeableConcept} to use for the
* specified {@link CcwCodebookInterface}
*/
static CodeableConcept createAdjudicationCategory(CcwCodebookInterface ccwVariable) {
/*
* Adjudication.category is mapped a bit differently than other Codings/CodeableConcepts: they
* all share the same Coding.system and use the CcwCodebookVariable reference URL as their
* Coding.code. This looks weird, but makes it easy for API developers to find more information
* about what the specific adjudication they're looking at means.
*/
String conceptCode = CCWUtils.calculateVariableReferenceUrl(ccwVariable);
CodeableConcept categoryConcept = createCodeableConcept(TransformerConstants.CODING_CCW_ADJUDICATION_CATEGORY, conceptCode);
categoryConcept.getCodingFirstRep().setDisplay(ccwVariable.getVariable().getLabel());
return categoryConcept;
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent in project beneficiary-fhir-data by CMSgov.
the class TransformerUtilsV2 method createAdjudicationCategory.
/**
* @param ccwVariable the {@link CcwCodebookInterface} being mapped
* @return the {@link AdjudicationComponent#getCategory()} {@link CodeableConcept} to use for the
* specified {@link CcwCodebookInterface}
*/
static CodeableConcept createAdjudicationCategory(CcwCodebookInterface ccwVariable, String carinAdjuCode, String carinAdjuCodeDisplay) {
/*
* Adjudication.category is mapped a bit differently than other Codings/CodeableConcepts: they
* all share the same Coding.system and use the CcwCodebookInterface reference URL as their
* Coding.code. This looks weird, but makes it easy for API developers to find more information
* about what the specific adjudication they're looking at means.
*/
String conceptCode = CCWUtils.calculateVariableReferenceUrl(ccwVariable);
CodeableConcept categoryConcept = createCodeableConcept(TransformerConstants.CODING_CCW_ADJUDICATION_CATEGORY, conceptCode);
categoryConcept.getCodingFirstRep().setDisplay(ccwVariable.getVariable().getLabel());
categoryConcept.addCoding().setSystem(C4BBAdjudication.SUBMITTED.getSystem()).setCode(carinAdjuCode).setDisplay(carinAdjuCodeDisplay);
return categoryConcept;
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent in project beneficiary-fhir-data by CMSgov.
the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrPrvdrPmtAmt.
@Test
public void shouldHaveLineItemAdjudicationRevCntrPrvdrPmtAmt() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_prvdr_pmt_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/rev_cntr_prvdr_pmt_amt", "Revenue Center (Medicare) Provider Payment Amount")))).setAmount(new Money().setValue(200).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent in project beneficiary-fhir-data by CMSgov.
the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrCoinsrncWgeAdjstdC.
@Test
public void shouldHaveLineItemAdjudicationRevCntrCoinsrncWgeAdjstdC() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_coinsrnc_wge_adjstd_c", eob.getItemFirstRep().getAdjudication());
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/rev_cntr_coinsrnc_wge_adjstd_c", "Revenue Center Coinsurance/Wage Adjusted Coinsurance Amount")))).setAmount(new Money().setValue(15.23).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent in project beneficiary-fhir-data by CMSgov.
the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrCashDdctblAmt.
@Test
public void shouldHaveLineItemAdjudicationRevCntrCashDdctblAmt() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_cash_ddctbl_amt", 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/rev_cntr_cash_ddctbl_amt", "Revenue Center Cash Deductible Amount")))).setAmount(new Money().setValue(12.89).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
Aggregations