How to filter on developers in C3.ai COVID-19 Data Lake therapeutic assets

Viewed 168

I'm trying out the COVID-19 Data Lake with Postman. I am running POST https://api.c3.ai/covid/api/1/therapeuticasset/fetch to get vaccines produced by a specific organization. But it looks like developers can include multiple organizations, so I can't just filter on the name like "developer == 'Vanderbilt'".

I also tried "'Vanderbilt' in developer". How do I find all of the therapies that involve a specific university?

2 Answers

Similar to what rsyoung has said - you could use the intersects() expression engine function to filter on multiple organizations.

Check if first argument (object or arry) is present within remaining arguments.
Example: intersects(arryField, ['a','b','c']): 

So in your case, you could use a filter such as:

intersects(developer, ['Vanderbilt', 'OrganizationX', 'OrganizationY'])

and the result should include all TherapeuticAssets that satisfy that condition.

You can do that with "contains(developer, 'Vanderbilt')"!

Related