use of gov.cms.bfd.model.rda.PreAdjFissPayer in project beneficiary-fhir-data by CMSgov.
the class FissClaimTransformerTest method basicFieldsTestForInsuredPayerObjectTransformation.
/**
* Basic smoke test for transformation of insured payer objects prior to all of the individual
* field tests.
*/
@Test
public void basicFieldsTestForInsuredPayerObjectTransformation() {
claimBuilder.setDcn("dcn").setHicNo("hicn").setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_MOVE).setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL).setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_FINAL).addFissPayers(FissPayer.newBuilder().setInsuredPayer(FissInsuredPayer.newBuilder().setPayersIdEnum(FissPayersCode.PAYERS_CODE_BLACK_LUNG).setPayersName("payers-name").setRelIndEnum(FissReleaseOfInformation.RELEASE_OF_INFORMATION_NO_RELEASE_ON_FILE).setAssignIndEnum(FissAssignmentOfBenefitsIndicator.ASSIGNMENT_OF_BENEFITS_INDICATOR_BENEFITS_ASSIGNED).setProviderNumber("provider-num").setAdjDcnIcn("dcn-icn").setPriorPmt("123.45").setEstAmtDue("234.56").setInsuredRelEnum(FissPatientRelationshipCode.PATIENT_RELATIONSHIP_CODE_EMPLOYEE).setInsuredName("insured-name").setInsuredSsnHic("ssn-hic").setInsuredGroupName("group-name").setInsuredGroupNbr("group-num").setTreatAuthCd("auth-code").setInsuredSexEnum(FissBeneficiarySex.BENEFICIARY_SEX_MALE).setInsuredRelX12Enum(FissPatientRelationshipCode.PATIENT_RELATIONSHIP_CODE_GRANDCHILD).setInsuredDobText("11222021").setInsuredDob("2021-11-22").build()).build());
claim.setDcn("dcn");
claim.setHicNo("hicn");
claim.setCurrStatus('M');
claim.setCurrLoc1('M');
claim.setCurrLoc2("9997");
claim.setLastUpdated(clock.instant());
PreAdjFissPayer payer = new PreAdjFissPayer();
payer.setDcn("dcn");
payer.setPriority((short) 0);
payer.setPayerType(PreAdjFissPayer.PayerType.Insured);
payer.setPayersId("H");
payer.setPayersName("payers-name");
payer.setRelInd("N");
payer.setAssignInd("Y");
payer.setProviderNumber("provider-num");
payer.setAdjDcnIcn("dcn-icn");
payer.setPriorPmt(new BigDecimal("123.45"));
payer.setEstAmtDue(new BigDecimal("234.56"));
payer.setInsuredRel("08");
payer.setInsuredName("insured-name");
payer.setInsuredSsnHic("ssn-hic");
payer.setInsuredGroupName("group-name");
payer.setInsuredGroupNbr("group-num");
payer.setTreatAuthCd("auth-code");
payer.setInsuredSex("M");
payer.setInsuredRelX12("13");
payer.setInsuredDob(LocalDate.of(2021, 11, 22));
payer.setInsuredDobText("11222021");
payer.setLastUpdated(claim.getLastUpdated());
claim.getPayers().add(payer);
changeBuilder.setSeq(MIN_SEQUENCE_NUM).setChangeType(ChangeType.CHANGE_TYPE_UPDATE).setClaim(claimBuilder.build());
PreAdjFissClaim transformed = transformer.transformClaim(changeBuilder.build()).getClaim();
assertThat(transformed, samePropertyValuesAs(claim));
TransformerTestUtils.assertListContentsHaveSamePropertyValues(claim.getPayers(), transformed.getPayers(), PreAdjFissPayer::getPriority);
}
use of gov.cms.bfd.model.rda.PreAdjFissPayer in project beneficiary-fhir-data by CMSgov.
the class RDATestUtils method fissTestDataA.
/**
* One FISS claim for testing
*
* @return The FISS test claim A
*/
private PreAdjFissClaim fissTestDataA(Mbi mbi) {
PreAdjFissClaim claim = PreAdjFissClaim.builder().sequenceNumber(1L).dcn("123456").hicNo("hicnumber").currStatus('a').currLoc1('z').currLoc2("Somda").medaProvId("meda12345").fedTaxNumber("tax12345").totalChargeAmount(new BigDecimal("1234.32")).receivedDate(LocalDate.ofEpochDay(0)).currTranDate(LocalDate.ofEpochDay(1)).admitDiagCode("admitcd").principleDiag("princcd").npiNumber("8876543211").mbiRecord(mbi).fedTaxNumber("abc123").lobCd("r").lastUpdated(Instant.ofEpochMilli(0)).stmtCovFromDate(LocalDate.ofEpochDay(200)).stmtCovToDate(LocalDate.ofEpochDay(200)).servTypeCd("A").freqCd("C").build();
Set<PreAdjFissProcCode> procCodes = Set.of(PreAdjFissProcCode.builder().dcn("123456").priority((short) 0).procCode("CODEABC").procFlag("FLAG").procDate(LocalDate.ofEpochDay(200)).lastUpdated(Instant.ofEpochMilli(0)).build(), PreAdjFissProcCode.builder().dcn("123456").priority((short) 1).procCode("CODECBA").procFlag("FLA2").lastUpdated(Instant.ofEpochMilli(0)).build());
Set<PreAdjFissDiagnosisCode> diagnosisCodes = Set.of(PreAdjFissDiagnosisCode.builder().dcn("123456").priority((short) 0).diagCd2("admitcd").diagPoaInd("Z").build(), PreAdjFissDiagnosisCode.builder().dcn("123456").priority((short) 1).diagCd2("other").diagPoaInd("U").build(), PreAdjFissDiagnosisCode.builder().dcn("123456").priority((short) 2).diagCd2("princcd").diagPoaInd("n").build());
Set<PreAdjFissPayer> payers = Set.of(PreAdjFissPayer.builder().dcn("123456").priority((short) 0).beneFirstName("jim").beneMidInit("k").beneLastName("baker").beneSex("m").beneDob(LocalDate.of(1975, 3, 1)).payerType(PreAdjFissPayer.PayerType.BeneZ).payersName("MEDICARE").build(), PreAdjFissPayer.builder().dcn("123456").priority((short) 1).insuredName("BAKER JIM K").payerType(PreAdjFissPayer.PayerType.Insured).payersName("BCBS KC").build());
claim.setPayers(payers);
claim.setProcCodes(procCodes);
claim.setDiagCodes(diagnosisCodes);
return claim;
}
use of gov.cms.bfd.model.rda.PreAdjFissPayer in project beneficiary-fhir-data by CMSgov.
the class RDATestUtils method fissTestDataB.
/**
* One FISS claim for testing
*
* @return The FISS test claim B
*/
private PreAdjFissClaim fissTestDataB(Mbi mbi) {
PreAdjFissClaim claim = PreAdjFissClaim.builder().sequenceNumber(2L).dcn("123457").hicNo("hicnumbe2").currStatus('t').currLoc1('r').currLoc2("Somdb").medaProvId("meda12346").fedTaxNumber("tax12345").totalChargeAmount(new BigDecimal("1235.32")).receivedDate(LocalDate.ofEpochDay(8)).currTranDate(LocalDate.ofEpochDay(12)).admitDiagCode("admitcc").principleDiag("princcc").npiNumber("8876543212").mbiRecord(mbi).fedTaxNumber("abc124").lobCd("k").lastUpdated(Instant.ofEpochMilli(5000)).stmtCovFromDate(LocalDate.ofEpochDay(211)).stmtCovToDate(LocalDate.ofEpochDay(211)).servTypeCd("A").freqCd("C").build();
Set<PreAdjFissProcCode> procCodes = Set.of(PreAdjFissProcCode.builder().dcn("123457").priority((short) 0).procCode("CODEABD").procFlag("FLAC").procDate(LocalDate.ofEpochDay(211)).lastUpdated(Instant.ofEpochMilli(5000)).build());
Set<PreAdjFissDiagnosisCode> diagnosisCodes = Set.of(PreAdjFissDiagnosisCode.builder().dcn("123457").priority((short) 0).diagCd2("princcc").diagPoaInd("Y").build(), PreAdjFissDiagnosisCode.builder().dcn("123457").priority((short) 1).diagCd2("other2").diagPoaInd("w").build(), PreAdjFissDiagnosisCode.builder().dcn("123457").priority((short) 2).diagCd2("admitcc").diagPoaInd("1").build());
Set<PreAdjFissPayer> payers = Set.of(PreAdjFissPayer.builder().dcn("123457").priority((short) 0).beneFirstName("alice").beneMidInit("r").beneLastName("smith").beneSex("f").beneDob(LocalDate.of(1981, 8, 13)).payerType(PreAdjFissPayer.PayerType.BeneZ).payersName("MEDICARE").build(), PreAdjFissPayer.builder().dcn("123457").priority((short) 1).insuredName("SMITH ALICE R").payerType(PreAdjFissPayer.PayerType.Insured).payersName("BCBS KC").build());
claim.setPayers(payers);
claim.setProcCodes(procCodes);
claim.setDiagCodes(diagnosisCodes);
return claim;
}
use of gov.cms.bfd.model.rda.PreAdjFissPayer in project beneficiary-fhir-data by CMSgov.
the class FissClaimResponseTransformerV2 method getContainedPatient.
private static Resource getContainedPatient(PreAdjFissClaim claimGroup) {
Optional<PreAdjFissPayer> optional = claimGroup.getPayers().stream().filter(p -> p.getPayerType() == PreAdjFissPayer.PayerType.BeneZ).findFirst();
Patient patient;
if (optional.isPresent()) {
PreAdjFissPayer benePayer = optional.get();
patient = getContainedPatient(claimGroup.getMbi(), new PatientInfo(benePayer.getBeneFirstName(), benePayer.getBeneLastName(), ifNotNull(benePayer.getBeneMidInit(), s -> s.charAt(0) + "."), benePayer.getBeneDob(), benePayer.getBeneSex()));
} else {
patient = getContainedPatient(claimGroup.getMbi(), null);
}
return patient;
}
use of gov.cms.bfd.model.rda.PreAdjFissPayer in project beneficiary-fhir-data by CMSgov.
the class FissClaimTransformerV2 method getContainedPatient.
private static Resource getContainedPatient(PreAdjFissClaim claimGroup) {
Optional<PreAdjFissPayer> optional = claimGroup.getPayers().stream().filter(p -> p.getPayerType() == PreAdjFissPayer.PayerType.BeneZ).findFirst();
Patient patient;
if (optional.isPresent()) {
PreAdjFissPayer benePayer = optional.get();
patient = getContainedPatient(claimGroup.getMbi(), new PatientInfo(benePayer.getBeneFirstName(), benePayer.getBeneLastName(), ifNotNull(benePayer.getBeneMidInit(), s -> s.charAt(0) + "."), benePayer.getBeneDob(), benePayer.getBeneSex()));
} else {
patient = getContainedPatient(claimGroup.getMbi(), null);
}
return patient;
}
Aggregations