class LoadJSON(index_util.LoadJSONBase): index_name = 'animalandveterinarydrugevent' mapping_file = './schemas/animalandveterinarydrugevent_mapping.json' data_source = XML2JSON() use_checksum = False optimize_index = True last_update_date = lambda _: newest_file_timestamp(ADAE_LOCAL_DIR)
class LoadJSON(index_util.LoadJSONBase): index_name = 'tobaccoproblem' mapping_file = './schemas/tobaccoproblem_mapping.json' data_source = TobaccoProblem2JSON() use_checksum = False optimize_index = True last_update_date = lambda _: newest_file_timestamp(TOBACCO_RAW_DIR)
class LoadJSON(index_util.LoadJSONBase): index_name = 'othernsde' mapping_file = './schemas/othernsde_mapping.json' data_source = NSDE2JSON() use_checksum = False optimize_index = True last_update_date = lambda _: newest_file_timestamp(NSDE_RAW_DIR)
class LoadJSON(index_util.LoadJSONBase): index_name = 'devicereglist' mapping_file = './schemas/registration_mapping.json' data_source = AnnotateDevice() use_checksum = False optimize_index = True last_update_date = lambda _: newest_file_timestamp(RAW_DIR)
class LoadJSON(index_util.LoadJSONBase): index_name = 'foodevent' mapping_file = './schemas/foodevent_mapping.json' data_source = CSV2JSON() use_checksum = False optimize_index = True last_update_date = lambda _: newest_file_timestamp(DOWNLOAD_DIR)
class LoadJSON(index_util.LoadJSONBase): index_name = 'ndc' mapping_file = './schemas/ndc_mapping.json' data_source = AnnotateJSON() use_checksum = False optimize_index = True last_update_date = lambda _: newest_file_timestamp(RAW_DIR)
class LoadJSONByRunDate(index_util.LoadJSONBase): run_date = luigi.Parameter() index_name = 'deviceevent' mapping_file = 'schemas/maude_mapping.json' optimize_index = False docid_key = 'mdr_report_key' use_checksum = True last_update_date = lambda _: newest_file_timestamp(RAW_DIR) def _data(self): return AnnotateReport(run_date=self.run_date)
class LoadJSONQuarter(index_util.LoadJSONBase): quarter = luigi.Parameter() index_name = 'drugevent' mapping_file = './schemas/faers_mapping.json' docid_key = '@case_number' use_checksum = True last_update_date = lambda _: newest_file_timestamp(RAW_DIR) # Optimize after all quarters are finished. optimize_index = False def _data(self): return AnnotateJSON(self.quarter)