國家級人體生物資料庫整合平台共同資料模式實作指引(NBCT Common Data Model IG)
0.1.0 - trial-use

Publication Build: This will be filled in by the publication tooling

## Resource Profile: Condition TOTFA、TOTFB-診斷代碼

Official URL: https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/ConditionTOTFAB | Version: 0.1.0
Active as of 2024-09-01 | Computable Name: ConditionTOTFAB

用於描述門診醫療申報檔(TOTFA)與住院醫療申報檔案(TOTFB)中的診斷代碼，包含： 主診斷代碼、次診斷代碼(一)、次診斷代碼(二)、次診斷代碼(三)、次診斷代碼(四)

Usage:

- Use this Resource Profile: Bundle TOTFA and Bundle TOTFB
- Refer to this Resource Profile: Composition TOTFA and Composition TOTFB
- Examples for this Resource Profile: Condition/con-TOTFA and Condition/con-TOTFB

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 con-3: Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item con-4: If condition is abated, then clinicalStatus must be either inactive, resolved, or remission con-5: Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources dom-3: 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 dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-5: If a resource is contained in another resource, it SHALL NOT have a security label dom-6: A resource should have narrative for robust management
implicitRules | ?!Σ | 0..1 | uri | 創建此內容所依據的一組規則 ele-1: All FHIR elements must have a @value or children
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both
clinicalStatus | S | 1..1 | CodeableConceptTW | active | recurrence | relapse | inactive | remission | resolved ，病情、問題或診斷的臨床狀態。 Binding: ConditionClinicalStatusCodes (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
verificationStatus | S | 0..1 | CodeableConceptTW | unconfirmed | provisional | differential | confirmed | refuted | entered-in-error ，支持或拒絕病情、問題或診斷的臨床狀態的驗證狀態。 Binding: ConditionVerificationStatus (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
category | S | 1..1 | CodeableConceptTW | problem-list-item | encounter-diagnosis ，指定病情、問題或診斷的類別。 Binding: ConditionCategoryCodes (extensible): 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 ele-1: All FHIR elements must have a @value or children
severity | S | 0..1 | CodeableConceptTW | 病情、問題或診斷的主觀嚴重程度 Binding: Condition/DiagnosisSeverity (extensible): 臨床醫生對病情、問題或診斷嚴重程度的主觀評價；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 ele-1: All FHIR elements must have a @value or children
code | S | 1..1 | CodeableConceptTW | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。 Binding: Condition/Problem/DiagnosisCodes (example): 此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 ele-1: All FHIR elements must have a @value or children
Slices for coding | S | 0..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this ele-1: All FHIR elements must have a @value or children
coding:icd10-cm-2023 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2023年中文版ICD-10-CM值集 (required) ele-1: All FHIR elements must have a @value or children
coding:icd10-cm-2021 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2021年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2021年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
coding:icd10-cm-2014 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2014年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2014年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
coding:icd9-cm-2001 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2001年中文版ICD-9-CM值集 (required) ele-1: All FHIR elements must have a @value or children
coding:absentOrUnknownProblem | S | 0..1 | CodingTW | 不存在的問題或未知問題的代碼 Binding: Absent or Unknown Problems - IPS (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
coding:sct | S | 0..1 | CodingTW | 此為SNOMED CT診斷代碼，若機構已有購買相關授權，亦可使用。 Binding: SNOMED CT診斷代碼值集 (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
text | S Σ | 0..1 | string | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。 ele-1: All FHIR elements must have a @value or children
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 ele-1: All FHIR elements must have a @value or children
subject | S Σ | 1..1 | Reference(Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料) | 誰有此病情、問題或診斷？ ele-1: All FHIR elements must have a @value or children
reference | S Σ C | 1..1 | string | 患者Resource Link ele-1: All FHIR elements must have a @value or children
encounter | S Σ | 0..1 | Reference(Encounter TOTFA-案件分類 | Encounter TOTFB-案件分類) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄 ele-1: All FHIR elements must have a @value or children
reference | S Σ C | 0..1 | string | TOTFA或TOTFB案件分類Resource Link ele-1: All FHIR elements must have a @value or children
onset[x] | S Σ | 0..1 |  | 估計的或實際的日期、日期—時間或年齡。 ele-1: All FHIR elements must have a @value or children
onsetDateTime |  |  | dateTime |
abatement[x] | S C | 0..1 |  | 何時解決/緩解 ele-1: All FHIR elements must have a @value or children
abatementDateTime |  |  | dateTime |
asserter | S Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 聲稱有此病情、問題或診斷的人 ele-1: All FHIR elements must have a @value or children
note | S | 1..1 | Annotation | 關於此Condition的附加資訊。備註主或次診斷代碼 ele-1: All FHIR elements must have a @value or children
text | S Σ | 1..1 | markdown | The annotation - text content (as markdown) ele-1: All FHIR elements must have a @value or children Example Value: 次診斷代碼(一)
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Condition.clinicalStatus | required | ConditionClinicalStatusCodes `http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1` from the FHIR Standard
Condition.verificationStatus | required | ConditionVerificationStatus `http://hl7.org/fhir/ValueSet/condition-ver-status|4.0.1` from the FHIR Standard
Condition.category | extensible | ConditionCategoryCodes `http://hl7.org/fhir/ValueSet/condition-category` from the FHIR Standard
Condition.severity | extensible | Condition/DiagnosisSeverity `http://hl7.org/fhir/ValueSet/condition-severity` from the FHIR Standard
Condition.code | example | Condition/Problem/DiagnosisCodes `http://hl7.org/fhir/ValueSet/condition-code` from the FHIR Standard
Condition.code.coding:icd10-cm-2023 | required | TW2023ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw`
Condition.code.coding:icd10-cm-2021 | required | TW2021ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2021-tw`
Condition.code.coding:icd10-cm-2014 | required | TW2014ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2014-tw`
Condition.code.coding:icd9-cm-2001 | required | TW2001ICD9CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-9-cm-2001-tw`
Condition.code.coding:absentOrUnknownProblem | required | AbsentOrUnknownProblemsUvIps `http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-problems-uv-ips`
Condition.code.coding:sct | required | TWConditionCodeSCT `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/condition-code-sct-tw`
Condition.bodySite | extensible | SNOMEDCTBodyStructures `http://hl7.org/fhir/ValueSet/body-site` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
con-3 | best practice | Condition | Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item : clinicalStatus.exists() or verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code = 'entered-in-error').exists() or category.select($this='problem-list-item').empty() |
con-4 | error | Condition | If condition is abated, then clinicalStatus must be either inactive, resolved, or remission : abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists() |
con-5 | error | Condition | Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error : verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty() |
dom-2 | error | Condition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Condition | 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 : 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() |
dom-4 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Condition | A resource should have narrative for robust management : text.`div`.exists() |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() |

This structure is derived from TWCoreCondition

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Condition |  | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊
code |  | 1..1 | CodeableConceptTW | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。
text |  | 0..1 | string | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。
subject |  | 1..1 | Reference(Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料) | 誰有此病情、問題或診斷？
reference | S | 1..1 | string | 患者Resource Link
encounter | S | 0..1 | Reference(Encounter TOTFA-案件分類 | Encounter TOTFB-案件分類) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄
reference | S | 0..1 | string | TOTFA或TOTFB案件分類Resource Link
note |  | 1..1 | Annotation | 關於此Condition的附加資訊。備註主或次診斷代碼
text | S | 1..1 | markdown | The annotation - text content (as markdown) Example Value: 次診斷代碼(一)
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 con-3: Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item con-4: If condition is abated, then clinicalStatus must be either inactive, resolved, or remission con-5: Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error
id | Σ | 0..1 | id | 不重複的ID用以識別儲存在特定FHIR Server中的Condition紀錄，通常又稱為邏輯性ID。
meta | Σ | 0..1 | Meta | 此Condition Resource的metadata
implicitRules | ?!Σ | 0..1 | uri | 創建此內容所依據的一組規則
language |  | 0..1 | code | 用以表述Condition Resource內容的語言。 Binding: CommonLanguages (preferred): 人類語言；鼓勵使用CommonLanguages代碼表中的代碼，但不強制一定要使用此代碼表，你也可使用其他代碼表的代碼或單純以文字表示。
Additional Bindings | Purpose
AllLanguages | Max Binding
Example Value: zh-TW
text |  | 0..1 | Narrative | Condition Resource之內容摘要以供人閱讀
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
identifier | Σ | 0..* | Identifier | 此病情、問題或診斷的外部識別碼
clinicalStatus | S | 1..1 | CodeableConceptTW | active | recurrence | relapse | inactive | remission | resolved ，病情、問題或診斷的臨床狀態。 Binding: ConditionClinicalStatusCodes (required): 應填入所綁定值集中的其中一個代碼。
verificationStatus | S | 0..1 | CodeableConceptTW | unconfirmed | provisional | differential | confirmed | refuted | entered-in-error ，支持或拒絕病情、問題或診斷的臨床狀態的驗證狀態。 Binding: ConditionVerificationStatus (required): 應填入所綁定值集中的其中一個代碼。
category | S | 1..1 | CodeableConceptTW | problem-list-item | encounter-diagnosis ，指定病情、問題或診斷的類別。 Binding: ConditionCategoryCodes (extensible): 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
severity | S | 0..1 | CodeableConceptTW | 病情、問題或診斷的主觀嚴重程度 Binding: Condition/DiagnosisSeverity (extensible): 臨床醫生對病情、問題或診斷嚴重程度的主觀評價；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
code | S | 1..1 | CodeableConceptTW | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。 Binding: Condition/Problem/DiagnosisCodes (example): 此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。
id |  | 0..1 | string | 唯一可識別ID，以供資料項目間相互參照。
extension |  | 0..* | Extension | 擴充的資料項目 Slice: Unordered, Open by value:url
Slices for coding | S | 0..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this
coding:icd10-cm-2023 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2023年中文版ICD-10-CM值集 (required)
coding:icd10-cm-2021 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2021年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2021年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。
coding:icd10-cm-2014 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2014年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2014年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。
coding:icd9-cm-2001 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2001年中文版ICD-9-CM值集 (required)
coding:absentOrUnknownProblem | S | 0..1 | CodingTW | 不存在的問題或未知問題的代碼 Binding: Absent or Unknown Problems - IPS (required): 應填入所綁定值集中的其中一個代碼。
coding:sct | S | 0..1 | CodingTW | 此為SNOMED CT診斷代碼，若機構已有購買相關授權，亦可使用。 Binding: SNOMED CT診斷代碼值集 (required): 應填入所綁定值集中的其中一個代碼。
text | S Σ | 0..1 | string | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
subject | S Σ | 1..1 | Reference(Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料) | 誰有此病情、問題或診斷？
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | S Σ C | 1..1 | string | 患者Resource Link
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
identifier | Σ | 0..1 | Identifier | Logical reference, when literal reference is not known
display | Σ | 0..1 | string | Text alternative for the resource
encounter | S Σ | 0..1 | Reference(Encounter TOTFA-案件分類 | Encounter TOTFB-案件分類) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | S Σ C | 0..1 | string | TOTFA或TOTFB案件分類Resource Link
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
identifier | Σ | 0..1 | Identifier | Logical reference, when literal reference is not known
display | Σ | 0..1 | string | Text alternative for the resource
onset[x] | S Σ | 0..1 |  | 估計的或實際的日期、日期—時間或年齡。
onsetDateTime |  |  | dateTime S |
onsetAge |  |  | Age |
onsetPeriod |  |  | Period |
onsetRange |  |  | Range |
onsetString |  |  | string |
abatement[x] | S C | 0..1 |  | 何時解決/緩解
abatementDateTime |  |  | dateTime S |
abatementAge |  |  | Age |
abatementPeriod |  |  | Period |
abatementRange |  |  | Range |
abatementString |  |  | string |
recordedDate | Σ | 0..1 | dateTime | 記錄的日期
recorder | Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 誰記錄此病情、問題或診斷
asserter | S Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 聲稱有此病情、問題或診斷的人
stage | C | 0..* | BackboneElement | 分期（stage）／分級（grade），通常是正式的評估。 con-1: Stage SHALL have summary or assessment
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
summary |  | 0..1 | CodeableConceptTW | 簡單的摘要（特定疾病）。 Binding: ConditionStage (extensible): 描述病情、問題或診斷分期的代碼（例如：癌症分期）。應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
assessment | C | 0..* | Reference(ClinicalImpression | TW Core DiagnosticReport | TW Core Observation Laboratory Result | TW Core Observation Vital Signs) | 正式的評估記錄
type |  | 0..1 | CodeableConceptTW | 分期的種類 Binding: ConditionStageType (extensible): 病情、問題或診斷分期種類的代碼（如臨床或病理）；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
evidence | C | 0..* | BackboneElement | 支持的證據 con-2: evidence SHALL have code or details
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
code |  | 0..* | CodeableConceptTW | 表現／症狀 Binding: ManifestationAndSymptomCodes (extensible): 病情、問題或診斷的表現或症狀之代碼；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
detail | Σ C | 0..* | Reference(Resource) | 在其他地方找到的支持資訊
note | S | 1..1 | Annotation | 關於此Condition的附加資訊。備註主或次診斷代碼
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
author[x] | Σ | 0..1 |  | Individual responsible for the annotation
authorReference |  |  | Reference(Practitioner | Patient | RelatedPerson | Organization) |
authorString |  |  | string |
time | Σ | 0..1 | dateTime | When the annotation was made
text | S Σ | 1..1 | markdown | The annotation - text content (as markdown) Example Value: 次診斷代碼(一)
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Condition.language | preferred | CommonLanguages `http://hl7.org/fhir/ValueSet/languages` from the FHIR Standard
Additional Bindings | Purpose
AllLanguages | Max Binding
Condition.clinicalStatus | required | ConditionClinicalStatusCodes `http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1` from the FHIR Standard
Condition.verificationStatus | required | ConditionVerificationStatus `http://hl7.org/fhir/ValueSet/condition-ver-status|4.0.1` from the FHIR Standard
Condition.category | extensible | ConditionCategoryCodes `http://hl7.org/fhir/ValueSet/condition-category` from the FHIR Standard
Condition.severity | extensible | Condition/DiagnosisSeverity `http://hl7.org/fhir/ValueSet/condition-severity` from the FHIR Standard
Condition.code | example | Condition/Problem/DiagnosisCodes `http://hl7.org/fhir/ValueSet/condition-code` from the FHIR Standard
Condition.code.coding:icd10-cm-2023 | required | TW2023ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw`
Condition.code.coding:icd10-cm-2021 | required | TW2021ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2021-tw`
Condition.code.coding:icd10-cm-2014 | required | TW2014ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2014-tw`
Condition.code.coding:icd9-cm-2001 | required | TW2001ICD9CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-9-cm-2001-tw`
Condition.code.coding:absentOrUnknownProblem | required | AbsentOrUnknownProblemsUvIps `http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-problems-uv-ips`
Condition.code.coding:sct | required | TWConditionCodeSCT `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/condition-code-sct-tw`
Condition.bodySite | extensible | SNOMEDCTBodyStructures `http://hl7.org/fhir/ValueSet/body-site` from the FHIR Standard
Condition.subject.type | extensible | ResourceType `http://hl7.org/fhir/ValueSet/resource-types` from the FHIR Standard
Condition.encounter.type | extensible | ResourceType `http://hl7.org/fhir/ValueSet/resource-types` from the FHIR Standard
Condition.stage.summary | extensible | ConditionStage `http://hl7.org/fhir/ValueSet/condition-stage` from the FHIR Standard
Condition.stage.type | extensible | ConditionStageType `http://hl7.org/fhir/ValueSet/condition-stage-type` from the FHIR Standard
Condition.evidence.code | extensible | ManifestationAndSymptomCodes `http://hl7.org/fhir/ValueSet/manifestation-or-symptom` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
con-1 | error | Condition.stage | Stage SHALL have summary or assessment : summary.exists() or assessment.exists() |
con-2 | error | Condition.evidence | evidence SHALL have code or details : code.exists() or detail.exists() |
con-3 | best practice | Condition | Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item : clinicalStatus.exists() or verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code = 'entered-in-error').exists() or category.select($this='problem-list-item').empty() |
con-4 | error | Condition | If condition is abated, then clinicalStatus must be either inactive, resolved, or remission : abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists() |
con-5 | error | Condition | Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error : verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty() |
dom-2 | error | Condition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Condition | 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 : 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() |
dom-4 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Condition | A resource should have narrative for robust management : text.`div`.exists() |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() |

This structure is derived from TWCoreCondition

Summary

Mandatory: 3 elements
Must-Support: 4 elements

Structures

This structure refers to these other structures:

- Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料 (https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/PatientCDM)
- Encounter TOTFA-案件分類 (https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/EncounterTOTFA)
- Encounter TOTFB-案件分類 (https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/EncounterTOTFB)

Key Elements View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 con-3: Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item con-4: If condition is abated, then clinicalStatus must be either inactive, resolved, or remission con-5: Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources dom-3: 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 dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated dom-5: If a resource is contained in another resource, it SHALL NOT have a security label dom-6: A resource should have narrative for robust management
implicitRules | ?!Σ | 0..1 | uri | 創建此內容所依據的一組規則 ele-1: All FHIR elements must have a @value or children
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored ele-1: All FHIR elements must have a @value or children ext-1: Must have either extensions or value[x], not both
clinicalStatus | S | 1..1 | CodeableConceptTW | active | recurrence | relapse | inactive | remission | resolved ，病情、問題或診斷的臨床狀態。 Binding: ConditionClinicalStatusCodes (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
verificationStatus | S | 0..1 | CodeableConceptTW | unconfirmed | provisional | differential | confirmed | refuted | entered-in-error ，支持或拒絕病情、問題或診斷的臨床狀態的驗證狀態。 Binding: ConditionVerificationStatus (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
category | S | 1..1 | CodeableConceptTW | problem-list-item | encounter-diagnosis ，指定病情、問題或診斷的類別。 Binding: ConditionCategoryCodes (extensible): 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 ele-1: All FHIR elements must have a @value or children
severity | S | 0..1 | CodeableConceptTW | 病情、問題或診斷的主觀嚴重程度 Binding: Condition/DiagnosisSeverity (extensible): 臨床醫生對病情、問題或診斷嚴重程度的主觀評價；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 ele-1: All FHIR elements must have a @value or children
code | S | 1..1 | CodeableConceptTW | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。 Binding: Condition/Problem/DiagnosisCodes (example): 此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 ele-1: All FHIR elements must have a @value or children
Slices for coding | S | 0..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this ele-1: All FHIR elements must have a @value or children
coding:icd10-cm-2023 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2023年中文版ICD-10-CM值集 (required) ele-1: All FHIR elements must have a @value or children
coding:icd10-cm-2021 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2021年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2021年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
coding:icd10-cm-2014 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2014年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2014年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
coding:icd9-cm-2001 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2001年中文版ICD-9-CM值集 (required) ele-1: All FHIR elements must have a @value or children
coding:absentOrUnknownProblem | S | 0..1 | CodingTW | 不存在的問題或未知問題的代碼 Binding: Absent or Unknown Problems - IPS (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
coding:sct | S | 0..1 | CodingTW | 此為SNOMED CT診斷代碼，若機構已有購買相關授權，亦可使用。 Binding: SNOMED CT診斷代碼值集 (required): 應填入所綁定值集中的其中一個代碼。 ele-1: All FHIR elements must have a @value or children
text | S Σ | 0..1 | string | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。 ele-1: All FHIR elements must have a @value or children
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。 ele-1: All FHIR elements must have a @value or children
subject | S Σ | 1..1 | Reference(Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料) | 誰有此病情、問題或診斷？ ele-1: All FHIR elements must have a @value or children
reference | S Σ C | 1..1 | string | 患者Resource Link ele-1: All FHIR elements must have a @value or children
encounter | S Σ | 0..1 | Reference(Encounter TOTFA-案件分類 | Encounter TOTFB-案件分類) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄 ele-1: All FHIR elements must have a @value or children
reference | S Σ C | 0..1 | string | TOTFA或TOTFB案件分類Resource Link ele-1: All FHIR elements must have a @value or children
onset[x] | S Σ | 0..1 |  | 估計的或實際的日期、日期—時間或年齡。 ele-1: All FHIR elements must have a @value or children
onsetDateTime |  |  | dateTime |
abatement[x] | S C | 0..1 |  | 何時解決/緩解 ele-1: All FHIR elements must have a @value or children
abatementDateTime |  |  | dateTime |
asserter | S Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 聲稱有此病情、問題或診斷的人 ele-1: All FHIR elements must have a @value or children
note | S | 1..1 | Annotation | 關於此Condition的附加資訊。備註主或次診斷代碼 ele-1: All FHIR elements must have a @value or children
text | S Σ | 1..1 | markdown | The annotation - text content (as markdown) ele-1: All FHIR elements must have a @value or children Example Value: 次診斷代碼(一)
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Condition.clinicalStatus | required | ConditionClinicalStatusCodes `http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1` from the FHIR Standard
Condition.verificationStatus | required | ConditionVerificationStatus `http://hl7.org/fhir/ValueSet/condition-ver-status|4.0.1` from the FHIR Standard
Condition.category | extensible | ConditionCategoryCodes `http://hl7.org/fhir/ValueSet/condition-category` from the FHIR Standard
Condition.severity | extensible | Condition/DiagnosisSeverity `http://hl7.org/fhir/ValueSet/condition-severity` from the FHIR Standard
Condition.code | example | Condition/Problem/DiagnosisCodes `http://hl7.org/fhir/ValueSet/condition-code` from the FHIR Standard
Condition.code.coding:icd10-cm-2023 | required | TW2023ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw`
Condition.code.coding:icd10-cm-2021 | required | TW2021ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2021-tw`
Condition.code.coding:icd10-cm-2014 | required | TW2014ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2014-tw`
Condition.code.coding:icd9-cm-2001 | required | TW2001ICD9CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-9-cm-2001-tw`
Condition.code.coding:absentOrUnknownProblem | required | AbsentOrUnknownProblemsUvIps `http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-problems-uv-ips`
Condition.code.coding:sct | required | TWConditionCodeSCT `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/condition-code-sct-tw`
Condition.bodySite | extensible | SNOMEDCTBodyStructures `http://hl7.org/fhir/ValueSet/body-site` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
con-3 | best practice | Condition | Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item : clinicalStatus.exists() or verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code = 'entered-in-error').exists() or category.select($this='problem-list-item').empty() |
con-4 | error | Condition | If condition is abated, then clinicalStatus must be either inactive, resolved, or remission : abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists() |
con-5 | error | Condition | Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error : verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty() |
dom-2 | error | Condition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Condition | 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 : 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() |
dom-4 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Condition | A resource should have narrative for robust management : text.`div`.exists() |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() |

Differential View

This structure is derived from TWCoreCondition

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Condition |  | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊
code |  | 1..1 | CodeableConceptTW | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。
text |  | 0..1 | string | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。
subject |  | 1..1 | Reference(Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料) | 誰有此病情、問題或診斷？
reference | S | 1..1 | string | 患者Resource Link
encounter | S | 0..1 | Reference(Encounter TOTFA-案件分類 | Encounter TOTFB-案件分類) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄
reference | S | 0..1 | string | TOTFA或TOTFB案件分類Resource Link
note |  | 1..1 | Annotation | 關於此Condition的附加資訊。備註主或次診斷代碼
text | S | 1..1 | markdown | The annotation - text content (as markdown) Example Value: 次診斷代碼(一)
Documentation for this format

Snapshot View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 con-3: Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item con-4: If condition is abated, then clinicalStatus must be either inactive, resolved, or remission con-5: Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error
id | Σ | 0..1 | id | 不重複的ID用以識別儲存在特定FHIR Server中的Condition紀錄，通常又稱為邏輯性ID。
meta | Σ | 0..1 | Meta | 此Condition Resource的metadata
implicitRules | ?!Σ | 0..1 | uri | 創建此內容所依據的一組規則
language |  | 0..1 | code | 用以表述Condition Resource內容的語言。 Binding: CommonLanguages (preferred): 人類語言；鼓勵使用CommonLanguages代碼表中的代碼，但不強制一定要使用此代碼表，你也可使用其他代碼表的代碼或單純以文字表示。
Additional Bindings | Purpose
AllLanguages | Max Binding
Example Value: zh-TW
text |  | 0..1 | Narrative | Condition Resource之內容摘要以供人閱讀
contained |  | 0..* | Resource | Contained, inline Resources
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
identifier | Σ | 0..* | Identifier | 此病情、問題或診斷的外部識別碼
clinicalStatus | S | 1..1 | CodeableConceptTW | active | recurrence | relapse | inactive | remission | resolved ，病情、問題或診斷的臨床狀態。 Binding: ConditionClinicalStatusCodes (required): 應填入所綁定值集中的其中一個代碼。
verificationStatus | S | 0..1 | CodeableConceptTW | unconfirmed | provisional | differential | confirmed | refuted | entered-in-error ，支持或拒絕病情、問題或診斷的臨床狀態的驗證狀態。 Binding: ConditionVerificationStatus (required): 應填入所綁定值集中的其中一個代碼。
category | S | 1..1 | CodeableConceptTW | problem-list-item | encounter-diagnosis ，指定病情、問題或診斷的類別。 Binding: ConditionCategoryCodes (extensible): 應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
severity | S | 0..1 | CodeableConceptTW | 病情、問題或診斷的主觀嚴重程度 Binding: Condition/DiagnosisSeverity (extensible): 臨床醫生對病情、問題或診斷嚴重程度的主觀評價；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
code | S | 1..1 | CodeableConceptTW | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。 Binding: Condition/Problem/DiagnosisCodes (example): 此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。
id |  | 0..1 | string | 唯一可識別ID，以供資料項目間相互參照。
extension |  | 0..* | Extension | 擴充的資料項目 Slice: Unordered, Open by value:url
Slices for coding | S | 0..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this
coding:icd10-cm-2023 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2023年中文版ICD-10-CM值集 (required)
coding:icd10-cm-2021 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2021年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2021年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。
coding:icd10-cm-2014 | S | 0..1 | CodingTW | 此為臺灣衛生福利部中央健康保險署維護之2014年中文版ICD-10-CM代碼，涵蓋範圍相對完整，可免費使用，可優先選用此代碼。 Binding: 臺灣健保署2014年中文版ICD-10-CM值集 (required): 病情、問題或診斷的識別；應填入所綁定值集中的其中一個代碼。
coding:icd9-cm-2001 | S | 0..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼 Binding: 臺灣健保署2001年中文版ICD-9-CM值集 (required)
coding:absentOrUnknownProblem | S | 0..1 | CodingTW | 不存在的問題或未知問題的代碼 Binding: Absent or Unknown Problems - IPS (required): 應填入所綁定值集中的其中一個代碼。
coding:sct | S | 0..1 | CodingTW | 此為SNOMED CT診斷代碼，若機構已有購買相關授權，亦可使用。 Binding: SNOMED CT診斷代碼值集 (required): 應填入所綁定值集中的其中一個代碼。
text | S Σ | 0..1 | string | 主、次診斷代碼。對應至TOTFA:[TOTFA.d19/TOTFA.d20/TOTFA.d21/TOTFA.d22/TOTFA.d23]。對應至TOTFB:[TOTFB25/TOTFB26/TOTFB27/TOTFB28/TOTFB29]。
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
subject | S Σ | 1..1 | Reference(Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料) | 誰有此病情、問題或診斷？
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | S Σ C | 1..1 | string | 患者Resource Link
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
identifier | Σ | 0..1 | Identifier | Logical reference, when literal reference is not known
display | Σ | 0..1 | string | Text alternative for the resource
encounter | S Σ | 0..1 | Reference(Encounter TOTFA-案件分類 | Encounter TOTFB-案件分類) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
reference | S Σ C | 0..1 | string | TOTFA或TOTFB案件分類Resource Link
type | Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
identifier | Σ | 0..1 | Identifier | Logical reference, when literal reference is not known
display | Σ | 0..1 | string | Text alternative for the resource
onset[x] | S Σ | 0..1 |  | 估計的或實際的日期、日期—時間或年齡。
onsetDateTime |  |  | dateTime S |
onsetAge |  |  | Age |
onsetPeriod |  |  | Period |
onsetRange |  |  | Range |
onsetString |  |  | string |
abatement[x] | S C | 0..1 |  | 何時解決/緩解
abatementDateTime |  |  | dateTime S |
abatementAge |  |  | Age |
abatementPeriod |  |  | Period |
abatementRange |  |  | Range |
abatementString |  |  | string |
recordedDate | Σ | 0..1 | dateTime | 記錄的日期
recorder | Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 誰記錄此病情、問題或診斷
asserter | S Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 聲稱有此病情、問題或診斷的人
stage | C | 0..* | BackboneElement | 分期（stage）／分級（grade），通常是正式的評估。 con-1: Stage SHALL have summary or assessment
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
summary |  | 0..1 | CodeableConceptTW | 簡單的摘要（特定疾病）。 Binding: ConditionStage (extensible): 描述病情、問題或診斷分期的代碼（例如：癌症分期）。應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
assessment | C | 0..* | Reference(ClinicalImpression | TW Core DiagnosticReport | TW Core Observation Laboratory Result | TW Core Observation Vital Signs) | 正式的評估記錄
type |  | 0..1 | CodeableConceptTW | 分期的種類 Binding: ConditionStageType (extensible): 病情、問題或診斷分期種類的代碼（如臨床或病理）；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
evidence | C | 0..* | BackboneElement | 支持的證據 con-2: evidence SHALL have code or details
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized
code |  | 0..* | CodeableConceptTW | 表現／症狀 Binding: ManifestationAndSymptomCodes (extensible): 病情、問題或診斷的表現或症狀之代碼；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
detail | Σ C | 0..* | Reference(Resource) | 在其他地方找到的支持資訊
note | S | 1..1 | Annotation | 關於此Condition的附加資訊。備註主或次診斷代碼
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
author[x] | Σ | 0..1 |  | Individual responsible for the annotation
authorReference |  |  | Reference(Practitioner | Patient | RelatedPerson | Organization) |
authorString |  |  | string |
time | Σ | 0..1 | dateTime | When the annotation was made
text | S Σ | 1..1 | markdown | The annotation - text content (as markdown) Example Value: 次診斷代碼(一)
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
Condition.language | preferred | CommonLanguages `http://hl7.org/fhir/ValueSet/languages` from the FHIR Standard
Additional Bindings | Purpose
AllLanguages | Max Binding
Condition.clinicalStatus | required | ConditionClinicalStatusCodes `http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1` from the FHIR Standard
Condition.verificationStatus | required | ConditionVerificationStatus `http://hl7.org/fhir/ValueSet/condition-ver-status|4.0.1` from the FHIR Standard
Condition.category | extensible | ConditionCategoryCodes `http://hl7.org/fhir/ValueSet/condition-category` from the FHIR Standard
Condition.severity | extensible | Condition/DiagnosisSeverity `http://hl7.org/fhir/ValueSet/condition-severity` from the FHIR Standard
Condition.code | example | Condition/Problem/DiagnosisCodes `http://hl7.org/fhir/ValueSet/condition-code` from the FHIR Standard
Condition.code.coding:icd10-cm-2023 | required | TW2023ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2023-tw`
Condition.code.coding:icd10-cm-2021 | required | TW2021ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2021-tw`
Condition.code.coding:icd10-cm-2014 | required | TW2014ICD10CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-10-cm-2014-tw`
Condition.code.coding:icd9-cm-2001 | required | TW2001ICD9CM `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/icd-9-cm-2001-tw`
Condition.code.coding:absentOrUnknownProblem | required | AbsentOrUnknownProblemsUvIps `http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-problems-uv-ips`
Condition.code.coding:sct | required | TWConditionCodeSCT `https://twcore.mohw.gov.tw/ig/twcore/ValueSet/condition-code-sct-tw`
Condition.bodySite | extensible | SNOMEDCTBodyStructures `http://hl7.org/fhir/ValueSet/body-site` from the FHIR Standard
Condition.subject.type | extensible | ResourceType `http://hl7.org/fhir/ValueSet/resource-types` from the FHIR Standard
Condition.encounter.type | extensible | ResourceType `http://hl7.org/fhir/ValueSet/resource-types` from the FHIR Standard
Condition.stage.summary | extensible | ConditionStage `http://hl7.org/fhir/ValueSet/condition-stage` from the FHIR Standard
Condition.stage.type | extensible | ConditionStageType `http://hl7.org/fhir/ValueSet/condition-stage-type` from the FHIR Standard
Condition.evidence.code | extensible | ManifestationAndSymptomCodes `http://hl7.org/fhir/ValueSet/manifestation-or-symptom` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
con-1 | error | Condition.stage | Stage SHALL have summary or assessment : summary.exists() or assessment.exists() |
con-2 | error | Condition.evidence | evidence SHALL have code or details : code.exists() or detail.exists() |
con-3 | best practice | Condition | Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item : clinicalStatus.exists() or verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code = 'entered-in-error').exists() or category.select($this='problem-list-item').empty() |
con-4 | error | Condition | If condition is abated, then clinicalStatus must be either inactive, resolved, or remission : abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists() |
con-5 | error | Condition | Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error : verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty() |
dom-2 | error | Condition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | Condition | 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 : 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() |
dom-4 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | Condition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | Condition | A resource should have narrative for robust management : text.`div`.exists() |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() |

This structure is derived from TWCoreCondition

Summary

Mandatory: 3 elements
Must-Support: 4 elements

Structures

This structure refers to these other structures:

- Patient TOTFA、TOTFB、LABD、LAM、CASE-病患基本資料 (https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/PatientCDM)
- Encounter TOTFA-案件分類 (https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/EncounterTOTFA)
- Encounter TOTFB-案件分類 (https://www.ghd.tw/cdm-fhir/fhir/StructureDefinition/EncounterTOTFB)

Other representations of profile: CSV, Excel, Schematron