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-publish-subscriptionstatus 版本: 2025.03.10
Draft as of 2025-03-10 机读名称: PublishSubscriptionStatus

由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
... notificationEvent C 1..1 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
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
ele-1: All FHIR elements must have a @value or children
ext-1: Must have either extensions or value[x], not both
..... extension:NullFlavor 1..1 code 该元素不取值的原因
URL: http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor
Binding: NullFlavor (required)
ele-1: All FHIR elements must have a @value or children
ext-1: Must have either extensions or value[x], not both
.... reference ΣC 0..1 string Literal reference, Relative, internal or absolute URL
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

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
SubscriptionStatus.typerequiredPattern: event-notification
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
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 0..0
... type 1..1 code 通知的类型,固定为event-notification
Required Pattern: event-notification
... eventsSinceSubscriptionStart 0..0
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription 1..1 Reference(Subscription) 指向订阅的引用.在发布的通知中订阅不适用。
.... extension 1..* Extension Extension
.... Slices for extension Content/Rules for all slices
..... extension:NullFlavor 1..1 code 该元素不取值的原因
URL: http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor
Binding: NullFlavor (required)
... topic 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用

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
... type ?!ΣC 1..1 code 通知的类型,固定为event-notification
Binding: SubscriptionNotificationType (required): The type of notification represented by the status message.


Required Pattern: event-notification
... notificationEvent C 1..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
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription Σ 1..1 Reference(Subscription) 指向订阅的引用.在发布的通知中订阅不适用。
.... id 0..1 id Unique id for inter-element referencing
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:NullFlavor 1..1 code 该元素不取值的原因
URL: http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor
Binding: NullFlavor (required)
.... reference ΣC 0..1 string Literal reference, Relative, internal or absolute URL
.... type Σ 0..1 uri Type the reference refers to (e.g. "Patient") - must be a resource in resources
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).

.... identifier ΣC 0..1 Identifier Logical reference, when literal reference is not known
.... display ΣC 0..1 string Text alternative for the resource
... topic Σ 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
... error Σ 0..* CodeableConcept List of errors on the subscription
Binding: SubscriptionErrorCodes (example): Codes to represent subscription error details.



doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
SubscriptionStatus.languagerequiredAllLanguages
http://hl7.org/fhir/ValueSet/all-languages|5.0.0
from the FHIR Standard
SubscriptionStatus.typerequiredPattern: event-notification
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
from the FHIR Standard
SubscriptionStatus.subscription.typeextensibleResourceType
http://hl7.org/fhir/ValueSet/resource-types
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: 6 elements
Prohibited: 2 elements

Extensions

This structure refers to these extensions:

关键元素视图

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
... notificationEvent C 1..1 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
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
ele-1: All FHIR elements must have a @value or children
ext-1: Must have either extensions or value[x], not both
..... extension:NullFlavor 1..1 code 该元素不取值的原因
URL: http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor
Binding: NullFlavor (required)
ele-1: All FHIR elements must have a @value or children
ext-1: Must have either extensions or value[x], not both
.... reference ΣC 0..1 string Literal reference, Relative, internal or absolute URL
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

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
SubscriptionStatus.typerequiredPattern: event-notification
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
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 0..0
... type 1..1 code 通知的类型,固定为event-notification
Required Pattern: event-notification
... eventsSinceSubscriptionStart 0..0
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription 1..1 Reference(Subscription) 指向订阅的引用.在发布的通知中订阅不适用。
.... extension 1..* Extension Extension
.... Slices for extension Content/Rules for all slices
..... extension:NullFlavor 1..1 code 该元素不取值的原因
URL: http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor
Binding: NullFlavor (required)
... topic 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用

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
... type ?!ΣC 1..1 code 通知的类型,固定为event-notification
Binding: SubscriptionNotificationType (required): The type of notification represented by the status message.


Required Pattern: event-notification
... notificationEvent C 1..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
.... eventNumber 1..1 integer64 事件序号
.... timestamp 1..1 instant 事件发生的时间戳
.... focus 1..1 Reference(Resource) 事件关注资源
.... additionalContext 0..* Reference(Resource) 事件关注资源的相关资源
... subscription Σ 1..1 Reference(Subscription) 指向订阅的引用.在发布的通知中订阅不适用。
.... id 0..1 id Unique id for inter-element referencing
.... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
..... extension:NullFlavor 1..1 code 该元素不取值的原因
URL: http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor
Binding: NullFlavor (required)
.... reference ΣC 0..1 string Literal reference, Relative, internal or absolute URL
.... type Σ 0..1 uri Type the reference refers to (e.g. "Patient") - must be a resource in resources
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).

.... identifier ΣC 0..1 Identifier Logical reference, when literal reference is not known
.... display ΣC 0..1 string Text alternative for the resource
... topic Σ 1..1 canonical(SubscriptionTopic) 指向订阅主题的引用
... error Σ 0..* CodeableConcept List of errors on the subscription
Binding: SubscriptionErrorCodes (example): Codes to represent subscription error details.



doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
SubscriptionStatus.languagerequiredAllLanguages
http://hl7.org/fhir/ValueSet/all-languages|5.0.0
from the FHIR Standard
SubscriptionStatus.typerequiredPattern: event-notification
http://hl7.org/fhir/ValueSet/subscription-notification-type|5.0.0
from the FHIR Standard
SubscriptionStatus.subscription.typeextensibleResourceType
http://hl7.org/fhir/ValueSet/resource-types
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: 6 elements
Prohibited: 2 elements

Extensions

This structure refers to these extensions:

 

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