MessageHeader-tb-drug
type: StructureDefinition
node role: treeRoot
resource.id:
  value: MessageHeader-tb-drug
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Generated Narrative: 结构定义 MessageHeader-tb-drug Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> MessageHeader TWCoreMessageHeader #xD; id 0..1 id 流水號，系統自動增加 #xD; Slices for event[x] 1..1 Coding, uri 此訊息代表的事件的代碼或連結到事件定義 Slice: Unordered, Open by type:$this #xD; event[x]:eventCoding 0..1 Coding 此訊息代表的事件的代碼或連結到事件定義 #xD; system 0..1 uri Identity of the terminology system Required Pattern: https://tb.cdc.gov.tw/tb/CodeSystem/cdc-message-event #xD; code 0..1 code Symbol in syntax defined by the system Required Pattern: drug #xD; sender 1..1 Reference(TW Core Organization) 醫院十碼章 #xD; focus 1..* Reference(用藥-MedicationRequest TB Drug | 用藥通報檢體-Specimen TB Drug) 訊息的實際內容 #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
structure definition.url:
  value: https://tb.cdc.gov.tw/tb/StructureDefinition/MessageHeader-tb-drug
structure definition.version:
  value: 0.1.0
structure definition.name:
  value: MessageHeaderTBDR
structure definition.title:
  value: 用藥通報訊息-MessageHeader TB Drug
structure definition.status:
  value: active
structure definition.date:
  value: 2026-08-05T07:22:30+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.cdc.gov.tw
structure definition.description:
  value: 此用藥通報訊息-MessageHeader TB Drug Profile說明本IG如何進一步定義臺灣核心-訊息表頭（TW Core MessageHeader） Profile以呈現TB用藥通報訊息
structure definition.jurisdiction:
  index: 0
  codeable concept.coding:
    index: 0
    coding.system:
      value: urn:iso:std:iso:3166
    coding.code:
      value: TW
structure definition.fhir version:
  value: 4.0.1
structure definition.mapping:
  index: 0
  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: 1
  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: 2
  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.kind:
  value: resource
structure definition.abstract:
  value: false
structure definition.type:
  value: MessageHeader
structure definition.base definition:
  value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/MessageHeader-twcore
  link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/MessageHeader-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: MessageHeader
    element definition.path:
      value: MessageHeader
    element definition.short:
      value: 描述系統間交換的訊息的resources
    element definition.definition:
      value: 在系統之間交換資訊時，會使用一個稱為「message header（訊息表頭）」的資料項目來標記和組織這次交換的內容。無論是發出請求還是回應某個動作，「訊息表頭」都扮演著關鍵角色。它不僅包含了這次動作涉及的對象（例如：特定的資料或resources），還包含了與這次動作相關的其他資訊。 這些資訊一般會放在一個稱為「Bundle」的resource中傳輸，而「Message Header」resource則是這個Bundle中的第一個resource。這種結構讓接收方可以從「Message Header」resource 開始解析整個bundle，了解這次訊息交換的上下文和目的。簡言之，「Message Header」resource就像是一封信的信頭，告訴接收者这封信的主要内容和目的。
    element definition.min:
      value: 0
    element definition.max:
      value: *
    element definition.base:
      element definition.base.path:
        value: MessageHeader
      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
      element definition.constraint.human:
        value: A resource should have narrative for robust management
      element definition.constraint.expression:
        value: text.`div`.exists()
      element definition.constraint.xpath:
        value: exists(f:text/h:div)
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    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: Entity. Role, or Act
    element definition.mapping:
      index: 1
      element definition.mapping.identity:
        value: v2
      element definition.mapping.map:
        value: MSH / MSA / ERR

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.

index: 2
element definition.mapping.identity:
  value: rim
element definition.mapping.map:
  value: Message

index: 1
element.id:
  value: MessageHeader.id
element definition.path:
  value: MessageHeader.id
element definition.short:
  value: 流水號，系統自動增加
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: MessageHeader.meta
element definition.path:
  value: MessageHeader.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: MessageHeader.implicitRules
element definition.path:
  value: MessageHeader.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: MessageHeader.language
element definition.path:
  value: MessageHeader.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: MessageHeader.text
element definition.path:
  value: MessageHeader.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: MessageHeader.contained
element definition.path:
  value: MessageHeader.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: MessageHeader.extension
element definition.path:
  value: MessageHeader.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: MessageHeader.modifierExtension
element definition.path:
  value: MessageHeader.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: MessageHeader.event[x]
element definition.path:
  value: MessageHeader.event[x]
element definition.slicing:
  element definition.slicing.discriminator:
    index: 0
    element definition.slicing.discriminator.type:
      value: type
    element definition.slicing.discriminator.path:
      value: $this
  element definition.slicing.ordered:
    value: false
  element definition.slicing.rules:
    value: open
element definition.short:
  value: 此訊息代表的事件的代碼或連結到事件定義
element definition.definition:
  value: 用於識別此訊息所代表的事件並將其與其定義連接的代碼。作為FHIR規範一部分定義的事件，其系統值（system value）為「http://terminology.hl7.org/CodeSystem/message-events」。或者是指向EventDefinition的URI。
element definition.comment:
  value: 事件的時間將在foscus resource中找到。訊息的時間將在[Bundle.timestamp](http://hl7.org/fhir/R4/bundle-definitions.html#Bundle.timestamp)中找到。
element definition.requirements:
  value: 驅動與此訊息相關的行為
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.event[x]
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Coding
element definition.type:
  index: 1
  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: 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: MessageEvent
  element definition.binding.strength:
    value: example
  element definition.binding.description:
    value: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/message-events
    link: http://hl7.org/fhir/ValueSet/message-events
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.what[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: MSH-9.2
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./payload[classCode="CACT" and moodCode="EVN" and isNormalAct()]/code[isNormalDatatype()]/code

index: 10
element.id:
  value: MessageHeader.event[x]:eventCoding
element definition.path:
  value: MessageHeader.event[x]
element definition.slice name:
  value: eventCoding
element definition.short:
  value: 此訊息代表的事件的代碼或連結到事件定義
element definition.definition:
  value: 用於識別此訊息所代表的事件並將其與其定義連接的代碼。作為FHIR規範一部分定義的事件，其系統值（system value）為「http://terminology.hl7.org/CodeSystem/message-events」。或者是指向EventDefinition的URI。
element definition.comment:
  value: 事件的時間將在foscus resource中找到。訊息的時間將在[Bundle.timestamp](http://hl7.org/fhir/R4/bundle-definitions.html#Bundle.timestamp)中找到。
element definition.requirements:
  value: 驅動與此訊息相關的行為
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.event[x]
  element definition.base.min:
    value: 1
  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: MessageEvent
  element definition.binding.strength:
    value: example
  element definition.binding.description:
    value: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/message-events
    link: http://hl7.org/fhir/ValueSet/message-events
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.what[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: MSH-9.2
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./payload[classCode="CACT" and moodCode="EVN" and isNormalAct()]/code[isNormalDatatype()]/code

index: 11
element.id:
  value: MessageHeader.event[x]:eventCoding.id
element definition.path:
  value: MessageHeader.event[x].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: 12
element.id:
  value: MessageHeader.event[x]:eventCoding.extension
element definition.path:
  value: MessageHeader.event[x].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: 13
element.id:
  value: MessageHeader.event[x]:eventCoding.system
element definition.path:
  value: MessageHeader.event[x].system
element definition.short:
  value: Identity of the terminology system
element definition.definition:
  value: The identification of the code system that defines the meaning of the symbol in the code.
element definition.comment:
  value: The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.
element definition.requirements:
  value: Need to be unambiguous about the source of the definition of the symbol.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Coding.system
  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.pattern uri:
  value: https://tb.cdc.gov.tw/tb/CodeSystem/cdc-message-event
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: C*E.3
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./codeSystem
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem

index: 14
element.id:
  value: MessageHeader.event[x]:eventCoding.version
element definition.path:
  value: MessageHeader.event[x].version
element definition.short:
  value: Version of the system - if relevant
element definition.definition:
  value: The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
element definition.comment:
  value: Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Coding.version
  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: C*E.7
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./codeSystemVersion
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion

index: 15
element.id:
  value: MessageHeader.event[x]:eventCoding.code
element definition.path:
  value: MessageHeader.event[x].code
element definition.short:
  value: Symbol in syntax defined by the system
element definition.definition:
  value: A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
element definition.requirements:
  value: Need to refer to a particular code in the system.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Coding.code
  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.pattern code:
  value: drug
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: C*E.1
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./code
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code

index: 16
element.id:
  value: MessageHeader.event[x]:eventCoding.display
element.extension:
  index: 0
  extension.url:
    value: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  extension.value boolean:
    value: true
element definition.path:
  value: MessageHeader.event[x].display
element definition.short:
  value: Representation defined by the system
element definition.definition:
  value: A representation of the meaning of the code in the system, following the rules of the system.
element definition.requirements:
  value: Need to be able to carry a human-readable meaning of the code for readers that do not know the system.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Coding.display
  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: C*E.2 - but note this is not well followed
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CV.displayName
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName

index: 17
element.id:
  value: MessageHeader.event[x]:eventCoding.userSelected
element definition.path:
  value: MessageHeader.event[x].userSelected
element definition.short:
  value: If this coding was chosen directly by the user
element definition.definition:
  value: Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
element definition.comment:
  value: Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.
element definition.requirements:
  value: This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: Coding.userSelected
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: boolean
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: Sometimes implied by being first
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD.codingRationale
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]

index: 18
element.id:
  value: MessageHeader.destination
element definition.path:
  value: MessageHeader.destination
element definition.short:
  value: 訊息目的地應用程式
element definition.definition:
  value: 訊息目的地應用程式
element definition.comment:
  value: 在發送訊息時，通常 **應該（SHOULD）** 至少有一個接收目的地。但在某些情況下，發送訊息的系統可能不會知道任何特定的接收目的地系統。
element definition.requirements:
  value: 訊息中會指定一個或多個接收方（目的地應用程式），用於確定訊息應該發送到哪裡去。這樣做的目的是為了確保訊息能夠正確地被送達到預定的接收者，並且允許接收訊息的系統或人員檢查自己是否是該訊息的目標接收者。簡言之，這是一種確認「這個訊息是不是發給我的」的機制。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: MessageHeader.destination
  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: w5
  element definition.mapping.map:
    value: FiveWs.subject[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./communicationFunction[typeCode="RCV"]
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject

index: 19
element.id:
  value: MessageHeader.destination.id
element definition.path:
  value: MessageHeader.destination.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: 20
element.id:
  value: MessageHeader.destination.extension
element definition.path:
  value: MessageHeader.destination.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: 21
element.id:
  value: MessageHeader.destination.modifierExtension
element definition.path:
  value: MessageHeader.destination.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: 22
element.id:
  value: MessageHeader.destination.name
element definition.path:
  value: MessageHeader.destination.name
element definition.short:
  value: 系統的名稱
element definition.definition:
  value: 目標系統的名稱
element definition.requirements:
  value: 可用於回應的路徑和/或支援稽核
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.destination.name
  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: MSH-5
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./entity[determinerCode="INST" and (classCode=("DEV", "PSN", "ORG"]/name[type='ST' and isNormalDatatype()])

index: 23
element.id:
  value: MessageHeader.destination.target
element definition.path:
  value: MessageHeader.destination.target
element definition.short:
  value: 在訊息或資料發送的目的地中，指定一個具體的接收點。
element definition.definition:
  value: 當發送的訊息首先被送達到一個中介系統而不是直接送到最終目的地時，需要明確識別出最終的接收系統是什麼。
element definition.requirements:
  value: 支援多點跳躍繞徑（multi-hop routing）
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.destination.target
  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: http://hl7.org/fhir/StructureDefinition/Device
    index: 0
    link: http://hl7.org/fhir/StructureDefinition/Device
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: unique(./entity[determinerCode="INST" and (classCode=("DEV", "PSN", "ORG"]

index: 24
element.id:
  value: MessageHeader.destination.endpoint
element definition.path:
  value: MessageHeader.destination.endpoint
element definition.short:
  value: 實際目的地地址或id
element definition.definition:
  value: 指明訊息應該被繞徑到哪裡
element definition.comment:
  value: 對於不使用標準網絡地址的系統，該id可能是一個無法解析的URI。
element definition.requirements:
  value: 指明應將訊息繞徑至何處
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.destination.endpoint
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: url
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: MSH-25 (or MSH-6)
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./telecom

index: 25
element.id:
  value: MessageHeader.destination.receiver
element definition.path:
  value: MessageHeader.destination.receiver
element definition.short:
  value: 資料應該被發送給在現實生活中真正需要這些資訊的個人或機構
element definition.definition:
  value: 當單純發送資料到一個特定的應用程式是不夠用時，這允許我們把訊息直接指定發送給具體的某個人或是某個部門。
element definition.requirements:
  value: 可以把訊息發送到更多的地方，不只是發到某個應用程式裡面。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.destination.receiver
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    index: 2
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-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.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: PRT-5:PRT-4='WAYR' / PRT-8:PRT-4='WAYR'
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: Not directly supported. Could be shared using attentionLine.value with an appropriate keyWordText
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject

index: 26
element.id:
  value: MessageHeader.sender
element definition.path:
  value: MessageHeader.sender
element definition.short:
  value: 醫院十碼章
element definition.definition:
  value: 識別發送端系統的身份，以便可以建立信任關係並進行後續操作。
element definition.comment:
  value: 這個使用案例是針對一個（受信任的）發送端系統負責管理多個機構的情況，因此單憑來源端點/身份驗證無法區分機構。
element definition.requirements:
  value: 不僅僅限制在應用程式層級的繞徑操作，可以進行更高層次的繞徑操作。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.sender
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-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: w5
  element definition.mapping.map:
    value: FiveWs.subject[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: PRT-5:PRT-4='WAYR' / PRT-8:PRT-4='WAYR'
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: Not directly supported. Could be shared using attentionLine.value with an appropriate keyWordText
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject

index: 27
element.id:
  value: MessageHeader.enterer
element definition.path:
  value: MessageHeader.enterer
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: MessageHeader.enterer
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  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.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: w5
  element definition.mapping.map:
    value: FiveWs.author
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: EVN-5 / ORC-10 / PRT-5:PRT-4='EP' / ROL where ROL.3 is EP or ORC.10
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/participation[typeCode="ENT" and isNormalParticipation]/role[classCode="ASSIGNED" and isNormalRole()]/player[isNormalEntity() and classCode=("DEV", "PSN") and determinerCode="INST"])

index: 28
element.id:
  value: MessageHeader.author
element definition.path:
  value: MessageHeader.author
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: MessageHeader.author
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  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.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: w5
  element definition.mapping.map:
    value: FiveWs.author
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: ORC-19 / PRT-5:PRT-4='AUT' / ROL where ROL.3 is IP or ORC.12
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/participation[isHighest(priorityCode) and typeCode="AUT" and isNormalParticipation]/role[classCode="ASSIGNED" and isNormalRole()]/player[isNormalEntity() and classCode=("DEV", "PSN") and determinerCode="INST"])

index: 29
element.id:
  value: MessageHeader.source
element definition.path:
  value: MessageHeader.source
element definition.short:
  value: 訊息來源應用程式
element definition.definition:
  value: 此訊息來源應用程式
element definition.requirements:
  value: 允許回應，支援稽核。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.source
  element definition.base.min:
    value: 1
  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.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.actor
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./communicationFunction[typeCode="SND"])

index: 30
element.id:
  value: MessageHeader.source.id
element definition.path:
  value: MessageHeader.source.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: 31
element.id:
  value: MessageHeader.source.extension
element definition.path:
  value: MessageHeader.source.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: 32
element.id:
  value: MessageHeader.source.modifierExtension
element definition.path:
  value: MessageHeader.source.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: 33
element.id:
  value: MessageHeader.source.name
element definition.path:
  value: MessageHeader.source.name
element definition.short:
  value: 系統的名稱
element definition.definition:
  value: 系統的名稱
element definition.requirements:
  value: 可用於支援稽核
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.source.name
  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: MSH-3
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./entity[determinerCode="INST" and classCode="DEV"]/name[type='ST' and isNormalDatatype()])

index: 34
element.id:
  value: MessageHeader.source.software
element definition.path:
  value: MessageHeader.source.software
element definition.short:
  value: 運行系統的軟體名稱
element definition.definition:
  value: 可能包含設定或其他對於除錯有用的資訊
element definition.requirements:
  value: 支援稽核功能，也可能涉及到介面引擎（Interface Engine）的操作。介面引擎是一種軟體工具或平台，用於在不同的資訊系統、應用程式或資料庫之間傳輸和轉換資料。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.source.software
  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: SFT-3 ( +SFT-1)
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./entity[determinerCode="INST" and classCode="DEV"]/softwareName[isNormalDatatype()])

index: 35
element.id:
  value: MessageHeader.source.version
element definition.path:
  value: MessageHeader.source.version
element definition.short:
  value: 軟體運行的版本
element definition.definition:
  value: 可以在訊息經過多方處理的情況下，傳達多個系統的版本資訊。
element definition.requirements:
  value: 支援稽核功能，也可能涉及到介面引擎（Interface Engine）的操作。介面引擎是一種軟體工具或平台，用於在不同的資訊系統、應用程式或資料庫之間傳輸和轉換資料。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.source.version
  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: SFT-2
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: (Not supported)

index: 36
element.id:
  value: MessageHeader.source.contact
element definition.path:
  value: MessageHeader.source.contact
element definition.short:
  value: 提供人工聯絡途徑以處理問題
element definition.definition:
  value: 提供電子郵件、電話、網站或其他聯絡方式，用以解決訊息溝通上的問題。
element definition.requirements:
  value: 允許對技術問題進行升級處理
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.source.contact
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: ContactPoint
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: (MSH-22?)
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./entity[determinerCode="INST" and classCode="DEV"]/scopesRole[normalRole() and classCode="CON" and layer[classCode="PSN"]/telecom[isNormalDatatype()])

index: 37
element.id:
  value: MessageHeader.source.endpoint
element definition.path:
  value: MessageHeader.source.endpoint
element definition.short:
  value: 實際訊息來源地址或ID
element definition.definition:
  value: 要把確認訊息發給哪個地方？
element definition.comment:
  value: 這個 id 可能是一個無法在不使用標準基於網路地址的系統中解析的 URI
element definition.requirements:
  value: 指明回應訊息應該發送到的地方，這個指定可能會對系統的安全權限產生影響。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.source.endpoint
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: url
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: MSH-24
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./telecom[isNormalDatatype()]

index: 38
element.id:
  value: MessageHeader.responsible
element definition.path:
  value: MessageHeader.responsible
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: MessageHeader.responsible
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  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://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    index: 2
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-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.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.witness
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: ORC-12 / PRT-5:PRT-4='OP' / PRT-8:PRT-4='OP' / ROL where ROL.3 is RO or ORC.11
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/participation[isHighest(priorityCode) and typeCode="RESP" and isNormalParticipation]/role[classCode="ASSIGNED" and isNormalRole()]/player[isNormalEntity() and classCode="PSN" and determinerCode="INST"] or ./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/participation[isHighest(priorityCode) and typeCode="RESP" and isNormalParticipation]/role[classCode="ASSIGNED" and isNormalRole()]/scoper[isNormalEntity() and classCode="ORG" and determinerCode="INST"])

index: 39
element.id:
  value: MessageHeader.reason
element definition.path:
  value: MessageHeader.reason
element definition.short:
  value: 事件的原因
element definition.definition:
  value: 這是對事件原因的編碼指示，表示了此訊息關注（focus）事件發生的原因。
element definition.requirements:
  value: 需要能夠追蹤為何resource被更改，並在resource的稽核日誌/歷史記錄中報告，但這可能會影響授權。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.reason
  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: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: EventReason
  element definition.binding.strength:
    value: example
  element definition.binding.description:
    value: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/message-reason-encounter
    link: http://hl7.org/fhir/ValueSet/message-reason-encounter
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.why[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: EVN.4 / ORC.16 / OBR-31-reason for study / BPO-13-BP indication for use / RXO-20-indication / RXE-27-give indication / RXD-21-indication / RXG-22-indication / RXA-19-indication
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: unique(./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/reasonCode[isNormalDatatype()])

index: 40
element.id:
  value: MessageHeader.response
element definition.path:
  value: MessageHeader.response
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: MessageHeader.response
  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.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: MSA
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./conveyedAcknowledgement

index: 41
element.id:
  value: MessageHeader.response.id
element definition.path:
  value: MessageHeader.response.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: 42
element.id:
  value: MessageHeader.response.extension
element definition.path:
  value: MessageHeader.response.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: 43
element.id:
  value: MessageHeader.response.modifierExtension
element definition.path:
  value: MessageHeader.response.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: 44
element.id:
  value: MessageHeader.response.identifier
element definition.path:
  value: MessageHeader.response.identifier
element definition.short:
  value: 原始訊息的Id
element definition.definition:
  value: 此訊息所回應的原始訊息的MessageHeader.id
element definition.requirements:
  value: 讓接收者知道正在回應哪個訊息
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.response.identifier
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: id
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: MSA-2
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./acknowledges.id[isNormalDatatype()]

index: 45
element.id:
  value: MessageHeader.response.code
element definition.path:
  value: MessageHeader.response.code
element definition.short:
  value: ok | transient-error | fatal-error
element definition.definition:
  value: 指明訊息回應類型的代碼 - 表示它是否成功，是否應該重新發送。
element definition.comment:
  value: 這是對請求訊息的一般性回應。回應的具體資料將在MessageHeader.focus中找到。
element definition.requirements:
  value: 允許確認訊息的發送者知道請求是否成功，或是否需要採取行動。
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.response.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: ResponseType
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 訊息回應類型；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/response-code|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: MSA-1
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: ./typeCode[isNormalDatatype()]

index: 46
element.id:
  value: MessageHeader.response.details
element definition.path:
  value: MessageHeader.response.details
element definition.short:
  value: 特定的提示/警告/錯誤清單
element definition.definition:
  value: 訊息中發現的任何問題細節
element definition.comment:
  value: 這些問題 **必須（SHALL）** 被包含在 bundle 中。如果其中有任何錯誤，則回應代碼 **必須（SHALL）** 是錯誤。
element definition.requirements:
  value: 允許訊息的發送者確定具體的問題是什麼
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.response.details
  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: http://hl7.org/fhir/StructureDefinition/OperationOutcome
    index: 0
    link: http://hl7.org/fhir/StructureDefinition/OperationOutcome
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: ERR
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: AcknowledgementDetail or Observation[classCode="ALRT" and moodCode="EVN"]

index: 47
element.id:
  value: MessageHeader.focus
element definition.path:
  value: MessageHeader.focus
element definition.short:
  value: 訊息的實際內容
element definition.definition:
  value: 訊息的實際資料 - 這是指向事件的root/focus class的參照。
element definition.comment:
  value: 每個訊息事件都涉及實際資料，即在事件定義中識別的單個 resource，可能還包括一些或所有關聯 resources。
element definition.requirements:
  value: 每個訊息事件都牽涉到實際的資料，就是在定義異動/交易類型時標識的單一 resource，有時還可能包括一些或全部相關聯的 resources。這些資料是在定義異動/交易類型時所定義的，異動/交易資料始終包含在完整訊息的 Bundle 中。這裡僅指定了root resource，它所參照的其他 resources 應該包含在 Bundle 中但並未在這裡列出。允許多次重複以處理具有多個焦點（focus）目標的合併和其他情況。
element definition.min:
  value: 1
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: MessageHeader.focus
  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://tb.cdc.gov.tw/tb/StructureDefinition/MedicationRequest-tb-drug
    index: 0
    link: https://tb.cdc.gov.tw/tb/StructureDefinition/MedicationRequest-tb-drug
  element definition.type.target profile:
    value: https://tb.cdc.gov.tw/tb/StructureDefinition/Specimen-tb-drug
    index: 1
    link: https://tb.cdc.gov.tw/tb/StructureDefinition/Specimen-tb-drug
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: unique(./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/participation[typeCode="SUBJ" and isNormalParticipation]/role or ./controlAct[classCode="CACT" and classCode="EVN" and isNormalAct()]/outboundRelationship[typeCode="SBJ" and isNormalActRelatoinship]/target)

index: 48
element.id:
  value: MessageHeader.definition
element definition.path:
  value: MessageHeader.definition
element definition.short:
  value: 這個訊息的定義連結
element definition.definition:
  value: 此訊息的 MessageDefinition 的永久連結
element definition.requirements:
  value: 允許發送者定義訊息的預期內容
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: MessageHeader.definition
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: canonical
  element definition.type.target profile:
    value: http://hl7.org/fhir/StructureDefinition/MessageDefinition
    index: 0
    link: http://hl7.org/fhir/StructureDefinition/MessageDefinition
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: Not directly supported.

structure definition.differential.element:
  index: 0
  element.id:
    value: MessageHeader.id
  element definition.path:
    value: MessageHeader.id
  element definition.short:
    value: 流水號，系統自動增加
structure definition.differential.element:
  index: 1
  element.id:
    value: MessageHeader.event[x]
  element definition.path:
    value: MessageHeader.event[x]
  element definition.slicing:
    element definition.slicing.discriminator:
      index: 0
      element definition.slicing.discriminator.type:
        value: type
      element definition.slicing.discriminator.path:
        value: $this
    element definition.slicing.ordered:
      value: false
    element definition.slicing.rules:
      value: open
structure definition.differential.element:
  index: 2
  element.id:
    value: MessageHeader.event[x]:eventCoding
  element definition.path:
    value: MessageHeader.event[x]
  element definition.slice name:
    value: eventCoding
  element definition.min:
    value: 0
  element definition.max:
    value: 1
  element definition.type:
    index: 0
    element definition.type.code:
      value: Coding
structure definition.differential.element:
  index: 3
  element.id:
    value: MessageHeader.event[x]:eventCoding.system
  element definition.path:
    value: MessageHeader.event[x].system
  element definition.pattern uri:
    value: https://tb.cdc.gov.tw/tb/CodeSystem/cdc-message-event
structure definition.differential.element:
  index: 4
  element.id:
    value: MessageHeader.event[x]:eventCoding.code
  element definition.path:
    value: MessageHeader.event[x].code
  element definition.pattern code:
    value: drug
structure definition.differential.element:
  index: 5
  element.id:
    value: MessageHeader.sender
  element definition.path:
    value: MessageHeader.sender
  element definition.short:
    value: 醫院十碼章
  element definition.min:
    value: 1
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
      index: 0
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
structure definition.differential.element:
  index: 6
  element.id:
    value: MessageHeader.focus
  element definition.path:
    value: MessageHeader.focus
  element definition.min:
    value: 1
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://tb.cdc.gov.tw/tb/StructureDefinition/MedicationRequest-tb-drug
      index: 0
      link: https://tb.cdc.gov.tw/tb/StructureDefinition/MedicationRequest-tb-drug
    element definition.type.target profile:
      value: https://tb.cdc.gov.tw/tb/StructureDefinition/Specimen-tb-drug
      index: 1
      link: https://tb.cdc.gov.tw/tb/StructureDefinition/Specimen-tb-drug