Encounter-HealthBank
type: StructureDefinition
node role: treeRoot
id:
  v: Encounter-HealthBank
text:
  status:
    v: extensions
  div: Generated Narrative: StructureDefinition Encounter-HealthBank Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Encounter 0..* TWCoreEncounter 此IG將非FHIR標準的健康存摺JSON格式與目前次世代數位醫療平台採用的FHIR國際標準整合 id 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Encounter紀錄，通常又稱為邏輯性ID。 meta 0..1 Meta 此Encounter Resource的metadata implicitRules 0..1 uri 創建此內容所依據的一組規則 language 0..1 code 用以表述Encounter Resource內容的語言。 Binding: CommonLanguages (preferred): 人類語言；鼓勵使用CommonLanguages代碼表中的代碼，但不強制一定要使用此代碼表，你也可使用其他代碼表的代碼或單純以文字表示。 Additional Bindings Purpose AllLanguages Max Binding Example Value: zh-TW text 0..1 Narrative Encounter Resource之內容摘要以供人閱讀 identifier S 0..* Identifier 此就醫事件的識別碼 use 0..1 code usual ｜ official ｜ temp ｜ secondary ｜ old （如果知道） Binding: IdentifierUse (required): 如果知道，請說明此識別碼的用途；應填入所綁定值集中的其中一個代碼。 type 0..1 CodeableConceptTW 識別碼（identifier）的型別說明 Binding: Identifier Type Codes (extensible): 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 system S 1..1 uri 識別碼（identifier）的命名空間（namespace） value S 1..1 string 唯一值 period 0..1 Period 此就醫事件識別碼（identifier）的使用效期 assigner 0..1 Reference(TW Core Organization) 簽發identifier的機構（可以只是文字表述） status S 1..1 code planned | arrived | triaged | in-progress | onleave | finished | cancelled + Binding: EncounterStatus (required): 就醫現況的代碼；應填入所綁定值集中的其中一個代碼 statusHistory 0..* BackboneElement 過去的就醫狀態清單 status 1..1 code planned | arrived | triaged | in-progress | onleave | finished | cancelled + Binding: EncounterStatus (required): 就醫現狀的代碼；應填入所綁定值集中的其中一個代碼 period 1..1 Period 該事件處於特定狀態的時間 class S 1..1 CodingTW 病人就醫的分類 Binding: ActEncounterCode (extensible): 就醫的分類；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 classHistory 0..* BackboneElement 過去就醫類別的列表 class 1..1 Coding = AMB(r1), IMP(r2), OBSENC(r7) Binding: ActEncounterCode (extensible): 就醫類別；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 period 1..1 Period 此就醫事件處於特定類別的時間 type 0..* CodeableConceptTW 就醫的特定型別 Binding: EncounterType (example): 就醫的型別；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不…
url:
  v: https://ig.dicom.tw/healthbank/StructureDefinition/Encounter-HealthBank
version:
  v: 0.1.0
name:
  v: HealthBankEncounter
title:
  v: HealthBank Encounter
status:
  v: active
date:
  v: 2024-08-16T15:26:01+08:00
publisher:
  v: 臺灣醫學資訊學會 TAMI
contact:
  name:
    v: 臺灣醫學資訊學會 TAMI
  telecom:
    system:
      v: url
    value:
      v: http://www.medinfo.org.tw
  telecom:
    system:
      v: email
description:
  v: 此健康存摺-就醫事件（HealthBank Encounter) Profile說明本IG如何進一步定義FHIR的Encounter Resource以呈現就醫事件。
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: w5
  uri:
    v: http://hl7.org/fhir/fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
  name:
    v: HL7 v2 Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Encounter
base definition:
  v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Encounter-twcore
  link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Encounter-twcore
derivation:
  v: constraint
snapshot:
  element:
    id:
      v: Encounter
    path:
      v: Encounter
    short:
      v: 此IG將非FHIR標準的健康存摺JSON格式與目前次世代數位醫療平台採用的FHIR國際標準整合
    definition:
      v: 病人和健康照護服務提供者之間的互動，目的是提供健康照護服務或評估病人的健康狀況。
    alias:
      v: Visit
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Encounter
      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:
      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: Encounter[@moodCode='EVN']
  element:
    id:
      v: Encounter.id
    path:
      v: Encounter.id
    short:
      v: 不重複的ID用以識別儲存在特定FHIR Server中的Encounter紀錄，通常又稱為邏輯性ID。
    definition:
      v: resource的邏輯ID，在resource的URL中使用。一旦指定，這個值永遠不會改變。
    comment:
      v: 一個resource使用新增操作（create operation）提交給伺服器時，此resource沒有id，它的id在resource被創建後由伺器分配/指定。
    min:
      v: 0
    max:
      v: 1

v: true

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.

path:
  v: Resource.id
min:
  v: 0
max:
  v: 1

extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
  value:
    v: id
code:
  v: http://hl7.org/fhirpath/System.String

v: false

v: true

id:
  v: Encounter.meta
path:
  v: Encounter.meta
short:
  v: 此Encounter 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: Encounter.implicitRules
path:
  v: Encounter.implicitRules
short:
  v: 創建此內容所依據的一組規則
definition:
  v: 構建resource時遵循的一系列規則的參照，在處理內容時必須理解這些規則。通常這是對IG所定義之特殊規則及其他profiles的參照。
comment:
  v: 宣告這套規則限制了內容只能被有限的交易夥伴所理解。這從本質上限制了資料的長期有用性。然而，現有的健康生態體系高度分裂，還沒有準備好以普遍可計算的方式定義、收集和交換資料。只要有可能，實作者和/或規範編寫者應該避免使用這個資料項目。通常在使用時，此URL是對IG的參照，此IG將這些特殊規則與其他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: Encounter.language
path:
  v: Encounter.language
short:
  v: 用以表述Encounter 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:
    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:
      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:
      v: Language
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding
    value:
      v: true
  strength:
    v: preferred
  description:
    v: 人類語言；鼓勵使用CommonLanguages代碼表中的代碼，但不強制一定要使用此代碼表，你也可使用其他代碼表的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/languages
    link: http://hl7.org/fhir/ValueSet/languages

id:
  v: Encounter.text
path:
  v: Encounter.text
short:
  v: Encounter 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: Encounter.contained
path:
  v: Encounter.contained
short:
  v: 內嵌的（contained）、行內的Resources
definition:
  v: 這些resource內嵌（contains）的resource不會另外存於任何FHIR伺服器，意即它們無法在任何FHIR伺服器中被找到，也無法有自己獨立的資料異動／交易（transaction）範圍。
comment:
  v: 當內容可以從任何FHIR伺服器找到時，不應該以內嵌（contained）resource的方式呈現，因為一旦失去識別，再次恢復它是非常困難的（並且取決於情境）。內嵌（contained）的resource可在它們的meta資料項目中表述profiles和tag，但不應該有安全標號（security labels）。
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: Encounter.extension
path:
  v: Encounter.extension
short:
  v: 擴充的資料項目
definition:
  v: 可用於表示不屬於此resource基本定義的額外資訊。為了擴充的使用安全和可管理，對擴充的定義和使用有一套嚴格的管理。儘管任何實作者都可以定義一個擴充，但作為擴充定義的一部分，**必須（SHALL）** 滿足一系列要求。
comment:
  v: 任何應用程式、專案或標準使用擴充時，都不應該帶有任何負面的聯想。使用擴充是允許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: Encounter.modifierExtension
path:
  v: Encounter.modifierExtension
short:
  v: 此擴充的資料項目可能會完全修正或改變其他資料項目的意涵，需特別留意。
definition:
  v: 可以用來表示不屬於此resource的基本定義的額外資訊，並修改包含它所內嵌（contained）的資料項目的理解和/或對包含資料項目之後續使用的理解。通常修飾用的資料項目提供否定或限定的資訊。為了使擴充的使用安全和可管理，對擴充的定義和使用有一套嚴格的管理。雖然任何實作者都可以定義一個擴充，但在定義擴充時 **必須（SHALL）** 滿足一組要求。處理resource的應用程式需要檢查修飾用的擴充資料項目。 修飾用的擴充資料項目 **必須沒有（SHALL NOT）** 改變resource或DomainResource上任何資料項目的含義（包括不能改變modifierExtension本身的含義）。
comment:
  v: 任何應用程式、專案或標準使用擴充時，都不應該帶有任何負面的聯想。使用擴充是允許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: Encounter.identifier
path:
  v: Encounter.identifier
short:
  v: 此就醫事件的識別碼
definition:
  v: 此就醫事件的識別碼
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.identifier
  min:
    v: 0
  max:
    v: *
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: v2
  map:
    v: PV1-19
mapping:
  identity:
    v: rim
  map:
    v: .id

id:
  v: Encounter.identifier.id
path:
  v: Encounter.identifier.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:
      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: Encounter.identifier.extension
path:
  v: Encounter.identifier.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: 擴充的資料項目
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: Encounter.identifier.use
path:
  v: Encounter.identifier.use
short:
  v: usual ｜ official ｜ temp ｜ secondary ｜ old （如果知道）
definition:
  v: 這個唯一識別碼（identifier）的用途
comment:
  v: 應用程式可以假定一個識別碼是永久的，除非它明確說它是暫時的。
requirements:
  v: 允許從一組識別碼中為特定的使用情境選擇適當的識別碼
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.use
  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: true
is modifier reason:
  v: This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: IdentifierUse
  strength:
    v: required
  description:
    v: 如果知道，請說明此識別碼的用途；應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/identifier-use|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: v2
  map:
    v: N/A
mapping:
  identity:
    v: rim
  map:
    v: Role.code or implied by context

id:
  v: Encounter.identifier.type
path:
  v: Encounter.identifier.type
short:
  v: 識別碼（identifier）的型別說明
definition:
  v: 識別碼的代碼型別，用於決定特定目的適用的識別碼。
comment:
  v: 這個資料項目只涉及識別碼的一般類別。它 **必須沒有（SHALL NOT）** 被用於與Identifier.system 1..1對應的代碼。一些識別碼可能由於常見的用法而屬於多個類別。在系統是已知的情況下，型別是不必要的，因為型別總是系統定義的一部分。然而，系統經常需要處理系統不為人知的識別碼。型別和系統之間不是1:1的關係，因為許多不同的系統有相同的型別。
requirements:
  v: 允許使用者在不知道識別碼系統的情況下利用識別碼
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.type
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: IdentifierType
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding
    value:
      v: true
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/identifier-type
    link: http://hl7.org/fhir/ValueSet/identifier-type
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.identifier.system
path:
  v: Encounter.identifier.system
short:
  v: 識別碼（identifier）的命名空間（namespace）
definition:
  v: 建立值的命名空間－即一個描述一組值的唯一URL
comment:
  v: Identifier.system總是區分大小寫
requirements:
  v: 有許多識別碼的集合。為了進行兩個識別碼的對應，我們需要知道我們處理的是哪一組。系統指明了一個特定的唯一識別碼集。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Identifier.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
example:
  label:
    v: General
  value:
    v: http://www.acme.com/identifiers/patient
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: CX.4 / EI-2-4
mapping:
  identity:
    v: rim
  map:
    v: II.root or Role.id.root
mapping:
  identity:
    v: servd
  map:
    v: ./IdentifierType

id:
  v: Encounter.identifier.value
path:
  v: Encounter.identifier.value
short:
  v: 唯一值
definition:
  v: 識別碼中通常與使用者有關的部分，在系統情境內是唯一的。
comment:
  v: 如果此值是一個完整的URI，那麼此系統 **必須（SHALL）** 是urn:ietf:rfc:3986。此值的主要目的是為了可運算的對應。因此，為了比較的目的，它可能會被正規化（例如：去除不重要的空白、破折號等）。一個為人顯示的格式化的值可以使用[Rendered Value]（http://hl7.org/fhir/R4/extension-rendered-value.html）擴充來傳達。除非對Identifier.system的了解使處理者確信不區分大小寫的處理是安全的，否則Identifier.value應被視為區分大小寫。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Identifier.value
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
example:
  label:
    v: General
  value:
    v: 123456
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: CX.1 / EI.1
mapping:
  identity:
    v: rim
  map:
    v: II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
mapping:
  identity:
    v: servd
  map:
    v: ./Value

id:
  v: Encounter.identifier.period
path:
  v: Encounter.identifier.period
short:
  v: 此就醫事件識別碼（identifier）的使用效期
definition:
  v: 識別碼有效／曾經有效使用的時段或期間
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.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: v2
  map:
    v: CX.7 + CX.8
mapping:
  identity:
    v: rim
  map:
    v: Role.effectiveTime or implied by context
mapping:
  identity:
    v: servd
  map:
    v: ./StartDate and ./EndDate

id:
  v: Encounter.identifier.assigner
path:
  v: Encounter.identifier.assigner
short:
  v: 簽發identifier的機構（可以只是文字表述）
definition:
  v: 簽發／管理識別碼的機構
comment:
  v: Identifier.assigner可以省略.reference資料項目，只包含一個.display資料項目，反映指定機構的名稱或其他文字表述資訊。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Identifier.assigner
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  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: true
mapping:
  identity:
    v: v2
  map:
    v: CX.4 / (CX.4,CX.9,CX.10)
mapping:
  identity:
    v: rim
  map:
    v: II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
mapping:
  identity:
    v: servd
  map:
    v: ./IdentifierIssuingAuthority

id:
  v: Encounter.status
path:
  v: Encounter.status
short:
  v: planned | arrived | triaged | in-progress | onleave | finished | cancelled +
definition:
  v: planned | arrived | triaged | in-progress | onleave | finished | cancelled +.
comment:
  v: 請注意，內部業務規則將決定於狀態（也包括類別）間可能發生的適當轉換。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.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 labeled 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:
      v: EncounterStatus
  strength:
    v: required
  description:
    v: 就醫現況的代碼；應填入所綁定值集中的其中一個代碼
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-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: v2
  map:
    v: No clear equivalent in HL7 v2; active/finished could be inferred from PV1-44, PV1-45, PV2-24; inactive could be inferred from PV2-16
mapping:
  identity:
    v: rim
  map:
    v: .statusCode

id:
  v: Encounter.statusHistory
path:
  v: Encounter.statusHistory
short:
  v: 過去的就醫狀態清單
definition:
  v: Encounter resource包含狀態歷史，因而不需閱讀resource的歷史版本，甚至不需讓伺服器儲存這些版本。
comment:
  v: 總是可在resource的目前版本找到目前狀態，而不是在狀態歷史中找到。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.statusHistory
  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: n/a

id:
  v: Encounter.statusHistory.id
path:
  v: Encounter.statusHistory.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:
      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: Encounter.statusHistory.extension
path:
  v: Encounter.statusHistory.extension
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: Encounter.statusHistory.modifierExtension
path:
  v: Encounter.statusHistory.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: 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

id:
  v: Encounter.statusHistory.status
path:
  v: Encounter.statusHistory.status
short:
  v: planned | arrived | triaged | in-progress | onleave | finished | cancelled +
definition:
  v: planned | arrived | triaged | in-progress | onleave | finished | cancelled +
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.statusHistory.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
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterStatus
  strength:
    v: required
  description:
    v: 就醫現狀的代碼；應填入所綁定值集中的其中一個代碼
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Encounter.statusHistory.period
path:
  v: Encounter.statusHistory.period
short:
  v: 該事件處於特定狀態的時間
definition:
  v: 該事件處於特定狀態的時間
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.statusHistory.period
  min:
    v: 1
  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: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Encounter.class
path:
  v: Encounter.class
short:
  v: 病人就醫的分類
definition:
  v: 病人就醫分類的概念，例如：門診病人、住院病人、急診病人、居家照護或其他因地方不同而產生的概念。
comment:
  v: 代碼可以在列舉清單（enumerations）或代碼清單（code lists）中非常隨意地定義，直至有非常正式的定義，例如：SNOMED CT—更多資訊見HL7 v3核心原則（Core Principles ）。編碼的排序是未定義的因而 **必須沒有（SHALL NOT）** 被用來推斷意義。一般來說，最多只有一個編碼值（coding values）會被標記為UserSelected = true。
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.class
  min:
    v: 1
  max:
    v: 1
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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterClass
  strength:
    v: extensible
  description:
    v: 就醫的分類；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
    link: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE subset one of the sets of component 1-3 or 4-6
mapping:
  identity:
    v: rim
  map:
    v: CV
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding rdfs:subClassOf dt:CDCoding

id:
  v: Encounter.classHistory
path:
  v: Encounter.classHistory
short:
  v: 過去就醫類別的列表
definition:
  v: 可透過類別歷史而不需要透過resource歷史紀錄來追蹤就醫的轉變，這將用於一個案例，即住院急診，然後轉住院的情況。這樣做而不重新啟動一個新的就醫，可以確保任何實驗室/診斷結果可以更容易地跟隨病人，不需要重新處理，也不會在從急診到住院的出院過程中丟失或取消。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.classHistory
  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: n/a

id:
  v: Encounter.classHistory.id
path:
  v: Encounter.classHistory.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:
      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: Encounter.classHistory.extension
path:
  v: Encounter.classHistory.extension
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: Encounter.classHistory.modifierExtension
path:
  v: Encounter.classHistory.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: 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

id:
  v: Encounter.classHistory.class
path:
  v: Encounter.classHistory.class
short:
  v: = AMB(r1), IMP(r2), OBSENC(r7)
definition:
  v: inpatient ｜ outpatient ｜ ambulatory ｜ emergency +. 住院病人 ｜ 門診病人 ｜ 非臥床（可行走）病人醫療服務 ｜ 急診 +
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.classHistory.class
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Coding
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:
      v: EncounterClass
  strength:
    v: extensible
  description:
    v: 就醫類別；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
    link: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Encounter.classHistory.period
path:
  v: Encounter.classHistory.period
short:
  v: 此就醫事件處於特定類別的時間
definition:
  v: 此就醫事件處於特定類別的時間
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.classHistory.period
  min:
    v: 1
  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: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Encounter.type
path:
  v: Encounter.type
short:
  v: 就醫的特定型別
definition:
  v: 就醫的特定型別（如電子郵件諮詢、手術日間照護、專業護理、復健）。
comment:
  v: 由於有許多方法可以對就醫進行進一步的分類，所以這個資料項目的基數是0...* ，意即可不填寫或填寫數筆。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.type
  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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterType
  strength:
    v: example
  description:
    v: 就醫的型別；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-type
    link: http://hl7.org/fhir/ValueSet/encounter-type
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.serviceType
path:
  v: Encounter.serviceType
short:
  v: 服務的特定型別
definition:
  v: 對所提供的服務進行廣泛的分類（如心臟科）
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.serviceType
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterServiceType
  strength:
    v: example
  description:
    v: 對提供的服務進行廣泛分類；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/service-type
    link: http://hl7.org/fhir/ValueSet/service-type
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.serviceType.id
path:
  v: Encounter.serviceType.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:
      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: Encounter.serviceType.extension
path:
  v: Encounter.serviceType.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: Encounter.serviceType.coding
path:
  v: Encounter.serviceType.coding
slicing:
  discriminator:
    type:
      v: pattern
    path:
      v: system
  rules:
    v: open
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: 0
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
condition:
  v: ele-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
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE subset one of the sets of component 1-3 or 4-6
mapping:
  identity:
    v: rim
  map:
    v: CV
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding rdfs:subClassOf dt:CDCoding

id:
  v: Encounter.serviceType.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value:
    v: true
path:
  v: Encounter.serviceType.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: Encounter.priority
path:
  v: Encounter.priority
short:
  v: 表明就醫的急迫性
definition:
  v: 表明就醫的急迫性
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.priority
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Priority
  strength:
    v: example
  description:
    v: 表明就醫的迫切性；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActPriority
    link: http://terminology.hl7.org/ValueSet/v3-ActPriority
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.subject
path:
  v: Encounter.subject
short:
  v: Patient Resource urn:uuid:ResourceID
definition:
  v: 在場就醫的病人或實體集合（Group）
comment:
  v: 雖然就醫總是關於病人，但在所有的使用情境中，病人實際上可能並不為人所知及可能有一群病人是匿名的（例如：匿名酗酒者的團體治療中—就醫紀錄是以人數/工作人員數計費，而具體病人的情境並不重要）；或者在獸醫照護中，一群羊接受治療（動物沒有被單獨追蹤）。
alias:
  v: patient
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.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
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.subject
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]
mapping:
  identity:
    v: v2
  map:
    v: PID-3
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=SBJ]/role[classCode=PAT]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject

id:
  v: Encounter.episodeOfCare
path:
  v: Encounter.episodeOfCare
short:
  v: 此次就醫應記錄的照護事件
definition:
  v: 當某一特定就醫應被歸類為某一特定照護事件的一部分時，應使用這一個資料項目。這種關聯可方便地將相關的就醫分類，以達到特定的目的，如政府報告、問題追蹤、透過共同的問題進行關聯，關聯通常會在照護事件之後記錄在就醫紀錄上，並在紀錄上分類；而不是將另一個就醫（照護事件可能橫跨多年）附件到照護事件紀錄。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.episodeOfCare
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
    link: http://hl7.org/fhir/StructureDefinition/EpisodeOfCare
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: workflow
  map:
    v: Event.context
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: v2
  map:
    v: PV1-54, PV1-53
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Encounter.basedOn
path:
  v: Encounter.basedOn
short:
  v: 開始此次就醫的服務請求（ServiceRequest）
definition:
  v: 此就醫事件所要滿足的請求（例如：轉診或手術請求）
alias:
  v: incomingReferral
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.basedOn
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ServiceRequest
    link: http://hl7.org/fhir/StructureDefinition/ServiceRequest
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: workflow
  map:
    v: Event.basedOn
mapping:
  identity:
    v: rim
  map:
    v: .reason.ClinicalDocument

id:
  v: Encounter.participant
path:
  v: Encounter.participant
short:
  v: 參與就醫的健康照護服務提供者之名單
definition:
  v: 負責提供健康照護服務的人員名單
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.participant
  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: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer
mapping:
  identity:
    v: v2
  map:
    v: ROL
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=PFM]

id:
  v: Encounter.participant.id
path:
  v: Encounter.participant.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:
      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: Encounter.participant.extension
path:
  v: Encounter.participant.extension
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: Encounter.participant.modifierExtension
path:
  v: Encounter.participant.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: 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

id:
  v: Encounter.participant.type
path:
  v: Encounter.participant.type
short:
  v: 參與者在病人就醫事件中的角色
definition:
  v: 參與者在病人就醫事件中的角色
comment:
  v: 參與者的型別表明個人如何參與病人的就醫事件。它包括非執業醫師的參與者，而對於執業醫師來說，這是為了描述在這次就醫中的活動型別（例如：住院醫生、主治醫生、翻譯者、諮詢醫生）。這與執業醫師的角色不同，執業醫師是功能性的角色，衍生自來僱用、教育、執照等。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.participant.type
  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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: ParticipantType
  strength:
    v: extensible
  description:
    v: 參與者在病人就醫事件中的角色；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-participant-type
    link: http://hl7.org/fhir/ValueSet/encounter-participant-type
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.participant.period
path:
  v: Encounter.participant.period
short:
  v: 參與者在病人就醫期間參與的時段
definition:
  v: 指定的參與者參與病人就醫的時段。這些時段可以是重疊的，也可以是整個就醫的時段的子集。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.participant.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
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: ROL-5, ROL-6 (or maybe PRT-5)
mapping:
  identity:
    v: rim
  map:
    v: .time

id:
  v: Encounter.participant.individual
path:
  v: Encounter.participant.individual
short:
  v: 除病人外，參與病人就醫事件的人。
definition:
  v: 除病人外，參與病人就醫事件的人。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.participant.individual
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    link: http://hl7.org/fhir/StructureDefinition/RelatedPerson
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.actor
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: v2
  map:
    v: ROL-4
mapping:
  identity:
    v: rim
  map:
    v: .role

id:
  v: Encounter.appointment
path:
  v: Encounter.appointment
short:
  v: 這次就醫的預約紀錄
definition:
  v: 這次就醫的預約紀錄
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.appointment
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Appointment
    link: http://hl7.org/fhir/StructureDefinition/Appointment
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: workflow
  map:
    v: Event.basedOn
mapping:
  identity:
    v: v2
  map:
    v: SCH-1 / SCH-2
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=FLFS].target[classCode=ENC, moodCode=APT]

id:
  v: Encounter.period
path:
  v: Encounter.period
short:
  v: 就醫的開始和結束時間
definition:
  v: 就醫的開始和結束時間
comment:
  v: 如果（尚）不知道，可以省略「期間」裡的結束日期時間。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.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
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.occurrence[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.done[x]
mapping:
  identity:
    v: v2
  map:
    v: PV1-44, PV1-45
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime (low & high)

id:
  v: Encounter.length
path:
  v: Encounter.length
short:
  v: 就醫持續的時間（扣除缺席時間）
definition:
  v: 就醫持續的時間，這不包括請假缺席的時間。
comment:
  v: 由於請假，可能與就醫的開始和結束時間（Encounter.period）不同。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.length
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Duration
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: workflow
  map:
    v: Event.occurrence[x]
mapping:
  identity:
    v: v2
  map:
    v: (PV1-45 less PV1-44) iff ( (PV1-44 not empty) and (PV1-45 not empty) ); units in minutes
mapping:
  identity:
    v: rim
  map:
    v: .lengthOfStayQuantity

id:
  v: Encounter.reasonCode
path:
  v: Encounter.reasonCode
short:
  v: 就醫發生的編碼原因
definition:
  v: 就醫發生的原因，以代碼表示。對於住院，這可用於住院診斷代碼。
comment:
  v: 對於需要知道哪個是主要診斷的系統來說，這些將用標準擴充primaryDiagnosis（這是一個序列值而不是一個標誌，1=主要診斷）來標記。
alias:
  v: Indication
alias:
  v: Admission diagnosis
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.reasonCode
  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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterReason
  strength:
    v: preferred
  description:
    v: 發生此就醫事件的原因；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-reason
    link: http://hl7.org/fhir/ValueSet/encounter-reason
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.reasonReference
path:
  v: Encounter.reasonReference
short:
  v: 就醫發生的原因（參照）
definition:
  v: 就醫發生的原因，以代碼表示。對於住院，這可用於住院診斷代碼。
comment:
  v: 對於需要知道哪個是主要診斷的系統來說，這些將用標準擴充primaryDiagnosis（這是一個序列值而不是一個標誌，1=主要診斷）來標記。
alias:
  v: Indication
alias:
  v: Admission diagnosis
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.reasonReference
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
    link: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
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: workflow
  map:
    v: Event.reasonCode
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: v2
  map:
    v: EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )
mapping:
  identity:
    v: rim
  map:
    v: .reasonCode

id:
  v: Encounter.diagnosis
path:
  v: Encounter.diagnosis
short:
  v: 與此就醫相關的診斷清單
definition:
  v: 與此就醫相關的診斷清單
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.diagnosis
  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=RSON]

id:
  v: Encounter.diagnosis.id
path:
  v: Encounter.diagnosis.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:
      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: Encounter.diagnosis.extension
path:
  v: Encounter.diagnosis.extension
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: Encounter.diagnosis.modifierExtension
path:
  v: Encounter.diagnosis.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: 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

id:
  v: Encounter.diagnosis.condition
path:
  v: Encounter.diagnosis.condition
short:
  v: 與就醫事件相關的診斷或處置
definition:
  v: 就醫的原因，使用其他resource的資訊以具體說明。對於住院，這就是住院診斷。指示通常是一個病情、問題或診斷（Condition）（在evidence.detail中參照其他resource），或一個處置（Procedure）。
comment:
  v: 對於需要知道哪個是主要診斷的系統來說，這些將用標準擴充primaryDiagnosis（這是一個序列值而不是一個標誌，1=主要診斷）來標記。
alias:
  v: Admission diagnosis
alias:
  v: discharge diagnosis
alias:
  v: indication
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.diagnosis.condition
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Condition-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Condition-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Procedure-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Procedure-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: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.reasonReference
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: v2
  map:
    v: Resources that would commonly referenced at Encounter.indication would be Condition and/or Procedure. These most closely align with DG1/PRB and PR1 respectively.
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=RSON].target

id:
  v: Encounter.diagnosis.use
path:
  v: Encounter.diagnosis.use
short:
  v: 此診斷在病人就醫事件中的作用（例如：住院、收費、出院...）。
definition:
  v: 此診斷在病人就醫事件中的作用（例如：住院、收費、出院...）。
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.diagnosis.use
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: DiagnosisRole
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding
    value:
      v: true
  strength:
    v: preferred
  description:
    v: 此情況所代表的診斷型別；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/diagnosis-role
    link: http://hl7.org/fhir/ValueSet/diagnosis-role
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.diagnosis.rank
path:
  v: Encounter.diagnosis.rank
short:
  v: 診斷的排序（針對每個角色型別）
definition:
  v: 診斷的排序（針對每個角色型別）
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.diagnosis.rank
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: positiveInt
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=RSON].priority

id:
  v: Encounter.account
path:
  v: Encounter.account
short:
  v: 可用於為此病人就醫事件計費的一組帳戶
definition:
  v: 可用於為此病人就醫事件計費的一組帳戶
comment:
  v: 計費系統可依據內部業務規則，選擇將與就醫（Encounter）相關的應計費項目分配給不同的參照帳戶。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.account
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Account
    link: http://hl7.org/fhir/StructureDefinition/Account
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: .pertains.A_Account

id:
  v: Encounter.hospitalization
path:
  v: Encounter.hospitalization
short:
  v: 關於入院接受健康照護服務的細節
definition:
  v: 關於入院接受健康照護服務的細節
comment:
  v: 就醫可能不僅僅包括住院治療。其他情境像是門診病人、社區診所和老年照護機構等情況也包括在內。在此就醫期間記錄的持續時間含概此住院紀錄的整個範圍。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization
  min:
    v: 0
  max:
    v: 1
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: .outboundRelationship[typeCode=COMP].target[classCode=ENC, moodCode=EVN]

id:
  v: Encounter.hospitalization.id
path:
  v: Encounter.hospitalization.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:
      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: Encounter.hospitalization.extension
path:
  v: Encounter.hospitalization.extension
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: Encounter.hospitalization.modifierExtension
path:
  v: Encounter.hospitalization.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: 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

id:
  v: Encounter.hospitalization.preAdmissionIdentifier
path:
  v: Encounter.hospitalization.preAdmissionIdentifier
short:
  v: 住院前識別碼
definition:
  v: 住院前識別碼
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization.preAdmissionIdentifier
  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: false
mapping:
  identity:
    v: v2
  map:
    v: PV1-5
mapping:
  identity:
    v: rim
  map:
    v: .id

id:
  v: Encounter.hospitalization.origin
path:
  v: Encounter.hospitalization.origin
short:
  v: 病人住院前來自的地點／機構
definition:
  v: 病人住院前來自的地點／機構
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization.origin
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  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/Location-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Location-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: rim
  map:
    v: .participation[typeCode=ORG].role

id:
  v: Encounter.hospitalization.admitSource
path:
  v: Encounter.hospitalization.admitSource
short:
  v: 病人從哪裡住院（醫生轉介、轉院）？
definition:
  v: 病人從哪裡住院（醫生轉介、轉院）？
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization.admitSource
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: AdmitSource
  strength:
    v: preferred
  description:
    v: 病人從哪裡住院；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-admit-source
    link: http://hl7.org/fhir/ValueSet/encounter-admit-source
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.hospitalization.reAdmission
path:
  v: Encounter.hospitalization.reAdmission
short:
  v: 已發生的醫院再入院型別（如果有的話）。如果該值不存在，則不被認定為再入院。
definition:
  v: 此次住院是否為再入院，如果知道的話，請說明原因。
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization.reAdmission
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: ReAdmissionType
  strength:
    v: example
  description:
    v: 這次住院就醫的再入院原因；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://terminology.hl7.org/ValueSet/v2-0092
    link: http://terminology.hl7.org/ValueSet/v2-0092
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.hospitalization.dietPreference
path:
  v: Encounter.hospitalization.dietPreference
short:
  v: 病人報告的飲食偏好
definition:
  v: 病人報告的飲食偏好
comment:
  v: 例如：一個病人可能同時要求無乳製品和無堅果的飲食偏好（不相互排斥）。
requirements:
  v: 用於追蹤病人的飲食限制和／或偏好。如果要完整描述病人在住院期間的營養需求，應該使用與Encounter連結的nutritionOrder resource。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.hospitalization.dietPreference
  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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: PatientDiet
  strength:
    v: example
  description:
    v: 醫療、文化或道德方面的食物偏好，以幫助滿足飲食要求；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-diet
    link: http://hl7.org/fhir/ValueSet/encounter-diet
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.hospitalization.specialCourtesy
path:
  v: Encounter.hospitalization.specialCourtesy
short:
  v: 特別禮遇（貴賓、董事會成員）
definition:
  v: 特別禮遇（貴賓、董事會成員）
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.hospitalization.specialCourtesy
  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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Courtesies
  strength:
    v: preferred
  description:
    v: 特別禮遇；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-special-courtesy
    link: http://hl7.org/fhir/ValueSet/encounter-special-courtesy
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.hospitalization.specialArrangement
path:
  v: Encounter.hospitalization.specialArrangement
short:
  v: 輪椅、翻譯人員、擔架等。
definition:
  v: 對此次住院就醫提出的任何特殊要求，如提供特定設備或其他東西。
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.hospitalization.specialArrangement
  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
condition:
  v: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Arrangements
  strength:
    v: preferred
  description:
    v: 特殊安排；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-special-arrangements
    link: http://hl7.org/fhir/ValueSet/encounter-special-arrangements
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.hospitalization.destination
path:
  v: Encounter.hospitalization.destination
short:
  v: 病人出院地點／機構
definition:
  v: 病人出院地點／機構
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization.destination
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  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://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: v2
  map:
    v: PV1-37
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=DST]

id:
  v: Encounter.hospitalization.dischargeDisposition
path:
  v: Encounter.hospitalization.dischargeDisposition
short:
  v: 出院後的地點類別或種類
definition:
  v: 出院後的地點類別或種類
comment:
  v: Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.hospitalization.dischargeDisposition
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: DischargeDisp
  strength:
    v: example
  description:
    v: 出院處置；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition
    link: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.location
path:
  v: Encounter.location
short:
  v: 病人曾去過的一個或多個地點
definition:
  v: 此次就醫期間，病人曾去過的一個或多個地點
comment:
  v: 透過指定一個型別「種類（kind）」的地點參照，例如「客戶的家」，以及encounter.class =「虛擬（virtual）」。
min:
  v: 0
max:
  v: *
base:
  path:
    v: Encounter.location
  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=LOC]

id:
  v: Encounter.location.id
path:
  v: Encounter.location.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:
      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: Encounter.location.extension
path:
  v: Encounter.location.extension
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: Encounter.location.modifierExtension
path:
  v: Encounter.location.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: 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

id:
  v: Encounter.location.location
path:
  v: Encounter.location.location
short:
  v: 就醫發生的地點
definition:
  v: 就醫發生的地點
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Encounter.location.location
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Location-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Location-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
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.location
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]
mapping:
  identity:
    v: v2
  map:
    v: PV1-3 / PV1-6 / PV1-11 / PV1-42 / PV1-43
mapping:
  identity:
    v: rim
  map:
    v: .role

id:
  v: Encounter.location.status
path:
  v: Encounter.location.status
short:
  v: planned | active | reserved | completed
definition:
  v: 參與者在指定期間於特定地點的狀態。如果參與者已不在此地點，那麼其期間將有一個結束日期/時間。
comment:
  v: 當病人不再在某一地點活動時，則要輸入期間結束日期，狀態可改為完成。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.location.status
  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:
      v: EncounterLocationStatus
  strength:
    v: required
  description:
    v: 就醫地點的狀態；應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: .role.statusCode

id:
  v: Encounter.location.physicalType
path:
  v: Encounter.location.physicalType
short:
  v: 地點的實體型別（通常是地點的層級—床位、房間、病房等）。
definition:
  v: 這將被用來指定所需的地點層級（床位／病房／房間／等），以簡化訊息傳遞或查詢。
comment:
  v: 此資訊是從Location resource中反正規化(de-normalized)，以較易理解Encounter resource及支持訊息傳遞或查詢的處理。地點的層級結構中可能有許多層級，這可能只挑選特定使用情境所需的特定層級。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.location.physicalType
  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: ele-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
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: PhysicalType
  strength:
    v: example
  description:
    v: 地點的實體型別；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/location-physical-type
    link: http://hl7.org/fhir/ValueSet/location-physical-type
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CE/CNE/CWE
mapping:
  identity:
    v: rim
  map:
    v: CD
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept rdfs:subClassOf dt:CD

id:
  v: Encounter.location.period
path:
  v: Encounter.location.period
short:
  v: 病人出現在此地點的時段
definition:
  v: 病人出現在此地點的時段
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.location.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: false
mapping:
  identity:
    v: rim
  map:
    v: .time

id:
  v: Encounter.serviceProvider
path:
  v: Encounter.serviceProvider
short:
  v: 負責這次就醫的機構
definition:
  v: 對此次就醫的服務負主要責任的機構。這可能與病人紀錄中的機構相同，但也可能不同，例如：如果執行服務的人員來自外部機構（可單獨計費）的外部諮詢。請參考Bundle範例顯示結腸鏡檢查就醫縮略集。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.serviceProvider
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  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
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.actor
mapping:
  identity:
    v: v2
  map:
    v: PL.6 & PL.1
mapping:
  identity:
    v: rim
  map:
    v: .particiaption[typeCode=PFM].role

id:
  v: Encounter.partOf
path:
  v: Encounter.partOf
short:
  v: 此就醫是哪次就醫的一部份？
definition:
  v: 此就醫是哪次就醫的一部分（行政上或時間上）
comment:
  v: 這也用於將小孩的就醫與母親的就醫作關聯。 詳情請參考Patient resource中的Notes小節。
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Encounter.partOf
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy
    value:
      v: true
  code:
    v: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Encounter-twcore
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Encounter-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: workflow
  map:
    v: Event.partOf
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=COMP].source[classCode=COMP, moodCode=EVN]

element:
  id:
    v: Encounter
  path:
    v: Encounter
  short:
    v: 此IG將非FHIR標準的健康存摺JSON格式與目前次世代數位醫療平台採用的FHIR國際標準整合
  definition:
    v: 病人和健康照護服務提供者之間的互動，目的是提供健康照護服務或評估病人的健康狀況。
element:
  id:
    v: Encounter.id
  path:
    v: Encounter.id
  short:
    v: 不重複的ID用以識別儲存在特定FHIR Server中的Encounter紀錄，通常又稱為邏輯性ID。
  definition:
    v: resource的邏輯ID，在resource的URL中使用。一旦指定，這個值永遠不會改變。
  comment:
    v: 一個resource使用新增操作（create operation）提交給伺服器時，此resource沒有id，它的id在resource被創建後由伺器分配/指定。
element:
  id:
    v: Encounter.meta
  path:
    v: Encounter.meta
  short:
    v: 此Encounter Resource的metadata
  definition:
    v: 關於resource的metadata。這是由基礎建設維護的內容。內容的更改可能並不總是與resource的版本更改相關聯。
element:
  id:
    v: Encounter.implicitRules
  path:
    v: Encounter.implicitRules
  short:
    v: 創建此內容所依據的一組規則
  definition:
    v: 構建resource時遵循的一系列規則的參照，在處理內容時必須理解這些規則。通常這是對IG所定義之特殊規則及其他profiles的參照。
  comment:
    v: 宣告這套規則限制了內容只能被有限的交易夥伴所理解。這從本質上限制了資料的長期有用性。然而，現有的健康生態體系高度分裂，還沒有準備好以普遍可計算的方式定義、收集和交換資料。只要有可能，實作者和/或規範編寫者應該避免使用這個資料項目。通常在使用時，此URL是對IG的參照，此IG將這些特殊規則與其他profiles、value sets等一起定義為其敘述的一部分。
element:
  id:
    v: Encounter.language
  path:
    v: Encounter.language
  short:
    v: 用以表述Encounter Resource內容的語言。
  definition:
    v: 編寫此resource的語言
  comment:
    v: 提供語言是為了支援索引和可存取性（通常，文字表述轉語音等服務使用此語言標籤）。html lanuage tag適用於此敘述。resource上的語言標籤可用於指定從resource中的資料所產成的其他表述之語言。不是所有的內容都必須使用此語言。不應該假定Resource.language自動適用於敘述。如果指定語言，它也應該被指定在html中的div資料項目（關於xml:lang和html lang屬性之間的關係，見HTML5中的規則）。
  example:
    label:
      v: Value
    value:
      v: zh-TW
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
      value:
        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:
        v: Language
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding
      value:
        v: true
    strength:
      v: preferred
    description:
      v: 人類語言；鼓勵使用CommonLanguages代碼表中的代碼，但不強制一定要使用此代碼表，你也可使用其他代碼表的代碼或單純以文字表示。
    value set:
      v: http://hl7.org/fhir/ValueSet/languages
      link: http://hl7.org/fhir/ValueSet/languages
element:
  id:
    v: Encounter.text
  path:
    v: Encounter.text
  short:
    v: Encounter Resource之內容摘要以供人閱讀
  definition:
    v: 人可讀的敘述，包含resource的摘要，可用於向人表述resource的內容。敘述不需要對所有的結構化資料進行編碼，但需要包含足夠的細節使人在閱讀敘述時理解「臨床安全性」。resource定義有哪些內容應該在敘述中表示，以確保臨床安全。
  comment:
    v: 內嵌（contained）的resource沒有敘述，非內嵌（contained）的resource則 **建議應該（SHOULD）** 有敘述。有時resource可能只有文字表述，很少或沒有額外的結構化資料（只要滿足所有minOccurs=1的資料項目）。這可能出現在舊系統的資料，當資訊以 「文字表述區塊（text blob） 」的形式被取得，或者文字表述是原始輸入或說明，而編碼資訊稍後再添加。
element:
  id:
    v: Encounter.identifier
  path:
    v: Encounter.identifier
  short:
    v: 此就醫事件的識別碼
  definition:
    v: 此就醫事件的識別碼
  must support:
    v: true
element:
  id:
    v: Encounter.identifier.use
  path:
    v: Encounter.identifier.use
  short:
    v: usual ｜ official ｜ temp ｜ secondary ｜ old （如果知道）
  definition:
    v: 這個唯一識別碼（identifier）的用途
  comment:
    v: 應用程式可以假定一個識別碼是永久的，除非它明確說它是暫時的。
  requirements:
    v: 允許從一組識別碼中為特定的使用情境選擇適當的識別碼
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      value:
        v: IdentifierUse
    strength:
      v: required
    description:
      v: 如果知道，請說明此識別碼的用途；應填入所綁定值集中的其中一個代碼。
    value set:
      v: http://hl7.org/fhir/ValueSet/identifier-use|4.0.1
      link: 4.0
      link: .1
element:
  id:
    v: Encounter.identifier.type
  path:
    v: Encounter.identifier.type
  short:
    v: 識別碼（identifier）的型別說明
  definition:
    v: 識別碼的代碼型別，用於決定特定目的適用的識別碼。
  comment:
    v: 這個資料項目只涉及識別碼的一般類別。它 **必須沒有（SHALL NOT）** 被用於與Identifier.system 1..1對應的代碼。一些識別碼可能由於常見的用法而屬於多個類別。在系統是已知的情況下，型別是不必要的，因為型別總是系統定義的一部分。然而，系統經常需要處理系統不為人知的識別碼。型別和系統之間不是1:1的關係，因為許多不同的系統有相同的型別。
  requirements:
    v: 允許使用者在不知道識別碼系統的情況下利用識別碼
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      value:
        v: IdentifierType
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding
      value:
        v: true
    strength:
      v: extensible
    description:
      v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
    value set:
      v: http://hl7.org/fhir/ValueSet/identifier-type
      link: http://hl7.org/fhir/ValueSet/identifier-type
element:
  id:
    v: Encounter.identifier.system
  path:
    v: Encounter.identifier.system
  short:
    v: 識別碼（identifier）的命名空間（namespace）
  definition:
    v: 建立值的命名空間－即一個描述一組值的唯一URL
  comment:
    v: Identifier.system總是區分大小寫
  requirements:
    v: 有許多識別碼的集合。為了進行兩個識別碼的對應，我們需要知道我們處理的是哪一組。系統指明了一個特定的唯一識別碼集。
  min:
    v: 1
  must support:
    v: true
element:
  id:
    v: Encounter.identifier.value
  path:
    v: Encounter.identifier.value
  short:
    v: 唯一值
  definition:
    v: 識別碼中通常與使用者有關的部分，在系統情境內是唯一的。
  comment:
    v: 如果此值是一個完整的URI，那麼此系統 **必須（SHALL）** 是urn:ietf:rfc:3986。此值的主要目的是為了可運算的對應。因此，為了比較的目的，它可能會被正規化（例如：去除不重要的空白、破折號等）。一個為人顯示的格式化的值可以使用[Rendered Value]（http://hl7.org/fhir/R4/extension-rendered-value.html）擴充來傳達。除非對Identifier.system的了解使處理者確信不區分大小寫的處理是安全的，否則Identifier.value應被視為區分大小寫。
  min:
    v: 1
  must support:
    v: true
element:
  id:
    v: Encounter.identifier.period
  path:
    v: Encounter.identifier.period
  short:
    v: 此就醫事件識別碼（identifier）的使用效期
  definition:
    v: 識別碼有效／曾經有效使用的時段或期間

id:
  v: Encounter.identifier.assigner
path:
  v: Encounter.identifier.assigner
short:
  v: 簽發identifier的機構（可以只是文字表述）
definition:
  v: 簽發／管理識別碼的機構
comment:
  v: Identifier.assigner可以省略.reference資料項目，只包含一個.display資料項目，反映指定機構的名稱或其他文字表述資訊。

id:
  v: Encounter.status
path:
  v: Encounter.status
comment:
  v: 請注意，內部業務規則將決定於狀態（也包括類別）間可能發生的適當轉換。
must support:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterStatus
  strength:
    v: required
  description:
    v: 就醫現況的代碼；應填入所綁定值集中的其中一個代碼
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
    link: 4.0
    link: .1

id:
  v: Encounter.statusHistory
path:
  v: Encounter.statusHistory
short:
  v: 過去的就醫狀態清單
definition:
  v: Encounter resource包含狀態歷史，因而不需閱讀resource的歷史版本，甚至不需讓伺服器儲存這些版本。
comment:
  v: 總是可在resource的目前版本找到目前狀態，而不是在狀態歷史中找到。

id:
  v: Encounter.statusHistory.status
path:
  v: Encounter.statusHistory.status
definition:
  v: planned | arrived | triaged | in-progress | onleave | finished | cancelled +
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterStatus
  strength:
    v: required
  description:
    v: 就醫現狀的代碼；應填入所綁定值集中的其中一個代碼
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-status|4.0.1
    link: 4.0
    link: .1

id:
  v: Encounter.statusHistory.period
path:
  v: Encounter.statusHistory.period
short:
  v: 該事件處於特定狀態的時間
definition:
  v: 該事件處於特定狀態的時間

id:
  v: Encounter.class
path:
  v: Encounter.class
short:
  v: 病人就醫的分類
definition:
  v: 病人就醫分類的概念，例如：門診病人、住院病人、急診病人、居家照護或其他因地方不同而產生的概念。
must support:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterClass
  strength:
    v: extensible
  description:
    v: 就醫的分類；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
    link: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode

id:
  v: Encounter.classHistory
path:
  v: Encounter.classHistory
short:
  v: 過去就醫類別的列表
definition:
  v: 可透過類別歷史而不需要透過resource歷史紀錄來追蹤就醫的轉變，這將用於一個案例，即住院急診，然後轉住院的情況。這樣做而不重新啟動一個新的就醫，可以確保任何實驗室/診斷結果可以更容易地跟隨病人，不需要重新處理，也不會在從急診到住院的出院過程中丟失或取消。

id:
  v: Encounter.classHistory.class
path:
  v: Encounter.classHistory.class
short:
  v: = AMB(r1), IMP(r2), OBSENC(r7)
definition:
  v: inpatient ｜ outpatient ｜ ambulatory ｜ emergency +. 住院病人 ｜ 門診病人 ｜ 非臥床（可行走）病人醫療服務 ｜ 急診 +
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterClass
  strength:
    v: extensible
  description:
    v: 就醫類別；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode
    link: http://terminology.hl7.org/ValueSet/v3-ActEncounterCode

id:
  v: Encounter.classHistory.period
path:
  v: Encounter.classHistory.period
short:
  v: 此就醫事件處於特定類別的時間
definition:
  v: 此就醫事件處於特定類別的時間

id:
  v: Encounter.type
path:
  v: Encounter.type
short:
  v: 就醫的特定型別
definition:
  v: 就醫的特定型別（如電子郵件諮詢、手術日間照護、專業護理、復健）。
comment:
  v: 由於有許多方法可以對就醫進行進一步的分類，所以這個資料項目的基數是0...* ，意即可不填寫或填寫數筆。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterType
  strength:
    v: example
  description:
    v: 就醫的型別；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-type
    link: http://hl7.org/fhir/ValueSet/encounter-type

id:
  v: Encounter.serviceType
path:
  v: Encounter.serviceType
short:
  v: 服務的特定型別
definition:
  v: 對所提供的服務進行廣泛的分類（如心臟科）
must support:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterServiceType
  strength:
    v: example
  description:
    v: 對提供的服務進行廣泛分類；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/service-type
    link: http://hl7.org/fhir/ValueSet/service-type

id:
  v: Encounter.serviceType.coding
path:
  v: Encounter.serviceType.coding
slicing:
  discriminator:
    type:
      v: pattern
    path:
      v: system
  rules:
    v: open

id:
  v: Encounter.priority
path:
  v: Encounter.priority
short:
  v: 表明就醫的急迫性
definition:
  v: 表明就醫的急迫性
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Priority
  strength:
    v: example
  description:
    v: 表明就醫的迫切性；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-ActPriority
    link: http://terminology.hl7.org/ValueSet/v3-ActPriority

id:
  v: Encounter.subject
path:
  v: Encounter.subject
short:
  v: Patient Resource urn:uuid:ResourceID
definition:
  v: 在場就醫的病人或實體集合（Group）
comment:
  v: 雖然就醫總是關於病人，但在所有的使用情境中，病人實際上可能並不為人所知及可能有一群病人是匿名的（例如：匿名酗酒者的團體治療中—就醫紀錄是以人數/工作人員數計費，而具體病人的情境並不重要）；或者在獸醫照護中，一群羊接受治療（動物沒有被單獨追蹤）。
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    link: http://hl7.org/fhir/StructureDefinition/Group
must support:
  v: true

id:
  v: Encounter.episodeOfCare
path:
  v: Encounter.episodeOfCare
short:
  v: 此次就醫應記錄的照護事件
definition:
  v: 當某一特定就醫應被歸類為某一特定照護事件的一部分時，應使用這一個資料項目。這種關聯可方便地將相關的就醫分類，以達到特定的目的，如政府報告、問題追蹤、透過共同的問題進行關聯，關聯通常會在照護事件之後記錄在就醫紀錄上，並在紀錄上分類；而不是將另一個就醫（照護事件可能橫跨多年）附件到照護事件紀錄。

id:
  v: Encounter.basedOn
path:
  v: Encounter.basedOn
short:
  v: 開始此次就醫的服務請求（ServiceRequest）
definition:
  v: 此就醫事件所要滿足的請求（例如：轉診或手術請求）

id:
  v: Encounter.participant
path:
  v: Encounter.participant
short:
  v: 參與就醫的健康照護服務提供者之名單
definition:
  v: 負責提供健康照護服務的人員名單
must support:
  v: true

id:
  v: Encounter.participant.type
path:
  v: Encounter.participant.type
short:
  v: 參與者在病人就醫事件中的角色
definition:
  v: 參與者在病人就醫事件中的角色
comment:
  v: 參與者的型別表明個人如何參與病人的就醫事件。它包括非執業醫師的參與者，而對於執業醫師來說，這是為了描述在這次就醫中的活動型別（例如：住院醫生、主治醫生、翻譯者、諮詢醫生）。這與執業醫師的角色不同，執業醫師是功能性的角色，衍生自來僱用、教育、執照等。
must support:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: ParticipantType
  strength:
    v: extensible
  description:
    v: 參與者在病人就醫事件中的角色；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-participant-type
    link: http://hl7.org/fhir/ValueSet/encounter-participant-type

id:
  v: Encounter.participant.period
path:
  v: Encounter.participant.period
short:
  v: 參與者在病人就醫期間參與的時段
definition:
  v: 指定的參與者參與病人就醫的時段。這些時段可以是重疊的，也可以是整個就醫的時段的子集。
must support:
  v: true

id:
  v: Encounter.participant.individual
path:
  v: Encounter.participant.individual
short:
  v: 除病人外，參與病人就醫事件的人。
definition:
  v: 除病人外，參與病人就醫事件的人。
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    link: http://hl7.org/fhir/StructureDefinition/RelatedPerson
must support:
  v: true

id:
  v: Encounter.appointment
path:
  v: Encounter.appointment
short:
  v: 這次就醫的預約紀錄
definition:
  v: 這次就醫的預約紀錄

id:
  v: Encounter.period
path:
  v: Encounter.period
short:
  v: 就醫的開始和結束時間
definition:
  v: 就醫的開始和結束時間
comment:
  v: 如果（尚）不知道，可以省略「期間」裡的結束日期時間。
must support:
  v: true

id:
  v: Encounter.length
path:
  v: Encounter.length
short:
  v: 就醫持續的時間（扣除缺席時間）
definition:
  v: 就醫持續的時間，這不包括請假缺席的時間。
comment:
  v: 由於請假，可能與就醫的開始和結束時間（Encounter.period）不同。

id:
  v: Encounter.reasonCode
path:
  v: Encounter.reasonCode
short:
  v: 就醫發生的編碼原因
definition:
  v: 就醫發生的原因，以代碼表示。對於住院，這可用於住院診斷代碼。
comment:
  v: 對於需要知道哪個是主要診斷的系統來說，這些將用標準擴充primaryDiagnosis（這是一個序列值而不是一個標誌，1=主要診斷）來標記。
must support:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterReason
  strength:
    v: preferred
  description:
    v: 發生此就醫事件的原因；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-reason
    link: http://hl7.org/fhir/ValueSet/encounter-reason

id:
  v: Encounter.reasonReference
path:
  v: Encounter.reasonReference
short:
  v: 就醫發生的原因（參照）
definition:
  v: 就醫發生的原因，以代碼表示。對於住院，這可用於住院診斷代碼。
comment:
  v: 對於需要知道哪個是主要診斷的系統來說，這些將用標準擴充primaryDiagnosis（這是一個序列值而不是一個標誌，1=主要診斷）來標記。
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
    link: http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation

id:
  v: Encounter.diagnosis
path:
  v: Encounter.diagnosis
short:
  v: 與此就醫相關的診斷清單
definition:
  v: 與此就醫相關的診斷清單

id:
  v: Encounter.diagnosis.condition
path:
  v: Encounter.diagnosis.condition
short:
  v: 與就醫事件相關的診斷或處置
definition:
  v: 就醫的原因，使用其他resource的資訊以具體說明。對於住院，這就是住院診斷。指示通常是一個病情、問題或診斷（Condition）（在evidence.detail中參照其他resource），或一個處置（Procedure）。
comment:
  v: 對於需要知道哪個是主要診斷的系統來說，這些將用標準擴充primaryDiagnosis（這是一個序列值而不是一個標誌，1=主要診斷）來標記。

id:
  v: Encounter.diagnosis.use
path:
  v: Encounter.diagnosis.use
short:
  v: 此診斷在病人就醫事件中的作用（例如：住院、收費、出院...）。
definition:
  v: 此診斷在病人就醫事件中的作用（例如：住院、收費、出院...）。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: DiagnosisRole
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding
    value:
      v: true
  strength:
    v: preferred
  description:
    v: 此情況所代表的診斷型別；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/diagnosis-role
    link: http://hl7.org/fhir/ValueSet/diagnosis-role

id:
  v: Encounter.diagnosis.rank
path:
  v: Encounter.diagnosis.rank
short:
  v: 診斷的排序（針對每個角色型別）
definition:
  v: 診斷的排序（針對每個角色型別）

id:
  v: Encounter.account
path:
  v: Encounter.account
short:
  v: 可用於為此病人就醫事件計費的一組帳戶
definition:
  v: 可用於為此病人就醫事件計費的一組帳戶
comment:
  v: 計費系統可依據內部業務規則，選擇將與就醫（Encounter）相關的應計費項目分配給不同的參照帳戶。

id:
  v: Encounter.hospitalization
path:
  v: Encounter.hospitalization
short:
  v: 關於入院接受健康照護服務的細節
definition:
  v: 關於入院接受健康照護服務的細節
comment:
  v: 就醫可能不僅僅包括住院治療。其他情境像是門診病人、社區診所和老年照護機構等情況也包括在內。在此就醫期間記錄的持續時間含概此住院紀錄的整個範圍。
must support:
  v: true

id:
  v: Encounter.hospitalization.preAdmissionIdentifier
path:
  v: Encounter.hospitalization.preAdmissionIdentifier
short:
  v: 住院前識別碼
definition:
  v: 住院前識別碼

id:
  v: Encounter.hospitalization.origin
path:
  v: Encounter.hospitalization.origin
short:
  v: 病人住院前來自的地點／機構
definition:
  v: 病人住院前來自的地點／機構

id:
  v: Encounter.hospitalization.admitSource
path:
  v: Encounter.hospitalization.admitSource
short:
  v: 病人從哪裡住院（醫生轉介、轉院）？
definition:
  v: 病人從哪裡住院（醫生轉介、轉院）？
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: AdmitSource
  strength:
    v: preferred
  description:
    v: 病人從哪裡住院；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-admit-source
    link: http://hl7.org/fhir/ValueSet/encounter-admit-source

id:
  v: Encounter.hospitalization.reAdmission
path:
  v: Encounter.hospitalization.reAdmission
short:
  v: 已發生的醫院再入院型別（如果有的話）。如果該值不存在，則不被認定為再入院。
definition:
  v: 此次住院是否為再入院，如果知道的話，請說明原因。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: ReAdmissionType
  strength:
    v: example
  description:
    v: 這次住院就醫的再入院原因；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://terminology.hl7.org/ValueSet/v2-0092
    link: http://terminology.hl7.org/ValueSet/v2-0092

id:
  v: Encounter.hospitalization.dietPreference
path:
  v: Encounter.hospitalization.dietPreference
short:
  v: 病人報告的飲食偏好
definition:
  v: 病人報告的飲食偏好
comment:
  v: 例如：一個病人可能同時要求無乳製品和無堅果的飲食偏好（不相互排斥）。
requirements:
  v: 用於追蹤病人的飲食限制和／或偏好。如果要完整描述病人在住院期間的營養需求，應該使用與Encounter連結的nutritionOrder resource。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: PatientDiet
  strength:
    v: example
  description:
    v: 醫療、文化或道德方面的食物偏好，以幫助滿足飲食要求；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-diet
    link: http://hl7.org/fhir/ValueSet/encounter-diet

id:
  v: Encounter.hospitalization.specialCourtesy
path:
  v: Encounter.hospitalization.specialCourtesy
short:
  v: 特別禮遇（貴賓、董事會成員）
definition:
  v: 特別禮遇（貴賓、董事會成員）
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Courtesies
  strength:
    v: preferred
  description:
    v: 特別禮遇；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-special-courtesy
    link: http://hl7.org/fhir/ValueSet/encounter-special-courtesy

id:
  v: Encounter.hospitalization.specialArrangement
path:
  v: Encounter.hospitalization.specialArrangement
short:
  v: 輪椅、翻譯人員、擔架等。
definition:
  v: 對此次住院就醫提出的任何特殊要求，如提供特定設備或其他東西。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Arrangements
  strength:
    v: preferred
  description:
    v: 特殊安排；鼓勵使用所綁定值集中的代碼，但不強制一定要使用此值集，你也可使用其他值集的代碼或單純以文字表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-special-arrangements
    link: http://hl7.org/fhir/ValueSet/encounter-special-arrangements

id:
  v: Encounter.hospitalization.destination
path:
  v: Encounter.hospitalization.destination
short:
  v: 病人出院地點／機構
definition:
  v: 病人出院地點／機構

id:
  v: Encounter.hospitalization.dischargeDisposition
path:
  v: Encounter.hospitalization.dischargeDisposition
short:
  v: 出院後的地點類別或種類
definition:
  v: 出院後的地點類別或種類
must support:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: DischargeDisp
  strength:
    v: example
  description:
    v: 出院處置；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition
    link: http://hl7.org/fhir/ValueSet/encounter-discharge-disposition

id:
  v: Encounter.location
path:
  v: Encounter.location
short:
  v: 病人曾去過的一個或多個地點
definition:
  v: 此次就醫期間，病人曾去過的一個或多個地點
comment:
  v: 透過指定一個型別「種類（kind）」的地點參照，例如「客戶的家」，以及encounter.class =「虛擬（virtual）」。
must support:
  v: true

id:
  v: Encounter.location.location
path:
  v: Encounter.location.location
short:
  v: 就醫發生的地點
definition:
  v: 就醫發生的地點
must support:
  v: true

id:
  v: Encounter.location.status
path:
  v: Encounter.location.status
definition:
  v: 參與者在指定期間於特定地點的狀態。如果參與者已不在此地點，那麼其期間將有一個結束日期/時間。
comment:
  v: 當病人不再在某一地點活動時，則要輸入期間結束日期，狀態可改為完成。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: EncounterLocationStatus
  strength:
    v: required
  description:
    v: 就醫地點的狀態；應填入所綁定值集中的其中一個代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1
    link: 4.0
    link: .1

id:
  v: Encounter.location.physicalType
path:
  v: Encounter.location.physicalType
short:
  v: 地點的實體型別（通常是地點的層級—床位、房間、病房等）。
definition:
  v: 這將被用來指定所需的地點層級（床位／病房／房間／等），以簡化訊息傳遞或查詢。
comment:
  v: 此資訊是從Location resource中反正規化(de-normalized)，以較易理解Encounter resource及支持訊息傳遞或查詢的處理。地點的層級結構中可能有許多層級，這可能只挑選特定使用情境所需的特定層級。
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: PhysicalType
  strength:
    v: example
  description:
    v: 地點的實體型別；可參考所綁定值集，但此值集只是針對這個欄位的一個可能值的範例，不預期也不鼓勵使用者一定要使用此值集的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/location-physical-type
    link: http://hl7.org/fhir/ValueSet/location-physical-type

id:
  v: Encounter.location.period
path:
  v: Encounter.location.period
short:
  v: 病人出現在此地點的時段
definition:
  v: 病人出現在此地點的時段

id:
  v: Encounter.serviceProvider
path:
  v: Encounter.serviceProvider
short:
  v: 負責這次就醫的機構
definition:
  v: 對此次就醫的服務負主要責任的機構。這可能與病人紀錄中的機構相同，但也可能不同，例如：如果執行服務的人員來自外部機構（可單獨計費）的外部諮詢。請參考Bundle範例顯示結腸鏡檢查就醫縮略集。
must support:
  v: true

id:
  v: Encounter.partOf
path:
  v: Encounter.partOf
short:
  v: 此就醫是哪次就醫的一部份？
definition:
  v: 此就醫是哪次就醫的一部分（行政上或時間上）
comment:
  v: 這也用於將小孩的就醫與母親的就醫作關聯。 詳情請參考Patient resource中的Notes小節。