Profiles & Operations > Operation: Get Subscription Status
Operation: Subscription Status
Scope
Interaction Sequence Diagram
Specification
This specification is based on the FHIR R5 Backport specification.
Read Subscription Status Request
`Get [base]/Subscription/[id]/$status`
where [id] is the logical id of the existing Subscription resource.
Read Subscription Status Response
The server returns a 200 OK HTTP status code.
Example Subscription Status Message
While this $status operation is defined in FHIR R5 for the Subscription resource, it has also been backported to FHIR R4, functioning in the exact same way.
`GET /fhir/SubscriptionStatus/{id}/$status`
`Host: example-fhir-server.com`
`Accept: application/fhir+json`
`Authorization: Bearer <token>`
Response Message Body
<Bundle xmlns="http://hl7.org/fhir"> <id value="e13caf38-c856-461f-8374-6fe71248684c"/> <type value="searchset" /> <timestamp value="2020-04-17T10:24:13.1882432-05:00" /> <entry> <fullUrl value="urn:uuid:815477f2-a94c-4197-a82a-9f974155debc"/> <resource> <SubscriptionStatus xmlns="http://hl7.org/fhir"> <id value="815477f2-a94c-4197-a82a-9f974155debc"/> <status value="active"/> <type value="query-status"/> <eventsSinceSubscriptionStart value="310"/> <!-- <eventsInNotification value="0"/> --> <subscription> <reference value="http://example.org/FHIR/R5/Subscription/123"/> </subscription> <topic value="http://example.org/FHIR/R5/SubscriptionTopic/admission"/> </SubscriptionStatus> </resource> <search> <mode value="match"/> </search> </entry> </Bundle>
Expected Bahaviour
Case | Scenario Description | HTTP Status Code | Response Payload |
---|---|---|---|
1 | The request was successful, and the SubscriptionStatus resource is returned in the response body | HTTP 200 OK | Returns the Submission Status resource. |
2 | The Subscription Status Not Modified | HTTP 304 | The subscription status has not changed since the last request . |
3 | The submitted Subscription cannot be validated as it does not conform to the specification | HTTP 400 | Bad Request. Returns an OperationOutcome resource indicating an issue. The client must fix the request and try again. |
4 | Subsciprtion API validates the request but cannot return a valid response due to internal issues. | HTTP 500 | Internal Server Error. Returns an OperationOutcome resource indicating an issue. |
Please see the $status Operation Definition page from the R5 Subscriptions Backport for details on the $status operation used for the Ontario Health Subscriptions service.