Notification Subsystem

Introduction

The design will generate notifications in real time upon the completion of CIE transactions. These notifications can be sent to Partners system(s) via
their API, alerting them that a new SMS message follow-up is needed. Partner
system(s) can then call the CIE Hub API and retrieve all the relevant information
required to process the transaction. The diagrams below illustrate this approach. The first diagram focuses on the automated notification process to initiate the immediate follow-up; the second diagram illustrates to broader sequence of events for the entire process, including the “retrieval” of information needed for the follow-up by Partner.

CIE-Notification (1).jpg

Web Sequence Diagram on the Flow

The following lays out a common use case in which the CIE Hub will provide a notification to a partner system and the next steps that need to be taken on the partner system

image-20240130-162711.png

Partner API Details

The partner will have to provision a API that will be registered with the CIE Hub. The following are needed for the CIE Hub to registered

Notification Attribute

Description

Notification Attribute

Description

URL

https://yournotificationapi.com

HTTP Verb

This will always be a POST to the URL

OAuth2 Token URL

The notification subsystem uses OAuth2 to create a access token. This will be the URL that the partner system has provisioned for the CIE Hub to get a OAuth2 access token.

OAuth2 Client Id

The notification subsystem uses OAuth2 to create a access token. This will be the Client Id that the partner system created for CIE Hub.

OAuth2 Client Secret

The notification subsystem uses OAuth2 to create a access token. This will be the Client Secret that the partner system created for CIE Hub.

OAuth2 Scopes

The notification subsystem uses OAuth2 to create a access token. This will be an scopes that is needed for calling the Partner Notification API.

x-api-key(optional)

If a x-api-key is needed for call then this can also be supplied.

Notification Payload

The payload that is sent contains a FHIR Communication Resource. The specification for that resource can be found here https://build.fhir.org/communication.html

This communication resource will contain the information about the notification. Once the partner has received the notification they can check the topic to see what business event has happened in the CIE system. From that event they can then query the CIE FHIR endpoints to get detailed information on that event.

 

Communication Resource Attribute

Description

Communication Resource Attribute

Description

topic

This will contain the code that identifies which transaction that happened in the system that the Partner system has requested a notification for. An example is a ServiceRequest has been created and assigned to the partner organization.

Here is a link to a list of topics.

Events for Pub/Sub

about

This will contain the resource type and id that the notification was created for. An example is that

recipient

This will identify of the organization who the notification is sent to. These will be the partners that are subscribing to the notification.

sender

This will be the identify of the organization who the notification was sent from. This should be Michigan 211.

subject

This will be the person who the notification is about. For example if a ServiceRequest was created for John Doe then the subject will be John Doe.

payload

The payload is a base64 encoded json document that represents the resources that correspond to this Communication.

 

Example Payload

{ "category": [ { "coding": [ { "code": "PartnerNotification_v2", "display": "Partner Notification", "system": "https://mi-cie.org/fhir/StructureDefinition" } ] } ], "about": [ { "reference": "ServiceRequest/8411c616-4dea-48bd-adc5-1ec99907b08b", "type": "ServiceRequest" } ], "topic": { "coding": [ { "code": "ServcieRequest_v2", "display": "Service Request Created", "system": "https://mi-cie.org/fhir/StructureDefinition/" } ] }, "id": "25007642-3a41-4b5e-99d1-052ea7450bd4", "recipient": [ { "display": "STAND TOGETHER FOUNDATION", "reference": "Organization/STF" } ], "resourceType": "Communication", "sender": { "display": "MI211", "reference": "Organization/MI211" }, "sent": "2024-01-30T14:54:36.213Z", "status": "completed", "subject": { "display": "PERSON WHO WAS REFERRAL", "reference": "Patient/54abba67-24ee-455f-af51-529eec0bce2e" }, "payload": [ { "contentAttachment": { "data": "ewogICAgImVudHJ5IjogWwogICAgICAgIHsKICAgICAgICAgICAgImZ1bGxVcmwiOiAiaHR0cHM6Ly9oZWFsdGhjYXJlLmdvb2dsZWFwaXMuY29tL3YxL3Byb2plY3RzL2NpZS11d3NlbS1odWIvbG9jYXRpb25zL3VzLWVhc3Q0L2RhdGFzZXRzL2NpZS11d3NlbS1zZW1pLWRhdGFzZXQvZmhpclN0b3Jlcy9jaWUtdXdzZW0tc2VtaS11YXQtZmhpcnN0b3JlL2ZoaXIvU2VydmljZVJlcXVlc3QvNmE5OGI4ZTMtMmZlZS00OTljLTg4ODYtZDRmYzg4NGZkYmI4IiwKICAgICAgICAgICAgInJlc291cmNlIjogewogICAgICAgICAgICAgICAgImF1dGhvcmVkT24iOiAiMjAyNC0wMS0zMFQwNjoyMDoyOC0wNTowMCIsCiAgICAgICAgICAgICAgICAiY2F0ZWdvcnkiOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAiY29kaW5nIjogWwogICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJjb2RlIjogImZvb2QtaW5zZWN1cml0eSIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImRpc3BsYXkiOiAiRm9vZCBJbnNlY3VyaXR5IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAic3lzdGVtIjogImh0dHA6Ly9obDcub3JnL2ZoaXIvdXMvc2RvaC1jbGluaWNhbGNhcmUvQ29kZVN5c3RlbS9TRE9IQ0MtQ29kZVN5c3RlbVRlbXBvcmFyeUNvZGVzIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBdCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgXSwKICAgICAgICAgICAgICAgICJjb2RlIjogewogICAgICAgICAgICAgICAgICAgICJjb2RpbmciOiBbCiAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJjb2RlIjogIkJELTE4MDAuMjAwMCIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGlzcGxheSI6ICJGb29kIFBhbnRyaWVzIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJzeXN0ZW0iOiAiaHR0cDovL2V4YW1wbGUub3JnL1RCRC8yMTFMQUNvdW50eVRheG9ub215IgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgXQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJleHRlbnNpb24iOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAidXJsIjogImh0dHBzOi8vbWktY2llLm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3JlYXRlZC1ieS1zb2NpYWwtbmF2aWdhdG9yIiwKICAgICAgICAgICAgICAgICAgICAgICAgInZhbHVlU3RyaW5nIjogIkFubmVtaWVrIEx1Y2FzIgogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIF0sCiAgICAgICAgICAgICAgICAiaWQiOiAiNmE5OGI4ZTMtMmZlZS00OTljLTg4ODYtZDRmYzg4NGZkYmI4IiwKICAgICAgICAgICAgICAgICJpbnRlbnQiOiAib3JpZ2luYWwtb3JkZXIiLAogICAgICAgICAgICAgICAgIm1ldGEiOiB7CiAgICAgICAgICAgICAgICAgICAgImxhc3RVcGRhdGVkIjogIjIwMjQtMDEtMzBUMTE6Mjc6MjcuNTk5ODAzKzAwOjAwIiwKICAgICAgICAgICAgICAgICAgICAidmVyc2lvbklkIjogIk1UY3dOall4TkRBME56VTVPVGd3TXpBd01BIgogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJwZXJmb3JtZXIiOiBbCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAiZGlzcGxheSI6ICJVTklURUQgV0FZIEZPUiBTT1VUSEVBU1RFUk4gTUlDSElHQU4iLAogICAgICAgICAgICAgICAgICAgICAgICAicmVmZXJlbmNlIjogIk9yZ2FuaXphdGlvbi8zOTY0OSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJ0eXBlIjogIk9yZ2FuaXphdGlvbiIKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBdLAogICAgICAgICAgICAgICAgInJlcXVlc3RlciI6IHsKICAgICAgICAgICAgICAgICAgICAiZGlzcGxheSI6ICJVTklURUQgV0FZIEZPUiBTT1VUSEVBU1RFUk4gTUlDSElHQU4iLAogICAgICAgICAgICAgICAgICAgICJyZWZlcmVuY2UiOiAiT3JnYW5pemF0aW9uLzM5NjQ5IiwKICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJPcmdhbml6YXRpb24iCiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgInJlc291cmNlVHlwZSI6ICJTZXJ2aWNlUmVxdWVzdCIsCiAgICAgICAgICAgICAgICAic3RhdHVzIjogImFjdGl2ZSIsCiAgICAgICAgICAgICAgICAic3ViamVjdCI6IHsKICAgICAgICAgICAgICAgICAgICAiZGlzcGxheSI6ICJNYXggIFZlcnN0YXBwZW4iLAogICAgICAgICAgICAgICAgICAgICJyZWZlcmVuY2UiOiAiUGF0aWVudC8wMzUyYzQzYy0zNDZhLTQ1NTMtOTJhOS00YTY2NWEzM2ZhNjAiLAogICAgICAgICAgICAgICAgICAgICJ0eXBlIjogIlBhdGllbnQiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJzZWFyY2giOiB7CiAgICAgICAgICAgICAgICAibW9kZSI6ICJtYXRjaCIKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIF0sCiAgICAibGluayI6IFsKICAgICAgICB7CiAgICAgICAgICAgICJyZWxhdGlvbiI6ICJzZWFyY2giLAogICAgICAgICAgICAidXJsIjogImh0dHBzOi8vaGVhbHRoY2FyZS5nb29nbGVhcGlzLmNvbS92MS9wcm9qZWN0cy9jaWUtdXdzZW0taHViL2xvY2F0aW9ucy91cy1lYXN0NC9kYXRhc2V0cy9jaWUtdXdzZW0tc2VtaS1kYXRhc2V0L2ZoaXJTdG9yZXMvY2llLXV3c2VtLXNlbWktdWF0LWZoaXJzdG9yZS9maGlyL1NlcnZpY2VSZXF1ZXN0Lz9faWQ9NmE5OGI4ZTMtMmZlZS00OTljLTg4ODYtZDRmYzg4NGZkYmI4Jl9yZXZpbmNsdWRlPU9ic2VydmF0aW9uJTNBYmFzZWQtb24iCiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJyZWxhdGlvbiI6ICJmaXJzdCIsCiAgICAgICAgICAgICJ1cmwiOiAiaHR0cHM6Ly9oZWFsdGhjYXJlLmdvb2dsZWFwaXMuY29tL3YxL3Byb2plY3RzL2NpZS11d3NlbS1odWIvbG9jYXRpb25zL3VzLWVhc3Q0L2RhdGFzZXRzL2NpZS11d3NlbS1zZW1pLWRhdGFzZXQvZmhpclN0b3Jlcy9jaWUtdXdzZW0tc2VtaS11YXQtZmhpcnN0b3JlL2ZoaXIvU2VydmljZVJlcXVlc3QvP19pZD02YTk4YjhlMy0yZmVlLTQ5OWMtODg4Ni1kNGZjODg0ZmRiYjgmX3JldmluY2x1ZGU9T2JzZXJ2YXRpb24lM0FiYXNlZC1vbiIKICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgInJlbGF0aW9uIjogInNlbGYiLAogICAgICAgICAgICAidXJsIjogImh0dHBzOi8vaGVhbHRoY2FyZS5nb29nbGVhcGlzLmNvbS92MS9wcm9qZWN0cy9jaWUtdXdzZW0taHViL2xvY2F0aW9ucy91cy1lYXN0NC9kYXRhc2V0cy9jaWUtdXdzZW0tc2VtaS1kYXRhc2V0L2ZoaXJTdG9yZXMvY2llLXV3c2VtLXNlbWktdWF0LWZoaXJzdG9yZS9maGlyL1NlcnZpY2VSZXF1ZXN0Lz9faWQ9NmE5OGI4ZTMtMmZlZS00OTljLTg4ODYtZDRmYzg4NGZkYmI4Jl9yZXZpbmNsdWRlPU9ic2VydmF0aW9uJTNBYmFzZWQtb24iCiAgICAgICAgfQogICAgXSwKICAgICJyZXNvdXJjZVR5cGUiOiAiQnVuZGxlIiwKICAgICJ0b3RhbCI6IDEsCiAgICAidHlwZSI6ICJzZWFyY2hzZXQiCn0=", "contentType" : "application/json", "title" : "Communication Payload", "creation" : "2024-02-01T11:50:23-05:00" } } ] }

 

ServiceRequest created notification

Once a service request has been created and assigned to a partner the partner will then receive a notification in which they can use the turn around and get the detailed information. This use case is detailed in the following document.

Use Case - Query a list of ServiceRequests assigned to a Partner