GetPatientToken
Used to retrieve a patient authorization token needed to access other patient data such as charts.
Currently supported in GetPatientChart and GetPatientChartCategory API functions.
Call example:
string result = SageBridgeAPI.executeAPICall(
"cf389659-588c-4fd9-ab9e-7c37b438905c", // security token
"GetPatientToken",
"bos5", // practice Path or Tax ID
"JSON", // output format (XML or JSON)
"--request parameters XML or JSON---" // request parameters
);
Request
data has following elements:
| extPatientId | (string) | Unique PM/EMR patient id. |
| firstName | (string) | Patient first name. |
| lastName | (string) | Patient last name. |
| birthDay | (string) | Patient birth date. |
| licenseId | (string) | License Id to identify a caller (provided by Sophrona). |
Notes:
- Either extPatientId or lastName and birthDay must be provided to uniquilly identify a patient.
- All provided parameters will be used to identify a patient.
- licenseId value provided by Sophrona at the time of vendor registration/configuration.
JSON Example:
{
"extPatientId": "608cb81d-2f77-4769-ba35-e6c63c0efe68",
"firstName": "Bill",
"lastName": "Tester",
"birthDay": "07/13/1945",
"licenseId": "C5CBD85E-CC4C-472E-B263-89FBE951D6F3"
}
Response
XML or JSON string representing ApiResponse structure.
If executed without any errors then payload element will have a value of patient authorization token.
When executed with error result.value will have error codes, described below.
JSON Example: (full ApiResponse structure)
{
"result": {
"value": "0",
"description": "Success"
},
"request": "GetPatientToken",
"apiInfo": {
"version": "6.2.8.3333",
"protocolVersion": "2.1",
"serverLocalTime": "10/04/2017 13:13:43",
"encryption": "False",
"licenseExpire": "12/31/2017 00:00:00"
},
"transactionId": "1b122d57-4688-4abb-800d-34d7c583827d",
"hash": "VN+Js5+7yN47V+55L0/2RuWdGCjPMDVrigYeASqHkHPIogAhONrwqZPUlC1s1NxaKy8vz5OcfN92vQEkDTik7w==",
"payload": "a5832bc8-ac1c-4b9f-a238-bf207949de90"
}
XML output example: (full ApiResponse structure)
Notes:
a5832bc8-ac1c-4b9f-a238-bf207949de90 - patient authorization token.
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,
GetPatientChart function ,
GetPatientChartCategory function