Skip to content

Commit

Permalink
only get active snomed ct concepts
Browse files Browse the repository at this point in the history
  • Loading branch information
nilskre committed Feb 24, 2024
1 parent 5a70966 commit 3ce3e26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patient_kg/adapters/snomed_ct_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ce3e26

Please sign in to comment.