Goal-twcore
type: StructureDefinition
node role: treeRoot
id:
  v: Goal-twcore
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition Goal-twcore Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Goal 0..* Goal 病人健康照護中預期達成的結果或目標 #xD; id 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Goal紀錄，通常又稱為邏輯性ID。 #xD; lifecycleStatus S 1..1 code proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected Binding: GoalLifecycleStatus (required): 表示目標當前狀態的代碼，必須使用所綁定的值集中的代碼。 #xD; description S 1..1 CodeableConcept 目標的文字敘述 Binding: SNOMEDCTClinicalFindings (extensible): 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 #xD; subject S 1..1 Reference(TW Core Patient S | Group | TW Core Organization) 此目標的對象是誰或什麼？ #xD; start[x] S 0..1 設定此目標的日期或事件 #xD; startDate date S #xD; startCodeableConcept CodeableConcept #xD; target S 0..* BackboneElement 目標的測量內容和預期完成日期 #xD; due[x] S 0..1 完成目標的期限日期或持續時間 #xD; dueDate date S #xD; dueDuration Duration #xD; expressedBy 0..1 Reference(TW Core Patient | TW Core Practitioner | TW Core PractitionerRole | TW Core RelatedPerson) 誰記錄或負責此目標 #xD; addresses 0..* Reference(TW Core Condition | TW Core Observation Clinical Result | TW Core MedicationStatement | NutritionOrder | TW Core ServiceRequest | RiskAssessment) 此目標所針對的問題 #xD; outcomeReference 0..* Reference(TW Core Observation Clinical Result) 追蹤目標結果的觀察紀錄 #xD; <img src="[binary]" alt="doco" style="background-color: inherit"/> Documentation for this format
url:
  v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Goal-twcore
  l: Goal-twcore
version:
  v: 1.0.0
name:
  v: TWCoreGoal
title:
  v: TW Core Goal
status:
  v: active
date:
  v: 2026-01-07T07:13:09+00:00
contact:
  name:
    v: 衛生福利部
  telecom:
    system:
      v: url
    value:
      v: https://www.mohw.gov.tw/
  telecom:
    system:
      v: email
description:
  v: 此臺灣核心-目標（TW Core Goal） Profile說明本IG如何進一步定義FHIR的Goal Resource以呈現目標資料。
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
    l: v2
  name:
    v: HL7 v2 Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
    l: fivews
  name:
    v: FiveWs Pattern Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Goal
  l: Goal
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Goal
  l: Goal
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
      l: snapshot-base-version
    value: String
      v: 4.0.1
  element:
    id:
      v: Goal
    path:
      v: Goal
    short:
      v: 病人健康照護中預期達成的結果或目標
    definition:
      v: 在健康照護過程中，描述某患者或團體預期達成的結果或目標，是照護計畫的一部分，此目標可由患者、醫師或其他相關人員所提出。
    comment:
      v: Goal can be achieving a particular change or merely maintaining a current state or even slowing a decline.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Goal
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
      expression:
        v: contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      xpath:
        v: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-5
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a security label
      expression:
        v: contained.meta.security.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:security))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      extension:
        value: Boolean
      extension:
        value: Markdown
      key:
        v: dom-6
      severity:
        v: warning
      human:
        v: A resource should have narrative for robust management
      expression:
        v: text.`div`.exists()
      xpath:
        v: exists(f:text/h:div)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    is modifier:
      v: false
    is summary:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: Entity. Role, or Act
    mapping:
      identity:
        v: v2
      map:
        v: GOL.1
    mapping:
      identity:
        v: rim
      map:
        v: .outboundRelationship[typeCode<=OBJ].
  element:
    id:
      v: Goal.id
    path:
      v: Goal.id
    short:
      v: 不重複的ID用以識別儲存在特定FHIR Server中的Goal紀錄，通常又稱為邏輯性ID。

Boolean
v: true

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

v: resource的邏輯ID，在resource的URL中使用。一旦指定，這個值永遠不會改變。

v: 一個resource使用新增操作（create operation）提交給伺服器時，此resource沒有id，它的id在resource被創建後由伺器分配/指定。

v: 0

v: 1

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

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

v: false

v: true

id:
  v: Goal.meta
path:
  v: Goal.meta
short:
  v: Metadata about the resource
definition:
  v: The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
    l: Meta
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: Goal.implicitRules
path:
  v: Goal.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
comment:
  v: Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
is summary:
  v: true

id:
  v: Goal.language
path:
  v: Goal.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
      l: elementdefinition-maxValueSet
    value: Canonical
      v: http://hl7.org/fhir/ValueSet/all-languages
      l: all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages|4.0.1
    l: http://hl7.org/fhir/ValueSet/languages

id:
  v: Goal.text
path:
  v: Goal.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
comment:
  v: Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Goal.contained
path:
  v: Goal.contained
short:
  v: Contained, inline Resources
definition:
  v: 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.
comment:
  v: 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.
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

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

id:
  v: Goal.modifierExtension
path:
  v: Goal.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: 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).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    l: Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Goal.identifier
path:
  v: Goal.identifier
short:
  v: External Ids for this goal
definition:
  v: Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
comment:
  v: This is a business identifier, not a resource identifier (see [discussion](http://hl7.org/fhir/R4/resource.html#identifiers)). It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types. For example, multiple Patient and a Person resource instance might share the same social insurance number.
requirements:
  v: Allows identification of the goal as it is known by various participating systems and in a way that remains consistent across servers.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: rim
  map:
    v: .id

id:
  v: Goal.lifecycleStatus
path:
  v: Goal.lifecycleStatus
short:
  v: proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected
definition:
  v: 表示目標的當前狀態，例如正在進行中或已完成。
comment:
  v: This element is labeled as a modifier because the lifecycleStatus contains codes that mark the resource as not currently valid.
requirements:
  v: Allows knowing whether goal needs to be further tracked.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Goal.lifecycleStatus
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: true
is modifier reason:
  v: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalLifecycleStatus
  strength:
    v: required
  description:
    v: 表示目標當前狀態的代碼，必須使用所綁定的值集中的代碼。
  value set:
    v: http://hl7.org/fhir/ValueSet/goal-status|4.0.1
    l: http://hl7.org/fhir/ValueSet/goal-status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: v2
  map:
    v: GOL-18-goal life cycle status
mapping:
  identity:
    v: rim
  map:
    v: .statusCode in-progress = active (classCode = OBJ) cancelled = aborted

id:
  v: Goal.achievementStatus
path:
  v: Goal.achievementStatus
short:
  v: in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable
definition:
  v: Describes the progression, or lack thereof, towards the goal against the target.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.achievementStatus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalAchievementStatus
  strength:
    v: preferred
  description:
    v: Indicates the progression, or lack thereof, towards the goal against the target.
  value set:
    v: http://hl7.org/fhir/ValueSet/goal-achievement|4.0.1
    l: http://hl7.org/fhir/ValueSet/goal-achievement
mapping:
  identity:
    v: rim
  map:
    v: .statusCode achieved = complete sustaining = active

id:
  v: Goal.category
path:
  v: Goal.category
short:
  v: E.g. Treatment, dietary, behavioral, etc.
definition:
  v: Indicates a category the goal falls within.
requirements:
  v: Allows goals to be filtered and sorted.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.category
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalCategory
  strength:
    v: example
  description:
    v: Codes for grouping and sorting goals.
  value set:
    v: http://hl7.org/fhir/ValueSet/goal-category|4.0.1
    l: http://hl7.org/fhir/ValueSet/goal-category
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class

id:
  v: Goal.priority
path:
  v: Goal.priority
short:
  v: high-priority | medium-priority | low-priority
definition:
  v: Identifies the mutually agreed level of importance associated with reaching/sustaining the goal.
comment:
  v: Extensions are available to track priorities as established by each participant (i.e. Priority from the patient's perspective, different practitioners' perspectives, family member's perspectives) The ordinal extension on Coding can be used to convey a numerically comparable ranking to priority. (Keep in mind that different coding systems may use a "low value=important".
requirements:
  v: Used for sorting and presenting goals.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.priority
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalPriority
  strength:
    v: preferred
  description:
    v: The level of importance associated with a goal.
  value set:
    v: http://hl7.org/fhir/ValueSet/goal-priority|4.0.1
    l: http://hl7.org/fhir/ValueSet/goal-priority
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.grade
mapping:
  identity:
    v: rim
  map:
    v: .priorityCode

id:
  v: Goal.description
path:
  v: Goal.description
short:
  v: 目標的文字敘述
definition:
  v: 人可讀的目標敘述，描述要達成的目標。
comment:
  v: If no code is available, use CodeableConcept.text.
requirements:
  v: Without a description of what's trying to be achieved, element has no purpose.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Goal.description
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: extensible
  description:
    v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
  value set:
    v: http://hl7.org/fhir/ValueSet/clinical-findings
    l: clinical-findings
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: v2
  map:
    v: GOL-3.2-goal ID.text
mapping:
  identity:
    v: rim
  map:
    v: .text

id:
  v: Goal.subject
path:
  v: Goal.subject
short:
  v: 此目標的對象是誰或什麼？
definition:
  v: 此目標針對的對象，可以是個人、群體或組織。
requirements:
  v: Subject is optional to support annonymized reporting.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Goal.subject
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
    l: Patient-twcore
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
        l: elementdefinition-type-must-support
      value: Boolean
        v: true
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    l: Group
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
        l: elementdefinition-type-must-support
      value: Boolean
        v: false
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
    l: Organization-twcore
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
        l: elementdefinition-type-must-support
      value: Boolean
        v: false
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]
mapping:
  identity:
    v: v2
  map:
    v: PID-3-patient ID list
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=PAT].role[classCode=PAT]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject

id:
  v: Goal.start[x]
path:
  v: Goal.start[x]
short:
  v: 設定此目標的日期或事件
definition:
  v: 目標被識別或創建的日期或事件，表示何時開始追蹤此目標。
requirements:
  v: Goals can be established prior to there being an intention to start pursuing them; e.g. Goals for post-surgical recovery established prior to surgery.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.start[x]
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
      l: elementdefinition-type-must-support
    value: Boolean
      v: true
  code:
    v: date
    l: date
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalStartEvent
  strength:
    v: example
  description:
    v: Codes describing events that can trigger the initiation of a goal.
  value set:
    v: http://hl7.org/fhir/ValueSet/goal-start-event|4.0.1
    l: http://hl7.org/fhir/ValueSet/goal-start-event
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.planned

id:
  v: Goal.target
path:
  v: Goal.target
short:
  v: 目標的測量內容和預期完成日期
definition:
  v: 目標的具體測量內容，包括目標值和預期完成日期。
comment:
  v: When multiple targets are present for a single goal instance, all targets must be met for the overall goal to be met.
requirements:
  v: Allows the progress of the goal to be monitored against an observation or due date. Target is 0..* to support Observations with multiple components, such as blood pressure goals with both a systolic and diastolic target.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.target
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
condition:
  v: gol-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
constraint:
  key:
    v: gol-1
  severity:
    v: error
  human:
    v: Goal.target.measure is required if Goal.target.detail is populated
  expression:
    v: (detail.exists() and measure.exists()) or detail.exists().not()
  xpath:
    v: (exists(f:*[starts-with(local-name(.), 'detail')]) and exists(f:measure)) or not(exists(f:*[starts-with(local-name(.), 'detail')]))
  source:
    v: http://hl7.org/fhir/StructureDefinition/Goal
    l: Goal
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

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

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

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

id:
  v: Goal.target.measure
path:
  v: Goal.target.measure
short:
  v: The parameter whose value is being tracked
definition:
  v: The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.target.measure
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
condition:
  v: gol-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalTargetMeasure
  strength:
    v: example
  description:
    v: Codes to identify the value being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.
  value set:
    v: http://hl7.org/fhir/ValueSet/observation-codes|4.0.1
    l: http://hl7.org/fhir/ValueSet/observation-codes

id:
  v: Goal.target.detail[x]
path:
  v: Goal.target.detail[x]
short:
  v: The target value to be achieved
definition:
  v: The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value.
comment:
  v: A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Goal.target.measure defines a coded value.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.target.detail[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Quantity
    l: Quantity
type:
  code:
    v: Range
    l: Range
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
type:
  code:
    v: string
    l: string
type:
  code:
    v: boolean
    l: boolean
type:
  code:
    v: integer
    l: integer
type:
  code:
    v: Ratio
    l: Ratio
condition:
  v: gol-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalTargetDetail
  strength:
    v: example
  description:
    v: Codes to identify the target value of the focus to be achieved to signify the fulfillment of the goal.

id:
  v: Goal.target.due[x]
path:
  v: Goal.target.due[x]
short:
  v: 完成目標的期限日期或持續時間
definition:
  v: 完成目標的預期日期或從目標創建起計算的持續時間。
requirements:
  v: Identifies when the goal should be evaluated.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.target.due[x]
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
      l: elementdefinition-type-must-support
    value: Boolean
      v: true
  code:
    v: date
    l: date
type:
  code:
    v: Duration
    l: Duration
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.done[x]

id:
  v: Goal.statusDate
path:
  v: Goal.statusDate
short:
  v: When goal status took effect
definition:
  v: Identifies when the current status. I.e. When initially created, when achieved, when cancelled, etc.
comment:
  v: To see the date for past statuses, query history.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.statusDate
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: date
    l: date
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.recorded

id:
  v: Goal.statusReason
path:
  v: Goal.statusReason
short:
  v: Reason for current status
definition:
  v: Captures the reason for the current status.
comment:
  v: This will typically be captured for statuses such as rejected, on-hold or cancelled, but could be present for others.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.statusReason
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

id:
  v: Goal.expressedBy
path:
  v: Goal.expressedBy
short:
  v: 誰記錄或負責此目標
definition:
  v: 表明誰負責創建、記錄或負責此目標，可能是病人本人、醫師、其他照護人員或相關人士。
comment:
  v: This is the individual responsible for establishing the goal, not necessarily who recorded it. (For that, use the Provenance resource.).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Goal.expressedBy
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
    l: Patient-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
    l: Practitioner-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
    l: PractitionerRole-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
    l: RelatedPerson-twcore
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.source

id:
  v: Goal.addresses
path:
  v: Goal.addresses
short:
  v: 此目標所針對的問題
definition:
  v: 此目標所要解決或處理的健康狀況、藥物使用、檢查結果或其他臨床問題。
requirements:
  v: Allows specific goals to explicitly linked to the concerns they're dealing with - makes the goal more understandable.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.addresses
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Condition-twcore
    l: Condition-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Observation-clinical-result-twcore
    l: Observation-clinical-result-twcore
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/MedicationStatement-twcore
    l: MedicationStatement-twcore
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/NutritionOrder
    l: NutritionOrder
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/ServiceRequest-twcore
    l: ServiceRequest-twcore
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RiskAssessment
    l: RiskAssessment
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=SUBJ].target[classCode=CONC]

id:
  v: Goal.note
path:
  v: Goal.note
short:
  v: Comments about the goal
definition:
  v: Any comments related to the goal.
comment:
  v: May be used for progress notes, concerns or other related information that doesn't actually describe the goal itself.
requirements:
  v: There's a need to capture information about the goal that doesn't actually describe the goal.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.note
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Annotation
    l: Annotation
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: GOL-16-goal evaluation + NTE?
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code="annotation"].value

id:
  v: Goal.outcomeCode
path:
  v: Goal.outcomeCode
short:
  v: What result was achieved regarding the goal?
definition:
  v: Identifies the change (or lack of change) at the point when the status of the goal is assessed.
comment:
  v: Note that this should not duplicate the goal status.
requirements:
  v: Outcome tracking is a key aspect of care planning.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.outcomeCode
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: GoalOutcome
  strength:
    v: example
  description:
    v: The result of the goal; e.g. "25% increase in shoulder mobility", "Anxiety reduced to moderate levels". "15 kg weight loss sustained over 6 months".
  value set:
    v: http://hl7.org/fhir/ValueSet/clinical-findings|4.0.1
    l: http://hl7.org/fhir/ValueSet/clinical-findings

id:
  v: Goal.outcomeReference
path:
  v: Goal.outcomeReference
short:
  v: 追蹤目標結果的觀察紀錄
definition:
  v: 參照用於監測目標進展或最終結果的觀察紀錄。
comment:
  v: The goal outcome is independent of the outcome of the related activities. For example, if the Goal is to achieve a target body weight of 150 lb and a care plan activity is defined to diet, then the care plan’s activity outcome could be calories consumed whereas goal outcome is an observation for the actual body weight measured.
requirements:
  v: Outcome tracking is a key aspect of care planning.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Goal.outcomeReference
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Observation-clinical-result-twcore
    l: Observation-clinical-result-twcore
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false

element:
  id:
    v: Goal
  path:
    v: Goal
  short:
    v: 病人健康照護中預期達成的結果或目標
  definition:
    v: 在健康照護過程中，描述某患者或團體預期達成的結果或目標，是照護計畫的一部分，此目標可由患者、醫師或其他相關人員所提出。
element:
  id:
    v: Goal.id
  path:
    v: Goal.id
  short:
    v: 不重複的ID用以識別儲存在特定FHIR Server中的Goal紀錄，通常又稱為邏輯性ID。
  definition:
    v: resource的邏輯ID，在resource的URL中使用。一旦指定，這個值永遠不會改變。
  comment:
    v: 一個resource使用新增操作（create operation）提交給伺服器時，此resource沒有id，它的id在resource被創建後由伺器分配/指定。
element:
  id:
    v: Goal.lifecycleStatus
  path:
    v: Goal.lifecycleStatus
  definition:
    v: 表示目標的當前狀態，例如正在進行中或已完成。
  must support:
    v: true
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
        l: elementdefinition-bindingName
      value: String
        v: GoalLifecycleStatus
    strength:
      v: required
    description:
      v: 表示目標當前狀態的代碼，必須使用所綁定的值集中的代碼。
    value set:
      v: http://hl7.org/fhir/ValueSet/goal-status|4.0.1
      l: http://hl7.org/fhir/ValueSet/goal-status
element:
  id:
    v: Goal.description
  path:
    v: Goal.description
  short:
    v: 目標的文字敘述
  definition:
    v: 人可讀的目標敘述，描述要達成的目標。
  must support:
    v: true
  binding:
    strength:
      v: extensible
    description:
      v: 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
    value set:
      v: http://hl7.org/fhir/ValueSet/clinical-findings
      l: clinical-findings
element:
  id:
    v: Goal.subject
  path:
    v: Goal.subject
  short:
    v: 此目標的對象是誰或什麼？
  definition:
    v: 此目標針對的對象，可以是個人、群體或組織。
  type:
    code:
      v: Reference
      l: Reference
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
      l: Patient-twcore
      extension:
        value: Boolean
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Group
      l: Group
      extension:
        value: Boolean
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore
      l: Organization-twcore
      extension:
        value: Boolean
  must support:
    v: true
element:
  id:
    v: Goal.start[x]
  path:
    v: Goal.start[x]
  short:
    v: 設定此目標的日期或事件
  definition:
    v: 目標被識別或創建的日期或事件，表示何時開始追蹤此目標。
  type:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
        l: elementdefinition-type-must-support
      value: Boolean
        v: true
    code:
      v: date
      l: date
  type:
    code:
      v: CodeableConcept
      l: CodeableConcept
  must support:
    v: true
element:
  id:
    v: Goal.target
  path:
    v: Goal.target
  short:
    v: 目標的測量內容和預期完成日期
  definition:
    v: 目標的具體測量內容，包括目標值和預期完成日期。
  must support:
    v: true
element:
  id:
    v: Goal.target.due[x]
  path:
    v: Goal.target.due[x]
  short:
    v: 完成目標的期限日期或持續時間
  definition:
    v: 完成目標的預期日期或從目標創建起計算的持續時間。
  type:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support
        l: elementdefinition-type-must-support
      value: Boolean
        v: true
    code:
      v: date
      l: date
  type:
    code:
      v: Duration
      l: Duration
  must support:
    v: true
element:
  id:
    v: Goal.expressedBy
  path:
    v: Goal.expressedBy
  short:
    v: 誰記錄或負責此目標
  definition:
    v: 表明誰負責創建、記錄或負責此目標，可能是病人本人、醫師、其他照護人員或相關人士。
  type:
    code:
      v: Reference
      l: Reference
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore
      l: Patient-twcore
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore
      l: Practitioner-twcore
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/PractitionerRole-twcore
      l: PractitionerRole-twcore
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/RelatedPerson-twcore
      l: RelatedPerson-twcore
element:
  id:
    v: Goal.addresses
  path:
    v: Goal.addresses
  short:
    v: 此目標所針對的問題
  definition:
    v: 此目標所要解決或處理的健康狀況、藥物使用、檢查結果或其他臨床問題。
  type:
    code:
      v: Reference
      l: Reference
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Condition-twcore
      l: Condition-twcore
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Observation-clinical-result-twcore
      l: Observation-clinical-result-twcore
    target profile:
      v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/MedicationStatement-twcore
      l: MedicationStatement-twcore
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/NutritionOrder
      l: NutritionOrder

Boolean
v: true

Boolean
v: false

Boolean
v: false

id:
  v: Goal.outcomeReference
path:
  v: Goal.outcomeReference
short:
  v: 追蹤目標結果的觀察紀錄
definition:
  v: 參照用於監測目標進展或最終結果的觀察紀錄。
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Observation-clinical-result-twcore
    l: Observation-clinical-result-twcore