escribeHOST API Documentation
https://ehr.escribe.com/ehr/apiAuthentication
Authentication is required to use the API.To authenticate, send HTTP POST to https://ehr.escribe.com/ehr/api/users/login with data 'username' and 'password'.
After logging in, you will receive a cookie, JSESSIONID, that must be used to make further authenticated API calls.
Example
This example demonstrates logging in and looking up a patient's identifier using their name.The user's username is YOURUSERNAME and password is YOURPASSWORD. The patient's name is John Doe.
The example uses curl.
Step 1: Login (store JSESSIONID in a file named 'cookiejar')
curl -c cookiejar 'https://ehr.escribe.com/ehr/api/users/login' -d 'username=YOURUSERNAME&password=YOURPASSWORD'Step 2: Get patient ID (using JSESSIONID stored in a file named 'cookiejar')
curl -b cookiejar 'https://ehr.escribe.com/ehr/api/patientinfo/patient/id?firstName=john&lastName=doe'The patient identifier is returned in the HTTP response:
12345678
API Functions
Patient Lookup
Patient Lookup
GET
/patientinfo/patient/id
Lookup Patient ID
Get single patient's internal identifier, which can be used to obtain more information about the patient
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
firstName | query | Text | No | |
lastName | query | Text | No | |
dob | query | Date (yyyy-MM-dd) | No | |
sex | query | Text (M|F) | No |
Code | Description |
---|---|
200 | Success - patient identifier as a number |
404 | Not Found - patient is not found |
500 | Service error |
GET
/patientinfo/{patientId}
Fetch patient by ID
Get patient name, DOB, sex and other personal info
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes |
Code | Description |
---|---|
200 | Success - JSON object containing patient information |
500 | Service error |
GET
/patientsummary
Patient Search
Lookup patients using name, DOB, MRN, or phone number
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
search | query | Text | Yes |
Code | Description |
---|---|
200 | Success - JSON object containing patient information |
500 | Service error |
Encounters
Patient Encounters
GET
/{patientId}/uscdi/api/list-encounters
Encounter IDs
List of patient encounter IDs (signed documents that are marked available in API)
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes |
Code | Description |
---|---|
200 | Successful List of patient encounter IDs (signed documents that are marked available in API) |
500 | Service error |
GET
/{patientId}/uscdi/api/encounter-uscdi
Specific encounter (USCDI)
USCDI document containing data for a specific encounter
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
encounterId | query | Number | Yes |
Code | Description |
---|---|
200 | Successful Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. |
500 | Service error |
USCDI
Patient USCDI documents
GET
/{patientId}/uscdi/api/all-patient-data
All patient data (USCDI)
USCDI document contained all patient data
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. |
500 | Service error |
GET
/{patientId}/uscdi/api/patient-info
Personal info (USCDI)
USCDI document containing patient personal information (Name, Sex, Date of Birth, Race, Ethnicity, Preferred Language)
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 1.1 US Realm Header (V3) [ClinicalDocument: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.1.1:2015-08-01 (open)] 1.1.1 Properties 1.1.1.2 recordTarget / patient |
500 | Service error |
GET
/{patientId}/uscdi/api/smoking-status
Smoking status (USCDI)
USCDI document containing patient smoking status
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.66 Social History Section (V3) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.17:2015-08-01 (open)] 7. SHOULD contain zero or more [0..*] entry (CONF:1198-14823) such that it a. SHALL contain exactly one [1..1] Smoking Status - Meaningful Use (V2) (identifier: urn:hl7ii:2.16.840.1.113883.10.20.22.4.78:2014-06-09) (CONF:1198-14824) |
500 | Service error |
GET
/{patientId}/uscdi/api/problems
Problems (USCDI)
USCDI document containing patient problems
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.53.1 Problem Section (entries required) (V3) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.5.1:2015-08-01 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/medications
Medications (USCDI)
USCDI document containing patient medications
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.38.1 Medications Section (entries required) (V2) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.1.1:2014-06-09 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/medication-allergies
Medication allergies (USCDI)
USCDI document containing patient medication allergies
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.4.1 Allergies and Intolerances Section (entries required) (V3) 2.4.1 Allergies and Intolerances Section (entries required) (V3) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.6.1:2015-08-01 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/laboratory-tests
Laboratory tests (USCDI)
USCDI document containing patient laboratory tests
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.48 Plan of Treatment Section (V2) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.10:2014-06-09 (open)] 5. MAY contain zero or more [0..*] entry (CONF:1098-7726) such that it a. SHALL contain exactly one [1..1] Planned Observation (V2) (identifier: urn:hl7ii:2.16.840.1.113883.10.20.22.4.44:2014-06-09) (CONF:1098-14751) @moodCode=RQO |
500 | Service error |
GET
/{patientId}/uscdi/api/laboratory-results
Laboratory results (USCDI)
USCDI document containing patient laboratory results
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.64.1 Results Section (entries required) (V3) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.3.1:2015-08-01 (open)] 7. SHALL contain at least one [1..*] entry (CONF:1198-7112) such that it a. SHALL contain exactly one [1..1] Result Organizer (V3) (identifier: urn:hl7ii) 3.91 Result Organizer (V3) [organizer: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.4.1:2015-08-01 (open)] 9. SHALL contain at least one [1..*] component (CONF:1198-7124) such that it a. SHALL contain exactly one [1..1] Result Observation (V3) (identifier: urn:hl7ii:2.16.840.1.113883.10.20.22.4.2:2015-08-01) (CONF:1198-14850) |
500 | Service error |
GET
/{patientId}/uscdi/api/vital-signs
Vital signs (USCDI)
USCDI document containing patient vital signs
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.70.1 Vital Signs Section (entries required) (V3) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.4.1:2015-08-01 (open)] 7. SHALL contain at least one [1..*] entry (CONF:1198-7276) such that it a. SHALL contain exactly one [1..1] Vital Signs Organizer (V3) (identifier: urn:hl7ii:2.16.840.1.113883.10.20.22.4.26:2015-08-01) (CONF:1198-15964) |
500 | Service error |
GET
/{patientId}/uscdi/api/procedures
Procedures (USCDI)
USCDI document containing patient procedures
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.61.1 Procedures Section (entries required) (V2) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.7.1:2014-06-09 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/care-team-members
Care team members (USCDI)
USCDI document containing patient care team members
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 1.1 US Realm Header (V3) [ClinicalDocument: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.1.1:2015-08-01 (open)] 1.1.1 Properties 1.1.1.8 informationRecipient 1.1.1.9 legalAuthenticator 1.1.1.11 authenticator 1.1.1.12 participant 1.1.1.15 performer |
500 | Service error |
GET
/{patientId}/uscdi/api/immunizations
Immunizations (USCDI)
USCDI document containing patient immunizations
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.31.1 Immunizations Section (entries required) (V3) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.2.1:2015-08-01 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/udi-for-implantable-device
UDI(s) for implantable device (USCDI)
USCDI document containing patient Unique Device Identifier(s) for implantable device
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.36 Medical Equipment Section (V2) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.23:2014-06-09 (open)] 7. SHOULD contain zero or more [0..*] entry (CONF:1098-31885) such that it a. SHALL contain exactly one [1..1] Procedure Activity Procedure (V2) (identifier: urn:hl7ii:2.16.840.1.113883.10.20.22.4.14:2014-06-09) (CONF:1098-31886) 3.81 Procedure Activity Procedure (V2) [procedure: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.4.14:2014-06-09 (open)] 14. MAY contain zero or more [0..*] participant (CONF:1098-7751) such that it a. SHALL contain exactly one [1..1] @typeCode="DEV" Device (CodeSystem: HL7ActRelationshipType urn:oid:2.16.840.1.113883.5.1002 STATIC ) (CONF:1098-7752) b. SHALL contain exactly one [1..1] Product Instance (identifier: urn:oid:2.16.840.1.113883.10.20.22.4.37) (CONF:1098-15911) |
500 | Service error |
GET
/{patientId}/uscdi/api/assessment-and-plan-of-treatment
Assessment and plan of treatment (USCDI)
USCDI document containing patient assessment and plan of treatment
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.48 Plan of Treatment Section (V2) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.10:2014-06-09 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/goals
Goals (USCDI)
USCDI document containing patient goals
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.22 Goals Section [section: identifier urn:oid:2.16.840.1.113883.10.20.22.2.60 (open)] |
500 | Service error |
GET
/{patientId}/uscdi/api/health-concerns
Health concerns (USCDI)
USCDI document containing patient health concerns
Parameters
Name | Type | Description | Format | Required |
---|---|---|---|---|
patientId | path | Number | Yes | |
date | query | Date (yyyy-MM-dd) | No | |
rangeStart | query | Date (yyyy-MM-dd) | No | |
rangeEnd | query | Date (yyyy-MM-dd) | No |
Code | Description |
---|---|
200 | Success - Detailed information about the returned model can be found in the CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_2018DEC_with_errata.pdf document, which you can download from here. Follow to the section/s: 2.23 Health Concerns Section (V2) [section: identifier urn:hl7ii:2.16.840.1.113883.10.20.22.2.58:2015-08-01 (open)] |
500 | Service error |