臺灣電子處方箋與調劑單張實作指引(TW EMPD IG)
0.1.0 - ci-build

臺灣電子處方箋與調劑單張實作指引(TW EMPD IG) - Downloaded Version 0.1.0 See the Directory of published versions

## Resource Profile: 電子處方箋-診斷

Official URL: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Condition-EMPD | Version: 0.1.0
Active as of 2023-10-30 | Computable Name: ConditionEMPD

此Profiles繼承於臺灣核心-病情、問題或診斷(TW Core Condition) ，並進一步用於描述電子處方箋之診斷 [FMM1]

Usages:

- Use this Profile: 電子處方箋-Bundle
- Refer to this Profile: 電子處方箋-Composition
- Examples for this Profile: Condition/con-ep
- CapabilityStatements using this Profile: 電子處方箋與調劑單張-用戶端 and 電子處方箋與調劑單張-伺服端

You can also check for usages in the FHIR IG Statistics

### 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 Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 Constraints: con-3, con-4, con-5
implicitRules | ?!Σ | 0..1 | uri | 創建此內容所依據的一組規則
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
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 | 病情、問題或診斷的識別。[應填入國際疾病分類代碼ICD Code(International Classification of Diseases)] Binding: Condition/Problem/DiagnosisCodes (example): 此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。
Slices for coding | S | 1..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this
coding:icd10-cm-2023 | S | 1..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 | 概念的文字表示法
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
subject | S Σ | 1..1 | Reference(TW Core Patient | Group) | 誰有此病情、問題或診斷？
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 |
asserter | S Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 聲稱有此病情、問題或診斷的人
note | S | 1..* | Annotation | 關於此Condition的附加資訊。[應填入部分負擔代碼/醫療評估內容註記]。至少須包含部分負擔代碼。
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 Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Condition |  |  | TWCoreCondition |
code |  | 1..1 | CodeableConceptTW | 病情、問題或診斷的識別。[應填入國際疾病分類代碼ICD Code(International Classification of Diseases)]
coding |  | 1..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。
Slices for coding |  |  |  | Content/Rules for all slices
coding:icd10-cm-2023 |  | 1..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼
note |  | 1..* | Annotation | 關於此Condition的附加資訊。[應填入部分負擔代碼/醫療評估內容註記]。至少須包含部分負擔代碼。
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 Constraints: con-3, con-4, con-5
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之內容摘要以供人閱讀 This profile does not constrain the narrative in regard to content, language, or traceability to data elements
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 | 病情、問題或診斷的識別。[應填入國際疾病分類代碼ICD Code(International Classification of Diseases)] 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 | 1..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this
coding:icd10-cm-2023 | S | 1..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 | 概念的文字表示法
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
subject | S Σ | 1..1 | Reference(TW Core Patient | Group) | 誰有此病情、問題或診斷？
encounter | Σ | 0..1 | Reference(TW Core Encounter) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄
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），通常是正式的評估。 Constraints: con-1
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 | 支持的證據 Constraints: con-2
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..* | Annotation | 關於此Condition的附加資訊。[應填入部分負擔代碼/醫療評估內容註記]。至少須包含部分負擔代碼。
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.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: 4 elements

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 Constraints: con-3, con-4, con-5
implicitRules | ?!Σ | 0..1 | uri | 創建此內容所依據的一組規則
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
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 | 病情、問題或診斷的識別。[應填入國際疾病分類代碼ICD Code(International Classification of Diseases)] Binding: Condition/Problem/DiagnosisCodes (example): 此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。
Slices for coding | S | 1..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this
coding:icd10-cm-2023 | S | 1..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 | 概念的文字表示法
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
subject | S Σ | 1..1 | Reference(TW Core Patient | Group) | 誰有此病情、問題或診斷？
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 |
asserter | S Σ | 0..1 | Reference(TW Core Practitioner | TW Core PractitionerRole | TW Core Patient | TW Core RelatedPerson) | 聲稱有此病情、問題或診斷的人
note | S | 1..* | Annotation | 關於此Condition的附加資訊。[應填入部分負擔代碼/醫療評估內容註記]。至少須包含部分負擔代碼。
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 Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Condition |  |  | TWCoreCondition |
code |  | 1..1 | CodeableConceptTW | 病情、問題或診斷的識別。[應填入國際疾病分類代碼ICD Code(International Classification of Diseases)]
coding |  | 1..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。
Slices for coding |  |  |  | Content/Rules for all slices
coding:icd10-cm-2023 |  | 1..1 | CodingTW | 由專門術語系統（terminology system）定義的代碼
note |  | 1..* | Annotation | 關於此Condition的附加資訊。[應填入部分負擔代碼/醫療評估內容註記]。至少須包含部分負擔代碼。
Documentation for this format

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Condition | C | 0..* | TWCoreCondition | 有關病情、問題或診斷的詳細資訊 Constraints: con-3, con-4, con-5
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之內容摘要以供人閱讀 This profile does not constrain the narrative in regard to content, language, or traceability to data elements
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 | 病情、問題或診斷的識別。[應填入國際疾病分類代碼ICD Code(International Classification of Diseases)] 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 | 1..* | CodingTW | 由專門術語系統（terminology system）定義的代碼。此資料項目為可擴充綁定預設國際標準值集，但實作者可視實務專案需求只綁定以下slices中的任一值集。目前未只限定綁定預設值集是因為尚無slice值集與預設國際標準值集的代碼對應表，待後續有相對的代碼對應表後將建議採用國際標準值集作為唯一綁定值集並針對該值集進行擴充與管理，以利進行跨國與跨系統之資料交換。 Slice: Unordered, Open by pattern:$this
coding:icd10-cm-2023 | S | 1..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 | 概念的文字表示法
bodySite | S | 0..* | CodeableConceptTW | 如果相關請填寫解剖位置 Binding: SNOMEDCTBodyStructures (extensible): 描述解剖位置的代碼。可包括側面；應填入所綁定值集中適合的代碼，確定無適合的代碼才可以使用其他值集的代碼來表示。
subject | S Σ | 1..1 | Reference(TW Core Patient | Group) | 誰有此病情、問題或診斷？
encounter | Σ | 0..1 | Reference(TW Core Encounter) | 作為病情、問題或診斷紀錄的一部分的就醫（Encounter）紀錄
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），通常是正式的評估。 Constraints: con-1
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 | 支持的證據 Constraints: con-2
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..* | Annotation | 關於此Condition的附加資訊。[應填入部分負擔代碼/醫療評估內容註記]。至少須包含部分負擔代碼。
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.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: 4 elements

Other representations of profile: CSV, Excel, Schematron