Search in sources :

Example 1 with PreAdjMcsAdjustment

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

the class McsClaimTransformer method transformMessageImpl.

private PreAdjMcsAdjustment transformMessageImpl(McsAdjustment from, DataTransformer transformer, Instant now, String namePrefix) {
    final PreAdjMcsAdjustment to = new PreAdjMcsAdjustment();
    to.setLastUpdated(now);
    transformer.copyOptionalDate(namePrefix + PreAdjMcsAdjustment.Fields.idrAdjDate, from::hasIdrAdjDate, from::getIdrAdjDate, to::setIdrAdjDate);
    transformer.copyOptionalString(namePrefix + PreAdjMcsAdjustment.Fields.idrXrefIcn, 1, 15, from::hasIdrXrefIcn, from::getIdrXrefIcn, to::setIdrXrefIcn);
    transformer.copyOptionalString(namePrefix + PreAdjMcsAdjustment.Fields.idrAdjClerk, 1, 4, from::hasIdrAdjClerk, from::getIdrAdjClerk, to::setIdrAdjClerk);
    transformer.copyOptionalString(namePrefix + PreAdjMcsAdjustment.Fields.idrInitCcn, 1, 15, from::hasIdrInitCcn, from::getIdrInitCcn, to::setIdrInitCcn);
    transformer.copyOptionalDate(namePrefix + PreAdjMcsAdjustment.Fields.idrAdjChkWrtDt, from::hasIdrAdjChkWrtDt, from::getIdrAdjChkWrtDt, to::setIdrAdjChkWrtDt);
    transformer.copyOptionalAmount(namePrefix + PreAdjMcsAdjustment.Fields.idrAdjBEombAmt, from::hasIdrAdjBEombAmt, from::getIdrAdjBEombAmt, to::setIdrAdjBEombAmt);
    transformer.copyOptionalAmount(namePrefix + PreAdjMcsAdjustment.Fields.idrAdjPEombAmt, from::hasIdrAdjPEombAmt, from::getIdrAdjPEombAmt, to::setIdrAdjPEombAmt);
    return to;
}
Also used : PreAdjMcsAdjustment(gov.cms.bfd.model.rda.PreAdjMcsAdjustment)

Example 2 with PreAdjMcsAdjustment

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

the class McsClaimTransformer method transformMessageArrays.

private void transformMessageArrays(McsClaim from, PreAdjMcsClaim to, DataTransformer transformer, Instant now, String namePrefix) {
    for (short index = 0; index < from.getMcsDetailsCount(); ++index) {
        final String itemNamePrefix = namePrefix + "detail" + "-" + index + "-";
        final McsDetail itemFrom = from.getMcsDetails(index);
        final PreAdjMcsDetail itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setIdrClmHdIcn(from.getIdrClmHdIcn());
        itemTo.setPriority(index);
        to.getDetails().add(itemTo);
    }
    for (short index = 0; index < from.getMcsDiagnosisCodesCount(); ++index) {
        final String itemNamePrefix = namePrefix + "diagCode" + "-" + index + "-";
        final McsDiagnosisCode itemFrom = from.getMcsDiagnosisCodes(index);
        final PreAdjMcsDiagnosisCode itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setIdrClmHdIcn(from.getIdrClmHdIcn());
        itemTo.setPriority(index);
        to.getDiagCodes().add(itemTo);
    }
    for (short index = 0; index < from.getMcsAdjustmentsCount(); ++index) {
        final String itemNamePrefix = namePrefix + "adjustment" + "-" + index + "-";
        final McsAdjustment itemFrom = from.getMcsAdjustments(index);
        final PreAdjMcsAdjustment itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setIdrClmHdIcn(from.getIdrClmHdIcn());
        itemTo.setPriority(index);
        to.getAdjustments().add(itemTo);
    }
    for (short index = 0; index < from.getMcsAuditsCount(); ++index) {
        final String itemNamePrefix = namePrefix + "audit" + "-" + index + "-";
        final McsAudit itemFrom = from.getMcsAudits(index);
        final PreAdjMcsAudit itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setIdrClmHdIcn(from.getIdrClmHdIcn());
        itemTo.setPriority(index);
        to.getAudits().add(itemTo);
    }
    for (short index = 0; index < from.getMcsLocationsCount(); ++index) {
        final String itemNamePrefix = namePrefix + "location" + "-" + index + "-";
        final McsLocation itemFrom = from.getMcsLocations(index);
        final PreAdjMcsLocation itemTo = transformMessageImpl(itemFrom, transformer, now, itemNamePrefix);
        itemTo.setIdrClmHdIcn(from.getIdrClmHdIcn());
        itemTo.setPriority(index);
        to.getLocations().add(itemTo);
    }
}
Also used : McsDiagnosisCode(gov.cms.mpsm.rda.v1.mcs.McsDiagnosisCode) PreAdjMcsDiagnosisCode(gov.cms.bfd.model.rda.PreAdjMcsDiagnosisCode) PreAdjMcsAudit(gov.cms.bfd.model.rda.PreAdjMcsAudit) McsAudit(gov.cms.mpsm.rda.v1.mcs.McsAudit) PreAdjMcsAudit(gov.cms.bfd.model.rda.PreAdjMcsAudit) PreAdjMcsAdjustment(gov.cms.bfd.model.rda.PreAdjMcsAdjustment) McsLocation(gov.cms.mpsm.rda.v1.mcs.McsLocation) PreAdjMcsLocation(gov.cms.bfd.model.rda.PreAdjMcsLocation) PreAdjMcsDetail(gov.cms.bfd.model.rda.PreAdjMcsDetail) McsDetail(gov.cms.mpsm.rda.v1.mcs.McsDetail) PreAdjMcsAdjustment(gov.cms.bfd.model.rda.PreAdjMcsAdjustment) McsAdjustment(gov.cms.mpsm.rda.v1.mcs.McsAdjustment) PreAdjMcsDiagnosisCode(gov.cms.bfd.model.rda.PreAdjMcsDiagnosisCode) PreAdjMcsLocation(gov.cms.bfd.model.rda.PreAdjMcsLocation) PreAdjMcsDetail(gov.cms.bfd.model.rda.PreAdjMcsDetail)

Aggregations

PreAdjMcsAdjustment (gov.cms.bfd.model.rda.PreAdjMcsAdjustment)2 PreAdjMcsAudit (gov.cms.bfd.model.rda.PreAdjMcsAudit)1 PreAdjMcsDetail (gov.cms.bfd.model.rda.PreAdjMcsDetail)1 PreAdjMcsDiagnosisCode (gov.cms.bfd.model.rda.PreAdjMcsDiagnosisCode)1 PreAdjMcsLocation (gov.cms.bfd.model.rda.PreAdjMcsLocation)1 McsAdjustment (gov.cms.mpsm.rda.v1.mcs.McsAdjustment)1 McsAudit (gov.cms.mpsm.rda.v1.mcs.McsAudit)1 McsDetail (gov.cms.mpsm.rda.v1.mcs.McsDetail)1 McsDiagnosisCode (gov.cms.mpsm.rda.v1.mcs.McsDiagnosisCode)1 McsLocation (gov.cms.mpsm.rda.v1.mcs.McsLocation)1