Event-based INI Integration

CorEMR provides a standardized event-based integration using INI files that maps to common events occurring inside facilities. An event-based integration can be beneficial if the existing patient system is also event-driven.

INI File Format

The INI File format is a text file of name-value pairs. The order of the fields in the file is not specific. Each line should contain one field(no spaces), the name of the field is first, followed by an equals sign (=) character, then a value in double quotes. Spaces outside the value should not be used. Fields are case sensitive in CorEMR. Use the exact upper and lower case designations described in this document for field names.

Field="Value"

For additional questions regarding the General INI spec, please refer to: http://en.wikipedia.org/wiki/INI_file

Preloading

When preloading demographic and booking data for a new facility, using this spec will require one of the following:

  • Sending a DEM file for each individual patient.
  • Running the "Patient Import" tool detailed in the Patient Import section.

Demographics (DEM) Event

DEM files represent demographic and booking data for the patient chart, both adding new patients or updating existing patients.

For simple location updates, the Location Event (documented below) is preferred.

DEM SAMPLE FILE DATA (DEM12345678_0400.ini)

DataType="PatientDemographics"
PatientID="P00012345"
Facility="VCSO"
LastName="DOE"
FirstName="JOHN"
MI="D"
BirthDate="07/22/1946"
SSN="333-22-4444"
Sex="Male"
Race="White"
Housing="ISU"
Bed="RLSE"
Booking="12345678"
BookingDate="2017-06-20 14:32:04"
ReleaseDate="2017-06-28 18:55:39"
Agency="ICE"
PhotoPath="http://facility.co.us/photos/JA/P00012345.jpg"
Height="72"
Weight="140"
FieldDatatypeRequiredNotes
DataTypeString(19)YMust be set to "PatientDemographics" for DEM events.
PatientIDString(17)YPatient’s unique number used to track the individual across all bookings.
FacilityString(32)YDetermines CorEMR facility patient belongs in. Unused in single-facility installations.
LastNameString(255)Y
FirstNameString(255)Y
MIString(255)Can store more than just an initial; field name is "MI" for compatibility reasons.
BirthDateDateY
SSNString(11)SSNs only benefit detecting merge candidates and is not recommended to be transmitted.
SexString(7)Y"Male", "M", "Female", "F", "T"
RaceString(255)"American Indian or Alaskan Native", "Asian", "Black or African American", "Native Hawaiian or Other Pacific Islander", or "White".
HousingString
BedString
BookingString(32)Y
BookingDateDatetimeY
ReleaseDateDatetime
AgencyStringBilling Agency: String passed to pharmacy for billing purposes. Example: ICE, USM, County, etc.
PhotoPathString
HeightIntegerMeasured in inches.
WeightIntegerMeasured in US pounds.

Location (LOC) Event

LOC files update patient location with a minimal amount of required data.

LOC SAMPLE FILE DATA (LOC12345678_0400.ini)

DataType="PatientLocation"
PatientID="P00012345"
Facility="VCSO"
Housing="B1"
Bed="15"
Agency="ICE"
FieldDatatypeRequiredNotes
DataTypeString(14)YMust be set to "PatientLocation" for LOC events.
PatientIDString(17)YPatient’s unique number used to track the individual across all bookings.
FacilityString(32)Y
HousingString
BedString
AgencyString

Merge (MRG) Event

MRG events merge an incorrect/old PatientID with a correct/new one.

As with CorEMR itself, a merge is not reversible. Only send this event if 100% positive the charts should be merged.

MRG SAMPLE FILE DATA (MRG12345678_0400.ini)

DataType="PatientMerge"
BadPatientID="T11112345"
CorrectPatientID="P00012345"
FieldDatatypeRequiredNotes
DataTypeString(12)YMust be set to "PatientMerge" for MRG events.
BadPatientIDString(17)Y
CorrectPatientIDString(17)Y

Archiving by CorEMR

CorEMR attempts to archive all OMS/JMS messages sent. They are stored locally on the CorEMR application server, not accessible through the web interface. These archives may help to troubleshoot issues with the integration. Archives can be re-processed or as appropriate, we can work with OMS/JMS technicians or County IT (who manage creation and transmission of files) to generate full patient data dumps for corrective batch processing.