# US Core ADI DocumentReference Profile - US Core Implementation Guide v9.0.0

* [**Table of Contents**](toc.md)
* [**Artifacts Summary**](artifacts.md)
* **US Core ADI DocumentReference Profile**

## Resource Profile: US Core ADI DocumentReference Profile 

| | | |
| :--- | :--- | :--- |
| *Official URL*:http://hl7.org/fhir/us/core/StructureDefinition/us-core-adi-documentreference | *Version*:9.0.0 | |
| * Standards status: *[Trial-use](http://hl7.org/fhir/R4/versions.html#std-process) | [Maturity Level](changes-between-versions.md#us-core-maturity-levels): 2 | *Computable Name*:USCoreADIDocumentReferenceProfile |
| *Other Identifiers:*OID:2.16.840.1.113883.4.642.40.2.42.4 | | |

 
The US Core Advance Directive Information (ADI) DocumentReference Profile inherits from the FHIR [DocumentReference](https://hl7.org/fhir/R4/documentreference.html) resource; refer to it for scope and usage definitions. It sets minimum expectations for searching and fetching patient Advance Directive Information (ADI) documents using the DocumentReference resource. Examples of advance healthcare directive documents include physician order for life sustaining treatment (POLST), do not resuscitate order (DNR), and Living Will. In addition to the document contents, it communicates the type of advance directive document, the author, the verifier, and other properties. To represent whether advance directive documents exist for a patient, see the [US Core Observation ADI Documentation Profile](StructureDefinition-us-core-observation-adi-documentation.md). This profile sets minimum expectations for searching and fetching patient ADI documents using the DocumentReference resource. It specifies which core elements, extensions, vocabularies, and value sets **SHALL** be present and constrains how the elements are used. Providing the floor for standards development for specific use cases promotes interoperability and adoption. 

**Example Usage Scenarios:**

The following are example usage scenarios for the US Core ADI DocumentReference profile:

* Query for all ADI documents belonging to a Patient
* Query for a specific ADI Document type (e.g., POLST or Living Will)

### Mandatory and Must Support Data Elements

The following data elements must always be present ([Mandatory](must-support.md) definition) or must be supported if the data is present in the sending system ([Must Support](must-support.md) definition). They are presented below in a simple human-readable explanation. Profile specific guidance and examples are provided as well. The [Formal Views](#profile) below provides the formal summary, definitions, and terminology requirements.

**Each DocumentReference Must Have:**

1. a status
1. a code describing the type of ADI document (for example, POLST or Living Will)
1. an ADI document category (for example, Advance Directives)
1. a patient
1. document referenced (content)
1. the MIME type (i.e., contentType) of the document

**Each DocumentReference Must Support:**

1. a business identifier for the DocumentReference (possibly generated by the transcription system or EHR)
1. date and time the DocumentReference was created
1. an author1
1. a code identifying the specific implementation requirements that the document conforms to — over and above the content's MIME type

1 see guidance below

### Profile Specific Implementation Guidance

This section provides detailed implementation guidance for the US Core Profile to support implementation and certification.

* This profile and the [US Core Observation ADI Documentation Profile](StructureDefinition-us-core-observation-adi-documentation.md) meet the [U.S. Core Data for Interoperability (USCDI)](https://www.healthit.gov/isa/united-states-core-data-interoperability-uscdi) **Advance Directive Observation** Data Element requirements.
* This profile can communicate the contents of a Portable Medical Order (PMO) document, such as POLST, MOLST, or other state-specific forms, satisfying USCDI's **Portable Medical Order** Data Element requirements. 
* The [US Core ServiceRequest Profile](StructureDefinition-us-core-servicerequest.md) can be used to represent a derived "actionable" order based on a PMO.
 
* In addition to the [Advance Directive Categories](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.11.20.9.69.4/expansion) value set, other category schemes may be used to facilitate the sharing of health documents.
* The DocumentReference resources can represent the referenced content using either an address where the document can be retrieved using `DocumentReference.content.attachment.url` or the content as inline base64 encoded data using `DocumentReference.content.attachment.data`. 
* Although both are marked as Must Support, the Server system is not required to support an address and inline base64 encoded data, but **SHALL** support at least one of these elements.[§](requirements.md#CONF-0368)
* The Client application **SHALL** support both elements.[§](requirements.md#CONF-0369),[§](requirements.md#CONF-0370)
* The `DocumentReference.content.attachment.url` may refer to a FHIR Binary Resource (i.e., [base]/Binary/[id]), FHIR Document Bundle (i.e., [base]/Bundle/[id], or another endpoint). 
* If the referenced document or file is hosted on a server outside the FHIR server, it **SHOULD** be securely accessible using the same authorization credentials that were used to access the FHIR server.[§](requirements.md#CONF-0839) This reduces complexity for the client and improves the user experience.
 
* If there are multiple `DocumentReference.content` element repetitions, these **SHALL** all represent the same document in different formats or attachment metadata.[§](requirements.md#CONF-0372) The content element **SHALL NOT** contain different versions of the same content.[§](requirements.md#CONF-0373) For version handling, use multiple DocumentReferences with `DocumentReference.relatesTo`.
 
* Every DocumentReference must have a responsible Organization. The organization responsible for the DocumentReference **SHALL** be present either in `DocumentReference.custodian` or accessible in the Provenance resource targeting the DocumentReference using `Provenance.agent.who` or `Provenance.agent.onBehalfOf`.[§](requirements.md#CONF-0374) 
* Some systems may also expose the same organization in referenced Encounter in `Encounter.serviceProvider`.
 

* 1The profile element `DocumentReference.author` communicates the [individual level provenance](basic-provenance.md#individual-level-provenance) author data corresponding to the U.S. Core Data for Interoperability (USCDI) Provenance Author Data Elements.
* To represent the patient and provider attestation metadata, the **optional** DocumentReference Attestor R5 Extension in the formal definition below **SHOULD** be used.[§](requirements.md#CONF-0899) The examples associated with this profile illustrate how it is populated for various ADI documents.

**Usages:**

* Refer to this Profile: [US Core Observation ADI Documentation Profile](StructureDefinition-us-core-observation-adi-documentation.md)
* Examples for this Profile: [DocumentReference/adi-dnr](DocumentReference-adi-dnr.md), [DocumentReference/living-will](DocumentReference-living-will.md) and [DocumentReference/polst](DocumentReference-polst.md)
* CapabilityStatements using this Profile: [US Core Client CapabilityStatement](CapabilityStatement-us-core-client.md) and [US Core Server CapabilityStatement](CapabilityStatement-us-core-server.md)

You can also check for [usages in the FHIR IG Statistics](https://packages2.fhir.org/xig/resource/hl7.fhir.us.core|current/StructureDefinition/StructureDefinition-us-core-adi-documentreference.json)

**Changes since version 8.0.1:**

* The resource metadata has changed (description, copyright)

* The data elements list has changed

* One or more text definitions, invariants or bindings have changed

### Formal Views of Profile Content

 [Description of Profiles, Differentials, Snapshots and how the different presentations work](http://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#structure-definitions). 

 

Other representations of profile: [CSV](StructureDefinition-us-core-adi-documentreference.csv), [Excel](StructureDefinition-us-core-adi-documentreference.xlsx), [Schematron](StructureDefinition-us-core-adi-documentreference.sch) 

### Notes:

-------

**Quick Start**  

-------

Below is an overview of the required Server RESTful FHIR interactions for this profile - for example, search and read operations - when supporting the US Core interactions to access this profile's information (Profile Support + Interaction Support). Note that systems that support only US Core Profiles (Profile Only Support) are not required to support these interactions. See the [US Core Server CapabilityStatement](CapabilityStatement-us-core-server.md) for a complete list of supported RESTful interactions for this IG.

* See the [Scopes Format](scopes.md#scopes-format) section for a description of the SMART scopes syntax.
* See the [Search Syntax](general-guidance.md#search-syntax) section for a description of the US Core search syntax.
* See the [General Requirements](general-requirements.md) section for additional rules and expectations when a Server requires status parameters.
* See the [General Guidance](general-guidance.md) section for additional guidance on searching for multiple patients.

#### US Core Scopes

Servers providing access to adi data **SHALL** support these [US Core SMART Scopes](scopes.md#smart-scopes):

* [resource level scopes](http://hl7.org/fhir/smart-app-launch/STU2.2/scopes-and-launch-context.html#scopes-for-requesting-clinical-data): `<patient|user|system>/DocumentReference.rs` [§][]

-------

#### Mandatory Search Parameters:

The following search parameters and search parameter combinations **SHALL** be supported:

1. **SHALL** support both read DocumentReference by `id` **AND** DocumentReference search using the [_id](SearchParameter-us-core-documentreference-id.md) search parameter`GET [base]/DocumentReference?_id=[id]' or 'GET [base]/DocumentReference/[id]`Examples:
> 
1. GET [base]/DocumentReference/2169591
1. GET [base]/DocumentReference?_id=2169591

**Implementation Notes**: Fetches a single US Core ADI DocumentReference Profile or a search Bundle containing a US Core ADI DocumentReference Profile resource matching the id. The document itself is represented as a base64 encoded binary data element or retrieved using the link provided by the resource. If the document is a relative link to a [Binary](http://hl7.org/fhir/R4/binary.html) resource like a resource reference, it can be subsequently retrieved using: `GET [base]/Binary/[id]`. (see [Parameters for all resources](http://hl7.org/fhir/R4/search.html#all)).
1. **SHALL** support searching for all documentreferences for a patient using the [patient](SearchParameter-us-core-documentreference-patient.md) search parameter`GET [base]/DocumentReference?patient={Patient/}[id]`Example:
> 
1. GET [base]/DocumentReference?patient=Patient/1137192

**Implementation Notes**: Fetches a bundle of all US Core ADI DocumentReference Profile resources for the specified patient. See the implementation notes above for how to access the actual document. ( see [how to search by reference](http://hl7.org/fhir/R4/search.html#reference)).
1. **SHALL** support searching for all clinical notes for a given patient using the combination of the [patient](SearchParameter-us-core-documentreference-patient.md) and [category](SearchParameter-us-core-documentreference-category.md) search parameters`GET [base]/DocumentReference?patient={Patient/}[id]&category={system|}[search_code]`Example:
> 
1. GET [base]/DocumentReference?patient=Patient/1137192&category=http://loinc.org|42348-3

**Implementation Notes**: Fetches a bundle of all US Core ADI DocumentReference Profile resources for the specified patient and category = "42348-3". See the implementation notes above for how to access the actual document. ( see [how to search by reference](http://hl7.org/fhir/R4/search.html#reference) and [how to search by token](http://hl7.org/fhir/R4/search.html#token)).
1. **SHALL** support searching for all clinical notes for a given patient by date (for example, since 2019) using the combination of the [patient](SearchParameter-us-core-documentreference-patient.md) and [category](SearchParameter-us-core-documentreference-category.md) and [date](SearchParameter-us-core-documentreference-date.md) search parameters
* Including optional support for **AND** search on `date` (e.g.`date=[date]&date=[date]&...`)
* Including support for these `date` comparators: "gt", "lt", "ge", "le"
`GET [base]/DocumentReference?patient={Patient/}[id]&category={system|}[search_code]&date={gt|lt|ge|le}[dateTime]{&date={gt|lt|ge|le}[dateTime]&...}`Example:
> 
1. GET [base]/DocumentReference?patient=Patient/1137192&category=http://loinc.org|42348-3&date=ge2020-01-01T00:00:00Z

**Implementation Notes**: Fetches a bundle of all US Core ADI DocumentReference Profile resources for the specified patient and category = "42348-3" and date. See the implementation notes above for how to access the actual document. ( see [how to search by reference](http://hl7.org/fhir/R4/search.html#reference) and [how to search by token](http://hl7.org/fhir/R4/search.html#token) and [how to search by date](http://hl7.org/fhir/R4/search.html#date)).
1. **SHALL** support searching for a specific note type for a patient using the combination of the [patient](SearchParameter-us-core-documentreference-patient.md) and [type](SearchParameter-us-core-documentreference-type.md) search parameters`GET [base]/DocumentReference?patient={Patient/}[id]&type={system|}[search_code]`Example:
> 
1. GET [base]/DocumentReference?patient=Patient/1137192&type=http://loinc.org|84095-9

**Implementation Notes**: Fetches a bundle of all US Core ADI DocumentReference Profile resources for the specified patient and type. See the implementation notes above for how to access the actual document. ( see [how to search by reference](http://hl7.org/fhir/R4/search.html#reference) and [how to search by token](http://hl7.org/fhir/R4/search.html#token)).

#### Optional Search Parameters:

The following search parameters and search parameter combinations **SHOULD** be supported

1. **SHOULD** support searching for all documents for a patient for a given status (for example completed reports ) using the combination of the [patient](SearchParameter-us-core-documentreference-patient.md) and [status](SearchParameter-us-core-documentreference-status.md) search parameters
* Including support **OR** search on `status` (e.g.`status={system|}[code],{system|}[code],...`)
`GET [base]/DocumentReference?patient={Patient/}[id]&status={system|}[search_code]{,{system|}[code],...}`Example:
> 
1. GET [base]/DocumentReference?patient=Patient/1137192&status=completed

**Implementation Notes**: Fetches a bundle of all US Core ADI DocumentReference Profile resources for the specified patient and status. See the implementation notes above for how to access the actual document. ( see [how to search by reference](http://hl7.org/fhir/R4/search.html#reference) and [how to search by token](http://hl7.org/fhir/R4/search.html#token)).
1. **SHOULD** support searching for a document for a patient by type and a clinically relevent date using the combination of the [patient](SearchParameter-us-core-documentreference-patient.md) and [type](SearchParameter-us-core-documentreference-type.md) and [period](SearchParameter-us-core-documentreference-period.md) search parameters
* Including optional support for **AND** search on `period` (e.g.`period=[date]&period=[date]&...`)
* Including support for these `period` comparators: "gt", "lt", "ge", "le"
`GET [base]/DocumentReference?patient={Patient/}[id]&type={system|}[search_code]&period={gt|lt|ge|le}[dateTime]{&date={gt|lt|ge|le}[dateTime]&...}`Example:
> 
1. GET [base]/DocumentReference?patient=Patient/1137192&type=http://loinc.org|84095-9&period=ge2020-01-01T00:00:00Z

**Implementation Notes**: Fetches a bundle of all US Core ADI DocumentReference Profile resources for the specified patient and type and period. See the implementation notes above for how to access the actual document. ( see [how to search by reference](http://hl7.org/fhir/R4/search.html#reference) and [how to search by token](http://hl7.org/fhir/R4/search.html#token) and [how to search by date](http://hl7.org/fhir/R4/search.html#date)).



## Resource Content

```json
{
  "resourceType" : "StructureDefinition",
  "id" : "us-core-adi-documentreference",
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
    "valueInteger" : 2
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
    "valueCode" : "cgp"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueCode" : "trial-use",
    "_valueCode" : {
      "extension" : [{
        "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
        "valueCanonical" : "http://hl7.org/fhir/us/core/ImplementationGuide/hl7.fhir.us.core"
      }]
    }
  }],
  "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-adi-documentreference",
  "identifier" : [{
    "system" : "urn:ietf:rfc:3986",
    "value" : "urn:oid:2.16.840.1.113883.4.642.40.2.42.4"
  }],
  "version" : "9.0.0",
  "name" : "USCoreADIDocumentReferenceProfile",
  "title" : "US Core ADI DocumentReference Profile",
  "status" : "active",
  "experimental" : false,
  "date" : "2023-10-17",
  "publisher" : "HL7 International / Cross-Group Projects",
  "contact" : [{
    "name" : "HL7 International / Cross-Group Projects",
    "telecom" : [{
      "system" : "url",
      "value" : "http://www.hl7.org/Special/committees/cgp"
    },
    {
      "system" : "email",
      "value" : "cgp@lists.HL7.org"
    }]
  }],
  "description" : "The US Core Advance Directive Information (ADI) DocumentReference Profile inherits from the FHIR [DocumentReference](https://hl7.org/fhir/R4/documentreference.html) resource; refer to it for scope and usage definitions. It sets minimum expectations for searching and fetching patient Advance Directive Information (ADI) documents using the DocumentReference resource. Examples of advance healthcare directive documents include physician order for life sustaining treatment (POLST), do not resuscitate order (DNR), and Living Will. In addition to the document contents, it communicates the type of advance directive document, the author, the verifier, and other properties. To represent whether advance directive documents exist for a patient, see the [US Core Observation ADI Documentation Profile](StructureDefinition-us-core-observation-adi-documentation.html). This profile sets minimum expectations for searching and fetching patient ADI documents using the DocumentReference resource. It specifies which core elements, extensions, vocabularies, and value sets **SHALL** be present and constrains how the elements are used. Providing the floor for standards development for specific use cases promotes interoperability and adoption.",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "urn:iso:std:iso:3166",
      "code" : "US"
    }]
  }],
  "fhirVersion" : "4.0.1",
  "mapping" : [{
    "identity" : "workflow",
    "uri" : "http://hl7.org/fhir/workflow",
    "name" : "Workflow Pattern"
  },
  {
    "identity" : "fhircomposition",
    "uri" : "http://hl7.org/fhir/composition",
    "name" : "FHIR Composition"
  },
  {
    "identity" : "rim",
    "uri" : "http://hl7.org/v3",
    "name" : "RIM Mapping"
  },
  {
    "identity" : "cda",
    "uri" : "http://hl7.org/v3/cda",
    "name" : "CDA (R2)"
  },
  {
    "identity" : "w5",
    "uri" : "http://hl7.org/fhir/fivews",
    "name" : "FiveWs Pattern Mapping"
  },
  {
    "identity" : "v2",
    "uri" : "http://hl7.org/v2",
    "name" : "HL7 v2 Mapping"
  },
  {
    "identity" : "xds",
    "uri" : "http://ihe.net/xds",
    "name" : "XDS metadata equivalent"
  }],
  "kind" : "resource",
  "abstract" : false,
  "type" : "DocumentReference",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation" : "constraint",
  "differential" : {
    "element" : [{
      "id" : "DocumentReference",
      "path" : "DocumentReference",
      "mustSupport" : false
    },
    {
      "id" : "DocumentReference.extension:fhir5-attester",
      "path" : "DocumentReference.extension",
      "sliceName" : "fhir5-attester",
      "short" : "Participant who has authenticated the accuracy of the document.",
      "type" : [{
        "code" : "Extension",
        "profile" : ["http://hl7.org/fhir/5.0/StructureDefinition/extension-DocumentReference.attester"]
      }],
      "mustSupport" : false
    },
    {
      "id" : "DocumentReference.identifier",
      "path" : "DocumentReference.identifier",
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.status",
      "path" : "DocumentReference.status",
      "mustSupport" : true,
      "binding" : {
        "strength" : "required",
        "valueSet" : "http://hl7.org/fhir/ValueSet/document-reference-status"
      }
    },
    {
      "id" : "DocumentReference.type",
      "path" : "DocumentReference.type",
      "min" : 1,
      "mustSupport" : true,
      "binding" : {
        "strength" : "extensible",
        "description" : "Advance Directives Content Type",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1115.41"
      }
    },
    {
      "id" : "DocumentReference.category",
      "path" : "DocumentReference.category",
      "slicing" : {
        "discriminator" : [{
          "type" : "value",
          "path" : "$this"
        }],
        "rules" : "open"
      },
      "min" : 1,
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.category:adi",
      "path" : "DocumentReference.category",
      "sliceName" : "adi",
      "short" : "Categorization of ADI document",
      "mustSupport" : true,
      "binding" : {
        "strength" : "required",
        "description" : "Advance Healthcare Directive Categories Grouper. Note that other codes are permitted in other slices, see [Required Bindings When Slicing by Value Sets](general-requirements.html#required-bindings-when-slicing-by-valuesets)",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.11.20.9.69.4"
      }
    },
    {
      "id" : "DocumentReference.subject",
      "path" : "DocumentReference.subject",
      "min" : 1,
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"]
      }],
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.date",
      "path" : "DocumentReference.date",
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.author",
      "path" : "DocumentReference.author",
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner",
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization",
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient",
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole",
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-relatedperson",
        "http://hl7.org/fhir/us/core/StructureDefinition/us-core-device"],
        "_targetProfile" : [{
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
            "valueBoolean" : true
          }]
        },
        {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
            "valueBoolean" : false
          }]
        },
        {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
            "valueBoolean" : false
          }]
        },
        {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
            "valueBoolean" : false
          }]
        },
        {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
            "valueBoolean" : false
          }]
        },
        {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
            "valueBoolean" : false
          }]
        }]
      }],
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.content",
      "path" : "DocumentReference.content",
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.content.attachment",
      "path" : "DocumentReference.content.attachment",
      "definition" : "The document and format referenced.",
      "comment" : "If there are multiple `DocumentReference.content` element repetitions, these **SHALL** all represent the same document in different format or attachment metadata. The content element **SHALL NOT** contain different versions of the same content. For version handling use multiple DocumentReferences with `DocumentReference.relatesTo`.",
      "constraint" : [{
        "key" : "us-core-6",
        "severity" : "error",
        "human" : "DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.",
        "expression" : "url.exists() or data.exists()",
        "xpath" : "f:url or f:content"
      }],
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.content.attachment.contentType",
      "path" : "DocumentReference.content.attachment.contentType",
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.content.attachment.data",
      "path" : "DocumentReference.content.attachment.data",
      "min" : 0,
      "condition" : ["us-core-6"],
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.content.attachment.url",
      "path" : "DocumentReference.content.attachment.url",
      "min" : 0,
      "condition" : ["us-core-6"],
      "mustSupport" : true
    },
    {
      "id" : "DocumentReference.content.format",
      "path" : "DocumentReference.content.format",
      "mustSupport" : true,
      "binding" : {
        "strength" : "extensible",
        "valueSet" : "http://terminology.hl7.org/ValueSet/v3-HL7FormatCodes|2.1.0"
      }
    }]
  }
}

```
