Skip to content

Edits to Document Reference

Eric Haas edited this page Mar 19, 2019 · 4 revisions

$docref OperationDefinition

This operation is used to return a patient's CCD and other patients documents.

The operation takes the input parameters:

  • patient id
  • start date
  • end date
  • document type

and returns a Bundle of type “searchset” containing resources conforming to the US Core DocumentReference Profile for the patient. If the server has or can create documents that are related to the patient, and that are available for the given user, the server returns the DocumentReference profiles needed to support the records. The principle intended use for this operation is to provide a provider or patient with access to their available document information.

delete >>>>The server SHOULD return at least all references for documents that it has made available in a document indexing system. This is the same as a simple query (GET [base]/DocumentReference?patient=[id]). <<<<delete

new>>>>

This operation differs from a simple query in that:

1. In addition to all references for existing documents, the returned DocumentReference may reference virtual documents that are generated on demand when the location provided by the DocumentReference.content.attachment.url is accessed.

1. If not otherwise specified, the returned DocumentReference provides the url for the most current CCD by default

<<<<new

If no documents exists and an ‘on-demand’ document cannot be created then the operation will return an empty search bundle.

Use Name Cardinality Type Binding Documentation
IN patient 1..1 id The patient id to match against a patient resource. If there is no match, an empty Bundle is returned
IN start 0..1 date The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no start date is provided, all documents prior to the end date are in scope. If neither a start date nor an end date is provided, the most recent or current document is in scope.
IN end 0..1 date The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no end date is provided, all documents subsequent to the start date are in scope. If neither a start date nor an end date is provided, the most recent or current document is in scope.
IN type 0..1 CodeableConcept Document Type Value Set (Required) The type relates to document type e.g. the LOINC code for a C-CDA Clinical Summary of Care (CCD) is 34133-9 (Summary of episode note). If no type is provided, the CCD document if available SHALL be in scope and all other document types MAY be in scope.
OUT return 1..1 Bundle The bundle type is "searchset"containing resources conforming to the US Core DocumentReference Profile

The operation returns the DocumentReference resource(s) and not the document itself. The document is retrieved using the link provided from the DocumentQuery search results. The link could, for example, be a FHIR endpoint to a Binary Resource or some other document repository.

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

DucumentReference quick start section:

Below is an overview of the required set of RESTful FHIR interactions - for example, search and read operations - for this profile. See the Conformance requirements for a complete list of supported RESTful interactions for this IG.

delete>>>>> Typically, DocumentReference resources are used with document indexing systems, such as IHE XDS. However, document references may also may be created “on-the-fly” in response to a Document Query request. In other words there MAY NOT be pre-existing index of references to a patient’s documents at the FHIR endpoint. This results in an empty bundle being returned when searching using a normal FHIR Query. Therefore, the $docref operation has been defined to both create and fetch patient DocumentReference Resources.

The following search criteria describe fetching pre-indexed documents and those created “on-the-fly”. <<<<delete

Searching _delete>>>>>pre-indexed<<<<delete documents:

GET [base]/DocumentReference?patient=[id]

Example: GET [base]/DocumentReference?patient=2169591

Support: Mandatory to support search by patient.

Implementation Notes: Search for all documents for a patient. Fetches a bundle of all DocumentReference resources for the specified patient (how to search by reference).

GET [base]/DocumentReference?patient=[id]&type=[type]&period=[date]

Example: GET [base]/DocumentReference?patient=2169591&type=34133-9&period=ge2016-01-01

Support: Optional to support search by patient and type and date range.

Implementation Notes: Fetches a bundle of all DocumentReference resources for the specified patient for a given time period and document type. (how to search by reference), (how to search by token), and (how to search by date).

Searching documents using the $docref operation:

Functional behavior of Server when responding to the $docref operation:

SHALL be new>>>capable of returning<<<new at least a reference to CCD document, if available, but MAY provide references to other document types as well. If a context date range is supplied the server SHOULD provide references to any document that falls within the date range If no date range is supplied, then the server SHALL provide references to last or current encounter

GET [base]/DocumentReference/$docref?patient=[id]

Example: see $docref operation

Support: Mandatory to support response to operation.

Implementation Notes: Fetches a bundle of DocumentReference resources for the specified patient. The document itself is retrieved using the link provided from the DocumentQuery search results.

Clone this wiki locally