Welcome to iSmart EHR API Syntax

iSmart Application Programming Interface (API) is a free online service that you can use to request and receive data from ‘iSmart’ EHR product, version: 2.0.0.0. The technology is mainly developed to meet the following three 2015 Edition Health IT certification criteria: § 170.315(g)(7), § 170.315(g)(8) and § 170.315(g)(9). In accordance to the industry best practices Secure Sockets Layer (SSL) is used between client and server.

This page represents API syntax including available methods, request and response models and all other technical details.

You have to read and follow Terms of use before getting started .

Swagger

iSmart EHR API Syntax

Terms of use

1. ‘iSmart API’ is a free service. However, only authorized users and patients are granted to request/receive information using the technology.

  • Under authorized users we imply clients who have signed and in force Software Licensing Agreement with ‘WCH SERVICE BUREAU, INC’ to use ‘iSmart’ web-based electronic health record;
  • Under patients we imply patients and their authorized representatives having access to View, Download and Transmit information to third parties by means of ‘iSmart’ electronic health record.

Connecting to API server by unauthorized users is prohibited. In order to become an authorized user contact ‘WCH SERVICE BUREAU, INC’.

2. Electronic junk mails or spamming is prohibited. ‘WCH SERVICE BUREAU, INC’ on its sole discretion may block Internet Protocol (IP) address /addresses suspected in spamming.

3. To connect to ‘iSmart’ API server the access to the Internet is required.

4. Aforementioned terms of use commence on such date as any API client attempts to connect to ‘iSmart’ API server.

Getting Started

By clicking on each of the methods listed below you will be taken to technical aspects of the method, request and response models, examples and additional information.

‘Postman Chrome App’ is used as an example.

To call any method you need successfully pass authorization. The ‘Authorization’ paragraph explains how client connects to server.

Security

To ensure privacy, you must use HTTPS for all iSmart EHR API requests.

Base URL

iSmart API’s Base URL: https://apiehr.wchsb.com/

Encoding

You submit all requests with a POST call using UTF-8 encoding and URL encoded values. The expected Content-Type for POST is application/json.

Authentication information

Pass authorization using username and password for iSmart EHR. Once successfully authorized you will see ‘token’ in the response message. Token lifetime is 20 minutes. Once token expires you need to pass authorization again. Requests can be performed for the time a token is valid.

Note: username and password are granted to patients and their authorized representatives in iSmart EHR v. 2.0.0.0.

Request

https://ismartapi.wchsb.com/token
The autorization API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/token" \
            -d "grant_type=password" \
            -d "username=login51744df4" \
            -d "password=123456" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
grant_type password Yes.
username Type: string. Yes.
password Type: string. No.

Response

Format

{ 
    "access_token":"6hxBEaGIgMz7GSzmoo7VIGarwPnlMRqy12M3JcZWvUWvQwbqR7CTrWFkNC",
    "token_type":"bearer",
    "expires_in":1201,
    "userName":"login123abc",
    "patientId":"12345",
    ".issued":"Tue, 26 Sep 2017 14:07:20 GMT",
    ".expires":"Tue, 26 Sep 2017 14:27:20 GMT",
}
                                

Keys and Values

Key Description
access_token Type: string(1000)
token_type bearer
userName Type: string
patientId Type: string
.issued Type: Date
.expires Type: Date

Error codes

The username or password is incorrect
Code Text Meaning
error unsupported_grant_type Unsupported grant_type (Expected Value: "password")
01 The username or password is incorrect.
02 Your account is disabled by administration
03 Your account has expired. Please contact ilyam@wchsb.com
04 Your account is not associated with any practice, please contact system administrator.
05 Your trial account has expired. Consultations 718-934-6714 ext 1201.
06 Incorrect Requested data.
07 Incorrect requested patientId.
08 You haven't access to requested patient.

Authorization information

Note: When you call any method you must set value for 'Authorization' field in the header: "bearer " + "{access_token}". As shown in the example below

bearer VKN6nnT1kFsMfycJfqu-9wHcRMT0gnxPLnoTQgNEFVWSMw5akLrB0s5xBX09foEJbutO6LRed2KLsikCWdl

Response Common parameters

Key Description
is_success_result Type of result ("true"/"false"). "True" - see result field, "false" - see error field.
error See table "Error codes"
error_description description of error
result Response

Get Patient Demographics

Request

https://ismartapi.wchsb.com/api/patient/info
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/info" \
            -d "PatientId": 12345 \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": {
            "FirstName":"Alice"
            "LastName":"Newman"
            "SexCode":"F" 
            "Sex":{
                "Key":"F" 
                "Value":"Female" 
                                },       
            "DoB":"05/01/1970"
            "Races"[
                                {
                    "Key":"2106-3" 
                    "Value":"WHITE" 
                                },
                                {
                    "Key":"2108-9" 
                    "Value":"EUROPEAN" 
                                }
                                ],
            "Ethnicity":[        
                                {
                    "Key":"2186-5" 
                    "Value":"Not Hispanic or Latino" 
                                }
                                ],
            "PreferredLanguage":{
                "Key":"en" 
                "Value":"English" 
                                },
            "SmokingStatus":{
                "Key":"449868002" 
                "Value":"Current every day smoker" 
                                }
                                }
  }
                                

Keys and Values

Key Description
is_success_result Type of result ("true"/"false"")
error Error code
error_description description of error
result Respose
FirstName Patient first name
LastName Patient last name
SexCode Patient sex code
Sex Patient sex
DoB Patient date of birtday
Races List of patient races
Ethnicity Patient Ethnicity
PreferredLanguage Patient preferred language
SmokingStatus Patient smoking status

Get patient problems

Request

https://ismartapi.wchsb.com/api/patient/problems
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/problems" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "SelectedCode":"59621000",
                "SelectedDescription":"Essential hypertension (disorder)",            
                "SelectedCodeSystem":"SNOMED",
                "ICD9Code":"401.9",
                "ICD9Description":"Unspecified essential hypertension",
                "ICD10Code":"I10",
                "ICD10Description":"Essential (primary) hypertension",
                "SNOMEDCTCode":"59621000",
                "SNOMEDCTDescription":"Essential hypertension (disorder)",
                "StartDate":"10/05/2017"
                                }
                                ]
  }
                                

Keys and Values

Key Description
SelectedCode Problem code
SelectedDescription Problem Description
SelectedCodeSystem Problem code system
ICD9Code Problem code in ICD9 system
ICD9Description Problem Description in ICD9 system
ICD10Code Problem code in ICD10 system
ICD10Description Problem Description in ICD10 system
SNOMEDCTCode Problem code in SNOMED system
SNOMEDCTDescription Problem Description in SNOMED system
StartDate Problem start date

Get patient medications

Request

https://ismartapi.wchsb.com/api/patient/medications
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/medications" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "MedicationName":"Tylenol Extra Strength tablet oral 500 mg",
                "RxNorm":"209459",            
                "StartDate":"06/22/2015",
                "StopDate":"",
                "Status":"Active"                
                                }
                                ]
  }
                                

Keys and Values

Key Description
MedicationName The name of medication
RxNorm Medication code
StartDate Medication start date
StartDate Medication stop date
Status Status of medication

Get patient medication allergies

Request

https://ismartapi.wchsb.com/api/patient/medicationallergies
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/medicationallergies" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "MedicationAllergyName":"Ampicillin",
                "RxNormCode":"733",            
                "Reaction":"Weal (disorder)",
                "ReactionSNOMEDCode":"247472004"                
                                }
                                ]
  }
                                

Keys and Values

Key Description
MedicationAllergyName The name of medication allergy
RxNormCode Medication allergy code
Reaction Reaction
ReactionSNOMEDCode Reaction code in SNOMED system

Get patient laboratory tests

Request

https://ismartapi.wchsb.com/api/patient/laboratorytests
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/laboratorytests" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "LaboratoryTestsNumber":"#1316",
                "LaboratoryTestsName":"Urinalysis macro (dipstick) panel in Urine",            
                "LOINCcode":"LOINC: 24357-6",
                "SpecimenCollectionDate":"06/22/2015",
                "Time":"14:15",
                "Status":"Pending",
                "LaboratoryName":"test laboratory",
                "OrderingProvider":"Albert Davis"                    
                                }
                                ]
  }
                                

Keys and Values

Key Description
LaboratoryTestsNumber The number of laboratory test
LaboratoryTestsName The name of laboratory test
LOINCcode The code of laboratory test in LOINC system
SpecimenCollectionDate Date of laboratory test
Time Time of laboratory test
Status Laboratory test status
LaboratoryName The name of laboratory
OrderingProvider The name of ordering provider

Get patient laboratory values

Request

https://ismartapi.wchsb.com/api/patient/laboratoryvalues
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/laboratoryvalues" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "LaboratoryTestsNumber":"#1719",
                "LaboratoryTestsName":"Urinalysis macro (dipstick) panel in Urine",            
                "LOINCcode":"LOINC: 24357-6",
                "ResultDate":"06/22/2015",
                "ObservationName":"Glucose [Mass/volume] in Urine by Test strip",
                "ObservationCode":"LOINC: 5792-7",
                "Result":"50",
                "Units":"null",                    
                "ReferenceInterval":"Neg",
                "Flag":"Below Low Normal",
                "ResultStatus":"Final results; results stored and verified"
                                }
                                ]
  }
                                

Keys and Values

Key Description
LaboratoryTestsNumber The number of laboratory tests
LaboratoryTestsName The name of laboratory test
LOINCcode Laboratory test code in LOINC system
ResultDate Result date
ObservationName Observation name
ObservationCode Observation code
Result Result
Units Units
ReferenceInterval ReferenceInterval
Flag Flag
ResultStatus Result status

Get patient vital signs

Request

https://ismartapi.wchsb.com/api/patient/vitalsigns
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/vitalsigns" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "Height":"LOINC:8306-3, result: 177.000",
                "Weight":"LOINC:3141-9, result: 88.000",            
                "BMI":"28.1",
                "Temperature":"LOINC:8310-5, result: 38.000",
                "SystolicBloodPressure":"LOINC:8480-6, result: 88",
                "DiastolicBloodPressure":"LOINC:8462-4, result: 145",
                "LowSupineBloodPressure":"result: 0",
                "UpSupineBloodPressure":"result: 0",                    
                "HeartRate":"LOINC:8867-4, result: 80",
                "RespiratoryRate":"LOINC:9279-1, result: 18",
                "PulseOximetry":"LOINC:59408-5, result: 95",
                "InhaledOxygenConcentration":"36"
                                }
                                ]
  }
                                

Keys and Values

Key Description
Height Patient height
Weight Patient weight
BMI Patient BMI
Temperature Patient temperature
SystolicBloodPressure Systolic blood pressure
DiastolicBloodPressure Diastolic blood pressure
LowSupineBloodPressure Low supine blood pressure
UpSupineBloodPressure Up supine blood pressure
HeartRate Heart rate
RespiratoryRate Respiratory rate
PulseOximetry Pulse Oximetry
InhaledOxygenConcentration Inhaled oxygen concentration

Get patient procedures

Request

https://ismartapi.wchsb.com/api/patient/procedures
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/procedures" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "ProcedureName":"Respiratory medication administered by nebulizer",
                "ProcedureCode":"SNOMEDCT: 56251003",            
                "Status":"Completed",
                "Date":"06/22/2015",                
                                }
                                ]
  }
                                

Keys and Values

Key Description
ProcedureName Procedure name
ProcedureCode Procedure code
Status Procedure status
Date Procedure date

Get patient careteammembers

Request

https://ismartapi.wchsb.com/api/patient/careteammembers
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/careteammembers" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "FirstName":"Albert",
                "LastName":"Davis",            
                "ProviderRole":"RP"                
                                }
                                ]
  }
                                

Keys and Values

Key Description
FirstName First name of care team member
LastName Last name of care team membere
ProviderRole Provider role

Get patient immunizations

Request

https://ismartapi.wchsb.com/api/patient/immunizations
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/immunizations" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "VaccineStatus":"Complete",
                "Status":"null",            
                "Vaccine":"influenza, unspecified formulation (Inactive)",
                "VaccineCode":"CVX: 88",
                "VaccineCodeSystem":"null",
                "Date":"05/10/2014"
                                }
                                ]
  }
                                

Keys and Values

Key Description
VaccineStatus Vaccine status
Status Status
Vaccine Vaccine name
VaccineCode Vaccine code
VaccineCodeSystem Vaccine code system
Date Vaccine date

Get patient uniquedeviceidentifiers

Request

https://ismartapi.wchsb.com/api/patient/uniquedeviceidentifiers
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/uniquedeviceidentifiers" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "DeviceID":"00643169007222",
                "LotNumber":"",            
                "SerialNumber":"BLC200461H",
                "UDI":"(01)00643169007222(17)160128(21)BLC200461H",
                "Status":"Active",
                "ManufactureDate":"01/28/2016"                
                                }
                                ]
  }
                                

Keys and Values

Key Description
DeviceID Device ID number
LotNumber Device lot number
SerialNumber Device serial number
UDI Unique Device Identification code
Status Status of device
ManufactureDate Device manufacture date

Get patient assessmentandplanoftreatment

Request

https://ismartapi.wchsb.com/api/patient/assessmentandplanoftreatment
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/assessmentandplanoftreatment" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "Type":"Assessment",
                "Description":"The patient was found to have fever and Dr Davis is suspecting Anemia based on the patient history. So Dr Davis asked the patient to closely monitor the temperature and blood pressure and get admitted to Community Health Hospitals if the fever does not subside within a day.",
                                }
                                ]
  }
                                

Keys and Values

Key Description
Type Type
Description Description

Get patient goals

Request

https://ismartapi.wchsb.com/api/patient/goals
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/goals" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "Goal":"Need to gain more energy to do regular activities",
                "Description":"",            
                "SetDate":"06/22/2015"
                                }
                                ]
  }
                                

Keys and Values

Key Description
Goal Goal
Description Goal description
SetDate Goal set date

Get patient healthconcerns

Request

https://ismartapi.wchsb.com/api/patient/healthconcerns
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/healthconcerns" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format

{
        "is_success_result":"true"                                 
        "error":"null"
        "error_description":null
        "result": [
                                {
                "HealthStatus":"Chronically ill",
                "Descriptions":,            
                "BMI":"28.1" [
                    "Documented HypoThyroidism problem",
                    "Documented HyperTension problem",
                    "Watch Weight of patient"                   
                ]
                                }
                                ]
  }
                                

Keys and Values

Key Description
HealthStatus Patient health status
Descriptions Descriptions
BMI BMI

Get patient summary

Request

https://ismartapi.wchsb.com/api/patient/summary
The patient demographics API request looks like:
curl -X "POST" "https://ismartapi.wchsb.com/api/patient/summary" \
            -d "PatientId": 12345 \
            -d "From": "01/01/2017" \
            -d "To": "01/01/2017" \
            -d "Specific": "01/01/2017" \

Parameters

The following table shows the parameters you use in the request:

Parameter Description Required
PatientId Patient Id that you received when authorized Yes.
From Date from No.
To Date to No.
Specific Specific date No.

Response

Format