OHDSI Home | Forums | Wiki | Github

Running a JSON cohort definition using the WebAPI?

(Rick Kiefer) #1

I am looking for a way to run a cohort definition written in OHDSI JSON format against an OMOP repository. Is there a way for the program I am writing to use the WebAPI to submit the query and retrieve the results? Any suggestions/advice is appreciated.
Thank you

(Daniel Lima) #2

You can use the Web Development Tools (started by F12 in common browsers) to inspect the Network
requests triggered by any action. Alternatively, you can also check out the WebAPI sources for the URL endpoint annotations.
After you know the URL and parameters, any HTTP client could replicate the request.

PS: For example, you can try to fetch the results of a previous report (third cohort definition of the CDM database, in this example).
The server will answer with a plain-text JSON response:


(Rick Kiefer) #3

To give some more information - the application I am working on is for the PhEMA project.

This portion of the workflow is the elm-to-ohdsi executer

It is a Java application where I convert a file in elm format to OHDSI JSON format. My hope is to use the WebAPI to submit the JSON definition and retrieve a cohort. The user will indicate whether they want a count or a patient list. Currently working on a simple definition for a cohort of diabetes patients. Once that is complete, will expand the transform to handle more advanced definitions.

Will look into Daniel’s suggestions. Any other suggestions will be appreciated.

Thank you