Search in sources :

Example 86 with CodeSystem

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

the class SNFClaimTransformerV2Test method shouldHaveAdmissionPeriodSupInfo.

@Test
public void shouldHaveAdmissionPeriodSupInfo() throws Exception {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("admissionperiod", 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", "admissionperiod", "Admission Period")));
    // timingPeriod
    Period period = new Period();
    period.setStart(new SimpleDateFormat("yyy-MM-dd").parse("2013-11-05"), TemporalPrecisionEnum.DAY);
    period.setEnd(new SimpleDateFormat("yyy-MM-dd").parse("2013-12-18"), TemporalPrecisionEnum.DAY);
    compare.setTiming(period);
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) Period(org.hl7.fhir.r4.model.Period) SimpleDateFormat(java.text.SimpleDateFormat) Test(org.junit.jupiter.api.Test)

Example 87 with CodeSystem

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

the class SNFClaimTransformerV2Test method shouldHaveNchPrmryPyrCdSupInfo.

@Test
public void shouldHaveNchPrmryPyrCdSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/nch_prmry_pyr_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/nch_prmry_pyr_cd", "NCH Primary Payer Code (if not Medicare)")), // Code
    new Coding("https://bluebutton.cms.gov/resources/variables/nch_prmry_pyr_cd", "A", "Employer group health plan (EGHP) insurance for an aged beneficiary"));
    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 88 with CodeSystem

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

the class SNFClaimTransformerV2Test 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 89 with CodeSystem

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

the class SNFClaimTransformerV2Test 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://terminology.hl7.org/CodeSystem/adjudication", "submitted", "Submitted Amount"), 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(5555.03).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 90 with CodeSystem

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

the class SNFClaimTransformerV2Test method shouldHaveBeneTotCoinsrncDaysCntFinancial.

@Test
public void shouldHaveBeneTotCoinsrncDaysCntFinancial() {
    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().setValue(17));
    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)

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