For a full list of available versions, see the Directory of published versions
When point of service system identifies that Binary.data (for clinical reports) or DiagnosticReport.presentedForm.data (for MI reports) received from OH Pub/Sub Services contantains an AttachmentMetadata extension, point of service system uses the downloadURL element from this extension to download a file from the OCRE File Repository. If this download request returns an HTTP response code 400 or 404 (as described below), point of service system requests a new downloadURL using the fileId and jwtToken elements from the extension and then uses this new downloadURL to download a file from the OCRE File Repository.
For users receiving reports, there will be no change in their workflow (e.g. no extra clicks for the user to download reports). All the interactions to enable download functionality will be done by their respective systems and APIs.
Point of service system system will download a file using the downloadURL provided in the AttachmentMetadata extension. If the original downloadURL has expired before download, a new downloadURL may be generated by using the GET DOWNLOAD URL operation.
Using the downloadURL from AttachmentMetadata extension on Binary.data (for clinical reports) or DiagnosticReport.presentedForm.data (for MI reports)
Request:
GET <DownloadFileURL>
Response: The file will start streaming
Potential Error Codes returned from this request:
| Description | Code | HTTP Code |
|---|---|---|
| Practice doesn't have proper permission to invoke this API | R_PRACTICE_ID_INSUFFICIENT_PERMISSION | 403 for future use only |
| User doesn't have proper permission to invoke this API | R_USER_INSUFFICIENT_PERMISSIONS | 403 |
| The URL is invalid | R_INVALID_URL | 400 |
| File Not Found | R_FILE_NOT_FOUND | 404 |
| DownloadFileURL expired | R_EXPIRED_FILE_URL | 400 |
| Internal error | R_INTERNAL_ERROR | 500 |
This interaction supports the request to retrieve a new downloadURL for the attachment. If downloadURL in the AttachmentMetadata extension has expired or is invalid, the system can request a new downloadURL using FileId and DownloadToken mapped to values of fileId and jwtToken from the AttachmentMetadata extension. The URL response from the OCRE will provide a new direct URL to download the file from the Repository if the DownloadToken is included in the call. The system will then request the file download using the URL (GET FILE). NOTE: Download token is optional in the call. If the Token is not provided in the call, the returned URL will NOT include the token, and the token will need to be added to the GET FILE call by the system.
Request
GET {serverurl}/<FileId>[?hubtoken=<DownloadToken> ]
Authorization: Bearer <OAGToken>
Response:
{
"url": <DownloadFileURL>,
"expiresInSec": 300000
}
Potential Error Codes returned from this request:
| Description | Code | HTTP Code |
|---|---|---|
| File ID or Service Request ID missing | R_MANDATORY_FIELD_MISSING | 400 |
| Token Has expired or is not valid | 401 | |
| User doesn't have proper permission to invoke this API | R_USER_INSUFFICIENT_PERMISSIONS | 403 |
| File Not Found | R_FILE_NOT_FOUND | 404 |
| Internal error | R_INTERNAL_ERROR | 500 |