US Core Fetch DocumentReference
This operation is used to return all the references to documents related to a patient. It is invoked on a FHIR Server's DocumentReference endpoint (e.g., `[base]/DocumentReference/$docref`) and operates across all DocumentReference instances.
The operation requires a patient id and takes the optional input parameters:
- start context date
- end context date
- document type
- on-demand
- profile
and returns a *searchset* Bundle containing DocumentReference resources for the patient. If the server has stored documents or can create documents for the patient and those documents are available for the user, the server returns the DocumentReference resources associated with documents. This operation's intended use is to provide a way for providers or patients to access their available documents. The document itself can be subsequently retrieved using the link provided in the `DocumentReference.content.attachment.url element`. The link could be a FHIR endpoint to a Binary Resource or some other document repository.
This operation is *different* from a FHIR RESTful query on DocumentReference by patient and type and period range because:
1. It is used to request a server to *generate* a document based on the specified parameters.
1. If no parameters are specified, the server SHALL return a DocumentReference to the patient's current C-CDA CCD.
1. If the server cannot *generate* a document based on the specified parameters, the operation will return an empty search bundle.
Unless the client indicates they are only interested in 'on-demand' documents using the *on-demand* parameter, the server SHOULD return DocumentReference instances for *existing* documents that meet the request parameters In this regard, this operation is *similar* to a FHIR RESTful query.
Metadata
hl7.org/fhir- Canonical URL
- http://hl7.org/fhir/us/core/OperationDefinition/docref
- Code
- $docref
- Kind
- operation
- Affects State
- No
- Publisher
- HL7 International / Cross-Group Projects
Invocation Context
Implementation Notes
- It is assumed that the server has identified and secured the context appropriately and can either associate the authorization context with a single patient or determine whether the context has the rights to the nominated patient if there is one. If there is no nominated patient (e.g., the operation is invoked at the system level) and the context is not associated with a single patient record, then the server should return an error. Specifying the relationship between the context, a user, and patient records is outside the scope of this specification. - A server may generate an on-demand document upon returning its DocumentReference during the $docref response or once the client accesses it. This specification places no requirements upon when a server generates an on-demand document and encourages server developers to balance the performance cost of creating unread documents against the response time to retrieve new documents. - See the US Core DocumentReference Profile [Quick Start Section](StructureDefinition-us-core-documentreference.html#quick-start) for example interactions
Input Parameters (6)
Output Parameters (1)
Additional Information
- Version
- 9.0.0
- Date
- 2022-11-18