Search in sources :

Example 1 with CodeSystem

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

the class OutpatientClaimTransformerV2Test method shouldHaveClaimReceivedDateSupInfo.

@Test
public void shouldHaveClaimReceivedDateSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("clmrecvddate", 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", "clmrecvddate", "Claim Received Date"), new Coding("https://bluebutton.cms.gov/resources/codesystem/information", "https://bluebutton.cms.gov/resources/variables/nch_wkly_proc_dt", "NCH Weekly Claim Processing Date"))).setTiming(new DateType("2011-02-26"));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) DateType(org.hl7.fhir.r4.model.DateType) Test(org.junit.jupiter.api.Test)

Example 2 with CodeSystem

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrPrvdrPmtAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrPrvdrPmtAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_prvdr_pmt_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "paidtoprovider", "Paid to provider"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_prvdr_pmt_amt", "Revenue Center (Medicare) Provider Payment Amount")))).setAmount(new Money().setValue(200).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 3 with CodeSystem

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrCoinsrncWgeAdjstdC.

@Test
public void shouldHaveLineItemAdjudicationRevCntrCoinsrncWgeAdjstdC() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_coinsrnc_wge_adjstd_c", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", "coinsurance", "Co-insurance"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_coinsrnc_wge_adjstd_c", "Revenue Center Coinsurance/Wage Adjusted Coinsurance Amount")))).setAmount(new Money().setValue(15.23).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 4 with CodeSystem

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

the class OutpatientClaimTransformerV2Test method shouldHaveCareTeamMembers.

/**
 * Testing all of these in one test, just because there isn't a distinct identifier really for
 * each
 */
@Test
public void shouldHaveCareTeamMembers() {
    // First member
    CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
    CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "2222222222", "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 = TransformerTestUtilsV2.createNpiCareTeamMember(2, "3333333333", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "operating", "Operating");
    assertTrue(compare2.equalsDeep(member2));
    // Third member
    CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
    CareTeamComponent compare3 = TransformerTestUtilsV2.createNpiCareTeamMember(3, "4444", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "otheroperating", "Other Operating");
    assertTrue(compare3.equalsDeep(member3));
    // Fourth member
    CareTeamComponent member4 = TransformerTestUtilsV2.findCareTeamBySequence(4, eob.getCareTeam());
    CareTeamComponent compare4 = TransformerTestUtilsV2.createNpiCareTeamMember(4, "345345345", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider");
    assertTrue(compare4.equalsDeep(member4));
}
Also used : CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) Test(org.junit.jupiter.api.Test)

Example 5 with CodeSystem

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

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemAdjudicationRevCntrCashDdctblAmt.

@Test
public void shouldHaveLineItemAdjudicationRevCntrCashDdctblAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/rev_cntr_cash_ddctbl_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "deductible", "Deductible"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/rev_cntr_cash_ddctbl_amt", "Revenue Center Cash Deductible Amount")))).setAmount(new Money().setValue(12.89).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

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