Patients

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

ActionREST VerbDescription
ReadGET
/ws/patients/
Gets list of active patients.
Setting include_released will also include patients released in the last 4 hours.
AddPOST
/ws/patients/
Creates a new patient.
ReadGET
/ws/patients/{external_id}
Gets an existing patient.
UpdatePUT
/ws/patients/{external_id}
Updates an existing patient.

Fields

FieldDatatypeAddReadNotes
external_idString(17)YUnique patient identifier. 1 character minimum.
facilityString(32)Y
agencyString(255)
agency_idString(50)
fnameString(255)Y
mnameString(255)
lnameString(255)Y
dobDateY
sexString(7)Y"Male", "Female", or "Unknown".
booking_numberString(32)YIgnored when updating.
booking_dateDatetimeYIgnored when updating.
allergiesStringWhen adding a patient and this field is omitted, the system's default allergy setting will be used.
ssnString(11)
raceString(255)"American Indian or Alaskan Native", "Asian", "Black or African American", "Native Hawaiian or Other Pacific Islander", or "White".
ethnicityString(255)"Hispanic", or "Non-Hispanic".
heightIntegerMeasured in inches.
weightFloatMeasured in US pounds.
eye_colorString(64)
hair_colorString(64)
address1String(128)
address2String(128)
cityString(32)
stateString(16)
zipcodeString(16)
location_blockString.
location_podString
location_cellString
location_bedString
custom_1StringAvailable in version 5.5.5+.
custom_2StringAvailable in version 5.5.5+.
custom_3StringAvailable in version 5.5.5+.
custom_4StringAvailable in version 5.5.5+.
custom_5StringAvailable in version 5.5.5+.
custom_6StringAvailable in version 5.5.5+.
custom_7StringAvailable in version 5.5.5+.
custom_8StringAvailable in version 5.5.5+.
custom_9StringAvailable in version 5.5.5+.

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

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.

Fields

Only a single field may be sent with the request.

FieldDatatypeAddReadNotes
urlStringY*JPEG format only.
blobStringY*Base64-encoded image in JPEG, PNG, or GIF format.

Bookings

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

Actions

ActionREST VerbDescription
ReadGET
/ws/patients/{external_id}/bookings/
Gets list of existing bookings on existing patient. Filters can be applied, as listed below.
AddPOST
/ws/patients/{external_id}/bookings/
Creates a new booking for an existing patient.
ReadGET
/ws/patients/{external_id}/bookings/{number}
Gets an existing booking on existing patient.
UpdatePUT
/ws/patients/{external_id}/bookings/{number}
Updates an existing booking.

Fields

FieldDatatypeAddReadNotes
facilityString(32)If omitted, defaults to the patient's current facility. Ignored when updating.
numberString(32)Y
dateDatetimeY
activeBoolIndicates this is the current booking. If omitted, defaults to true. Ignored when updating.
releaseDatetime
temporaryBoolIndicates 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.