-
Notifications
You must be signed in to change notification settings - Fork 45
Getting Started with popHealth API
From popHealth configuration file (located in popHealth/config/popHealth.yml), set the “enable_csrf_for_apis” parameter to false
enable_csrf_for_apis: false
Save the file and restart apache server and pophealth_delayed_worker process. The following examples use Postman application to access the popHealth REST interface.
popHealth uses “Basic Auth”. Every service call requires user/password for authentication. Example: Retrieve a list of popHealth users - GET /api/admin/users. Note the setting for “Basic Auth” and the response in JSON.
Use POST /api/patients. Note that the setting for Authorization doesn’t change. The example below shows the “Body” setup for the Post call and the response indicating patient file imported.
Use POST /api/admin/patients. The example below shows the “Body” setup for the Post call and the response indicating patient file has been uploaded.
Use POST /api/queries. The example below shows the “Body” setup for the Post call. Note that we used the “raw” with JSON(application/json) format to transmit the parameters.
- measure_id - hqmf_id of the measure. You can find it from the following page in popHealth application - http://pophealth-demo.osehra.org/#admin/measures
- effective_date - the end date of the reporting period. Use the epoch converter - https://www.epochconverter.com/ to convert dates from 12-31-2015
- effective_start_date – the start date of the reporting period, i.e., 1-1-2015
- providers – object id of the provider for “Practice OSEHRA”. This value is obtained from the Mongodb using Robomongo viewer