Search Concepts by ConceptSource

Hi,

I am trying to implement an autocomplete field for concepts from a specific source.

I’ve tried using endpoint /concept?source=&q= but looking at the ConceptSearchHandler* it seems that the two parameters cannot be combined.

Also I could not find any other endpoint that would allow me to retrieve this data.

Could this be implemented with a custom SearchHandler?

Thanks

Yassin, What are you trying to do specifically? Concepts don’t have a source. Concept_reference_maps do.

Concepts don’t belong to a concept source really, I think what you want is to fetch concepts that have mappings to a given concept source and to get them you only specify the source parameter, its value can be a concept source uuid or name.

Andrew, something like this:

The suggestions appear as the users types it.

Wyclif is right, i need to fetch concepts that have mappings to a given concept source. But there are too many to list them all at once.

1 Like

Searching for concepts with mappings to a given source by a partial code isn’t supported even in the core concept API and doesn’t support searching by name anyways, you would have to add a custom search handler that first performs the regular partial search by name and then manually filter out concepts that don’t have mappings to the specified source.

Alternatively you need to build your UI in a smarter way, the user should first select a concept source, and then the name search follows which you perform against the returned concepts on the client side.