Skip to content

Client Subscriptions and Notifications

github-actions[bot] edited this page Oct 30, 2026 · 1 revision

Simulated Subscriptions and Notifications

Background

PAS requires that servers use Subscription notifications to alert PAS clients when a pended prior authorization request has been updated. When simulating a PAS server, Inferno will accept Subscriptions and use them to deliver notifications to the PAS client at appropriate times. This page describes how Inferno's simulation of a Subscription server works, including

  • How and when Inferno responds to Subscription creation requests.
  • How and when Inferno generates Notifications.

Subscription Creation Requests

In order to participate in a pended workflow, Inferno must know where to send a notification to a PAS client. Subscription creation is expected to be a step performed when connecting a PAS client to a new payer. Therefore, Inferno asks testers to perform this step up-front as a part of the "Subscription Setup" group. Testers must perform this step while Inferno is waiting during the execution of this group. Otherwise, the pended scenario tests will not execute and notifications will never be sent. Testers must perform this step for each Inferno session they create as Inferno does not support sharing Subscription details between sessions.

Subscription Validation

Inferno performs minimal validation before accepting a Subscription to ensure that it can send notifications based on it. To do so, Inferno requires:

  • channel.type to be "rest-hook"
  • channel.endpoint to be a valid "http" or "https" url
  • that no heartbeat is requested as Inferno does not support sending these periodic notifications.

Additional conformance validation is performed as a part of the Inferno tests, so acceptance does not imply that the Subscription will pass conformance checks.

Creation Response

Failure

Inferno will respond with an OperationOutcome describing the problem and continue waiting for a successful Subscription creation request in the following cases:

  • No session found: Returned when the submission endpoint URL or bearer token do not identify an actively waiting PAS client session.
  • Expired Token: Returned when the bearer token provided with the request has expired.
  • Invalid or unsupported Subscription: Returned when the requested Subscription is not valid JSON or does not meet Inferno's acceptance requirements.
  • A valid Subscription has already been created for this session: Returned when Inferno has already received a successful Subscription creation request for this session as Inferno does not support sending multiple notifications. If the original Subscription does not work, you can re-run the Subscription Setup group (requests from the prior run will not be considered).

Success

When the Subscription is accepted, Inferno will return a 201 CREATED status with the requested Subscription echoed in the body with the following changes:

  • Assign a fresh id value
  • Update the status to be "requested"
  • If the provided channel.payload value is not either "application/fhir+json" or "application/json", update it to be "application/fhir+json" (Inferno only supports sending notifications in the JSON format)

It will subsequently trigger a job to send a handshake notification.

Handshake Notification

Inferno will send a basic handshake notification using the Parameters format. Unless the request times out or otherwise Inferno doesn't receive a response, the tests will continue automatically regardless of the details of the PAS client's response to the handshake.

Additional conformance validation is performed as a part of the Inferno tests, so acceptance of the handshake response does not imply that the response will pass conformance checks.

Subscription Notifications

Inferno will send a notification during the Pended Response scenario group. After receiving a $submit request during this group, Inferno will return a pended response (mocked or specified by the tester). Depending on which suite is in use, the notification will be sent either

  • Within 5-10 seconds of the pended response for the PAS Client v2.0.1 suite, or
  • After attesting to the display of the pended status for the PAS Client v2.2.1 suite.

In either case, Inferno will either mock a notification based on the $submit request or return a tester-provided notification with some updates.

Subscription Updates and Deletions

(Currently only applicable to the Client v2.2.1 Suite)

The PAS client CapabilityStatement (EHR PAS Capabilities v2.2.1) requires support for the update and delete FHIR interactions on the Subscription resource. The PAS Client suite tests PAS client support for these interactions in the "Subscription Update and Deletion" group. That group must run at the end of the session after all scenario and must support tests have been performed. Critical notes:

  1. Update and delete interactions will not be accepted by Inferno except while it is waiting during the "Subscription Update and Deletion" group. Only requests for the current active Subscription created for the session during the last run of the "Subscription Setup" group will be accepted.
  2. Re-running the "Subscription Update and Deletion" group will cause Inferno to forget any updates or deletions it received during the previous run, effectively re-setting the Subscription back to its original state.
  3. Once update or delete requests have been sent for the current Subscription, Inferno will not allow testers to run the "Pended Response" scenario and will not otherwise send notifications until a new Subscription is created by running the "Subscription Setup" group.

Update Response

Failure

Inferno will respond with an OperationOutcome describing the problem in the following cases:

  • No session found: Returned when the submission endpoint URL or bearer token do not identify an actively waiting PAS client session.
  • Expired Token: Returned when the bearer token provided with the request has expired.
  • Invalid or unsupported Subscription: Returned when the requested Subscription is not valid JSON or does not meet Inferno's acceptance requirements.
  • If Inferno is waiting for requests during any group other than the "Subscription Update and Deletion" group.
  • The id in the URL is not the Subscription created during the last run of the "Subscription Setup" group, or that Subscription has already been deleted during the current test run.
  • The id of the provided Subscription does not match the id in the URL.

Success

When the Subscription is accepted, Inferno will return a 200 OK status with the requested Subscription echoed in the body with the following changes:

  • Unless the provided status is "off", return the current status recorded in Inferno based on handshake acceptance.
  • If the provided channel.payload value is not either "application/fhir+json" or "application/json", update it to be "application/fhir+json" (Inferno only supports sending notifications in the JSON format)

A handshake will never be triggered based on an update request.

Deletion Response

Failure

Inferno will respond with an OperationOutcome describing the problem in the following cases:

  • No session found: Returned when the submission endpoint URL or bearer token do not identify an actively waiting PAS client session.
  • Expired Token: Returned when the bearer token provided with the request has expired.
  • If Inferno is waiting for requests during any group other than the "Subscription Update and Deletion" group.
  • The id in the URL is not the Subscription created during the last run of the "Subscription Setup" group.

Success

Inferno will always return a 204 NO CONTENT with no response body.

Clone this wiki locally