use of org.hl7.fhir.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class HospiceClaimTransformerV2Test method shouldHaveAllDiagnosis.
@Test
public void shouldHaveAllDiagnosis() {
List<DiagnosisComponent> expected = eob.getDiagnosis();
assertEquals(4, expected.size());
DiagnosisComponent diag1 = TransformerTestUtilsV2.findDiagnosisByCode("R5555", eob.getDiagnosis());
DiagnosisComponent cmp1 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag1.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(cmp1.equalsDeep(diag1));
DiagnosisComponent diag2 = TransformerTestUtilsV2.findDiagnosisByCode("R6666", eob.getDiagnosis());
DiagnosisComponent cmp2 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag2.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "R6666", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), null, null);
assertTrue(cmp2.equalsDeep(diag2));
DiagnosisComponent diag3 = TransformerTestUtilsV2.findDiagnosisByCode("R2222", eob.getDiagnosis());
DiagnosisComponent cmp3 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag3.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "R2222", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "externalcauseofinjury", "External Cause of Injury"), null, null);
assertTrue(cmp3.equalsDeep(diag3));
DiagnosisComponent diag4 = TransformerTestUtilsV2.findDiagnosisByCode("R3333", eob.getDiagnosis());
DiagnosisComponent cmp4 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
diag4.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "R3333", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "externalcauseofinjury", "External Cause of Injury"), null, null);
assertTrue(cmp3.equalsDeep(diag3));
}
use of org.hl7.fhir.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class HospiceClaimTransformerV2Test method shouldHaveTotalChargeAmtAdjudication.
@Test
public void shouldHaveTotalChargeAmtAdjudication() {
// 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().setValueElement(new DecimalType("199.99")).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(total));
}
use of org.hl7.fhir.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class HospiceClaimTransformerV2Test method shouldHaveLineItemRevCenterTotalChargeAmtAdjudication.
@Test
public void shouldHaveLineItemRevCenterTotalChargeAmtAdjudication() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_tot_chrg_amt", eob.getItemFirstRep().getAdjudication());
assertNotNull(adjudication);
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().setValueElement(new DecimalType("2555.00")).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 HospiceClaimTransformerV2Test method shouldHaveCareTeamMembers.
@Test
public void shouldHaveCareTeamMembers() {
// First member
CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "8888888888", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "attending", "Attending");
assertTrue(compare1.equalsDeep(member1));
// Second member
CareTeamComponent member2 = TransformerTestUtilsV2.findCareTeamBySequence(2, eob.getCareTeam());
CareTeamComponent compare2 = new CareTeamComponent().setSequence(2).setProvider(new Reference().setIdentifier(TransformerTestUtilsV2.createIdentifier(null, "0", "http://terminology.hl7.org/CodeSystem/v2-0203", "UPIN", "Medicare/CMS (formerly HCFA)'s Universal Physician Identification numbers"))).setRole(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider"))));
assertTrue(compare2.equalsDeep(member2));
// // Third member
CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
CareTeamComponent compare3 = new CareTeamComponent().setSequence(3).setProvider(new Reference().setIdentifier(TransformerTestUtilsV2.createIdentifier(null, "345345345", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", "npi", "National Provider Identifier"))).setRole(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider"))));
assertTrue(compare3.equalsDeep(member3));
}
use of org.hl7.fhir.r4b.model.CodeSystem in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLinePrmryAlowdChrgAmt.
@Test
public void shouldHaveLineItemAdjudicationLinePrmryAlowdChrgAmt() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/line_prmry_alowd_chrg_amt", eob.getItemFirstRep().getAdjudication());
AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "eligible", "Eligible Amount"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_prmry_alowd_chrg_amt", "Line Primary Payer Allowed Charge Amount")))).setAmount(new Money().setValue(20.29).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
Aggregations