Koppeltaal 2.0 Implementation Guide (Full Documentation)
0.15.0 - ci-build NL

Koppeltaal 2.0 Implementation Guide (Full Documentation) - Local Development build (v0.15.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: KT2_Subscription

Official URL: http://koppeltaal.nl/fhir/StructureDefinition/KT2Subscription Version: 0.15.0
Draft as of 2023-01-24 Realm: Netherlands flag Computable Name: KT2_Subscription

Copyright/Legal: VZVZ

The Subscription resource defines push-based notifications between systems in the Koppeltaal ecosystem. It enables applications to receive real-time updates when resources matching specified criteria are created or modified. The subscription mechanism ensures timely data synchronization and event-driven communication between healthcare applications.

Usages:

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.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Subscription 0..* Subscription Server push subscription criteria
Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension Content/Rules for all slices
.... extension:resource-origin 0..1 Reference(KT2_Device) Extension
URL: http://koppeltaal.nl/fhir/StructureDefinition/resource-origin
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... reason Σ 1..1 string Description of why this subscription was created
... criteria Σ 1..1 string Rule for server push
... error Σ 0..1 string Latest error note
... channel Σ 1..1 BackboneElement The channel on which to report matches to the criteria
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... type Σ 1..1 code rest-hook
Binding: SubscriptionChannelType (required): The type of method used to execute a subscription.
Fixed Value: rest-hook

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
Subscription.statusrequiredSubscriptionStatus
http://hl7.org/fhir/ValueSet/subscription-status|4.0.1
From the FHIR Standard
Subscription.channel.typerequiredFixed Value: rest-hook
http://hl7.org/fhir/ValueSet/subscription-channel-type|4.0.1
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorSubscriptionIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionIf 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-4errorSubscriptionIf 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-5errorSubscriptionIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionA 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()

This structure is derived from Subscription

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Subscription 0..* Subscription Server push subscription criteria
... Slices for extension Content/Rules for all slices
.... extension:resource-origin 0..1 Reference(KT2_Device) Extension
URL: http://koppeltaal.nl/fhir/StructureDefinition/resource-origin
... error 0..1 string Latest error note
... channel
.... type 1..1 code rest-hook
Fixed Value: rest-hook
.... payload 0..0

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Subscription 0..* Subscription Server push subscription criteria
Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
... 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
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... Slices for extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... extension:resource-origin 0..1 Reference(KT2_Device) Extension
URL: http://koppeltaal.nl/fhir/StructureDefinition/resource-origin
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... status ?!Σ 1..1 code requested | active | error | off
Binding: SubscriptionStatus (required): The status of a subscription.
... contact ΣC 0..* ContactPoint Contact details for source (e.g. troubleshooting)
Constraints: cpt-2
... end Σ 0..1 instant When to automatically delete the subscription
... reason Σ 1..1 string Description of why this subscription was created
... criteria Σ 1..1 string Rule for server push
... error Σ 0..1 string Latest error note
... channel Σ 1..1 BackboneElement The channel on which to report matches to the criteria
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... type Σ 1..1 code rest-hook
Binding: SubscriptionChannelType (required): The type of method used to execute a subscription.
Fixed Value: rest-hook
.... endpoint Σ 0..1 url Where the channel points to
.... header Σ 0..* string Usage depends on the channel type

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
Subscription.languagepreferredCommonLanguages
http://hl7.org/fhir/ValueSet/languages
From the FHIR Standard
Additional Bindings Purpose
AllLanguages Max Binding
Subscription.statusrequiredSubscriptionStatus
http://hl7.org/fhir/ValueSet/subscription-status|4.0.1
From the FHIR Standard
Subscription.channel.typerequiredFixed Value: rest-hook
http://hl7.org/fhir/ValueSet/subscription-channel-type|4.0.1
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
cpt-2errorSubscription.contactA system is required if a value is provided.
: value.empty() or system.exists()
dom-2errorSubscriptionIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionIf 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-4errorSubscriptionIf 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-5errorSubscriptionIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionA 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()

This structure is derived from Subscription

Summary

Fixed: 1 element
Prohibited: 1 element

Extensions

This structure refers to these extensions:

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Subscription 0..* Subscription Server push subscription criteria
Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension Content/Rules for all slices
.... extension:resource-origin 0..1 Reference(KT2_Device) Extension
URL: http://koppeltaal.nl/fhir/StructureDefinition/resource-origin
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... reason Σ 1..1 string Description of why this subscription was created
... criteria Σ 1..1 string Rule for server push
... error Σ 0..1 string Latest error note
... channel Σ 1..1 BackboneElement The channel on which to report matches to the criteria
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... type Σ 1..1 code rest-hook
Binding: SubscriptionChannelType (required): The type of method used to execute a subscription.
Fixed Value: rest-hook

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
Subscription.statusrequiredSubscriptionStatus
http://hl7.org/fhir/ValueSet/subscription-status|4.0.1
From the FHIR Standard
Subscription.channel.typerequiredFixed Value: rest-hook
http://hl7.org/fhir/ValueSet/subscription-channel-type|4.0.1
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorSubscriptionIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionIf 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-4errorSubscriptionIf 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-5errorSubscriptionIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionA 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()

Differential View

This structure is derived from Subscription

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Subscription 0..* Subscription Server push subscription criteria
... Slices for extension Content/Rules for all slices
.... extension:resource-origin 0..1 Reference(KT2_Device) Extension
URL: http://koppeltaal.nl/fhir/StructureDefinition/resource-origin
... error 0..1 string Latest error note
... channel
.... type 1..1 code rest-hook
Fixed Value: rest-hook
.... payload 0..0

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Subscription 0..* Subscription Server push subscription criteria
Constraints: dom-2, dom-3, dom-4, dom-5, dom-6
... 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
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... Slices for extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... extension:resource-origin 0..1 Reference(KT2_Device) Extension
URL: http://koppeltaal.nl/fhir/StructureDefinition/resource-origin
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... status ?!Σ 1..1 code requested | active | error | off
Binding: SubscriptionStatus (required): The status of a subscription.
... contact ΣC 0..* ContactPoint Contact details for source (e.g. troubleshooting)
Constraints: cpt-2
... end Σ 0..1 instant When to automatically delete the subscription
... reason Σ 1..1 string Description of why this subscription was created
... criteria Σ 1..1 string Rule for server push
... error Σ 0..1 string Latest error note
... channel Σ 1..1 BackboneElement The channel on which to report matches to the criteria
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... type Σ 1..1 code rest-hook
Binding: SubscriptionChannelType (required): The type of method used to execute a subscription.
Fixed Value: rest-hook
.... endpoint Σ 0..1 url Where the channel points to
.... header Σ 0..* string Usage depends on the channel type

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / CodeURI
Subscription.languagepreferredCommonLanguages
http://hl7.org/fhir/ValueSet/languages
From the FHIR Standard
Additional Bindings Purpose
AllLanguages Max Binding
Subscription.statusrequiredSubscriptionStatus
http://hl7.org/fhir/ValueSet/subscription-status|4.0.1
From the FHIR Standard
Subscription.channel.typerequiredFixed Value: rest-hook
http://hl7.org/fhir/ValueSet/subscription-channel-type|4.0.1
From the FHIR Standard

Constraints

IdGradePath(s)DetailsRequirements
cpt-2errorSubscription.contactA system is required if a value is provided.
: value.empty() or system.exists()
dom-2errorSubscriptionIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorSubscriptionIf 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-4errorSubscriptionIf 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-5errorSubscriptionIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceSubscriptionA 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()

This structure is derived from Subscription

Summary

Fixed: 1 element
Prohibited: 1 element

Extensions

This structure refers to these extensions:

 

Other representations of profile: CSV, Excel, Schematron

Notes:

Channel Type

The channel type is fixed to rest-hook - this is the only type available in Koppeltaal for sending notifications.

Error Handling

The error element contains the last error message if the subscription fails, providing debugging information for subscription issues.

Important Considerations

Preventing Loops

Warning: It is the responsibility of the developer to prevent endless loops caused by sending a subscription notification to the original resource owner. Developers must implement appropriate logic to avoid circular subscription chains.

Implementation Notes

  • Only REST hook channels are supported in the Koppeltaal environment
  • Payload elements are not used in this profile
  • Proper error handling and loop prevention are critical for stable operation