Search in sources :

Example 21 with CodeSystem

use of org.hl7.fhir.dstu2016may.model.CodeSystem in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLineSubmtdChrgAmt.

@Test
public void shouldHaveLineItemAdjudicationLineSubmtdChrgAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", eob.getItemFirstRep().getAdjudication());
    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/line_sbmtd_chrg_amt", "Line Submitted Charge Amount")))).setAmount(new Money().setValue(130.45).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)

Example 22 with CodeSystem

use of org.hl7.fhir.dstu2016may.model.CodeSystem in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveLineHctHgbRsltNumSupInfo.

@Test
public void shouldHaveLineHctHgbRsltNumSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", 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/line_hct_hgb_rslt_num", "Hematocrit / Hemoglobin Test Results")));
    compare.setValue(new Reference("#line-observation-1"));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) Reference(org.hl7.fhir.r4.model.Reference) Test(org.junit.jupiter.api.Test)

Example 23 with CodeSystem

use of org.hl7.fhir.dstu2016may.model.CodeSystem in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveDiagnosesMembers.

@Test
public void shouldHaveDiagnosesMembers() {
    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-10", "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("G6666", eob.getDiagnosis());
    DiagnosisComponent cmp3 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag3.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "G6666", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "secondary", "Secondary"), null, null);
    assertTrue(cmp3.equalsDeep(diag3));
}
Also used : DiagnosisComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 24 with CodeSystem

use of org.hl7.fhir.dstu2016may.model.CodeSystem 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 25 with CodeSystem

use of org.hl7.fhir.dstu2016may.model.CodeSystem 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)

Aggregations

Test (org.junit.jupiter.api.Test)314 Coding (org.hl7.fhir.r4.model.Coding)271 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)214 Money (org.hl7.fhir.r4.model.Money)118 ArrayList (java.util.ArrayList)80 CodeSystem (org.hl7.fhir.r5.model.CodeSystem)70 AdjudicationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent)64 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)64 SupportingInformationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)59 BenefitComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent)56 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)54 Identifier (org.hl7.fhir.r4.model.Identifier)50 Resource (org.hl7.fhir.r4.model.Resource)45 DecimalType (org.hl7.fhir.r4.model.DecimalType)44 FHIRException (org.hl7.fhir.exceptions.FHIRException)39 ConceptDefinitionComponent (org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent)36 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)34 ValueSet (org.hl7.fhir.r5.model.ValueSet)33 CodeSystem (org.hl7.fhir.r4.model.CodeSystem)32 IOException (java.io.IOException)31