MCI Patient Catchment Feed API
Patient Catchment feed (API to get all patients by a given catchment).
Authentication:
The API described below need authentication. The client_id and From are given when registering with the Identity Provider. The signin API of Identity Provider should be used to get the auth token(To be provided in the "X-Auth-Token" header). Refer the Identity Provider page for more information on how to use the Identity Provider APIs.Â
Required roles for the client : Mci user and Facility/SHR system adimin .
Description of the APIÂ
Request :
GETÂ Â https://{mci_service}/api/default/catchments/{catchment}/patients?since=<date value>&last_marker=<last marker value>
Headers :
X-Auth-Token : {auth token returned from Identity Service Provider}
client_id : {client id of requester in Identity Service Provider}
From : {email_id of requester registered in Identity Service Provider}
Points to remember:
- Both since and last marker values are optional.
- Since takes a date and gives back all patient creates and updated on or after that date.
Eg: If we hit the url with https://{mci_service}/catchments/3033/patients?since=2016-12-08 -→ It will give back all patient creates for the catchment on or after 8th December 2016 - Last marker takes a Unique Event UUID and returns all patient create or update events after the event.
Eg:  If we hit the url with https://{mci_service}/catchments/3033/patients??last_marker=7945db81-bd30-11e6-b56a-024dbda31eaf  -→ It will give back all patient creates for the catchment  after the event with id 7945db81-bd30-11e6-b56a-024dbda31eaf. - By default the maximum number of entries per page in 25 unless the server in configured otherwise.Â
- If both since and last marker are provided the server gives preference to last marker.
- If none of since and last marker is provided then the server gives back all patients creates for the catchment from the begining.
Sample Response:
Notes
feedUrl: The url that was hit.
Entries: Contain a list of events that are there. Each event inside entries start with an "id" which is the unique uuid for that event, Â "eventType" specifies the type of event (created or updated).
nextUrl: give an url which returns the next set of events, The last marker in the nextUrl is the id of the last event on that page.