ESMD FHIR Implementation Guide
1.0.0 - esmd
ESMD FHIR Implementation Guide - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
The esMD FHIR Document Retrieval process uses custom esMD FHIR profile resources and esMD FHIR REST APIs to provide structured, secure interactions that enables HIH (Health Information Handlers) or Providers to authenticate, retrieve document references, then download or redownload the base64 binary encoded document content. This process enables HIHs to securely identify and download clinical documents and esMD system reference data files.
The following custom esMD FHIR profile resources and esMD FHIR REST APIs are used in this process:
The esMD FHIR Document Retrieval process follows the steps that are summarized below:
NOTE: Documents which are uploaded to the esMD System are subject to esMD's 90-day retention/purge policy. The purge policy requires all documents to be removed from the esMD System 90 days after their original upload date. The upload date is the date that the esMD Transaction Id is assigned. Documents which have been purged from the esMD System will not be available for downloading or redownloading.
The esMD FHIR Document Retrieval process enables HIHs to download Electronic Medical Document Requests (eMDRs), Letters, Prior Authorization Rejections, and Prior Authorization Responses related to the following supported esMD lines of business:
| Line of Business (LOB) | CTC(s) | LOB Description |
| eMDR Pre-Pay | 2.5 | Pre-Pay electronic medical document requests |
| eMDR Post-Pay | 2.6 | Post-Pay electronic medical document requests |
| eMDR Post-Pay-Other | 2.6 | Pre-Pay-Other electronic medical document requests |
| Letters | 20 | All types of Letters. |
| PA Reject | 8.1, 8.3, 8.4,8.5, 8.6 | A complete rejection made by the Review Contractor for any of the Prior Authorization requests received from the HIH for the following PA programs: Ambulance (8.1), HHPCR (8.3), DMEPOS (8.4), HOPD (8.5), IRF (8.6). |
| PA Response | 8.1, 8.3, 8.4,8.5, 8.6 | The PA decision response sent by the Review contractor for any of the Prior Authorization requests received from the HIH for the following PA programs: Ambulance (8.1), HHPCR (8.3), DMEPOS (8.4), HOPD (8.5), IRF (8.6). |
| esMD System Reference Data | 18 | esMD System Reference Data consists of various lists and categories of information that are critical for ensuring the efficient operation of esMD's document submission and retrieval workflows. This reference data is made available to HIHs using esMD's PULL approach methods. Refer to the esMD System Reference Data page for additional details. |
The esMD FHIR Document Retrieval module processes query requests for the following actions related to download Electronic Medical Document Requests (eMDRs), Letters, Prior Authorization Rejections, Prior Authorization Responses and esMD System Reference Data files:
The following diagram and related steps provide a description of the process for downloading or redownloading Electronic Medical Document Requests (eMDRs), Letters, Prior Authorization Rejections, Prior Authorization Responses, and esMD System Reference Data files.
Please refer to the Authentication API page for detailed information about the API.
| Search Parameter | Required /Optional | Description |
| transaction-status-type | Optional | The status of the transaction: |
| transactionid | Optional | esMD Transaction ID associated with the document submission. (Required if transaction-status-type = "processed"). |
The following scenarios provide examples of how to use the esMD FHIR Document Retrieval Module and Document Reference API to retrieve the binary URLs that enable downloading of the base64 encoded binary documents.
| Scenario | Query Syntax | Query Outcome (Success) |
| Download all documents for an organization that have never been downloaded. | /fhir/DocumentReference?transaction-status-type=ready-to-download | Returns a bundle of DocumentReference resources. Binary URL details will be available under the attachment URL details for each DocumentReference in the bundle. NOTE: If the transaction-status-type search parameter is not used, the system defaults to retrieving documents which have a transaction-status-type of ready-to-download. |
| Redownload a document using a specific transaction Id. | /fhir/DocumentReference?transaction-status-type=processed&transactionid =1234 | Returns a bundle of DocumentReference resources. Binary URL details will be available under the attachment URL details for each DocumentReference in the bundle. |
The following validations and errors apply to GET requests which use the DocumentReference API to retrieve DocumentReference resource bundles with binary URLs.
| Validation Rule | Error Message | Comments |
| The transactionid parameter is required when the trans-status-type is "processed". | esMD requires Transaction ID when trans-status-type is processed. Correct and resubmit. | The transactionid parameter is used in other validations that limit access to authorized users and enable compliance with esMD's purge policy. |
| A valid combination of the requesting HIH’s organizationid and transactionid is required to redownload a document. | The received TransactionId {1} is not associated with the requesting OrganizationId {0}. Correct TransactionId {1} and resubmit. | This validation ensures that the requesting HIH is authorized to download or redownload the document. {0}is a dynamic placeholder for Organization Id and {1} is a dynamic placeholder for Transaction Id. The Organization Id is taken from the clientId in the Auth token. |
| An active organization ID must be in the esMD database | Either HIH OID is invalid or agreement has expired. Correct and resubmit. | This validation is used to limit access to authorized users. |
NOTE: After receiving the Binary URLs, HIHs may store the Binary URLs. Doing so enables the HIHs to redownload documents from esMD whenever they want to without having to generate a new request for the same documents. When using locally stored Binary URLs, HIHs must remember that document retrieval is subject to esMD's 90-day retention/purge policy. The purge policy requires all documents to be removed from the esMD System 90 days after their original upload date. The upload date is the date that the esMD Transaction Id is assigned. Documents which have been purged will not be available for downloading or redownloading.
NOTE: Documents which are uploaded to the esMD System are subject to esMD's 90-day retention/purge policy. The purge policy requires all documents to be removed from the esMD System 90 days after their original upload date. The upload date is the date that the esMD Transaction Id is assigned. Documents which have been purged from the esMD System will not be available for downloading or redownloading.
The following validations and error messages apply to download operations for retrieving the base64 encoded binary documents using esMD's Binary API and Binary URLs:
| Validation Rule | Error Message | Comments |
| An active organization ID must be in the esMD database | Request contained an invalid organization ID. | This validation is used to limit access to authorized users. |
| A valid filename must be submitted in the binary URL | Invalid filename {0} submitted in the binary request. | This validation is used to ensure the file is present in esMD storage. {0}is a dynamic placeholder for filename. |
| The filename must be associated with the requesting HIH. | The requested filename {0} does not belong to the requesting HIH {1}. | {1}is a dynamic placeholder for Organization Id and {0} is a dynamic placeholder for filename. The Organization Id is taken from the clientId in the Auth token. |
| The system verifies both the transaction id timestamp and request date timestamp before providing access to the documents for download. If the difference between the dates exceeds 90 days, the user will not be able to download the documents because of the purge policy. | The requested document {0} has been removed from the system and is no longer available for download due to the 90-day retention/purge policy. | This validation is used to ensure compliance with esMD's purge policy. {0}is a dynamic placeholder for filename. |