Canadian Core
0.1.0 - CI Build

Canadian Core, published by Canadian FHIR Implementor Working Group. This is not an authorized publication; it is the continuous build for version 0.1.0). This version is based on the current content of https://github.com/scratch-fhir-profiles/CA-Core/ and changes regularly. See the Directory of published versions

Resource Profile: Document Reference Profile

Defining URL:http://hl7.org/fhir/ca/core/StructureDefinition/profile-documentreference
Version:0.1.0
Name:DocumentReferenceProfile
Title:DocumentReference Profile for metadata about the document
Status:Draft as of 2020-10-21
Definition:

Proposed constraints on the DocumentReference resource for the minimal set of data required to reference to a document of any kind for any purpose.

Publisher:Canadian FHIR Implementor Working Group
Source Resource:XML / JSON / Turtle

The official URL for this profile is:

http://hl7.org/fhir/ca/core/StructureDefinition/profile-documentreference

CA Core DocumentReference Profile

This DocumentReference profile sets minimum expectations for mandatory core elements, constraints and value sets required to provide metadata about the document of any kind so that the document can be published, discovered and managed.

This profile defines core localisation concepts for use in an Canadian context.

Mandatory Data Elements

All elements or attributes defined in FHIR have cardinality as part of their definition - a minimum number of required appearances and a maximum number.

Most elements in FHIR specification have a minimum cardinality of 0, which means that they may be missing from a resource when it is exchanged between systems.

Required elements:

  • status of the refence
  • document referenced

Must Support Data Elements

Some elements are labeled as MustSupport meaning that implementations that produce or consume resources SHALL provide “support” for the element in some meaningful way (see Must Support definition).

Following elements are marked as Must Support in the Canadian DocumentReference profile to aid record matching in databases.

Must Support elements:

  • master version identifier
  • kind of document
  • categorization of document
  • subject of the document
  • document author
  • document authenticator
  • organization which maintains the document
  • the document itself or URL
  • context of the document content
  • practice settings
  • patient demographics

Usage Note

The following are example usage scenarios for the DocumentReference profile.

  • Publishing a new document. This can be done using the IHE MHD Provide Document Bundle [ITI-65] transaction that carries both the document and its metadata.
  • Querying the document repository for specific document(s) matching various metadata parameters. This is similar to the IHE MHD Find Document References [ITI-67] transaction.

Formal Views of Profile Content

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

This structure is derived from DocumentReference

NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*DocumentReferenceDocumentReference Profile
... masterIdentifier S0..1IdentifierMaster Version Specific Identifier
... type S0..1CodeableConceptKind of document (LOINC if possible)
... category S0..*CodeableConceptCategorization of document
... author S0..*Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile | Device Profile | Patient Profile)Who and/or what authored the document
... authenticator S0..1Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile)Who/what authenticated the document
... custodian S0..1Reference(Organization Profile)Organization which maintains the document
... content
.... attachment SI1..1AttachmentWhere to access the document
ca-core-documentreference-1: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.
... context
.... encounter S0..*Reference(Encounter Profile)Context of the document content
.... practiceSetting S0..1CodeableConceptPractitionerSpecialty
Binding: https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty (preferred): Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.

.... sourcePatientInfo S0..1Reference(Patient Profile)Patient demographics from source

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*DocumentReferenceDocumentReference Profile
... id Σ0..1stringLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... masterIdentifier SΣ0..1IdentifierMaster Version Specific Identifier
... identifier Σ0..*IdentifierOther identifiers for the document
... status ?!Σ1..1codecurrent | superseded | entered-in-error
Binding: DocumentReferenceStatus (required): The status of the document reference.

... docStatus Σ0..1codepreliminary | final | amended | entered-in-error
Binding: CompositionStatus (required): Status of the underlying document.

... type SΣ0..1CodeableConceptKind of document (LOINC if possible)
Binding: DocumentTypeValueSet (preferred): Precise type of clinical document.

... category SΣ0..*CodeableConceptCategorization of document
Binding: DocumentClassValueSet (example): High-level kind of a clinical document at a macro level.


... subject SΣ0..1Reference(Patient Profile | Practitioner Profile (General) | Device Profile)Who/what is the subject of the document
... date Σ0..1instantWhen this document reference was created
... author SΣ0..*Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile | Device Profile | Patient Profile)Who and/or what authored the document
... authenticator S0..1Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile)Who/what authenticated the document
... custodian S0..1Reference(Organization Profile)Organization which maintains the document
... relatesTo Σ0..*BackboneElementRelationships to other documents
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... code Σ1..1codereplaces | transforms | signs | appends
Binding: DocumentRelationshipType (required): The type of relationship between documents.

.... target Σ1..1Reference(DocumentReference)Target of the relationship
... description Σ0..1stringHuman-readable description
... securityLabel Σ0..*CodeableConceptDocument security-tags
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.


... content Σ1..*BackboneElementDocument referenced
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... attachment SΣI1..1AttachmentWhere to access the document
ca-core-documentreference-1: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.
.... format Σ0..1CodingFormat/content rules for the document
Binding: DocumentReferenceFormatCodeSet (preferred): Document Format Codes.

... context Σ0..1BackboneElementClinical context of document
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... encounter S0..*Reference(Encounter Profile)Context of the document content
.... event 0..*CodeableConceptMain clinical acts documented
Binding: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.


.... period Σ0..1PeriodTime of service that is being documented
.... facilityType 0..1CodeableConceptKind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.

.... practiceSetting S0..1CodeableConceptPractitionerSpecialty
Binding: https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty (preferred): Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.

.... sourcePatientInfo S0..1Reference(Patient Profile)Patient demographics from source
.... related 0..*Reference(Resource)Related identifiers or resources

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*DocumentReferenceDocumentReference Profile
... masterIdentifier Σ0..1IdentifierMaster Version Specific Identifier
... type Σ0..1CodeableConceptKind of document (LOINC if possible)
Binding: DocumentTypeValueSet (preferred): Precise type of clinical document.

... category Σ0..*CodeableConceptCategorization of document
Binding: DocumentClassValueSet (example): High-level kind of a clinical document at a macro level.


... author Σ0..*Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile | Device Profile | Patient Profile)Who and/or what authored the document
... authenticator 0..1Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile)Who/what authenticated the document
... custodian 0..1Reference(Organization Profile)Organization which maintains the document
... content Σ1..*BackboneElementDocument referenced
.... attachment ΣI1..1AttachmentWhere to access the document
ca-core-documentreference-1: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.
... context Σ0..1BackboneElementClinical context of document
.... encounter 0..*Reference(Encounter Profile)Context of the document content
.... practiceSetting 0..1CodeableConceptPractitionerSpecialty
Binding: https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty (preferred): Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.

.... sourcePatientInfo 0..1Reference(Patient Profile)Patient demographics from source

doco Documentation for this format

Differential View

This structure is derived from DocumentReference

NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*DocumentReferenceDocumentReference Profile
... masterIdentifier S0..1IdentifierMaster Version Specific Identifier
... type S0..1CodeableConceptKind of document (LOINC if possible)
... category S0..*CodeableConceptCategorization of document
... author S0..*Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile | Device Profile | Patient Profile)Who and/or what authored the document
... authenticator S0..1Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile)Who/what authenticated the document
... custodian S0..1Reference(Organization Profile)Organization which maintains the document
... content
.... attachment SI1..1AttachmentWhere to access the document
ca-core-documentreference-1: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.
... context
.... encounter S0..*Reference(Encounter Profile)Context of the document content
.... practiceSetting S0..1CodeableConceptPractitionerSpecialty
Binding: https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty (preferred): Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.

.... sourcePatientInfo S0..1Reference(Patient Profile)Patient demographics from source

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*DocumentReferenceDocumentReference Profile
... id Σ0..1stringLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... text 0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... masterIdentifier SΣ0..1IdentifierMaster Version Specific Identifier
... identifier Σ0..*IdentifierOther identifiers for the document
... status ?!Σ1..1codecurrent | superseded | entered-in-error
Binding: DocumentReferenceStatus (required): The status of the document reference.

... docStatus Σ0..1codepreliminary | final | amended | entered-in-error
Binding: CompositionStatus (required): Status of the underlying document.

... type SΣ0..1CodeableConceptKind of document (LOINC if possible)
Binding: DocumentTypeValueSet (preferred): Precise type of clinical document.

... category SΣ0..*CodeableConceptCategorization of document
Binding: DocumentClassValueSet (example): High-level kind of a clinical document at a macro level.


... subject SΣ0..1Reference(Patient Profile | Practitioner Profile (General) | Device Profile)Who/what is the subject of the document
... date Σ0..1instantWhen this document reference was created
... author SΣ0..*Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile | Device Profile | Patient Profile)Who and/or what authored the document
... authenticator S0..1Reference(Practitioner Profile (General) | PractitionerRole Profile (General) | Organization Profile)Who/what authenticated the document
... custodian S0..1Reference(Organization Profile)Organization which maintains the document
... relatesTo Σ0..*BackboneElementRelationships to other documents
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... code Σ1..1codereplaces | transforms | signs | appends
Binding: DocumentRelationshipType (required): The type of relationship between documents.

.... target Σ1..1Reference(DocumentReference)Target of the relationship
... description Σ0..1stringHuman-readable description
... securityLabel Σ0..*CodeableConceptDocument security-tags
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.


... content Σ1..*BackboneElementDocument referenced
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... attachment SΣI1..1AttachmentWhere to access the document
ca-core-documentreference-1: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.
.... format Σ0..1CodingFormat/content rules for the document
Binding: DocumentReferenceFormatCodeSet (preferred): Document Format Codes.

... context Σ0..1BackboneElementClinical context of document
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... encounter S0..*Reference(Encounter Profile)Context of the document content
.... event 0..*CodeableConceptMain clinical acts documented
Binding: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.


.... period Σ0..1PeriodTime of service that is being documented
.... facilityType 0..1CodeableConceptKind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.

.... practiceSetting S0..1CodeableConceptPractitionerSpecialty
Binding: https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty (preferred): Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.

.... sourcePatientInfo S0..1Reference(Patient Profile)Patient demographics from source
.... related 0..*Reference(Resource)Related identifiers or resources

doco Documentation for this format

 

Other representations of profile: Schematron

Terminology Bindings

PathConformanceValueSet
DocumentReference.languagepreferredCommonLanguages
Max Binding: AllLanguages
DocumentReference.statusrequiredDocumentReferenceStatus
DocumentReference.docStatusrequiredCompositionStatus
DocumentReference.typepreferredDocumentTypeValueSet
DocumentReference.categoryexampleDocumentClassValueSet
DocumentReference.relatesTo.coderequiredDocumentRelationshipType
DocumentReference.securityLabelextensibleAll Security Labels
DocumentReference.content.formatpreferredDocumentReferenceFormatCodeSet
DocumentReference.context.eventexampleActCode
DocumentReference.context.facilityTypeexampleFacilityTypeCodeValueSet
DocumentReference.context.practiceSettingpreferredhttps://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty

Constraints

IdPathDetailsRequirements
dom-2DocumentReferenceIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3DocumentReferenceIf 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 in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4DocumentReferenceIf 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-5DocumentReferenceIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6DocumentReferenceA resource should have narrative for robust management
: text.`div`.exists()
ele-1DocumentReference.metaAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.implicitRulesAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.languageAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.textAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.masterIdentifierAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.identifierAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.statusAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.docStatusAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.typeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.categoryAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.subjectAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.dateAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.authorAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.authenticatorAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.custodianAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.relatesToAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.relatesTo.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.relatesTo.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.relatesTo.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.relatesTo.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.relatesTo.codeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.relatesTo.targetAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.descriptionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.securityLabelAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.contentAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.content.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.content.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.content.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.content.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.content.attachmentAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ca-core-documentreference-1DocumentReference.content.attachmentDocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.
: url.exists() or data.exists()
ele-1DocumentReference.content.formatAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.contextAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.extensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.context.extensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.context.modifierExtensionAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1DocumentReference.context.modifierExtensionMust have either extensions or value[x], not both
: extension.exists() != value.exists()
ele-1DocumentReference.context.encounterAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.eventAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.periodAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.facilityTypeAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.practiceSettingAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.sourcePatientInfoAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ele-1DocumentReference.context.relatedAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())