allergyintolerance-twcm
type: StructureDefinition
node role: treeRoot
resource.id:
  value: allergyintolerance-twcm
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Generated Narrative: StructureDefinition allergyintolerance-twcm Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> AllergyIntolerance 0..* TWCoreAllergyIntolerance 過敏或不耐症（通常指：對某種物質有不良反應的風險） #xD; code 1..1 CodeableConceptTW 表明此過敏或不耐症的代碼 Binding: 臺灣健保署2023年中文版ICD-10-CM值集 (extensible) #xD; text 1..1 string 標識過敏或不耐受的描述。[應填入於門診病摘之過敏史Allergy] #xD; patient 1..1 Reference(病人資料(Patient TWCM)) 誰有此過敏或不耐受？ #xD; encounter S 0..1 Reference(就醫事件(Encounter TWCM)) 過敏或不耐症被確認時的就醫事件(Encounter) #xD; recorder 0..1 Reference(健康照護服務提供人員資料(Practitioner TWCM) | TW Core PractitionerRole | 病人資料(Patient TWCM) | TW Core RelatedPerson) 誰記錄了過敏或不耐受 #xD; asserter 0..1 Reference(病人資料(Patient TWCM) | TW Core RelatedPerson | 健康照護服務提供人員資料(Practitioner TWCM) | TW Core PractitionerRole) 關於過敏的資訊來源 #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
structure definition.url:
  value: https://www.nricm.edu.tw/twcm/StructureDefinition/allergyintolerance-twcm
structure definition.version:
  value: 0.1.0
structure definition.name:
  value: AllergyIntoleranceTWCM
structure definition.title:
  value: 過敏或不耐症(AllergyIntolerance TWCM)
structure definition.status:
  value: draft
structure definition.date:
  value: 2026-08-31T14:18:56+00:00
structure definition.publisher:
  value: 衛生福利部國家中醫藥研究所
structure definition.contact:
  index: 0
  contact detail.name:
    value: 衛生福利部國家中醫藥研究所
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: https://www.nricm.edu.tw/
structure definition.description:
  value: 此過敏或不耐症(AllergyIntolerance TWCM)Profile說明本IG如何進一步定義臺灣核心-過敏或不耐症(TW Core AllergyIntolerance) Profile以呈現中醫門診單之過敏與不耐症的詳細資料。
structure definition.fhir version:
  value: 4.0.1
structure definition.mapping:
  index: 0
  structure definition.mapping.identity:
    value: rim
  structure definition.mapping.uri:
    value: http://hl7.org/v3
  structure definition.mapping.name:
    value: RIM Mapping
structure definition.mapping:
  index: 1
  structure definition.mapping.identity:
    value: w5
  structure definition.mapping.uri:
    value: http://hl7.org/fhir/fivews
  structure definition.mapping.name:
    value: FiveWs Pattern Mapping
structure definition.mapping:
  index: 2
  structure definition.mapping.identity:
    value: v2
  structure definition.mapping.uri:
    value: http://hl7.org/v2
  structure definition.mapping.name:
    value: HL7 v2 Mapping
structure definition.kind:
  value: resource
structure definition.abstract:
  value: false
structure definition.type:
  value: AllergyIntolerance
structure definition.base definition:
  value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/AllergyIntolerance-twcore
  link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/AllergyIntolerance-twcore
structure definition.derivation:
  value: constraint
structure definition.snapshot:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    extension.value string:
      value: 0.3.2
  structure definition.snapshot.element:
    index: 0
    element.id:
      value: AllergyIntolerance
    element definition.path:
      value: AllergyIntolerance
    element definition.short:
      value: 過敏或不耐症（通常指：對某種物質有不良反應的風險）
    element definition.definition:
      value: 可能對個人產生有害或不希望的生理反應的風險，這種反應是與暴露於某種物質相關的，並且對每個人來說都是獨特的。
    element definition.comment:
      value: 物質包括但不限於：適合個人的劑量正確使用的治療性物質、食品、來自植物或動物的材質、或昆蟲叮咬所釋放的毒液。
    element definition.alias:
      value: Allergy
      index: 0
    element definition.alias:
      value: Intolerance
      index: 1
    element definition.alias:
      value: Adverse Reaction
      index: 2
    element definition.min:
      value: 0
    element definition.max:
      value: *
    element definition.base:
      element definition.base.path:
        value: AllergyIntolerance
      element definition.base.min:
        value: 0
      element definition.base.max:
        value: *
    element definition.constraint:
      index: 0
      element definition.constraint.key:
        value: ait-1
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: AllergyIntolerance.clinicalStatus SHALL be present if verificationStatus is not entered-in-error.
      element definition.constraint.expression:
        value: verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').exists() or clinicalStatus.exists()
      element definition.constraint.xpath:
        value: f:verificationStatus/f:coding/f:code/@value='entered-in-error' or exists(f:clinicalStatus)
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/AllergyIntolerance
        link: http://hl7.org/fhir/StructureDefinition/AllergyIntolerance
    element definition.constraint:
      index: 1
      element definition.constraint.key:
        value: ait-2
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: AllergyIntolerance.clinicalStatus SHALL NOT be present if verification Status is entered-in-error
      element definition.constraint.expression:
        value: verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').empty() or clinicalStatus.empty()
      element definition.constraint.xpath:
        value: not(f:verificationStatus/f:coding/f:code/@value='entered-in-error') or not(exists(f:clinicalStatus))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/AllergyIntolerance
        link: http://hl7.org/fhir/StructureDefinition/AllergyIntolerance
    element definition.constraint:
      index: 2
      element definition.constraint.key:
        value: dom-2
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      element definition.constraint.expression:
        value: contained.contained.empty()
      element definition.constraint.xpath:
        value: not(parent::f:contained and f:contained)
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 3
      element definition.constraint.key:
        value: dom-3
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
      element definition.constraint.expression:
        value: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      element definition.constraint.xpath:
        value: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 4
      element definition.constraint.key:
        value: dom-4
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      element definition.constraint.expression:
        value: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      element definition.constraint.xpath:
        value: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 5
      element definition.constraint.key:
        value: dom-5
      element definition.constraint.severity:
        value: error
      element definition.constraint.human:
        value: If a resource is contained in another resource, it SHALL NOT have a security label
      element definition.constraint.expression:
        value: contained.meta.security.empty()
      element definition.constraint.xpath:
        value: not(exists(f:contained/*/f:meta/f:security))
      element definition.constraint.source:
        value: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    element definition.constraint:
      index: 6
      element.extension:
        index: 0

value: true

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

value: dom-6

value: warning

value: A resource should have narrative for robust management

value: text.`div`.exists()

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

value: false

value: false

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

index: 1
element definition.mapping.identity:
  value: rim
element definition.mapping.map:
  value: Observation[classCode=OBS, moodCode=EVN]

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

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

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

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

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

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

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

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

index: 9
element.id:
  value: AllergyIntolerance.identifier
element definition.path:
  value: AllergyIntolerance.identifier
element definition.short:
  value: 過敏或不耐症之外部識別碼
element definition.definition:
  value: 由執行者或其他系統指定給這個AllergyIntolerance的業務識別碼，隨著resource更新和從伺服器到伺服器的傳送，這些識別碼保持不變。
element definition.comment:
  value: 這是過敏或不耐症紀錄的業務識別碼，不是一個 resource 識別碼（請參見討論小節）。最好的做法是該識別碼只出現在單一個resource實例上，但是實務上有時會要求具有相同識別碼的多個resource實例共存，這些 resources 實例甚至可能屬於不同的resource類型。例如：多個 Patient及一個Person resource實例可能共用同一個社會保險碼(此處是指美國民眾會有唯一可識別的社會保險碼)。
element definition.requirements:
  value: 允許各參與系統按照一致的方式，在不同伺服器之間確認並識別 AllergyIntolerance。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.identifier
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Identifier
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.identifier
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: IAM-7
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: id

index: 10
element.id:
  value: AllergyIntolerance.clinicalStatus
element definition.path:
  value: AllergyIntolerance.clinicalStatus
element definition.short:
  value: active | inactive | resolved ，過敏或不耐症的臨床狀態。
element definition.definition:
  value: 過敏或不耐症的臨床狀態
element definition.comment:
  value: 如果 clincalStatus 缺少資料，請查閱討論小節。其資料類型是CodeableConcept，這是因為clinicalStatus涉及到一些臨床判斷，可能需要的具體性超過FHIR值集所要求的範圍。例如：SNOMED代碼可能提供額外的的具體性。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.clinicalStatus
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: AllergyIntoleranceClinicalStatus
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 11
element.id:
  value: AllergyIntolerance.verificationStatus
element definition.path:
  value: AllergyIntolerance.verificationStatus
element definition.short:
  value: unconfirmed | confirmed | refuted | entered-in-error ，一個人對特定物質產生反應的可能性或風險有多確定的陳述。
element definition.definition:
  value: 一個人對某已識別物質（包括醫藥產品）產生反應的可能性或風險有多確定的陳述
element definition.comment:
  value: 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.
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.verificationStatus
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: AllergyIntoleranceVerificationStatus
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/allergyintolerance-verification|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 12
element.id:
  value: AllergyIntolerance.type
element definition.path:
  value: AllergyIntolerance.type
element definition.short:
  value: allergy | intolerance - 根本原因或運作機制（如果知道）。
element definition.definition:
  value: 為什麼某人對特定物質（如藥物或食物）會有反應的生理根本原因
element definition.comment:
  value: 過敏反應通常是我們身體免疫系統的一種反應，它被認為可能預示著未來有更嚴重的健康風險。然而，現代醫學研究顯示，有些過去被認為是免疫反應的情況實際上可能並不是，但仍然可能對生命造成危害。有時候，醫生難以確定一個特定反應的機制是免疫相關還是非免疫相關的。此外，「過敏」這個詞經常被廣泛地使用，並且可能與「不耐症」這個詞的使用有所重疊。在實際應用中，這兩個概念的界限可能不太清晰或不容易理解。儘管如此，醫療紀錄中仍然包含了有關過敏反應的資訊，因為許多既有的醫療系統都已經收集了這些資料。免疫學檢測可以提供一些證據幫助確定反應的基礎和引起反應的物質，但這些檢測並不總是百分之百準確，無法100％確定對特定物質的敏感性。如果不清楚反應是否由過敏引起還是由不耐症引起，那麼在醫療紀錄中最好不要具體指定反應的類型，即可忽略及不填寫此資料項目。
element definition.alias:
  value: Category
  index: 0
element definition.alias:
  value: Class
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.type
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: AllergyIntoleranceType
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 確定反應風險的基本生理機制；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/allergy-intolerance-type|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.class
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: IAM-9
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: code

index: 13
element.id:
  value: AllergyIntolerance.category
element definition.path:
  value: AllergyIntolerance.category
element definition.short:
  value: food | medication | environment | biologic
element definition.definition:
  value: 被識別的物質的類別
element definition.comment:
  value: 這個資料資料項目被包括在內，因為它目前正在一些臨床系統中被採集。這個資料可以從使用編碼系統的物質中得到，在這種情況下實際上是多餘的。當按類別查詢時，考慮沒有類別的AllergyIntoleranceresource的影響。例如，當查詢類別=藥品時，沒有類別價值的藥品過敏將不會被返回。關於如何用:缺失修飾符查詢類別以獲得沒有類別的過敏，請參考查詢的更多資訊。此外，類別應謹慎使用，因為類別可能是基於寄件者的主觀因素。
element definition.alias:
  value: Category
  index: 0
element definition.alias:
  value: Type
  index: 1
element definition.alias:
  value: Reaction Type
  index: 2
element definition.alias:
  value: Class
  index: 3
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.category
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: AllergyIntoleranceCategory
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 確定的物質的類別；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/allergy-intolerance-category|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.class
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: AL1-2
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: value < IntoleranceValue (Agent)

index: 14
element.id:
  value: AllergyIntolerance.criticality
element definition.path:
  value: AllergyIntolerance.criticality
element definition.short:
  value: low | high | unable-to-assess
element definition.definition:
  value: 對已識別物質的反應的潛在臨床危害程度，或稱嚴重性估計。
element definition.comment:
  value: 對於任何對可能引發不良反應的傾向，預設的危險程度應該設定為「低風險」，這表示 **至少相對不建議** 有意或自願接觸這種物質。如果醫生識別出對更嚴重或可能危及生命的反應，如過敏性休克的傾向，則將其標記為「高風險」，這表示 **絕對不建議** 有意或自願接觸這種物質。如果缺少這個資料項目，則表示危險程度未知（雖然在其他地方可能已知）。取得疾病層次(condition level)危險性(criticality))的現有系統實際上是在表示危險性的概念，而在反應層次(reaction level)記錄的嚴重性(severity)表示真正的反應嚴重性。現有系統同時記錄疾病危險性和反應嚴重性，可能使用「嚴重性(severity)」一詞來表示兩者。危險性是未來可能出現的最糟糕情況（即不考慮具體情境），而嚴重性則依賴於特定情境。
element definition.alias:
  value: Severity
  index: 0
element definition.alias:
  value: Seriousness
  index: 1
element definition.alias:
  value: Contra-indication
  index: 2
element definition.alias:
  value: Risk
  index: 3
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.criticality
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: AllergyIntoleranceCriticality
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 對已識別物質的反應的潛在臨床危害程度，或稱嚴重性估計；應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.grade
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: AL1-4
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]

index: 15
element.id:
  value: AllergyIntolerance.code
element definition.path:
  value: AllergyIntolerance.code
element definition.short:
  value: 表明此過敏或不耐症的代碼
element definition.definition:
  value: 此資料項目是用來代碼化表示有關過敏或不耐症的資訊。它可以表示對某種物質或藥物產品引發不良反應風險的代碼（例如：「乳膠」），也可以表示有關過敏或不耐症的代碼（例如：「乳膠過敏」），或者是表示對特定物質或類別的否定或排除情況的代碼（例如：「無乳膠過敏」），還可以表示一般性的否定性聲明（例如：「無已知過敏」，「無已知藥品過敏」）。需要注意的是：特定反應的物質可能不同於被認為引發風險的物質，但它們之間必須是一致的，在處理這些資訊時，只處理「code」而忽略「reaction.substance」在臨床上必須在是安全的。如果接收系統無法確認AllergyIntolerance.reaction.substance是否符合AllergyIntolerance.code的語義範圍，則應該忽略AllergyIntolerance.reaction.substance。
element definition.comment:
  value: 建議在填寫過敏或不耐症相關資料時，儘量使用專業術語。常用的專門術語包括RxNorm、SNOMED CT、DM+D、NDFRT、ICD-9、IDC-10、UNII和ATC等。如果找不到合適的專業術語，則可以用文字表述。文字表述還可以提供更多詳細資訊。 當我們為「code」資料項目指定特定物質或產品代碼時，通常意味著該病人對這種物質或產品有過敏或不耐受反應。在SNOMED CT的過敏模型中，這些物質或產品被視為「過敏物質(Causative agent)」。 另外，還有一個名為「substanceExposureRisk」的擴充資料項目，它比「code」資料項目提供更多靈活性，可以用來描述對特定物質或產品的過敏或不耐受反應，無論是正面還是負面。這個擴充資料項目特別有用於表達「沒有已知過敏」或「沒有不良反應風險」的情況，即使對於那些沒有預先確定「無過敏」概念的物質或產品也適用。如果使用了「substanceExposureRisk」擴充資料項目，則應該省略AllergyIntolerance.code資料項目。
element definition.alias:
  value: Code
  index: 0
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.code
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: extensible
  element definition.binding.value set:
    value: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw
    link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

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

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

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

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

index: 20
element.id:
  value: AllergyIntolerance.patient
element definition.path:
  value: AllergyIntolerance.patient
element definition.short:
  value: 誰有此過敏或不耐受？
element definition.definition:
  value: 患有過敏或不耐症的病人
element definition.alias:
  value: Patient
  index: 0
element definition.min:
  value: 1
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.patient
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject[x]
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: (PID-3)
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode=SBJ].role[classCode=PAT]
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.subject

index: 21
element.id:
  value: AllergyIntolerance.encounter
element definition.path:
  value: AllergyIntolerance.encounter
element definition.short:
  value: 過敏或不耐症被確認時的就醫事件(Encounter)
element definition.definition:
  value: 過敏症或不耐症被確認的就醫事件(Encounter)
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.encounter
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.context
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]

index: 22
element.id:
  value: AllergyIntolerance.onset[x]
element definition.path:
  value: AllergyIntolerance.onset[x]
element definition.short:
  value: 過敏或不耐症被識別的時間
element definition.definition:
  value: 過敏或不耐症被識別的估計或實際日期、日期時間或年齡。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.onset[x]
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: dateTime
element definition.type:
  index: 1
  element definition.type.code:
    value: Age
element definition.type:
  index: 2
  element definition.type.code:
    value: Period
element definition.type:
  index: 3
  element definition.type.code:
    value: Range
element definition.type:
  index: 4
  element definition.type.code:
    value: string
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.init
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: effectiveTime.low

index: 23
element.id:
  value: AllergyIntolerance.recordedDate
element definition.path:
  value: AllergyIntolerance.recordedDate
element definition.short:
  value: resource實例的第一個版本被記錄的日期
element definition.definition:
  value: recordedDate指的是這個特定的過敏不耐症紀錄在系統中建立的日期，通常是由系統產生的日期。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.recordedDate
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: dateTime
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.recorded
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: IAM-13
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode=AUT].time

index: 24
element.id:
  value: AllergyIntolerance.recorder
element definition.path:
  value: AllergyIntolerance.recorder
element definition.short:
  value: 誰記錄了過敏或不耐受
element definition.definition:
  value: 記錄此紀錄並對其內容負責的個人
element definition.alias:
  value: Author
  index: 0
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.recorder
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    index: 1
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 2
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    index: 3
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.author
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode=AUT].role

index: 25
element.id:
  value: AllergyIntolerance.asserter
element definition.path:
  value: AllergyIntolerance.asserter
element definition.short:
  value: 關於過敏的資訊來源
element definition.definition:
  value: 有關過敏紀錄的資訊來源
element definition.comment:
  value: 記錄者要對內容負有責任，但可以參照他們獲得資訊的來源。
element definition.alias:
  value: Source
  index: 0
element definition.alias:
  value: Informant
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.asserter
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: Reference
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    index: 0
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    index: 1
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
  element definition.type.target profile:
    value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    index: 2
    link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
  element definition.type.target profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    index: 3
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: true
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: w5
  element definition.mapping.map:
    value: FiveWs.source
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: IAM-14 (if patient) / IAM-18 (if practitioner)
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: .participation[typeCode=INF].role

index: 26
element.id:
  value: AllergyIntolerance.lastOccurrence
element definition.path:
  value: AllergyIntolerance.lastOccurrence
element definition.short:
  value: 最後一次已知反應發生的日期（/時間）
element definition.definition:
  value: 表示最後已知的過敏反應事件發生的日期和/或時間。
element definition.comment:
  value: 這個日期可能會與某個反應開始日期重複。如果需要以文字表述最後發生的日期，例如：「在童年時」或「10年前」，應該使用 Comment 資料項目。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.lastOccurrence
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: dateTime
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)].effectiveTime

index: 27
element.id:
  value: AllergyIntolerance.note
element definition.path:
  value: AllergyIntolerance.note
element definition.short:
  value: 其他欄位中沒有記錄的額外文字陳述
element definition.definition:
  value: 有關不良反應的可能性，這些資訊是未被記錄在其他資料項目中的補充敘述。
element definition.comment:
  value: 例如：包括標記為「高風險」的原因，以及與將來接觸或使用該物質相關的指示，比如在重症照護病房內使用或在使用時需要皮質類固醇保護。這些註釋應該與過敏或不耐症作為一般狀況有關，而不是特定事件。對於特定事件的描述和註釋，請使用 AllergyIntolerance.event.description 和 AllergyIntolerance.event.notes。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.note
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Annotation
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: subjectOf.observationEvent[code="annotation"].value

index: 28
element.id:
  value: AllergyIntolerance.reaction
element definition.path:
  value: AllergyIntolerance.reaction
element definition.short:
  value: 暴露於此過敏或不耐症物質的不良反應
element definition.definition:
  value: 關於每次接觸特定物質所引起的不良反應事件的細節
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: BackboneElement
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code <= CommonClinicalObservationType, value <= ObservationValue (Reaction Type)]

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

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

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

index: 32
element.id:
  value: AllergyIntolerance.reaction.substance
element definition.path:
  value: AllergyIntolerance.reaction.substance
element definition.short:
  value: 被認為是事件原因的特定物質或醫藥產品
element definition.definition:
  value: 確定與不良反應事件有關的特定物質（或藥品）。注意：對於特定反應而言，所涉及的物質可能與被認為是風險原因的物質不同，但它必須與之一致。例如：它可能是一種更具體的物質（例如：品牌藥物）或包含被確認的物質的複合產品。在臨床上，僅處理「code」而忽略「reaction.substance」必須是安全的。如果接收系統無法確定 AllergyIntolerance.reaction.substance 是否在 AllergyIntolerance.code 的語義範圍內，則接收系統應忽略 AllergyIntolerance.reaction.substance。
element definition.comment:
  value: 表現形式可以用一個詞、短語或簡短的描述來表達。例如：噁心、皮疹或無反應。在可能的情況下，最好用專門術語對表現形式進行編碼。這裡輸入的值可作為不良反應清單的一部分顯示在應用螢幕上，正如英國國家醫療服務體系CUI 指南中所建議的那樣，常用的專門術語包括，但不限於SNOMED CT或ICD10。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.substance
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/substance-code
    link: http://hl7.org/fhir/ValueSet/substance-code
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 33
element.id:
  value: AllergyIntolerance.reaction.manifestation
element definition.path:
  value: AllergyIntolerance.reaction.manifestation
element definition.short:
  value: 與此事件相關的臨床症狀/體徵
element definition.definition:
  value: 觀察到的或與不良反應事件相關的臨床症狀和/或體徵
element definition.comment:
  value: 表現形式可以用一個詞、短語或簡短的描述來表達。例如：噁心、皮疹或無反應。在可能的情況下，最好用術語對表現形式進行編碼。這裡輸入的數值可作為不良反應清單的一部分顯示在應用螢幕上，正如英國國家醫療服務體系CUI指南中所建議的那樣。常用的術語包括，但不限於SNOMED CT或ICD10。
element definition.alias:
  value: Symptoms
  index: 0
element definition.alias:
  value: Signs
  index: 1
element definition.min:
  value: 1
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.manifestation
  element definition.base.min:
    value: 1
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.must support:
  value: true
element definition.is modifier:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/clinical-findings
    link: http://hl7.org/fhir/ValueSet/clinical-findings
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 34
element.id:
  value: AllergyIntolerance.reaction.description
element definition.path:
  value: AllergyIntolerance.reaction.description
element definition.short:
  value: 對整個活動的描述
element definition.definition:
  value: 關於整個反應的文字描述，如果必要則包括表現形式的細節。
element definition.comment:
  value: 使用描述來提供發生反應的特定事件的任何細節，如情況、反應細節、之前/之後發生了什麼。與事件有關的資訊，但不描述特定的照護應在comment資料項目中記錄。例如：病人在四歲時因鏈球菌感染被注射青黴素，隨後出現嚴重的蕁麻疹。
element definition.alias:
  value: Narrative
  index: 0
element definition.alias:
  value: Text
  index: 1
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.description
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: string
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: text

index: 35
element.id:
  value: AllergyIntolerance.reaction.onset
element definition.path:
  value: AllergyIntolerance.reaction.onset
element definition.short:
  value: 症狀顯現的日期（/時間）
element definition.definition:
  value: 記錄反應開始的日期和/或時間
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.onset
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: dateTime
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: AL1-6
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: effectiveTime.low

index: 36
element.id:
  value: AllergyIntolerance.reaction.severity
element definition.path:
  value: AllergyIntolerance.reaction.severity
element definition.short:
  value: mild | moderate | severe
element definition.definition:
  value: 對整個反應事件的臨床評估，可能會考慮多個不同的表現，以確定反應的嚴重程度。
element definition.comment:
  value: 這種評估是非常主觀的。可能有一些特定的實務領域已經應用了客觀的評分標準，客觀的評分標準可以作為擴充資料項目包含在這個模型中。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.severity
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: code
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.binding:
  element.extension:
    index: 0
    extension.url:
      value: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    extension.value string:
      value: AllergyIntoleranceSeverity
  element definition.binding.strength:
    value: required
  element definition.binding.description:
    value: 整個事件的程度，應填入所綁定值集中的其中一個代碼。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/reaction-event-severity|4.0.1
    link: 4.0
    link: .1
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value <= SeverityObservation (Severity Level)]

index: 37
element.id:
  value: AllergyIntolerance.reaction.exposureRoute
element definition.path:
  value: AllergyIntolerance.reaction.exposureRoute
element definition.short:
  value: 此對象如何接觸到該物質
element definition.definition:
  value: 確認此對象是透過哪種途徑接觸到該物質
element definition.comment:
  value: 應盡可能使用專門術語對接觸途徑進行編碼。
element definition.min:
  value: 0
element definition.max:
  value: 1
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.exposureRoute
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: 1
element definition.type:
  index: 0
  element definition.type.code:
    value: CodeableConcept
  element definition.type.profile:
    value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
    index: 0
    link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/CodeableConcept-tw
element definition.condition:
  value: ele-1
  index: 0
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.binding:
  element definition.binding.strength:
    value: extensible
  element definition.binding.description:
    value: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  element definition.binding.value set:
    value: http://hl7.org/fhir/ValueSet/route-codes
    link: http://hl7.org/fhir/ValueSet/route-codes
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: n/a
element definition.mapping:
  index: 1
  element definition.mapping.identity:
    value: v2
  element definition.mapping.map:
    value: CE/CNE/CWE
element definition.mapping:
  index: 2
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: CD
element definition.mapping:
  index: 3
  element definition.mapping.identity:
    value: orim
  element definition.mapping.map:
    value: fhir:CodeableConcept rdfs:subClassOf dt:CD

index: 38
element.id:
  value: AllergyIntolerance.reaction.note
element definition.path:
  value: AllergyIntolerance.reaction.note
element definition.short:
  value: 其他資料項目未記錄之關於事件的文字表述
element definition.definition:
  value: 其他關於不良反應事件的文字表述，這些資訊未在其他資料項目中記錄。
element definition.comment:
  value: 使用此資料項目記錄與特定事件間接相關的資訊，但在其他資料項目未記錄的資訊。例如：如果臨床紀錄不再可用，則可根據病人母親提供的資訊來紀錄，儘管病人的母親已經過世。
element definition.min:
  value: 0
element definition.max:
  value: *
element definition.base:
  element definition.base.path:
    value: AllergyIntolerance.reaction.note
  element definition.base.min:
    value: 0
  element definition.base.max:
    value: *
element definition.type:
  index: 0
  element definition.type.code:
    value: Annotation
element definition.constraint:
  index: 0
  element definition.constraint.key:
    value: ele-1
  element definition.constraint.severity:
    value: error
  element definition.constraint.human:
    value: All FHIR elements must have a @value or children
  element definition.constraint.expression:
    value: hasValue() or (children().count() > id.count())
  element definition.constraint.xpath:
    value: @value|f:*|h:div
  element definition.constraint.source:
    value: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
element definition.is modifier:
  value: false
element definition.is summary:
  value: false
element definition.mapping:
  index: 0
  element definition.mapping.identity:
    value: rim
  element definition.mapping.map:
    value: subjectOf.observationEvent[code="annotation"].value

structure definition.differential.element:
  index: 0
  element.id:
    value: AllergyIntolerance
  element definition.path:
    value: AllergyIntolerance
structure definition.differential.element:
  index: 1
  element.id:
    value: AllergyIntolerance.code
  element definition.path:
    value: AllergyIntolerance.code
  element definition.binding:
    element definition.binding.strength:
      value: extensible
    element definition.binding.value set:
      value: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw
      link: https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw
structure definition.differential.element:
  index: 2
  element.id:
    value: AllergyIntolerance.code.text
  element definition.path:
    value: AllergyIntolerance.code.text
  element definition.short:
    value: 標識過敏或不耐受的描述。[應填入於門診病摘之過敏史Allergy]
  element definition.min:
    value: 1
structure definition.differential.element:
  index: 3
  element.id:
    value: AllergyIntolerance.patient
  element definition.path:
    value: AllergyIntolerance.patient
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
structure definition.differential.element:
  index: 4
  element.id:
    value: AllergyIntolerance.encounter
  element definition.path:
    value: AllergyIntolerance.encounter
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/encounter-twcm
  element definition.must support:
    value: true
structure definition.differential.element:
  index: 5
  element.id:
    value: AllergyIntolerance.recorder
  element definition.path:
    value: AllergyIntolerance.recorder
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
      index: 1
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
      index: 2
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
      index: 3
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
structure definition.differential.element:
  index: 6
  element.id:
    value: AllergyIntolerance.asserter
  element definition.path:
    value: AllergyIntolerance.asserter
  element definition.type:
    index: 0
    element definition.type.code:
      value: Reference
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
      index: 0
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/patient-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
      index: 1
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    element definition.type.target profile:
      value: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
      index: 2
      link: https://www.nricm.edu.tw/twcm/StructureDefinition/practitioner-twcm
    element definition.type.target profile:
      value: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
      index: 3
      link: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore