Class Subscription

  • All Implemented Interfaces:
    Visitable

    @Generated("org.linuxforhealth.fhir.tools.CodeGenerator")
    public class Subscription
    extends DomainResource
    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.

    Maturity level: FMM3 (Trial Use)

    • Method Detail

      • getStatus

        public SubscriptionStatusCode getStatus()
        The status of the subscription, which marks the server state for managing the subscription.
        Returns:
        An immutable object of type SubscriptionStatusCode that is non-null.
      • getContact

        public java.util.List<ContactPoint> getContact()
        Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
        Returns:
        An unmodifiable list containing immutable objects of type ContactPoint that may be empty.
      • getEnd

        public Instant getEnd()
        The time for the server to turn the subscription off.
        Returns:
        An immutable object of type Instant that may be null.
      • getReason

        public String getReason()
        A description of why this subscription is defined.
        Returns:
        An immutable object of type String that is non-null.
      • getCriteria

        public String getCriteria()
        The rules that the server should use to determine when to generate notifications for this subscription.
        Returns:
        An immutable object of type String that is non-null.
      • getError

        public String getError()
        A record of the last error that occurred when the server processed a notification.
        Returns:
        An immutable object of type String that may be null.
      • getChannel

        public Subscription.Channel getChannel()
        Details where to send notifications when resources are received that meet the criteria.
        Returns:
        An immutable object of type Subscription.Channel that is non-null.
      • accept

        public void accept​(java.lang.String elementName,
                           int elementIndex,
                           Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:
         if (visitor.preVisit(this)) {
             visitor.visitStart(elementName, elementIndex, this);
             if (visitor.visit(elementName, elementIndex, this)) {
                 // visit children
             }
             visitor.visitEnd(elementName, elementIndex, this);
             visitor.postVisit(this);
         }
         
        Specified by:
        accept in interface Visitable
        Specified by:
        accept in class AbstractVisitable
        Parameters:
        elementName - the name of the element in the context of this visit
        elementIndex - the index of the element in a list or -1 if it is not contained within a List
        visitor - the visitor to use
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object