Setting up & Managing Subscriptions

Functionality Overview

  • In ABDM, any HIU or PHR Application can subscribe (that will help to watch for changes to PHR address) for notifications to be received on its callback URL whenever there is a change in the care context linked to a ABHA Address.

  • Every PHR App must set up a subscription for the ABHA address:

    1. When it creates ABHA address
    2. User logs in with a new ABHA address
  • PHR applications are expected to provide a UI layer where the user can:

    1. View the list of subscriptions
    2. Approve subscriptions
    3. Deny subscriptions
  • The PHR app is responsible for showing up notifications on the Mobile application (for example using Firebase in Android).

Note: Users must be explicitly asked to provide a consent to setup the subscription.

  • When the user approves the subscription, HIU/PHR App is notified whenever a new care context is linked or updated to the PHR address.

  • Once subscribed, the PHR app will receive notifications in the following events:

    1. New care context
    2. Modified care context
    3. New consent request
    4. New subscription request

sample user experienece sample user experienece

User Experience

Test Cases

Tabs in PHR app (My Records/Linked Facility/Subscriptions)

S.NoFunctionalityTest CaseSteps To Be Executed
1Mandatory “Requests” section in the “Subscriptions” tab of PHR app1) Requested - Not yet any action is taken by individual on consent request received from HIU to PHR app.All request (consent / subscription / locker) sent by HIU to patiet are seen in “Requested” dropdown within “Requests” section of PHR app
2Mandatory “Requests” section in the “Subscriptions” tab of PHR app2) Denied - Individual have “Denied” consent request received from HIU to PHR app.All denied request (consent / subscription / locker) by patient are seen in “Denied” dropdown within “Requests” section of PHR app.
3Mandatory “Requests” section in the “Subscriptions” tab of PHR app3) Expired - Requests is expired because patient have not acted on consent request received in PHR app within the time duration set by HIUAll expired request (consent / subscription / locker) by patient are seen in “Expired” dropdown within “Requests” section of PHR app.
4Mandatory “Approved” section in the “Subscriptions” tab of PHR app1) Granted - Patient had granted the consent request received from HIU to PHR appAll granted request (consent / subscription / locker) by patient are seen in “Granted” dropdown within “Approved” section of PHR app.
5Mandatory “Approved” section in the “Subscriptions” tab of PHR app2) Revoked - Patient had revoked consent requests after granting it in PHR app.All revoked request (consent / subscription / locker) by patient are seen in “Revoked” dropdown within “Approved” section of PHR app.

Edit Subscription Request/Disable auto approval request

S.NoFunctionalityTest CaseSteps To Be Executed
1Mandatory Edit active subscription requestAlready granted subscription request can be editedCheck if HI types, types of visit and time period can be edited and saved by clicking on “Save Changes” button"
2Mandatory Disable auto approval requestsAlready granted auto approval policy can be disabledCheck if already granted auto approval policy for health locker can be disabled by clickicking on “Disable” button. Post disble of auto - approval policy locker request is received from health locker for each record.

API Sequence Diagram

%%{init:{"fontSize": "1.0rem", "sequence":{"showSequenceNumbers":true}}}%% sequenceDiagram title Setup Subscriptions HIU (PHR App)->>HIE-CM:POST /v0.5/subscription-requests/cm/init HIE-CM-->>HIU (PHR App):POST /v0.5/subscription-requests/hiu/on-init HIU (PHR App)->>HIE-CM:List Subscription Requests <br/>GET /subscription-requests HIE-CM-->>HIU (PHR App): Shows the list of Subscriptions Requests HIU (PHR App)->>HIE-CM: Get subscription details for a subscription ID <br/> GET /subscription-requests/{subscription-id} HIU (PHR App)->>HIE-CM:Approve Request <br/> POST /subscription-requests/{request-id}/approve HIU (PHR App)->>HIE-CM:Deny Request <br/> POST /subscription-requests/{request-id}/deny HIU (PHR App)->>HIE-CM:Notification of request <br/>POST /v0.5/subscription-requests/hiu/notify HIE-CM-->>HIU (PHR App):POST /v0.5/subscription-requests/hiu/on-notify

API Information Request Response

Setup Subscription

1. Request For Subscription

BASE URLs: https://dev.abdm.gov.in/gateway

2.Callback For Request For Subscription

BASE URLs: https://your-hrp-server.com

User Confirms / Denies The Subscription

3. Lists Subscription Requests

BASE URLs: https://dev.abdm.gov.in/cm

4. Get Subscription Details Of A Subscription ID

BASE URLs: https://dev.abdm.gov.in/cm

5. Approve Subscription Request

BASE URLs: https://dev.abdm.gov.in/cm

6. Denies Subscription Request

BASE URLs: https://dev.abdm.gov.in/cm

Notification of subscription to User on PHR app

7. Notification For Subscription

BASE URLs: https://your-hrp-server.com

8. Acknowledge Receipt Of Notification

BASE URLs: https://dev.abdm.gov.in/gateway