HL7中国发布订阅框架实施指南
2025.03.10 - release

HL7中国发布订阅框架实施指南 - Local Development build (v2025.03.10) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: 通知时使用的订阅状态本地化定义

官方URL: http://hl7.org.cn/fhir-ig/pubsub/StructureDefinition/profile-base-notify-subscriptionstatus 版本: 2025.03.10
Draft as of 2025-03-10 机读名称: NotifySubscriptionStatus

由HL7中国设计的适用于中国健康信息化的通知时使用的订阅状态本地化定义。

Usage:

Formal Views of Profile Content

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

NameFlagsCard.TypeDescription & Constraintsdoco
.. SubscriptionStatus C 0..* SubscriptionStatus Status information about a Subscription provided during event notification
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
sst-1: Event notifications must contain events
sst-2: Status messages must contain status
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
ele-1: All FHIR elements must have a @value or children
... contained 0..* Resource Contained, inline Resources
... 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
... type ?!ΣC 1..1 code 通知的类型: handshake | heartbeat | event-notification
Binding: SubscriptionNotificationType (required): The type of notification represented by the status message.


ele-1: All FHIR elements must have a @value or children
... eventsSinceSubscriptionStart Σ 1..1 integer64 自订阅创建后的事件数量
ele-1: All FHIR elements must have a @value or children
... notificationEvent C 0..* BackboneElement 通知事件的详细信息
ele-1: All FHIR elements must have a @value or children
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
ele-1: All FHIR elements must have a @value or children
ext-1: Must have either extensions or value[x], not both
.... eventNumber 1..1 integer64 事件序号
ele-1: All FHIR elements must have a @value or children
.... timestamp 1..1 instant 事件发生的时间戳
ele-1: All FHIR elements must have a @value or children
.... focus 1..1 Reference(Resource) 事件关注资源
ele-1: All FHIR elements must have a @value or children
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
ele-1: All FHIR elements must have a @value or children
... subscription Σ 1..1 Reference(Subscription) 指向订阅的引用
ele-1: All FHIR elements must have a @value or children
... topic Σ 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
ele-1: All FHIR elements must have a @value or children
... error Σ 0..* CodeableConcept 该订阅的错误列表
Binding: SubscriptionErrorCodes (example): Codes to represent subscription error details.


ele-1: All FHIR elements must have a @value or children

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
SubscriptionStatus.statusrequiredSubscriptionStatusCodes
http://hl7.org/fhir/ValueSet/subscription-status|5.0.0
from the FHIR Standard
SubscriptionStatus.typerequiredSubscriptionNotificationType
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
from the FHIR Standard
SubscriptionStatus.errorexampleSubscriptionErrorCodes
http://hl7.org/fhir/ValueSet/subscription-error
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorSubscriptionStatusIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionStatusIf 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().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorSubscriptionStatusIf 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-5errorSubscriptionStatusIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionStatusA resource should have narrative for robust management
: text.`div`.exists()
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()
sst-1errorSubscriptionStatusEvent notifications must contain events
: (type = 'event-notification' or type = 'query-event') implies notificationEvent.exists()
sst-2errorSubscriptionStatusStatus messages must contain status
: type = 'query-status' implies status.exists()

该结构继承自 SubscriptionStatus

NameFlagsCard.TypeDescription & Constraintsdoco
.. SubscriptionStatus 0..* SubscriptionStatus Status information about a Subscription provided during event notification
... status 1..1 code 订阅的状态: requested | active | error | off | entered-in-error
... type 1..1 code 通知的类型: handshake | heartbeat | event-notification
... eventsSinceSubscriptionStart 1..1 integer64 自订阅创建后的事件数量
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription 1..1 Reference(Subscription) 指向订阅的引用
... topic 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
... error 0..* CodeableConcept 该订阅的错误列表

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. SubscriptionStatus C 0..* SubscriptionStatus Status information about a Subscription provided during event notification
sst-1: Event notifications must contain events
sst-2: Status messages must contain status
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
... status ΣC 1..1 code 订阅的状态: requested | active | error | off | entered-in-error
Binding: SubscriptionStatusCodes (required): The status of a subscription at the time this notification was generated.

... type ?!ΣC 1..1 code 通知的类型: handshake | heartbeat | event-notification
Binding: SubscriptionNotificationType (required): The type of notification represented by the status message.

... eventsSinceSubscriptionStart Σ 1..1 integer64 自订阅创建后的事件数量
... notificationEvent C 0..* 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
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription Σ 1..1 Reference(Subscription) 指向订阅的引用
... topic Σ 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
... error Σ 0..* CodeableConcept 该订阅的错误列表
Binding: SubscriptionErrorCodes (example): Codes to represent subscription error details.



doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
SubscriptionStatus.languagerequiredAllLanguages
http://hl7.org/fhir/ValueSet/all-languages|5.0.0
from the FHIR Standard
SubscriptionStatus.statusrequiredSubscriptionStatusCodes
http://hl7.org/fhir/ValueSet/subscription-status|5.0.0
from the FHIR Standard
SubscriptionStatus.typerequiredSubscriptionNotificationType
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
from the FHIR Standard
SubscriptionStatus.errorexampleSubscriptionErrorCodes
http://hl7.org/fhir/ValueSet/subscription-error
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorSubscriptionStatusIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionStatusIf 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().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorSubscriptionStatusIf 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-5errorSubscriptionStatusIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionStatusA resource should have narrative for robust management
: text.`div`.exists()
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()
sst-1errorSubscriptionStatusEvent notifications must contain events
: (type = 'event-notification' or type = 'query-event') implies notificationEvent.exists()
sst-2errorSubscriptionStatusStatus messages must contain status
: type = 'query-status' implies status.exists()

该结构继承自 SubscriptionStatus

Summary

Mandatory: 3 elements(2 nested mandatory elements)

关键元素视图

NameFlagsCard.TypeDescription & Constraintsdoco
.. SubscriptionStatus C 0..* SubscriptionStatus Status information about a Subscription provided during event notification
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
sst-1: Event notifications must contain events
sst-2: Status messages must contain status
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
ele-1: All FHIR elements must have a @value or children
... contained 0..* Resource Contained, inline Resources
... 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
... type ?!ΣC 1..1 code 通知的类型: handshake | heartbeat | event-notification
Binding: SubscriptionNotificationType (required): The type of notification represented by the status message.


ele-1: All FHIR elements must have a @value or children
... eventsSinceSubscriptionStart Σ 1..1 integer64 自订阅创建后的事件数量
ele-1: All FHIR elements must have a @value or children
... notificationEvent C 0..* BackboneElement 通知事件的详细信息
ele-1: All FHIR elements must have a @value or children
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
ele-1: All FHIR elements must have a @value or children
ext-1: Must have either extensions or value[x], not both
.... eventNumber 1..1 integer64 事件序号
ele-1: All FHIR elements must have a @value or children
.... timestamp 1..1 instant 事件发生的时间戳
ele-1: All FHIR elements must have a @value or children
.... focus 1..1 Reference(Resource) 事件关注资源
ele-1: All FHIR elements must have a @value or children
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
ele-1: All FHIR elements must have a @value or children
... subscription Σ 1..1 Reference(Subscription) 指向订阅的引用
ele-1: All FHIR elements must have a @value or children
... topic Σ 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
ele-1: All FHIR elements must have a @value or children
... error Σ 0..* CodeableConcept 该订阅的错误列表
Binding: SubscriptionErrorCodes (example): Codes to represent subscription error details.


ele-1: All FHIR elements must have a @value or children

doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
SubscriptionStatus.statusrequiredSubscriptionStatusCodes
http://hl7.org/fhir/ValueSet/subscription-status|5.0.0
from the FHIR Standard
SubscriptionStatus.typerequiredSubscriptionNotificationType
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
from the FHIR Standard
SubscriptionStatus.errorexampleSubscriptionErrorCodes
http://hl7.org/fhir/ValueSet/subscription-error
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorSubscriptionStatusIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionStatusIf 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().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorSubscriptionStatusIf 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-5errorSubscriptionStatusIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionStatusA resource should have narrative for robust management
: text.`div`.exists()
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()
sst-1errorSubscriptionStatusEvent notifications must contain events
: (type = 'event-notification' or type = 'query-event') implies notificationEvent.exists()
sst-2errorSubscriptionStatusStatus messages must contain status
: type = 'query-status' implies status.exists()

差异视图

该结构继承自 SubscriptionStatus

NameFlagsCard.TypeDescription & Constraintsdoco
.. SubscriptionStatus 0..* SubscriptionStatus Status information about a Subscription provided during event notification
... status 1..1 code 订阅的状态: requested | active | error | off | entered-in-error
... type 1..1 code 通知的类型: handshake | heartbeat | event-notification
... eventsSinceSubscriptionStart 1..1 integer64 自订阅创建后的事件数量
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription 1..1 Reference(Subscription) 指向订阅的引用
... topic 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
... error 0..* CodeableConcept 该订阅的错误列表

doco Documentation for this format

快照视图

NameFlagsCard.TypeDescription & Constraintsdoco
.. SubscriptionStatus C 0..* SubscriptionStatus Status information about a Subscription provided during event notification
sst-1: Event notifications must contain events
sst-2: Status messages must contain status
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
... status ΣC 1..1 code 订阅的状态: requested | active | error | off | entered-in-error
Binding: SubscriptionStatusCodes (required): The status of a subscription at the time this notification was generated.

... type ?!ΣC 1..1 code 通知的类型: handshake | heartbeat | event-notification
Binding: SubscriptionNotificationType (required): The type of notification represented by the status message.

... eventsSinceSubscriptionStart Σ 1..1 integer64 自订阅创建后的事件数量
... notificationEvent C 0..* 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
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription Σ 1..1 Reference(Subscription) 指向订阅的引用
... topic Σ 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
... error Σ 0..* CodeableConcept 该订阅的错误列表
Binding: SubscriptionErrorCodes (example): Codes to represent subscription error details.



doco Documentation for this format

Terminology Bindings

PathConformanceValueSetURI
SubscriptionStatus.languagerequiredAllLanguages
http://hl7.org/fhir/ValueSet/all-languages|5.0.0
from the FHIR Standard
SubscriptionStatus.statusrequiredSubscriptionStatusCodes
http://hl7.org/fhir/ValueSet/subscription-status|5.0.0
from the FHIR Standard
SubscriptionStatus.typerequiredSubscriptionNotificationType
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
from the FHIR Standard
SubscriptionStatus.errorexampleSubscriptionErrorCodes
http://hl7.org/fhir/ValueSet/subscription-error
from the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorSubscriptionStatusIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionStatusIf 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().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4errorSubscriptionStatusIf 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-5errorSubscriptionStatusIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionStatusA resource should have narrative for robust management
: text.`div`.exists()
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()
sst-1errorSubscriptionStatusEvent notifications must contain events
: (type = 'event-notification' or type = 'query-event') implies notificationEvent.exists()
sst-2errorSubscriptionStatusStatus messages must contain status
: type = 'query-status' implies status.exists()

该结构继承自 SubscriptionStatus

Summary

Mandatory: 3 elements(2 nested mandatory elements)

 

本 Profile 的其它表示法: CSV, Excel, Schematron