Release 4 R6 Ballot (1st Full Ballot)

This page is part of the FHIR Specification (v4.0.1: R4 - Mixed Normative and STU v6.0.0-ballot4: Release 6 Ballot (1st Full Ballot) (see Ballot Notes ) in it's permanent home (it will always be available at this URL). ). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see the Directory of published versions for published versions icon . Page versions: R5 R4B R4 R3 R2

2.42 10.2 Resource DocumentReference - Content

Structured Documents Responsible Owner: Orders and Observations icon Work Group Maturity Level : 3   Trial Use Normative Security Category : Not Classified Compartments : Device , Encounter , Group , Patient , Practitioner , RelatedPerson

A reference to a document of any kind for any purpose. Provides metadata about the document so that While the document can be discovered and managed. The scope of term “document” implies a document is more narrow focus, for this resource this "document" encompasses any seralized serialized object with a mime-type, so it includes formal patient centric patient-centric documents (CDA), cliical clinical notes, scanned paper, and non-patient specific documents like policy text. text, as well as a photo, video, or audio recording acquired or used in healthcare. The DocumentReference resource provides metadata about the document so that the document can be discovered and managed. The actual content may be inline base64 encoded data or provided by direct reference.

Note to Balloters: To ensure this resource is ready for Normative status, we are seeking ballot comment on the substantive content. The key changes made since R5 include:

  • Addition of the following elements:
    • DocumentReference.related
  • Updates to the following elements:
    • DocumentReference.bodySite has been changed to DocumentReference.bodyStructure

A DocumentReference resource is used to index a document, clinical note, and other binary objects such as a photo, video, or audio recording, including those resulting from diagnostic or care provision procedures, to make them available to a healthcare system. A document is some sequence of bytes that is identifiable, establishes its own context (e.g., what subject, author, etc. can be displayed presented to the user), and has defined update management. The DocumentReference resource can be used with any document format that has a recognized mime type and that conforms to this definition.

Typically, DocumentReference resources are used in document indexing systems, such as IHE XDS icon , such and as profiled in IHE Mobile access Access to Health Documents icon .

DocumentReference is metadata describing a document contains metadata, inline content or direct references to documents such as:

  • CDA icon documents in FHIR systems
  • FHIR documents stored elsewhere (i.e. registry/repository following the XDS model)
  • PDF documents icon , Scanned Paper, and digital records of faxes
  • Clinical Notes in various forms
  • Image files (e.g., JPEG, GIF, TIFF)
  • Video files (e.g., MP4, WMV)
  • Audio files (e.g., WAV, MP3)
  • Non-Standard formats (e.g., CSV, RTF, WORD)
  • Other kinds of documents, such as records of prescriptions or immunizations

This resource captures data that might not be in FHIR format. The document can be any object (e.g. file), and is not limited to the formal HL7 definitions of Document . This resource may be a report with unstructured text or a report that is not expressed in a DiagnosticReport . The DiagnosticReport is appropriate to reflect a set of discrete results (Observations) and associated contextual details for a specific report, and within those results any further structure within the Observation instances. The DocumentReference resource may be an Observation whose value is audio, video or image data. This resource is the preferred representation of such forms of information as it exposes the metadata relevant for interpreting the information. There is some overlap potential such as a scan of a CBC report that can either be referenced by way of a DocumentReference , or included in a DiagnosticReport as a presentedForm together with the structured, discrete data. In some cases, a single in-system entity may be represented as both resources if they provide relevant metadata or workflow-specific attributes. Specific implementation guides would further clarify which approach is more appropriate.

This resource is able to contain medical images in a DICOM format. These images may also be made accessible through an ImagingStudy or ImagingSelection resource, which provides a direct reference to the image to a WADO-RS server. For such images, the WADO-RS framework is a preferred method for representing the images - the WADO-RS service may include rendering the image with annotations and display parameters from an associated DICOM presentation state, for instance. On the other hand, the DocumentReference resource allows for a robust transfer of an image across boundaries where the WADO-RS service is not available. For this reason, medical images can also be represented in a DocumentReference resource, but the DocumentReference.content.attachment.url should provide a reference to a source WADO-RS service for the image.

FHIR defines both a document format and this document reference. FHIR documents are for documents that are authored and assembled in FHIR. This resource DocumentReference is mainly intended for general references to any type of media file including assembled documents.

The document that is a target of the reference can be a reference to a FHIR document served by another server, or the target can be stored in the special FHIR Binary Resource , or the target can be stored on some other server system. The document reference is also able to address documents that are retrieved by a service call such as an XDS.b RetrieveDocumentSet, RetrieveDocumentSet icon, or a DICOM WADO-RS exchange, or an HL7 v2 V2 icon message query - though the way each of these service calls works must be specified in some external standard or other documentation.

A DocumentReference describes some other document. This means that there are two sets of provenance information relevant here: the provenance of the document, and the provenance of the document reference. Sometimes, the provenance information is closely related, as when the document producer also produces the document reference, but in other workflows, the document reference is generated later by other actors. In the DocumentReference resource, the meta content refers to the provenance of the reference itself, while the content described below concerns the document it references. Like all resources, there is overlap between the information in the resource directly, and in the general Provenance resource. This is discussed as part of the description of the Provenance resource .

This resource is referenced by

Structure

0..1 Identifier When this Σ 0..1 Who/what authenticated 0..1 0..* Relationships to other documents 1..1 replaces | transforms | signs | appends 1..1 Σ 1..* Attachment Coding 0..1 Context Main clinical acts documented 0..1 0..1 Kind of facility where patient was seen CodeableConcept Related identifiers or resources
Name Flags Card. Type Description & Constraints      Filter: Filters doco
. . DocumentReference TU N DomainResource A reference to a document
+ Warning: facilityType SHALL only be present if context is not an encounter
+ Warning: practiceSetting SHALL only be present if context is not present

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . masterIdentifier identifier Σ 0..* Identifier Business identifiers for the document

Master Version Specific Identifier
. . identifier . version Σ 0..1 string 0..* An explicitly assigned identifier of a variation of the content in the DocumentReference
. . . basedOn 0..* Reference ( Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | Contract | CoverageEligibilityRequest | DeviceRequest | EnrollmentRequest | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | VisionPrescription ) Procedure that caused this media to be created
Other identifiers for the document
. . . docStatus ?! Σ 0..1 code registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
CompositionStatus Binding: Composition Status ( Required )
. . . modality Σ 0..* CodeableConcept Imaging modality used
Binding: Modality icon ( Extensible )

. . . type Σ 0..1 CodeableConcept Kind of document (LOINC if possible)
Binding: FHIR Document Type Value Set Codes ( Preferred )
. . . category Σ 0..* CodeableConcept Categorization of document
Document Class Binding: Referenced Item Category Value Set ( Example )

. . . subject Σ 0..1 Reference ( Patient | Practitioner | Group | Device Any ) Who/what is the subject of the document
. . date . context Σ C 0..1 0..* instant Reference ( Appointment | Encounter | EpisodeOfCare ) Encounter the document reference was created is part of

. . . author event 0..* Reference CodeableReference ( Practitioner | PractitionerRole | Organization | Device Any | Patient ) Main clinical acts documented
Binding: v3 Code System ActCode icon | RelatedPerson ( Example )
Who and/or what authored the document
. . . authenticator related 0..* Reference ( Practitioner | PractitionerRole | Organization Any ) Related identifiers or resources associated with the document reference

. . . custodian bodyStructure Σ 0..* Reference CodeableReference ( Organization BodyStructure ) Body structure included
Binding: SNOMED CT Body Structures ( Example )

Organization which maintains the document
. . relatesTo . facilityType Σ C 0..1 BackboneElement CodeableConcept Kind of facility where patient was seen
Binding: Facility Type Code Value Set ( Example )
. . code . practiceSetting Σ C 0..1 code CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
DocumentRelationshipType Binding: Practice Setting Code Value Set ( Required Example )
. . target . period Σ 0..1 Reference ( DocumentReference Period ) Target Time of the relationship service that is being documented
. . . description date Σ 0..1 string dateTime When this document reference was created
Human-readable description
. . securityLabel . author Σ 0..* CodeableConcept Document security-tags SecurityLabels Reference ( Extensible Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson | CareTeam | Group ) Who and/or what authored the document

. . . content attester 0..* BackboneElement Attests to accuracy of the document
Document referenced
. . . . attachment mode 1..1 Σ CodeableConcept personal | professional | legal | official
Binding: Composition Attestation Mode ( Preferred )
1..1
. . . . time Where to access 0..1 dateTime When the document was attested
. . . format . party 0..1 Σ Reference ( Patient | RelatedPerson | Practitioner | PractitionerRole | Organization | Group ) Who attested the document
0..1
. . . custodian Format/content rules for the document 0..1 DocumentReference Format Code Set Reference ( Preferred Organization ) Organization which maintains the document
. . . context relatesTo Σ 0..* BackboneElement Relationships to other documents

Clinical context of document
. . . encounter . code Σ 1..1 CodeableConcept 0..* The relationship type with another document
Binding: Document Relationship Type ( Extensible )
. . . . target Σ 1..1 Reference ( Encounter | EpisodeOfCare DocumentReference ) Target of the document content relationship
. . . description Σ 0..1 markdown Human-readable description
. . . event securityLabel Σ 0..* CodeableConcept Document security-tags
v3 Code System ActCode Binding: Example set of Security Labels ( Example )

. . period . content Σ 1..* Period BackboneElement Document referenced

Time of service that is being documented
. . . . facilityType attachment Σ 1..1 CodeableConcept Attachment Where to access the document
Facility Type Code Value Set ( Example )
. . . practiceSetting . profile Σ 0..* BackboneElement Content profile rules for the document

0..1
. . . . . value[x] Additional details about where the content was created (e.g. clinical specialty) Σ 1..1 Code|uri|canonical
Binding: HL7 ValueSet of Format Codes for use with Document Sharing icon Practice Setting Code Value Set ( Example Preferred )
. . . . . sourcePatientInfo . valueCoding Coding
. . . . . . valueUri 0..1 Reference ( Patient uri ) Patient demographics from source
. . . related . . . valueCanonical 0..* Reference ( Any canonical ) ()

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

DocumentReference ( DomainResource ) Document identifier as Business identifiers assigned to this document reference by the source of performer and/or other systems. These identifiers remain constant as the document. This identifier resource is specific updated and propagates from server to this version of the document. This unique server identifier may be used elsewhere to identify this version : Identifier [0..*] An explicitly assigned identifier of a variation of the document content in the DocumentReference masterIdentifier version : Identifier string [0..1] Other identifiers associated with A procedure that is fulfilled in whole or in part by the document, including version independent identifiers creation of this media identifier basedOn : Identifier Reference [0..*] « Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | Contract | CoverageEligibilityRequest | DeviceRequest | EnrollmentRequest | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | VisionPrescription » The status current state of this the document reference (this element modifies the meaning of other elements) status : code [1..1] « The status of the document reference. null (Strength=Required) DocumentReferenceStatus ! » The status of the underlying document (this element modifies the meaning of other elements) docStatus : code [0..1] « Status of the underlying document. null (Strength=Required) CompositionStatus ! » Imaging modality used. This may include both acquisition and non-acquisition modalities modality : CodeableConcept [0..*] « null (Strength=Extensible) Modality + » Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced type : CodeableConcept [0..1] « Precise type of clinical document. null (Strength=Preferred) DocumentTypeValueSet FHIRDocumentTypeCodes ? » A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type category : CodeableConcept [0..*] « High-level kind of a clinical document at a macro level. null (Strength=Example) DocumentClassValueSet ReferencedItemCategoryValueSet ?? » Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure) subject : Reference [0..1] « Patient Any | Practitioner » The Encounter during which this document reference was created or to which the creation of this record is tightly associated context : Reference [0..*] « Appointment | Group Encounter | Device EpisodeOfCare » « This element has or is affected by some invariants C » 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 event : CodeableReference [0..*] « Any ; null (Strength=Example) ActCode ?? » Any other resource this document reference was created or to which the creation of this record is tightly associated related : Reference [0..*] « Any » The anatomic structures included in the document bodyStructure : CodeableReference [0..*] « BodyStructure ; Codes describing anatomical body structures. May include laterality. (Strength=Example) SNOMEDCTBodyStructures ?? » The kind of facility where the patient was seen facilityType : CodeableConcept [0..1] « null (Strength=Example) FacilityTypeCodeValueSet ?? » « This element has or is affected by some invariants C » This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty practiceSetting : CodeableConcept [0..1] « null (Strength=Example) PracticeSettingCodeValueSet ?? » « This element has or is affected by some invariants C » The time period over which the service that is described by the document was provided period : Period [0..1] When the document reference was created date : instant dateTime [0..1] Identifies who is responsible for adding the information to the document author : Reference [0..*] « Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson » Which person or organization authenticates that this document is valid authenticator : Reference [0..1] « Practitioner | PractitionerRole CareTeam | Organization Group » Identifies the organization or group who is responsible for ongoing maintenance of and access to the document custodian : Reference [0..1] « Organization » Human-readable description of the source document description : string markdown [0..1] A set of Security-Tag codes specifying the level of privacy/security of the Document. Document found at DocumentReference.content.attachment.url. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, data elements in DocumentReference, while DocumentReference.securityLabel contains a snapshot of the security labels on for the document the reference refers to to. The distinction recognizes that the document may contain sensitive information, while the DocumentReference is metadata about the document and thus might not be as sensitive as the document. For example: a psychotherapy episode may contain highly sensitive information, while the metadata may simply indicate that some episode happened securityLabel : CodeableConcept [0..*] « Security Labels from null (Strength=Example) SecurityLabelExamples ?? » Attester The type of attestation the Healthcare Privacy and Security Classification System. (Strength=Extensible) authenticator offers All Security Labels mode : CodeableConcept [1..1] « null (Strength=Preferred) CompositionAttestationMode ? » When the document was attested by the party time : dateTime [0..1] Who attested the document in the specified way party : Reference [0..1] « Patient | RelatedPerson | Practitioner | PractitionerRole | Organization | Group + » RelatesTo The type of relationship that this document has with anther document code : code CodeableConcept [1..1] « The type of relationship between documents. (Strength=Required) null (Strength=Extensible) DocumentRelationshipType ! + » The target document of this relationship target : Reference [1..1] « DocumentReference » Content The document or URL of the document along with critical metadata to prove content has integrity attachment : Attachment [1..1] An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType format : Coding [0..1] « Document Format Codes. (Strength=Preferred) DocumentReferenceFormatCodeSet ? » Context Profile Describes the clinical encounter or type of care that the document content is associated with Code|uri|canonical encounter value[x] : Reference DataType [0..*] [1..1] « Encounter Coding | EpisodeOfCare » 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 event : CodeableConcept [0..*] « This list of codes represents the main clinical acts being documented. (Strength=Example) v3.ActCode ?? » The time period over which the service that is described by the document was provided period uri : Period | canonical [0..1] ; The kind of facility where the patient was seen facilityType : CodeableConcept [0..1] « XDS Facility Type. (Strength=Example) null (Strength=Preferred) FacilityTypeCodeValueSet HL7FormatCodes ?? ? » This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty practiceSetting : CodeableConcept [0..1] « Additional details about where the content was created (e.g. clinical specialty). (Strength=Example) PracticeSettingCodeValueSet ?? » The Patient Information as known when A participant who has authenticated the accuracy of the document was published. May be a reference to a version specific, or contained sourcePatientInfo : Reference [0..1] « Patient attester » Related identifiers or resources associated with the DocumentReference related : Reference [0..*] « Any » Relationships that this document has with other document references that already exist relatesTo [0..*] The An identifier of the document constraints, encoding, structure, and template that the document conforms to beyond the base format referenced. There may be multiple content element repetitions, each with a different format indicated in the mimeType content profile [1..*] [0..*] The clinical context in which document and format referenced. If there are multiple content element repetitions, these must all represent the same document was prepared in different format, or attachment metadata context content [0..1] [1..*]

XML Template

<

<DocumentReference xmlns="http://hl7.org/fhir"> doco

 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <</masterIdentifier>
 <</identifier>
 <
 <
 <</type>
 <</category>
 <</subject>
 <
 <|
   </author>
 <</authenticator>

 <identifier><!-- 0..* Identifier Business identifiers for the document --></identifier>
 <version value="[string]"/><!-- 0..1 An explicitly assigned identifier of a variation of the content in the DocumentReference -->
 <basedOn><!-- 0..* Reference(Appointment|AppointmentResponse|CarePlan|Claim|
   CommunicationRequest|Contract|CoverageEligibilityRequest|DeviceRequest|
   EnrollmentRequest|MedicationRequest|NutritionOrder|RequestOrchestration|
   ServiceRequest|VisionPrescription) Procedure that caused this media to be created --></basedOn>

 <status value="[code]"/><!-- 1..1 current | superseded | entered-in-error -->
 <docStatus value="[code]"/><!-- 0..1 registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown -->
 <modality><!-- 0..* CodeableConcept Imaging modality used icon --></modality>
 <type><!-- 0..1 CodeableConcept Kind of document (LOINC if possible) --></type>
 <category><!-- 0..* CodeableConcept Categorization of document --></category>
 <subject><!-- 0..1 Reference(Any) Who/what is the subject of the document --></subject>
 <context><!-- I 0..* Reference(Appointment|Encounter|EpisodeOfCare) Encounter the document reference is part of --></context>
 <event><!-- 0..* CodeableReference(Any) Main clinical acts documented icon --></event>
 <related><!-- 0..* Reference(Any) Related identifiers or resources associated with the document reference --></related>
 <bodyStructure><!-- 0..* CodeableReference(BodyStructure) Body structure included --></bodyStructure>
 <facilityType><!-- I 0..1 CodeableConcept Kind of facility where patient was seen --></facilityType>
 <practiceSetting><!-- I 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty) --></practiceSetting>
 <period><!-- 0..1 Period Time of service that is being documented --></period>
 <date value="[dateTime]"/><!-- 0..1 When this document reference was created -->
 <author><!-- 0..* Reference(CareTeam|Device|Group|Organization|Patient|
   Practitioner|PractitionerRole|RelatedPerson) Who and/or what authored the document --></author>

 <attester>  <!-- 0..* Attests to accuracy of the document -->
  <mode><!-- 1..1 CodeableConcept personal | professional | legal | official --></mode>
  <time value="[dateTime]"/><!-- 0..1 When the document was attested -->
  <party><!-- 0..1 Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) Who attested the document --></party>

 </attester>

 <custodian><!-- 0..1 Reference(Organization) Organization which maintains the document --></custodian>
 <relatesTo>  <!-- 0..* Relationships to other documents -->
  <

  <code><!-- 1..1 CodeableConcept The relationship type with another document --></code>

  <target><!-- 1..1 Reference(DocumentReference) Target of the relationship --></target>
 </relatesTo>
 <
 <</securityLabel>
 <

 <description value="[markdown]"/><!-- 0..1 Human-readable description -->
 <securityLabel><!-- 0..* CodeableConcept Document security-tags --></securityLabel>
 <content>  <!-- 1..* Document referenced -->

  <attachment><!-- 1..1 Attachment Where to access the document --></attachment>
  <</format>

  <profile>  <!-- 0..* Content profile rules for the document -->
   <value[x]><!-- 1..1 Coding|uri|canonical Code|uri|canonical icon --></value[x]>
  </profile>

 </content>
 <
  <</encounter>
  <</event>
  <</period>
  <</facilityType>
  <</practiceSetting>
  <</sourcePatientInfo>
  <</related>
 </context>

</DocumentReference>

JSON Template

{doco
  "resourceType" : "",

  "resourceType" : "DocumentReference",

  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "
  "
  "
  "
  "
  "
  "
  "|
   
  "

  "identifier" : [{ Identifier }], // Business identifiers for the document
  "version" : "<string>", // An explicitly assigned identifier of a variation of the content in the DocumentReference
  "basedOn" : [{ Reference(Appointment|AppointmentResponse|CarePlan|Claim|
   CommunicationRequest|Contract|CoverageEligibilityRequest|DeviceRequest|
   EnrollmentRequest|MedicationRequest|NutritionOrder|RequestOrchestration|
   ServiceRequest|VisionPrescription) }], // Procedure that caused this media to be created

  "status" : "<code>", // R!  current | superseded | entered-in-error
  "docStatus" : "<code>", // registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
  "modality" : [{ CodeableConcept }], // Imaging modality used icon
  "type" : { CodeableConcept }, // Kind of document (LOINC if possible)
  "category" : [{ CodeableConcept }], // Categorization of document
  "subject" : { Reference(Any) }, // Who/what is the subject of the document
  "context" : [{ Reference(Appointment|Encounter|EpisodeOfCare) }], // I Encounter the document reference is part of
  "event" : [{ CodeableReference(Any) }], // Main clinical acts documented icon
  "related" : [{ Reference(Any) }], // Related identifiers or resources associated with the document reference
  "bodyStructure" : [{ CodeableReference(BodyStructure) }], // Body structure included
  "facilityType" : { CodeableConcept }, // I Kind of facility where patient was seen
  "practiceSetting" : { CodeableConcept }, // I Additional details about where the content was created (e.g. clinical specialty)
  "period" : { Period }, // Time of service that is being documented
  "date" : "<dateTime>", // When this document reference was created
  "author" : [{ Reference(CareTeam|Device|Group|Organization|Patient|
   Practitioner|PractitionerRole|RelatedPerson) }], // Who and/or what authored the document

  "attester" : [{ // Attests to accuracy of the document
    "mode" : { CodeableConcept }, // R!  personal | professional | legal | official
    "time" : "<dateTime>", // When the document was attested
    "party" : { Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) } // Who attested the document

  }],

  "custodian" : { Reference(Organization) }, // Organization which maintains the document
  "relatesTo" : [{ // Relationships to other documents
    "

    "code" : { CodeableConcept }, // R!  The relationship type with another document

    "target" : { Reference(DocumentReference) } // R!  Target of the relationship
  }],
  "
  "
  "

  "description" : "<markdown>", // Human-readable description
  "securityLabel" : [{ CodeableConcept }], // Document security-tags
  "content" : [{ // R!  Document referenced

    "attachment" : { Attachment }, // R!  Where to access the document
    "
  }],
  "
    "
    "
    "
    "
    "
    "
    "
  }

    "profile" : [{ // Content profile rules for the document
      // value[x]: Code|uri|canonical. One of these 3:

      "valueCoding" : { Coding },
      "valueUri" : "<uri>",
      "valueCanonical" : "<canonical>"
    }]
  }]

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:;

[ a fhir:DocumentReference;

  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from 
  # from 
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
  fhir:
  fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ];

  # from Resource: fhir:id, fhir:meta, fhir:implicitRules, and fhir:language
  # from DomainResource: fhir:text, fhir:contained, fhir:extension, and fhir:modifierExtension
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Business identifiers for the document
  fhir:version [ string ] ; # 0..1 An explicitly assigned identifier of a variation of the content in the DocumentReference
  fhir:basedOn  ( [ Reference(Appointment|AppointmentResponse|CarePlan|Claim|CommunicationRequest|Contract|
  CoverageEligibilityRequest|DeviceRequest|EnrollmentRequest|MedicationRequest|
  NutritionOrder|RequestOrchestration|ServiceRequest|VisionPrescription) ] ... ) ; # 0..* Procedure that caused this media to be created

  fhir:status [ code ] ; # 1..1 current | superseded | entered-in-error
  fhir:docStatus [ code ] ; # 0..1 registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
  fhir:modality  ( [ CodeableConcept ] ... ) ; # 0..* Imaging modality used
  fhir:type [ CodeableConcept ] ; # 0..1 Kind of document (LOINC if possible)
  fhir:category  ( [ CodeableConcept ] ... ) ; # 0..* Categorization of document
  fhir:subject [ Reference(Any) ] ; # 0..1 Who/what is the subject of the document
  fhir:context  ( [ Reference(Appointment|Encounter|EpisodeOfCare) ] ... ) ; # 0..* I Encounter the document reference is part of
  fhir:event  ( [ CodeableReference(Any) ] ... ) ; # 0..* Main clinical acts documented
  fhir:related  ( [ Reference(Any) ] ... ) ; # 0..* Related identifiers or resources associated with the document reference
  fhir:bodyStructure  ( [ CodeableReference(BodyStructure) ] ... ) ; # 0..* Body structure included
  fhir:facilityType [ CodeableConcept ] ; # 0..1 I Kind of facility where patient was seen
  fhir:practiceSetting [ CodeableConcept ] ; # 0..1 I Additional details about where the content was created (e.g. clinical specialty)
  fhir:period [ Period ] ; # 0..1 Time of service that is being documented
  fhir:date [ dateTime ] ; # 0..1 When this document reference was created
  fhir:author  ( [ Reference(CareTeam|Device|Group|Organization|Patient|Practitioner|PractitionerRole|
  RelatedPerson) ] ... ) ; # 0..* Who and/or what authored the document

  fhir:attester ( [ # 0..* Attests to accuracy of the document
    fhir:mode [ CodeableConcept ] ; # 1..1 personal | professional | legal | official
    fhir:time [ dateTime ] ; # 0..1 When the document was attested
    fhir:party [ Reference(Group|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 Who attested the document
  ] ... ) ;
  fhir:custodian [ Reference(Organization) ] ; # 0..1 Organization which maintains the document
  fhir:relatesTo ( [ # 0..* Relationships to other documents
    fhir:code [ CodeableConcept ] ; # 1..1 The relationship type with another document
    fhir:target [ Reference(DocumentReference) ] ; # 1..1 Target of the relationship
  ] ... ) ;
  fhir:description [ markdown ] ; # 0..1 Human-readable description
  fhir:securityLabel  ( [ CodeableConcept ] ... ) ; # 0..* Document security-tags
  fhir:content ( [ # 1..* Document referenced
    fhir:attachment [ Attachment ] ; # 1..1 Where to access the document
    fhir:profile ( [ # 0..* Content profile rules for the document
      # value[x] : 1..1 Code|uri|canonical. One of these 3
        fhir:value [  a fhir:Coding ; Coding ]
        fhir:value [  a fhir:Uri ; uri ]
        fhir:value [  a fhir:Canonical ; canonical ]
    ] ... ) ;
  ] ... ) ;

]

Changes since R3 from R5 to R6

DocumentReference
DocumentReference.status DocumentReference.basedOn
  • Change value set from http://hl7.org/fhir/ValueSet/document-reference-status to http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1 Type Reference: Removed Target Types ImmunizationRecommendation, SupplyRequest
DocumentReference.docStatus
  • Change value set from http://hl7.org/fhir/ValueSet/composition-status to http://hl7.org/fhir/ValueSet/composition-status|4.0.1 Remove codes preliminary , corrected , appended
  • Now marked as Modifier
DocumentReference.type DocumentReference.related
  • Min Cardinality changed from 1 to 0 Added Element
DocumentReference.category DocumentReference.bodyStructure
  • Renamed from class to category Max Cardinality changed from 1 bodySite to * bodyStructure
DocumentReference.date
  • Added Element Type changed from instant to dateTime
DocumentReference.author
  • Type Reference: Added Target Type PractitionerRole Group
DocumentReference.authenticator DocumentReference.attester.party
  • Type Reference: Added Target Type PractitionerRole Group

Changes from R4 and R4B to R6

DocumentReference
DocumentReference.version
  • Added Element
DocumentReference.basedOn
  • Added Element
DocumentReference.relatesTo DocumentReference.docStatus
  • No longer Remove code preliminary
  • Add codes registered , partial , cancelled , deprecated , unknown
  • Now marked as Modifier
DocumentReference.modality
  • Added Element
DocumentReference.relatesTo.code DocumentReference.subject
  • Change value set from http://hl7.org/fhir/ValueSet/document-relationship-type to http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1 Type Reference: Added Target Type Resource
  • Type Reference: Removed Target Types Patient, Practitioner, Group, Device
DocumentReference.context.encounter DocumentReference.context
  • Max Cardinality changed from 1 to *
  • Type changed from BackboneElement to Reference(Appointment | Encounter | EpisodeOfCare)
DocumentReference.event
  • Added Element
DocumentReference.related
  • Added Element
DocumentReference.bodyStructure
  • Added Element
DocumentReference.facilityType
  • Moved from DocumentReference.context to DocumentReference
DocumentReference.practiceSetting
  • Moved from DocumentReference.context to DocumentReference
DocumentReference.period
  • Moved from DocumentReference.context to DocumentReference
DocumentReference.date
  • Type changed from instant to dateTime
DocumentReference.author
  • Type Reference: Added Target Types CareTeam, Group
DocumentReference.attester
  • Added Element
DocumentReference.attester.mode
  • Added Mandatory Element
DocumentReference.attester.time
  • Added Element
DocumentReference.attester.party
  • Added Element
DocumentReference.relatesTo.code
  • Type EpisodeOfCare changed from code to CodeableConcept
  • Change binding strength from required to extensible
DocumentReference.context.related DocumentReference.description
  • Type changed from BackboneElement string to Reference(Resource) markdown
DocumentReference.securityLabel
  • Remove Binding `http://hl7.org/fhir/ValueSet/security-labels` (extensible)
DocumentReference.content.profile
  • Added Element
DocumentReference.content.profile.value[x]
  • Added Mandatory Element
DocumentReference.created DocumentReference.masterIdentifier
  • deleted Deleted (-> DocumentReference.identifier)
DocumentReference.indexed DocumentReference.authenticator
  • deleted Deleted (-> DocumentReference.attester)
DocumentReference.context.related.identifier DocumentReference.content.format
  • deleted Deleted (-> content.profile)
DocumentReference.context.related.ref DocumentReference.context.encounter
  • deleted Deleted (-> context)
DocumentReference.context.event
  • Deleted (-> event)
DocumentReference.context.sourcePatientInfo
  • Deleted (-> use extension http://hl7.org/fhir/StructureDefinition/documentreference-sourcepatient)
DocumentReference.context.related
  • Deleted (-> basedOn)

See the Full Difference for further information

This analysis is available for R4 as XML or JSON . See R3 <--> R4 Conversion Maps (status = 1 test of which 1 fail to execute .) and for R4B as XML or JSON .

Structure

0..1 Identifier When this Σ 0..1 Who/what authenticated 0..1 0..* Relationships to other documents 1..1 replaces | transforms | signs | appends 1..1 Σ 1..* Attachment Coding 0..1 Context Main clinical acts documented 0..1 0..1 Kind of facility where patient was seen CodeableConcept Related identifiers or resources
Name Flags Card. Type Description & Constraints      Filter: Filters doco
. . DocumentReference TU N DomainResource A reference to a document
+ Warning: facilityType SHALL only be present if context is not an encounter
+ Warning: practiceSetting SHALL only be present if context is not present

Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . masterIdentifier identifier Σ 0..* Identifier Business identifiers for the document

Master Version Specific Identifier
. . identifier . version Σ 0..1 string An explicitly assigned identifier of a variation of the content in the DocumentReference
0..*
. . . basedOn 0..* Reference ( Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | Contract | CoverageEligibilityRequest | DeviceRequest | EnrollmentRequest | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | VisionPrescription ) Procedure that caused this media to be created
Other identifiers for the document
. . . docStatus ?! Σ 0..1 code registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
CompositionStatus Binding: Composition Status ( Required )
. . . modality Σ 0..* CodeableConcept Imaging modality used
Binding: Modality icon ( Extensible )

. . . type Σ 0..1 CodeableConcept Kind of document (LOINC if possible)
Binding: FHIR Document Type Value Set Codes ( Preferred )
. . . category Σ 0..* CodeableConcept Categorization of document
Document Class Binding: Referenced Item Category Value Set ( Example )

. . . subject Σ 0..1 Reference ( Patient | Practitioner | Group | Device Any ) Who/what is the subject of the document
. . date . context Σ C 0..1 0..* instant Reference ( Appointment | Encounter | EpisodeOfCare ) Encounter the document reference was created is part of

. . . author event 0..* Reference CodeableReference ( Practitioner | PractitionerRole | Organization | Device Any | Patient ) Main clinical acts documented
Binding: v3 Code System ActCode icon | RelatedPerson ( Example )
Who and/or what authored the document
. . . authenticator related 0..* Reference ( Practitioner | PractitionerRole | Organization Any ) Related identifiers or resources associated with the document reference

. . . custodian bodyStructure Σ 0..* Reference CodeableReference ( Organization BodyStructure ) Body structure included
Binding: SNOMED CT Body Structures ( Example )

Organization which maintains the document
. . relatesTo . facilityType Σ C 0..1 BackboneElement CodeableConcept Kind of facility where patient was seen
Binding: Facility Type Code Value Set ( Example )
. . code . practiceSetting Σ C 0..1 code CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
DocumentRelationshipType Binding: Practice Setting Code Value Set ( Required Example )
. . target . period Σ 0..1 Reference ( DocumentReference Period ) Target Time of the relationship service that is being documented
. . . description date Σ 0..1 string dateTime When this document reference was created
Human-readable description
. . securityLabel . author Σ 0..* CodeableConcept Document security-tags SecurityLabels Reference ( Extensible Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson | CareTeam | Group ) Who and/or what authored the document

. . . content attester 0..* BackboneElement Attests to accuracy of the document
Document referenced
. . . . attachment mode 1..1 Σ CodeableConcept personal | professional | legal | official
Binding: Composition Attestation Mode ( Preferred )
1..1
. . . . time Where to access 0..1 dateTime When the document was attested
. . . format . party 0..1 Σ Reference ( Patient | RelatedPerson | Practitioner | PractitionerRole | Organization | Group ) Who attested the document
0..1
. . . custodian Format/content rules for the document 0..1 DocumentReference Format Code Set Reference ( Preferred Organization ) Organization which maintains the document
. . . context relatesTo Σ 0..* BackboneElement Relationships to other documents

Clinical context of document
. . . encounter . code Σ 1..1 CodeableConcept 0..* The relationship type with another document
Binding: Document Relationship Type ( Extensible )
. . . . target Σ 1..1 Reference ( Encounter | EpisodeOfCare DocumentReference ) Target of the document content relationship
. . . description Σ 0..1 markdown Human-readable description
. . . event securityLabel Σ 0..* CodeableConcept Document security-tags
v3 Code System ActCode Binding: Example set of Security Labels ( Example )

. . period . content Σ 1..* Period BackboneElement Document referenced

Time of service that is being documented
. . . . facilityType attachment Σ 1..1 CodeableConcept Attachment Where to access the document
Facility Type Code Value Set ( Example )
. . . practiceSetting . profile Σ 0..* BackboneElement Content profile rules for the document

0..1
. . . . . value[x] Additional details about where the content was created (e.g. clinical specialty) Σ 1..1 Code|uri|canonical
Binding: HL7 ValueSet of Format Codes for use with Document Sharing icon Practice Setting Code Value Set ( Example Preferred )
. . . . . sourcePatientInfo . valueCoding Coding
. . . . . . valueUri 0..1 Reference ( Patient uri ) Patient demographics from source
. . . related . . . valueCanonical 0..* Reference ( Any canonical ) ()

doco Documentation for this format icon

See the Extensions for this resource

UML Diagram ( Legend )

DocumentReference ( DomainResource ) Document identifier as Business identifiers assigned to this document reference by the source of performer and/or other systems. These identifiers remain constant as the document. This identifier resource is specific updated and propagates from server to this version of the document. This unique server identifier may be used elsewhere to identify this version : Identifier [0..*] An explicitly assigned identifier of a variation of the document content in the DocumentReference masterIdentifier version : Identifier string [0..1] Other identifiers associated with A procedure that is fulfilled in whole or in part by the document, including version independent identifiers creation of this media identifier basedOn : Identifier Reference [0..*] « Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | Contract | CoverageEligibilityRequest | DeviceRequest | EnrollmentRequest | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | VisionPrescription » The status current state of this the document reference (this element modifies the meaning of other elements) status : code [1..1] « The status of the document reference. null (Strength=Required) DocumentReferenceStatus ! » The status of the underlying document (this element modifies the meaning of other elements) docStatus : code [0..1] « Status of the underlying document. null (Strength=Required) CompositionStatus ! » Imaging modality used. This may include both acquisition and non-acquisition modalities modality : CodeableConcept [0..*] « null (Strength=Extensible) Modality + » Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced type : CodeableConcept [0..1] « Precise type of clinical document. null (Strength=Preferred) DocumentTypeValueSet FHIRDocumentTypeCodes ? » A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type category : CodeableConcept [0..*] « High-level kind of a clinical document at a macro level. null (Strength=Example) DocumentClassValueSet ReferencedItemCategoryValueSet ?? » Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure) subject : Reference [0..1] « Patient Any | Practitioner » The Encounter during which this document reference was created or to which the creation of this record is tightly associated context : Reference [0..*] « Appointment | Group Encounter | Device EpisodeOfCare » « This element has or is affected by some invariants C » 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 event : CodeableReference [0..*] « Any ; null (Strength=Example) ActCode ?? » Any other resource this document reference was created or to which the creation of this record is tightly associated related : Reference [0..*] « Any » The anatomic structures included in the document bodyStructure : CodeableReference [0..*] « BodyStructure ; Codes describing anatomical body structures. May include laterality. (Strength=Example) SNOMEDCTBodyStructures ?? » The kind of facility where the patient was seen facilityType : CodeableConcept [0..1] « null (Strength=Example) FacilityTypeCodeValueSet ?? » « This element has or is affected by some invariants C » This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty practiceSetting : CodeableConcept [0..1] « null (Strength=Example) PracticeSettingCodeValueSet ?? » « This element has or is affected by some invariants C » The time period over which the service that is described by the document was provided period : Period [0..1] When the document reference was created date : instant dateTime [0..1] Identifies who is responsible for adding the information to the document author : Reference [0..*] « Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson » Which person or organization authenticates that this document is valid authenticator : Reference [0..1] « Practitioner | PractitionerRole CareTeam | Organization Group » Identifies the organization or group who is responsible for ongoing maintenance of and access to the document custodian : Reference [0..1] « Organization » Human-readable description of the source document description : string markdown [0..1] A set of Security-Tag codes specifying the level of privacy/security of the Document. Document found at DocumentReference.content.attachment.url. Note that DocumentReference.meta.security contains the security labels of the "reference" to the document, data elements in DocumentReference, while DocumentReference.securityLabel contains a snapshot of the security labels on for the document the reference refers to to. The distinction recognizes that the document may contain sensitive information, while the DocumentReference is metadata about the document and thus might not be as sensitive as the document. For example: a psychotherapy episode may contain highly sensitive information, while the metadata may simply indicate that some episode happened securityLabel : CodeableConcept [0..*] « Security Labels from null (Strength=Example) SecurityLabelExamples ?? » Attester The type of attestation the Healthcare Privacy and Security Classification System. (Strength=Extensible) authenticator offers All Security Labels mode : CodeableConcept [1..1] « null (Strength=Preferred) CompositionAttestationMode ? » When the document was attested by the party time : dateTime [0..1] Who attested the document in the specified way party : Reference [0..1] « Patient | RelatedPerson | Practitioner | PractitionerRole | Organization | Group + » RelatesTo The type of relationship that this document has with anther document code : code CodeableConcept [1..1] « The type of relationship between documents. (Strength=Required) null (Strength=Extensible) DocumentRelationshipType ! + » The target document of this relationship target : Reference [1..1] « DocumentReference » Content The document or URL of the document along with critical metadata to prove content has integrity attachment : Attachment [1..1] An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType format : Coding [0..1] « Document Format Codes. (Strength=Preferred) DocumentReferenceFormatCodeSet ? » Context Profile Describes the clinical encounter or type of care that the document content is associated with Code|uri|canonical encounter value[x] : Reference DataType [0..*] [1..1] « Encounter Coding | EpisodeOfCare » 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 event : CodeableConcept [0..*] « This list of codes represents the main clinical acts being documented. (Strength=Example) v3.ActCode ?? » The time period over which the service that is described by the document was provided period uri : Period | canonical [0..1] ; The kind of facility where the patient was seen facilityType : CodeableConcept [0..1] « XDS Facility Type. (Strength=Example) null (Strength=Preferred) FacilityTypeCodeValueSet HL7FormatCodes ?? ? » This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty practiceSetting : CodeableConcept [0..1] « Additional details about where the content was created (e.g. clinical specialty). (Strength=Example) PracticeSettingCodeValueSet ?? » The Patient Information as known when A participant who has authenticated the accuracy of the document was published. May be a reference to a version specific, or contained sourcePatientInfo : Reference [0..1] « Patient attester » Related identifiers or resources associated with the DocumentReference related : Reference [0..*] « Any » Relationships that this document has with other document references that already exist relatesTo [0..*] The An identifier of the document constraints, encoding, structure, and template that the document conforms to beyond the base format referenced. There may be multiple content element repetitions, each with a different format indicated in the mimeType content profile [1..*] [0..*] The clinical context in which document and format referenced. If there are multiple content element repetitions, these must all represent the same document was prepared in different format, or attachment metadata context content [0..1] [1..*]

XML Template

<

<DocumentReference xmlns="http://hl7.org/fhir"> doco

 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <</masterIdentifier>
 <</identifier>
 <
 <
 <</type>
 <</category>
 <</subject>
 <
 <|
   </author>
 <</authenticator>

 <identifier><!-- 0..* Identifier Business identifiers for the document --></identifier>
 <version value="[string]"/><!-- 0..1 An explicitly assigned identifier of a variation of the content in the DocumentReference -->
 <basedOn><!-- 0..* Reference(Appointment|AppointmentResponse|CarePlan|Claim|
   CommunicationRequest|Contract|CoverageEligibilityRequest|DeviceRequest|
   EnrollmentRequest|MedicationRequest|NutritionOrder|RequestOrchestration|
   ServiceRequest|VisionPrescription) Procedure that caused this media to be created --></basedOn>

 <status value="[code]"/><!-- 1..1 current | superseded | entered-in-error -->
 <docStatus value="[code]"/><!-- 0..1 registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown -->
 <modality><!-- 0..* CodeableConcept Imaging modality used icon --></modality>
 <type><!-- 0..1 CodeableConcept Kind of document (LOINC if possible) --></type>
 <category><!-- 0..* CodeableConcept Categorization of document --></category>
 <subject><!-- 0..1 Reference(Any) Who/what is the subject of the document --></subject>
 <context><!-- I 0..* Reference(Appointment|Encounter|EpisodeOfCare) Encounter the document reference is part of --></context>
 <event><!-- 0..* CodeableReference(Any) Main clinical acts documented icon --></event>
 <related><!-- 0..* Reference(Any) Related identifiers or resources associated with the document reference --></related>
 <bodyStructure><!-- 0..* CodeableReference(BodyStructure) Body structure included --></bodyStructure>
 <facilityType><!-- I 0..1 CodeableConcept Kind of facility where patient was seen --></facilityType>
 <practiceSetting><!-- I 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty) --></practiceSetting>
 <period><!-- 0..1 Period Time of service that is being documented --></period>
 <date value="[dateTime]"/><!-- 0..1 When this document reference was created -->
 <author><!-- 0..* Reference(CareTeam|Device|Group|Organization|Patient|
   Practitioner|PractitionerRole|RelatedPerson) Who and/or what authored the document --></author>

 <attester>  <!-- 0..* Attests to accuracy of the document -->
  <mode><!-- 1..1 CodeableConcept personal | professional | legal | official --></mode>
  <time value="[dateTime]"/><!-- 0..1 When the document was attested -->
  <party><!-- 0..1 Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) Who attested the document --></party>

 </attester>

 <custodian><!-- 0..1 Reference(Organization) Organization which maintains the document --></custodian>
 <relatesTo>  <!-- 0..* Relationships to other documents -->
  <

  <code><!-- 1..1 CodeableConcept The relationship type with another document --></code>

  <target><!-- 1..1 Reference(DocumentReference) Target of the relationship --></target>
 </relatesTo>
 <
 <</securityLabel>
 <

 <description value="[markdown]"/><!-- 0..1 Human-readable description -->
 <securityLabel><!-- 0..* CodeableConcept Document security-tags --></securityLabel>
 <content>  <!-- 1..* Document referenced -->

  <attachment><!-- 1..1 Attachment Where to access the document --></attachment>
  <</format>

  <profile>  <!-- 0..* Content profile rules for the document -->
   <value[x]><!-- 1..1 Coding|uri|canonical Code|uri|canonical icon --></value[x]>
  </profile>

 </content>
 <
  <</encounter>
  <</event>
  <</period>
  <</facilityType>
  <</practiceSetting>
  <</sourcePatientInfo>
  <</related>
 </context>

</DocumentReference>

JSON Template

{doco
  "resourceType" : "",

  "resourceType" : "DocumentReference",

  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "
  "
  "
  "
  "
  "
  "
  "|
   
  "

  "identifier" : [{ Identifier }], // Business identifiers for the document
  "version" : "<string>", // An explicitly assigned identifier of a variation of the content in the DocumentReference
  "basedOn" : [{ Reference(Appointment|AppointmentResponse|CarePlan|Claim|
   CommunicationRequest|Contract|CoverageEligibilityRequest|DeviceRequest|
   EnrollmentRequest|MedicationRequest|NutritionOrder|RequestOrchestration|
   ServiceRequest|VisionPrescription) }], // Procedure that caused this media to be created

  "status" : "<code>", // R!  current | superseded | entered-in-error
  "docStatus" : "<code>", // registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
  "modality" : [{ CodeableConcept }], // Imaging modality used icon
  "type" : { CodeableConcept }, // Kind of document (LOINC if possible)
  "category" : [{ CodeableConcept }], // Categorization of document
  "subject" : { Reference(Any) }, // Who/what is the subject of the document
  "context" : [{ Reference(Appointment|Encounter|EpisodeOfCare) }], // I Encounter the document reference is part of
  "event" : [{ CodeableReference(Any) }], // Main clinical acts documented icon
  "related" : [{ Reference(Any) }], // Related identifiers or resources associated with the document reference
  "bodyStructure" : [{ CodeableReference(BodyStructure) }], // Body structure included
  "facilityType" : { CodeableConcept }, // I Kind of facility where patient was seen
  "practiceSetting" : { CodeableConcept }, // I Additional details about where the content was created (e.g. clinical specialty)
  "period" : { Period }, // Time of service that is being documented
  "date" : "<dateTime>", // When this document reference was created
  "author" : [{ Reference(CareTeam|Device|Group|Organization|Patient|
   Practitioner|PractitionerRole|RelatedPerson) }], // Who and/or what authored the document

  "attester" : [{ // Attests to accuracy of the document
    "mode" : { CodeableConcept }, // R!  personal | professional | legal | official
    "time" : "<dateTime>", // When the document was attested
    "party" : { Reference(Group|Organization|Patient|Practitioner|
    PractitionerRole|RelatedPerson) } // Who attested the document

  }],

  "custodian" : { Reference(Organization) }, // Organization which maintains the document
  "relatesTo" : [{ // Relationships to other documents
    "

    "code" : { CodeableConcept }, // R!  The relationship type with another document

    "target" : { Reference(DocumentReference) } // R!  Target of the relationship
  }],
  "
  "
  "

  "description" : "<markdown>", // Human-readable description
  "securityLabel" : [{ CodeableConcept }], // Document security-tags
  "content" : [{ // R!  Document referenced

    "attachment" : { Attachment }, // R!  Where to access the document
    "
  }],
  "
    "
    "
    "
    "
    "
    "
    "
  }

    "profile" : [{ // Content profile rules for the document
      // value[x]: Code|uri|canonical. One of these 3:

      "valueCoding" : { Coding },
      "valueUri" : "<uri>",
      "valueCanonical" : "<canonical>"
    }]
  }]

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:;

[ a fhir:DocumentReference;

  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from 
  # from 
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
  fhir:
  fhir:
    fhir:
    fhir:
  ], ...;
  fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ];

  # from Resource: fhir:id, fhir:meta, fhir:implicitRules, and fhir:language
  # from DomainResource: fhir:text, fhir:contained, fhir:extension, and fhir:modifierExtension
  fhir:identifier  ( [ Identifier ] ... ) ; # 0..* Business identifiers for the document
  fhir:version [ string ] ; # 0..1 An explicitly assigned identifier of a variation of the content in the DocumentReference
  fhir:basedOn  ( [ Reference(Appointment|AppointmentResponse|CarePlan|Claim|CommunicationRequest|Contract|
  CoverageEligibilityRequest|DeviceRequest|EnrollmentRequest|MedicationRequest|
  NutritionOrder|RequestOrchestration|ServiceRequest|VisionPrescription) ] ... ) ; # 0..* Procedure that caused this media to be created

  fhir:status [ code ] ; # 1..1 current | superseded | entered-in-error
  fhir:docStatus [ code ] ; # 0..1 registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
  fhir:modality  ( [ CodeableConcept ] ... ) ; # 0..* Imaging modality used
  fhir:type [ CodeableConcept ] ; # 0..1 Kind of document (LOINC if possible)
  fhir:category  ( [ CodeableConcept ] ... ) ; # 0..* Categorization of document
  fhir:subject [ Reference(Any) ] ; # 0..1 Who/what is the subject of the document
  fhir:context  ( [ Reference(Appointment|Encounter|EpisodeOfCare) ] ... ) ; # 0..* I Encounter the document reference is part of
  fhir:event  ( [ CodeableReference(Any) ] ... ) ; # 0..* Main clinical acts documented
  fhir:related  ( [ Reference(Any) ] ... ) ; # 0..* Related identifiers or resources associated with the document reference
  fhir:bodyStructure  ( [ CodeableReference(BodyStructure) ] ... ) ; # 0..* Body structure included
  fhir:facilityType [ CodeableConcept ] ; # 0..1 I Kind of facility where patient was seen
  fhir:practiceSetting [ CodeableConcept ] ; # 0..1 I Additional details about where the content was created (e.g. clinical specialty)
  fhir:period [ Period ] ; # 0..1 Time of service that is being documented
  fhir:date [ dateTime ] ; # 0..1 When this document reference was created
  fhir:author  ( [ Reference(CareTeam|Device|Group|Organization|Patient|Practitioner|PractitionerRole|
  RelatedPerson) ] ... ) ; # 0..* Who and/or what authored the document

  fhir:attester ( [ # 0..* Attests to accuracy of the document
    fhir:mode [ CodeableConcept ] ; # 1..1 personal | professional | legal | official
    fhir:time [ dateTime ] ; # 0..1 When the document was attested
    fhir:party [ Reference(Group|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 Who attested the document
  ] ... ) ;
  fhir:custodian [ Reference(Organization) ] ; # 0..1 Organization which maintains the document
  fhir:relatesTo ( [ # 0..* Relationships to other documents
    fhir:code [ CodeableConcept ] ; # 1..1 The relationship type with another document
    fhir:target [ Reference(DocumentReference) ] ; # 1..1 Target of the relationship
  ] ... ) ;
  fhir:description [ markdown ] ; # 0..1 Human-readable description
  fhir:securityLabel  ( [ CodeableConcept ] ... ) ; # 0..* Document security-tags
  fhir:content ( [ # 1..* Document referenced
    fhir:attachment [ Attachment ] ; # 1..1 Where to access the document
    fhir:profile ( [ # 0..* Content profile rules for the document
      # value[x] : 1..1 Code|uri|canonical. One of these 3
        fhir:value [  a fhir:Coding ; Coding ]
        fhir:value [  a fhir:Uri ; uri ]
        fhir:value [  a fhir:Canonical ; canonical ]
    ] ... ) ;
  ] ... ) ;

]

Changes since Release 3 from R5 to R6

DocumentReference
DocumentReference.status DocumentReference.basedOn
  • Change value set from http://hl7.org/fhir/ValueSet/document-reference-status to http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1 Type Reference: Removed Target Types ImmunizationRecommendation, SupplyRequest
DocumentReference.docStatus
  • Change value set from http://hl7.org/fhir/ValueSet/composition-status to http://hl7.org/fhir/ValueSet/composition-status|4.0.1 Remove codes preliminary , corrected , appended
  • Now marked as Modifier
DocumentReference.type DocumentReference.related
  • Min Cardinality changed from 1 to 0 Added Element
DocumentReference.category DocumentReference.bodyStructure
  • Renamed from class to category Max Cardinality changed from 1 bodySite to * bodyStructure
DocumentReference.date
  • Added Element Type changed from instant to dateTime
DocumentReference.author
  • Type Reference: Added Target Type PractitionerRole Group
DocumentReference.authenticator DocumentReference.attester.party
  • Type Reference: Added Target Type PractitionerRole Group

Changes from R4 and R4B to R6

DocumentReference
DocumentReference.version
  • Added Element
DocumentReference.basedOn
  • Added Element
DocumentReference.relatesTo DocumentReference.docStatus
  • No longer Remove code preliminary
  • Add codes registered , partial , cancelled , deprecated , unknown
  • Now marked as Modifier
DocumentReference.modality
  • Added Element
DocumentReference.relatesTo.code DocumentReference.subject
  • Change value set from http://hl7.org/fhir/ValueSet/document-relationship-type to http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1 Type Reference: Added Target Type Resource
  • Type Reference: Removed Target Types Patient, Practitioner, Group, Device
DocumentReference.context.encounter DocumentReference.context
  • Max Cardinality changed from 1 to *
  • Type changed from BackboneElement to Reference(Appointment | Encounter | EpisodeOfCare)
DocumentReference.event
  • Added Element
DocumentReference.related
  • Added Element
DocumentReference.bodyStructure
  • Added Element
DocumentReference.facilityType
  • Moved from DocumentReference.context to DocumentReference
DocumentReference.practiceSetting
  • Moved from DocumentReference.context to DocumentReference
DocumentReference.period
  • Moved from DocumentReference.context to DocumentReference
DocumentReference.date
  • Type changed from instant to dateTime
DocumentReference.author
  • Type Reference: Added Target Types CareTeam, Group
DocumentReference.attester
  • Added Element
DocumentReference.attester.mode
  • Added Mandatory Element
DocumentReference.attester.time
  • Added Element
DocumentReference.attester.party
  • Added Element
DocumentReference.relatesTo.code
  • Type EpisodeOfCare changed from code to CodeableConcept
  • Change binding strength from required to extensible
DocumentReference.context.related DocumentReference.description
  • Type changed from BackboneElement string to Reference(Resource) markdown
DocumentReference.securityLabel
  • Remove Binding `http://hl7.org/fhir/ValueSet/security-labels` (extensible)
DocumentReference.content.profile
  • Added Element
DocumentReference.content.profile.value[x]
  • Added Mandatory Element
DocumentReference.created DocumentReference.masterIdentifier
  • deleted Deleted (-> DocumentReference.identifier)
DocumentReference.indexed DocumentReference.authenticator
  • deleted Deleted (-> DocumentReference.attester)
DocumentReference.context.related.identifier DocumentReference.content.format
  • deleted Deleted (-> content.profile)
DocumentReference.context.related.ref DocumentReference.context.encounter
  • deleted Deleted (-> context)
DocumentReference.context.event
  • Deleted (-> event)
DocumentReference.context.sourcePatientInfo
  • Deleted (-> use extension http://hl7.org/fhir/StructureDefinition/documentreference-sourcepatient)
DocumentReference.context.related
  • Deleted (-> basedOn)

See the Full Difference for further information

This analysis is available for R4 as XML or JSON . See R3 <--> R4 Conversion Maps (status = 1 test of which 1 fail to execute .) and for R4B as XML or JSON .

 

See the Profiles & Extensions and the alternate Additional definitions: Master Definition XML + JSON , XML Schema / Schematron + JSON Schema , ShEx (for Turtle ) + see the extensions , the spreadsheet version & the dependency analysis

DocumentReference.docStatus DocumentReference.relatesTo.code DocumentReference.securityLabel DocumentReference.content.format DocumentReference.context.event DocumentReference.context.facilityType
Path Definition ValueSet Type Reference Documentation
DocumentReference.status DocumentReferenceStatus Required

The status of the document reference.

DocumentReference.docStatus CompositionStatus Required DocumentReferenceStatus

The workflow/clinical status of the composition.

DocumentReference.modality Status of the underlying document. Modality icon Required Extensible CompositionStatus

Transitive closure of CID 33 Modality

DocumentReference.type Precise type of clinical document. FHIRDocumentTypeCodes Preferred DocumentTypeValueSet

FHIR Document Codes - all LOINC codes where scale type = 'DOC'.

DocumentReference.category ReferencedItemCategoryValueSet Example High-level

This is the code specifying the high-level kind of a clinical document at (e.g. Prescription, Discharge Summary, Report, etc.). Made up of a macro level. set of non-healthcare specific codes and all LOINC codes where scale type = 'DOC'.

DocumentReference.event ActCode icon Example DocumentClassValueSet

A code specifying the particular kind of Act that the Act-instance represents within its class. Constraints: The kind of Act (e.g. physical examination, serum potassium, inpatient encounter, charge financial transaction, etc.) is specified with a code from one of several, typically external, coding systems. The coding system will depend on the class of Act, such as LOINC for observations, etc. Conceptually, the Act.code must be a specialization of the Act.classCode. This is why the structure of ActClass domain should be reflected in the superstructure of the ActCode domain and then individual codes or externally referenced vocabularies subordinated under these domains that reflect the ActClass structure. Act.classCode and Act.code are not modifiers of each other but the Act.code concept should really imply the Act.classCode concept. For a negative example, it is not appropriate to use an Act.code "potassium" together with and Act.classCode for "laboratory observation" to somehow mean "potassium laboratory observation" and then use the same Act.code for "potassium" together with Act.classCode for "medication" to mean "substitution of potassium". This mutually modifying use of Act.code and Act.classCode is not permitted.

DocumentReference.bodyStructure The type of relationship between documents. SNOMEDCTBodyStructures Required Example DocumentRelationshipType

This value set includes all codes from SNOMED CT icon where concept is-a 442083009 (Anatomical or acquired body site (body structure)).

DocumentReference.facilityType FacilityTypeCodeValueSet Example Security Labels from

This is the code representing the type of organizational setting where the clinical encounter, service, interaction, or treatment occurred. The value set used for Healthcare Privacy and Security Classification System. Facility Type has been defined by HITSP to be the value set reproduced from HITSP C80 Table 2-147.

DocumentReference.practiceSetting PracticeSettingCodeValueSet Extensible Example All Security Labels

This is the code representing the clinical specialty of the clinician or provider who interacted with, treated, or provided a service to/for the patient. The value set used for clinical specialty has been limited by HITSP to the value set reproduced from HITSP C80 Table 2-149 Clinical Specialty Value Set Definition.

DocumentReference.attester.mode Document Format Codes. CompositionAttestationMode Preferred DocumentReferenceFormatCodeSet

The way in which a person authenticated a composition.

DocumentReference.relatesTo.code DocumentRelationshipType Extensible This list

The type of codes represents the main clinical acts being documented. relationship between documents.

DocumentReference.securityLabel SecurityLabelExamples Example v3.ActCode

A sample of security labels from Healthcare Privacy and Security Classification System as the combination of data and event codes.

DocumentReference.content.profile.value[x] HL7FormatCodes icon Preferred XDS Facility Type.

The HL7-FormatCodes value set is defined to be the set of FormatCode(s) defined by implementation guides published by HL7 and other SDOs. The use of a formatCode from the FormatCodes value set specifies the technical format that a document conforms to. The formatCode is a further specialization more detailed than the mime-type. The formatCode provides sufficient information to allow any potential document content consumer to know if it can process and/or display the content of the document based on the document encoding, structure and template conformance indicated by the formatCode. The set of formatCodes is intended to be extensible. The Content Logical Description is defined intentionally to permit formatCodes defined by other Standards Development Organizations to be added by inclusion of additional formatCode Code Systems.

DocumentReference.context.practiceSetting PracticeSettingCodeValueSet
UniqueKey FacilityTypeCodeValueSet Level Location Description Expression
img  docRef-1 Additional details about where the content was created (e.g. clinical specialty). Example Warning (base) facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
img  docRef-2 Warning (base) practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()

  • The use of the .docStatus codes is discussed in the Composition description The resources maintain one way relationships that point backwards - e.g., the document that replaces one document points towards the document that it replaced. The reverse relationships can be followed by using indexes built from the resources. Typically, this is done using the search parameters described below. Given that documents may have other documents that replace or append them, clients should always check these relationships when accessing documents
  • 2.42.4.1 Generating a Document Reference A client can ask a server to generate a document reference from a document.
  • The server reads _content search parameter shall search across the existing document DocumentReference.content.attachment.data , and generates a matching DocumentReference.content.attachment.url .
  • If the referenced resource changes, then the corresponding DocumentReference resource, or returns one it has previously generated. Servers may be able to return or generate document references for the following types out of content: Type Comments FHIR Documents The uri refers to an existing Document CDA Document The uri is a reference sync temporarily. Coordination will be needed to a Binary end-point that returns either a CDA document, or some kind of CDA Package ensure that the server knows how to process (e.g., an IHE .zip) Other The server can be asked to generate a document reference for other kinds of documents. For some of these documents (e.g., PDF documents) a server could only provide a document reference DocumentReference gets updated if it already existed or the server had special knowledge of referenced resource changes (and to not allow updates to the document. The server either returns a search result containing a single document reference, or DocumentReference that cause it returns an error. If the URI refers to another server, it is at the discretion of be misaligned with the server whether to retrieve it or return an error. The operation is initiated by referenced resource).
  • DocumentReference might be appropriate for including a named query, using _query=generate on rendered DICOM image in cases where the /DocumentReference end-point: GET [service-url]/DocumentReference/?_query=generate&uri=:url&... The "uri" parameter full image context is a relative or absolute reference to one of the document types described above. Other parameters may be supplied: Name Meaning persist Whether to store not important. When this is done, the document DocumentReference.event.reference should point at the document end-point (/Document) or not, once it is generated. Value = true ImagingStudy or false (default is for the server to decide). ImagingSelection .

Search parameters for this resource. See also the full list of search parameters for this resource , and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

Name Type Description Expression In Common
authenticator attester reference Who/what authenticated Who attested the document DocumentReference.authenticator DocumentReference.attester.party
( Practitioner , Group , Organization , Patient , PractitionerRole , RelatedPerson )
author reference Who and/or what authored the document DocumentReference.author
( Practitioner , Group , Organization , CareTeam , Device , Patient , PractitionerRole , RelatedPerson )
based-on reference Procedure that caused this media to be created DocumentReference.basedOn
( Appointment , MedicationRequest , RequestOrchestration , VisionPrescription , ServiceRequest , AppointmentResponse , CoverageEligibilityRequest , CarePlan , EnrollmentRequest , NutritionOrder , DeviceRequest , Contract , Claim , CommunicationRequest )
body-structure token The body structure studied DocumentReference.bodyStructure.concept
body-structure-reference reference The body structure studied DocumentReference.bodyStructure.reference
category token Categorization of document DocumentReference.category
contenttype token Mime type of the content, with charset etc. DocumentReference.content.attachment.contentType
context reference Context of the document content DocumentReference.context
( Appointment , EpisodeOfCare , Encounter )
creation date Date attachment was first created DocumentReference.content.attachment.creation
custodian reference Organization which maintains the document DocumentReference.custodian
( Organization )
date date When this document reference was created DocumentReference.date 22 Resources
description string Human-readable description DocumentReference.description
encounter doc-status reference token Context of the document content preliminary | final | amended | entered-in-error DocumentReference.context.encounter ( EpisodeOfCare , Encounter ) DocumentReference.docStatus 12 Resources
event-code event token Main clinical acts documented DocumentReference.context.event DocumentReference.event.concept
event-reference reference Main clinical acts documented DocumentReference.event.reference
facility token Kind of facility where patient was seen DocumentReference.context.facilityType DocumentReference.facilityType
format-canonical uri format Profile canonical content rules for the document (DocumentReference.content.profile.value.ofType(canonical))
format-code token Format/content Format code content rules for the document DocumentReference.content.format (DocumentReference.content.profile.value.ofType(Coding))
format-uri uri Profile URI content rules for the document (DocumentReference.content.profile.value.ofType(uri))
identifier token Master Version Specific Identifier of the attachment binary DocumentReference.masterIdentifier | DocumentReference.identifier 30 58 Resources
language token Human language of the content (BCP-47) DocumentReference.content.attachment.language
location uri Uri where the data can be found DocumentReference.content.attachment.url
modality token The modality used DocumentReference.modality
patient reference Who/what is the subject of the document DocumentReference.subject.where(resolve() is Patient)
( Patient )
33 60 Resources
period date Time of service that is being documented DocumentReference.context.period DocumentReference.period
related reference Related identifiers or resources DocumentReference.context.related DocumentReference.related
(Any)
relatesto reference Target of the relationship DocumentReference.relatesTo.target
( DocumentReference )
relation token replaces | transforms | signs | appends DocumentReference.relatesTo.code
relationship composite Combination of relation and relatesTo On DocumentReference.relatesTo:
  relatesto: code target
  relation: target code
security-label token Document security-tags DocumentReference.securityLabel
setting token Additional details about where the content was created (e.g. clinical specialty) DocumentReference.context.practiceSetting DocumentReference.practiceSetting
status token current | superseded | entered-in-error DocumentReference.status
subject reference Who/what is the subject of the document DocumentReference.subject
( Practitioner , Group , Device , Patient ) (Any)
type token Kind of document (LOINC if possible) DocumentReference.type 5 10 Resources
version string The business version identifier DocumentReference.version