Skip to content

DocumentReference Profile

Canonical../StructureDefinition/nexus-emr-core-documentreference
Statusdraft · 1.26.0
BaseDocumentReference (constraint)
CQL primary code pathtypewhat this means
SourceFSH · JSON

Nexus EMR profile for an ATTACHED DOCUMENT -- a clinical document that exists as a file: scanned paper, incoming faxes, external consult letters received as PDF, signed consent forms, patient-uploaded files. FHIR holds the metadata and clinical context; the bytes live in document storage and are reached through content.attachment.url.

Elements / Details

Every element this profile touches, with its full definition. Element names in the tables link here.

DocumentReference

Short An attached document (scan, PDF, fax, Word) with its metadata and clinical context
Definition DocumentReference is the metadata wrapper for a document that exists as a FILE -- scanned paper, an incoming fax, an external consult letter received as PDF, a signed consent form. It provides indexing, discovery, and clinical context; the bytes themselves live in document storage and are reached through content.attachment.url. For notes AUTHORED in this EMR, use NexusEmrCoreComposition instead -- narrative belongs in FHIR as XHTML, not as an encoded attachment. See the boundary rule at the top of this file. The resource captures: - Document identification and categorization - Clinical context and temporal relevance - Authorship and authentication details - A pointer to the document content (and, on the way in, the content itself) - Relationships to other documents
Comments Usually, this is used for documents other than those defined by FHIR.
Cardinality 0..*
Invariants dom-2, dom-3, dom-4, dom-5, dom-6, attachment-has-data-or-url, nexus-documentreference-subject-unless-template, nexus-documentreference-field-mapping-only-on-template

DocumentReference.id

Short Logical id of this artifact
Definition The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
Comments The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.meta

Short Metadata about the resource
Definition The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
Cardinality 0..1
Type Meta
Invariants ele-1

DocumentReference.meta.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.meta.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.meta.versionId

Short Version specific identifier
Definition The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
Comments The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.
Cardinality 0..1
Type id
Invariants ele-1

DocumentReference.meta.lastUpdated

Short When the resource version last changed
Definition When the resource last changed - e.g. when the version changed.
Comments This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a read interaction.
Cardinality 0..1
Type instant
Invariants ele-1

DocumentReference.meta.source

Short Identifies EMR instance & pipeline version the resource came from
Definition A URI that identifies the EMR pipeline and version from which this resource originated. This tells you which EMR instance (recommend using the instance identifier), and the version of the pipeline code/transformations.
Comments In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.
Cardinality 0..1
Type uri
Must Support yes
Invariants ele-1

DocumentReference.meta.profile

Short Profiles this resource claims to conform to
Definition A list of profiles (references to StructureDefinition resources) that this resource claims to conform to. The URL is a reference to StructureDefinition.url.
Comments It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
Cardinality 0..*
Type canonical
Invariants ele-1

DocumentReference.meta.security

Short Security Labels applied to this resource
Definition Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
Comments The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
Cardinality 0..*
Type Coding
Binding security-labels (extensible)
Invariants ele-1

DocumentReference.meta.tag

Short Tags applied to this resource
Definition Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
Comments The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.
Cardinality 0..*
Type Coding
Binding common-tags (example)
Invariants ele-1

DocumentReference.implicitRules

Short A set of rules under which this content was created
Definition A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
Comments Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
Cardinality 0..1
Type uri
Modifier yes — This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
Invariants ele-1

DocumentReference.language

Short Language of the resource content
Definition The base language in which the resource is written.
Comments Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
Cardinality 0..1
Type code
Binding languages (preferred)
Invariants ele-1

DocumentReference.text

Short Human-readable summary of the document reference
Definition A human-readable narrative that contains a summary of the document reference. This narrative should provide key information about the document for human interpretation, including document type, date, and key clinical context.
Comments Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
Cardinality 0..1
Type Narrative
Must Support yes
Invariants ele-1
Also called narrative, html, xhtml, display

DocumentReference.contained

Short Contained, inline Resources
Definition These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
Comments This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
Cardinality 0..*
Type Resource
Also called inline resources, anonymous resources, contained resources

DocumentReference.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.extension:reviewed

Short Review acknowledgement, one per reviewer (absent = unreviewed)
Definition May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension(Reviewed)
Must Support yes
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.extension:statusReason

Short Free-text reason the document is superseded or entered in error (absent when current)
Definition Why the document is no longer current: what replaced a superseded document, or what made an entered-in-error one wrong. Written when the status changes and removed when the document is made current again, so a stale reason never sits on an active document. Because the resource is updated in place, each stored version keeps the reason that applied to it -- the store's version history is the audit of who changed the status, when, from what to what, and why. Optional: a status change with no reason is a complete record.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..1
Type Extension(Document Status Reason Extension)
Must Support yes
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.extension:fieldMapping

Short Fillable fields a chart value pre-fills -- form templates only
Definition Which fillable fields of this template's file a chart value pre-fills when a form is started from it: one rule per field, naming the field as the file names it and the chart value (from CodeSystem/nexus-form-chart-value) that fills it. Present only on a form template. Absent, or naming no field the file carries, the form opens blank; present, every pre-filled value stays editable.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..1
Type Extension(Form Template Field Mapping)
Must Support yes
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.modifierExtension

Short Extensions that cannot be ignored
Definition May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.masterIdentifier

Short Master Version Specific Identifier
Definition Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.
Requirements The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form "oid^extension", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).
Comments CDA Document Id extension and root.
Cardinality 0..1
Type Identifier
Invariants ele-1

DocumentReference.identifier

Short Business identifier(s) for document reference
Definition Unique business identifiers assigned to this document reference.
Comments A source system's own identifier SHOULD be carried alongside this one, flagged use = secondary. See Carrying the raw code.
Cardinality 0..*
Type Identifier
Invariants ele-1

DocumentReference.identifier.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.identifier.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.identifier.use

Short usual | official | temp | secondary | old (If known)
Definition The purpose of this identifier.
Requirements Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.
Comments Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.
Cardinality 0..1
Type code
Modifier yes — This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one.
Binding identifier-use (required)
Invariants ele-1

DocumentReference.identifier.type

Short Description of identifier
Definition A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.
Requirements Allows users to make use of identifiers when the identifier system is not known.
Comments This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.
Cardinality 0..1
Type CodeableConcept
Binding identifier-type (extensible)
Invariants ele-1

DocumentReference.identifier.system

Short The namespace for the identifier value
Definition Establishes the namespace for the value - that is, a URL that describes a set values that are unique.
Requirements There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.
Comments Identifier.system is always case sensitive.
Cardinality 1..1
Type uri
Invariants ele-1

DocumentReference.identifier.value

Short The value that is unique
Definition The portion of the identifier typically relevant to the user and which is unique within the context of the system.
Comments If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the Rendered Value extension. Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.
Cardinality 1..1
Type string
Invariants ele-1

DocumentReference.identifier.period

Short Time period when id is/was valid for use
Definition Time period during which identifier is/was valid for use.
Cardinality 0..1
Type Period
Invariants ele-1

DocumentReference.identifier.assigner

Short Organization that issued id (may be just text)
Definition Organization that issued/manages the identifier.
Comments The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.
Cardinality 0..1
Type Reference(Organization)
Invariants ele-1

DocumentReference.status

Short Where the document reference is in its lifecycle
Definition The status of this document reference. Allowed values: - current: The document is active and current - superseded: The document has been replaced by a newer version - entered-in-error: The document was created in error and should not be used (deleted) When a document is updated, the previous version can be marked as 'superseded' and a new DocumentReference created with status 'current'. This approach: - Maintains immutable document history - Provides clear version tracking - Enables audit trails - Supports document lifecycle management
Comments This is the status of the DocumentReference object, which might be independent from the docStatus element. This element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid.
Cardinality 1..1
Type code
Must Support yes
Modifier yes — This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
Binding document-reference-status (required)
Invariants ele-1

DocumentReference.docStatus

Short preliminary | final | amended | entered-in-error
Definition The status of the underlying document.
Comments The document that is pointed to might be in various lifecycle states.
Cardinality 0..1
Type code
Binding composition-status (required)
Invariants ele-1

DocumentReference.type

Short Precise type of document (use category instead)
Definition Specifies the precise type of clinical document referenced (e.g., specific LOINC code for document type). While this field is supported for backward compatibility with systems expecting it, Nexus EMR strongly recommends using 'category' instead because: - Category supports multiple classifications per document - Category allows both clinical and administrative taxonomies - Type is limited to a single classification If used, prefer LOINC codes for interoperability. Where this code was mapped from a source system's own vocabulary, carry the raw coding alongside the mapped one, flagged userSelected = true. See Carrying the raw code.
Comments Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.
Cardinality 0..1
Type CodeableConcept
Binding c80-doc-typecodes (extensible)
Invariants ele-1

DocumentReference.type.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.type.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.type.coding

Short Code defined by a terminology system
Definition A reference to a code defined by a terminology system.
Requirements Allows for alternative encodings within a code system, and translations to other code systems.
Comments Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
Cardinality 0..*
Type Coding
Invariants ele-1

DocumentReference.type.coding:loinc

Short LOINC document type code
Definition LOINC code for document type when available
Requirements Allows for alternative encodings within a code system, and translations to other code systems.
Comments Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
Cardinality 0..1
Type Coding
Must Support yes
Invariants ele-1

DocumentReference.type.coding:loinc.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.type.coding:loinc.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.type.coding:loinc.system

Short Identity of the terminology system
Definition The identification of the code system that defines the meaning of the symbol in the code.
Requirements Need to be unambiguous about the source of the definition of the symbol.
Comments The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.
Cardinality 1..1
Type uri
Fixed value http://loinc.org
Invariants ele-1

DocumentReference.type.coding:loinc.version

Short Version of the system - if relevant
Definition The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
Comments Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
Cardinality 0..1
Type string
Invariants ele-1

DocumentReference.type.coding:loinc.code

Short Symbol in syntax defined by the system
Definition A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
Requirements Need to refer to a particular code in the system.
Cardinality 1..1
Type code
Invariants ele-1

DocumentReference.type.coding:loinc.display

Short Representation defined by the system
Definition A representation of the meaning of the code in the system, following the rules of the system.
Requirements Need to be able to carry a human-readable meaning of the code for readers that do not know the system.
Cardinality 0..1
Type string
Invariants ele-1

DocumentReference.type.coding:loinc.userSelected

Short If this coding was chosen directly by the user
Definition Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
Requirements This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.
Comments Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.
Cardinality 0..1
Type boolean
Invariants ele-1

DocumentReference.type.text

Short Plain text representation of document type
Definition A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
Requirements The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.
Comments Very often the text is the same as a displayName of one of the codings.
Cardinality 0..1
Type string
Invariants ele-1

DocumentReference.category

Short Document categorization (preferred over type)
Definition High-level categorization of the document. This is the PREFERRED method for document classification in Nexus EMR. Multiple categories can be assigned to provide different perspectives on the document's purpose and content. Common categories include: - Received correspondence (consult letters, discharge summaries from other institutions) - Scanned paper and incoming faxes - Diagnostic documents (lab or imaging reports delivered as files rather than as DiagnosticReport) - Legal and administrative documents (consent forms, advance directives, insurance forms) - Patient-supplied documents Note what is NOT here since the 2026-08-06 narrowing: progress notes and consultation notes AUTHORED in this EMR are NexusEmrCoreComposition, not DocumentReference. A consult note received as a PDF is still a DocumentReference -- the distinction is the form the content arrives in, not the clinical genre. Use standard terminologies (LOINC, SNOMED CT) for maximum interoperability.
Comments Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching.
Cardinality 0..*
Type CodeableConcept
Must Support yes
Binding document-classcodes (example)
Invariants ele-1
Also called claxs

DocumentReference.category.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.category.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.category.coding

Short Code defined by a terminology system
Definition A reference to a code defined by a terminology system.
Requirements Allows for alternative encodings within a code system, and translations to other code systems.
Comments Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
Cardinality 0..*
Type Coding
Invariants ele-1

DocumentReference.category.text

Short Plain text category description
Definition A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
Requirements The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.
Comments Very often the text is the same as a displayName of one of the codings.
Cardinality 0..1
Type string
Must Support yes
Invariants ele-1

DocumentReference.subject

Short The patient the document is about
Definition The patient that this document pertains to. Required for every document EXCEPT a form template, which is the tenant-wide blank of a form type and is about no patient; the nexus-documentreference-subject-unless-template invariant states that rule in evaluable form. When present it must reference a valid NexusEmrCorePatient resource, and the reference should use the patient's identifier for reliable cross-system identification. While the FHIR standard allows documents about other subjects (Device, Practitioner, Group), Nexus EMR currently only supports patient-centric documents to align with Canadian healthcare requirements.
Comments Required unless this is a form template.
Cardinality 0..1
Type Reference(Patient Profile)
Must Support yes
Invariants ele-1

DocumentReference.date

Short When DocumentReference was created (not document date)
Definition When this DocumentReference resource was created in the system. This is NOT necessarily when the document itself was created or when the documented service occurred. Timing relationships: - date: When DocumentReference was created (this field) - content.attachment.creation: When document was created - context.period: When clinical service occurred Example: A discharge summary for April 10-15 admission might be: - Service period: 2025-04-10 to 2025-04-15 - Document created: 2025-04-15T14:00:00 - DocumentReference created: 2025-04-16T09:00:00 (next day upload) This field is primarily for technical/audit purposes.
Comments Referencing/indexing time is used for tracking, organizing versions and searching.
Cardinality 0..1
Type instant
Must Support yes
Invariants ele-1
Also called indexed

DocumentReference.author

Short Who wrote the document
Definition Identifies who was responsible for writing the document content. Can include multiple authors for collaborative documents. Note the distinction: - Author: Who wrote/created the content - Authenticator: Who legally verified/signed the document - Custodian: Organization maintaining the document - in EMRs, you probably want to be using 'authenticator' rather than 'author' here. - eg: 'author' may be a medical student, 'authenticator' could be the doc signing off. - 'authenticator' is the person who is medically responsible for the content of this document. Authors can only be EMR users in this context, referenced as a Practitioner (the primary provider identity in this IG) or as a PractitionerRole where the clinic/role binding is part of the assertion. Order matters - list primary author first.
Comments Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant).
Cardinality 0..*
Type Reference(PractitionerRole Profile | Practitioner Profile)
Must Support yes
Invariants ele-1

DocumentReference.authenticator

Short Practitioner who verified this document
Definition The practitioner who has legally authenticated or verified this document, taking responsibility for its content. This represents medical/legal responsibility rather than authorship. The authenticator: - Must have appropriate authority/credentials - Takes responsibility for document accuracy - May or may not be the document author - Should be a single practitioner (not multiple) Typically the attending physician, consultant, or supervising practitioner. References a Practitioner -- the primary provider identity in this IG. A PractitionerRole reference is also permitted, for the cases where the clinic/role binding is part of what is being asserted (e.g. authentication performed in a specific role at a specific organization, which Practitioner cannot express since it has no organization).
Comments Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.
Cardinality 0..1
Type Reference(PractitionerRole Profile | Practitioner Profile)
Must Support yes
Invariants ele-1

DocumentReference.custodian

Short Organization responsible for document maintenance
Definition The organization that is responsible for maintaining the authoritative source of this document and controlling access to it. This is a REQUIRED field that identifies: - Who has stewardship of the document - Where to direct queries about the document - Who is responsible for retention policies - Who manages access permissions Typically the organization that created the document or currently manages the patient's care. Must reference a valid NexusEmrCoreOrganization resource.
Comments Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.
Cardinality 1..1
Type Reference(Organization Profile)
Must Support yes
Invariants ele-1

DocumentReference.relatesTo

Short Relationships to other documents
Definition Relationships that this document has with other document references that already exist.
Comments This element is labeled as a modifier because documents that append to other documents are incomplete on their own.
Cardinality 0..*
Type BackboneElement
Invariants ele-1

DocumentReference.relatesTo.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.relatesTo.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.relatesTo.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

DocumentReference.relatesTo.code

Short replaces | transforms | signs | appends
Definition The type of relationship that this document has with anther document.
Comments If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.
Cardinality 1..1
Type code
Binding document-relationship-type (required)
Invariants ele-1

DocumentReference.relatesTo.target

Short Target of the relationship
Definition The target document of this relationship.
Cardinality 1..1
Type Reference(DocumentReference)
Invariants ele-1

DocumentReference.description

Short Human-readable description of document content
Definition A human-readable description of the document's content and purpose. While optional, this field is strongly recommended as it: - Provides quick context without opening the document - Improves searchability and discoverability - Helps users identify relevant documents quickly - Supports accessibility requirements Should be concise but informative (typically 1-2 sentences). Examples: - "Complete blood count showing mild anemia, hemoglobin 10.2" - "Cardiology consultation for chest pain, recommending stress test" - "Discharge summary following 5-day admission for pneumonia"
Requirements Helps humans to assess whether the document is of interest.
Comments What the document is about, a terse summary of the document.
Cardinality 0..1
Type string
Must Support yes
Invariants ele-1

DocumentReference.securityLabel

Short Document security-tags
Definition A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.
Requirements Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.
Comments The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce.
In the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.
Cardinality 0..*
Type CodeableConcept
Binding security-labels (extensible)
Invariants ele-1

DocumentReference.content

Short Document attachment(s) -- submitted inline, stored as files, read back by URL
Definition The document content and its metadata. Each content element is one attachment. Multiple attachments per DocumentReference are supported (a referral letter plus supporting results), but most cases are a single document. THE ROUND TRIP -- what a writer sends is not what a reader gets back. WRITING. Submit the document inline: contentType plus base64 in attachment.data, with no url. On create or update the gateway stores the bytes, then rewrites the attachment before persisting it: url is set to the stored-document address, size and hash (SHA-1) are computed and filled in, and data is cleared. Writers SHOULD NOT compute size, hash, or url themselves. READING. Expect url and no data. Fetch the bytes from the URL (see content.attachment.url for the auth contract). Consumers MUST NOT assume data is populated. SENDING BOTH IS A TRAP. The conversion is guarded on url being absent. An attachment carrying BOTH data and a url bypasses storage entirely and the base64 is persisted inline in the FHIR resource, where it will be echoed on every subsequent read. Send one or the other: data to upload new content, url only to reference something already stored. STABLE URLS ACROSS UPDATES. Updating a DocumentReference reuses the existing stored-document identity, so the URL does not churn when metadata changes. (Note this is DocumentReference-only behaviour; DiagnosticReport.presentedForm runs through the same middleware but without the existing-document lookup, so its attachments get a fresh URL on each update.) At least one of data or url MUST be present per attachment (invariant attachment-has-data-or-url) -- which, given the above, means "inline on the way in, URL on the way out."
Cardinality 1..*
Type BackboneElement
Must Support yes
Invariants ele-1

DocumentReference.content.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.content.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.content.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

DocumentReference.content.attachment

Short The document: MIME type, content (inline on write / URL on read), and file metadata
Definition The attachment carrying the document. Required. Provides MIME type identification, the content itself (inline base64 on write, a stored-file URL on read -- see content for the round trip), a human-readable title, size, hash, and language. size and hash are populated by the gateway during storage; writers need not supply them.
Cardinality 1..1
Type Attachment
Must Support yes
Invariants ele-1

DocumentReference.content.attachment.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.content.attachment.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.content.attachment.contentType

Short MIME type (e.g., 'application/pdf')
Definition MIME type identifying the document format. This is REQUIRED to ensure proper handling and display of the document. Common values: - 'application/pdf' - PDF documents (most common) - 'text/plain' - Plain text documents - 'text/html' - HTML formatted documents - 'text/rtf' - Rich text format - 'image/jpeg' - JPEG images (scanned documents) - 'image/png' - PNG images - 'application/msword' - Microsoft Word - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' - Word DOCX The MIME type must accurately reflect the actual content format.
Requirements Processors of the data need to be able to know how to interpret the data.
Cardinality 1..1
Type code
Must Support yes
Binding mimetypes (required)
Invariants ele-1

DocumentReference.content.attachment.language

Short Language of document content
Definition BCP-47 language tag indicating the human language of the document content. Important for: - Multilingual healthcare settings - Accessibility requirements - Content filtering/searching - Translation workflows Common values: - 'en-CA' - Canadian English - 'fr-CA' - Canadian French - 'en' - English (generic) - 'fr' - French (generic) - 'es' - Spanish Example: A discharge summary in French would have language = 'fr-CA'
Requirements Users need to be able to choose between the languages in a set of attachments.
Cardinality 0..1
Type code
Binding languages (preferred)
Invariants ele-1

DocumentReference.content.attachment.data

Short Base64 document content -- the UPLOAD channel; normally absent on read
Definition The document content as base64-encoded binary. This is the upload channel: populate it (with no url) to submit a new document. NORMALLY ABSENT ON READ. The gateway clears data once the bytes are stored, so a reader gets url instead. Consumers MUST NOT assume this element is populated, and MUST NOT treat its absence as an empty document. Do not send data and url together -- see content. That combination skips storage and persists the base64 inline permanently. Implementation notes: - Line breaks in the base64 string should be avoided; standard alphabet (A-Z, a-z, 0-9, +, /). - Large documents: no explicit size threshold is enforced by the gateway, and the whole body is buffered in memory during conversion. Very large inline submissions are a practical risk (request-body limits and memory), not a specified one -- prefer keeping documents modest and raise it with the platform team rather than assuming a limit exists. Example encoding (JavaScript):
const base64Data = Buffer.from(fileContent).toString('base64');
Example encoding (Python): python import base64 base64_data = base64.b64encode(file_content).decode('utf-8')
Requirements The data needs to able to be transmitted inline.
Comments The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.
Cardinality 0..1
Type base64Binary
Must Support yes
Invariants ele-1

DocumentReference.content.attachment.url

Short Absolute URL to the stored document -- the READ channel; set by the gateway
Definition Where the document bytes can be fetched. This is the read channel, and for gateway-ingested documents it is written BY the gateway during storage -- clients uploading new content should leave it empty and send data. SHAPE. An absolute URL served by the platform's File Storage Service: https://{host}/fss/api/v1/file/{documentId} This is NOT a FHIR Binary reference (this platform implements no Binary endpoint), and NOT a pre-signed or SAS blob URL. It is a normal API endpoint. FETCHING IT. The URL is not self-authorizing. Retrieval requires the caller's own credentials: a bearer token carrying the file-read permission, and the request resolves within the caller's tenant -- a document belonging to another tenant is not found, regardless of the identifier. A client that treats this like a public or signed download link will get a 401, not a document. Reads are audited. STABILITY. The URL is permanent for the life of the document -- no expiry, no rotation -- and survives updates to the DocumentReference (the gateway reuses the stored-document identity). It may therefore be cached and stored. SUPPLYING A URL YOURSELF. Permitted, for referencing content already held by the platform, but validated: the host must be trusted, and an untrusted host is rejected with a 400 and an OperationOutcome directing you to upload via data instead. Do not point this element at arbitrary external systems -- content that lives outside the platform should be ingested, not linked.
Requirements The data needs to be transmitted by reference.
Comments If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.
Cardinality 0..1
Type url
Invariants ele-1

DocumentReference.content.attachment.size

Short Number of bytes of content (if url provided)
Definition The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
Requirements Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.
Comments The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.
Cardinality 0..1
Type unsignedInt
Invariants ele-1

DocumentReference.content.attachment.hash

Short Hash of the data (sha-1, base64ed)
Definition The calculated hash of the data using SHA-1. Represented using base64.
Requirements Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).
Comments The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see Provenance.signature for mechanism to protect a resource with a digital signature.
Cardinality 0..1
Type base64Binary
Invariants ele-1

DocumentReference.content.attachment.title

Short Document title for display
Definition Human-readable title for the document. While optional, this field is strongly recommended for user experience. The title should be: - Descriptive and meaningful - Suitable for display in document lists - Include relevant context (e.g., date, type) - 50-100 characters typically Examples: - "Discharge Summary - April 15, 2025" - "CBC Results - Hemoglobin 10.2" - "Cardiology Referral - Dr. Smith" - "Chest X-Ray Report - Normal"
Requirements Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.
Cardinality 0..1
Type string
Must Support yes
Invariants ele-1

DocumentReference.content.attachment.creation

Short Date/time document was created
Definition The date/time when the document was originally created (not when the DocumentReference was created). Useful for: - Distinguishing between multiple versions - Understanding document timeline - Sorting documents chronologically - Audit trail purposes Format: FHIR dateTime (e.g., "2025-04-20T10:00:00-06:00")
Requirements This is often tracked as an integrity issue for use of the attachment.
Cardinality 0..1
Type dateTime
Invariants ele-1

DocumentReference.content.format

Short Format/content rules for the document
Definition An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.
Comments Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.
Cardinality 0..1
Type Coding
Binding formatcodes (preferred)
Invariants ele-1

DocumentReference.context

Short Clinical context of document
Definition The clinical context in which the document was prepared.
Comments These values are primarily added to help with searching for interesting/relevant documents.
Cardinality 0..1
Type BackboneElement
Invariants ele-1

DocumentReference.context.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.context.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.context.modifierExtension

Short Extensions that cannot be ignored even if unrecognized
Definition May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Requirements Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Modifier yes — Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
Invariants ele-1, ext-1
Also called extensions, user content, modifiers

DocumentReference.context.encounter

Short Related clinical encounter(s)
Definition Encounter(s) related to the document content. Links the document to specific clinical visits, admissions, or other healthcare interactions. Multiple encounters can be referenced if the document spans multiple visits. Examples: - Discharge summary → Inpatient admission encounter - Consultation note → Outpatient consultation encounter - Operative report → Surgical encounter - Progress note → Daily hospital round encounter Providing encounter context enables: - Grouping documents by visit - Understanding care continuity - Encounter-based searches - Billing/administrative workflows
Cardinality 0..*
Type Reference(Encounter Profile)
Must Support yes
Invariants ele-1

DocumentReference.context.event

Short Main clinical acts documented
Definition This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.
Comments An event can further specialize the act inherent in the type, such as where it is simply "Procedure Report" and the procedure was a "colonoscopy". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.
Cardinality 0..*
Type CodeableConcept
Binding v3-ActCode (example)
Invariants ele-1

DocumentReference.context.period

Short Time period of documented service. Only 'start' expected
Definition The time period over which the service described by the document was provided. This represents the clinical relevance timeframe, not when the document was created. Critical for understanding temporal context. Examples: - Discharge summary: Admission to discharge dates - Consultation note: Consultation appointment time - Progress note: Specific day of care - Procedure report: Surgery start to end time If only a point in time is relevant, use 'start' only. For ongoing care, 'end' may be absent.
Cardinality 0..1
Type Period
Must Support yes
Invariants ele-1

DocumentReference.context.period.id

Short Unique id for inter-element referencing
Definition Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality 0..1
Type http://hl7.org/fhirpath/System.String

DocumentReference.context.period.extension

Short Additional content defined by implementations
Definition May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Comments There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
Cardinality 0..*
Type Extension
Invariants ele-1, ext-1
Also called extensions, user content

DocumentReference.context.period.start

Short Starting time with inclusive boundary
Definition The start of the period. The boundary is inclusive.
Comments If the low element is missing, the meaning is that the low boundary is not known.
Cardinality 1..1
Type dateTime
Must Support yes
Invariants ele-1

DocumentReference.context.period.end

Short End time with inclusive boundary, if not ongoing
Definition The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.
Comments The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.
Cardinality 0..1
Type dateTime
Invariants ele-1

DocumentReference.context.facilityType

Short Kind of facility where patient was seen
Definition The kind of facility where the patient was seen.
Cardinality 0..1
Type CodeableConcept
Binding c80-facilitycodes (example)
Invariants ele-1

DocumentReference.context.practiceSetting

Short Additional details about where the content was created (e.g. clinical specialty)
Definition This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.
Requirements This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.
Comments This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC.
Cardinality 0..1
Type CodeableConcept
Binding c80-practice-codes (example)
Invariants ele-1

DocumentReference.context.sourcePatientInfo

Short Patient demographics from source
Definition The Patient Information as known when the document was published. May be a reference to a version specific, or contained.
Cardinality 0..1
Type Reference(Patient)
Invariants ele-1

DocumentReference.context.related

Short What this document was assembled from or sent with -- the packet, and its host
Definition Other resources this document is related to. For a rendered outbound artifact this is the BACK POINTER: the attachment packet whose members it renders, and the host that packet travelled with (a letter's Composition, a referral's ServiceRequest). The FORWARD link is on the host and is the one to navigate: a letter names its packet in one Composition.section.entry, a referral in ServiceRequest.supportingInfo. This element exists so a reader that starts from the document can get back, not so the relationship can be discovered by search -- related is not a declared search parameter on this server.
Comments May be identifiers or resources that caused the DocumentReference or referenced Document to be created.
Cardinality 0..*
Type Reference(Resource)
Must Support yes
Invariants ele-1