@@ -58,6 +58,29 @@ mappings = client.mappings.get_by_code("ICD10CM", "E11.9", target_vocabulary="SN
5858ancestors = client.hierarchy.ancestors(201826 , max_levels = 3 )
5959```
6060
61+ ## Semantic Search
62+
63+ Use natural language queries to find concepts using neural embeddings:
64+
65+ ``` python
66+ # Natural language search - understands clinical intent
67+ results = client.search.semantic(" high blood sugar levels" )
68+ for r in results[" results" ]:
69+ print (f " { r[' concept_name' ]} (similarity: { r[' similarity_score' ]:.2f } ) " )
70+
71+ # Filter by vocabulary and set minimum similarity threshold
72+ results = client.search.semantic(
73+ " heart attack" ,
74+ vocabulary_ids = [" SNOMED" ],
75+ domain_ids = [" Condition" ],
76+ threshold = 0.5
77+ )
78+
79+ # Iterate through all results with auto-pagination
80+ for result in client.search.semantic_iter(" chronic kidney disease" , page_size = 50 ):
81+ print (f " { result[' concept_id' ]} : { result[' concept_name' ]} " )
82+ ```
83+
6184## Async Support
6285
6386``` python
@@ -130,7 +153,7 @@ suggestions = client.concepts.suggest("diab", vocabulary_ids=["SNOMED"], page_si
130153| Resource | Description | Key Methods |
131154| ----------| -------------| -------------|
132155| ` concepts ` | Concept lookup and batch operations | ` get() ` , ` get_by_code() ` , ` batch() ` , ` suggest() ` |
133- | ` search ` | Full-text and semantic search | ` basic() ` , ` advanced() ` , ` semantic() ` , ` fuzzy() ` |
156+ | ` search ` | Full-text and semantic search | ` basic() ` , ` advanced() ` , ` semantic() ` , ` semantic_iter() ` , ` fuzzy() ` |
134157| ` hierarchy ` | Navigate concept relationships | ` ancestors() ` , ` descendants() ` |
135158| ` mappings ` | Cross-vocabulary mappings | ` get() ` , ` map() ` |
136159| ` vocabularies ` | Vocabulary metadata | ` list() ` , ` get() ` , ` stats() ` |
0 commit comments