@@ -137,15 +137,15 @@ def test_suggest_concepts_with_filters(
137137
138138 sync_client .concepts .suggest (
139139 "diabetes" ,
140- vocabulary = "SNOMED" ,
141- domain = "Condition" ,
142- limit = 20 ,
140+ vocabulary_ids = [ "SNOMED" ] ,
141+ domain_ids = [ "Condition" ] ,
142+ page_size = 20 ,
143143 )
144144
145145 url_str = str (route .calls [0 ].request .url )
146- assert "vocabulary =SNOMED" in url_str
147- assert "domain =Condition" in url_str
148- assert "limit =20" in url_str
146+ assert "vocabulary_ids =SNOMED" in url_str
147+ assert "domain_ids =Condition" in url_str
148+ assert "page_size =20" in url_str
149149
150150 @respx .mock
151151 def test_get_related_concepts (self , sync_client : OMOPHub , base_url : str ) -> None :
@@ -179,23 +179,15 @@ def test_get_related_with_options(
179179
180180 sync_client .concepts .related (
181181 201826 ,
182- relatedness_types = ["hierarchical" , "semantic" ],
183- vocabulary_ids = ["SNOMED" ],
184- domain_ids = ["Condition" ],
185- min_relatedness_score = 0.5 ,
186- max_results = 100 ,
187- include_scores = False ,
188- standard_concepts_only = True ,
182+ relationship_types = ["Is a" , "Maps to" ],
183+ min_score = 0.5 ,
184+ page_size = 100 ,
189185 )
190186
191187 url_str = str (route .calls [0 ].request .url )
192- assert "relatedness_types=hierarchical%2Csemantic" in url_str
193- assert "vocabulary_ids=SNOMED" in url_str
194- assert "domain_ids=Condition" in url_str
195- assert "min_relatedness_score=0.5" in url_str
196- assert "max_results=100" in url_str
197- assert "include_scores=false" in url_str
198- assert "standard_concepts_only=true" in url_str
188+ assert "relationship_types=Is+a%2CMaps+to" in url_str
189+ assert "min_score=0.5" in url_str
190+ assert "page_size=100" in url_str
199191
200192 @respx .mock
201193 def test_get_concept_relationships (
@@ -230,20 +222,16 @@ def test_get_concept_relationships_with_options(
230222
231223 sync_client .concepts .relationships (
232224 201826 ,
233- relationship_type = "Is a" ,
234- target_vocabulary = "SNOMED" ,
225+ relationship_ids = "Is a" ,
226+ vocabulary_ids = "SNOMED" ,
235227 include_invalid = True ,
236- page = 2 ,
237- page_size = 50 ,
238228 )
239229
240230 url_str = str (route .calls [0 ].request .url )
241231 # All params use snake_case to match API standards
242- assert "relationship_type =Is+a" in url_str
243- assert "target_vocabulary =SNOMED" in url_str
232+ assert "relationship_ids =Is+a" in url_str
233+ assert "vocabulary_ids =SNOMED" in url_str
244234 assert "include_invalid=true" in url_str
245- assert "page=2" in url_str
246- assert "page_size=50" in url_str
247235
248236
249237class TestAsyncConceptsResource :
@@ -369,15 +357,15 @@ async def test_async_suggest_with_filters(
369357
370358 await async_client .concepts .suggest (
371359 "aspirin" ,
372- vocabulary = "SNOMED" ,
373- domain = "Drug" ,
374- limit = 5 ,
360+ vocabulary_ids = [ "SNOMED" ] ,
361+ domain_ids = [ "Drug" ] ,
362+ page_size = 5 ,
375363 )
376364
377365 url_str = str (route .calls [0 ].request .url )
378- assert "vocabulary =SNOMED" in url_str
379- assert "domain =Drug" in url_str
380- assert "limit =5" in url_str
366+ assert "vocabulary_ids =SNOMED" in url_str
367+ assert "domain_ids =Drug" in url_str
368+ assert "page_size =5" in url_str
381369
382370 @pytest .mark .asyncio
383371 @respx .mock
@@ -408,20 +396,15 @@ async def test_async_get_related_with_options(
408396
409397 await async_client .concepts .related (
410398 201826 ,
411- relatedness_types = ["semantic" ],
412- vocabulary_ids = ["SNOMED" ],
413- domain_ids = ["Condition" ],
414- min_relatedness_score = 0.7 ,
415- max_results = 25 ,
416- include_scores = True ,
417- standard_concepts_only = True ,
399+ relationship_types = ["Is a" ],
400+ min_score = 0.7 ,
401+ page_size = 25 ,
418402 )
419403
420404 url_str = str (route .calls [0 ].request .url )
421- assert "relatedness_types=semantic" in url_str
422- assert "vocabulary_ids=SNOMED" in url_str
423- assert "min_relatedness_score=0.7" in url_str
424- assert "standard_concepts_only=true" in url_str
405+ assert "relationship_types=Is+a" in url_str
406+ assert "min_score=0.7" in url_str
407+ assert "page_size=25" in url_str
425408
426409 @pytest .mark .asyncio
427410 @respx .mock
@@ -452,14 +435,12 @@ async def test_async_get_relationships_with_options(
452435
453436 await async_client .concepts .relationships (
454437 201826 ,
455- relationship_type = "Maps to" ,
456- target_vocabulary = "ICD10CM" ,
438+ relationship_ids = "Maps to" ,
439+ vocabulary_ids = "ICD10CM" ,
457440 include_invalid = True ,
458- page = 1 ,
459- page_size = 100 ,
460441 )
461442
462443 url_str = str (route .calls [0 ].request .url )
463- assert "relationship_type =Maps+to" in url_str
464- assert "target_vocabulary =ICD10CM" in url_str
444+ assert "relationship_ids =Maps+to" in url_str
445+ assert "vocabulary_ids =ICD10CM" in url_str
465446 assert "include_invalid=true" in url_str
0 commit comments