use of org.hl7.fhir.r4b.model.CodeSystem 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.r4b.model.CodeSystem 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.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class SNFClaimTransformerV2Test method shouldHaveDiagnosesMembers.
@Test
public void shouldHaveDiagnosesMembers() {
DiagnosisComponent diag1 = TransformerTestUtilsV2.findDiagnosisByCode("R4444", eob.getDiagnosis());
DiagnosisComponent cmp1 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag1.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-9-cm", "R4444", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), null, null);
assertTrue(cmp1.equalsDeep(diag1));
DiagnosisComponent diag2 = TransformerTestUtilsV2.findDiagnosisByCode("R5555", eob.getDiagnosis());
DiagnosisComponent cmp2 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag2.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-9-cm", "R5555", null), new Coding("http://terminology.hl7.org/CodeSystem/ex-diagnosistype", "principal", "Principal Diagnosis"), null, null);
assertTrue(cmp2.equalsDeep(diag2));
DiagnosisComponent diag3 = TransformerTestUtilsV2.findDiagnosisByCode("R6666", eob.getDiagnosis());
DiagnosisComponent cmp3 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag3.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-9-cm", "R6666", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), null, null);
assertTrue(cmp3.equalsDeep(diag3));
DiagnosisComponent diag4 = TransformerTestUtilsV2.findDiagnosisByCode("R2222", eob.getDiagnosis());
DiagnosisComponent cmp4 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag4.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-9-cm", "R2222", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "externalcauseofinjury", "External Cause of Injury"), null, null);
assertTrue(cmp4.equalsDeep(diag4));
DiagnosisComponent diag5 = TransformerTestUtilsV2.findDiagnosisByCode("R3333", eob.getDiagnosis());
DiagnosisComponent cmp5 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag5.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-9-cm", "R3333", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "externalcauseofinjury", "External Cause of Injury"), null, null);
assertTrue(cmp5.equalsDeep(diag5));
}
use of org.hl7.fhir.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class SNFClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrNcvrdChrgAmt.
@Test
public void shouldHaveLineItemAdjudicationRevCntrNcvrdChrgAmt() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_ncvrd_chrg_amt", eob.getItemFirstRep().getAdjudication());
// Need to maintain trailing 0s in USD amount
BigDecimal amt = new BigDecimal(88.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", "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(amt).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
use of org.hl7.fhir.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class SNFClaimTransformerV2Test method shouldHaveNchBloodPntsFrnshdQtySupInfo.
@Test
public void shouldHaveNchBloodPntsFrnshdQtySupInfo() {
SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/nch_blood_pnts_frnshd_qty", eob.getSupportingInfo());
SupportingInformationComponent compare = TransformerTestUtilsV2.createSupportingInfo(// We don't care what the sequence number is here
sic.getSequence(), // Category
Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/claiminformationcategory", "info", "Information"), new Coding("https://bluebutton.cms.gov/resources/codesystem/information", "https://bluebutton.cms.gov/resources/variables/nch_blood_pnts_frnshd_qty", "NCH Blood Pints Furnished Quantity"))).setValue(new Quantity().setValue(19).setUnit("pint").setSystem("http://unitsofmeasure.org").setCode("[pt_us]"));
assertTrue(compare.equalsDeep(sic));
}
Aggregations