visit the hl7 website
Ontario Subscription HL7® FHIR® Implementation Guide -v1.0.0-ballot1
fhir-logo
  • Index
  • Home
    • Home
    • Introduction
    • Relationship to Other Specifications
    • Scope
    • Glossary
  • Business Context
    • Business Context
    • Business Model
    • Business Data
    • Use Cases
    • Business Rules
  • Technical Context
    • Technical Context
    • Implementer Responsibility
    • Conformance Rules
    • Connectivity Summary
  • FHIR Artifacts
    • FHIR Artifacts
    • Interactions
    • Operations
    • Profiles
    • Terminology
    • System URIs
    • Capability Statement
    • Custom Search Parameters
    • Response Handling
    • Downloads
  • Change Log
    • Change Log
    • Known Issues & Future Developments
    • Revision History
    1. Index
    2. FHIR Artifacts
    3. Interactions
    4. Heartbeat

For a full list of available versions, see the Directory of published versions

4.1.7. Heartbeat

The FHIR Heartbeat Interaction is a mechanism through which the Subscription Server notifies the Subscriber that the service is operational, even though no data is currently available in the queue.


4.1.7.1. Scope

The Subscription Server periodically sends a heartbeat notification (typically an empty or minimal payload) to the Subscriber’s notification endpoint.

The Subscriber is expected to respond with an HTTP 200 OK status, confirming that it is reachable and able to receive notifications.

If the Subscriber fails to respond within a defined timeout or after several retries, the Subscription Server may mark the subscription as inactive or error, depending on its configuration.

If the Subscriber stops receiving a hearbeat from Subscription Service, it needs to send SubscriptionStatus request to investigate the issue.


4.1.7.2. Interaction Sequence Diagram


4.1.7.3. Specification

HeartBeat Request

The Subscription Server sends a heartbeat request to Subscriber's endpoint.

POST [base]/Subscription Endpoint,

HeartBeat Response

The Subscriber returns a 200 OK HTTP status code.


4.1.7.4. Example of Get Subscription Interaction

4.1.7.5.

Example Heartbeat Request

HTTP Method:

POST

Headers:

Content-Type: application/fhir+json

Address:

[base]/Subscription Endpoint

HTTP Body contains a HeartBeat Bundle Resource


{

  "resourceType": "Bundle",

  "type": "history",

  "entry": [

    {

      "resource": {

        "resourceType": "SubscriptionStatus",

        "status": "active",

        "type": "heartbeat",

        "subscription": {

          "reference": "Subscription/123"

        },

        "topic": "https://example.org/fhir/SubscriptionTopic/my-topic"

      }

    }

  ]

}
 


You cannot have two top level headers, when header numbering is enabled.
Expected Behaviour
Case Scenario Description HTTP Status Code Response Payload
1 Subscriber successfully received the heartbeat notification. HTTP 200 Retrieved
2 Subscriber received not recognized. HTTP 400 Subscription not recognized.
Version: 1.0.0 FHIR Version: R4.0.1

Powered by SIMPLIFIER.NET

HL7® and FHIR® are the registered trademarks of Health Level Seven International