Search in sources :

Example 56 with CodeSystem

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

the class HHAClaimTransformerV2Test method shouldHaveClmMcoPdSwSupInfo.

@Test
public void shouldHaveClmMcoPdSwSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/clm_pps_ind_cd", 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/clm_pps_ind_cd", "Claim PPS Indicator Code")), // Code
    new Coding("https://bluebutton.cms.gov/resources/variables/clm_pps_ind_cd", "2", "PPS bill; claim contains PPS indicator"));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 57 with CodeSystem

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

the class HHAClaimTransformerV2Test method shouldHaveDischargeStatusSupInfo.

@Test
public void shouldHaveDischargeStatusSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("discharge-status", eob.getSupportingInfo());
    SupportingInformationComponent compare = TransformerTestUtilsV2.createSupportingInfo(// We don't care what the sequence number is here
    sic.getSequence(), // Category
    Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", "discharge-status", "Discharge Status")), // Code
    new Coding("https://bluebutton.cms.gov/resources/variables/ptnt_dschrg_stus_cd", "1", null));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 58 with CodeSystem

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

the class HHAClaimTransformerV2Test method shouldHaveLineItemModifier.

@Test
public void shouldHaveLineItemModifier() {
    assertEquals(2, eob.getItemFirstRep().getModifier().size());
    CodeableConcept modifier = eob.getItemFirstRep().getModifierFirstRep();
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/codesystem/hcpcs", "KO", null)));
    assertTrue(compare.equalsDeep(modifier));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 59 with CodeSystem

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

the class InpatientClaimTransformerV2Test 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-10", "R4444", null), new Coding("http://terminology.hl7.org/CodeSystem/ex-diagnosistype", "admitting", "Admitting Diagnosis"), 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-10", "R5555", null), new Coding("http://terminology.hl7.org/CodeSystem/ex-diagnosistype", "principal", "Principal Diagnosis"), 1, "Y");
    assertTrue(cmp2.equalsDeep(diag2));
    DiagnosisComponent diag3 = TransformerTestUtilsV2.findDiagnosisByCode("A7777", eob.getDiagnosis());
    DiagnosisComponent cmp3 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag3.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "A7777", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), 2, "N");
    assertTrue(cmp3.equalsDeep(diag3));
    DiagnosisComponent diag4 = TransformerTestUtilsV2.findDiagnosisByCode("R8888", eob.getDiagnosis());
    DiagnosisComponent cmp4 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag4.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "R8888", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), 3, "N");
    assertTrue(cmp4.equalsDeep(diag4));
    DiagnosisComponent diag5 = TransformerTestUtilsV2.findDiagnosisByCode("K71234", eob.getDiagnosis());
    DiagnosisComponent cmp5 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag5.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "K71234", null), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), 4, "N");
    assertTrue(cmp5.equalsDeep(diag5));
    DiagnosisComponent diag6 = TransformerTestUtilsV2.findDiagnosisByCode("7840", eob.getDiagnosis());
    DiagnosisComponent cmp6 = TransformerTestUtilsV2.createDiagnosis(// Order doesn't matter
    diag6.getSequence(), new Coding("http://hl7.org/fhir/sid/icd-10", "7840", "HEADACHE"), new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", "other", "Other"), 5, "N");
    assertTrue(cmp6.equalsDeep(diag6));
    DiagnosisComponent diag7 = TransformerTestUtilsV2.findDiagnosisByCode("R2222", eob.getDiagnosis());
    DiagnosisComponent cmp7 = TransformerTestUtilsV2.createExDiagnosis(// Order doesn't matter
    diag7.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"), 1, "N");
    assertTrue(cmp7.equalsDeep(diag7));
    DiagnosisComponent diag8 = TransformerTestUtilsV2.findDiagnosisByCode("R3333", eob.getDiagnosis());
    DiagnosisComponent cmp8 = TransformerTestUtilsV2.createExDiagnosis(// Order doesn't matter
    diag8.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"), 2, "Y");
    assertTrue(cmp8.equalsDeep(diag8));
}
Also used : DiagnosisComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.DiagnosisComponent) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 60 with CodeSystem

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

the class InpatientClaimTransformerV2Test method shouldHaveClmPpsCptlExcptnAmtFinancial.

@Test
public void shouldHaveClmPpsCptlExcptnAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/clm_pps_cptl_excptn_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/clm_pps_cptl_excptn_amt", "Claim PPS Capital Exception Amount")))).setUsed(new Money().setValue(0).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(benefit));
}
Also used : Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) 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