Repository navigation
Client Subscriptions and Notifications
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.
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.
Inferno performs minimal validation before accepting a Subscription to ensure that it can send notifications based on it. To do so, Inferno requires:
-
channel.typeto be "rest-hook" -
channel.endpointto 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.
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).
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
idvalue - Update the
statusto be "requested" - If the provided
channel.payloadvalue 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.
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.
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.
(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:
- 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.
- 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.
- 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.
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
idof the provided Subscription does not match the id in the URL.
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
statusis "off", return the current status recorded in Inferno based on handshake acceptance. - If the provided
channel.payloadvalue 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.
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.
Inferno will always return a 204 NO CONTENT with no response body.
Test kit documentation is stored within the ./docs folder of
this repository and is automatically synchronized to this wiki with each update
to the main branch using the Publish Docs Wiki
workflow. Do not change content
within this wiki directly as changes will be overwritten.
Using this Test Kit
Client Suite
- Client Testing Details
- Client v2.0.1 Testing Walkthrough
- Client v2.2.1 Testing Instructions
- Controlling Inferno's Simulated Responses
- Simulated Subscriptions and Notifications
- Client Must Support Tests
Server Suite
Contributing to this Test Kit
Reference Documents & External Links