There are two primary functions of an integration with PainChek:
-
Synchronise resident details maintained in your systems with PainChek.
-
Synchronise assessments created in PainChek with your systems
PainChek has many API endpoints which your system can use to synchronise data. An API endpoint is simply a specific URL which another system can make information requests from.
Note
We have created specific API endpoints to support our integrations. See here to learn more about these endpoints and how they work.
The most common call for information PainChek makes is for basic patient demographics (name, gender) and admission details (which site/facility/home they are currently admitted to as well the ward/wing/room/bed at the site) from your systems. Your systems will always be the source of truth for this information across both systems.
Those integration endpoints rely on an ‘external_id’ to identify a resident or site. This is simply the unique identifier for the resident or site that is recorded in your systems.
As an example, this is what a simple API endpoint to gather patient information would look like.
api/integration/patients/
If we wanted to specify which patients we wanted the information for, it would be designated using their external ID as so.
api/integration/patients/?external_id=123456
Keeping it really simple, calling an endpoint like the above might return a response of information similar to the below:
{ "external_id": "123456", "first_name":"Fred", "last_name":"Smith", "gender":"m", "birth_date": "1940-01-20", }
Information exchanges like the above can be used for a variety of tasks in an integration. This includes actions such as ending an admission, archiving/restoring a resident, or updating a resident avatar, amongst others. Read here for more information about these.
There are two methods for synchronising assessment data: webhooks or polling. Regardless of the synchronisation method, see PainChek Assessments and NRS Assessments for more information about the assessment data format.
Webhooks
If using webhooks, PainChek will send the details of an assessment to your endpoint as soon as the assessment is created in PainChek - see here for more details on webhooks.
Polling
If using polling, you will need to periodically fetch new assessments from PainChek. You will need to record and use an “Update Stamp” to enable efficient data synchronisation - see here for details of how to do this.