Patients

Minimum CorEMR Version: 6.2.0 This webservice allows clients to manage patient information inside the CorEMR system. It can be used to retrieve and edit patients, as well as all of their applicable fields and data.

Patient Endpoints

Action REST Verb Description
Read GET
/ws/patients/
Gets list of non-deleted patients current in the system.
Read GET
/ws/patients/{external_id}
Get details on specific patient with given external_id
Read GET
/ws/patients/{external_id}/bookings/
Get list of patient bookings for specified patient.
Read GET
/ws/patients/{external_id}/bookings/{number}
Get details on specified patient booking.
Create POST
/ws/patients/
Create a new patient.
Create POST
/ws/patients/{external_id}/bookings/
Create an assigned patient booking.
Update POST
/ws/patients/{external_id}
Update an existing patient.
Update POST
/ws/patients/{external_id}/bookings/{number}
Update an existing patient booking.

Get /ws/patients/ Return Fields

Return Field Datatype Note
external_id String Unique Patient Request identifier.
facility String String representation of patient facility. Note that this is different from the post facilty field, which requires the integer ID representation of the facility.
agency Integer Jail agency.
agency_id String Jail agency's string identifier.
fname String Patient first name.
mname String Patient middle name.
lname String Patient last name.
dob DateTime Patient's data of birth, formatted as YYYY-MM-DD 00:00:00.000
sex String Patient's sex assigned at birth.
allergies String List of known patient allergies.
ssn String Patient social security number.
race String Patient race.
ethnicity String Patient ethnicity.
height integer Patient height in inches.
weight String Patient weight in pounds.
eye_color String Patient eye color.
hair_color String Patient hair color.
address1 String Patient's primary address.
address2 String Patient's secondary address.
city String Patient's city correlating to address1
state String Patient's state correlating to address1
zipcode String Patient's zipcode correlating to address1
custom1 - custom9 String Setup by client within CorEMR.

Get /ws/patients/{external_id}/ bookings/ Return Fields

Return Field Datatype Note
facility String String representation of patient facility. Note that this is different from the post facilty field, which requires the integer ID representation of the facility.
number String Booking number.
date String Booking's creation date as a string, formatted as YYYY-MM-DD 00:00:00.000
active Integer Boolean stating whether the booking is currently active or not. 0 for false, 1 for true
release String Booking's end date as a string, formatted as YYYY-MM-DD 00:00:00.000
temporary Integer Boolean stating whether the booking is temporary or not. 0 for false, 1 for true

Patient Post Fields

Field Datatype Required for Post Notes
external_id String Y Unique Patient Request identifier.
facility Integer Y Location where patient is to be admitted.
agency Integer Y Jail Agency
billing_agency Integer Y Agency used for billing when sent to pharmacy.
fname String Y Patient first name
lname String Y Patient last name
sex String Y Patient sex assigned at birth, 'M' or 'F'
dob DateTime Y Patient date of birth. Formatted in ISO8601 format.
booking_no String Y Patient booking number
booking_date DateTime Y Patient booking date. Formatted in ISO8601 format.
aka String Patient nickname
mname String Patient middle name
work_status String Patient work status
language String Patient primary language
race String
address String Patient primary residence
photo_link Filepath Filepath to patient photo
eye_color String
hair_color String
body_build String
skin_tone String
citizenship String
military_branch String
education_level String
religion String
infirmary Boolean Flag indicating whether patient is in the infirmary, 1 for yes, 0 for no.
inf_level Integer Level of patient when in the infirmary
searchable Boolean Flag indicating whether patient is searchable, 1 for yes, 0 for no.
height Integer Height of patient in inches
weight Integer Weight of patient in pounds
bmi Integer Body Mass Index of patient
phone Integer Primary phone of patient. Can include dashes if desired.
ethnicity String Hispanic or Non-Hispanic
address2 String Secondary street address for patient
city String City of primary patient residence
state String State of primary patient residence
zipcode String Zipcode of primary patient residence
birth_country String Patient country of birth
mother_fname String Patient's Mother's first name
mother_mname String Patient's Mother's middle name
mother_lname String Patient's Mother's last name
mother_maiden String Patient's Mother's maiden name
current_location String Patient's current location
assigned_location String Patient's assigned location. Note that a separator value must be used and be unique and consistant throughout requests.

Patient Booking Post Fields

Field Datatype Required for Post Notes
booking_no String Y Unique patient booking identifier.
date DateTime Y Patient booking date. Formatted in ISO8601 format.
active Boolean Y Flag indicating whether the booking is currently active, 1 for yes, 0 for no.
facility String Y Facility the booking is set for.
temporary Boolean Y Flag indicating whether the booking is temporary, 1 for yes, 0 for no.
facility_created String Y Facility the booking was created in.
facility_completed String Facility the booking was completed in.
release DateTime Patient booking release date. Formatted in ISO8601 format.

Photos

This webservice allows adding a new image to use on the patient's chart as their photo.

Photos Endpoints

ActionREST VerbDescription
AddPOST
/ws/patients/{external_id}/photos/
Adds a new photo to use for the patient's current photo. Old photos are not retained.

Post Fields

Field Datatype Add Read Notes
blob String Y* Base64-encoded image in JPEG, PNG, or GIF format.