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

臺灣電子處方箋與調劑單張實作指引(TW EMPD IG), published by NHI. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/TWNHIFHIR/empd/ and changes regularly. See the Directory of published versions

## Extension: Extension-給藥總日份

Official URL: https://nhicore.nhi.gov.tw/empd/StructureDefinition/Extension-TotalDuration | Version: 0.2.0
Active as of 2026-06-16 | Computable Name: ExtensionTotalDuration

用於表示給藥總日份 Total Medication Days

Context of Use

This extension may be used on the following element(s)

- Element ID: `MedicationRequest`

Usage info

Usages:

- Use this Extension: 調劑單張-處方內容(MedicationRequest) and 電子處方箋-處方內容(MedicationRequest)
- Examples for this Extension: Bundle/bun-ds, Bundle/bun-ep, MedicationRequest/med-req-01-ds and MedicationRequest/med-req-01-ep

You can also check for usages in the FHIR IG Statistics

### Formal Views of Extension Content

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

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

This structure is derived from Extension

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Extension | S | 0..* | Extension | 擴充的資料項目。[應填入給藥總日份 Total Medication Days]
extension |  | 0..0 |  | Extension
url |  | 1..1 | uri | "https://nhicore.nhi.gov.tw/empd/StructureDefinition/Extension-TotalDuration"
value[x] | S | 1..1 | Quantity | Value of extension
value | S | 1..1 | decimal | Numerical value (with implicit precision)
unit | S | 0..1 | string | Unit representation
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Extension | S | 0..* | Extension | 擴充的資料項目。[應填入給藥總日份 Total Medication Days]
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "https://nhicore.nhi.gov.tw/empd/StructureDefinition/Extension-TotalDuration"
value[x] | S | 1..1 | Quantity | Value of extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
value | S Σ | 1..1 | decimal | Numerical value (with implicit precision)
comparator | ?!Σ | 0..1 | code | < | <= | >= | > - how to understand the value Binding: QuantityComparator (required): How the Quantity should be understood and represented.
unit | S Σ | 0..1 | string | Unit representation
system | Σ C | 0..1 | uri | System that defines coded unit form
code | Σ | 0..1 | code | Coded form of the unit
Documentation for this format

This structure is derived from Extension

Summary

Simple Extension with the type Quantity: 用於表示給藥總日份 Total Medication Days

Differential View

This structure is derived from Extension

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Extension | S | 0..* | Extension | 擴充的資料項目。[應填入給藥總日份 Total Medication Days]
extension |  | 0..0 |  | Extension
url |  | 1..1 | uri | "https://nhicore.nhi.gov.tw/empd/StructureDefinition/Extension-TotalDuration"
value[x] | S | 1..1 | Quantity | Value of extension
value | S | 1..1 | decimal | Numerical value (with implicit precision)
unit | S | 0..1 | string | Unit representation
Documentation for this format

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Extension | S | 0..* | Extension | 擴充的資料項目。[應填入給藥總日份 Total Medication Days]
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "https://nhicore.nhi.gov.tw/empd/StructureDefinition/Extension-TotalDuration"
value[x] | S | 1..1 | Quantity | Value of extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
value | S Σ | 1..1 | decimal | Numerical value (with implicit precision)
comparator | ?!Σ | 0..1 | code | < | <= | >= | > - how to understand the value Binding: QuantityComparator (required): How the Quantity should be understood and represented.
unit | S Σ | 0..1 | string | Unit representation
system | Σ C | 0..1 | uri | System that defines coded unit form
code | Σ | 0..1 | code | Coded form of the unit
Documentation for this format

This structure is derived from Extension

Summary

Simple Extension with the type Quantity: 用於表示給藥總日份 Total Medication Days

Other representations of profile: CSV, Excel, Schematron

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Extension.value[x].comparator | Base | required | QuantityComparator | 📍4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
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()`