Amakomaya Nepal FHIR Implementation Guide
2.0.0 - ci-build Nepal

Amakomaya Nepal FHIR Implementation Guide - Local Development build (v2.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: Amakomaya DocumentReference

Official URL: https://fhir.amakomaya.com/StructureDefinition/amk-document-reference Version: 2.0.0
Active as of 2026-08-21 Computable Name: AMKDocumentReference

Copyright/Legal: Used by permission of HL7 International, all rights reserved Creative Commons License

DocumentReference profile for uploading and storing files in the Amakomaya system.

Usages:

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference A reference to a document
Constraints: docRef-1, docRef-2
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... contained 0..* Resource Contained, inline Resources
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... type Σ 1..1 CodeableConcept Kind of document (LOINC if possible)
Binding: FHIRDocumentTypeCodes (preferred): Precise type of clinical document.
... subject Σ 1..1 Reference(Patient) Who/what is the subject of the document
... context ΣC 0..* Reference(Appointment | Encounter | EpisodeOfCare) Encounter the document reference is part of
... date Σ 1..1 dateTime When this document reference was created
... content Σ 1..* BackboneElement Document referenced
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... attachment Σ 1..1 Attachment Where to access the document
..... contentType ΣC 1..1 code Mime type of the content, with charset etc.
Binding: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... url Σ 1..1 url Uri where the data can be found
Example General: http://www.acme.com/logo-small.png

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.status Base required DocumentReferenceStatus 📍6.0.0-ballot5 FHIR Std.
DocumentReference.type Base preferred FHIR Document Type Codes 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​attachment.contentType Base required Mime Types 📍6.0.0-ballot5 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())

This structure is derived from DocumentReference

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference 0..* DocumentReference A reference to a document
... type 1..1 CodeableConcept Kind of document (LOINC if possible)
... subject 1..1 Reference(Patient) Who/what is the subject of the document
... date 1..1 dateTime When this document reference was created
.... attachment
..... contentType 1..1 code Mime type of the content, with charset etc.
..... url 1..1 url Uri where the data can be found

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference A reference to a document
Constraints: docRef-1, docRef-2
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... identifier Σ 0..* Identifier Business identifiers for the document
... version Σ 0..1 string An explicitly assigned identifier of a variation of the content in the DocumentReference
... basedOn 0..* Reference(Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | CoverageEligibilityRequest | DeviceRequest | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | VisionPrescription) Activity that caused this document to be created
... status ?!Σ 1..1 code current | superseded | entered-in-error | unknown
Binding: DocumentReferenceStatus (required): The status of the document reference.
... docStatus Σ 0..1 code registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
Binding: CompositionStatus (required): Status of the underlying document.
... modality Σ 0..* CodeableConcept Imaging modality used
Binding: Modality . (extensible): Type of acquired data in the instance.
... type Σ 1..1 CodeableConcept Kind of document (LOINC if possible)
Binding: FHIRDocumentTypeCodes (preferred): Precise type of clinical document.
... category Σ 0..* CodeableConcept Categorization of document
Binding: ReferencedItemCategoryValueSet (example): High-level kind of document at a macro level.
... subject Σ 1..1 Reference(Patient) Who/what is the subject of the document
... context ΣC 0..* Reference(Appointment | Encounter | EpisodeOfCare) Encounter the document reference is part of
... event 0..* CodeableReference(Resource) Main clinical acts documented
Binding: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.
... related 0..* BackboneElement Related resources with this document reference not represented elsewhere
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... code 0..1 CodeableConcept Type of relationship to target resource
Binding: AssociatedReferenceType (example): The type of relationship between the documents.
.... target 1..1 Reference(Resource) Target of the reference
... bodyStructure Σ 0..* CodeableReference(BodyStructure) Body structure included
Binding: SNOMEDCTBodyStructures (example): SNOMED CT Body Structures
... facilityType C 0..1 CodeableConcept Kind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.
... practiceSetting ΣC 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
Binding: PracticeSettingCodeValueSet (example): Additional details about where the content was created (e.g. clinical specialty).
... period Σ 0..1 Period Time of service that is being documented
... date Σ 1..1 dateTime When this document reference was created
... author Σ 0..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson | CareTeam | Group) Who and/or what authored the document
... attester 0..* BackboneElement Attests to accuracy of the document
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... mode 1..1 CodeableConcept personal | professional | legal | official
Binding: Composition Attestation Mode (preferred): The way in which a person authenticated a document.
.... time 0..1 dateTime When the document was attested
.... party 0..1 Reference(Patient | RelatedPerson | Practitioner | PractitionerRole | Organization | Group) Who attested the document
... custodian 0..1 Reference(Organization) Organization which maintains the document
... relatesTo Σ 0..* BackboneElement Relationships to other document references and their lifecycle changes
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... code Σ 1..1 CodeableConcept The relationship type with another document
Binding: Document Relationship Type (extensible): The type of relationship between the documents.
.... target Σ 1..1 Reference(DocumentReference) Target of the relationship
... description Σ 0..1 markdown Human-readable description
... securityLabel Σ 0..* CodeableConcept Document security-tags
Binding: SecurityLabelExamples (example): Example Security Labels from the Healthcare Privacy and Security Classification System.
... content Σ 1..* BackboneElement Document referenced
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... attachment Σ 1..1 Attachment Where to access the document
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... contentType ΣC 1..1 code Mime type of the content, with charset etc.
Binding: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... language Σ 0..1 code Human language of the content (BCP-47)
Binding: AllLanguages (required): IETF language tag for a human language.
Additional BindingsPurpose
CommonLanguages Starter

Example General: en-AU
..... data C 0..1 base64Binary Data inline, base64ed
..... url Σ 1..1 url Uri where the data can be found
Example General: http://www.acme.com/logo-small.png
..... size Σ 0..1 integer64 Number of bytes of content (if url provided)
..... hash Σ 0..1 base64Binary Hash of the data (sha-1, base64ed)
..... title Σ 0..1 string Label to display in place of the data
Example General: Official Corporate Logo
..... creation Σ 0..1 dateTime Date attachment was first created
..... height 0..1 positiveInt Height of the image in pixels (photo/video)
..... width 0..1 positiveInt Width of the image in pixels (photo/video)
..... frames 0..1 positiveInt Number of frames if > 1 (photo)
..... duration 0..1 decimal Length in seconds (audio / video)
..... pages 0..1 positiveInt Number of printed pages
.... profile Σ 0..* BackboneElement Content profile rules for the document
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
..... value[x] Σ 1..1 Code|uri|canonical
Binding: HL7 ValueSet of Format Codes for use with Document Sharing (preferred): Document Format Codes.
...... valueCoding Coding
...... valueUri uri
...... valueCanonical canonical(Any)

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.language Base required All Languages 📍6.0.0-ballot5 FHIR Std.
DocumentReference.status Base required DocumentReferenceStatus 📍6.0.0-ballot5 FHIR Std.
DocumentReference.docStatus Base required Composition Status 📍6.0.0-ballot5 FHIR Std.
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base preferred FHIR Document Type Codes 📍6.0.0-ballot5 FHIR Std.
DocumentReference.category Base example Referenced Item Category Value Set 📍6.0.0-ballot5 FHIR Std.
DocumentReference.event Base example v3 Code System ActCode 📦3.0.0 THO v7.3
DocumentReference.related.​code Base example Associated Reference Type 📍6.0.0-ballot5 FHIR Std.
DocumentReference.bodyStructure Base example SNOMED CT Body Structures 📍6.0.0-ballot5 FHIR Std.
DocumentReference.facilityType Base example Facility Type Code Value Set 📍6.0.0-ballot5 FHIR Std.
DocumentReference.practiceSetting Base example Practice Setting Code Value Set 📍6.0.0-ballot5 FHIR Std.
DocumentReference.attester.​mode Base preferred Composition Attestation Mode 📦1.0.0 THO v7.3
DocumentReference.relatesTo.​code Base extensible Document Relationship Type 📦1.0.0 THO v7.3
DocumentReference.securityLabel Base example Example set of Security Labels 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​attachment.contentType Base required Mime Types 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​attachment.language Base required All Languages 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​profile.value[x] Base preferred HL7 ValueSet of Format Codes for use with Document Sharing 📦2.1.0 THO v7.3

Constraints

Id Grade Path(s) Description Expression
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())

This structure is derived from DocumentReference

Summary

Mandatory: 5 elements

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference A reference to a document
Constraints: docRef-1, docRef-2
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... contained 0..* Resource Contained, inline Resources
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... type Σ 1..1 CodeableConcept Kind of document (LOINC if possible)
Binding: FHIRDocumentTypeCodes (preferred): Precise type of clinical document.
... subject Σ 1..1 Reference(Patient) Who/what is the subject of the document
... context ΣC 0..* Reference(Appointment | Encounter | EpisodeOfCare) Encounter the document reference is part of
... date Σ 1..1 dateTime When this document reference was created
... content Σ 1..* BackboneElement Document referenced
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... attachment Σ 1..1 Attachment Where to access the document
..... contentType ΣC 1..1 code Mime type of the content, with charset etc.
Binding: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... url Σ 1..1 url Uri where the data can be found
Example General: http://www.acme.com/logo-small.png

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.status Base required DocumentReferenceStatus 📍6.0.0-ballot5 FHIR Std.
DocumentReference.type Base preferred FHIR Document Type Codes 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​attachment.contentType Base required Mime Types 📍6.0.0-ballot5 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())

Differential View

This structure is derived from DocumentReference

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference 0..* DocumentReference A reference to a document
... type 1..1 CodeableConcept Kind of document (LOINC if possible)
... subject 1..1 Reference(Patient) Who/what is the subject of the document
... date 1..1 dateTime When this document reference was created
.... attachment
..... contentType 1..1 code Mime type of the content, with charset etc.
..... url 1..1 url Uri where the data can be found

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference A reference to a document
Constraints: docRef-1, docRef-2
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... identifier Σ 0..* Identifier Business identifiers for the document
... version Σ 0..1 string An explicitly assigned identifier of a variation of the content in the DocumentReference
... basedOn 0..* Reference(Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | CoverageEligibilityRequest | DeviceRequest | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | VisionPrescription) Activity that caused this document to be created
... status ?!Σ 1..1 code current | superseded | entered-in-error | unknown
Binding: DocumentReferenceStatus (required): The status of the document reference.
... docStatus Σ 0..1 code registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
Binding: CompositionStatus (required): Status of the underlying document.
... modality Σ 0..* CodeableConcept Imaging modality used
Binding: Modality . (extensible): Type of acquired data in the instance.
... type Σ 1..1 CodeableConcept Kind of document (LOINC if possible)
Binding: FHIRDocumentTypeCodes (preferred): Precise type of clinical document.
... category Σ 0..* CodeableConcept Categorization of document
Binding: ReferencedItemCategoryValueSet (example): High-level kind of document at a macro level.
... subject Σ 1..1 Reference(Patient) Who/what is the subject of the document
... context ΣC 0..* Reference(Appointment | Encounter | EpisodeOfCare) Encounter the document reference is part of
... event 0..* CodeableReference(Resource) Main clinical acts documented
Binding: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.
... related 0..* BackboneElement Related resources with this document reference not represented elsewhere
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... code 0..1 CodeableConcept Type of relationship to target resource
Binding: AssociatedReferenceType (example): The type of relationship between the documents.
.... target 1..1 Reference(Resource) Target of the reference
... bodyStructure Σ 0..* CodeableReference(BodyStructure) Body structure included
Binding: SNOMEDCTBodyStructures (example): SNOMED CT Body Structures
... facilityType C 0..1 CodeableConcept Kind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.
... practiceSetting ΣC 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
Binding: PracticeSettingCodeValueSet (example): Additional details about where the content was created (e.g. clinical specialty).
... period Σ 0..1 Period Time of service that is being documented
... date Σ 1..1 dateTime When this document reference was created
... author Σ 0..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson | CareTeam | Group) Who and/or what authored the document
... attester 0..* BackboneElement Attests to accuracy of the document
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... mode 1..1 CodeableConcept personal | professional | legal | official
Binding: Composition Attestation Mode (preferred): The way in which a person authenticated a document.
.... time 0..1 dateTime When the document was attested
.... party 0..1 Reference(Patient | RelatedPerson | Practitioner | PractitionerRole | Organization | Group) Who attested the document
... custodian 0..1 Reference(Organization) Organization which maintains the document
... relatesTo Σ 0..* BackboneElement Relationships to other document references and their lifecycle changes
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... code Σ 1..1 CodeableConcept The relationship type with another document
Binding: Document Relationship Type (extensible): The type of relationship between the documents.
.... target Σ 1..1 Reference(DocumentReference) Target of the relationship
... description Σ 0..1 markdown Human-readable description
... securityLabel Σ 0..* CodeableConcept Document security-tags
Binding: SecurityLabelExamples (example): Example Security Labels from the Healthcare Privacy and Security Classification System.
... content Σ 1..* BackboneElement Document referenced
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
.... attachment Σ 1..1 Attachment Where to access the document
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... contentType ΣC 1..1 code Mime type of the content, with charset etc.
Binding: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... language Σ 0..1 code Human language of the content (BCP-47)
Binding: AllLanguages (required): IETF language tag for a human language.
Additional BindingsPurpose
CommonLanguages Starter

Example General: en-AU
..... data C 0..1 base64Binary Data inline, base64ed
..... url Σ 1..1 url Uri where the data can be found
Example General: http://www.acme.com/logo-small.png
..... size Σ 0..1 integer64 Number of bytes of content (if url provided)
..... hash Σ 0..1 base64Binary Hash of the data (sha-1, base64ed)
..... title Σ 0..1 string Label to display in place of the data
Example General: Official Corporate Logo
..... creation Σ 0..1 dateTime Date attachment was first created
..... height 0..1 positiveInt Height of the image in pixels (photo/video)
..... width 0..1 positiveInt Width of the image in pixels (photo/video)
..... frames 0..1 positiveInt Number of frames if > 1 (photo)
..... duration 0..1 decimal Length in seconds (audio / video)
..... pages 0..1 positiveInt Number of printed pages
.... profile Σ 0..* BackboneElement Content profile rules for the document
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
Slice: Unordered, Open by value:url
..... value[x] Σ 1..1 Code|uri|canonical
Binding: HL7 ValueSet of Format Codes for use with Document Sharing (preferred): Document Format Codes.
...... valueCoding Coding
...... valueUri uri
...... valueCanonical canonical(Any)

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.language Base required All Languages 📍6.0.0-ballot5 FHIR Std.
DocumentReference.status Base required DocumentReferenceStatus 📍6.0.0-ballot5 FHIR Std.
DocumentReference.docStatus Base required Composition Status 📍6.0.0-ballot5 FHIR Std.
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base preferred FHIR Document Type Codes 📍6.0.0-ballot5 FHIR Std.
DocumentReference.category Base example Referenced Item Category Value Set 📍6.0.0-ballot5 FHIR Std.
DocumentReference.event Base example v3 Code System ActCode 📦3.0.0 THO v7.3
DocumentReference.related.​code Base example Associated Reference Type 📍6.0.0-ballot5 FHIR Std.
DocumentReference.bodyStructure Base example SNOMED CT Body Structures 📍6.0.0-ballot5 FHIR Std.
DocumentReference.facilityType Base example Facility Type Code Value Set 📍6.0.0-ballot5 FHIR Std.
DocumentReference.practiceSetting Base example Practice Setting Code Value Set 📍6.0.0-ballot5 FHIR Std.
DocumentReference.attester.​mode Base preferred Composition Attestation Mode 📦1.0.0 THO v7.3
DocumentReference.relatesTo.​code Base extensible Document Relationship Type 📦1.0.0 THO v7.3
DocumentReference.securityLabel Base example Example set of Security Labels 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​attachment.contentType Base required Mime Types 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​attachment.language Base required All Languages 📍6.0.0-ballot5 FHIR Std.
DocumentReference.content.​profile.value[x] Base preferred HL7 ValueSet of Format Codes for use with Document Sharing 📦2.1.0 THO v7.3

Constraints

Id Grade Path(s) Description Expression
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())

This structure is derived from DocumentReference

Summary

Mandatory: 5 elements

 

Other representations of profile: CSV, Excel, Schematron