I'm working on multimodal modeling with the INSPECT dataset and wanted to use etl_simple_femr to generate the required extract from OMOP data tables by using the etl_simple_femr pipeline on OMOP-compatible tables (e.g., condition_occurrence.csv, drug_exposure.csv, etc.), but I’m running into this error: KeyError: 'code'.
The traceback points to the function get_concept_ids_from_file() in simple.py: resulting_concepts.add(row["code"]).
The problem is that OMOP tables such as condition_occurrence do not contain a code column. Instead, they use *_concept_id fields (e.g., condition_concept_id) that refer to numeric concept IDs, which need to be mapped to FEMR-style codes. However, this mapping step does not seem to be included in etl_simple_femr.
Can you clarify:
• Whether etl_simple_femr is meant to be used after an external preprocessing step that adds the code column?
• If so, could you provide an example or script that performs this transformation from OMOP concept IDs to FEMR-style code strings?
• Alternatively: would you consider sharing the 'extract' dataset used to train MOTOR, or a preprocessed version of OMOP → FEMR, ready to be used with etl_simple_femr?
I'm working on multimodal modeling with the INSPECT dataset and wanted to use etl_simple_femr to generate the required extract from OMOP data tables by using the etl_simple_femr pipeline on OMOP-compatible tables (e.g., condition_occurrence.csv, drug_exposure.csv, etc.), but I’m running into this error: KeyError: 'code'.
The traceback points to the function get_concept_ids_from_file() in simple.py: resulting_concepts.add(row["code"]).
The problem is that OMOP tables such as condition_occurrence do not contain a code column. Instead, they use *_concept_id fields (e.g., condition_concept_id) that refer to numeric concept IDs, which need to be mapped to FEMR-style codes. However, this mapping step does not seem to be included in etl_simple_femr.
Can you clarify:
• Whether etl_simple_femr is meant to be used after an external preprocessing step that adds the code column?
• If so, could you provide an example or script that performs this transformation from OMOP concept IDs to FEMR-style code strings?
• Alternatively: would you consider sharing the 'extract' dataset used to train MOTOR, or a preprocessed version of OMOP → FEMR, ready to be used with etl_simple_femr?