@@ -16,8 +16,7 @@ def get_mappings() -> None:
1616
1717 result = client .mappings .get (
1818 concept_id ,
19- target_vocabularies = ["ICD10CM" , "Read" , "ICD9CM" ],
20- include_mapping_quality = True ,
19+ target_vocabulary = "ICD10CM" ,
2120 )
2221
2322 source = result .get ("source_concept" , {})
@@ -32,12 +31,8 @@ def get_mappings() -> None:
3231 target_vocab = m .get ("target_vocabulary_id" , "?" )
3332 target_code = m .get ("target_concept_code" , "?" )
3433 target_name = m .get ("target_concept_name" , "?" )
35- # Access confidence via quality when available
36- quality = m .get ("quality" , {})
37- confidence = quality .get ("confidence_score" , "N/A" ) if quality else "N/A"
3834 print (f"\n [{ target_vocab } ] { target_code } " )
3935 print (f" Name: { target_name } " )
40- print (f" Confidence: { confidence } " )
4136 except omophub .OMOPHubError as e :
4237 print (f"API error: { e .message } " )
4338 finally :
@@ -89,14 +84,11 @@ def lookup_by_code() -> None:
8984 print (f" Vocabulary: { concept .get ('vocabulary_id' , 'Unknown' )} " )
9085 print (f" Standard: { concept .get ('standard_concept' , 'N/A' )} " )
9186
92- # If it's not a standard concept, find mappings to standard concepts
87+ # If it's not a standard concept, find mappings
9388 if concept .get ("standard_concept" ) != "S" :
94- mappings = client .mappings .get (
95- concept .get ("concept_id" , 0 ),
96- standard_only = True ,
97- )
89+ mappings = client .mappings .get (concept .get ("concept_id" , 0 ))
9890
99- print ("\n Standard mappings :" )
91+ print ("\n Mappings to other vocabularies :" )
10092 for m in mappings .get ("mappings" , [])[:5 ]:
10193 print (f" → { m .get ('target_concept_name' , 'Unknown' )} " )
10294 except omophub .OMOPHubError as e :
0 commit comments