GetReferrals

Retrieves referral data from practice management system.. Can be filtered by date range, doctor, location and visit type.

Call example:


string result = SageBridgeAPI.executeAPICall(
"cf389659-588c-4fd9-ab9e-7c37b438905c", // security token
"GetReferrals",                    
"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:
startDate (string)Referral dates range begin (required).
endDate (string)Referral dates range end (required).
providerId (string)Rendering Provider ID.
referringProviderId (string)Referring Provider ID.
facilityId (string)Location/Facility ID.
visitTypeId (string)Visit Type ID.
billingCodes (string)Comma separated list of billing codes.
serviceCategory (string)Service Category.
useOriginalReferrer (string)Use original Referrer (Y/N).

JSON string request example:
{
  "startDate": "04/01/2021",
  "endDate": "04/02/2021",
  "providerId": "",
  "refferingProviderId": "",
  "facilityId": "",
  "visittypeId": "",
  "billingCodes": "123, 333",
  "serviceCategory": "",
  "useOriginalReferrer" : "N"
}

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 referrals

JSON Response payload example:
[
    {
      "providerId": "a3d5d72f-4d20-4c32-8d97-c879d3674de8",
      "providerName": "Denlinger MD, David E",
      "referringProviderId": "1bbafeec-6143-4889-aa41-00a45f466732",
      "referringProviderName": "Zeser OD, Jonathon R",
      "ecounterDate": "4/1/2021 9:30:00 AM",
      "locationId": "f687444f-118e-41e8-8c34-f3596807b837",
      "locationName": "Dayton Eye Surgery Center",
      "patientAge": "66",
      "insuranceCarrier": "AARP Medicare - 87726",
      "insuranceCarrierId": "3fc2be4c-a7cf-4e90-a26b-1fd0bc49b724",
      "insurancePlanName": "",
      "visitTypeName": "Z - Phaco - Toric",
      "visityTypeId": "e34a858b-4697-41ce-ae52-188ffbff8705",
      "patientId": "970635",
      "personId": "970635",
      "appointmentId": "12345" 
    },
    {
      "providerId": "a3d5d72f-4d20-4c32-8d97-c879d3674de8",
      "providerName": "Denlinger MD, David E",
      "referringProviderId": "1bbafeec-6143-4889-aa41-00a45f466732",
      "referringProviderName": "Zeser OD, Jonathon R",
      "ecounterDate": "4/1/2021 10:45:00 AM",
      "locationId": "f687444f-118e-41e8-8c34-f3596807b837",
      "locationName": "Dayton Eye Surgery Center",
      "patientAge": "76",
      "insuranceCarrier": "Medicare Ohio",
      "insuranceCarrierId": "e0ce6f7d-04eb-4aa6-ba6d-2e3b588dcb5e",
      "insurancePlanName": "",
      "visitTypeName": "Z - Phaco",
      "visityTypeId": "1af73c08-eec9-4a05-a21e-3f141db59e58",
      "patientId": "1427485",
      "personId": "1427485",
      "appointmentId": "12346"
    },
    {
      "providerId": "b31710ab-e5ee-45d7-9209-b1753078bf57",
      "providerName": "Schoenberger MD, Scott D",
      "referringProviderId": "1bbafeec-6143-4889-aa41-00a45f466732",
      "referringProviderName": "Zeser OD, Jonathon R",
      "ecounterDate": "4/1/2021 8:45:00 AM",
      "locationId": "f687444f-118e-41e8-8c34-f3596807b837",
      "locationName": "Dayton Eye Surgery Center",
      "patientAge": "74",
      "insuranceCarrier": "UHC - 87726",
      "insuranceCarrierId": "beb0e261-bfd3-4c71-b3d2-10cf0353b584",
      "insurancePlanName": "",
      "visitTypeName": "Z - Pars Plana Vitrectomy",
      "visityTypeId": "ab55624b-9651-4107-a22c-9814cc2c23d2",
      "patientId": "1427502",
      "personId": "1427502",
      "appointmentId": "12347"
     }
]

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
This function may return other codes not listed above; they may vary by practice.

Known Issues:

None

See Also:

API Functions, APIResponse structure