Search in sources :

Example 56 with SupportingInformationComponent

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

the class SNFClaimTransformerV2Test method shouldHaveTypeOfBillSupInfo.

@Test
public void shouldHaveTypeOfBillSupInfo() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("typeofbill", 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", "typeofbill", "Type of Bill")), // Code
    new Coding("https://bluebutton.cms.gov/resources/variables/clm_freq_cd", "1", "Admit thru discharge claim"));
    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 SupportingInformationComponent

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

the class TransformerTestUtilsV2 method assertInfoWithCodeEquals.

/**
 * @param categoryVariable the {@link CcwCodebookVariable} matching the {@link
 *     SupportingInformationComponent#getCategory()} to find
 * @param codeSystemVariable the {@link CcwCodebookVariable} that should have been mapped to
 *     {@link SupportingInformationComponent#getCode()}'s {@link Coding#getSystem()}
 * @param codeValue the value that should have been mapped to {@link
 *     SupportingInformationComponent#getCode()}'s {@link Coding#getCode()}
 * @param eob the actual {@link ExplanationOfBenefit} to search
 */
static void assertInfoWithCodeEquals(CcwCodebookVariable categoryVariable, CcwCodebookVariable codeSystemVariable, Optional<?> codeValue, ExplanationOfBenefit eob) {
    SupportingInformationComponent info = assertHasInfo(categoryVariable, eob);
    assertHasCoding(codeSystemVariable, codeValue, info.getCode());
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)

Example 58 with SupportingInformationComponent

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

the class SNFClaimTransformerV2Test method shouldHaveNchQlfydStayFromDtSupInfo.

@Test
public void shouldHaveNchQlfydStayFromDtSupInfo() throws Exception {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/nch_qlfyd_stay_from_dt", 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_qlfyd_stay_from_dt", "NCH Qualified Stay From Date")));
    // timingPeriod
    Period period = new Period();
    period.setStart(new SimpleDateFormat("yyy-MM-dd").parse("2013-09-23"), TemporalPrecisionEnum.DAY);
    period.setEnd(new SimpleDateFormat("yyy-MM-dd").parse("2013-11-05"), 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 59 with SupportingInformationComponent

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

the class SNFClaimTransformerV2Test 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("2014-02-14"));
    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 60 with SupportingInformationComponent

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

the class SNFClaimTransformerV2Test method shouldHaveNchVrfdNcvrdStayFromDtSupInfo.

@Test
public void shouldHaveNchVrfdNcvrdStayFromDtSupInfo() throws Exception {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("https://bluebutton.cms.gov/resources/variables/nch_vrfd_ncvrd_stay_from_dt", 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_vrfd_ncvrd_stay_from_dt", "NCH Verified Non-covered Stay From Date")));
    // timingPeriod
    Period period = new Period();
    period.setStart(new SimpleDateFormat("yyy-MM-dd").parse("2002-01-11"), TemporalPrecisionEnum.DAY);
    period.setEnd(new SimpleDateFormat("yyy-MM-dd").parse("2002-01-21"), 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)

Aggregations

SupportingInformationComponent (org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent)68 Coding (org.hl7.fhir.r4.model.Coding)59 Test (org.junit.jupiter.api.Test)59 SupportingInformationComponent (org.hl7.fhir.dstu3.model.ExplanationOfBenefit.SupportingInformationComponent)11 DateType (org.hl7.fhir.r4.model.DateType)11 Period (org.hl7.fhir.r4.model.Period)6 SNFClaimLine (gov.cms.bfd.model.rif.SNFClaimLine)4 Quantity (org.hl7.fhir.r4.model.Quantity)4 Diagnosis (gov.cms.bfd.server.war.commons.Diagnosis)3 BigDecimal (java.math.BigDecimal)3 SimpleDateFormat (java.text.SimpleDateFormat)3 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)3 SimpleQuantity (org.hl7.fhir.r4.model.SimpleQuantity)3 FhirContext (ca.uhn.fhir.context.FhirContext)2 TemporalPrecisionEnum (ca.uhn.fhir.model.api.TemporalPrecisionEnum)2 CcwCodebookVariable (gov.cms.bfd.model.codebook.data.CcwCodebookVariable)2 CcwCodebookInterface (gov.cms.bfd.model.codebook.model.CcwCodebookInterface)2 CarrierClaim (gov.cms.bfd.model.rif.CarrierClaim)2 CarrierClaimColumn (gov.cms.bfd.model.rif.CarrierClaimColumn)2 CarrierClaimLine (gov.cms.bfd.model.rif.CarrierClaimLine)2