API - User Clinic Associations

Support Center > API Integration

Published 06/21/2019 at 7:47pm UTC

Page viewed 545 times

Details

How can I add and remove Clinic Associations for users?

Answer

Clinic Associations

Clinic associations can be enabled in an Individual Virtual Clinic Relationship by contacting SecureVideo Support. When enabled, the only members of the Virtual Clinic Subject Group (i.e., a patient/client) who can request sessions from members of the Virtual Clinic Object Group (i.e., a provider) will be those combinations of Subject Host and Object Host who have a 'Clinic Association' record established for them. As of the original release of this feature (June 2019), the Individual Clinic Association records can only be added or deleted via API calls, however a UI for this will be provided as part of a future release.

A Clinic Association can only be added within a Relationship for a Subject-Object User pair if the Subject User is a member of the Relationship's Subject Group, and the Object User is a member of the Relationship's Object Group.

 

Add a Clinic Association to a Relationship

PUT https://api.securevideo.com/individualclinicassociation/610

{
    "SubjectUserId": 12345,
    "ObjectUserId": 23456
}

The above API call would add a Clinic Association within Relationship 610 between Subject User 12345 and Object User 23456. If that relationship already contains the association, the call succeeds (the call is idempotent).

This method return HTTP 204 (No Content) if successful. In the event of an error will return HTTP 4xx or 5xx.

 

Remove a Clinic Association from a Relationship

DELETE https://api.securevideo.com/individualclinicassociation/610

{
    "SubjectUserId": 12345,
    "ObjectUserId": 23456
}

The above API call would remove a Clinic Association within Relationship 610 between Subject User 12345 and Object User 23456. If that relationship does not currently contain the association, the call succeeds (the call is idempotent).

This method return HTTP 204 (No Content) if successful. In the event of an error will return HTTP 4xx or 5xx.