Class Subscription

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseResource

    public class Subscription
    extends BaseResource
    implements ca.uhn.fhir.model.api.IResource
    HAPI/FHIR Subscription Resource (infrastructure.exchange)

    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 is able to take an appropriate action.

    Requirements:

    Profile Definition: http://hl7.org/fhir/profiles/Subscription

    See Also:
    Serialized Form
    • Field Detail

      • STATUS

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS
        Fluent Client search parameter constant for status

        Description:
        Type: token
        Path: Subscription.status

      • TYPE

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE
        Fluent Client search parameter constant for type

        Description:
        Type: token
        Path: Subscription.channel.type

      • SP_URL

        public static final String SP_URL
        Search parameter constant for url

        Description:
        Type: uri
        Path: Subscription.channel.endpoint

        See Also:
        Constant Field Values
      • URL

        public static final ca.uhn.fhir.rest.gclient.UriClientParam URL
        Fluent Client search parameter constant for url

        Description:
        Type: uri
        Path: Subscription.channel.endpoint

      • CRITERIA

        public static final ca.uhn.fhir.rest.gclient.StringClientParam CRITERIA
        Fluent Client search parameter constant for criteria

        Description:
        Type: string
        Path: Subscription.criteria

      • PAYLOAD

        public static final ca.uhn.fhir.rest.gclient.StringClientParam PAYLOAD
        Fluent Client search parameter constant for payload

        Description:
        Type: string
        Path: Subscription.channel.payload

      • CONTACT

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTACT
        Fluent Client search parameter constant for contact

        Description:
        Type: token
        Path: Subscription.contact

      • TAG

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam TAG
        Fluent Client search parameter constant for tag

        Description:
        Type: token
        Path: Subscription.tag

    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      • getAllPopulatedChildElementsOfType

        public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType​(Class<T> theType)
        Specified by:
        getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
      • getCriteriaElement

        public ca.uhn.fhir.model.primitive.StringDt getCriteriaElement()
        Gets the value(s) for criteria (). creating it if it does not exist. Will not return null.

        Definition: The rules that the server should use to determine when to generate notifications for this subscription

      • getCriteria

        public String getCriteria()
        Gets the value(s) for criteria (). creating it if it does not exist. This method may return null.

        Definition: The rules that the server should use to determine when to generate notifications for this subscription

      • setCriteria

        public Subscription setCriteria​(ca.uhn.fhir.model.primitive.StringDt theValue)
        Sets the value(s) for criteria ()

        Definition: The rules that the server should use to determine when to generate notifications for this subscription

      • setCriteria

        public Subscription setCriteria​(String theString)
        Sets the value for criteria ()

        Definition: The rules that the server should use to determine when to generate notifications for this subscription

      • getContact

        public List<ContactPointDtgetContact()
        Gets the value(s) for contact (who.focus). creating it if it does not exist. Will not return null.

        Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting

      • setContact

        public Subscription setContact​(List<ContactPointDt> theValue)
        Sets the value(s) for contact (who.focus)

        Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting

      • addContact

        public ContactPointDt addContact()
        Adds and returns a new value for contact (who.focus)

        Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting

      • addContact

        public Subscription addContact​(ContactPointDt theValue)
        Adds a given new value for contact (who.focus)

        Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting

        Parameters:
        theValue - The contact to add (must not be null)
      • getContactFirstRep

        public ContactPointDt getContactFirstRep()
        Gets the first repetition for contact (who.focus), creating it if it does not already exist.

        Definition: Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting

      • getReasonElement

        public ca.uhn.fhir.model.primitive.StringDt getReasonElement()
        Gets the value(s) for reason (why). creating it if it does not exist. Will not return null.

        Definition: A description of why this subscription is defined

      • getReason

        public String getReason()
        Gets the value(s) for reason (why). creating it if it does not exist. This method may return null.

        Definition: A description of why this subscription is defined

      • setReason

        public Subscription setReason​(ca.uhn.fhir.model.primitive.StringDt theValue)
        Sets the value(s) for reason (why)

        Definition: A description of why this subscription is defined

      • setReason

        public Subscription setReason​(String theString)
        Sets the value for reason (why)

        Definition: A description of why this subscription is defined

      • getStatusElement

        public ca.uhn.fhir.model.primitive.BoundCodeDt<SubscriptionStatusEnumgetStatusElement()
        Gets the value(s) for status (status). creating it if it does not exist. Will not return null.

        Definition: The status of the subscription, which marks the server state for managing the subscription

      • getStatus

        public String getStatus()
        Gets the value(s) for status (status). creating it if it does not exist. This method may return null.

        Definition: The status of the subscription, which marks the server state for managing the subscription

      • setStatus

        public Subscription setStatus​(ca.uhn.fhir.model.primitive.BoundCodeDt<SubscriptionStatusEnum> theValue)
        Sets the value(s) for status (status)

        Definition: The status of the subscription, which marks the server state for managing the subscription

      • setStatus

        public Subscription setStatus​(SubscriptionStatusEnum theValue)
        Sets the value(s) for status (status)

        Definition: The status of the subscription, which marks the server state for managing the subscription

      • getErrorElement

        public ca.uhn.fhir.model.primitive.StringDt getErrorElement()
        Gets the value(s) for error (). creating it if it does not exist. Will not return null.

        Definition: A record of the last error that occurred when the server processed a notification

      • getError

        public String getError()
        Gets the value(s) for error (). creating it if it does not exist. This method may return null.

        Definition: A record of the last error that occurred when the server processed a notification

      • setError

        public Subscription setError​(ca.uhn.fhir.model.primitive.StringDt theValue)
        Sets the value(s) for error ()

        Definition: A record of the last error that occurred when the server processed a notification

      • setError

        public Subscription setError​(String theString)
        Sets the value for error ()

        Definition: A record of the last error that occurred when the server processed a notification

      • getChannel

        public Subscription.Channel getChannel()
        Gets the value(s) for channel (). creating it if it does not exist. Will not return null.

        Definition: Details where to send notifications when resources are received that meet the criteria

      • setChannel

        public Subscription setChannel​(Subscription.Channel theValue)
        Sets the value(s) for channel ()

        Definition: Details where to send notifications when resources are received that meet the criteria

      • getEndElement

        public ca.uhn.fhir.model.primitive.InstantDt getEndElement()
        Gets the value(s) for end (when.done). creating it if it does not exist. Will not return null.

        Definition: The time for the server to turn the subscription off

      • getEnd

        public Date getEnd()
        Gets the value(s) for end (when.done). creating it if it does not exist. This method may return null.

        Definition: The time for the server to turn the subscription off

      • setEnd

        public Subscription setEnd​(ca.uhn.fhir.model.primitive.InstantDt theValue)
        Sets the value(s) for end (when.done)

        Definition: The time for the server to turn the subscription off

      • setEnd

        public Subscription setEnd​(Date theDate,
                                   ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
        Sets the value for end (when.done)

        Definition: The time for the server to turn the subscription off

      • getTag

        public List<CodingDtgetTag()
        Gets the value(s) for tag (). creating it if it does not exist. Will not return null.

        Definition: A tag to add to any resource that matches the criteria, after the subscription is processed

      • setTag

        public Subscription setTag​(List<CodingDt> theValue)
        Sets the value(s) for tag ()

        Definition: A tag to add to any resource that matches the criteria, after the subscription is processed

      • addTag

        public CodingDt addTag()
        Adds and returns a new value for tag ()

        Definition: A tag to add to any resource that matches the criteria, after the subscription is processed

      • addTag

        public Subscription addTag​(CodingDt theValue)
        Adds a given new value for tag ()

        Definition: A tag to add to any resource that matches the criteria, after the subscription is processed

        Parameters:
        theValue - The tag to add (must not be null)
      • getTagFirstRep

        public CodingDt getTagFirstRep()
        Gets the first repetition for tag (), creating it if it does not already exist.

        Definition: A tag to add to any resource that matches the criteria, after the subscription is processed

      • getResourceName

        public String getResourceName()
        Specified by:
        getResourceName in interface ca.uhn.fhir.model.api.IResource
      • getStructureFhirVersionEnum

        public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
        Specified by:
        getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
        Specified by:
        getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource