Veracity Patient Data API Access

 

Introduction

This document provides an overview of Veracity 9.1 application access Web API in accordance to 170.315 (g)(7), 170.315 (g)(9). You will also agree to TERMS OF SERVICE.

The application can be accessed by any authorized third party vendor or otherwise that has been given credentials by the clinic to access their instance of the veracity application. Client software must be capable of making HTTPS RESTful requests.

Security:
Veracity 9.1 implements multi-layer security system. Authentication token is needed to access the application API. Only SSL/TLS connections (TLS 1.0 or higher) are accepted. All plaintext connections will be refused.

Note: Please limit your connection frequency to a value appropriate for your use case. Connection attempts which are more frequent than permitted by the bandwidth allocation for the data resource are not allowed.

Steps needed to access the Web API:

  • Contact the clinic for Client ID and Client Secret
  • Call the authorization API to receive an authorization token. If the client credentials are valid, the server returns an authorization token.
  • Use the authorization token to query patients using specific demographics data. If the patient is found, a patient unique ID is returned.
  • Use the patient Unique ID to query patient’s specific clinical data.
  • You can query patient specific categories shown below. If categories are left blank, all patient data will be returned.
  • You can query data with specified date range. If left blank, all data will be returned.
  • The authorization token expires after a period of inactivity. You have to retrieve another authorization token.

Web API workflow:

Categories: 

 

CodeDescription
DemographicsPatient demographics
ProblemsPatient problems
MedicationsPatient medications
AllergiesPatient allergies
ImmunizationsPatient immunization
VitalSignsPatient vitals
CarePlanPatient care plan
LabResultsPatient lab results
ProceduresPatient procedures
ChiefComplaintPatient chief complaints
InstructonsProvider instructions to patients
HealthConcernsPatients health concerns
AssessmetnandPlanPatient assessments and plan
MedicalDevicesPatient implantable devices
SocialPatient social history
FunctionalStatusPatient functional status
CognitiveStatusPatient cognitive status
ReferralReasonPatient referral reason

*Any request parameter must be sent using x-www-form-urlencoded

Functions

 

POST /authorize

Authorize to receive an authentication token to use in subsequent requests

 

URLRequest headersParameters
https://ver9.allegiancemd.com/ehr/api/v1/authorizeN/AclientId:String (required)
clientSecret:String (required)

Exceptions

Unauthorized: Wrong clientId or clientSecret
Missing Required Parameter: missing required parameter

Response

Response Type: JSON

{
“access_token”: “eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiOGI1MDFjOS1mMTExLTQ”,
“resource_owner_authority”: “EHR”,
“token_type”: “Bearer”,
“expires_in”: “300”,
“success”: “true”
}

POST /getIdent

Query patients with first name, last name and date of birth

 

URLRequest headersParameters
https://ver9.allegiancemd.com/ehr/api/v1/getIdentAuthorization:String (required) – Bearer {tokenId}fname:String(required)
lname:String(required)
dob:Date(required)

Exceptions

No results: Patient was not found
Missing Required Parameter: missing required parameter

Response

Response Type: JSON

 

Patient account is returned

[ { “account”: “ad17484a-ff7d-4989-be26-d8a04e65c9ce ” } ]

POST /patient/clinicalData/{patientIdentifier}

Query patients with first name, last name and date of birth

 

URLRequest headersParameters
https://ver9.allegiancemd.com/ehr/api/v1/authorizeAuthorization:String (required) – Bearer {tokenId}categories:String(optional)
fromDate:Date(optional)
toDate:Date(optional)

Exceptions

Wrong Patient Identifier: wrong patient identifier was provided
Missing Required Parameter: missing required parameter

Response
Response Type: XML
CCDA is returned

returns CCDA XML

API Calls Details

AUTHORIZATION APIs

 https://ver9.allegiancemd.com/ehr/api/v1

POST /authorize 

 

Request headers

N/A

 

Request parameters

clientId (required)
clientSecret (required)

Response

{
  “access_token”: “eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiOGI1MDFjOS1mMTExLTQ”,
  “resource_owner_authority”: “EHR”,
  “token_type”: “Bearer”,
  “expires_in”: “300”,
  “success”: “true”
}

PROTECTED APIs

POST /patient/getIdent

 

Request headers

Authorization (required) – Bearer {tokenId} (example tokenId: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiOGI1MDFjOS1mMTExLTQ 

Request parameters

fname(required)
lname(required)
dob(required)

 

Response:

[ { "account": "ad17484a-ff7d-4989-be26-d8a04e65c9ce " } ]

POST /patient/clinicalData/{patientIdentifier}

 

Request headers

Authorization (required) – Bearer {tokenId} (example tokenId: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiOGI1MDFjOS1mMTExLTQ 

Request parameters

categories(optional)

fromDate(optional)

toDate(optional)

Categories: comma seperated
Values Sample: Demographics, Problems, Medications, Allergies, Immunizations, VitalSigns, AssessmentandPlan, LabResults, Procedures, Instructions, HealthConcerns,CarePlan,MedicalDevices.
fromDate – toDate: Date range

 

Response

returns CCDA XML

POST /patient/demoData/{account}

 

Request headers

Authorization (required) – Bearer {tokenId} (example tokenId: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiOGI1MDFjOS1mMTExLTQ 

Request Path parameters

Patient account

 

Response:

JSON Patient Model

PROTECTED APIs

POST /calendar/search

Request headers

Authorization (required) – Bearer {tokenId} (example tokenId: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJiOGI1MDFjOS1mMTExLTQ  

Request parameters

fromDate (required (format string YYYY-mm-dd))
toDate  (required (format string YYYY-mm-dd))
Only 5 days range

Response:

JSON Appointment Model

Exceptions and Error Conditions

  1. The http status code equal to 500 (Internal Server Error): Error details is returned in message parameter in JSON
    {sucess:”false”,message:”detailed error message”}
  2. The http status code equal to 200 (OK): successful request