Search in sources :

Example 41 with Coding

use of org.hl7.fhir.r4b.model.Coding in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveBenefitBalance.

/**
 * Benefit Balance
 */
@Test
public void shouldHaveBenefitBalance() {
    assertEquals(1, eob.getBenefitBalance().size());
    // Test Category here
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/ex-benefitcategory", "1", "Medical Care")));
    assertTrue(compare.equalsDeep(eob.getBenefitBalanceFirstRep().getCategory()));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 42 with Coding

use of org.hl7.fhir.r4b.model.Coding in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLineNchPmtAmt.

@Test
public void shouldHaveLineItemAdjudicationLineNchPmtAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "benefit", "Benefit Amount"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", "Line NCH Medicare Payment Amount"))));
    compare.setExtension(Arrays.asList(new Extension("https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", new Coding("https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", "0", "80%"))));
    compare.setAmount(new Money().setValue(123.45).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(adjudication));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 43 with Coding

use of org.hl7.fhir.r4b.model.Coding in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test 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://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "priorpayerpaid", "Prior payer paid"), 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(0).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 44 with Coding

use of org.hl7.fhir.r4b.model.Coding in project beneficiary-fhir-data by CMSgov.

the class CarrierClaimTransformerV2Test method shouldHaveDiagnosesMembers.

@Test
public void shouldHaveDiagnosesMembers() {
    DiagnosisComponent diag1 = TransformerTestUtilsV2.findDiagnosisByCode("H5555", eob.getDiagnosis());
    DiagnosisComponent cmp1 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag1.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "H5555", null), new Coding("http://terminology.hl7.org/CodeSystem/ex-diagnosistype", "principal", "principal"), null, null);
    assertTrue(cmp1.equalsDeep(diag1));
    DiagnosisComponent diag2 = TransformerTestUtilsV2.findDiagnosisByCode("H8888", eob.getDiagnosis());
    DiagnosisComponent cmp2 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag2.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "H8888", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "secondary", "Secondary"), null, null);
    assertTrue(cmp2.equalsDeep(diag2));
    DiagnosisComponent diag3 = TransformerTestUtilsV2.findDiagnosisByCode("H66666", eob.getDiagnosis());
    DiagnosisComponent cmp3 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag3.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "H66666", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "secondary", "Secondary"), null, null);
    assertTrue(cmp3.equalsDeep(diag3));
    DiagnosisComponent diag4 = TransformerTestUtilsV2.findDiagnosisByCode("H77777", eob.getDiagnosis());
    DiagnosisComponent cmp4 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag4.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "H77777", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "secondary", "Secondary"), null, null);
    assertTrue(cmp4.equalsDeep(diag4));
    DiagnosisComponent diag5 = TransformerTestUtilsV2.findDiagnosisByCode("H12345", eob.getDiagnosis());
    DiagnosisComponent cmp5 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag5.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "H12345", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "secondary", "Secondary"), null, null);
    assertTrue(cmp5.equalsDeep(diag5));
}
Also used : DiagnosisComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 45 with Coding

use of org.hl7.fhir.r4b.model.Coding in project beneficiary-fhir-data by CMSgov.

the class CarrierClaimTransformerV2Test method shouldHaveLineItemPriorPayerPaidAdjudication.

@Test
public void shouldHaveLineItemPriorPayerPaidAdjudication() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("priorpayerpaid", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "priorpayerpaid", "Prior payer paid"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", "Line Primary Payer (if not Medicare) Paid Amount")))).setAmount(new Money().setValue(0).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) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Aggregations

Coding (org.hl7.fhir.r4.model.Coding)633 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)373 Test (org.junit.jupiter.api.Test)344 Test (org.junit.Test)175 ArrayList (java.util.ArrayList)133 Money (org.hl7.fhir.r4.model.Money)117 Coding (org.hl7.fhir.dstu3.model.Coding)114 Extension (org.hl7.fhir.r4.model.Extension)77 CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)73 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)68 Date (java.util.Date)66 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)65 Reference (org.hl7.fhir.r4.model.Reference)65 FHIRException (org.hl7.fhir.exceptions.FHIRException)63 SupportingInformationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)62 Bundle (org.hl7.fhir.r4.model.Bundle)58 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)57 Coding (org.hl7.fhir.r5.model.Coding)54 Observation (org.hl7.fhir.r4.model.Observation)49 DecimalType (org.hl7.fhir.r4.model.DecimalType)46