Composition-EMPD
type: StructureDefinition
node role: treeRoot
id:
  v: Composition-EMPD
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition Composition-EMPD Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Composition TWCoreComposition #xD; subject 1..1 Reference(Group | Device | Substance | TW Core Location | 電子處方箋-病人基本資料) Composition是關於誰和/或什麼 #xD; reference S 0..1 string Literal reference, Relative, internal or absolute URL #xD; encounter S 1..1 Reference(電子處方箋-門診基本資料) Composition的情境 #xD; reference S 0..1 string Literal reference, Relative, internal or absolute URL #xD; date 1..1 dateTime Composition的編輯時間。[處方箋有效日期]。日期格式為西元 YYYYMMDD #xD; author 1..* Reference(電子處方箋-醫事人員基本資料 | 電子處方箋-病人基本資料 | 電子處方箋-醫事機構基本資料) 誰和/或什麼創建了這個Composition #xD; reference S 0..1 string Literal reference, Relative, internal or absolute URL #xD; custodian 1..1 Reference(電子處方箋-醫事機構基本資料) 維護Composition的機構 #xD; reference S 0..1 string Literal reference, Relative, internal or absolute URL #xD; Slices for section 3..* BackboneElement Composition被分成一個或數個小節 Slice: Unordered, Open by value:code.coding.code #xD; section:Coverage 1..1 BackboneElement 就醫身分別 #xD; code 1..1 CodeableConceptTW 小節分類(建議) #xD; coding 1..* CodingTW 由專門術語系統（terminology system）定義的代碼 #xD; system 1..1 uri 專門術語系統（terminology system）的識別 Fixed Value: http://loinc.org #xD; code 1..1 code 系統定義的語法之符號 Fixed Value: 29762-2 #xD; display 0..1 string 由系統定義的表示法 Fixed Value: Social history Narrative #xD; entry 1..* Reference(電子處方箋/調劑單張-就醫身分別) 提供一個連結用於參照或查看支持此小節內容的資料 #xD; reference 1..1 string Literal reference, Relative, internal or absolute URL #xD; section:ObservationBodyWeight 0..1 BackboneElement 體重。若調劑藥物劑量須配合體重而有所調整，此欄位為必填。 #xD; code 1..1 CodeableConceptTW 小節分類(建議) #xD; coding 1..* CodingTW 由專門術語系統（terminology system）定義的代碼 #xD; system 1..1 uri 專門術語系統（terminology system）的識別 Fixed Value: http://loinc.org #xD; code 1..1 code 系統定義的語法之符號 Fixed Value: 85353-1 #xD; display 0..1 string 由系統定義的表示法 Fixed Value: Vital signs, weight, height, head circumference, oxygen saturation and BMI pa…
url:
  v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Composition-EMPD
version:
  v: 0.2.0
name:
  v: CompositionEMPD
title:
  v: 電子處方箋-Composition
status:
  v: active
date:
  v: 2023-10-30
publisher:
  v: NHI
contact:
  name:
    v: NHI
  telecom:
    system:
      v: url
    value:
      v: https://www.nhi.gov.tw/en/mp-2.html
description:
  v: 用於表示電子處方箋資料集之文檔
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: workflow
  uri:
    v: http://hl7.org/fhir/workflow
  name:
    v: Workflow Pattern
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: cda
  uri:
    v: http://hl7.org/v3/cda
  name:
    v: CDA (R2)
mapping:
  identity:
    v: fhirdocumentreference
  uri:
    v: http://hl7.org/fhir/documentreference
  name:
    v: FHIR DocumentReference
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
  name:
    v: FiveWs Pattern Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Composition
base definition:
  v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Composition-twcore
  link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Composition-twcore
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 1.0.0
  element:
    id:
      v: Composition
    path:
      v: Composition
    short:
      v: 將一組resources組成一份連貫的臨床聲明，並附有臨床證明。
    definition:
      v: 一組與健康照護相關的資訊，這些訊息被組合成一個單一的邏輯套件，提供一個單一的連貫的意義陳述，建立自己的上下文，並且提供有關於是誰做出陳述的臨床認證。
    comment:
      v: 雖然此規範的重點在於特定於病人的臨床聲明，但此resource也可適用於其他與健康照護相關的聲明，如研究方案設計、醫療發票和其他不必然與特定於病人或臨床相關的活動。
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Composition
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: 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
      expression:
        v: 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()
      xpath:
        v: 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='#'])]))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-5
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a security label
      expression:
        v: contained.meta.security.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:security))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      extension:
        value: boolean
      extension:
        value: markdown
      key:
        v: dom-6
      severity:
        v: warning
      human:
        v: A resource should have narrative for robust management
      expression:
        v: text.`div`.exists()
      xpath:
        v: exists(f:text/h:div)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    is modifier:
      v: false
    is summary:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: Entity. Role, or Act
    mapping:
      identity:
        v: workflow
      map:
        v: Event
    mapping:
      identity:
        v: rim
      map:
        v: Document[classCode="DOC" and moodCode="EVN" and isNormalAct()]

boolean
v: true

markdown
v: 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.

identity:
  v: cda
map:
  v: ClinicalDocument

identity:
  v: fhirdocumentreference
map:
  v: when described by DocumentReference

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

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

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

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

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

id:
  v: Composition.contained
path:
  v: Composition.contained
short:
  v: 內嵌的(contained)、行內的Resources
definition:
  v: 這些resource內嵌(contains)的resource不會另外存於任何FHIR伺服器，意即它們無法在任何FHIR伺服器中被找到，也無法有自己獨立的資料異動／交易(transaction)範圍。
comment:
  v: 內嵌(contained)的resource沒有敘述，非內嵌(contained)的resource則 **建議應該(SHOULD)** 有敘述。在某些情況下，resource可能只有文字表述，很少或沒有額外的離散資料(只要滿足所有minOccurs=1的資料項目)。這對於來自舊有系統的資料可能是必要的，在這些系統中，從 「文字表述區塊(text blob) 」獲取訊息，或者文字表述是額外的原始輸入或敘述，而編碼訊息是後來添加的。
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.extension
path:
  v: Composition.extension
short:
  v: 擴充的資料項目
definition:
  v: 可用於表示不屬於此資料項目基本定義的附加資訊。為了擴充的使用安全和可管理，對擴充的定義和使用有一套嚴格的管理。儘管任何實作者都可以定義一個擴充，但作為擴充定義的一部分，有一套要求 **必須（SHALL）** 滿足。
comment:
  v: 無論使用或定義擴充的機構或管轄區，任何應用程式、專案或標準使用擴充都不背負任何污名(stigma)。使用擴充是允許FHIR規範為每個人保留一個核心的簡易性。
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Composition.modifierExtension
path:
  v: Composition.modifierExtension
short:
  v: 此擴充的資料項目可能會完全修正或改變其他資料項目的意涵，需特別留意。
definition:
  v: 可以用來表示不屬於資料項目的基本定義的附加資訊，並且修改對它所內嵌(contained)的資料項目的理解和(或)對包含資料項目之後續使用的理解。通常，修飾用的資料項目提供否定或限定。為了使擴充的使用安全和可管理，對擴充的定義和使用有一套嚴格的管理。儘管任何實作者都可以定義一個擴充，但作為擴充定義的一部分，有一套要求 **必須（SHALL）** 滿足。處理resource的應用程式被要求檢查修飾用的擴充資料項目。 修飾用的擴充資料項目 **必須沒有(SHALL NOT)** 改變resource或DomainResource上任何資料項目的含義(包括不能改變modifierExtension本身的含義)。
comment:
  v: 無論使用或定義擴充的機構或管轄區，任何應用程式、專案或標準使用擴充都不背負任何污名(stigma)。使用擴充是允許FHIR規範為每個人保留一個核心的簡易性。
requirements:
  v: 修飾用的資料項目擴充將不能安全地忽略的擴充與絕大多數可以安全地忽略的擴充明確區分開來。透過消除禁止實作者擴充存在的需求來促進可互操作性。更多訊息，請參見[修飾用的資料項目擴充之定義](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)。
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: false

id:
  v: Composition.identifier
path:
  v: Composition.identifier
short:
  v: 不分版本的臨床文件架構(Composition)識別碼。
definition:
  v: 與版本無關的Composition識別碼。隨著時間的推移，該識別碼將保持不變。
comment:
  v: 類似於 CDA 中的 ClinicalDocument/setId。請參閱resource定義中的討論，了解它們之間的關係。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.identifier
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: Document.id / Document.setId
mapping:
  identity:
    v: cda
  map:
    v: .setId
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.masterIdentifier

id:
  v: Composition.status
path:
  v: Composition.status
short:
  v: registered | partial | preliminary | final | amended | corrected +
definition:
  v: 此composition的工作流程/臨床狀態。狀態是指文件的臨床狀態的標識。
comment:
  v: 如果一個composition被標記為撤回(withdraw)，那麼該系列中的composition/文件或者此composition或文件系列中的資料，若未被明確標記為(該撤回)不可信的情況下，則不應向用戶展示。「錯誤輸入 (entered-in-error)標籤是此composition為何被標記為修飾用資料項目(modifier)的原因。 某些報告工作流程要求最終文件的原始敘述永不更改；意即只能添加新的敘述。composition resource 沒有明確的狀態(status)來明確註明是否適用此業務規則。如有需要，這將透過擴充來處理。
requirements:
  v: 需要能夠標記為臨時(interim)、修改(amended)或撤回(withdrawn)的composition或文件。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: true
is modifier reason:
  v: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: CompositionStatus
  strength:
    v: required
  description:
    v: Composition的工作流程/臨床狀態；應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/composition-status|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: workflow
  map:
    v: Event.status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: rim
  map:
    v: interim: .completionCode="IN" & ./statusCode[isNormalDatatype()]="active"; final: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and not(./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseComposition", code) and isNormalAct()]); amended: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and ./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseComposition", code) and isNormalAct() and statusCode="completed"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]="obsolete"
mapping:
  identity:
    v: cda
  map:
    v: n/a
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.status

id:
  v: Composition.type
path:
  v: Composition.type
short:
  v: Composition的種類（如果可能請使用LOINC）
definition:
  v: 指定特定類型的composition（如病史和體檢、出院摘要、病程紀錄）。這通常等同於製作composition的目的。
comment:
  v: For Composition type, LOINC is ubiquitous and strongly endorsed by HL7. Most implementation guides will require a specific LOINC code, or use LOINC as an extensible binding.
requirements:
  v: 描述composition的關鍵metadata資料項目，用於查詢/篩選。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.type
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-type-doc-code
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-type-doc-code
mapping:
  identity:
    v: workflow
  map:
    v: Event.code
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: cda
  map:
    v: .code
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.type

id:
  v: Composition.category
path:
  v: Composition.category
short:
  v: Composition的分類
definition:
  v: composition類型的分類 - 有助於索引和查詢。這可能是由 Composition Type 中指定的代碼隱含或衍生出來的。
comment:
  v: "這是來自XDS/MHD的metadata欄位"。
requirements:
  v: 幫助人類在檢視composition或規範文件時評估composition是否感興趣。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.category
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-document-classcodes
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-document-classcodes
mapping:
  identity:
    v: workflow
  map:
    v: Event.subject
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code
mapping:
  identity:
    v: cda
  map:
    v: n/a
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumenttReference.category

id:
  v: Composition.subject
path:
  v: Composition.subject
short:
  v: Composition是關於誰和/或什麼
definition:
  v: composition是關於誰或什麼的。composition可以是關於一個人（病人或醫護人員）、一個設備（如機器），甚至是一群對象（如關於一群牲畜的文件，或一群有共同曝露的病人）。
comment:
  v: 對於臨床文件來說，這通常是指病人。
requirements:
  v: 查詢composition的基本metadata，指明compoisition/文件的作者和/或內容。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.subject
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    link: http://hl7.org/fhir/StructureDefinition/Group
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Substance
    link: http://hl7.org/fhir/StructureDefinition/Substance
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Location-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Location-twcore
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Patient-EMPD
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Patient-EMPD
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="SBJ"].role[typeCode="PAT"]
mapping:
  identity:
    v: cda
  map:
    v: .recordTarget
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.subject
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject

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

id:
  v: Composition.subject.extension
path:
  v: Composition.subject.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.subject.reference
path:
  v: Composition.subject.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: ref-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.subject.type
path:
  v: Composition.subject.type
short:
  v: Type the reference refers to (e.g. "Patient")
definition:
  v: The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).
comment:
  v: This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: FHIRResourceTypeExt
  strength:
    v: extensible
  description:
    v: Aa resource (or, for logical models, the URI of the logical model).
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.subject.identifier
path:
  v: Composition.subject.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it. Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: Composition.subject.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.subject.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.encounter
path:
  v: Composition.encounter
short:
  v: Composition的情境
definition:
  v: 描述與該文件相關的臨床就醫事件或照護類型。
requirements:
  v: 為composition提供情境並支持查詢。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.encounter
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Encounter-EMPD
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Encounter-EMPD
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.context
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: rim
  map:
    v: unique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()], priorityNumber)/target[moodCode="EVN" and classCode=("ENC", "PCPR") and isNormalAct])
mapping:
  identity:
    v: cda
  map:
    v: .componentOf.encompassingEncounter
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.context.encounter

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

id:
  v: Composition.encounter.extension
path:
  v: Composition.encounter.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.encounter.reference
path:
  v: Composition.encounter.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: ref-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.encounter.type
path:
  v: Composition.encounter.type
short:
  v: Type the reference refers to (e.g. "Patient")
definition:
  v: The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).
comment:
  v: This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: FHIRResourceTypeExt
  strength:
    v: extensible
  description:
    v: Aa resource (or, for logical models, the URI of the logical model).
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.encounter.identifier
path:
  v: Composition.encounter.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it. Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: Composition.encounter.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.encounter.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.date
path:
  v: Composition.date
short:
  v: Composition的編輯時間。[處方箋有效日期]。日期格式為西元 YYYYMMDD
definition:
  v: 包含第二次之後的建議領藥日期。
comment:
  v: composition上的最後修改日期可能在文件被證明日期之後而未更改。這意味著修改過的文件上的日期是修改日期，而非原始撰寫之日期。
requirements:
  v: dateTime 用於追蹤、組織版本和查詢。請注意：這是創作此版本Composition的時間。打包成文檔時，Bundle.timestamp 是打包日期。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.date
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.occurrence[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.done[x]
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime[type="TS"]
mapping:
  identity:
    v: cda
  map:
    v: .effectiveTime
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.content.attachment.date, DocumentReference.created

id:
  v: Composition.author
path:
  v: Composition.author
short:
  v: 誰和/或什麼創建了這個Composition
definition:
  v: 指明誰對composition中的資訊負責，而不一定是誰輸入了它。
requirements:
  v: 指明誰對內容負責
min:
  v: 1
max:
  v: *
base:
  path:
    v: Composition.author
  min:
    v: 1
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Practitioner-EMPD
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Practitioner-EMPD
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Patient-EMPD
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Patient-EMPD
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Organization-EMPD
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Organization-EMPD
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.author
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
mapping:
  identity:
    v: cda
  map:
    v: .author.assignedAuthor
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.agent

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

id:
  v: Composition.author.extension
path:
  v: Composition.author.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.author.reference
path:
  v: Composition.author.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: ref-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.author.type
path:
  v: Composition.author.type
short:
  v: Type the reference refers to (e.g. "Patient")
definition:
  v: The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).
comment:
  v: This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: FHIRResourceTypeExt
  strength:
    v: extensible
  description:
    v: Aa resource (or, for logical models, the URI of the logical model).
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.author.identifier
path:
  v: Composition.author.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it. Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: Composition.author.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.author.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.title
path:
  v: Composition.title
short:
  v: 人類可讀的名稱/標題
definition:
  v: composition的正式可讀標籤
comment:
  v: 對於許多composition來說，標題與文本或 Composition.type 的顯示名稱相同（如 「會診﹙consultation﹚」或 「病程紀錄﹙progress note﹚」）。請注意：CDA 並不強制要求標題，但目前還沒有發現省略標題有用的情況，因此在此強制要求標題。歡迎在試用區間對這一要求提出反饋意見。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.title
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: ./title
mapping:
  identity:
    v: cda
  map:
    v: .title
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.description, DocumentReference.content.attachment.title

id:
  v: Composition.confidentiality
path:
  v: Composition.confidentiality
short:
  v: 根據特定技術領域的定義
definition:
  v: 具體說明Composition保密等級的代碼
comment:
  v: 此資料項目的確切使用，以及與高度敏感文件相關的執行和問題超出了基本規範的範圍，並委託給實作Profiles（見安全小節）。 此資料項目被標記為修飾用，因為高度機密的文件不能被當作非機密文件處理。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.confidentiality
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: DocumentConfidentiality
  strength:
    v: required
  description:
    v: 應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification|2014-03-26
    link: 2014
    link: -03
    link: -26
mapping:
  identity:
    v: rim
  map:
    v: .confidentialityCode
mapping:
  identity:
    v: cda
  map:
    v: .confidentialityCode
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.securityLabel

id:
  v: Composition.attester
path:
  v: Composition.attester
short:
  v: 證明Composition的準確性
definition:
  v: 證明composition/文件準確無誤的參與者
comment:
  v: 每位參與者只需每位證明者只列一次
requirements:
  v: 指明對composition內容準確性的責任
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.attester
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
mapping:
  identity:
    v: cda
  map:
    v: .authenticator/.legalAuthenticator
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.authenticator

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

id:
  v: Composition.attester.extension
path:
  v: Composition.attester.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.attester.modifierExtension
path:
  v: Composition.attester.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.attester.mode
path:
  v: Composition.attester.mode
short:
  v: personal | professional | legal | official
definition:
  v: 認證者提供的認證類型
requirements:
  v: 指明認證的權威程度
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.attester.mode
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: CompositionAttestationMode
  strength:
    v: required
  description:
    v: 認證者提供的認證類型；應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/composition-attestation-mode|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: unique(./modeCode)
mapping:
  identity:
    v: cda
  map:
    v: implied by .authenticator/.legalAuthenticator

id:
  v: Composition.attester.time
path:
  v: Composition.attester.time
short:
  v: 此Composition被證明的時間
definition:
  v: 當composition被該方證實的時間
requirements:
  v: 指明composition中的資訊何時被認為是準確的。（自那時起可能發生了變化）。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.attester.time
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: dateTime
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./time[type="TS" and isNormalDatatype()]
mapping:
  identity:
    v: cda
  map:
    v: .authenticator.time

id:
  v: Composition.attester.party
path:
  v: Composition.attester.party
short:
  v: 誰證明了此Composition
definition:
  v: 誰以指定的方式證明了此composition
requirements:
  v: 指明由誰承擔composition內容準確性的責任
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.attester.party
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.witness
mapping:
  identity:
    v: rim
  map:
    v: ./role[classCode="ASSIGNED" and isNormalRole]/player[determinerCode="INST" and classCode=("DEV", "PSN") and isNormalEntity()] or ./role[classCode="ASSIGNED" and isNormalRole and not(player)]/scoper[determinerCode="INST" and classCode="ORG" and isNormalEntity()]
mapping:
  identity:
    v: cda
  map:
    v: .authenticator.assignedEnttty

id:
  v: Composition.custodian
path:
  v: Composition.custodian
short:
  v: 維護Composition的機構
definition:
  v: 指明負責持續維護和存取composition/文件資訊的機構或團體
comment:
  v: 當此文件是衍生自composition時非常有用。它提供了如何獲取文件的最新版本的指導。這是可選項，因為有時編寫系統並不知道可以根據情境推斷。不過，在處理派生文件時，了解這一資訊非常重要，因此鼓勵提供一個保管者。
requirements:
  v: 指明在哪裡可以找到當前版本、在哪裡可以報告問題等
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.custodian
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Organization-EMPD
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Organization-EMPD
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"]
mapping:
  identity:
    v: cda
  map:
    v: .custodian.assignedCustodian
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.custodian

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

id:
  v: Composition.custodian.extension
path:
  v: Composition.custodian.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.custodian.reference
path:
  v: Composition.custodian.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: ref-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.custodian.type
path:
  v: Composition.custodian.type
short:
  v: Type the reference refers to (e.g. "Patient")
definition:
  v: The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).
comment:
  v: This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: FHIRResourceTypeExt
  strength:
    v: extensible
  description:
    v: Aa resource (or, for logical models, the URI of the logical model).
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.custodian.identifier
path:
  v: Composition.custodian.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it. Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: Composition.custodian.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.custodian.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.relatesTo
path:
  v: Composition.relatesTo
short:
  v: 與其他Composition/文件之間的關係
definition:
  v: 此composition與其他已有的composition或文件之間的關係
comment:
  v: 要參照（使用 relatesTo）「document」type的 Bundle 或其他只有識別碼的 Composition，請使用帶有識別碼的 resourceReference。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.relatesTo
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship
mapping:
  identity:
    v: cda
  map:
    v: .relatedDocument
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.relatesTo

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

id:
  v: Composition.relatesTo.extension
path:
  v: Composition.relatesTo.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.relatesTo.modifierExtension
path:
  v: Composition.relatesTo.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

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

id:
  v: Composition.relatesTo.target[x]
path:
  v: Composition.relatesTo.target[x]
short:
  v: 此關係的目標文件
definition:
  v: 此關係的目標composition/文件
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.relatesTo.target[x]
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Identifier
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Composition|4.0.1
    link: 4.0
    link: .1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .target[classCode="DOC", moodCode="EVN"].id
mapping:
  identity:
    v: cda
  map:
    v: .relatedDocument.id
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.relatesTo.target

id:
  v: Composition.event
path:
  v: Composition.event
short:
  v: 正在記錄的臨床服務
definition:
  v: 記錄的臨床服務，例如：結腸鏡檢查或闌尾切除術。
comment:
  v: 事件需要與類型資料項目保持一致，但如果需求，也可以提供更多的詳細資訊。
requirements:
  v: 為composition提供情境背景，並在描述事件的resource和為描述事件而創建的composition之間建立連結。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.event
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: outboundRelationship[typeCode="SUBJ"].target[classCode<'ACT']
mapping:
  identity:
    v: cda
  map:
    v: .documentationOf.serviceEvent
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.event

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

id:
  v: Composition.event.extension
path:
  v: Composition.event.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.event.modifierExtension
path:
  v: Composition.event.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.event.code
path:
  v: Composition.event.code
short:
  v: 此代碼表代表了正在被記錄的主要臨床行為
definition:
  v: 一個概念可能透過正式參照專門術語或本體論來定義，或者可以由文字提供。
comment:
  v: 一個事件可以進一步專門化 typeCode 中固有的行為，例如：當它僅僅是「處置報告」，而該處置是「結腸鏡檢查」。如果包含一個或多個事件，它們 **必須沒有(SHALL NOT)** 與 classCode、practiceSettingCode 或 typeCode 中固有的值相衝突，因為這樣的衝突會造成模糊不清的情況。這個簡短的代碼清單提供用作某些類型查詢的關鍵字。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.event.code
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: DocumentEventType
  strength:
    v: example
  description:
    v: 可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActCode|3.0.0
    link: 3.0
    link: .0
mapping:
  identity:
    v: rim
  map:
    v: .code
mapping:
  identity:
    v: cda
  map:
    v: .code
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.event.code

id:
  v: Composition.event.period
path:
  v: Composition.event.period
short:
  v: 文件所涵蓋的時間區間
definition:
  v: 此文件涵蓋的時間區間，這並不是聲明此文件是這一個時間區間的完整代表，而只是表明它記錄了這段時間內發生的事件。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.event.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime
mapping:
  identity:
    v: cda
  map:
    v: .effectiveTime
mapping:
  identity:
    v: fhirdocumentreference
  map:
    v: DocumentReference.event.period

id:
  v: Composition.event.detail
path:
  v: Composition.event.detail
short:
  v: 在描述被記錄下來的事件，這些事件可以是以代碼的形式、參考資料的形式，或者兩者都有的形式來呈現。
definition:
  v: 它描述了正在被記錄的主要臨床活動，比如說進行一次結腸鏡檢查或是闌尾切除手術。在某些情況下，這些臨床事件本身就包含在其typeCode中，例如：在「病史與體檢報告」中，所記錄的過程就必然是進行「病史與體檢」的行為。這些臨床事件可以以代碼的形式被記錄，或者作為對其他resource的參照。
comment:
  v: 事件可以進一步細化類型編碼中的固有行為，例如，事件只是程序報告，而程序是結腸鏡檢查。如果包含一個或多個事件，它們不得與類別編碼、診療設置編碼或類型代碼中固有的值相衝 突，因為這樣的衝突會造成模稜兩可的情況。本編碼簡表可用作某些類型查詢的關鍵詞。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.event.detail
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    link: 4.0
    link: .1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode="SUBJ"].target
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section
path:
  v: Composition.section
slicing:
  discriminator:
    type:
      v: value
    path:
      v: code.coding.code
  rules:
    v: open
short:
  v: Composition被分成一個或數個小節
definition:
  v: 構成composition的各小節
min:
  v: 3
max:
  v: *
base:
  path:
    v: Composition.section
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: cmp-1
  severity:
    v: error
  human:
    v: A section must contain at least one of text, entries, or sub-sections
  expression:
    v: text.exists() or entry.exists() or section.exists()
  xpath:
    v: exists(f:text) or exists(f:entry) or exists(f:section)
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: cmp-2
  severity:
    v: error
  human:
    v: A section can only have an emptyReason if it is empty
  expression:
    v: emptyReason.empty() or entry.empty()
  xpath:
    v: not(exists(f:emptyReason) and exists(f:entry))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.structuredBody.component.section

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

id:
  v: Composition.section.extension
path:
  v: Composition.section.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section.modifierExtension
path:
  v: Composition.section.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section.title
path:
  v: Composition.section.title
short:
  v: 小節標籤(例如：目錄ToC)
definition:
  v: 此特定小節的標籤。這將是文件呈現內容的一部分，通常用於建立目錄。
comment:
  v: 標題為人類讀者指明小節。標題必須與作為 section.content 參照目標的resource的敘述一致。通常章節 **建議應該(SHOULD)** 有標題，但在某些文件中，這可能是不必要的或不適當的。通常情況下，當一個小節有其自己足夠區分的標題的子小節，或只有單一小節的文件時，就會這樣。大多數IG會要求小節標題是必填的資料項目。
requirements:
  v: 不同類型的文件常常會有標準化的小節標題，這些標題為人們提供如何組織文件的指引。
alias:
  v: header
alias:
  v: label
alias:
  v: caption
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.title
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./title
mapping:
  identity:
    v: cda
  map:
    v: .title

id:
  v: Composition.section.code
path:
  v: Composition.section.code
short:
  v: 小節分類(建議)
definition:
  v: 一個用於指明小節中所含內容種類的代碼，這個代碼必須與小節的標題相一致。
comment:
  v: The code identifies the section for an automated processor of the document. This is particularly relevant when using profiles to control the structure of the document. If the section has content (instead of sub-sections), the section.code does not change the meaning or interpretation of the resource that is the content of the section in the comments for the section.code.
requirements:
  v: 提供給文件中主題的標籤是標準化的，並且可以被電腦程式識別和處理。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: cda
  map:
    v: .code

id:
  v: Composition.section.author
path:
  v: Composition.section.author
short:
  v: 誰和/或什麼人撰寫了該小節
definition:
  v: 指明誰對小節中的資訊負責，而不一定是誰輸入了它。
requirements:
  v: 指明誰對內容負責
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.author
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.author
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
mapping:
  identity:
    v: cda
  map:
    v: .author.assignedAuthor

id:
  v: Composition.section.focus
path:
  v: Composition.section.focus
short:
  v: 當小節與composition描述的對象無關時，此小節是關於誰/什麼。
definition:
  v: 當小節的實際焦點不是composition描述的對象，而是代表與對象相關的某事物或某人時，例如：（對於病人對象）配偶、父母、胎兒或捐贈者。如果沒有指定焦點，則假定焦點為父小節的焦點，或者對於Composition本身中的小節，為Composition的對象。具有焦點的小節只 **必須（SHALL）** 包含對象（病人、對象、焦點等）與小節焦點相匹配的resources，或者是沒有對象的resources（少數resources）。
comment:
  v: 通常，文件中的小節是關於該文件的描述對象，無論是病人、一群病人、位置、設備或其他。對於某些種類的文件，有些小節實際上包含有關的實體資料。典型的例子包括新生兒出院病摘中關於母親的小節，或者家族病史文件中關於每個家庭成員的小節，當然還有很多其他例子。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.focus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    link: 4.0
    link: .1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: cda
  map:
    v: .subject? (CDA did not differentiate between subject and focus)

id:
  v: Composition.section.text
path:
  v: Composition.section.text
short:
  v: 將文件中特定小節的內容簡化成容易理解的文字形式，便於人類閱讀和解釋。
definition:
  v: 一個供人閱讀的敘述，包含小節的核實內容，用以展現resource的內容供人類閱讀。這段敘述不需要涵蓋所有結構化的資料，但必須包含足夠的細節，確保僅透過閱讀這段敘述的人能夠在臨床上獲得安全且準確的資訊。
comment:
  v: 文件Profile可能會定義應在敘述中呈現哪些內容，以確保臨床安全。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
condition:
  v: cmp-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .text
mapping:
  identity:
    v: cda
  map:
    v: .text

id:
  v: Composition.section.mode
path:
  v: Composition.section.mode
short:
  v: 適用於此小節的處理模式
definition:
  v: 條目清單是如何準備的 - 它是一個適合持續維護的工作清單，還是代表從另一個來源截取的項目清單的快照，或者是一個準備好的清單，在該清單中，項目可能被標記為已添加、修改或刪除。
comment:
  v: 這個資料項目被標記為修飾用，是因為不應將變更清單(a change list)誤解為完整清單(a complete list)。
requirements:
  v: 小節有多種使用方式，因此必須清楚地了解如何安全地使用其中的條目。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionMode
  strength:
    v: required
  description:
    v: 應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-mode|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .outBoundRelationship[typeCode=COMP].target[classCode=OBS"].value
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section.orderedBy
path:
  v: Composition.section.orderedBy
short:
  v: 小節條目的順序
definition:
  v: 指定應用於小節條目的項目順序
comment:
  v: 應用程式 **建議應該(SHOULD)** 按照給定的順序來顯示有序清單，但也可以允許用戶按照他們自己的偏好進行重新排序。如果沒有明確指定順序，則該順序是不確定的，雖然清單可能仍有某種排列順序。
requirements:
  v: 這對於展示和呈現是重要的，清單可能會進行排序，以便將重要的資訊放在前面，或將相關的條目分組。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.orderedBy
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionEntryOrder
  strength:
    v: preferred
  description:
    v: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-order
    link: http://hl7.org/fhir/ValueSet/list-order
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP].sequenceNumber > 1
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section.entry
path:
  v: Composition.section.entry
short:
  v: 提供一個連結用於參照或查看支持此小節內容的資料
definition:
  v: 指向那些提供小節中敘述內容的實際resource的參照
comment:
  v: 如果清單中沒有條目，則 **建議應該(SHOULD)** 提供 emptyReason。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.entry
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    link: 4.0
    link: .1
condition:
  v: cmp-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP] or .participation[typeCode=SBJ]
mapping:
  identity:
    v: cda
  map:
    v: .entry

id:
  v: Composition.section.emptyReason
path:
  v: Composition.section.emptyReason
short:
  v: 為什麼此小節是空的原因
definition:
  v: 如果小節為空，則說明清單為空的原因。一個空的小節通常有一些文字說明空的原因。
comment:
  v: 當一個小節是空的，其空白的原因對於理解該小節非常重要。需要注意的是，這個代碼是用於當整個小節的內容都沒有被包括時，它並不適用於個別項目被省略的情形，若為個別項目被省略的情況，開發者可以考慮在該條目中添加文字說明或標記。
requirements:
  v: 允許捕捉像是「不存在」或「未詢問」這樣的情況，這對於大多數清單來說可能很重要。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.emptyReason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
condition:
  v: cmp-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionEmptyReason
  strength:
    v: preferred
  description:
    v: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-empty-reason
    link: http://hl7.org/fhir/ValueSet/list-empty-reason
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ,code<ListEmptyReason].value[type=CD]
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section.section
path:
  v: Composition.section.section
short:
  v: 嵌套的小節
definition:
  v: 此小節中嵌套的小節
comment:
  v: 嵌套小節主要是為了幫助讀者快速找到文件中的特定內容
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.section
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/StructureDefinition/Composition#Composition.section
condition:
  v: cmp-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.section

id:
  v: Composition.section:Coverage
path:
  v: Composition.section
slice name:
  v: Coverage
short:
  v: 就醫身分別
definition:
  v: 構成composition的各小節
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.section
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: cmp-1
  severity:
    v: error
  human:
    v: A section must contain at least one of text, entries, or sub-sections
  expression:
    v: text.exists() or entry.exists() or section.exists()
  xpath:
    v: exists(f:text) or exists(f:entry) or exists(f:section)
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: cmp-2
  severity:
    v: error
  human:
    v: A section can only have an emptyReason if it is empty
  expression:
    v: emptyReason.empty() or entry.empty()
  xpath:
    v: not(exists(f:emptyReason) and exists(f:entry))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.structuredBody.component.section

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

id:
  v: Composition.section:Coverage.extension
path:
  v: Composition.section.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:Coverage.modifierExtension
path:
  v: Composition.section.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:Coverage.title
path:
  v: Composition.section.title
short:
  v: 小節標籤(例如：目錄ToC)
definition:
  v: 此特定小節的標籤。這將是文件呈現內容的一部分，通常用於建立目錄。
comment:
  v: 標題為人類讀者指明小節。標題必須與作為 section.content 參照目標的resource的敘述一致。通常章節 **建議應該(SHOULD)** 有標題，但在某些文件中，這可能是不必要的或不適當的。通常情況下，當一個小節有其自己足夠區分的標題的子小節，或只有單一小節的文件時，就會這樣。大多數IG會要求小節標題是必填的資料項目。
requirements:
  v: 不同類型的文件常常會有標準化的小節標題，這些標題為人們提供如何組織文件的指引。
alias:
  v: header
alias:
  v: label
alias:
  v: caption
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.title
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./title
mapping:
  identity:
    v: cda
  map:
    v: .title

id:
  v: Composition.section:Coverage.code
path:
  v: Composition.section.code
short:
  v: 小節分類(建議)
definition:
  v: 一個用於指明小節中所含內容種類的代碼，這個代碼必須與小節的標題相一致。
comment:
  v: The code identifies the section for an automated processor of the document. This is particularly relevant when using profiles to control the structure of the document. If the section has content (instead of sub-sections), the section.code does not change the meaning or interpretation of the resource that is the content of the section in the comments for the section.code.
requirements:
  v: 提供給文件中主題的標籤是標準化的，並且可以被電腦程式識別和處理。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.section.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: cda
  map:
    v: .code

id:
  v: Composition.section:Coverage.code.id
path:
  v: Composition.section.code.id
representation:
  v: xmlAttr
short:
  v: 唯一可識別ID，以供資料項目間相互參照。
definition:
  v: resource中資料項目的唯一ID（用於內部參照）。這可以是任何不含空格的字串。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:Coverage.code.extension
path:
  v: Composition.section.code.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: 擴充的資料項目
definition:
  v: 擴充的資料項目
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Composition.section:Coverage.code.coding
path:
  v: Composition.section.code.coding
short:
  v: 由專門術語系統（terminology system）定義的代碼
definition:
  v: 由專門術語系統（terminology system）所定義之代碼的參照
comment:
  v: 代碼可以在列舉清單（enumerations）或代碼清單（code lists）中非常隨意地定義，直至有非常正式的定義，例如：SNOMED CT—更多資訊見HL7 v3核心原則（Core Principles ）。編碼的排序是未定義的因而 **必須沒有（SHALL NOT）** 被用來推斷意義。一般來說，最多只有一個編碼值（coding values）會被標記為UserSelected = true。
requirements:
  v: 允許代碼系統中的替代編碼，以及翻譯到其他編碼系統。
min:
  v: 1
max:
  v: *
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Coding-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Coding-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: Composition.section:Coverage.code.coding.id
path:
  v: Composition.section.code.coding.id
representation:
  v: xmlAttr
short:
  v: 唯一可識別ID，以供資料項目間相互參照。
definition:
  v: resource中資料項目的唯一ID（用於內部參照），這可以是任何不含空格的字串。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:Coverage.code.coding.extension
path:
  v: Composition.section.code.coding.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: 擴充的資料項目
definition:
  v: 可用於表示不屬於此資料項目基本定義的附加資訊。為了擴充的使用安全和可管理，對擴充的定義和使用有一套嚴格的管理。儘管任何實作者都可以定義一個擴充，但作為擴充定義的一部分，有一套要求 **必須（SHALL）** 滿足。
comment:
  v: 無論使用或定義擴充的機構或管轄區，任何應用程式、專案或標準使用擴充都不背負任何污名（stigma）。使用擴充是允許FHIR規範為每個人保留一個核心的簡易性。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Composition.section:Coverage.code.coding.system
path:
  v: Composition.section.code.coding.system
short:
  v: 專門術語系統（terminology system）的識別
definition:
  v: 定義代碼中符號意義的代碼系統識別
comment:
  v: URI可以是一個OID（urn:oid:...）或一個UUID（urn:uuid:...）；OID和UUID **必須（SHALL）** 參照HL7 OID註冊中心；否則，URI應該來自HL7的FHIR定義的特殊URI列表，或者它應該參照一些明確建立的系统定義。
requirements:
  v: 需要明確說明符號定義的來源
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Coding.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
fixed: uri
  v: http://loinc.org
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.3
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystem
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem

id:
  v: Composition.section:Coverage.code.coding.version
path:
  v: Composition.section.code.coding.version
short:
  v: 系統的版本—如果相關的話
definition:
  v: 選擇此代碼時使用的代碼系統版本；請注意，一個維護良好的代碼系統不需要版本報告，因為代碼的意義在不同系統版本中是一致的；然而，不能始終保證這點，當不能保證意義一致時， **必須（SHALL）** 將版本資訊也一併作交換。
comment:
  v: 如果專門術語沒有明確定義應該使用什麼字串來識別代碼系統的版本，建議使用版本正式發布的日期（用FHIR日期格式表示）作為版本日期。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.version
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.7
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystemVersion
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion

id:
  v: Composition.section:Coverage.code.coding.code
path:
  v: Composition.section.code.coding.code
short:
  v: 系統定義的語法之符號
definition:
  v: 系統定義的語法之符號；符號可能是一個預先定義的代碼，也可能是代碼系統定義的語法中的表達式（如後組合配對／後組合式）。
requirements:
  v: 需要參照系統中的一個特定代碼
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Coding.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
fixed: code
  v: 29762-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code

id:
  v: Composition.section:Coverage.code.coding.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.section.code.coding.display
short:
  v: 由系統定義的表示法
definition:
  v: 遵循系統的規則以呈現代碼含義的表示法
requirements:
  v: 需要能為不了解此系統的讀者呈現可讀的代碼含義
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
fixed: string
  v: Social history Narrative
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.2 - but note this is not well followed
mapping:
  identity:
    v: rim
  map:
    v: CV.displayName
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName

id:
  v: Composition.section:Coverage.code.coding.userSelected
path:
  v: Composition.section.code.coding.userSelected
short:
  v: 此編碼是否由使用者直接選擇？
definition:
  v: 表明此編碼是由使用者直接選擇，例如：從可用項目（代碼或顯示名稱）的清單中選擇。
comment:
  v: 在一系列備選方案中，直接選擇的代碼是新翻譯最合適的起點；關於「直接選擇」的確切意義，存在模糊不清之處，可能需要貿易夥伴的同意，以更完整澄清此資料項目的使用及其後果。
requirements:
  v: 已被確定為一個臨床安全準則—此確切的系統／代碼對(code pair)是被明確選擇的，而不是由系統根據一些規則或是程式語言處理判斷。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.userSelected
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: Sometimes implied by being first
mapping:
  identity:
    v: rim
  map:
    v: CD.codingRationale
mapping:
  identity:
    v: orim
  map:
    v: 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 ]

id:
  v: Composition.section:Coverage.code.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.section.code.text
short:
  v: 概念的文字表示法
definition:
  v: 輸入資料的使用者所見／所選／所說的人類可讀文字表述，和（或）其代表使用者的預期含義。
comment:
  v: 很多時候，此文字表述與其中一個代碼的顯示名稱相同。
requirements:
  v: 專門術語中的代碼並不總是能捕捉人類使用的細微差別的正確意義，或者根本就沒有合適的代碼；這些情況下，文字表述被用來捕捉來源的全部意義。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CodeableConcept.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.9. But note many systems use C*E.2 for this
mapping:
  identity:
    v: rim
  map:
    v: ./originalText[mediaType/code="text/plain"]/data
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

id:
  v: Composition.section:Coverage.author
path:
  v: Composition.section.author
short:
  v: 誰和/或什麼人撰寫了該小節
definition:
  v: 指明誰對小節中的資訊負責，而不一定是誰輸入了它。
requirements:
  v: 指明誰對內容負責
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.author
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.author
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
mapping:
  identity:
    v: cda
  map:
    v: .author.assignedAuthor

id:
  v: Composition.section:Coverage.focus
path:
  v: Composition.section.focus
short:
  v: 當小節與composition描述的對象無關時，此小節是關於誰/什麼。
definition:
  v: 當小節的實際焦點不是composition描述的對象，而是代表與對象相關的某事物或某人時，例如：（對於病人對象）配偶、父母、胎兒或捐贈者。如果沒有指定焦點，則假定焦點為父小節的焦點，或者對於Composition本身中的小節，為Composition的對象。具有焦點的小節只 **必須（SHALL）** 包含對象（病人、對象、焦點等）與小節焦點相匹配的resources，或者是沒有對象的resources（少數resources）。
comment:
  v: 通常，文件中的小節是關於該文件的描述對象，無論是病人、一群病人、位置、設備或其他。對於某些種類的文件，有些小節實際上包含有關的實體資料。典型的例子包括新生兒出院病摘中關於母親的小節，或者家族病史文件中關於每個家庭成員的小節，當然還有很多其他例子。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.focus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    link: 4.0
    link: .1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: cda
  map:
    v: .subject? (CDA did not differentiate between subject and focus)

id:
  v: Composition.section:Coverage.text
path:
  v: Composition.section.text
short:
  v: 將文件中特定小節的內容簡化成容易理解的文字形式，便於人類閱讀和解釋。
definition:
  v: 一個供人閱讀的敘述，包含小節的核實內容，用以展現resource的內容供人類閱讀。這段敘述不需要涵蓋所有結構化的資料，但必須包含足夠的細節，確保僅透過閱讀這段敘述的人能夠在臨床上獲得安全且準確的資訊。
comment:
  v: 文件Profile可能會定義應在敘述中呈現哪些內容，以確保臨床安全。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
condition:
  v: cmp-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .text
mapping:
  identity:
    v: cda
  map:
    v: .text

id:
  v: Composition.section:Coverage.mode
path:
  v: Composition.section.mode
short:
  v: 適用於此小節的處理模式
definition:
  v: 條目清單是如何準備的 - 它是一個適合持續維護的工作清單，還是代表從另一個來源截取的項目清單的快照，或者是一個準備好的清單，在該清單中，項目可能被標記為已添加、修改或刪除。
comment:
  v: 這個資料項目被標記為修飾用，是因為不應將變更清單(a change list)誤解為完整清單(a complete list)。
requirements:
  v: 小節有多種使用方式，因此必須清楚地了解如何安全地使用其中的條目。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionMode
  strength:
    v: required
  description:
    v: 應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-mode|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .outBoundRelationship[typeCode=COMP].target[classCode=OBS"].value
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section:Coverage.orderedBy
path:
  v: Composition.section.orderedBy
short:
  v: 小節條目的順序
definition:
  v: 指定應用於小節條目的項目順序
comment:
  v: 應用程式 **建議應該(SHOULD)** 按照給定的順序來顯示有序清單，但也可以允許用戶按照他們自己的偏好進行重新排序。如果沒有明確指定順序，則該順序是不確定的，雖然清單可能仍有某種排列順序。
requirements:
  v: 這對於展示和呈現是重要的，清單可能會進行排序，以便將重要的資訊放在前面，或將相關的條目分組。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.orderedBy
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionEntryOrder
  strength:
    v: preferred
  description:
    v: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-order
    link: http://hl7.org/fhir/ValueSet/list-order
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP].sequenceNumber > 1
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section:Coverage.entry
path:
  v: Composition.section.entry
short:
  v: 提供一個連結用於參照或查看支持此小節內容的資料
definition:
  v: 指向那些提供小節中敘述內容的實際resource的參照
comment:
  v: 如果清單中沒有條目，則 **建議應該(SHOULD)** 提供 emptyReason。
min:
  v: 1
max:
  v: *
base:
  path:
    v: Composition.section.entry
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Coverage-EMR
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Coverage-EMR
condition:
  v: cmp-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP] or .participation[typeCode=SBJ]
mapping:
  identity:
    v: cda
  map:
    v: .entry

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

id:
  v: Composition.section:Coverage.entry.extension
path:
  v: Composition.section.entry.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:Coverage.entry.reference
path:
  v: Composition.section.entry.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: ref-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:Coverage.entry.type
path:
  v: Composition.section.entry.type
short:
  v: Type the reference refers to (e.g. "Patient")
definition:
  v: The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).
comment:
  v: This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: FHIRResourceTypeExt
  strength:
    v: extensible
  description:
    v: Aa resource (or, for logical models, the URI of the logical model).
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:Coverage.entry.identifier
path:
  v: Composition.section.entry.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it. Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: Composition.section:Coverage.entry.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.section.entry.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:Coverage.emptyReason
path:
  v: Composition.section.emptyReason
short:
  v: 為什麼此小節是空的原因
definition:
  v: 如果小節為空，則說明清單為空的原因。一個空的小節通常有一些文字說明空的原因。
comment:
  v: 當一個小節是空的，其空白的原因對於理解該小節非常重要。需要注意的是，這個代碼是用於當整個小節的內容都沒有被包括時，它並不適用於個別項目被省略的情形，若為個別項目被省略的情況，開發者可以考慮在該條目中添加文字說明或標記。
requirements:
  v: 允許捕捉像是「不存在」或「未詢問」這樣的情況，這對於大多數清單來說可能很重要。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.emptyReason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
condition:
  v: cmp-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionEmptyReason
  strength:
    v: preferred
  description:
    v: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-empty-reason
    link: http://hl7.org/fhir/ValueSet/list-empty-reason
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ,code<ListEmptyReason].value[type=CD]
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section:Coverage.section
path:
  v: Composition.section.section
short:
  v: 嵌套的小節
definition:
  v: 此小節中嵌套的小節
comment:
  v: 嵌套小節主要是為了幫助讀者快速找到文件中的特定內容
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.section
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/StructureDefinition/Composition#Composition.section
condition:
  v: cmp-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.section

id:
  v: Composition.section:ObservationBodyWeight
path:
  v: Composition.section
slice name:
  v: ObservationBodyWeight
short:
  v: 體重。若調劑藥物劑量須配合體重而有所調整，此欄位為必填。
definition:
  v: 構成composition的各小節
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: cmp-1
  severity:
    v: error
  human:
    v: A section must contain at least one of text, entries, or sub-sections
  expression:
    v: text.exists() or entry.exists() or section.exists()
  xpath:
    v: exists(f:text) or exists(f:entry) or exists(f:section)
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: cmp-2
  severity:
    v: error
  human:
    v: A section can only have an emptyReason if it is empty
  expression:
    v: emptyReason.empty() or entry.empty()
  xpath:
    v: not(exists(f:emptyReason) and exists(f:entry))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.structuredBody.component.section

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

id:
  v: Composition.section:ObservationBodyWeight.extension
path:
  v: Composition.section.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.modifierExtension
path:
  v: Composition.section.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:ObservationBodyWeight.title
path:
  v: Composition.section.title
short:
  v: 小節標籤(例如：目錄ToC)
definition:
  v: 此特定小節的標籤。這將是文件呈現內容的一部分，通常用於建立目錄。
comment:
  v: 標題為人類讀者指明小節。標題必須與作為 section.content 參照目標的resource的敘述一致。通常章節 **建議應該(SHOULD)** 有標題，但在某些文件中，這可能是不必要的或不適當的。通常情況下，當一個小節有其自己足夠區分的標題的子小節，或只有單一小節的文件時，就會這樣。大多數IG會要求小節標題是必填的資料項目。
requirements:
  v: 不同類型的文件常常會有標準化的小節標題，這些標題為人們提供如何組織文件的指引。
alias:
  v: header
alias:
  v: label
alias:
  v: caption
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.title
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./title
mapping:
  identity:
    v: cda
  map:
    v: .title

id:
  v: Composition.section:ObservationBodyWeight.code
path:
  v: Composition.section.code
short:
  v: 小節分類(建議)
definition:
  v: 一個用於指明小節中所含內容種類的代碼，這個代碼必須與小節的標題相一致。
comment:
  v: The code identifies the section for an automated processor of the document. This is particularly relevant when using profiles to control the structure of the document. If the section has content (instead of sub-sections), the section.code does not change the meaning or interpretation of the resource that is the content of the section in the comments for the section.code.
requirements:
  v: 提供給文件中主題的標籤是標準化的，並且可以被電腦程式識別和處理。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.section.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: cda
  map:
    v: .code

id:
  v: Composition.section:ObservationBodyWeight.code.id
path:
  v: Composition.section.code.id
representation:
  v: xmlAttr
short:
  v: 唯一可識別ID，以供資料項目間相互參照。
definition:
  v: resource中資料項目的唯一ID（用於內部參照）。這可以是任何不含空格的字串。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.code.extension
path:
  v: Composition.section.code.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: 擴充的資料項目
definition:
  v: 擴充的資料項目
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Composition.section:ObservationBodyWeight.code.coding
path:
  v: Composition.section.code.coding
short:
  v: 由專門術語系統（terminology system）定義的代碼
definition:
  v: 由專門術語系統（terminology system）所定義之代碼的參照
comment:
  v: 代碼可以在列舉清單（enumerations）或代碼清單（code lists）中非常隨意地定義，直至有非常正式的定義，例如：SNOMED CT—更多資訊見HL7 v3核心原則（Core Principles ）。編碼的排序是未定義的因而 **必須沒有（SHALL NOT）** 被用來推斷意義。一般來說，最多只有一個編碼值（coding values）會被標記為UserSelected = true。
requirements:
  v: 允許代碼系統中的替代編碼，以及翻譯到其他編碼系統。
min:
  v: 1
max:
  v: *
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Coding-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Coding-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: Composition.section:ObservationBodyWeight.code.coding.id
path:
  v: Composition.section.code.coding.id
representation:
  v: xmlAttr
short:
  v: 唯一可識別ID，以供資料項目間相互參照。
definition:
  v: resource中資料項目的唯一ID（用於內部參照），這可以是任何不含空格的字串。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.code.coding.extension
path:
  v: Composition.section.code.coding.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: 擴充的資料項目
definition:
  v: 可用於表示不屬於此資料項目基本定義的附加資訊。為了擴充的使用安全和可管理，對擴充的定義和使用有一套嚴格的管理。儘管任何實作者都可以定義一個擴充，但作為擴充定義的一部分，有一套要求 **必須（SHALL）** 滿足。
comment:
  v: 無論使用或定義擴充的機構或管轄區，任何應用程式、專案或標準使用擴充都不背負任何污名（stigma）。使用擴充是允許FHIR規範為每個人保留一個核心的簡易性。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Composition.section:ObservationBodyWeight.code.coding.system
path:
  v: Composition.section.code.coding.system
short:
  v: 專門術語系統（terminology system）的識別
definition:
  v: 定義代碼中符號意義的代碼系統識別
comment:
  v: URI可以是一個OID（urn:oid:...）或一個UUID（urn:uuid:...）；OID和UUID **必須（SHALL）** 參照HL7 OID註冊中心；否則，URI應該來自HL7的FHIR定義的特殊URI列表，或者它應該參照一些明確建立的系统定義。
requirements:
  v: 需要明確說明符號定義的來源
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Coding.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
fixed: uri
  v: http://loinc.org
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.3
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystem
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem

id:
  v: Composition.section:ObservationBodyWeight.code.coding.version
path:
  v: Composition.section.code.coding.version
short:
  v: 系統的版本—如果相關的話
definition:
  v: 選擇此代碼時使用的代碼系統版本；請注意，一個維護良好的代碼系統不需要版本報告，因為代碼的意義在不同系統版本中是一致的；然而，不能始終保證這點，當不能保證意義一致時， **必須（SHALL）** 將版本資訊也一併作交換。
comment:
  v: 如果專門術語沒有明確定義應該使用什麼字串來識別代碼系統的版本，建議使用版本正式發布的日期（用FHIR日期格式表示）作為版本日期。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.version
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.7
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystemVersion
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion

id:
  v: Composition.section:ObservationBodyWeight.code.coding.code
path:
  v: Composition.section.code.coding.code
short:
  v: 系統定義的語法之符號
definition:
  v: 系統定義的語法之符號；符號可能是一個預先定義的代碼，也可能是代碼系統定義的語法中的表達式（如後組合配對／後組合式）。
requirements:
  v: 需要參照系統中的一個特定代碼
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Coding.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
fixed: code
  v: 85353-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code

id:
  v: Composition.section:ObservationBodyWeight.code.coding.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.section.code.coding.display
short:
  v: 由系統定義的表示法
definition:
  v: 遵循系統的規則以呈現代碼含義的表示法
requirements:
  v: 需要能為不了解此系統的讀者呈現可讀的代碼含義
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
fixed: string
  v: Vital signs, weight, height, head circumference, oxygen saturation and BMI panel
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.2 - but note this is not well followed
mapping:
  identity:
    v: rim
  map:
    v: CV.displayName
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName

id:
  v: Composition.section:ObservationBodyWeight.code.coding.userSelected
path:
  v: Composition.section.code.coding.userSelected
short:
  v: 此編碼是否由使用者直接選擇？
definition:
  v: 表明此編碼是由使用者直接選擇，例如：從可用項目（代碼或顯示名稱）的清單中選擇。
comment:
  v: 在一系列備選方案中，直接選擇的代碼是新翻譯最合適的起點；關於「直接選擇」的確切意義，存在模糊不清之處，可能需要貿易夥伴的同意，以更完整澄清此資料項目的使用及其後果。
requirements:
  v: 已被確定為一個臨床安全準則—此確切的系統／代碼對(code pair)是被明確選擇的，而不是由系統根據一些規則或是程式語言處理判斷。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.userSelected
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: Sometimes implied by being first
mapping:
  identity:
    v: rim
  map:
    v: CD.codingRationale
mapping:
  identity:
    v: orim
  map:
    v: 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 ]

id:
  v: Composition.section:ObservationBodyWeight.code.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.section.code.text
short:
  v: 概念的文字表示法
definition:
  v: 輸入資料的使用者所見／所選／所說的人類可讀文字表述，和（或）其代表使用者的預期含義。
comment:
  v: 很多時候，此文字表述與其中一個代碼的顯示名稱相同。
requirements:
  v: 專門術語中的代碼並不總是能捕捉人類使用的細微差別的正確意義，或者根本就沒有合適的代碼；這些情況下，文字表述被用來捕捉來源的全部意義。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CodeableConcept.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.9. But note many systems use C*E.2 for this
mapping:
  identity:
    v: rim
  map:
    v: ./originalText[mediaType/code="text/plain"]/data
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

id:
  v: Composition.section:ObservationBodyWeight.author
path:
  v: Composition.section.author
short:
  v: 誰和/或什麼人撰寫了該小節
definition:
  v: 指明誰對小節中的資訊負責，而不一定是誰輸入了它。
requirements:
  v: 指明誰對內容負責
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.author
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.author
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
mapping:
  identity:
    v: cda
  map:
    v: .author.assignedAuthor

id:
  v: Composition.section:ObservationBodyWeight.focus
path:
  v: Composition.section.focus
short:
  v: 當小節與composition描述的對象無關時，此小節是關於誰/什麼。
definition:
  v: 當小節的實際焦點不是composition描述的對象，而是代表與對象相關的某事物或某人時，例如：（對於病人對象）配偶、父母、胎兒或捐贈者。如果沒有指定焦點，則假定焦點為父小節的焦點，或者對於Composition本身中的小節，為Composition的對象。具有焦點的小節只 **必須（SHALL）** 包含對象（病人、對象、焦點等）與小節焦點相匹配的resources，或者是沒有對象的resources（少數resources）。
comment:
  v: 通常，文件中的小節是關於該文件的描述對象，無論是病人、一群病人、位置、設備或其他。對於某些種類的文件，有些小節實際上包含有關的實體資料。典型的例子包括新生兒出院病摘中關於母親的小節，或者家族病史文件中關於每個家庭成員的小節，當然還有很多其他例子。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.focus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|4.0.1
    link: 4.0
    link: .1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: cda
  map:
    v: .subject? (CDA did not differentiate between subject and focus)

id:
  v: Composition.section:ObservationBodyWeight.text
path:
  v: Composition.section.text
short:
  v: 將文件中特定小節的內容簡化成容易理解的文字形式，便於人類閱讀和解釋。
definition:
  v: 一個供人閱讀的敘述，包含小節的核實內容，用以展現resource的內容供人類閱讀。這段敘述不需要涵蓋所有結構化的資料，但必須包含足夠的細節，確保僅透過閱讀這段敘述的人能夠在臨床上獲得安全且準確的資訊。
comment:
  v: 文件Profile可能會定義應在敘述中呈現哪些內容，以確保臨床安全。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
condition:
  v: cmp-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .text
mapping:
  identity:
    v: cda
  map:
    v: .text

id:
  v: Composition.section:ObservationBodyWeight.mode
path:
  v: Composition.section.mode
short:
  v: 適用於此小節的處理模式
definition:
  v: 條目清單是如何準備的 - 它是一個適合持續維護的工作清單，還是代表從另一個來源截取的項目清單的快照，或者是一個準備好的清單，在該清單中，項目可能被標記為已添加、修改或刪除。
comment:
  v: 這個資料項目被標記為修飾用，是因為不應將變更清單(a change list)誤解為完整清單(a complete list)。
requirements:
  v: 小節有多種使用方式，因此必須清楚地了解如何安全地使用其中的條目。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionMode
  strength:
    v: required
  description:
    v: 應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-mode|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .outBoundRelationship[typeCode=COMP].target[classCode=OBS"].value
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.orderedBy
path:
  v: Composition.section.orderedBy
short:
  v: 小節條目的順序
definition:
  v: 指定應用於小節條目的項目順序
comment:
  v: 應用程式 **建議應該(SHOULD)** 按照給定的順序來顯示有序清單，但也可以允許用戶按照他們自己的偏好進行重新排序。如果沒有明確指定順序，則該順序是不確定的，雖然清單可能仍有某種排列順序。
requirements:
  v: 這對於展示和呈現是重要的，清單可能會進行排序，以便將重要的資訊放在前面，或將相關的條目分組。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.orderedBy
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionEntryOrder
  strength:
    v: preferred
  description:
    v: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-order
    link: http://hl7.org/fhir/ValueSet/list-order
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP].sequenceNumber > 1
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.entry
path:
  v: Composition.section.entry
short:
  v: 提供一個連結用於參照或查看支持此小節內容的資料
definition:
  v: 指向那些提供小節中敘述內容的實際resource的參照
comment:
  v: 如果清單中沒有條目，則 **建議應該(SHOULD)** 提供 emptyReason。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.section.entry
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Observation-EMPD-BodyWeight
    link: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Observation-EMPD-BodyWeight
condition:
  v: cmp-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=COMP] or .participation[typeCode=SBJ]
mapping:
  identity:
    v: cda
  map:
    v: .entry

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

id:
  v: Composition.section:ObservationBodyWeight.entry.extension
path:
  v: Composition.section.entry.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.entry.reference
path:
  v: Composition.section.entry.reference
short:
  v: Literal reference, Relative, internal or absolute URL
definition:
  v: A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
comment:
  v: Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Reference.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: ref-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:ObservationBodyWeight.entry.type
path:
  v: Composition.section.entry.type
short:
  v: Type the reference refers to (e.g. "Patient")
definition:
  v: The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).
comment:
  v: This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: FHIRResourceTypeExt
  strength:
    v: extensible
  description:
    v: Aa resource (or, for logical models, the URI of the logical model).
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:ObservationBodyWeight.entry.identifier
path:
  v: Composition.section.entry.identifier
short:
  v: Logical reference, when literal reference is not known
definition:
  v: An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.
comment:
  v: When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it. Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.identifier
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .identifier

id:
  v: Composition.section:ObservationBodyWeight.entry.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Composition.section.entry.display
short:
  v: Text alternative for the resource
definition:
  v: Plain text narrative that identifies the resource in addition to the resource reference.
comment:
  v: This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Reference.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:ObservationBodyWeight.emptyReason
path:
  v: Composition.section.emptyReason
short:
  v: 為什麼此小節是空的原因
definition:
  v: 如果小節為空，則說明清單為空的原因。一個空的小節通常有一些文字說明空的原因。
comment:
  v: 當一個小節是空的，其空白的原因對於理解該小節非常重要。需要注意的是，這個代碼是用於當整個小節的內容都沒有被包括時，它並不適用於個別項目被省略的情形，若為個別項目被省略的情況，開發者可以考慮在該條目中添加文字說明或標記。
requirements:
  v: 允許捕捉像是「不存在」或「未詢問」這樣的情況，這對於大多數清單來說可能很重要。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.emptyReason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
condition:
  v: cmp-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SectionEmptyReason
  strength:
    v: preferred
  description:
    v: 鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/list-empty-reason
    link: http://hl7.org/fhir/ValueSet/list-empty-reason
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ,code<ListEmptyReason].value[type=CD]
mapping:
  identity:
    v: cda
  map:
    v: n/a

id:
  v: Composition.section:ObservationBodyWeight.section
path:
  v: Composition.section.section
short:
  v: 嵌套的小節
definition:
  v: 此小節中嵌套的小節
comment:
  v: 嵌套小節主要是為了幫助讀者快速找到文件中的特定內容
min:
  v: 0
max:
  v: *
base:
  path:
    v: Composition.section.section
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/StructureDefinition/Composition#Composition.section
condition:
  v: cmp-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.section

id:
  v: Composition.section:Condition
path:
  v: Composition.section
slice name:
  v: Condition
short:
  v: 診斷
definition:
  v: 構成composition的各小節
min:
  v: 1
max:
  v: *
base:
  path:
    v: Composition.section
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: cmp-1
  severity:
    v: error
  human:
    v: A section must contain at least one of text, entries, or sub-sections
  expression:
    v: text.exists() or entry.exists() or section.exists()
  xpath:
    v: exists(f:text) or exists(f:entry) or exists(f:section)
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: cmp-2
  severity:
    v: error
  human:
    v: A section can only have an emptyReason if it is empty
  expression:
    v: emptyReason.empty() or entry.empty()
  xpath:
    v: not(exists(f:emptyReason) and exists(f:entry))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Composition
    link: http://hl7.org/fhir/StructureDefinition/Composition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
mapping:
  identity:
    v: cda
  map:
    v: .component.structuredBody.component.section

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

id:
  v: Composition.section:Condition.extension
path:
  v: Composition.section.extension
short:
  v: Additional content defined by implementations
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:Condition.modifierExtension
path:
  v: Composition.section.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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).
comment:
  v: 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.
requirements:
  v: 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).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Composition.section:Condition.title
path:
  v: Composition.section.title
short:
  v: 小節標籤(例如：目錄ToC)
definition:
  v: 此特定小節的標籤。這將是文件呈現內容的一部分，通常用於建立目錄。
comment:
  v: 標題為人類讀者指明小節。標題必須與作為 section.content 參照目標的resource的敘述一致。通常章節 **建議應該(SHOULD)** 有標題，但在某些文件中，這可能是不必要的或不適當的。通常情況下，當一個小節有其自己足夠區分的標題的子小節，或只有單一小節的文件時，就會這樣。大多數IG會要求小節標題是必填的資料項目。
requirements:
  v: 不同類型的文件常常會有標準化的小節標題，這些標題為人們提供如何組織文件的指引。
alias:
  v: header
alias:
  v: label
alias:
  v: caption
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Composition.section.title
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ./title
mapping:
  identity:
    v: cda
  map:
    v: .title

id:
  v: Composition.section:Condition.code
path:
  v: Composition.section.code
short:
  v: 小節分類(建議)
definition:
  v: 一個用於指明小節中所含內容種類的代碼，這個代碼必須與小節的標題相一致。
comment:
  v: The code identifies the section for an automated processor of the document. This is particularly relevant when using profiles to control the structure of the document. If the section has content (instead of sub-sections), the section.code does not change the meaning or interpretation of the resource that is the content of the section in the comments for the section.code.
requirements:
  v: 提供給文件中主題的標籤是標準化的，並且可以被電腦程式識別和處理。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Composition.section.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/loinc-doc-section-code
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: cda
  map:
    v: .code

id:
  v: Composition.section:Condition.code.id
path:
  v: Composition.section.code.id
representation:
  v: xmlAttr
short:
  v: 唯一可識別ID，以供資料項目間相互參照。
definition:
  v: resource中資料項目的唯一ID（用於內部參照）。這可以是任何不含空格的字串。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Composition.section:Condition.code.extension
path:
  v: Composition.section.code.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: 擴充的資料項目
definition:
  v: 擴充的資料項目
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Composition.section:Condition.code.coding
path:
  v: Composition.section.code.coding
short:
  v: 由專門術語系統（terminology system）定義的代碼
definition:
  v: 由專門術語系統（terminology system）所定義之代碼的參照
comment:
  v: 代碼可以在列舉清單（enumerations）或代碼清單（code lists）中非常隨意地定義，直至有非常正式的定義，例如：SNOMED CT—更多資訊見HL7 v3核心原則（Core Principles ）。編碼的排序是未定義的因而 **必須沒有（SHALL NOT）** 被用來推斷意義。一般來說，最多只有一個編碼值（coding values）會被標記為UserSelected = true。
requirements:
  v: 允許代碼系統中的替代編碼，以及翻譯到其他編碼系統。
min:
  v: 1
max:
  v: *
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
  profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Coding-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Coding-tw
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: Composition.section:Condition.code.coding.id
path:
  v: Composition.section.code.coding.id
representation:
  v: xmlAttr
short:
  v: 唯一可識別ID，以供資料項目間相互參照。
definition:
  v: resource中資料項目的唯一ID（用於內部參照），這可以是任何不含空格的字串。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false