You can use the site check end-point to determine if a patient already exists in the PainChek system.
curl -X GET \
https://ap.ua.painchek.com/api/sites/check/?site_name=St%20George%20Hospital
This check can be very useful for initial loads or migration purposes. It allows a third party system to look for existing PainChek site so that the records in each system can be linked together.
Parameters
Field |
Type |
---|---|
site_name |
Mandatory String |
Return Fields
The following table documents the parameters returned by the end-point:
Field
|
Type
|
Contents
|
---|---|---|
found | Mandatory Boolean | true (if one or more matches are found), false otherwise |
match_count | Mandatory Integer | The number of matches found |
uuids | Mandatory list | An array containing the UUIDs of all of the matched patients. If there are no matches, an empty list is returned. |
The following sections show some sample returns under different conditions:
Return - No Matches
{ "found" : false , "match_count" : 0 , "uuids" : [] } |
Return - Single Match
{ "found" : true , "match_count" : 1 , "uuids" : [ "43e84f64-5773-434d-9cb7-5ecaa11c32e2" ] } |
Return - Multiple Matches
{ "found" : true , "match_count" : 2 , "uuids" : [ "43e84f64-5773-434d-9cb7-5ecaa11c32e2" , "16a5af42-3da7-4c35-9683-632de7a88042" ] } |