Generated Narrative: StructureDefinition profile-Subscription Name Flags Card. Type Description & Constraints Subscription 0..* Subscription(4.0.1) Server push subscription criteria #xD; meta #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:meta 0..1 Meta DSTU2: meta additional types URL: http://hl7.org/fhir/1.0/StructureDefinition/extension-Subscription.meta #xD; text #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:text 0..1 (Complex) DSTU2: text additional types URL: http://hl7.org/fhir/1.0/StructureDefinition/extension-Subscription.text #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:tag 0..* Coding DSTU2: A tag to add to matching resources (new) URL: http://hl7.org/fhir/1.0/StructureDefinition/extension-Subscription.tag Binding: SubscriptionTag (example): Tags to put on a resource after subscriptions have been sent. #xD; contact #xD; Slices for extension 0..* Extension Extension Slice: Unordered, Open by value:url #xD; extension:contact 0..* ContactPoint DSTU2: contact additional types URL: http://hl7.org/fhir/1.0/StructureDefinition/extension-Subscription.contact #xD; Documentation for this format
Cross-version Profile for DSTU2.Subscription for use in FHIR R4
This cross-version profile allows DSTU2 Subscription content to be represented via FHIR R4 Subscription resources.
The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
If the resource is contained in another resource, it SHALL NOT contain nested Resources
not(parent::f:contained and f:contained)
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
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()
not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
If 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()
not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
If a resource is contained in another resource, it SHALL NOT have a security label
When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time.
A resource should have narrative for robust management
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
The 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.
All FHIR elements must have a @value or children
hasValue() or (children().count() > id.count())
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Extensions are always sliced by (at least) url
Must have either extensions or value[x], not both
exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
DSTU2: `Subscription.meta` additional types (Meta) additional types from child elements (lastUpdated, profile, security, tag, versionId)
Element `Subscription.meta` is mapped to FHIR R4 element `Subscription.meta` as `SourceIsBroaderThanTarget`. The mappings for `Subscription.meta` do not cover the following types: Meta. The mappings for `Subscription.meta` do not cover the following types based on type expansion: lastUpdated, profile, security, tag, versionId.
The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.
When the resource last changed - e.g. when the version changed.
This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http://hl7.org/fhir/R4/http.html#read) interaction.
Identifies where the resource comes from
A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](http://hl7.org/fhir/R4/provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.
In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.
Profiles this resource claims to conform to
A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/R4/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.url).
It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
Security Labels applied to this resource
Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
Security Labels from the Healthcare Privacy and Security Classification System.
Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.
Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones".
A set of rules under which this content was created
A 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 it's narrative along with other profiles, value sets, etc.
This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation
The 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).
Text summary of the resource, for human interpretation
A 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 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.
DSTU2: `Subscription.text` additional types (Narrative) additional types from child elements (div, status)
Element `Subscription.text` is mapped to FHIR R4 element `Subscription.text` as `SourceIsBroaderThanTarget`. The mappings for `Subscription.text` do not cover the following types: Narrative. The mappings for `Subscription.text` do not cover the following types based on type expansion: div, status. Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.
generated | extensions | additional | empty
The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.
The actual narrative content, a stripped down version of XHTML.
The contents of the html element are an XHTML fragment containing only the basic html formatting elements described in chapters 7-11 and 15 of the HTML 4.0 standard, elements (either name or href), images and internally contained stylesheets. The XHTML content SHALL NOT contain a head, a body, external stylesheet references, scripts, forms, base/link/xlink, frames, iframes and objects.
The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, elements (either name or href), images and internally contained style attributes
not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))]) and not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])
The narrative SHALL have some non-whitespace content
descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
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.
DSTU2: A tag to add to matching resources (new)
Element `Subscription.tag` has a context of Subscription based on following the parent source element upwards and mapping to `Subscription`. Element `Subscription.tag` has no mapping targets in FHIR R4. Typically, this is because the element has been added (is a new element). So that other systems can tell which resources have been the subject of a notification.
exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
May 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 manageable, 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).
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.
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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
The 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.
This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
Contact details for source (e.g. troubleshooting)
Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
DSTU2: `Subscription.contact` additional types (ContactPoint) additional types from child elements (period, rank, system, use, value)
Element `Subscription.contact` is mapped to FHIR R4 element `Subscription.contact` as `SourceIsBroaderThanTarget`. The mappings for `Subscription.contact` do not cover the following types: ContactPoint. The mappings for `Subscription.contact` do not cover the following types based on type expansion: period, rank, system, use, value.
phone | fax | email | pager | url | sms | other
Telecommunications form for contact point - what communications system is required to make use of the contact.
Telecommunications form for contact point.
The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value.
Need to support legacy numbers that are not in a tightly controlled format.
home | work | temp | old | mobile - purpose of this contact point
Identifies the purpose for the contact point.
Applications can assume that a contact is current unless it explicitly says that it is temporary or old.
Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose.
This is labeled as "Is Modifier" because applications should not mistake a temporary or old contact etc.for a current/permanent one
Specify preferred order of use (1 = highest)
Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.
Note that rank does not necessarily follow the order in which the contacts are represented in the instance.
Time period when the contact point was/is in use
Time period when the contact point was/is in use.
When to automatically delete the subscription
The time for the server to turn the subscription off.
The server is permitted to deviate from this time but should observe it.
Description of why this subscription was created
A description of why this subscription is defined.
The rules that the server should use to determine when to generate notifications for this subscription.
The rules are search criteria (without the [base] part). Like Bundle.entry.request.url, it has no leading "/".
A record of the last error that occurred when the server processed a notification.
The channel on which to report matches to the criteria
Details where to send notifications when resources are received that meet the criteria.
Additional content defined by implementations
May 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 manageable, 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.
Extensions that cannot be ignored even if unrecognized
May 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 manageable, 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 are expected to modify the meaning or interpretation of the element that contains them
rest-hook | websocket | email | sms | message
The type of channel to send notifications on.
The type of method used to execute a subscription.
The url that describes the actual end-point to send messages to.
For rest-hook, and websocket, the end-point must be an http: or https: URL; for email, a mailto: url, for sms, a tel: url, and for message the endpoint can be in any form of url the server understands (usually, http: or mllp:). The URI is allowed to be relative; in which case, it is relative to the server end-point (since there may be more than one, clients should avoid using relative URIs).
MIME type to send, or omit for no payload
The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type "text/plain" may also be used for Email and SMS subscriptions.
Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured.
The mime type of an attachment. Any valid mime type is allowed.
Additional headers / information to send as part of the notification.
Exactly what these mean depend on the channel type. They can convey additional information to the recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions.