-
Notifications
You must be signed in to change notification settings - Fork 2
Update docs #3
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Hi,
Firstly, thanks for this amazing work.
I had some issues regarding the Bulk Search functionality. It turns out the docs are not updated with respect to the latest API endpoints. This makes it impossible to run the examples from the docs (and therefore use the functionality at all)...
This is in regard to the following code example from the docs:
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'queries': [
{
'query_id': 'diabetes_search',
'query': 'type 2 diabetes',
'vocabulary_ids': 'SNOMED,ICD10CM',
'domains': 'Condition',
'search_type': 'exact',
'page_size': 15,
'include_synonyms': True,
'standard_concept': 'S'
},
{
'query_id': 'procedure_search',
'query': 'knee replacement',
'vocabulary_ids': 'SNOMED,HCPCS',
'domains': 'Procedure',
'search_type': 'fuzzy',
'page_size': 10,
'min_score': 0.7
},
{
'query_id': 'drug_search',
'query': 'insulin glargine',
'vocabulary_ids': 'RXNORM,NDC',
'domains': 'Drug',
'search_type': 'semantic',
'page_size': 20
}
]
}
params = {
'processing_mode': 'parallel',
'consolidate_results': True,
'include_query_stats': True,
'timeout_seconds': 60
}
response = requests.post(
'https://api.omophub.com/v1/search/bulk',
headers=headers,
json=payload,
params=params
)
data = response.json()For anyone struggling with this as well: the trick is making the following changes in the endpoints:
- queries -> searches
- query_id -> search_id
- potentially also: domains -> domain_ids
Would be great if you could update the docs.
Thanks again for the great repository.
Kind regards,
Jim
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation