Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Getting Started

jay-lee00 edited this page Sep 24, 2020 · 9 revisions

Getting Started with the VCM API

In general, the Virtual Care Management (VCM) API is a RESTful system that uses JSON for data transmission. It uses both a set of developer credentials and an access token generated for a user account to operate on data in the system. This collection of RESTful APIs allows apps to deal with patient management, staff management and much more.

Common Requirements for Calling the API:

Both the developerId and apiKey are required for all API requests. Most of these requests also require an access token (see below).

Access Tokens

Both Authentication and Single-Sign On (SSO) require access tokens, either generated with a username/password, or, for SSO, a JWT token that is generated through your client backend.

Both users and co-users require validated tokens to access the system.

  • Use GET on these endpoints to validate tokens.
  1. v2/account/couser/tokens/{token}/{codesetId}
  2. v2/account/user/tokens/{token}/{codesetId}

Patient Management

Common uses for the Patient Management API include listing existing patients, creating patient accounts, and updating patient profiles, among other uses.

  • To begin, first use GET v2/admin/patients to determine if a user exists in the system. This endpoint requires physician or administrative permissions to run properly.
Creating Patients, Dependents, and Co-Users
  • Use POST on the following endpoints to create a patient, dependent, or co-user. The administrative functions require physician or administrative permissions to run properly, but patients can add co-users to their profiles themselves.

  • Create Patient: POST v2/admin/patients

  • Create Dependent: POST v2/admin/patient/{patientId}/dependent

Click here for more detailed information on Patient API.

Staff Management

Common uses for the Staff Management API includes listing existing staff, creating staff accounts, and updating staff profiles, among other uses.

Many calls, including checking for availability blocks and scheduling appointments, require the ID/IDs of the provider in question.

  • To begin, first use a GET request to v2/clinicians/staffaccounts. There are many query string parameters you can use to narrow this list, but if you do not include any, you will get a full list. Some of the optional query string parameters you can use include:

  • staffNameFilter - (string) A string that is used for a staff name search. Will do partial matches against all staff members.

  • includePendingDoctors - (boolean) A boolean value that can toggle return of staff accounts that have not yet been activated. Defaults to true.

  • includeDoctorsWithoutAppointmentPermission - (boolean) A boolean value that can toggle return of staff accounts that do not have appointment permission. Defaults to true.

Example:

The following example demonstrates how to request all staff accounts.

Request

GET https://sandbox.connectedcare.md/api/v2/clinicians/staffaccounts

Headers Sent:

  • X-Developer-Id: ****
  • X-Api-Key: ****
  • Authorization: ****

Response

Response Code (Success): 200 OK

{
  "data": [
    {
      "staffId": 234,
      "userId": 31031,
      "profileImagePath": "/Images/Doctor-Female.gif",
      "fullName": "Kotoori Sarasa",
      "phone": "+15555551212",
      "roles": "Doctor",
      "isActivated": true,
      "emailId": "doctor@example.com",
      "canMakeAppointments": true,
      "groupIds": []
    }
  ],
  "total": 1
}
Click here for more detailed information on Staff Management API.

Communicating with the API

When you send requests to the VCM API, you will need to provide your assigned developer ID and API access key to verify your access. These are sent to our API via the headers X-Developer-Id and X-Api-Key. The values for these are assigned when you sign up for the API program. For most actions, you will also need to send an OAuth 2.0 Bearer token gained by logging in as an authorized user. Click here for more information on obtaining these tokens.

Note: You will be assigned test keys for our "sandbox" environment initially. This environment allows you to experiment and develop your solution against test data. When you are ready, we will certify your implementation and issue production credentials.

Clone this wiki locally