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. Search Subscription

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

4.1.5. Search Subscription

The Search Subscriptions interaction allows an Electronic Medical Record (EMR) system to retrieve all active Subscriptions it has previously created. This interaction is aligned with the FHIR R5 Subscription Backport model.

The requesting EMR is identified by a unique emr_id, passed as a search parameter. The server returns a Bundle of type searchset containing matching Subscription resources based on the criteria (for example, owner subscriptions with active status).


4.1.5.1. Scope

4.1.5.2. This interaction involves a request by a Point of Service system to search Subscriptions based on the search criteria. The request is received by the Subscription service which assembles list of Subscription that match search criteria and an OperationOutcome resource if applicable.


4.1.5.3. Interaction Sequence Diagram

4.1.5.4.


4.1.5.5. Specification

Search Subscription Request

The Search Subscription shall retrieve all FHIR Subscription resource from the repository created by specific EMR instance based on the filter.

GET [base]/Subscription?owner=[EMR_ID] AND status=ACTIVE


4.1.5.5.1. Search Parameter

Name Type Cardinality Description
owner token 1..1 Unique identifier for the EMR that owns the subscription. Filtered against Subscription.managingEntity.value.
status string 1..1 A status of the Subscription

Search Subscription Response

  • The server returns a 200 OK HTTP status code.

  • The response bodfy contains FHIR Resource Type: Bundle (type = searchset)

  • Each entry.resource is a Subscription that matches the provided emr_id.

  • In case where no matching Subscription are found, an empty result set is returned.


4.1.5.6. Example Search Subscriptions Interaction

4.1.5.7. Example Search Subscriptions Request

GET [base]/Subscription?emr_id=EMR-12345

POST method can be used when search parameters are too complex or long for a URL (e.g., long queries or special characters). Parameters are passed in the body as application/x-www-form-urlencoded.

POST [base]/Subscription/_search

Content-Type: application/x-www-form-urlencoded

Example Search Subscriptions Response Body

{
  "resourceType": "Bundle",
  "meta": {
    "lastUpdated": "2025-11-20T10:00:00Z"
  },
  "type": "searchset",
  "timestamp": 
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "https://emr.example.org/fhir/Subscription?criteria=Patient%3Fidentifier%3D12345"
    }
  ],

  "entry": [
    {
      "fullUrl": "https://emr.example.org/fhir/Subscription/sub-001",
      "resource": {
        "resourceType": "Subscription",
        "id": "sub-001",
        "status": "active",
        "criteria": "Patient?identifier=12345",
        "channelType": {
          "code": "rest-hook"
        },
        "endpoint": "https://emr.example.org/notify",
        "content": "id-only",
        "meta": {
          "tag": [
            {
              "system": "https://healthauthority.ca/fhir/emr-id",
              "code": "EMR-12345"
            }
          ]
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "https://emr.example.org/fhir/Subscription/sub-002",
      "resource": {
        "resourceType": "Subscription",
        "id": "sub-002",
        "status": "active",
        "criteria": "Encounter?status=planned",
        "channelType": {
          "code": "rest-hook"
        },
        "endpoint": "https://emr.example.org/notify",
        "content": "id-only",
        "meta": {
          "tag": [
            {
              "system": "https://healthauthority.ca/fhir/emr-id",
              "code": "EMR-12345"
            }
          ]
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}



4.1.5.8. Error Handling

HTTP Status Reason Description
400 Missing parameter The required search parameter is missing.
401 Unauthorized Request is missing a valid access token.
500 Internal Server Error A server-side error occurred.

4.1.5.9. Notes

  • This interaction supports the use case of allowing EMRs to view and manage their registered topics/subscriptions.
  • Subscription resources returned conform to the R5 Subscription Backport Profile.
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