GetChangedPatients

Used to retrieve a list of modified patients for certain criterias

Call example:


string result = SageBridgeAPI.executeAPICall(
"cf389659-588c-4fd9-ab9e-7c37b438905c", // security token
"GetChangedPatients",                    
"bos5",                                 // practice Path or Tax ID
"JSON",                                 // output format (XML or JSON)
"--request parameters XML or JSON---"   // request parameters
);

Request parameters:

Request parameter JSON string representing set of fields:
patientIds(string)(optional)Comma-separated list of patient IDs to get appointments for.
apptLastModifiedStart(string)(required)Appointment modified time from
apptLastModifiedEnd(string)(required)Appointment modified time to
apptStartDate(string)(optional)Appointment time from
apptEndDate(string)(optional)Appointment time to
patientDobStartDate(string)(optional)Patient Birth Date from
patientDobEndDate(string)(optional)Patient Birth Date to
emailRequired(string)(optional)(Y/N) Only patients with valid email.
sex(string)(optional)Patient Sex.
zip(string)(optional)Patient zip code.
providerId(string)(optional)Appointment provider.
apptTypeId(string)(optional)Appointment type.
locationId(string)(optional)Appointment location.
diseaseCode(string)(optional)Appointment disease code.
drugCode(string)(optional)Appointment drug code.

Notes:
  • Either patientIds or apptLastModifiedStart and apptLastModifiedEnd are required.
  • If patientIds is not provided, then a time range between apptLastModifiedStart and apptLastModifiedEnd cannot exceed 25 hours.

JSON string request example:
 {
  "patientIds": "123499,280348,2342142,234234,234232,34533333,4444,55534,6563453,2345456,7322365,80416,3907",
  "apptLastModifiedStart": "05/01/2008",
  "apptLastModifiedEnd": "08/31/2016",
  "appStartDate": "",
  "appEndDate": "",
  "patientDobStartDate": "",
  "patientDobEndDate": "",
  "emailRequired": "0",
  "sex": null,
  "zip": null,
  "providerId": null,
  "apptTypeId": null,
  "locationId": null,
  "diseaseCode": null,
  "drugCode": null
}

Response:

XML or JSON string representing APIResponse structure.

APIResponse payload element may be encrypted and delivered as Base64 string.
Payload element of APIResponse is a list of modified appointments


JSON Response Example: (Raw JSON )
    [
  
  {
    "appointmentId": "897400",
    "apptTypeId": "ebf870f2-4d18-4c40-9a42-93daf447d95f",
    "apptTypeName": "Retinal Exam",
    "apptStart": "11/18/2014 12:55",
    "apptStop": "11/18/2014 13:00",
    "facilityId": "13c69063-dd37-45e0-b1d5-2fff6d9f300f",
    "facilityName": "Brookline Boston Eye Group",
    "providerId": "b9b2120b-2d79-43ad-a85b-1274062e7183",
    "providerName": "Lashkari, Kameran MD",
    "patientId": "4444",
    "first": "Max",
    "middle": "",
    "last": "Gordon",
    "emailAddress": "someone@comcast.net",
    "birthDate": "07/08/1932",
    "primaryPhone": null,
    "primaryExt": null,
    "homePhone": "5085551212",
    "workPhone": null,
    "workExt": null,
    "sex": "M",
    "addr1": "33 barbary Circle",
    "addr2": null,
    "city": "Mashpee",
    "state": "MA",
    "zip": "02649",
    "patientLastModified": "5/4/2016 12:05:01 PM",
    "patientCreated": "10/23/2007 11:18:30 PM",
    "apptLastModified": "12/18/2014 11:57:16 AM",
    "apptCreated": "11/11/2014 11:29:38 AM",
    "marketingPlanId": "",
    "marketingComments": "",
    "marketingDetails": "",
    "referringProviderId": "a2e64b32-010c-4a6f-9fa3-1d122c7b24dd"
  },
  {
    "appointmentId": "96163",
    "apptTypeId": "d35caaab-4e33-49fb-8129-4d1e154b2c4c",
    "apptTypeName": "Follow Up-Old",
    "apptStart": "01/05/2009 14:50",
    "apptStop": "01/05/2009 14:55",
    "facilityId": "13c69063-dd37-45e0-b1d5-2fff6d9f300f",
    "facilityName": "Brookline Boston Eye Group",
    "providerId": "beb44bf5-81fc-45cf-ac5d-43c8efa83017",
    "providerName": "Samir Melki MD, PhD",
    "patientId": "3907",
    "first": "Jean",
    "middle": "J",
    "last": "Smith",
    "emailAddress": "someone@yahoo.com",
    "birthDate": "07/24/1944",
    "primaryPhone": null,
    "primaryExt": null,
    "homePhone": "6175551212",
    "workPhone": null,
    "workExt": null,
    "sex": "M",
    "addr1": "21 Main Street",
    "addr2": null,
    "city": "Sunny city",
    "state": "MA",
    "zip": "02124",
    "patientLastModified": "6/23/2016 9:00:59 AM",
    "patientCreated": "10/23/2007 11:18:30 PM",
    "apptLastModified": "1/5/2009 2:46:56 PM",
    "apptCreated": "11/3/2008 8:36:33 AM",
    "marketingPlanId": "",
    "marketingComments": "",
    "marketingDetails": "",
    "referringProviderId": "beb44bf5-81fc-45cf-ac5d-43c8efa83017"
  },
 ... etc ...
]

Possible return values (see APIResponse )

  • 0 - Success. Description can be vary per function
  • -1 - General error. Description attribute will show more details about an error
  • -2 - Function is not supported
  • 500 - Invalid credentials provided
  • 501 - License is expired
  • 502 - License is not active
  • 503 - Token is not active or expired
  • 550 - Unknow functionName or not subscribed
  • 551 - Unknown practice
  • 552 - No Subscription found
  • 553 - Subscription is inactive or expired
  • 600 - Invalid or empty request parameters
  • 601 - No valid route found for this subscription
  • 602 - Unable to parse request parameters

Known Issues:

None

See Also:

API Functions, APIResponse structure