documentreference-twcm
type: StructureDefinition
node role: treeRoot
resource.id:
  value: documentreference-twcm
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Generated Narrative: StructureDefinition documentreference-twcm Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> DocumentReference TWCoreDocumentReference #xD; status 1..1 code current | superseded | entered-in-error Required Pattern: current #xD; subject 1..1 Reference(病人資料(Patient TWCM)) 文件描述的對象是誰/是什麼？ #xD; author 0..* Reference(健康照護服務提供人員資料(Practitioner TWCM) | TW Core PractitionerRole | 醫事機構(Organization TWCM) | TW Core Implantable Device | 病人資料(Patient TWCM) | TW Core RelatedPerson) 誰以及/或什麼創建了文件 #xD; authenticator 0..1 Reference(健康照護服務提供人員資料(Practitioner TWCM) | TW Core PractitionerRole | 醫事機構(Organization TWCM)) 誰/什麼對文件進行了認證 #xD; custodian 0..1 Reference(醫事機構(Organization TWCM)) 維護此文件的機構 #xD; relatesTo #xD; target 1..1 Reference(文件參照(DocumentReference TWCM)) 存在此關係的目標文件 #xD; content 1..* BackboneElement 被參照的文件。[應填入門診病摘之圖檔報告檔名或附件檔名(title)] #xD; attachment S 1..1 Attachment 存取文件的位置 #xD; Slices for extension Content/Rules for all slices #xD; extension:position S 0..1 CodeableConcept [如圖檔涉及牙位，應填入圖檔報告牙位Image Position] URL: https://www.nricm.edu.tw/twcm/StructureDefinition/position-twcm #xD; contentType S 1..1 code 【因FHIR必填】Mime type of the content, with charset etc. #xD; data S 1..1 base64Binary 資料之內容，必須轉成Base 64格式。 #xD; title 1..1 string 檔案名稱應包含副檔名。[應填入門診病摘之圖檔報告檔名Image File Name或附件檔名Reference Doc File Name] #xD; context S 0..1 BackboneElement 文件的臨床背景 #xD; encounter 0..* Reference(就醫事件(Encounter TWCM)) 文件內容的臨床背景 #xD; sourcePatientInfo 0..1 Reference(病人資料(Patient TWCM)) 來源的病人人口統計資料 #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
structure definition.url:
  value: https://www.nricm.edu.tw/twcm/StructureDefinition/documentreference-twcm
structure definition.version:
  value: 0.1.0
structure definition.name:
  value: DocumentReferenceTWCM
structure definition.title:
  value: 文件參照(DocumentReference TWCM)
structure definition.status:
  value: draft
structure definition.date:
  value: 2026-08-31T14:18:56+00:00
structure definition.publisher:
  value: 衛生福利部國家中醫藥研究所
structure definition.contact:
  index: 0
  contact detail.name:
    value: 衛生福利部國家中醫藥研究所
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: https://www.nricm.edu.tw/
structure definition.description:
  value: 此文件參照(DocumentReference TWCM)Profile說明本IG如何進一步定義臺灣核心-文件參照(TW Core DocumentReference) Profile以呈現門診單之文件參照的詳細資料，可通用於中西醫各科別。
structure definition.fhir version:
  value: 4.0.1
structure definition.mapping:
  index: 0
  structure definition.mapping.identity:
    value: workflow
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/workflow
  structure definition.mapping.name:
    value: Workflow Pattern
structure definition.mapping:
  index: 1
  structure definition.mapping.identity:
    value: fhircomposition
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/composition
  structure definition.mapping.name:
    value: FHIR Composition
structure definition.mapping:
  index: 2
  structure definition.mapping.identity:
    value: rim
  structure definition.mapping.uri:
    value: http://hl7.org/v3
  structure definition.mapping.name:
    value: RIM Mapping
structure definition.mapping:
  index: 3
  structure definition.mapping.identity:
    value: cda
  structure definition.mapping.uri:
    value: http://hl7.org/v3/cda
  structure definition.mapping.name:
    value: CDA (R2)
structure definition.mapping:
  index: 4
  structure definition.mapping.identity:
    value: w5
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/fivews
  structure definition.mapping.name:
    value: FiveWs Pattern Mapping
structure definition.mapping:
  index: 5
  structure definition.mapping.identity:
    value: v2
  structure definition.mapping.uri:
    value: http://hl7.org/v2
  structure definition.mapping.name:
    value: HL7 v2 Mapping
structure definition.mapping:
  index: 6
  structure definition.mapping.identity:
    value: xds
  structure definition.mapping.uri:
    value: http://ihe.net/xds
  structure definition.mapping.name:
    value: XDS metadata equivalent
structure definition.kind:
  value: resource
structure definition.abstract:
  value: false
structure definition.type:
  value: DocumentReference
structure definition.base definition:
  value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/DocumentReference-twcore
  link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/DocumentReference-twcore
structure definition.derivation:
  value: constraint
structure definition.snapshot:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    extension.value string:
      value: 0.3.2
  structure definition.snapshot.element:
    index: 0
    element.id:
      value: DocumentReference
    element definition.path:
      value: DocumentReference
    element definition.short:
      value: 文件的參照
    element definition.definition:
      value: 這是對任何目的文件的參照。它提供了有關文件的metadata，以便能夠找到並管理此文件。文件的範圍包括任何具有MIME類型的序列物件(seralized object)，例如：以病人為中心的文件（CDA）、臨床註釋、掃描的紙張，以及非與病人有關的文件，像是政策文字表述。
    element definition.comment:
      value: 通常，這用於除了由FHIR定義之外的文件。
    element definition.min:
      value: 0
    element definition.max:
      value: *
    element definition.base:
      element definition.base.path:
        value: DocumentReference
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: *
    element definition.constraint:
      index: 0
      element definition.constraint.key:
        value: dom-2
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      element definition.constraint.expression:
        value: contained.contained.empty()
      element definition.constraint.xpath:
        value: not(parent::f:contained and f:contained)
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 1
      element definition.constraint.key:
        value: dom-3
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: 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
      element definition.constraint.expression:
        value: 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()
      element definition.constraint.xpath:
        value: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 2
      element definition.constraint.key:
        value: dom-4
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      element definition.constraint.expression:
        value: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      element definition.constraint.xpath:
        value: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 3
      element definition.constraint.key:
        value: dom-5
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If a resource is contained in another resource, it SHALL NOT have a security label
      element definition.constraint.expression:
        value: contained.meta.security.empty()
      element definition.constraint.xpath:
        value: not(exists(f:contained/*/f:meta/f:security))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 4
      element.extension:
        index: 0
      element.extension:
        index: 1
      element definition.constraint.key:
        value: dom-6
      element definition.constraint.severity:
        value: warning

value: true

value: When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time.

value: A resource should have narrative for robust management

value: text.`div`.exists()

value: exists(f:text/h:div)

value: false

value: false

index: 0
element definition.mapping.identity:
  value: rim
element definition.mapping.map:
  value: Entity. Role, or Act

index: 1
element definition.mapping.identity:
  value: workflow
element definition.mapping.map:
  value: Event

index: 2
element definition.mapping.identity:
  value: fhircomposition
element definition.mapping.map:
  value: when describing a Composition

index: 3
element definition.mapping.identity:
  value: rim
element definition.mapping.map:
  value: Document[classCode="DOC" and moodCode="EVN"]

index: 4
element definition.mapping.identity:
  value: cda
element definition.mapping.map:
  value: when describing a CDA

index: 1
element.id:
  value: DocumentReference.id
element definition.path:
  value: DocumentReference.id
element definition.short:
  value: 不重複的ID用以識別儲存在特定FHIR Server中的DocumentReference紀錄，通常又稱為邏輯性ID。
element definition.definition:
  value: resource的邏輯ID，在resource的URL中使用。一旦指定，這個值永遠不會改變。
element definition.comment:
  value: 一個resource使用新增操作（create operation）提交給伺服器時，此resource沒有id，它的id在resource被創建後由伺器分配/指定。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: id
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: true

index: 2
element.id:
  value: DocumentReference.meta
element definition.path:
  value: DocumentReference.meta
element definition.short:
  value: 此DocumentReference Resource的metadata
element definition.definition:
  value: 關於resource的metadata。這是由基礎建設維護的內容。內容的更改可能並不總是與resource的版本更改相關聯。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.meta
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Meta
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true

index: 3
element.id:
  value: DocumentReference.implicitRules
element definition.path:
  value: DocumentReference.implicitRules
element definition.short:
  value: 創建此內容所依據的一組規則
element definition.definition:
  value: 構建resource時遵循的一系列規則的參照，在處理內容時必須理解這些規則。通常這是對IG所定義之特殊規則及其他profiles的參照。
element definition.comment:
  value: 宣告這套規則限制了內容只能被有限的交易夥伴所理解。這從本質上限制了資料的長期有用性。然而，現有的健康生態體系高度分裂，還沒有準備好以普遍可計算的方式定義、收集和交換資料。只要有可能，實作者和/或規範編寫者應該避免使用這個資料項目。通常在使用時，此URL是對IG的參照，此IG將這些特殊規則與其他profiles、value sets等一起定義為其敘述的一部分。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.implicitRules
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: uri
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
element definition.is summary:
  value: true

index: 4
element.id:
  value: DocumentReference.language
element definition.path:
  value: DocumentReference.language
element definition.short:
  value: 用以表述DocumentReference Resource內容的語言。
element definition.definition:
  value: 編寫此resource的語言
element definition.comment:
  value: 提供語言是為了支援索引和可存取性（通常，文字表述轉語音等服務使用此語言標籤）。html lanuage tag適用於此敘述。resource上的語言標籤可用於指定從resource中的資料所產成的其他表述之語言。不是所有的內容都必須使用此語言。不應該假定Resource.language自動適用於敘述。如果指定語言，它也應該被指定在html中的div資料項目（關於xml:lang和html lang屬性之間的關係，見HTML5中的規則）。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Resource.language
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.example:
  index: 0
  element definition.example.label:
    value: Value
  element definition.example.value string:
    value: zh-TW
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    extension.value canonical:
      value: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  element.extension:
    index: 1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: Language
  element definition.binding.strength:
    value: preferred
  element definition.binding.description:
    value: 人類語言；鼓勵使用CommonLanguages代碼表中的代碼，但不強制一定要使用此代碼表，你也可使用其他代碼表的代碼或單純以文字表示。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/languages
    link: http://hl7.org/fhir/ValueSet/languages

index: 5
element.id:
  value: DocumentReference.text
element definition.path:
  value: DocumentReference.text
element definition.short:
  value: DocumentReference Resource之內容摘要以供人閱讀
element definition.definition:
  value: 人可讀的敘述，包含resource的摘要，可用於向人表述resource的內容。敘述不需要對所有的結構化資料進行編碼，但需要包含足夠的細節使人在閱讀敘述時理解「臨床安全性」。resource定義有哪些內容應該在敘述中表示，以確保臨床安全。
element definition.comment:
  value: 內嵌（contained）的resource沒有敘述，非內嵌（contained）的resource則 **建議應該（SHOULD）** 有敘述。有時resource可能只有文字表述，很少或沒有額外的結構化資料（只要滿足所有minOccurs=1的資料項目）。這可能出現在舊系統的資料，當資訊以 「文字表述區塊（text blob） 」的形式被取得，或者文字表述是原始輸入或說明，而編碼資訊稍後再添加。
element definition.alias:
  value: narrative
  index: 0
element definition.alias:
  value: html
  index: 1
element definition.alias:
  value: xhtml
  index: 2
element definition.alias:
  value: display
  index: 3
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DomainResource.text
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Narrative
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: Act.text?

index: 6
element.id:
  value: DocumentReference.contained
element definition.path:
  value: DocumentReference.contained
element definition.short:
  value: Contained, inline Resources
element definition.definition:
  value: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
element definition.comment:
  value: This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.
element definition.alias:
  value: inline resources
  index: 0
element definition.alias:
  value: anonymous resources
  index: 1
element definition.alias:
  value: contained resources
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.contained
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Resource
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 7
element.id:
  value: DocumentReference.extension
element definition.path:
  value: DocumentReference.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 8
element.id:
  value: DocumentReference.modifierExtension
element definition.path:
  value: DocumentReference.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DomainResource.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 9
element.id:
  value: DocumentReference.masterIdentifier
element definition.path:
  value: DocumentReference.masterIdentifier
element definition.short:
  value: 主版本的識別碼
element definition.definition:
  value: 這個文件的唯一識別碼是由提供該文件的來源所賦予的。這個識別碼僅適用於該文件的特定版本。這個獨特的識別碼也可能在其他情況下用於辨認這一版本的文件
element definition.comment:
  value: CDA 文件 Id extension及root
element definition.requirements:
  value: 這個 Id 的結構和格式應與對應於 formatCode 屬性的規範一致。例如：對於 DICOM 標準文件，為64字元數字 UID；對於 HL7 CDA 格式，則為 CDA Document Id extension和 root 的序列化，格式為「oid^extension」，其中 OID 最多64位數字，Id 最多16位 UTF-8 字元。如果 OID 是不帶extension的編碼，則不應包含「^」字元。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.masterIdentifier
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Identifier
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.identifier
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.identifier
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.identifier
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-12
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .id
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.uniqueId
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/id

index: 10
element.id:
  value: DocumentReference.identifier
element definition.path:
  value: DocumentReference.identifier
element definition.short:
  value: 文件的其他的識別碼
element definition.definition:
  value: 與文件相關的其他識別碼，包括不分版本的識別碼。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.identifier
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Identifier
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.identifier
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.identifier
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-16?
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .id / .setId
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.entryUUID

index: 11
element.id:
  value: DocumentReference.status
element definition.path:
  value: DocumentReference.status
element definition.short:
  value: current | superseded | entered-in-error
element definition.definition:
  value: 此文件參照的狀態
element definition.comment:
  value: DocumentReference 物件的狀態，可能與 docStatus 資料項目無關，兩者可以是獨立設定。 此資料項目被標記為修飾用(modifier)，因為狀態包含標記 resource 為當前無效的代碼。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.status
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.pattern code:
  value: current
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentReferenceStatus
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 文件參照的狀態；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.status
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.status
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-19
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: interim: .completionCode="IN" & ./statusCode[isNormalDatatype()]="active"; final: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and not(./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseDocument", code) and isNormalAct()]); amended: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and ./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseDocument", code) and isNormalAct() and statusCode="completed"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]="obsolete"
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.availabilityStatus

index: 12
element.id:
  value: DocumentReference.docStatus
element definition.path:
  value: DocumentReference.docStatus
element definition.short:
  value: preliminary | final | amended | entered-in-error
element definition.definition:
  value: 基礎文件的狀態
element definition.comment:
  value: 被參照的文件可能會處在不同的階段或狀態中，例如初稿、完稿等不同的生命週期階段。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.docStatus
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: ReferredDocumentStatus
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 基礎文件的狀態；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/composition-status|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.status
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.status
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-17
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .statusCode

index: 13
element.id:
  value: DocumentReference.type
element definition.path:
  value: DocumentReference.type
element definition.short:
  value: 文件的類型（如果可能，使用 LOINC 代碼）
element definition.definition:
  value: 被參照文件的具體類型，例如是關於病人的病史和體檢報告、出院摘要、病程摘要等。這樣的類型通常與文件被創建和使用的目的是一致的。
element definition.comment:
  value: 關鍵metadata描述了文件的確切類型，有助於人們在查看文件清單時判斷該文件是否感興趣。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.type
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  element definition.binding.value set:
    value: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-type-doc-code
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-type-doc-code
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 14
element.id:
  value: DocumentReference.category
element definition.path:
  value: DocumentReference.category
element definition.short:
  value: 文件的類別
element definition.definition:
  value: 文件的一個分類標準，用於幫助對文件進行索引和查詢。這個分類可能直接基於或是由 DocumentReference.type 指定的代碼來確定。
element definition.comment:
  value: 關鍵metadata描述文件的大類或類型。這種分類是基於文件可能的用途或功能，將具有相似用途的文件劃分為同一組。在進行文件查詢時，這個分類作為一個主要的查詢條件。
element definition.alias:
  value: claxs
  index: 0
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.category
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  element definition.binding.value set:
    value: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-document-classcodes
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-document-classcodes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 15
element.id:
  value: DocumentReference.subject
element definition.path:
  value: DocumentReference.subject
element definition.short:
  value: 文件描述的對象是誰/是什麼？
element definition.definition:
  value: 文件可能涉及的對象範圍。這意味著文件可能描述的是一個人（例如病人或健康照護服務提供者）、一個設備（比如某種醫療機構），或者是一組特定的對象，比如一群農場動物或者一批有著相同健康風險的病人。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.subject
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.subject
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject[x]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.subject
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="SBJ"].role[typeCode="PAT"]
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.patientId
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/recordTarget/
element definition.mapping:
  index: 7
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject

index: 16
element.id:
  value: DocumentReference.date
element definition.path:
  value: DocumentReference.date
element definition.short:
  value: 文件參照的創建時間是何時？
element definition.definition:
  value: 文件參照的創建時間是何時？
element definition.comment:
  value: 文件的參照或索引時間被用於來追蹤文件的歷史、組織不同的版本及需要時查詢特定文件。
element definition.alias:
  value: indexed
  index: 0
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.date
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: instant
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.occurrence[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.recorded
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.date
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .availabilityTime[type="TS"]

index: 17
element.id:
  value: DocumentReference.author
element definition.path:
  value: DocumentReference.author
element definition.short:
  value: 誰以及/或什麼創建了文件
element definition.definition:
  value: 識別誰負責將資訊添加到文件中
element definition.comment:
  value: 未必是輸入資料的人（例如：打字員），也不必是提供資訊的人（例如：資訊提供者）。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.author
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    index: 1
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
    index: 2
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Device-twcore
    index: 3
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Device-twcore
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 4
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    index: 5
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.performer.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.author
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.author
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/author

index: 18
element.id:
  value: DocumentReference.authenticator
element definition.path:
  value: DocumentReference.authenticator
element definition.short:
  value: 誰/什麼對文件進行了認證
element definition.definition:
  value: 哪個人或機構認證這份文件是有效的
element definition.comment:
  value: 代表在作者機構內，一位已經合法認證或證實文件的參與者。合法認證意味著一份文件已經被法律認證人手動或電子簽章。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.authenticator
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    index: 1
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
    index: 2
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.performer.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.witness
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.attester
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-10
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
element definition.mapping:
  index: 5
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.legalAuthenticator
element definition.mapping:
  index: 6
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/legalAuthenticator

index: 19
element.id:
  value: DocumentReference.custodian
element definition.path:
  value: DocumentReference.custodian
element definition.short:
  value: 維護此文件的機構
element definition.definition:
  value: 負責文件持續維護和存取的機構或團體
element definition.comment:
  value: 為了找到文件的最新版本或是報告問題等，需要知道哪個組織（可能是某個軟體系統、供應商或部門）負責。這與文件實際存儲的實體位置（如網路地址、硬碟或伺服器）是不同的。實體位置指的是文件存放的地方，這個位置可能被授權給其他組織來進行管理。簡單來說，就是指明負責文件更新和問題反饋的機構，和文件存放位置之間的區別。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.custodian
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.performer.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.custodian
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"]

index: 20
element.id:
  value: DocumentReference.relatesTo
element definition.path:
  value: DocumentReference.relatesTo
element definition.short:
  value: 與其他文件的關係
element definition.definition:
  value: 此文件與已經存在的其他文件參照之間的關係
element definition.comment:
  value: 這個資料項目被標記為修飾用(modifier)，因為附加到其他文件上的文件本身是不完整的。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.relatesTo
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.relatesTo
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry Associations

index: 21
element.id:
  value: DocumentReference.relatesTo.id
element definition.path:
  value: DocumentReference.relatesTo.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 22
element.id:
  value: DocumentReference.relatesTo.extension
element definition.path:
  value: DocumentReference.relatesTo.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 23
element.id:
  value: DocumentReference.relatesTo.modifierExtension
element definition.path:
  value: DocumentReference.relatesTo.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored even if unrecognized
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.alias:
  value: modifiers
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: BackboneElement.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 24
element.id:
  value: DocumentReference.relatesTo.code
element definition.path:
  value: DocumentReference.relatesTo.code
element definition.short:
  value: replaces | transforms | signs | appends
element definition.definition:
  value: 此文件與另一文件的關係類型
element definition.comment:
  value: 如果此文件是對另一份文件進行附加，那麼不存取被參照的文件，此文件就無法被完全理解。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.relatesTo.code
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentRelationshipType
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 文件之間的關係類型；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.relatesTo.code
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship.typeCode
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry Associations type

index: 25
element.id:
  value: DocumentReference.relatesTo.target
element definition.path:
  value: DocumentReference.relatesTo.target
element definition.short:
  value: 存在此關係的目標文件
element definition.definition:
  value: 存在此關係的目標文件
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.relatesTo.target
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/documentreference-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/documentreference-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.relatesTo.target
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .target[classCode="DOC", moodCode="EVN"].id
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry Associations reference

index: 26
element.id:
  value: DocumentReference.description
element definition.path:
  value: DocumentReference.description
element definition.short:
  value: 人可讀的描述。
element definition.definition:
  value: 來源文件的人可讀描述
element definition.comment:
  value: 文件的內容簡介，提供了一個關於文件主要內容的簡明扼要的總結。
element definition.requirements:
  value: 有助於人們判斷文件是否具有興趣價值
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.description
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: string
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-25
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .outboundRelationship[typeCode="SUBJ"].target.text
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.comments

index: 27
element.id:
  value: DocumentReference.securityLabel
element definition.path:
  value: DocumentReference.securityLabel
element definition.short:
  value: 文件的安全標籤(security-tags)
element definition.definition:
  value: 在文件的參照資訊中，會使用一系列的安全標籤代碼來指明該文件的隱私和安全等級。其中，DocumentReference.meta.security 用來表示參照這份文件本身的安全標籤，也就是說明參照資訊的安全等級；而 DocumentReference.securityLabel 則展示了被參照文件在那一刻的安全標籤狀態，即原始文件的安全等級。簡單來說，就是有兩種標籤，一種用於標示參照的安全性，另一種用於顯示原文件的安全性。
element definition.comment:
  value: 一種用於文件共享環境中的安全性和隱私標籤系統，即HL7醫療隱私和安全分類系統（HCS）。這套系統包括多種與文件保密性、敏感度、資料完整性和特定處理要求相關的標籤或代碼，這些代碼有的是通用的，有的則可能是特定於某一機構或項目的。雖然這套系統被推薦使用於如XDS Affinity Domain這樣的政策領域中，但具體是否採用，以及如何採用，則取決於該領域的管理政策和規範。簡言之，這是一套幫助確定文件如何被標記和處理的標籤系統，但使用與否由各自的政策領域決定。
element definition.requirements:
  value: Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.securityLabel
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: SecurityLabels
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/security-labels
    link: http://hl7.org/fhir/ValueSet/security-labels
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 28
element.id:
  value: DocumentReference.content
element definition.path:
  value: DocumentReference.content
element definition.short:
  value: 被參照的文件。[應填入門診病摘之圖檔報告檔名或附件檔名(title)]
element definition.definition:
  value: 參照的文件和格式。可能存在多個content資料項目，每個資料項目都有不同的格式。
element definition.min:
  value: 1
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.content
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Bundle(Composition+*)
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: document.text

index: 29
element.id:
  value: DocumentReference.content.id
element definition.path:
  value: DocumentReference.content.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 30
element.id:
  value: DocumentReference.content.extension
element definition.path:
  value: DocumentReference.content.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 31
element.id:
  value: DocumentReference.content.modifierExtension
element definition.path:
  value: DocumentReference.content.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored even if unrecognized
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.alias:
  value: modifiers
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: BackboneElement.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 32
element.id:
  value: DocumentReference.content.attachment
element definition.path:
  value: DocumentReference.content.attachment
element definition.short:
  value: 存取文件的位置
element definition.definition:
  value: 文件或文件的URL以及證明內容具有完整性的關鍵metadata
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.content.attachment
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Attachment
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.language, Composition.title, Composition.date
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: TXA-3 for mime type
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: document.text
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime
element definition.mapping:
  index: 4
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date

index: 33
element.id:
  value: DocumentReference.content.attachment.id
element definition.path:
  value: DocumentReference.content.attachment.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 34
element.id:
  value: DocumentReference.content.attachment.extension
element definition.path:
  value: DocumentReference.content.attachment.extension
element definition.slicing:
  element definition.slicing.discriminator:
    index: 0
    element definition.slicing.discriminator.type:
      value: value
    element definition.slicing.discriminator.path:
      value: url
  element definition.slicing.description:
    value: Extensions are always sliced by (at least) url
  element definition.slicing.rules:
    value: open
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 35
element.id:
  value: DocumentReference.content.attachment.extension:position
element definition.path:
  value: DocumentReference.content.attachment.extension
element definition.slice name:
  value: position
element definition.short:
  value: [如圖檔涉及牙位，應填入圖檔報告牙位Image Position]
element definition.definition:
  value: 牙位
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
  element definition.type.profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/position-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/position-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false

index: 36
element.id:
  value: DocumentReference.content.attachment.contentType
element definition.path:
  value: DocumentReference.content.attachment.contentType
element definition.short:
  value: 【因FHIR必填】Mime type of the content, with charset etc.
element definition.definition:
  value: Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
element definition.requirements:
  value: Processors of the data need to be able to know how to interpret the data.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.contentType
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.example:
  index: 0
  element definition.example.label:
    value: General
  element definition.example.value code:
    value: text/plain; charset=UTF-8, image/png
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: MimeType
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: The mime type of an attachment. Any valid mime type is allowed.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/mimetypes|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./mediaType, ./charset

index: 37
element.id:
  value: DocumentReference.content.attachment.language
element definition.path:
  value: DocumentReference.content.attachment.language
element definition.short:
  value: Human language of the content (BCP-47)
element definition.definition:
  value: The human language of the content. The value can be any valid value according to BCP 47.
element definition.requirements:
  value: Users need to be able to choose between the languages in a set of attachments.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.language
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.example:
  index: 0
  element definition.example.label:
    value: General
  element definition.example.value code:
    value: en-AU
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    extension.value canonical:
      value: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  element.extension:
    index: 1
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: Language
  element definition.binding.strength:
    value: preferred
  element definition.binding.description:
    value: A human language.
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/languages|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./language

index: 38
element.id:
  value: DocumentReference.content.attachment.data
element definition.path:
  value: DocumentReference.content.attachment.data
element definition.short:
  value: 資料之內容，必須轉成Base 64格式。
element definition.definition:
  value: The actual data of the attachment - a sequence of bytes, base64 encoded.
element definition.comment:
  value: The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.
element definition.requirements:
  value: The data needs to able to be transmitted inline.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.data
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: base64Binary
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: ED.5
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./data

index: 39
element.id:
  value: DocumentReference.content.attachment.url
element definition.path:
  value: DocumentReference.content.attachment.url
element definition.short:
  value: Uri where the data can be found
element definition.definition:
  value: A location where the data can be accessed.
element definition.comment:
  value: If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.
element definition.requirements:
  value: The data needs to be transmitted by reference.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.url
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: url
element definition.example:
  index: 0
  element definition.example.label:
    value: General
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: RP.1+RP.2 - if they refer to a URL (see v2.6)
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./reference/literal

index: 40
element.id:
  value: DocumentReference.content.attachment.size
element definition.path:
  value: DocumentReference.content.attachment.size
element definition.short:
  value: Number of bytes of content (if url provided)
element definition.definition:
  value: The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
element definition.comment:
  value: The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.
element definition.requirements:
  value: Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.size
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: unsignedInt
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A (needs data type R3 proposal)

index: 41
element.id:
  value: DocumentReference.content.attachment.hash
element definition.path:
  value: DocumentReference.content.attachment.hash
element definition.short:
  value: Hash of the data (sha-1, base64ed)
element definition.definition:
  value: The calculated hash of the data using SHA-1. Represented using base64.
element definition.comment:
  value: The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](http://hl7.org/fhir/R4/provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.
element definition.requirements:
  value: Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.hash
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: base64Binary
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .integrityCheck[parent::ED/integrityCheckAlgorithm="SHA-1"]

index: 42
element.id:
  value: DocumentReference.content.attachment.title
element.extension:
  index: 0
  extension.url:
    value: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  extension.value boolean:
    value: true
element definition.path:
  value: DocumentReference.content.attachment.title
element definition.short:
  value: 檔案名稱應包含副檔名。[應填入門診病摘之圖檔報告檔名Image File Name或附件檔名Reference Doc File Name]
element definition.definition:
  value: A label or set of text to display in place of the data.
element definition.requirements:
  value: Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.title
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: string
element definition.example:
  index: 0
  element definition.example.label:
    value: General
  element definition.example.value string:
    value: Official Corporate Logo
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./title/data

index: 43
element.id:
  value: DocumentReference.content.attachment.creation
element definition.path:
  value: DocumentReference.content.attachment.creation
element definition.short:
  value: Date attachment was first created
element definition.definition:
  value: The date that the attachment was first created.
element definition.requirements:
  value: This is often tracked as an integrity issue for use of the attachment.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Attachment.creation
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: dateTime
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A (needs data type R3 proposal)

index: 44
element.id:
  value: DocumentReference.content.format
element definition.path:
  value: DocumentReference.content.format
element definition.short:
  value: 文件的格式/內容規則。
element definition.definition:
  value: 這個識別碼用來表明文件符合的編碼方式、結構和模板，這些特性是除了在 mimeType（文件類型）裡已指明的基本格式之外的部分。
element definition.comment:
  value: 請注意，雖然 IHE 通常為不同格式類型發布統一資源名稱( URN)，但並非所有文件都能透過 統一資源識別碼(URI) 來識別。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.content.format
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Coding
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentFormat
  element definition.binding.strength:
    value: preferred
  element definition.binding.description:
    value: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/formatcodes
    link: http://hl7.org/fhir/ValueSet/formatcodes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.meta.profile
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: document.text
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.formatCode
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: derived from the IHE Profile or Implementation Guide templateID

index: 45
element.id:
  value: DocumentReference.context
element definition.path:
  value: DocumentReference.context
element definition.short:
  value: 文件的臨床背景
element definition.definition:
  value: 文件所涉及的臨床情境或背景
element definition.comment:
  value: 這些值主要用於幫助查詢感興趣/相關的文件而添加的
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: outboundRelationship[typeCode="SUBJ"].target[classCode<'ACT']

index: 46
element.id:
  value: DocumentReference.context.id
element definition.path:
  value: DocumentReference.context.id
element definition.representation:
  value: xmlAttr
  index: 0
element definition.short:
  value: Unique id for inter-element referencing
element definition.definition:
  value: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Element.id
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    extension.value url:
      value: string
  element definition.type.code:
    value: http://hl7.org/fhirpath/System.String
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 47
element.id:
  value: DocumentReference.context.extension
element definition.path:
  value: DocumentReference.context.extension
element definition.short:
  value: Additional content defined by implementations
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: Element.extension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a

index: 48
element.id:
  value: DocumentReference.context.modifierExtension
element definition.path:
  value: DocumentReference.context.modifierExtension
element definition.short:
  value: Extensions that cannot be ignored even if unrecognized
element definition.definition:
  value: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
element definition.comment:
  value: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
element definition.requirements:
  value: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
element definition.alias:
  value: extensions
  index: 0
element definition.alias:
  value: user content
  index: 1
element definition.alias:
  value: modifiers
  index: 2
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: BackboneElement.modifierExtension
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Extension
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.constraint:
  index: 1
  element definition.constraint.key:
    value: ext-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: Must have either extensions or value[x], not both
  element definition.constraint.expression:
    value: extension.exists() != value.exists()
  element definition.constraint.xpath:
    value: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
element definition.is modifier:
  value: true
element definition.is modifier reason:
  value: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: N/A

index: 49
element.id:
  value: DocumentReference.context.encounter
element definition.path:
  value: DocumentReference.context.encounter
element definition.short:
  value: 文件內容的臨床背景
element definition.definition:
  value: 描述文件內容所關聯的臨床就醫事件或類型
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.encounter
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: workflow
  element definition.mapping.map:
    value: Event.context
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.context
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.encounter
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()], priorityNumber)/target[moodCode="EVN" and classCode=("ENC", "PCPR") and isNormalAct])

index: 50
element.id:
  value: DocumentReference.context.event
element definition.path:
  value: DocumentReference.context.event
element definition.short:
  value: 正在記錄的主要臨床行為
element definition.definition:
  value: 這個代碼清單代表了正在記錄的主要臨床行為，例如：結腸鏡檢查或闌尾切除手術。在某些情況下，事件已經隱含在類型代碼中，例如在「病史和體檢報告」中，正在記錄的必然是「病史和體檢」行為。
element definition.comment:
  value: 事件可以進一步專注於類型中所隱含的行為，例如當它僅為「處置報告」，而該處置是「結腸鏡檢查」。如果包括一個或多個事件代碼，則它們不應與class或type資料項目中的值相衝突，因為這樣的衝突會導致情況變得模糊不清。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.event
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentEventType
  element definition.binding.strength:
    value: example
  element definition.binding.description:
    value: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  element definition.binding.value set:
    value: http://terminology.hl7.org/ValueSet/v3-ActCode
    link: http://terminology.hl7.org/ValueSet/v3-ActCode
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 51
element.id:
  value: DocumentReference.context.period
element definition.path:
  value: DocumentReference.context.period
element definition.short:
  value: 被記錄的服務時間
element definition.definition:
  value: 文件描述的是提供服務的時間範圍
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.period
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Period
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.event.period
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .effectiveTime
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/low/ @value --> ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/high/ @value

index: 52
element.id:
  value: DocumentReference.context.facilityType
element definition.path:
  value: DocumentReference.context.facilityType
element definition.short:
  value: 病人接受治療的機構類型
element definition.definition:
  value: 病人接受治療的機構類型
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.facilityType
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentC80FacilityType
  element definition.binding.strength:
    value: example
  element definition.binding.description:
    value: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/c80-facilitycodes
    link: http://hl7.org/fhir/ValueSet/c80-facilitycodes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: usually from a mapping to a local ValueSet
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="LOC"].role[classCode="DSDLOC"].code
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.healthcareFacilityTypeCode
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code

index: 53
element.id:
  value: DocumentReference.context.practiceSetting
element definition.path:
  value: DocumentReference.context.practiceSetting
element definition.short:
  value: 內容創建的額外細節(例如：臨床專業)
element definition.definition:
  value: 此屬性可能提供有關創建內容的實務環境細節，通常反映了臨床專業。
element definition.comment:
  value: 此資料項目應基於一個粗略的專業實務分類系統，建議使用實務環境(Practice Setting)的分類系統，例如：LOINC中的主題領域(Subject Matter Domain)所描述的。
element definition.requirements:
  value: 這是健康照護服務提供者(provider)經常依賴的重要metadata之一，他們通常會用來快速排序和/或篩選以找到特定的內容。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.practiceSetting
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: DocumentC80PracticeSetting
  element definition.binding.strength:
    value: example
  element definition.binding.description:
    value: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/c80-practice-codes
    link: http://hl7.org/fhir/ValueSet/c80-practice-codes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 54
element.id:
  value: DocumentReference.context.sourcePatientInfo
element definition.path:
  value: DocumentReference.context.sourcePatientInfo
element definition.short:
  value: 來源的病人人口統計資料
element definition.definition:
  value: 文件發佈時已知的病人資訊。可以是對特定版本的參照，也可以是包含在文件中的資訊。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.sourcePatientInfo
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.subject
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode="SBJ"].role[typeCode="PAT"]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/recordTarget/

index: 55
element.id:
  value: DocumentReference.context.related
element definition.path:
  value: DocumentReference.context.related
element definition.short:
  value: 相關的識別碼或resources
element definition.definition:
  value: 與DocumentReference相關聯的相關識別碼或resources
element definition.comment:
  value: 可能是導致創建 DocumentReference 或參照文件的識別碼或resources
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: DocumentReference.context.related
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/Resource
    index: 0
    link: http://hl7.org/fhir/StructureDefinition/Resource
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: fhircomposition
  element definition.mapping.map:
    value: Composition.event.detail
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./outboundRelationship[typeCode="PERT" and isNormalActRelationship()] / target[isNormalAct]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: xds
  element definition.mapping.map:
    value: DocumentEntry.referenceIdList
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: cda
  element definition.mapping.map:
    value: ClinicalDocument/relatedDocument

structure definition.differential.element:
  index: 0
  element.id:
    value: DocumentReference.status
  element definition.path:
    value: DocumentReference.status
  element definition.pattern code:
    value: current
structure definition.differential.element:
  index: 1
  element.id:
    value: DocumentReference.subject
  element definition.path:
    value: DocumentReference.subject
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
structure definition.differential.element:
  index: 2
  element.id:
    value: DocumentReference.author
  element definition.path:
    value: DocumentReference.author
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
      index: 1
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
      index: 2
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Device-twcore
      index: 3
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Device-twcore
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
      index: 4
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
      index: 5
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
structure definition.differential.element:
  index: 3
  element.id:
    value: DocumentReference.authenticator
  element definition.path:
    value: DocumentReference.authenticator
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
      index: 1
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
      index: 2
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
structure definition.differential.element:
  index: 4
  element.id:
    value: DocumentReference.custodian
  element definition.path:
    value: DocumentReference.custodian
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/organization-twcm
structure definition.differential.element:
  index: 5
  element.id:
    value: DocumentReference.relatesTo.target
  element definition.path:
    value: DocumentReference.relatesTo.target
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/documentreference-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/documentreference-twcm
structure definition.differential.element:
  index: 6
  element.id:
    value: DocumentReference.content
  element definition.path:
    value: DocumentReference.content
  element definition.short:
    value: 被參照的文件。[應填入門診病摘之圖檔報告檔名或附件檔名(title)]
structure definition.differential.element:
  index: 7
  element.id:
    value: DocumentReference.content.attachment
  element definition.path:
    value: DocumentReference.content.attachment
  element definition.must support:
    value: true
structure definition.differential.element:
  index: 8
  element.id:
    value: DocumentReference.content.attachment.extension:position
  element definition.path:
    value: DocumentReference.content.attachment.extension
  element definition.slice name:
    value: position
  element definition.short:
    value: [如圖檔涉及牙位，應填入圖檔報告牙位Image Position]
  element definition.min:
    value: 0
  element definition.max:
    value: 1
  element definition.type:
    index: 0
    element definition.type.code:
      value: Extension
    element definition.type.profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/position-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/position-twcm
  element definition.must support:
    value: true
structure definition.differential.element:
  index: 9
  element.id:
    value: DocumentReference.content.attachment.contentType
  element definition.path:
    value: DocumentReference.content.attachment.contentType
  element definition.short:
    value: 【因FHIR必填】Mime type of the content, with charset etc.
  element definition.min:
    value: 1
  element definition.must support:
    value: true
structure definition.differential.element:
  index: 10
  element.id:
    value: DocumentReference.content.attachment.data
  element definition.path:
    value: DocumentReference.content.attachment.data
  element definition.short:
    value: 資料之內容，必須轉成Base 64格式。
  element definition.min:
    value: 1
  element definition.must support:
    value: true
structure definition.differential.element:
  index: 11
  element.id:
    value: DocumentReference.content.attachment.title
  element definition.path:
    value: DocumentReference.content.attachment.title
  element definition.short:
    value: 檔案名稱應包含副檔名。[應填入門診病摘之圖檔報告檔名Image File Name或附件檔名Reference Doc File Name]
  element definition.min:
    value: 1
structure definition.differential.element:
  index: 12
  element.id:
    value: DocumentReference.context
  element definition.path:
    value: DocumentReference.context
  element definition.must support:
    value: true
structure definition.differential.element:
  index: 13
  element.id:
    value: DocumentReference.context.encounter
  element definition.path:
    value: DocumentReference.context.encounter
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm

index: 14
element.id:
  value: DocumentReference.context.sourcePatientInfo
element definition.path:
  value: DocumentReference.context.sourcePatientInfo
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm