臺灣核心實作指引(TW Core IG)
0.3.1 - Ci-Build Trial Use

臺灣核心實作指引(TW Core IG), published by 衛生福利部. This guide is not an authorized publication; it is the continuous build for version 0.3.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cctwFHIRterm/MOHW_TWCoreIG_Build/ and changes regularly. See the Directory of published versions

Resource Profile: TW Core Bundle

Official URL: https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Bundle-twcore Version: 0.3.1
Active as of 2024-10-22 Computable Name: TWCoreBundle

此臺灣核心-資料交換基本單位(TW Core Bundle) Profile說明本IG如何進一步定義FHIR的Bundle Resource以呈現資料交換基本單位的詳細資料。

Resource Bundle - 內容

一個用於儲存一組resources的容器(container)。

範圍與使用

常見的操作是將一堆 resources 集合在一起,放到一個單獨的地方,同時保留它們的相關訊息。在 FHIR 中,這個操作叫做「bundling resources」。這樣做對於很多不同的情境都很有用,例如:

  • 在伺服器操作中返回符合某些準則的一組 resources(參見 RESTful Search
  • 在伺服器上的歷史紀錄操作中返回 resources 的一組版本(參見 History
  • 將一組 resources 作為訊息交換的一部分發送(參見 Messaging
  • 將一組內嵌(self-contained)的 resources 集合在一起,形成可互換且可保存的集合,具有臨床完整性,例如臨床文件。(參見 Documents
  • 在伺服器上作為單一操作創建/更新/刪除一組 resources(包括作為單個原子交易進行,意即一個不可再分的、不可切分的交易,它要麼完全執行,要麼完全不執行。)(參見 Transactions
  • 儲存一組resources

界限與關聯

有兩種方式可以將 resources 聚集在一起以便於傳輸和永久化:分別為「內嵌的resources」和「bundles」。兩者之間有一個重要的區別:

  • 內嵌的 resources 是「在」容器內部:它們只能在容器的上下文中被解釋和/或改變。
  • bundle是一組可以獨立存在的 resources :例如,它們也可能直接透過RESTful API被存取

除了這兩種技術機制之外,還有三種行政和基礎建設的 resources ,也支援內容的分組(grouping)。這些 resources 不直接包含其他 resources ,而是使用「Reference」來指向被分組的resources:

  • List(清單) resource — 列舉一組平面的 resources 並提供管理這組 resources 的功能。雖然一個特定的List實例可能代表某一個時刻的一個「快照(snapshot)」為這個清單提供一個內容視圖,但從業務過程的角度來看,「List」的概念是動態的 ,它會隨著時間的流逝,項目會被增加和移除。这种動態性使得List成为一个靈活的工具,可以用来跟踪和管理隨著時間變化的 resources 集合.List resource參照其他 resources ,它的使用可能有特定的業務意義。
  • Group(群體) resource — 透過列舉或描述群組成員的特質來定義特定的人員、動物、裝置等的Group。Group resource 可能會隱式地參照其他 resources 。Group旨在作為一個整體被操作或觀察;例如:對一個Group進行治療、計算一個群體的風險等。這個 resource 通常用於公共衛生(例如:描述一個高風險人群)、臨床試驗(例如:定義一個試驗對象)和類似目的。
  • Composition(臨床文件架構) resource — 定義了一組健康相關的資訊,這些資訊被組合在一起形成一份單一邏輯的文件,提供了一個連貫的意義聲明,建立了其自身的上下文,並對於誰在做出聲明提供臨床證明。Composition resource 提供了一個FHIR 文件(document)的基本結構。文件的全部內容使用Bundle來表達,Compositions經常參照Lists作為特定小節(sections)的焦點(focus)。

這三個 resources 代表它們所參照的 resources 的有意義的分組(例如:一個出院用藥的List,一個臨床試驗參與者的Group,一組已簽名文件的resources),而一個bundle僅僅是用於傳輸和儲存的 resources 的容器。這些未必詳盡,其他的 resources 也提供了群組功能。

Usage:

Formal Views of Profile Content

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

This structure is derived from Bundle

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle 0..* Bundle 包含resourceBundle
... id 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Bundle紀錄,通常又稱為邏輯性ID。
... meta 0..1 Meta 此Bundle Resource的metadata
... implicitRules 0..1 uri 創建此內容所依據的一組規則
... identifier S 0..1 Identifier 一組Resources的資料交換基本單位(Bundle)的識別碼。
... type 1..1 code document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Bundle類型;應填入所綁定值集中的其中一個代碼。

... timestamp S 0..1 instant 組成Bundle的時間。
... total 0..1 unsignedInt 查詢時符合條件的總筆數
... link 0..* BackboneElement 與此Bundle相關的連結
.... relation 1..1 string 參見 [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
.... url 1..1 uri 連結的參照細節
... entry 0..* BackboneElement 在bundle中的條目 - 將會有一個resource或資訊,這個重複的資料項目順序:對於type為「document」和「message」的bundles,第一個resource是特殊的(必須分別是Composition或MessageHeader)。對於所有bundles,條目順序的意義取決於bundle的type。
.... link 0..* 與本條目相關的連結
.... fullUrl 0..1 uri Resource的 URI(絕對 URL 伺服器地址或 UUID/OID 的 URI)
.... resource 0..1 Resource Bundle中的resource
.... search 0..1 BackboneElement 查詢有關的資訊
..... mode 0..1 code match | include | outcome
Binding: SearchEntryMode (required): Resource出現在Bundle中的原因;應填入所綁定值集中的其中一個代碼。

..... score 0..1 decimal 查詢排名(0至1之間)
.... request 0..1 BackboneElement 其他執行資訊(transaction/batch/history)
..... method 1..1 code GET | HEAD | POST | PUT | DELETE | PATCH
Binding: HTTPVerb (required): 應填入所綁定值集中的其中一個代碼。

..... url 1..1 uri 此Bundle HTTP 對應的 URL
..... ifNoneMatch 0..1 string 用於管理緩存當前狀態
..... ifModifiedSince 0..1 instant 用於管理緩存當前狀態
..... ifMatch 0..1 string 用於管理更新衝突
..... ifNoneExist 0..1 string 用於有條件建立
.... response 0..1 BackboneElement 執行結果(transaction/batch/history)
..... status 1..1 string 狀態回應代碼(文字選填)
..... location 0..1 uri 位置(如果操作返回位置)
..... etag 0..1 string resource的 Etag(如果有相關)
..... lastModified 0..1 instant 修改時之伺服器日期時間
..... outcome 0..1 Resource 帶提示和警告的OperationOutcome(用於batch/transaction)
... signature 0..1 Signature 數位簽章

doco Documentation for this format

Terminology Bindings (Differential)

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard
NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle 包含resourceBundle
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
... id Σ 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Bundle紀錄,通常又稱為邏輯性ID。
... meta Σ 0..1 Meta 此Bundle Resource的metadata
... implicitRules ?!Σ 0..1 uri 創建此內容所依據的一組規則
... identifier SΣ 0..1 Identifier 一組Resources的資料交換基本單位(Bundle)的識別碼。
... type Σ 1..1 code document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Bundle類型;應填入所綁定值集中的其中一個代碼。

... timestamp SΣ 0..1 instant 組成Bundle的時間。
... total ΣC 0..1 unsignedInt 查詢時符合條件的總筆數
... link Σ 0..* BackboneElement 與此Bundle相關的連結
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... relation Σ 1..1 string 參見 [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
.... url Σ 1..1 uri 連結的參照細節
... entry ΣC 0..* BackboneElement 在bundle中的條目 - 將會有一個resource或資訊,這個重複的資料項目順序:對於type為「document」和「message」的bundles,第一個resource是特殊的(必須分別是Composition或MessageHeader)。對於所有bundles,條目順序的意義取決於bundle的type。
bdl-5: must be a resource unless there's a request or response
bdl-8: fullUrl cannot be a version specific reference
This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... link Σ 0..* See link (Bundle) 與本條目相關的連結
.... fullUrl Σ 0..1 uri Resource的 URI(絕對 URL 伺服器地址或 UUID/OID 的 URI)
.... resource Σ 0..1 Resource Bundle中的resource
.... search ΣC 0..1 BackboneElement 查詢有關的資訊
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... mode Σ 0..1 code match | include | outcome
Binding: SearchEntryMode (required): Resource出現在Bundle中的原因;應填入所綁定值集中的其中一個代碼。

..... score Σ 0..1 decimal 查詢排名(0至1之間)
.... request ΣC 0..1 BackboneElement 其他執行資訊(transaction/batch/history)
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... method Σ 1..1 code GET | HEAD | POST | PUT | DELETE | PATCH
Binding: HTTPVerb (required): 應填入所綁定值集中的其中一個代碼。

..... url Σ 1..1 uri 此Bundle HTTP 對應的 URL
..... ifNoneMatch Σ 0..1 string 用於管理緩存當前狀態
..... ifModifiedSince Σ 0..1 instant 用於管理緩存當前狀態
..... ifMatch Σ 0..1 string 用於管理更新衝突
..... ifNoneExist Σ 0..1 string 用於有條件建立
.... response ΣC 0..1 BackboneElement 執行結果(transaction/batch/history)
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... status Σ 1..1 string 狀態回應代碼(文字選填)
..... location Σ 0..1 uri 位置(如果操作返回位置)
..... etag Σ 0..1 string resource的 Etag(如果有相關)
..... lastModified Σ 0..1 instant 修改時之伺服器日期時間
..... outcome Σ 0..1 Resource 帶提示和警告的OperationOutcome(用於batch/transaction)
... signature Σ 0..1 Signature 數位簽章

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
bdl-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
: entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history'))
bdl-5errorBundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-7errorBundleFullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
: (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct()
bdl-8errorBundle.entryfullUrl cannot be a version specific reference
: fullUrl.contains('/_history/').not()
bdl-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle 包含resourceBundle
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
... id Σ 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Bundle紀錄,通常又稱為邏輯性ID。
... meta Σ 0..1 Meta 此Bundle Resource的metadata
... implicitRules ?!Σ 0..1 uri 創建此內容所依據的一組規則
... identifier SΣ 0..1 Identifier 一組Resources的資料交換基本單位(Bundle)的識別碼。
... type Σ 1..1 code document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Bundle類型;應填入所綁定值集中的其中一個代碼。

... timestamp SΣ 0..1 instant 組成Bundle的時間。
... total ΣC 0..1 unsignedInt 查詢時符合條件的總筆數
... link Σ 0..* BackboneElement 與此Bundle相關的連結
.... 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
.... relation Σ 1..1 string 參見 [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
.... url Σ 1..1 uri 連結的參照細節
... entry ΣC 0..* BackboneElement 在bundle中的條目 - 將會有一個resource或資訊,這個重複的資料項目順序:對於type為「document」和「message」的bundles,第一個resource是特殊的(必須分別是Composition或MessageHeader)。對於所有bundles,條目順序的意義取決於bundle的type。
bdl-5: must be a resource unless there's a request or response
bdl-8: fullUrl cannot be a version specific reference
This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
.... 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
.... link Σ 0..* See link (Bundle) 與本條目相關的連結
.... fullUrl Σ 0..1 uri Resource的 URI(絕對 URL 伺服器地址或 UUID/OID 的 URI)
.... resource Σ 0..1 Resource Bundle中的resource
.... search ΣC 0..1 BackboneElement 查詢有關的資訊
..... 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
..... mode Σ 0..1 code match | include | outcome
Binding: SearchEntryMode (required): Resource出現在Bundle中的原因;應填入所綁定值集中的其中一個代碼。

..... score Σ 0..1 decimal 查詢排名(0至1之間)
.... request ΣC 0..1 BackboneElement 其他執行資訊(transaction/batch/history)
..... 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
..... method Σ 1..1 code GET | HEAD | POST | PUT | DELETE | PATCH
Binding: HTTPVerb (required): 應填入所綁定值集中的其中一個代碼。

..... url Σ 1..1 uri 此Bundle HTTP 對應的 URL
..... ifNoneMatch Σ 0..1 string 用於管理緩存當前狀態
..... ifModifiedSince Σ 0..1 instant 用於管理緩存當前狀態
..... ifMatch Σ 0..1 string 用於管理更新衝突
..... ifNoneExist Σ 0..1 string 用於有條件建立
.... response ΣC 0..1 BackboneElement 執行結果(transaction/batch/history)
..... 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
..... status Σ 1..1 string 狀態回應代碼(文字選填)
..... location Σ 0..1 uri 位置(如果操作返回位置)
..... etag Σ 0..1 string resource的 Etag(如果有相關)
..... lastModified Σ 0..1 instant 修改時之伺服器日期時間
..... outcome Σ 0..1 Resource 帶提示和警告的OperationOutcome(用於batch/transaction)
... signature Σ 0..1 Signature 數位簽章

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
bdl-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
: entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history'))
bdl-5errorBundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-7errorBundleFullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
: (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct()
bdl-8errorBundle.entryfullUrl cannot be a version specific reference
: fullUrl.contains('/_history/').not()
bdl-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

This structure is derived from Bundle

Summary

Must-Support: 2 elements

Differential View

This structure is derived from Bundle

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle 0..* Bundle 包含resourceBundle
... id 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Bundle紀錄,通常又稱為邏輯性ID。
... meta 0..1 Meta 此Bundle Resource的metadata
... implicitRules 0..1 uri 創建此內容所依據的一組規則
... identifier S 0..1 Identifier 一組Resources的資料交換基本單位(Bundle)的識別碼。
... type 1..1 code document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Bundle類型;應填入所綁定值集中的其中一個代碼。

... timestamp S 0..1 instant 組成Bundle的時間。
... total 0..1 unsignedInt 查詢時符合條件的總筆數
... link 0..* BackboneElement 與此Bundle相關的連結
.... relation 1..1 string 參見 [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
.... url 1..1 uri 連結的參照細節
... entry 0..* BackboneElement 在bundle中的條目 - 將會有一個resource或資訊,這個重複的資料項目順序:對於type為「document」和「message」的bundles,第一個resource是特殊的(必須分別是Composition或MessageHeader)。對於所有bundles,條目順序的意義取決於bundle的type。
.... link 0..* 與本條目相關的連結
.... fullUrl 0..1 uri Resource的 URI(絕對 URL 伺服器地址或 UUID/OID 的 URI)
.... resource 0..1 Resource Bundle中的resource
.... search 0..1 BackboneElement 查詢有關的資訊
..... mode 0..1 code match | include | outcome
Binding: SearchEntryMode (required): Resource出現在Bundle中的原因;應填入所綁定值集中的其中一個代碼。

..... score 0..1 decimal 查詢排名(0至1之間)
.... request 0..1 BackboneElement 其他執行資訊(transaction/batch/history)
..... method 1..1 code GET | HEAD | POST | PUT | DELETE | PATCH
Binding: HTTPVerb (required): 應填入所綁定值集中的其中一個代碼。

..... url 1..1 uri 此Bundle HTTP 對應的 URL
..... ifNoneMatch 0..1 string 用於管理緩存當前狀態
..... ifModifiedSince 0..1 instant 用於管理緩存當前狀態
..... ifMatch 0..1 string 用於管理更新衝突
..... ifNoneExist 0..1 string 用於有條件建立
.... response 0..1 BackboneElement 執行結果(transaction/batch/history)
..... status 1..1 string 狀態回應代碼(文字選填)
..... location 0..1 uri 位置(如果操作返回位置)
..... etag 0..1 string resource的 Etag(如果有相關)
..... lastModified 0..1 instant 修改時之伺服器日期時間
..... outcome 0..1 Resource 帶提示和警告的OperationOutcome(用於batch/transaction)
... signature 0..1 Signature 數位簽章

doco Documentation for this format

Terminology Bindings (Differential)

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Key Elements View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle 包含resourceBundle
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
... id Σ 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Bundle紀錄,通常又稱為邏輯性ID。
... meta Σ 0..1 Meta 此Bundle Resource的metadata
... implicitRules ?!Σ 0..1 uri 創建此內容所依據的一組規則
... identifier SΣ 0..1 Identifier 一組Resources的資料交換基本單位(Bundle)的識別碼。
... type Σ 1..1 code document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Bundle類型;應填入所綁定值集中的其中一個代碼。

... timestamp SΣ 0..1 instant 組成Bundle的時間。
... total ΣC 0..1 unsignedInt 查詢時符合條件的總筆數
... link Σ 0..* BackboneElement 與此Bundle相關的連結
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... relation Σ 1..1 string 參見 [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
.... url Σ 1..1 uri 連結的參照細節
... entry ΣC 0..* BackboneElement 在bundle中的條目 - 將會有一個resource或資訊,這個重複的資料項目順序:對於type為「document」和「message」的bundles,第一個resource是特殊的(必須分別是Composition或MessageHeader)。對於所有bundles,條目順序的意義取決於bundle的type。
bdl-5: must be a resource unless there's a request or response
bdl-8: fullUrl cannot be a version specific reference
This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... link Σ 0..* See link (Bundle) 與本條目相關的連結
.... fullUrl Σ 0..1 uri Resource的 URI(絕對 URL 伺服器地址或 UUID/OID 的 URI)
.... resource Σ 0..1 Resource Bundle中的resource
.... search ΣC 0..1 BackboneElement 查詢有關的資訊
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... mode Σ 0..1 code match | include | outcome
Binding: SearchEntryMode (required): Resource出現在Bundle中的原因;應填入所綁定值集中的其中一個代碼。

..... score Σ 0..1 decimal 查詢排名(0至1之間)
.... request ΣC 0..1 BackboneElement 其他執行資訊(transaction/batch/history)
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... method Σ 1..1 code GET | HEAD | POST | PUT | DELETE | PATCH
Binding: HTTPVerb (required): 應填入所綁定值集中的其中一個代碼。

..... url Σ 1..1 uri 此Bundle HTTP 對應的 URL
..... ifNoneMatch Σ 0..1 string 用於管理緩存當前狀態
..... ifModifiedSince Σ 0..1 instant 用於管理緩存當前狀態
..... ifMatch Σ 0..1 string 用於管理更新衝突
..... ifNoneExist Σ 0..1 string 用於有條件建立
.... response ΣC 0..1 BackboneElement 執行結果(transaction/batch/history)
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... status Σ 1..1 string 狀態回應代碼(文字選填)
..... location Σ 0..1 uri 位置(如果操作返回位置)
..... etag Σ 0..1 string resource的 Etag(如果有相關)
..... lastModified Σ 0..1 instant 修改時之伺服器日期時間
..... outcome Σ 0..1 Resource 帶提示和警告的OperationOutcome(用於batch/transaction)
... signature Σ 0..1 Signature 數位簽章

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
bdl-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
: entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history'))
bdl-5errorBundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-7errorBundleFullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
: (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct()
bdl-8errorBundle.entryfullUrl cannot be a version specific reference
: fullUrl.contains('/_history/').not()
bdl-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Bundle C 0..* Bundle 包含resourceBundle
bdl-1: total only when a search or history
bdl-2: entry.search only when a search
bdl-3: entry.request mandatory for batch/transaction/history, otherwise prohibited
bdl-4: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
bdl-9: A document must have an identifier with a system and a value
bdl-10: A document must have a date
bdl-11: A document must have a Composition as the first resource
bdl-12: A message must have a MessageHeader as the first resource
... id Σ 0..1 id 不重複的ID用以識別儲存在特定FHIR Server中的Bundle紀錄,通常又稱為邏輯性ID。
... meta Σ 0..1 Meta 此Bundle Resource的metadata
... implicitRules ?!Σ 0..1 uri 創建此內容所依據的一組規則
... identifier SΣ 0..1 Identifier 一組Resources的資料交換基本單位(Bundle)的識別碼。
... type Σ 1..1 code document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Binding: BundleType (required): Bundle類型;應填入所綁定值集中的其中一個代碼。

... timestamp SΣ 0..1 instant 組成Bundle的時間。
... total ΣC 0..1 unsignedInt 查詢時符合條件的總筆數
... link Σ 0..* BackboneElement 與此Bundle相關的連結
.... 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
.... relation Σ 1..1 string 參見 [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
.... url Σ 1..1 uri 連結的參照細節
... entry ΣC 0..* BackboneElement 在bundle中的條目 - 將會有一個resource或資訊,這個重複的資料項目順序:對於type為「document」和「message」的bundles,第一個resource是特殊的(必須分別是Composition或MessageHeader)。對於所有bundles,條目順序的意義取決於bundle的type。
bdl-5: must be a resource unless there's a request or response
bdl-8: fullUrl cannot be a version specific reference
This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
.... 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
.... link Σ 0..* See link (Bundle) 與本條目相關的連結
.... fullUrl Σ 0..1 uri Resource的 URI(絕對 URL 伺服器地址或 UUID/OID 的 URI)
.... resource Σ 0..1 Resource Bundle中的resource
.... search ΣC 0..1 BackboneElement 查詢有關的資訊
..... 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
..... mode Σ 0..1 code match | include | outcome
Binding: SearchEntryMode (required): Resource出現在Bundle中的原因;應填入所綁定值集中的其中一個代碼。

..... score Σ 0..1 decimal 查詢排名(0至1之間)
.... request ΣC 0..1 BackboneElement 其他執行資訊(transaction/batch/history)
..... 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
..... method Σ 1..1 code GET | HEAD | POST | PUT | DELETE | PATCH
Binding: HTTPVerb (required): 應填入所綁定值集中的其中一個代碼。

..... url Σ 1..1 uri 此Bundle HTTP 對應的 URL
..... ifNoneMatch Σ 0..1 string 用於管理緩存當前狀態
..... ifModifiedSince Σ 0..1 instant 用於管理緩存當前狀態
..... ifMatch Σ 0..1 string 用於管理更新衝突
..... ifNoneExist Σ 0..1 string 用於有條件建立
.... response ΣC 0..1 BackboneElement 執行結果(transaction/batch/history)
..... 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
..... status Σ 1..1 string 狀態回應代碼(文字選填)
..... location Σ 0..1 uri 位置(如果操作返回位置)
..... etag Σ 0..1 string resource的 Etag(如果有相關)
..... lastModified Σ 0..1 instant 修改時之伺服器日期時間
..... outcome Σ 0..1 Resource 帶提示和警告的OperationOutcome(用於batch/transaction)
... signature Σ 0..1 Signature 數位簽章

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
Bundle.languagepreferredCommonLanguages
Additional Bindings Purpose
AllLanguages Max Binding
http://hl7.org/fhir/ValueSet/languages
from the FHIR Standard
Bundle.typerequiredBundleType
http://hl7.org/fhir/ValueSet/bundle-type|4.0.1
from the FHIR Standard
Bundle.entry.search.moderequiredSearchEntryMode
http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1
from the FHIR Standard
Bundle.entry.request.methodrequiredHTTPVerb
http://hl7.org/fhir/ValueSet/http-verb|4.0.1
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
bdl-1errorBundletotal only when a search or history
: total.empty() or (type = 'searchset') or (type = 'history')
bdl-2errorBundleentry.search only when a search
: entry.search.empty() or (type = 'searchset')
bdl-3errorBundleentry.request mandatory for batch/transaction/history, otherwise prohibited
: entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))
bdl-4errorBundleentry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
: entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history'))
bdl-5errorBundle.entrymust be a resource unless there's a request or response
: resource.exists() or request.exists() or response.exists()
bdl-7errorBundleFullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
: (type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct()
bdl-8errorBundle.entryfullUrl cannot be a version specific reference
: fullUrl.contains('/_history/').not()
bdl-9errorBundleA document must have an identifier with a system and a value
: type = 'document' implies (identifier.system.exists() and identifier.value.exists())
bdl-10errorBundleA document must have a date
: type = 'document' implies (timestamp.hasValue())
bdl-11errorBundleA document must have a Composition as the first resource
: type = 'document' implies entry.first().resource.is(Composition)
bdl-12errorBundleA message must have a MessageHeader as the first resource
: type = 'message' implies entry.first().resource.is(MessageHeader)
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()

This structure is derived from Bundle

Summary

Must-Support: 2 elements

 

Other representations of profile: CSV, Excel, Schematron

Notes:

以下概述了此Profile所需的RESTful FHIR互動功能。有關TW Core IG支援的RESTful互動功能的完整清單,請參閱TW Core Server能力聲明

建議應該支援以下查詢參數:

  1. 建議應該(SHOULD) 支援透過查詢參數 _id 查詢所有Bundle:
    (如何透過token查詢)
    GET [base]/Bundle?_id=[id]
    GET [base]/Bundle/[id]

    例子:
    (1) GET [base]/Bundle?_id=bun-example
    (2) GET [base]/Bundle/bun-example

  2. 建議應該(SHOULD) 支援透過查詢參數 identifier 查詢所有Bundle:
    (如何透過token查詢)
    GET [base]/Bundle?identifier={system|}[code]

    例子:
    (1) GET [base]/Bundle?identifier=https://www.cdc.gov.tw/|01014857930415100059403