Subscription
Profile Subscription describes custom rules how to create a valid Subscription resource to be able to subscribe to receive notifications about created/updated resources from Roche
Canonical url - http://roche.com/fhir/iop/StructureDefinition/Subscription
It is mandatory to include this and only this profile url in the meta.profile
section of the Subscription JSON (see the examples).
The below overview shows the elements of the resource, data type and the cardinality of each. Further details like "Binding"/"Fixed values"/"Contraints" etc can be found on clicking on each element.
Structure definition :
Subscription | I | Subscription | There are no (further) constraints on this element Element idSubscription Notification about a SubscriptionTopic Alternate namesWebHook, Hook, Routing Rule DefinitionThe subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
| |
id | Σ | 0..1 | id | There are no (further) constraints on this element Element idSubscription.id Logical id of this artifact DefinitionThe logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case. |
meta | Σ | 0..1 | Meta | There are no (further) constraints on this element Element idSubscription.meta Metadata about the resource DefinitionThe metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
|
implicitRules | Σ ?! | 0..1 | uri | There are no (further) constraints on this element Element idSubscription.implicitRules A set of rules under which this content was created DefinitionA reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc. Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc.
|
language | 0..1 | codeBinding | There are no (further) constraints on this element Element idSubscription.language Language of the resource content DefinitionThe base language in which the resource is written. Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute). IETF language tag for a human language
| |
text | I | 0..1 | Narrative | There are no (further) constraints on this element Element idSubscription.text Text summary of the resource, for human interpretation Alternate namesnarrative, html, xhtml, display DefinitionA human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. Contained resources do not have a narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later.
|
contained | I | 0..* | Resource | There are no (further) constraints on this element Element idSubscription.contained Contained, inline Resources Alternate namesinline resources, anonymous resources, contained resources DefinitionThese resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning. This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags in their meta elements, but SHALL NOT have security labels.
|
extension | I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.extension Additional content defined by implementations Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
modifierExtension | Σ ?! I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.modifierExtension Extensions that cannot be ignored Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
identifier | Σ I | 0..* | Identifier | There are no (further) constraints on this element Element idSubscription.identifier Additional identifiers (business identifier) DefinitionA formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance. The rules of the identifier.type determine if a check digit is part of the ID value or sent separately, such as through the checkDigit extension.
|
name | Σ | 0..1 | string | Element idSubscription.name Human readable name for this subscription DefinitionA natural language name identifying the subscription. Cannot exceed 255 characters in size
|
status | Σ ?! | 1..1 | codeBinding | There are no (further) constraints on this element Element idSubscription.status requested | active | error | off | entered-in-error DefinitionThe status of the subscription, which marks the server state for managing the subscription. A client can only submit subscription resources in the requested or off state. Only the server can move a subscription from requested to active, and then to error. Either the server or the client can turn a subscription off. This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid. The status of a subscription.
|
topic | Σ | 1..1 | canonical(SubscriptionTopic) | There are no (further) constraints on this element Element idSubscription.topic Reference to the subscription topic being subscribed to DefinitionThe reference to the subscription topic to be notified about.
|
contact | Σ I | 0..0 | ContactPoint | There are no (further) constraints on this element Element idSubscription.contact Contact details for source (e.g. troubleshooting) DefinitionContact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
|
end | Σ | 0..0 | instant | There are no (further) constraints on this element Element idSubscription.end When to automatically delete the subscription DefinitionThe time for the server to turn the subscription off. The server is permitted to deviate from this time but should observe it.
|
managingEntity | Σ I | 0..0 | Reference(CareTeam | HealthcareService | Organization | RelatedPerson | Patient | Practitioner | PractitionerRole) | There are no (further) constraints on this element Element idSubscription.managingEntity Entity responsible for Subscription changes DefinitionEntity with authorization to make subsequent revisions to the Subscription and also determines what data the subscription is authorized to disclose. References SHALL be a reference to an actual FHIR resource, and SHALL be resolvable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository. Reference(CareTeam | HealthcareService | Organization | RelatedPerson | Patient | Practitioner | PractitionerRole) Constraints
|
reason | Σ | 0..1 | string | Element idSubscription.reason Description of why this subscription was created DefinitionA description of why this subscription is defined. Cannot exceed 2048 characters in size
|
filterBy | Σ I | 1..1 | BackboneElement | There are no (further) constraints on this element Element idSubscription.filterBy Criteria for narrowing the subscription topic stream DefinitionThe filter properties to be applied to narrow the subscription topic stream. When multiple filters are applied, evaluates to true if all the conditions applicable to that resource are met; otherwise it returns false (i.e., logical AND).
|
id | 0..1 | string | There are no (further) constraints on this element Element idSubscription.filterBy.id Unique id for inter-element referencing DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
| |
extension | I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.filterBy.extension Additional content defined by implementations Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
modifierExtension | Σ ?! I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.filterBy.modifierExtension Extensions that cannot be ignored even if unrecognized Alternate namesextensions, user content, modifiers DefinitionMay be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
|
resourceType | Σ | 0..1 | uriBinding | There are no (further) constraints on this element Element idSubscription.filterBy.resourceType Allowed Resource (reference to definition) for this Subscription filter DefinitionA resource listed in the see http://en.wikipedia.org/wiki/Uniform_resource_identifier A type of resource, or a Reference (from all versions)
|
filterParameter | Σ | 1..1 | stringBinding | Element idSubscription.filterBy.filterParameter Filter label defined in SubscriptionTopic DefinitionThe filter as defined in the Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size Can be either "patient" or "organization"
|
comparator | I | 0..1 | codeBinding | There are no (further) constraints on this element Element idSubscription.filterBy.comparator eq | ne | gt | lt | ge | le | sa | eb | ap DefinitionComparator applied to this filter parameter. Must be a comparator allowed by the SubscriptionTopic relevant to this Subscription filter. Search Comparator Codes applied to this filter.
|
modifier | I | 0..1 | codeBinding | There are no (further) constraints on this element Element idSubscription.filterBy.modifier missing | exact | contains | not | text | in | not-in | below | above | type | identifier | of-type | code-text | text-advanced | iterate DefinitionModifier applied to this filter parameter. Must be a modifier allowed by the SubscriptionTopic relevant to this Subscription filter. Search Modifier Code applied to this filter.
|
value | Σ | 1..1 | string | Element idSubscription.filterBy.value ID of the resource DefinitionFor filterParameter having value "organization", the value must correspond to the ID of the managing organization. For filterParameter having value "patient", the value must correspond to ID of a patient within the managing organization. Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size
|
channelType | Σ I | 1..1 | CodingBindingFixed Value | Element idSubscription.channelType Channel type for notifications DefinitionThe type of channel to send notifications on. Only rest-hook is allowed. Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. The type of method used to execute a subscription.
{ "code": "rest-hook" }
|
id | 0..1 | string | There are no (further) constraints on this element Element idSubscription.channelType.id Unique id for inter-element referencing DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
| |
extension | I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.channelType.extension Additional content defined by implementations Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
system | Σ | 0..0 | uri | There are no (further) constraints on this element Element idSubscription.channelType.system Identity of the terminology system DefinitionThe identification of the code system that defines the meaning of the symbol in the code. Need to be unambiguous about the source of the definition of the symbol. The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should be an absolute reference to some definition that establishes the system clearly and unambiguously.
|
version | Σ | 0..0 | string | There are no (further) constraints on this element Element idSubscription.channelType.version Version of the system - if relevant DefinitionThe version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged. Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
|
code | Σ I | 0..1 | codeFixed Value | There are no (further) constraints on this element Element idSubscription.channelType.code Symbol in syntax defined by the system DefinitionA symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). Need to refer to a particular code in the system. Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size
rest-hook
|
display | Σ I | 0..0 | string | There are no (further) constraints on this element Element idSubscription.channelType.display Representation defined by the system DefinitionA representation of the meaning of the code in the system, following the rules of the system. Need to be able to carry a human-readable meaning of the code for readers that do not know the system. Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size
|
userSelected | Σ | 0..0 | boolean | There are no (further) constraints on this element Element idSubscription.channelType.userSelected If this coding was chosen directly by the user DefinitionIndicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays). This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing. Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.
|
endpoint | Σ | 1..1 | url | Element idSubscription.endpoint Where the channel points to DefinitionThe url that describes the actual end-point to send notifications to. Absolute URL to the endpoint to receive notifications. Must start with https://
|
parameter | 0..* | BackboneElement | There are no (further) constraints on this element Element idSubscription.parameter Channel type DefinitionChannel-dependent information to send as part of the notification (e.g., HTTP Headers). Exactly what these mean depend on the channel type. They can convey additional information to the server or recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions. Note that names are not required to be unique, but channel definitions can impose restrictions.
| |
id | 0..1 | string | There are no (further) constraints on this element Element idSubscription.parameter.id Unique id for inter-element referencing DefinitionUnique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
| |
extension | I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.parameter.extension Additional content defined by implementations Alternate namesextensions, user content DefinitionMay be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. Unordered, Open, by url(Value) Extensions are always sliced by (at least) url Constraints
|
modifierExtension | Σ ?! I | 0..* | Extension | There are no (further) constraints on this element Element idSubscription.parameter.modifierExtension Extensions that cannot be ignored even if unrecognized Alternate namesextensions, user content, modifiers DefinitionMay be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). Modifier extensions allow for extensions that cannot be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions. There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
|
name | 1..1 | string | There are no (further) constraints on this element Element idSubscription.parameter.name Name (key) of the parameter DefinitionParameter name for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the name would be Authorization. Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size
| |
value | 1..1 | string | There are no (further) constraints on this element Element idSubscription.parameter.value Value of the parameter to use or pass through DefinitionParameter value for information passed to the channel for notifications, for example in the case of a REST hook wanting to pass through an authorization header, the value would be Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size
| |
heartbeatPeriod | Σ | 0..0 | unsignedInt | There are no (further) constraints on this element Element idSubscription.heartbeatPeriod Interval in seconds to send 'heartbeat' notification DefinitionIf present, a 'heartbeat' notification (keep-alive) is sent via this channel with an interval period equal to this elements integer value in seconds. If not present, a heartbeat notification is not sent. 32 bit number; for values larger than this, use decimal
|
timeout | Σ | 0..1 | unsignedInt | Element idSubscription.timeout Timeout in seconds to attempt notification delivery DefinitionIf present, the maximum amount of time a server will allow before failing a notification attempt. Number between 10 and 20. Default is 10.
|
contentType | Σ | 1..1 | codeBinding | Element idSubscription.contentType MIME type to send, or omit for no payload DefinitionThe MIME type to send the payload in . Only values Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
|
content | Σ | 1..1 | codeBindingFixed Value | Element idSubscription.content empty | id-only | full-resource DefinitionHow much of the resource content to deliver in the notification payload. Only id-only is supported Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured. Codes to represent how much resource content to send in the notification payload.
id-only
|
maxCount | Σ | 0..1 | positiveInt | Element idSubscription.maxCount Maximum number of events that can be combined in a single notification DefinitionIf present, the maximum number of events that will be included in a notification bundle. Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included. By default this value is set to 100. You can change the value to a number higher than 100.
|
Attribute description :
Attribute | Description | Terminology reference |
---|---|---|
identifier | System/value pairs identifying the subscription. Not used by the server. Stored for the convenience of the subscriber. | |
name | Name of the subscription | |
status | Status of the subscription. For subscription creation, only the value requested is allowed. For subscription update, the allowed values are: active , requested , off . When fetching a subscription, server might also return subscription with status error . |
status |
topic | Canonical URL of the subscription topic. The subscription topic determines the resources about which the subscriber will be notified. | |
filterBy | Enables to filter | |
channelType | Only rest-hook is supported by the server. |
|
endpoint | URL to which the notifications will be sent by the server. Must start with https:// | |
parameter | Collection of name/value pairs to be added as the headers to the notification. | |
timeout | The maximum amount of time (in seconds) a server will allow before failing a notification attempt. Default value is 10 seconds. Allowed values are integers between 10 and 20. | |
contentType | application/json or application/fhir+json |
|
content | Only id-only is supported by the server. |
|
maxCount | Maximum amount of resources that can be bundled together in a single notification. Default is 100, the client can only increase this number. |