Skip to content

Patients (v1)

Minimum CorEMR Version: 5.3

This web service allows clients to manage patient demographics and bookings inside the CorEMR system. It can be used as a retrieval system or a full-fledged booking system integration.

Facility Codes

Patients and bookings all have facility codes associated with where the record exists. These facilities and codes are previously setup and will need to be communicated.

Actions

Action REST Verb Route Description
Read GET /ws/patients/ Gets list of active patients.Setting include_released will also include patients released in the last 4 hours.
Add POST /ws/patients/ Creates a new patient.
Read GET /ws/patients/{external_id} Gets an existing patient.
Update PUT /ws/patients/{external_id} Updates an existing patient.

Fields

Field Datatype Add Read Notes
external_id String(17) R Unique patient identifier. 1 character minimum.
facility String(32) R
agency String(255)
agency_id String(50)
fname String(255) R
mname String(255)
lname String(255) R
dob Date R
sex String(7) R "Male", "Female", or "Unknown".
booking_number String(32) R Ignored when updating.
booking_date Datetime R Ignored when updating.
allergies String When adding a patient and this field is omitted, the system's default allergy setting will be used.
ssn String(11)
race String(255) "American Indian or Alaskan Native", "Asian", "Black or African American", "Native Hawaiian or Other Pacific Islander", or "White".
ethnicity String(255) "Hispanic", or "Non-Hispanic".
height Integer Measured in inches.
weight Float Measured in US pounds.
eye_color String(64)
hair_color String(64)
address1 String(128)
address2 String(128)
city String(32)
state String(16)
zipcode String(16)
location_block String
location_pod String
location_cell String
location_bed String
custom1 String Available in version 5.5.5+.
custom2 String Available in version 5.5.5+.
custom3 String Available in version 5.5.5+.
custom4 String Available in version 5.5.5+.
custom5 String Available in version 5.5.5+.
custom6 String Available in version 5.5.5+.
custom7 String Available in version 5.5.5+.
custom8 String Available in version 5.5.5+.
custom9 String Available in version 5.5.5+.

Note

Please also note that however many location fields are sent will be used to generate the patient's full location.

Photos

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

Actions

Action REST Verb Route Description
Add POST /ws/patients/{external_id}/photos/ Adds a new photo to use for the patient's current photo. Old photos are not retained.

Fields

Only a single field may be sent with the request.

Field Datatype Add Read Notes
url String R JPEG format only.
blob String R Base64-encoded image in JPEG, PNG, or GIF format.

Bookings

Individual bookings can be manipulated on patients already existing in the system.

Actions

Action REST Verb Route Description
Read GET /ws/patients/{external_id}/bookings/ Gets list of existing bookings on existing patient. Filters can be applied, as listed below.
Add POST /ws/patients/{external_id}/bookings/ Creates a new booking for an existing patient.
Read GET /ws/patients/{external_id}/bookings/{number} Gets an existing booking on existing patient.
Update PUT /ws/patients/{external_id}/bookings/{number} Updates an existing booking.

Fields

Field Datatype Add Read Notes
facility String(32) If omitted, defaults to the patient's current facility. Ignored when updating.
number String(32) R
date Datetime R
active Bool Indicates this is the current booking. If omitted, defaults to true. Ignored when updating.
release Datetime
temporary Bool Indicates that the number is temporary and will be replaced later. If omitted, defaults to false.

Releases

Including a release datetime on a patient's current booking will trigger the system to release the patient from CorEMR.

Temporary Numbers

Sending true in the temporary field indicates a new booking has a temporary number. The system will expect to receive a new booking in the future that is permanent.