Data Model Libraries
    Preparing search index...

    Subscription Class

    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.

    FHIR Specification

    • Short: Server push subscription criteria
    • Definition: 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.
    • FHIR Version: 4.3.0

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    subscriptionStatusEnum: SubscriptionStatusEnum

    FHIR CodeSystem: SubscriptionStatus

    status: null | EnumCodeType

    Subscription.status Element

    FHIR Specification

    • Short: requested | active | error | off
    • Definition: The status of the subscription, which marks the server state for managing the subscription.
    • Comment: 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.
    • FHIR Type: code
    • Cardinality: 1..1
    • isModifier: true
    • isModifierReason: 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
    • isSummary: true

    CodeSystem Enumeration: SubscriptionStatusEnum

    contact?: ContactPoint[]

    Subscription.contact Element

    FHIR Specification

    • Short: Contact details for source (e.g. troubleshooting)
    • Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
    • FHIR Type: ContactPoint
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true

    Subscription.end Element

    FHIR Specification

    • Short: When to automatically delete the subscription
    • Definition: The time for the server to turn the subscription off.
    • Comment: The server is permitted to deviate from this time but should observe it.
    • FHIR Type: instant
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    reason: null | StringType

    Subscription.reason Element

    FHIR Specification

    • Short: Description of why this subscription was created
    • Definition: A description of why this subscription is defined.
    • FHIR Type: string
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: true
    criteria: null | StringType

    Subscription.criteria Element

    FHIR Specification

    • Short: Rule for server push
    • Definition: The rules that the server should use to determine when to generate notifications for this subscription.
    • Comment: The rules are search criteria (without the [base] part). Like Bundle.entry.request.url, it has no leading "/".
    • FHIR Type: string
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: true
    error?: StringType

    Subscription.error Element

    FHIR Specification

    • Short: Latest error note
    • Definition: A record of the last error that occurred when the server processed a notification.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true

    Subscription.channel Element

    FHIR Specification

    • Short: The channel on which to report matches to the criteria
    • Definition: Details where to send notifications when resources are received that meet the criteria.
    • FHIR Type: BackboneElement
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: true

    Methods

    • Parse the provided Subscription JSON to instantiate the Subscription data model.

      Parameters

      • sourceJson: Value

        JSON representing FHIR Subscription

      • OptionaloptSourceField: string

        Optional data source field (e.g. <complexTypeName>.<complexTypeFieldName>); defaults to Subscription

      Returns undefined | Subscription

      Subscription data model or undefined for Subscription

      JsonError if the provided JSON is not a valid JSON object

    • Assigns the provided value to the text property.

      Parameters

      Returns this

      this

    • Returns boolean

      true if the text property exists and has a value; false otherwise

    • Assigns the provided Resource array value to the contained property.

      Parameters

      • value: undefined | IResource[]

        the contained array value

      Returns this

      this

    • Returns boolean

      true if the contained property exists and has a value; false otherwise

    • Assigns the provided array of Extension values to the extension property.

      Parameters

      • extension: undefined | IExtension[]

        array of Extensions

      Returns this

      this

    • Determines if the extension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Adds the provided Extension to the extension property array.

      Parameters

      • extension: undefined | IExtension

        the Extension value to add to the extension property array

      Returns this

      this

    • Removes the Extension having the provided url from the extension property array.

      Parameters

      • url: string

        the url that identifies a specific Extension to remove

      Returns void

      AssertionError for invalid url

    • Determines if the modifierExtension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the modifierExtension property exists and has any values.

      AssertionError for invalid url

    • Assigns the provided PrimitiveType value to the id property.

      Parameters

      • element: undefined | IdType

        the id value

      Returns this

      this

    • Returns undefined | string

      the id property value as a primitive value

    • Assigns the provided primitive value to the id property.

      Parameters

      • value: undefined | string

        the id value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the id property exists and has a value; false otherwise

    • Assigns the provided value to the meta property.

      Parameters

      • value: undefined | Meta

        the meta value

      Returns this

      this

    • Returns boolean

      true if the meta property exists and has a value; false otherwise

    • Assigns the provided primitive value to the implicitRules property.

      Parameters

      • value: undefined | string

        the implicitRules value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns undefined | string

      the language property value as a primitive value

    • Assigns the provided primitive value to the language property.

      Parameters

      • value: undefined | string

        the language value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the language property exists and has a value; false otherwise

    • Returns boolean

      true if the instance is a FHIR complex or primitive datatype; false otherwise