Search in sources :

Example 31 with CodeSystem

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

the class CarrierClaimTransformerV2Test method shouldHaveCareTeamMembers.

@Test
public void shouldHaveCareTeamMembers() {
    // First member
    CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
    CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "8765676", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "referring", "Referring");
    assertTrue(compare1.equalsDeep(member1));
    // Second member
    CareTeamComponent member2 = TransformerTestUtilsV2.findCareTeamBySequence(2, eob.getCareTeam());
    CareTeamComponent compare2 = TransformerTestUtilsV2.createNpiCareTeamMember(2, "K25852", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "referring", "Referring");
    assertTrue(compare2.equalsDeep(member2));
    // // Third member
    CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
    CareTeamComponent compare3 = TransformerTestUtilsV2.createNpiCareTeamMember(3, "1923124", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider");
    compare3.setResponsible(true);
    compare3.setQualification(new CodeableConcept().setCoding(Arrays.asList(new Coding().setSystem("https://bluebutton.cms.gov/resources/variables/prvdr_spclty").setDisplay("Optometrist").setCode("41"))));
    compare3.addExtension("https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", new Coding().setSystem("https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd").setCode("0"));
    compare3.addExtension("https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", new Coding().setSystem("https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd").setCode("1").setDisplay("Participating"));
    assertTrue(compare3.equalsDeep(member3));
    // Fourth member
    CareTeamComponent member4 = TransformerTestUtilsV2.findCareTeamBySequence(4, eob.getCareTeam());
    CareTeamComponent compare4 = TransformerTestUtilsV2.createNpiCareTeamMember(4, "1497758544", "http://terminology.hl7.org/CodeSystem/claimcareteamrole", "primary", "Primary provider");
    compare4.getProvider().setDisplay("CUMBERLAND COUNTY HOSPITAL SYSTEM, INC");
    assertTrue(compare4.equalsDeep(member4));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 32 with CodeSystem

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

the class CoverageTransformerV2Test method verifyCoverageClass.

private static void verifyCoverageClass(String className) {
    assertEquals(2, coverage.getClass_().size());
    Coverage compare = new Coverage();
    compare.addClass_().setValue("Medicare").getType().addCoding().setCode("group").setDisplay("Group").setSystem("http://terminology.hl7.org/CodeSystem/coverage-class");
    compare.addClass_().setValue(className).getType().addCoding().setCode("plan").setDisplay("Plan").setSystem("http://terminology.hl7.org/CodeSystem/coverage-class");
    assertTrue(compare.getClass_().get(0).equalsDeep(coverage.getClass_().get(0)));
    assertTrue(compare.getClass_().get(1).equalsDeep(coverage.getClass_().get(1)));
}
Also used : Coverage(org.hl7.fhir.r4.model.Coverage)

Example 33 with CodeSystem

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

the class InpatientClaimTransformerV2Test method shouldHaveTotCoinsrncDaysCntFinancial.

@Test
public void shouldHaveTotCoinsrncDaysCntFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/bene_tot_coinsrnc_days_cnt", 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/bene_tot_coinsrnc_days_cnt", "Beneficiary Total Coinsurance Days Count")))).setUsed(new UnsignedIntType(0));
    assertTrue(compare.equalsDeep(benefit));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) UnsignedIntType(org.hl7.fhir.r4.model.UnsignedIntType) BenefitComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.BenefitComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 34 with CodeSystem

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

the class InpatientClaimTransformerV2Test method shouldHaveClmMcoPdSwSupInfo.

@Test
public void shouldHaveClmMcoPdSwSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/clm_mco_pd_sw", 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_mco_pd_sw", "Claim MCO Paid Switch")), // Code
    new Coding("https://bluebutton.cms.gov/resources/variables/clm_mco_pd_sw", "0", "No managed care organization (MCO) payment"));
    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 35 with CodeSystem

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

the class InpatientClaimTransformerV2Test method shouldHaveClmPpsCptlDsprprtntShrAmtFinancial.

@Test
public void shouldHaveClmPpsCptlDsprprtntShrAmtFinancial() {
    BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/clm_pps_cptl_dsprprtnt_shr_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_dsprprtnt_shr_amt", "Claim PPS Capital Disproportionate Share Amount")))).setUsed(new Money().setValue(25.09).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