This page is part of the FHIR Specification (v1.4.0:
STU
3 Ballot 3). The current version which supercedes this version is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
. For a full list of available versions, see the
Directory of published versions
.
Page
versions:
. Page versions:
R5
R4B
R4
R3
R2
|
|
Compartments
|
A reference to a document .
A DocumentReference resource is used to describe a document that is made available to a healthcare system. A document is some sequence of bytes that is identifiable, establishes its own context (e.g., what subject, author, etc. can be displayed to the user), and has defined update management. The DocumentReference resource can be used with any document format that has a recognized mime type and that conforms to this definition.
Typically, DocumentReference resources are used in document indexing systems, such as
IHE XDS
(see the
XDS specific profile
(see
the
XDS
specific
profile
),
and
are
used
to
refer
to:
), and are used to refer to:
FHIR defines both a document format and this document reference. FHIR documents are for documents that are authored and assembled in FHIR. This resource is mainly intended for general references to other documents.
The document that is a target of the reference can be a reference to a FHIR document served by another server, or the target can be stored in the special
FHIR Binary Resource
, or the target can be stored on some other server system. The document reference is also able to address documents that are retrieved by a service call such as an XDS.b RetrieveDocumentSet, or a DICOM exchange, or an
HL7 v2
message
query
-
though
the
way
each
of
these
service
calls
works
must
be
specified
in
some
external
standard
or
other
documentation.
A
message query - though the way each of these service calls works must be specified in some external standard or other documentation.
A
DocumentReference
describes some other document. This means that there are two sets of provenance information relevant here: the provenance of the document, and the provenance of the document reference. Sometimes, the provenance information is closely related, as when the document producer also produces the document reference, but in other workflows, the document reference is generated later by other actors. In the describes
some
other
document.
This
means
that
there
are
two
sets
of
provenance
information
relevant
here:
the
provenance
of
the
document,
and
the
provenance
of
the
document
reference.
Sometimes,
the
provenance
information
is
closely
related,
as
when
the
document
producer
also
produces
the
document
reference,
but
in
other
workflows,
the
document
reference
is
generated
later
by
other
actors.
In
the
DocumentReference
resource, the
meta
resource,
the
content
refers
to
the
provenance
of
the
reference
itself,
while
the
content
described
below
concerns
the
document
it
references.
Like
all
resources,
there
is
overlap
between
the
information
in
the
resource
directly,
and
in
the
general
Provenance
resource.
This
is
discussed
as
part
of
the
description
of
the
content refers to the provenance of the reference itself, while the content described below concerns the document it references. Like all resources, there is overlap between the information in the resource directly, and in the general
Provenance
resource
.
This
resource
is
referenced
by
resource. This is discussed as
part of the description of the Provenance resource
.
This resource is referenced by
Contract
and
and
DiagnosticOrder
Structure
| Name | Flags | Card. | Type |
|
|---|---|---|---|---|
|
Σ | DomainResource |
|
|
|
Σ | 0..1 | Identifier |
|
|
Σ | 0..* | Identifier |
|
|
Σ | 0..1 |
Reference
(
Patient
|
|
|
Σ | 1..1 | CodeableConcept |
|
|
Σ | 0..1 | CodeableConcept |
|
|
Σ | 0..* |
Reference
(
Practitioner
|
|
|
Σ | 0..1 | Reference ( Organization ) |
|
|
Σ | 0..1 |
Reference
(
Practitioner
|
|
|
Σ | 0..1 | dateTime |
|
|
Σ | 1..1 | instant |
|
|
|
1..1 | code |
DocumentReferenceStatus |
|
Σ | 0..1 | CodeableConcept |
CompositionStatus |
|
|
0..* | BackboneElement |
|
|
Σ | 1..1 | code |
DocumentRelationshipType |
|
Σ | 1..1 | Reference ( DocumentReference ) |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | CodeableConcept |
|
|
Σ | 1..* | BackboneElement |
|
|
Σ | 1..1 | Attachment |
|
|
Σ | 0..* | Coding |
|
|
Σ | 0..1 | BackboneElement |
|
|
Σ | 0..1 | Reference ( Encounter ) |
|
|
Σ | 0..* | CodeableConcept |
|
|
Σ | 0..1 | Period |
|
|
Σ | 0..1 | CodeableConcept |
|
|
Σ | 0..1 | CodeableConcept |
|
|
Σ | 0..1 | Reference ( Patient ) |
|
|
Σ | 0..* | BackboneElement |
|
|
Σ | 0..1 | Identifier |
|
|
Σ | 0..1 | Reference ( Any ) |
|
Documentation for this format
|
||||
UML
Diagram
UML Diagram
XML
Template
XML Template
<DocumentReference xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <masterIdentifier><!-- 0..1 Identifier Master Version Specific Identifier --></masterIdentifier> <identifier><!-- 0..* Identifier Other identifiers for the document --></identifier> <subject><!-- 0..1 Reference(Patient|Practitioner|Group|Device) Who/what is the subject of the document --></subject> <type><!-- 1..1 CodeableConcept Kind of document (LOINC if possible) --></type> <class><!-- 0..1 CodeableConcept Categorization of document --></class> <author><!-- 0..* Reference(Practitioner|Organization|Device|Patient| RelatedPerson) Who and/or what authored the document --></author> <custodian><!-- 0..1 Reference(Organization) Organization which maintains the document --></custodian> <authenticator><!-- 0..1 Reference(Practitioner|Organization) Who/what authenticated the document --></authenticator> <created value="[dateTime]"/><!-- 0..1 Document creation time --> <indexed value="[instant]"/><!-- 1..1 When this document reference created --> <status value="[code]"/><!-- 1..1 current | superseded | entered-in-error --> <docStatus><!-- 0..1 CodeableConcept preliminary | final | appended | amended | entered-in-error --></docStatus> <relatesTo> <!-- 0..* Relationships to other documents --> <code value="[code]"/><!-- 1..1 replaces | transforms | signs | appends --> <target><!-- 1..1 Reference(DocumentReference) Target of the relationship --></target> </relatesTo> <description value="[string]"/><!-- 0..1 Human-readable description (title) --> <securityLabel><!-- 0..* CodeableConcept Document security-tags --></securityLabel> <content> <!-- 1..* Document referenced --> <attachment><!-- 1..1 Attachment Where to access the document --></attachment> <format><!-- 0..* Coding Format/content rules for the document --></format> </content> <context> <!-- 0..1 Clinical context of document --> <encounter><!-- 0..1 Reference(Encounter) Context of the document content --></encounter>
<</event><event><!-- 0..* CodeableConcept Main Clinical Acts Documented --></event> <period><!-- 0..1 Period Time of service that is being documented --></period> <facilityType><!-- 0..1 CodeableConcept Kind of facility where patient was seen --></facilityType> <practiceSetting><!-- 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty) --></practiceSetting> <sourcePatientInfo><!-- 0..1 Reference(Patient) Patient demographics from source --></sourcePatientInfo> <related> <!-- 0..* Related identifiers or resources --> <identifier><!-- 0..1 Identifier Identifier of related objects or events --></identifier> <ref><!-- 0..1 Reference(Any) Related Resource --></ref> </related> </context> </DocumentReference>
JSON
Template
JSON Template
{
"resourceType" : "DocumentReference",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"masterIdentifier" : { Identifier }, // Master Version Specific Identifier
"identifier" : [{ Identifier }], // Other identifiers for the document
"subject" : { Reference(Patient|Practitioner|Group|Device) }, // Who/what is the subject of the document
"type" : { CodeableConcept }, // R! Kind of document (LOINC if possible)
"class" : { CodeableConcept }, // Categorization of document
"author" : [{ Reference(Practitioner|Organization|Device|Patient|
RelatedPerson) }], // Who and/or what authored the document
"custodian" : { Reference(Organization) }, // Organization which maintains the document
"authenticator" : { Reference(Practitioner|Organization) }, // Who/what authenticated the document
"created" : "<dateTime>", // Document creation time
"indexed" : "<instant>", // R! When this document reference created
"status" : "<code>", // R! current | superseded | entered-in-error
"docStatus" : { CodeableConcept }, // preliminary | final | appended | amended | entered-in-error
"relatesTo" : [{ // Relationships to other documents
"code" : "<code>", // R! replaces | transforms | signs | appends
"target" : { Reference(DocumentReference) } // R! Target of the relationship
}],
"description" : "<string>", // Human-readable description (title)
"securityLabel" : [{ CodeableConcept }], // Document security-tags
"content" : [{ // R! Document referenced
"attachment" : { Attachment }, // R! Where to access the document
"format" : [{ Coding }] // Format/content rules for the document
}],
"context" : { // Clinical context of document
"encounter" : { Reference(Encounter) }, // Context of the document content
"
"event" : [{ CodeableConcept }], // Main Clinical Acts Documented
"period" : { Period }, // Time of service that is being documented
"facilityType" : { CodeableConcept }, // Kind of facility where patient was seen
"practiceSetting" : { CodeableConcept }, // Additional details about where the content was created (e.g. clinical specialty)
"sourcePatientInfo" : { Reference(Patient) }, // Patient demographics from source
"related" : [{ // Related identifiers or resources
"identifier" : { Identifier }, // Identifier of related objects or events
"ref" : { Reference(Any) } // Related Resource
}]
}
}
Structure
| Name | Flags | Card. | Type |
|
|---|---|---|---|---|
|
Σ | DomainResource |
|
|
|
Σ | 0..1 | Identifier |
|
|
Σ | 0..* | Identifier |
|
|
Σ | 0..1 |
Reference
(
Patient
|
|
|
Σ | 1..1 | CodeableConcept |
|
|
Σ | 0..1 | CodeableConcept |
|
|
Σ | 0..* |
Reference
(
Practitioner
|
|
|
Σ | 0..1 | Reference ( Organization ) |
|
|
Σ | 0..1 |
Reference
(
Practitioner
|
|
|
Σ | 0..1 | dateTime |
|
|
Σ | 1..1 | instant |
|
|
|
1..1 | code |
DocumentReferenceStatus |
|
Σ | 0..1 | CodeableConcept |
CompositionStatus |
|
|
0..* | BackboneElement |
|
|
Σ | 1..1 | code |
DocumentRelationshipType |
|
Σ | 1..1 | Reference ( DocumentReference ) |
|
|
Σ | 0..1 | string |
|
|
Σ | 0..* | CodeableConcept |
|
|
Σ | 1..* | BackboneElement |
|
|
Σ | 1..1 | Attachment |
|
|
Σ | 0..* | Coding |
|
|
Σ | 0..1 | BackboneElement |
|
|
Σ | 0..1 | Reference ( Encounter ) |
|
|
Σ | 0..* | CodeableConcept |
|
|
Σ | 0..1 | Period |
|
|
Σ | 0..1 | CodeableConcept |
|
|
Σ | 0..1 | CodeableConcept |
|
|
Σ | 0..1 | Reference ( Patient ) |
|
|
Σ | 0..* | BackboneElement |
|
|
Σ | 0..1 | Identifier |
|
|
Σ | 0..1 | Reference ( Any ) |
|
Documentation for this format
|
||||
XML
Template
XML Template
<DocumentReference xmlns="http://hl7.org/fhir"><!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <masterIdentifier><!-- 0..1 Identifier Master Version Specific Identifier --></masterIdentifier> <identifier><!-- 0..* Identifier Other identifiers for the document --></identifier> <subject><!-- 0..1 Reference(Patient|Practitioner|Group|Device) Who/what is the subject of the document --></subject> <type><!-- 1..1 CodeableConcept Kind of document (LOINC if possible) --></type> <class><!-- 0..1 CodeableConcept Categorization of document --></class> <author><!-- 0..* Reference(Practitioner|Organization|Device|Patient| RelatedPerson) Who and/or what authored the document --></author> <custodian><!-- 0..1 Reference(Organization) Organization which maintains the document --></custodian> <authenticator><!-- 0..1 Reference(Practitioner|Organization) Who/what authenticated the document --></authenticator> <created value="[dateTime]"/><!-- 0..1 Document creation time --> <indexed value="[instant]"/><!-- 1..1 When this document reference created --> <status value="[code]"/><!-- 1..1 current | superseded | entered-in-error --> <docStatus><!-- 0..1 CodeableConcept preliminary | final | appended | amended | entered-in-error --></docStatus> <relatesTo> <!-- 0..* Relationships to other documents --> <code value="[code]"/><!-- 1..1 replaces | transforms | signs | appends --> <target><!-- 1..1 Reference(DocumentReference) Target of the relationship --></target> </relatesTo> <description value="[string]"/><!-- 0..1 Human-readable description (title) --> <securityLabel><!-- 0..* CodeableConcept Document security-tags --></securityLabel> <content> <!-- 1..* Document referenced --> <attachment><!-- 1..1 Attachment Where to access the document --></attachment> <format><!-- 0..* Coding Format/content rules for the document --></format> </content> <context> <!-- 0..1 Clinical context of document --> <encounter><!-- 0..1 Reference(Encounter) Context of the document content --></encounter>
<</event><event><!-- 0..* CodeableConcept Main Clinical Acts Documented --></event> <period><!-- 0..1 Period Time of service that is being documented --></period> <facilityType><!-- 0..1 CodeableConcept Kind of facility where patient was seen --></facilityType> <practiceSetting><!-- 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty) --></practiceSetting> <sourcePatientInfo><!-- 0..1 Reference(Patient) Patient demographics from source --></sourcePatientInfo> <related> <!-- 0..* Related identifiers or resources --> <identifier><!-- 0..1 Identifier Identifier of related objects or events --></identifier> <ref><!-- 0..1 Reference(Any) Related Resource --></ref> </related> </context> </DocumentReference>
JSON
Template
JSON Template
{
"resourceType" : "DocumentReference",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"masterIdentifier" : { Identifier }, // Master Version Specific Identifier
"identifier" : [{ Identifier }], // Other identifiers for the document
"subject" : { Reference(Patient|Practitioner|Group|Device) }, // Who/what is the subject of the document
"type" : { CodeableConcept }, // R! Kind of document (LOINC if possible)
"class" : { CodeableConcept }, // Categorization of document
"author" : [{ Reference(Practitioner|Organization|Device|Patient|
RelatedPerson) }], // Who and/or what authored the document
"custodian" : { Reference(Organization) }, // Organization which maintains the document
"authenticator" : { Reference(Practitioner|Organization) }, // Who/what authenticated the document
"created" : "<dateTime>", // Document creation time
"indexed" : "<instant>", // R! When this document reference created
"status" : "<code>", // R! current | superseded | entered-in-error
"docStatus" : { CodeableConcept }, // preliminary | final | appended | amended | entered-in-error
"relatesTo" : [{ // Relationships to other documents
"code" : "<code>", // R! replaces | transforms | signs | appends
"target" : { Reference(DocumentReference) } // R! Target of the relationship
}],
"description" : "<string>", // Human-readable description (title)
"securityLabel" : [{ CodeableConcept }], // Document security-tags
"content" : [{ // R! Document referenced
"attachment" : { Attachment }, // R! Where to access the document
"format" : [{ Coding }] // Format/content rules for the document
}],
"context" : { // Clinical context of document
"encounter" : { Reference(Encounter) }, // Context of the document content
"
"event" : [{ CodeableConcept }], // Main Clinical Acts Documented
"period" : { Period }, // Time of service that is being documented
"facilityType" : { CodeableConcept }, // Kind of facility where patient was seen
"practiceSetting" : { CodeableConcept }, // Additional details about where the content was created (e.g. clinical specialty)
"sourcePatientInfo" : { Reference(Patient) }, // Patient demographics from source
"related" : [{ // Related identifiers or resources
"identifier" : { Identifier }, // Identifier of related objects or events
"ref" : { Reference(Any) } // Related Resource
}]
}
}
Alternate
definitions:
Alternate definitions:
Schema
/
Schematron
,
Resource
Profile
(
, Resource Profile (
XML
,
,
JSON
),
),
Questionnaire
| Path | Definition | Type | Reference |
|---|---|---|---|
|
|
|
Preferred |
|
|
|
|
Example |
|
|
|
|
Required | DocumentReferenceStatus |
|
|
|
Required | CompositionStatus |
|
|
|
Required | DocumentRelationshipType |
|
|
|
Extensible |
|
|
|
|
Preferred |
|
|
|
|
Example |
|
|
|
|
Example |
|
|
|
|
Example |
|
A client can ask a server to generate a document reference from a document. The server reads the existing document and generates a matching DocumentReference resource, or returns one it has previously generated. Servers may be able to return or generate document references for the following types of content:
| Type | Comments |
|
| The uri refers to an existing Document |
|
The uri is a reference to a
Binary
|
|
Other
| The server can be asked to generate a document reference for other kinds of documents. For some of these documents (e.g., PDF documents) a server could only provide a document reference if it already existed or the server had special knowledge of the document. |
The server either returns a search result containing a single document reference, or it returns an error. If the URI refers to another server, it is at the discretion of the server whether to retrieve it or return an error.
The operation is initiated by a named query, using _query=generate on the /DocumentReference end-point:
GET [service-url]/DocumentReference/?_query=generate&uri=:url&...The "uri" parameter is a relative or absolute reference to one of the document types described above. Other parameters may be supplied:
The "uri" parameter is a relative or absolute reference to one of the document types described above. Other parameters may be supplied:
| Name | Meaning |
|
persist
| Whether to store the document at the document end-point (/Document) or not, once it is generated. Value = true or false (default is for the server to decide). |
Search parameters for this resource. The
common parameters
also apply. See
Searching
for
more
information
about
searching
in
REST,
messaging,
and
services.
for more information about searching in REST, messaging, and services.
| Name | Type | Description | Paths |
| authenticator | reference |
|
DocumentReference.authenticator
( Organization |
| author | reference |
|
DocumentReference.author
( Device |
| class | token |
|
DocumentReference.class |
| created | date |
|
DocumentReference.created |
| custodian | reference |
|
DocumentReference.custodian
( Organization ) |
| description | string |
|
DocumentReference.description |
| encounter | reference |
|
DocumentReference.context.encounter
( Encounter ) |
| event | token |
|
DocumentReference.context.event |
| facility | token |
|
DocumentReference.context.facilityType |
| format | token |
|
DocumentReference.content.format |
| identifier | token |
|
|
| indexed | date |
|
DocumentReference.indexed |
| language | token |
|
DocumentReference.content.attachment.language |
| location | uri |
|
DocumentReference.content.attachment.url |
| patient | reference |
|
DocumentReference.subject
( Patient ) |
| period | date |
|
DocumentReference.context.period |
| related-id | token |
|
DocumentReference.context.related.identifier |
| related-ref | reference |
|
DocumentReference.context.related.ref
(Any) |
| relatesto | reference |
|
DocumentReference.relatesTo.target
( DocumentReference ) |
| relation | token |
|
DocumentReference.relatesTo.code |
| relationship | composite |
|
|
| securitylabel | token |
|
DocumentReference.securityLabel |
| setting | token |
|
DocumentReference.context.practiceSetting |
| status | token |
|
DocumentReference.status |
| subject | reference |
|
DocumentReference.subject
( Device |
| type | token |
|
DocumentReference.type |