use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildOutpatientClaimEvent.
/**
* @param fileEvent the {@link RifFileEvent} being processed that is being processed
* @param csvRecords the {@link CSVRecord}s to be mapped, which must be from a {@link
* RifFileType#OUTPATIENT} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<OutpatientClaim> buildOutpatientClaimEvent(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"));
OutpatientClaim claim = OutpatientClaimParser.parseRif(csvRecords);
return new RifRecordEvent<OutpatientClaim>(fileEvent, csvRecords, recordAction, claim.getBeneficiaryId(), claim);
}
use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildPartDEvent.
/**
* @param fileEvent the {@link RifFilesEvent} being processed
* @param csvRecords the {@link CSVRecord}s to be mapped, which must be from a {@link
* RifFileType#PDE} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<PartDEvent> buildPartDEvent(RifFileEvent fileEvent, List<CSVRecord> csvRecords) {
if (csvRecords.size() != 1)
throw new BadCodeMonkeyException();
if (LOGGER.isTraceEnabled())
LOGGER.trace(csvRecords.toString());
CSVRecord csvRecord = csvRecords.get(0);
RecordAction recordAction = RecordAction.match(csvRecord.get("DML_IND"));
PartDEvent partDEvent = PartDEventParser.parseRif(csvRecords);
return new RifRecordEvent<PartDEvent>(fileEvent, csvRecords, recordAction, partDEvent.getBeneficiaryId(), partDEvent);
}
use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildSNFClaimEvent.
/**
* @param fileEvent the {@link RifFileEvent} being processed
* @param csvRecords the {@link CSVRecord}s to be mapped, which must be from a {@link
* RifFileType#SNF} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<SNFClaim> buildSNFClaimEvent(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"));
SNFClaim claim = SNFClaimParser.parseRif(csvRecords);
return new RifRecordEvent<SNFClaim>(fileEvent, csvRecords, recordAction, claim.getBeneficiaryId(), claim);
}
use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildInpatientClaimEvent.
/**
* @param fileEvent the {@link RifFileEvent} being processed that is being processed
* @param csvRecords the {@link CSVRecord}s to be mapped, which must be from a {@link
* RifFileType#INPATIENT} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<InpatientClaim> buildInpatientClaimEvent(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"));
InpatientClaim claim = InpatientClaimParser.parseRif(csvRecords);
return new RifRecordEvent<InpatientClaim>(fileEvent, csvRecords, recordAction, claim.getBeneficiaryId(), claim);
}
use of gov.cms.bfd.model.rif.RecordAction in project beneficiary-fhir-data by CMSgov.
the class RifFilesProcessor method buildBeneficiaryHistoryEvent.
/**
* @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#BENEFICIARY_HISTORY} {@link RifFile}
* @return a {@link RifRecordEvent} built from the specified {@link CSVRecord}s
*/
private static RifRecordEvent<BeneficiaryHistory> buildBeneficiaryHistoryEvent(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.match(csvRecord.get("DML_IND"));
BeneficiaryHistory beneficiaryHistoryRow = BeneficiaryHistoryParser.parseRif(csvRecords);
return new RifRecordEvent<BeneficiaryHistory>(fileEvent, csvRecords, recordAction, beneficiaryHistoryRow.getBeneficiaryId(), beneficiaryHistoryRow);
}
Aggregations