You can use the PainChek API to view and manage PainChek comments (these are notes recorded for a patient).
Field |
Type |
Comment |
---|---|---|
patient |
Mandatory UUID |
The UUID of the patient this comment belongs to |
device_id |
Mandatory UUID |
The UUID of the device that the comment was recorded on |
user |
Mandatory UUID |
The UUID of the user that recorded the comment |
content |
Mandatory String |
The comment |
To list all Users in your PainChek instance (in the User Acceptance Environment), issue the following command:
curl https: //ua.ap.painchek.com/api/comments/
{ "count": 2, "next": null, "previous": null, "results": [{ "uuid": "f175787a-8d9d-4b31-abd7-e0746986e330", "patient": "9b829fe4-a72a-4323-ae65-5fa4622b6986", "user": "c5fff8fd-e022-4ba4-a35d-ddee6b9fa276", "device_id": "b3e2c2923bfda989", "created_at": "2017-11-13T02:30:44.986000Z", "modified_at": "2017-11-13T02:30:44.986000Z", "deleted_at": null, "update_stamp": 110, "content": "This is a comment" }, { "uuid": "99b1fbfa-6ed4-4e1a-b674-868de01cb3fc", "patient": "aed4e174-b96f-4f21-bd4f-c26097a8e22e", "user": "c5fff8fd-e022-4ba4-a35d-ddee6b9fa276", "device_id": "03BE603F-512C-44DD-AEF4-7BD3FC4DFB8D", "created_at": "2017-11-13T02:29:03.307000Z", "modified_at": "2017-11-13T02:29:03.307000Z", "deleted_at": null, "update_stamp": 109, "content": "Another comment" }] }
To create a comment, issue the following command (which shows the minimum fields that need to be supplied ):
curl\ - H "Content-Type: application/json"\ - X POST https: //ua.ap.painchek.com/api/comments/ -d @- << EOF{"patient": "aed4e174-b96f-4f21-bd4f-c26097a8e22e","content": "Adding a comment"}EOF
Note
This is no need to supply the mandatory user field as the credentials used to access the API will determine the user.
The return is the full comment record:
{ "uuid": "53d7f384-8341-4fde-9149-436690092e11", "patient": "fe540355-2356-4363-b84d-7f4cea093cf8", "user": "c5fff8fd-e022-4ba4-a35d-ddee6b9fa276", "device_id": null, "created_at": "2017-11-23T10:11:53.981905Z", "modified_at": "2017-11-23T10:11:53.981919Z", "deleted_at": null, "update_stamp": 122, "content": "Adding a comment" }