use of gov.cms.bfd.model.rda.PreAdjMcsLocation 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);
}
}
use of gov.cms.bfd.model.rda.PreAdjMcsLocation in project beneficiary-fhir-data by CMSgov.
the class McsClaimTransformer method transformMessageImpl.
private PreAdjMcsLocation transformMessageImpl(McsLocation from, DataTransformer transformer, Instant now, String namePrefix) {
final PreAdjMcsLocation to = new PreAdjMcsLocation();
to.setLastUpdated(now);
transformer.copyOptionalString(namePrefix + PreAdjMcsLocation.Fields.idrLocClerk, 1, 4, from::hasIdrLocClerk, from::getIdrLocClerk, to::setIdrLocClerk);
transformer.copyOptionalString(namePrefix + PreAdjMcsLocation.Fields.idrLocCode, 1, 3, from::hasIdrLocCode, from::getIdrLocCode, to::setIdrLocCode);
transformer.copyOptionalDate(namePrefix + PreAdjMcsLocation.Fields.idrLocDate, from::hasIdrLocDate, from::getIdrLocDate, to::setIdrLocDate);
transformer.copyEnumAsString(namePrefix + PreAdjMcsLocation.Fields.idrLocActvCode, true, 1, PreAdjMcsLocation_idrLocActvCode_Extractor.getEnumString(from), to::setIdrLocActvCode);
return to;
}
Aggregations