PostReferral
Post a Referral Request.
Call example:
string result = SageBridgeAPI.executeAPICall(
"cf389659-588c-4fd9-ab9e-7c37b438905c", // security token
"PostReferral",
"bos5", // practice Path or Tax ID
"JSON", // output format (XML or JSON)
"--request parameters XML or JSON---" // request parameters
);
Request parameters:
Only important or required fields are enlisted. For a full set of fields see a Json example below.
| referralId | (string) | Referral Identifier from a referring practice. | (optional) |
| visitTypeId | (string) | Requested Visit Type ID. | (required) |
| visitTypeName | (string) | Requested Visit Type Name. | |
| providerId | (string) | Requested Provider ID. | |
| providerFirstName | (string) | Requested Provider First Name. | |
| providerLastName | (string) | Requested Provider Last Name. | |
| locationId | (string) | Requested Location ID. | |
| locationName | (string) | Requested Location Name. | |
| urgency | (string) | Referral Urgency. | (required) |
| referralSource | (string) | Referral Source. | (required) |
|
| patient | (data) | Data element to represent a patient information. See Patient. | (required) |
| patient.first | (string) | Patient First Name. | (required) |
| patient.last | (string) | Patient Last Name. | (required) |
| patient.birthdate | (string) | Patient Date of Birth. | (required) |
| patient.sex | (string) | Patient Gender (M/F/male/female). | (optional) |
| patient.address | (data) | Patient Address data. See See Address. | (required) |
| patient.address.state | (string) | Patient State. | (required) |
| patient.address.zip | (string) | Patient Zipcode. | (required) |
| patient.contactInfo | (data) | Patient Contact Info. See Contact Info | (required) |
| patient.contactInfo.phone | (string) | Patient Phone#. | (required) |
| patient.contactInfo.email | (string) | Patient Email address. | (required) |
|
| referringPractice | (data) | Data element to represent a referring practice information. See Practice. | (required) |
| referringPractice.name | (string) | Name of the referring practice. | (required) |
|
| referringProvider | (data) | Data element to represent a referring provider information.See Provider. | (required) |
| referringProvider.first | (string) | Referring Provider First Name. | (required) |
| referringProvider.last | (string) | Referring Provider Lirst Name. | (required) |
| referringProvider.NPI | (string) | Referring Provider NPI. | (required) |
| referringProvider.contactInfo.phone | (string) | Referring Provider Phone#. | (required) |
| referringProvider.contactInfo.email | (string) | Referring Provider Email address. | (required) |
Notes:
- (required) denotes required field, (required) - may be required depends on a license type and/or specific practice configuration.
- Either visitTypeID or visitTypeName is required. visitTypeName value ignored if valid visitTypeId provided.
- Either locationID or locationName is required. locationName value ignored if valid locationId provided.
- If providerID is not available, please populate requested provider names (required) and NPI (required).
- Use '*' value for providerID and/or locationID to request any/first available provider and/or location.
Request Parameters example (JSON):
{
"referralId": "REF:12345678",
"visitTypeId": "",
"visitTypeName": "LASIK",
"providerId": "",
"providerFirstName": "Doc",
"providerLastName": "Doctor",
"providerMiddleName": "V",
"providerCredentials": "MD",
"locationId": "*",
"locationName": "",
"urgency": "Next Available",
"referralSource": "www.chicagocornea.com",
"apptReason": "LASIK is needed",
"notes": "just any information what can be useful to schedule an appointment or create a referral",
"patient": {
"last": "Smith",
"first": "Pat",
"middle": "",
"birthdate": "08/15/1968",
"sex": "male",
"contactInfo": {
"phone": "(914)555-1212",
"cell": "(914)555-1313",
"email": "MePatient@nomail.com"
},
"address": {
"addr1": "103 Happy Rd",
"addr2": "",
"city": "Summertown",
"state": "NY",
"zip": "10603",
"country": "US"
}
},
"referringPractice": {
"name": "Happy Eye Clinic",
"address": {
"addr1": "1 Sunny Way",
"addr2": "",
"city": "Summertown",
"state": "NY",
"zip": "10603",
"country": "US"
},
"contactInfo": {
"phone": "(888)555-1212",
"email": "HappyEyeClinic@nomail.com"
}
},
"referringProvider": {
"providerId": "4c4db864-0809-4595-9092-ffb24b381da5",
"last": "Wiggletest",
"first": "Josh",
"middle": "J",
"credentials": "MD",
"specialty": "Ophthalmology",
"sex": "male",
"NPI": "3337778888",
"contactInfo": {
"phone": "(888)555-1212",
"cell": "(333)555-1212",
"email": "Doc.Sophrona@nomail.com"
}
}
}
Response:
XML or JSON string representing APIResponse structure.
APIResponse payload element may be encrypted and delivered as Base64 string.
Payload element of APIResponse shows a call result (success or validation errors)
Example of JSON payload:
{
"value": "0",
"description": "success"
}
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.
Validation codes (value element of payload):
- 602 - Unable to parse request parameters
- 650 - Patient First and Last names are required
- 650 - Patient data is required
- 660 - Referring practice data is required
- 670 - Referring provider data is required
- 670 - Referring provider NPI is required
- 680 - Visit type ID or name are required
Known Issues:
None
See Also:
API Functions,
APIResponse structure