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.

Salient fields

The profile's synthesized-accessor contract: fields TypedFhir surfaces as first-class typed properties, each computed from the instance by a restricted FHIRPath expression. See Salient Fields for what they are, how they shape LLM contexts, and how to declare them.

Key Type Expression Rendered as Description
type coded type Precise type of document (use category instead) i
category coded category Document categorization (preferred over type) i
status code status Where the document reference is in its lifecycle i
date dateTime date When DocumentReference was created (not document date) i
description string description Human-readable description of document content i
author string author.first().display Who wrote the document i
title string content.first().attachment.title Document title for display
url string content.first().attachment.url Absolute URL to the stored document -- the READ channel; set by the gateway i

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.
Expression type
Type coded
Prose inherited from DocumentReference.type

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.
Expression category
Type coded
Prose inherited from DocumentReference.category

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.
Expression status
Type code
Prose inherited from DocumentReference.status

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.
Expression date
Type dateTime
Prose inherited from DocumentReference.date

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"
Comments What the document is about, a terse summary of the document.
Expression description
Type string
Prose inherited from DocumentReference.description

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).
Expression author.first().display
Type string
Prose inherited from DocumentReference.author

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"
Expression content.first().attachment.title
Type string
Prose inherited from DocumentReference.content.attachment.title

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.
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.
Expression content.first().attachment.url
Type string
Prose inherited from DocumentReference.content.attachment.url