Concept lookup not working. Concepts not being imported into SOLR.
sreesankarp opened this issue · comments
Sree Sankar P commented
Bram van Es commented
Can you describe how you imported the cdb through with the Solr api? We are having the same problem, the Solr collection is not made/populated.
Bram van Es commented
This should do it.
import requests
import json
URL = 'http://localhost:8001'
payload = {"username": "admin", "password": "admin"}
headers = {
'Authorization': f'Token {json.loads(requests.post("http://localhost:8001/api/api-token-auth/", json=payload).text)["token"]}',
}
json.loads(requests.post(f'{URL}/api/import-cdb-concepts/', headers=headers,
data={'cdb_id': id_of_cdb_in_medcattrainer}).text)
Bram van Es commented
tomolopolis commented
yep looks like you've got it. This process is also explained here - albeit not in the clearest way
https://medcattrainer.readthedocs.io/en/latest/project_admin.html#concept-picker-cdb-concept-import