description: Where it is necessary to reference an external clinical document, the External Document Reference template can be used to reference this external document. However, if the containing document is appending to or replacing another document in the same set, that relationship is set in the header, using ClinicalDocument/relatedDocument. package_name: hl7.cda.us.ccda derivation: constraint name: ExternalDocumentReference type: http://hl7.org/cda/stds/core/StructureDefinition/ExternalDocument elements: templateId: index: 0 slicing: rules: open discriminator: - {path: root, type: value} - {path: extension, type: value} min: 1 slices: external-doc-ref: match: {root: 2.16.840.1.113883.10.20.22.4.115, extension: '2014-06-09'} schema: _required: true index: 1 elements: root: pattern: {type: String, value: 2.16.840.1.113883.10.20.22.4.115} index: 2 extension: pattern: {type: String, value: '2014-06-09'} index: 3 required: [root, extension] extensions: {} classCode: pattern: {type: Code, value: DOCCLIN} index: 4 moodCode: {index: 5} id: {index: 6} code: {index: 7} setId: {index: 8} versionNumber: {index: 9} package_version: 3.0.0-ballot class: logical kind: logical url: http://hl7.org/cda/us/ccda/StructureDefinition/ExternalDocumentReference base: http://hl7.org/cda/stds/core/StructureDefinition/ExternalDocument version: 3.0.0-ballot required: [classCode, id, moodCode, templateId, code]