use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildMedicareBeneficiaryIdHistoryEvent.
/**
* @param fileEvent the {@link RifFileEvent} being processed
* @param csvRecords the {@link CSVRecord} to be mapped (in a single-element {@link List}), which
* must be from a {@link RifFileType#Medicare_Beneficiary_Id_History} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<MedicareBeneficiaryIdHistory> buildMedicareBeneficiaryIdHistoryEvent(RifFileEvent fileEvent, List<CSVRecord> csvRecords) {
if (csvRecords.size() != 1)
throw new BadCodeMonkeyException();
CSVRecord csvRecord = csvRecords.get(0);
if (LOGGER.isTraceEnabled())
LOGGER.trace(csvRecord.toString());
RecordAction recordAction = RecordAction.INSERT;
MedicareBeneficiaryIdHistory medicareBeneficiaryIdHistoryRow = MedicareBeneficiaryIdHistoryParser.parseRif(csvRecords);
return new RifRecordEvent<MedicareBeneficiaryIdHistory>(fileEvent, csvRecords, recordAction, medicareBeneficiaryIdHistoryRow.getBeneficiaryId().get(), medicareBeneficiaryIdHistoryRow);
}
use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildCarrierClaimEvent.
/**
* @param fileEvent the {@link RifFileEvent} being processed
* @param csvRecords the {@link CSVRecord}s to be mapped, which must be from a {@link
* RifFileType#CARRIER} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<CarrierClaim> buildCarrierClaimEvent(RifFileEvent fileEvent, List<CSVRecord> csvRecords) {
if (LOGGER.isTraceEnabled())
LOGGER.trace(csvRecords.toString());
CSVRecord firstCsvRecord = csvRecords.get(0);
RecordAction recordAction = RecordAction.match(firstCsvRecord.get("DML_IND"));
CarrierClaim claim = CarrierClaimParser.parseRif(csvRecords);
return new RifRecordEvent<CarrierClaim>(fileEvent, csvRecords, recordAction, claim.getBeneficiaryId(), claim);
}
Aggregations