Search in sources :

Example 1 with PreAdjFissAuditTrail

use of gov.cms.bfd.model.rda.PreAdjFissAuditTrail in project beneficiary-fhir-data by CMSgov.

the class FissClaimTransformerTest method basicFieldsTestForAuditTrailObjectTransformation.

/**
 * Basic smoke test for transformation of audit trail objects prior to all of the individual field
 * tests.
 */
@Test
public void basicFieldsTestForAuditTrailObjectTransformation() {
    claimBuilder.setDcn("dcn").setHicNo("hicn").setCurrStatusEnum(FissClaimStatus.CLAIM_STATUS_MOVE).setCurrLoc1Enum(FissProcessingType.PROCESSING_TYPE_MANUAL).setCurrLoc2Enum(FissCurrentLocation2.CURRENT_LOCATION_2_FINAL).addFissAuditTrail(FissAuditTrail.newBuilder().setBadtStatusEnum(FissClaimStatus.CLAIM_STATUS_MOVE).setBadtLoc("1").setBadtOperId("2").setBadtReas("3").setBadtCurrDateCymd("2021-12-03").build());
    claim.setDcn("dcn");
    claim.setHicNo("hicn");
    claim.setCurrStatus('M');
    claim.setCurrLoc1('M');
    claim.setCurrLoc2("9997");
    claim.setLastUpdated(clock.instant());
    PreAdjFissAuditTrail auditTrail = new PreAdjFissAuditTrail();
    auditTrail.setDcn("dcn");
    auditTrail.setPriority((short) 0);
    auditTrail.setBadtStatus("M");
    auditTrail.setBadtLoc("1");
    auditTrail.setBadtOperId("2");
    auditTrail.setBadtReas("3");
    auditTrail.setBadtCurrDate(LocalDate.of(2021, 12, 3));
    auditTrail.setLastUpdated(claim.getLastUpdated());
    claim.getAuditTrail().add(auditTrail);
    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.getAuditTrail(), transformed.getAuditTrail(), PreAdjFissAuditTrail::getPriority);
}
Also used : PreAdjFissAuditTrail(gov.cms.bfd.model.rda.PreAdjFissAuditTrail) PreAdjFissClaim(gov.cms.bfd.model.rda.PreAdjFissClaim) Test(org.junit.jupiter.api.Test)

Example 2 with PreAdjFissAuditTrail

use of gov.cms.bfd.model.rda.PreAdjFissAuditTrail in project beneficiary-fhir-data by CMSgov.

the class FissClaimTransformer method transformMessageImpl.

private PreAdjFissAuditTrail transformMessageImpl(FissAuditTrail from, DataTransformer transformer, Instant now, String namePrefix) {
    final PreAdjFissAuditTrail to = new PreAdjFissAuditTrail();
    to.setLastUpdated(now);
    transformer.copyEnumAsString(namePrefix + PreAdjFissAuditTrail.Fields.badtStatus, true, 1, PreAdjFissAuditTrail_badtStatus_Extractor.getEnumString(from), to::setBadtStatus);
    transformer.copyOptionalString(namePrefix + PreAdjFissAuditTrail.Fields.badtLoc, 1, 5, from::hasBadtLoc, from::getBadtLoc, to::setBadtLoc);
    transformer.copyOptionalString(namePrefix + PreAdjFissAuditTrail.Fields.badtOperId, 1, 9, from::hasBadtOperId, from::getBadtOperId, to::setBadtOperId);
    transformer.copyOptionalString(namePrefix + PreAdjFissAuditTrail.Fields.badtReas, 1, 5, from::hasBadtReas, from::getBadtReas, to::setBadtReas);
    transformer.copyOptionalDate(namePrefix + PreAdjFissAuditTrail.Fields.badtCurrDate, from::hasBadtCurrDateCymd, from::getBadtCurrDateCymd, to::setBadtCurrDate);
    return to;
}
Also used : PreAdjFissAuditTrail(gov.cms.bfd.model.rda.PreAdjFissAuditTrail)

Example 3 with PreAdjFissAuditTrail

use of gov.cms.bfd.model.rda.PreAdjFissAuditTrail in project beneficiary-fhir-data by CMSgov.

the class FissClaimTransformer method transformMessageArrays.

private void transformMessageArrays(FissClaim from, PreAdjFissClaim to, DataTransformer transformer, Instant now, String namePrefix) {
    for (short index = 0; index < from.getFissProcCodesCount(); ++index) {
        final String itemNamePrefix = namePrefix + "procCode" + "-" + index + "-";
        final FissProcedureCode itemFrom = from.getFissProcCodes(index);
        final PreAdjFissProcCode itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setDcn(from.getDcn());
        itemTo.setPriority(index);
        to.getProcCodes().add(itemTo);
    }
    for (short index = 0; index < from.getFissDiagCodesCount(); ++index) {
        final String itemNamePrefix = namePrefix + "diagCode" + "-" + index + "-";
        final FissDiagnosisCode itemFrom = from.getFissDiagCodes(index);
        final PreAdjFissDiagnosisCode itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setDcn(from.getDcn());
        itemTo.setPriority(index);
        to.getDiagCodes().add(itemTo);
    }
    for (short index = 0; index < from.getFissPayersCount(); ++index) {
        final String itemNamePrefix = namePrefix + "payer" + "-" + index + "-";
        final FissPayer itemFrom = from.getFissPayers(index);
        final PreAdjFissPayer itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setDcn(from.getDcn());
        itemTo.setPriority(index);
        to.getPayers().add(itemTo);
    }
    for (short index = 0; index < from.getFissAuditTrailCount(); ++index) {
        final String itemNamePrefix = namePrefix + "auditTrail" + "-" + index + "-";
        final FissAuditTrail itemFrom = from.getFissAuditTrail(index);
        final PreAdjFissAuditTrail itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setDcn(from.getDcn());
        itemTo.setPriority(index);
        to.getAuditTrail().add(itemTo);
    }
}
Also used : FissProcedureCode(gov.cms.mpsm.rda.v1.fiss.FissProcedureCode) PreAdjFissPayer(gov.cms.bfd.model.rda.PreAdjFissPayer) FissPayer(gov.cms.mpsm.rda.v1.fiss.FissPayer) PreAdjFissDiagnosisCode(gov.cms.bfd.model.rda.PreAdjFissDiagnosisCode) PreAdjFissProcCode(gov.cms.bfd.model.rda.PreAdjFissProcCode) PreAdjFissAuditTrail(gov.cms.bfd.model.rda.PreAdjFissAuditTrail) FissDiagnosisCode(gov.cms.mpsm.rda.v1.fiss.FissDiagnosisCode) PreAdjFissDiagnosisCode(gov.cms.bfd.model.rda.PreAdjFissDiagnosisCode) PreAdjFissAuditTrail(gov.cms.bfd.model.rda.PreAdjFissAuditTrail) FissAuditTrail(gov.cms.mpsm.rda.v1.fiss.FissAuditTrail) PreAdjFissPayer(gov.cms.bfd.model.rda.PreAdjFissPayer)

Aggregations

PreAdjFissAuditTrail (gov.cms.bfd.model.rda.PreAdjFissAuditTrail)3 PreAdjFissClaim (gov.cms.bfd.model.rda.PreAdjFissClaim)1 PreAdjFissDiagnosisCode (gov.cms.bfd.model.rda.PreAdjFissDiagnosisCode)1 PreAdjFissPayer (gov.cms.bfd.model.rda.PreAdjFissPayer)1 PreAdjFissProcCode (gov.cms.bfd.model.rda.PreAdjFissProcCode)1 FissAuditTrail (gov.cms.mpsm.rda.v1.fiss.FissAuditTrail)1 FissDiagnosisCode (gov.cms.mpsm.rda.v1.fiss.FissDiagnosisCode)1 FissPayer (gov.cms.mpsm.rda.v1.fiss.FissPayer)1 FissProcedureCode (gov.cms.mpsm.rda.v1.fiss.FissProcedureCode)1 Test (org.junit.jupiter.api.Test)1