diff --git a/patient_kg/adapters/snomed_ct_api.py b/patient_kg/adapters/snomed_ct_api.py index 945cc9f..69e0cc9 100644 --- a/patient_kg/adapters/snomed_ct_api.py +++ b/patient_kg/adapters/snomed_ct_api.py @@ -4,7 +4,7 @@ snomed_df = pd.read_csv(description_file, delimiter='\t', header=0) def get_snomed_name(code): - name = snomed_df[(snomed_df['conceptId'] == int(code)) & (snomed_df['typeId'] == 900000000000003001)]['term'].values[0] + name = snomed_df[(snomed_df['conceptId'] == int(code)) & (snomed_df['active'] == 1) & (snomed_df['typeId'] == 900000000000003001)]['term'].values[0] return name # Example usage