The mcr_fts2db Module

Command line utility to load raw Medicare data into the database.

Used for 2011 and later years. Looks for FTS files, parses them to generate database model and extract metadata required to read DAT files. Then loads data into the database.

This module looks for FTS files, parses them, then looks for corresponding DAT files. It copies FTS files to destination directory and selects a few random records from DAT files.

Please note, that if the destination to be used with Medicare ingestion pipeline, the full path to resulting FTS and DAT files must include a directory named with the year, e.g. my_data/medicare/2018/*.fts

class MedicareLoader[source]

Medicare Loader for original medicare data received from Resdac. Used for 2011 and later years.

Looks for FTS files, parses them to generate database model and extract metadata required to read DAT files. Then loads data into the database.

classmethod process()[source]
traverse(pattern: str)[source]
handle_empty()[source]
handle(fts_path: str)[source]
static loader_for_csv(context: LoaderConfig, data_path: str) DataLoader[source]
static loader_for_fwf(context: LoaderConfig, fts_path: str) DataLoader[source]