The HL7 Clinical Data Interface runs as a Windows service, and communicates with the system database via the AIMS system web service, over HTTPS. It polls the database for updated records, and sends out the appropriate HL7 messages for any data since the previous polling interval (generally set at 1 minute).
Any open transactions will be found in the 'Outbound Clinical Data Polling' table. There may be multiple transactions per case (per patient). The Outbound interface service will poll the database for any open transactions (which it has not yet processed).
HL7 Definitions
The Merge Healthcare AIMS system currently supports these segments for HL7 ORU messages:
1. MSH Message Header All
2. PID Patient Identification All
Within each supported segment, the Merge Healthcare AIMS system can process and export these elements:
4. OBR Observation Request Information NPO Status
Medical history conditions Family anesthesia history Surgical history
PreOp vital signs
PostOp (PACU) vital signs Timed events
Fluid outputs & balance Anesthesia type & ASA 5. OBX Observation
6. AL1 or IAM
Patient Allergy and Adverse Reaction information
Allergies
6. DG1 Diagnosis ICD-9 coding
7. PR1 Procedures Surgical procedures &
times CPT coding
8. ORC Common Order Medications delivered
Infusions delivered 9. RXE and
RXR
Pharmacy Encoded Order Pharmacy Route
Medications delivered Infusions delivered 10. RXC Pharmacy Component Order Infusions delivered (base
solution and additives)
11. NTE Notes and Comments Various
Table 2-9: MSH Definition
Segment Field Subfield HL7 Definition Comment
MSH 1 Field Separator |
MSH 2 Encoding Characters Literal "^~\&" MSH 3 Sending Application Literal "MERGEAIMS"
MSH 4 Sending Facility Sending facility for multi-
facility customers, or "Default" for single-facility customers
MSH 5 Receiving Application "CLINICALHIS" or other literal value
MSH 9 1 Message Type Configured literal (such as "ORU"), or for Allergies "ADT"
MSH 9 2 Trigger Event Configured literal (such as
"R01") or for Allergies: "A08" or "A60"
MSH 10 Message Control ID [msg_control_id]
MSH 11 Processing ID Literal "P"
MSH 12 HL7 Version Literal "2.4"
MSH 15 Accept Ack Type Literal "AL"
MSH 16 Application Ack Type Literal "NE"
MSH 17 Country Code Literal "USA"
Table 2-10: PID Definition
Segment Field Subfield HL7 Definition Comment
PID 3 1 Patient MRN Account Number CX:5 =
"AN"
MRN CX:5 = "MR" Case number CX:5 = "CASE"
SS# CX:5 = "SS" Note: Can also be configured similar to Charge Interface
PID 5 1 Patient Last Name [patient_last_name]
PID 5 2 Patient First Name [patient_first_name]
PID 5 3 Patient Middle Name [patient_middle_name]
PID 7 Patient Date of Birth [patient_DOB]
PID 8 Patient Sex [patient_sex]
PID 18 1 Patient Account Number [patient_account_number] PID 19 Patient Social Sec Number [patient_SS]
Table 2-9: MSH Definition (Continued)
Table 2-11: PV1 Definition
Segment Field Subfield HL7 Definition Comment
PV1 2 Patient Class [patient_class]
PV1 19 1 Patient Visit Number [visit_number]
Table 2-12: OBR Definition (optionally included in any messages using OBX segments)
Segment Field Subfield HL7 Definition Comment
OBR 3 Observation Identifier [filler_appt_id]
OBR 4 1 Universal Service ID Literal "5000.8" or other configured value
OBR 4 2 Universal Service Text Literal "ANESTHESIA" or other configured value OBR 4 3 Name of Coding System Literal "AS4" or other
configured value
Table 2-13: OBX Definition (message structure defined here. See table below for values specific to each type of data)
Segment Field Subfield HL7 Definition Comment
OBX 1 Set ID [setid]
OBX 2 Value Type [value_type]
OBX 3 1 Observation Identifier/ID [observation_ID] OBX 3 2 Observation Identifier/Text [observation_text]
OBX 3 3 Observation Coding
System
[observation_name_of_codi ng_system]
OBX 4 Observation Sub-ID [observation_sub_id]
OBX 5 Observation Value [value]
OBX 6 Units [value_units]
OBX 7 Reference Range [references_range]
OBX 8 Abnormal Flags [abnormal_flags]
OBX 11 Observation Result Status [observation_result_status]
OBX 14 Observation Date-Time [observation_date_time]
OBX 15 1 Producer's ID Identifier [source_id]
OBX 15 3 Producer's ID Coding
System
[source]
OBX 16 Responsible Observer XCN structure as defined
below
The following tables show how the OBX segments may be populated with the data applicable to each message type.
Table 2-14: NTE Definition (comments)
Segment Field Subfield HL7 Definition Comment
NTE 1 Set ID [setid]
NTE 3 Comment [comment]
Table 2-15: XCN Definition (staff identifier data structure)
Sequence HL7 Definition Comment
1 ID number Interface ID
2 Family name Last name
3 Given name First name
4 Second and further given names or initials
Middle name 5 Suffix (e.g., JR or III) Suffix
6 Prefix (e.g., DR) Prefix
7 Degree (e.g., MD) Credentials
Table 2-16: NPO Status - a set of 2 OBX segments; the first is always included, and the second is included only if the date-time is documented.
Field Content
[setid] 1 for Since Midnight checkbox
2 for NPO date-time
[value_type] Set ID 1: CE
Set ID 2: TS
[observation_ID] Set ID 1: NPOSINCEMIDNIGHT or other mapped value
Set ID 2: NPO or other mapped value [observation_text] Set ID 1: NPO since midnight (checkbox)
Set ID 2: NPO since the specified time [observation_name_of_coding_system] Literal "MergeAIMS"
[abnormal_flags] <null> [observation_result_status] Literal "F"
[observation_date_time] Set ID 1: Last Saved date-time Set ID 2: Patient's NPO date-time
[source_id] <null>
[source] <null>
[responsible_observer] <null>
NTE comment segment Included following each/both segments, when comment is present
Table 2-17: Medical history conditions - zero to many OBX segments, one per each condition in the PAE. Note that deleted (= inactive) are also included.
Field Content
[setid] Incremented counter
[value_type] CE
[observation_ID] Condition mapped identifier; will be <null> is not mapped
[observation_text] Print Description
[observation_name_of_coding_system] Literal "MergeAIMS" [observation_sub_id] <null>
[value] "True" if active
"False" if inactive or deleted
[value_units] <null>
[references_range] <null>
[abnormal_flags] <null>
[observation_result_status] "F" if active
"D" if inactive or deleted [observation_date_time] Last Updated date-time
[source_id] <null>
[source] <null>
Table 2-16: NPO Status - a set of 2 OBX segments; the first is always included, and the second is included only if the date-time is documented. (Continued)
[responsible_observer] XCN structure of saved-by staff, or Username if staff not available (eg, data received from external system)
NTE comment segment Included when a comment is present Table 2-18: Family anesthesia history - one OBX segment
Field Content
[setid] 1
[value_type] CE
[observation_ID] Mapped identifier
[observation_text] One of four possible values: "PROBLEMS", "NO PROBLEMS", "NO HISTORY", or "UNKNOWN"
[observation_name_of_coding_system] Literal "MergeAIMS" [observation_sub_id] <null>
[value] One of four possible values: "PROBLEMS", "NO PROBLEMS", "NO HISTORY", or "UNKNOWN"
[value_units] <null>
[references_range] <null>
[abnormal_flags] <null>
[observation_result_status] "F" Final
[observation_date_time] Last Updated date-time
[source_id] <null>
[source] <null>
[responsible_observer] XCN structure of saved-by staff, or Username if staff not available (eg, data received from external system)
NTE comment segment Included when a comment is present
Table 2-17: Medical history conditions - zero to many OBX segments, one per each condition in the PAE. Note that deleted (= inactive) are also included.
[observation_ID] Mapped identifier for Surgical History [observation_text] Description of surgery
[observation_name_of_coding_system] Literal "MergeAIMS" [observation_sub_id] <null>
[value] Description of surgery
[value_units] <null>
[references_range] Mapped identifier for anesthesia type, or SWKey if no mapping present.
[abnormal_flags] T or F from the "Perioperative complications?" checkbox
[observation_result_status] "F" Final
[observation_date_time] Date of surgery. If documented as year-only, will be sent as January 1st ("2002" =
"20020101000000").
[source_id] <null> unless result was received from external system
[source] <null> unless result was received from external system
[responsible_observer] XCN structure of saved-by staff, or Username if staff not available (eg, data received from external system)
NTE comment segment Included when a comment is present Table 2-20: PreOp and PostOp (PACU) vital signs - a collection of OBX segments, one per measurement
Field Content
[setid] Incremented counter
[value_type] NM Numeric value except for:
BLOODPRESSURE = TX TEMPERATUREMODE = TX PATIENTONROOMAIR = CE PATIENTONOXYGEN = CE
[observation_ID] Mapped ID such as PREOP_VITALS or
POSTOP_VITALS
[observation_text] "PreOp Vital Signs" or "PACU Vital Signs" Table 2-19: Surgical history - zero to many OBX segments, one per surgical history row
[observation_name_of_coding_system] Literal "MergeAIMS"
[observation_sub_id] HEIGHT
WEIGHT
HEIGHT and WEIGHT are literal (not mapped). All others are "Mapped IDs corresponding to the following:" SYSTOLIC DIASTOLIC BLOODPRESSURE TEMPERATURE TEMPERATUREMODE PULSERATE RESPIRATIONRATE SPO2 PATIENTONROOMAIR PATIENTONOXYGEN OXYGENSETTING
[value] Numeric value except for:
BLOODPRESSURE = Systolic/Diastolic as a combined field "120/80"
TEMPERATUREMODE = string value "Oral" PATIENTONROOMAIR = True or False PATIENTONOXYGEN = True or False Table 2-20: PreOp and PostOp (PACU) vital signs - a collection of OBX segments, one per measurement (Continued)
[value_units] Configurable for HEIGHT Configurable for WEIGHT mmHg for SYSTOLIC mmHg for DIASTOLIC
mmHg for BLOODPRESSURE Configurable for TEMPERATURE <null> for TEMPERATUREMODE BPM for PULSERATE
BPM for RESPIRATIONRATE % for SPO2
<null> for PATIENTONROOMAIR <null> for PATIENTONOXYGEN % or L/min for OXYGENSETTING
[references_range] <null>
[abnormal_flags] <null>
[observation_result_status] "F" (Final)
[observation_date_time] Date time of the collection of vitals (single value shared for all measurements)
[source_id] <null>
[source] <null>
[responsible_observer] <null>
NTE comment segment Included when a comment is present (single NTE after the collection of OBXs)
Table 2-21: Timed events - zero to many OBX segments, one per event
Field Content
[setid] Incremented counter
[value_type] TS
[observation_ID] Mapped identifier; <null> if not mapped
[observation_text] Display name of event
[observation_name_of_coding_system] Literal "MergeAIMS" [observation_sub_id] <null>
Table 2-20: PreOp and PostOp (PACU) vital signs - a collection of OBX segments, one per measurement (Continued)
[value] Date-time of event
[value_units] <null>
[references_range] <null>
[abnormal_flags] <null>
[observation_result_status] "F" (Final)
[observation_date_time] Date-time of event
[source_id] <null>
[source] <null>
[responsible_observer] <null>
Table 2-22: Fluid outputs & balance - one to many OBX segments, one per output plus one for fluid balance
Field Content
[setid] Incremented counter
[value_type] NM
[observation_ID] SWKey of output fluid
NETBALANCE for fluid balance [observation_text] Display name of output fluid
"Net perioperative fluid balance" [observation_name_of_coding_system] Literal "MergeAIMS"
[observation_sub_id] <null>
[value] Numeric balance (sum of input infusions and
fluids, minus sum of output fluids; can be negative)
[value_units] "mL"
[references_range] <null>
[abnormal_flags] <null>
[observation_result_status] "F" (Final)
Table 2-21: Timed events - zero to many OBX segments, one per event
The patient's medication profile of Home and Current medications (documented in PAE; this is not the anesthesia-delivered medications) is sent in RDE^O11 messages. The MSH, PID, and Table 2-23: Anesthesia type & ASA - one to many OBX segments, one for ASA class plus one for each anesthesia type documented.
Field Content
[setid] Incremented counter
[value_type] CE
[observation_ID] ASA
ATYP for primary anesthesia type AATYP for additional types [observation_text] "ASA Class"
"Anesthesia Type (Primary)" "Additional Anesthesia Type" [observation_name_of_coding_system] Literal "MergeAIMS"
[observation_sub_id] <null> for ASA
Mapped identifier for anesthesia type, or SWKey if no mapping present.
[value] ASA Physical Status description, typically
roman numeral I through V or IE through VE where E indicates an emergency surgery CE structure with mapped identifier, anesthesia type display name, and "MergeAIMS" [value_units] <null> [references_range] <null> [abnormal_flags] <null> [observation_result_status] "F" (Final) [observation_date_time] <null> [source_id] <null> [source] <null> [responsible_observer] <null>
PV1 segments are described above. Each medication is sent in a separate message, with a single ORC, RXE, and RXR segment.
Table 2-24: Definition for Home/Current Medications
Segment Field Subfield HL7 Definition Comment
ORC 2 1 Placer Order Number Row ID from database
(GUID)
ORC 5 1 Order Status "IP" (In Process)
ORC 9 1 Date/Time of Transaction Documentation date-time
ORC 10 1 Entered By XCN structure of saved-by
staff, or Username if staff not available (eg, data received from external system)
ORC 21 1 Ordering Facility Name "DOCUSYS" if entered by Anesthesia; other value if data received from external system
ORC 21 3 Ordering Facility ID Numeric ID if entered by Anesthesia; other value if data received from external system
Table 2-25: RXE Definition for Home/Current Medications
Segment Field Subfield HL7 Definition Comment
RXE 1 1-2 Quantity/Timing Frequency (split at first
space " " character) RXE 2 1 Give Code - Identifier Identifier (varies based on
installed Drug Information Framework)
FDB = Drug Name ID Multum = D Number Micromedex = Generic Formulation Code
RXE 2 2 Give Code - Description Name of medication
RXE 2 3 Give Code - Identifier Type Varies based on installed Drug Information
RXE 2 4 Give Code - Alternate Identifier
Identifier (varies based on installed Drug Information Framework)
FDB = Dispensable Drug ID Multum = Synonym ID Micromedex = <null> but may include the NDC if data received from external system
RXE 2 6 Give Code - Alternate
Identifier Type
Varies based on installed Drug Information
Framework: FDB = "MEDID" Multum = "SYN" Micromedex = "NDC"
RXE 3 1 Give Amount Dose field (up to first space
" " character)
Note: Not guaranteed numeric.
RXE 5 1 Give Units Dose field (after first space
" " character)
RXE 7 1 Administration Instructions Comment
RXE 18 1 Date-Time of most recent
refill or dose
Last Taken
Note: This comes from a text field, so it generally won't be a well-formatted date and may be null. Table 2-26: RXR Definition for Home/Current Medications
Segment Field Subfield HL7 Definition Comment
RXR 1 2 Route - text Route
Table 2-25: RXE Definition for Home/Current Medications (Continued)
The patient's medication profile of anesthesia-delivered medications is sent in an ORM^O01 message. The MSH, PID, and PV1 segments are described above. Each delivery is sent in an ORC, RXE, and RXR segment group. Multiple deliveries are included in a single message. Table 2-27: ORC Definition for Delivered Medications
Segment Field Subfield HL7 Definition Comment
ORC 2 1 Placer Order Number Row ID from database
(GUID)
ORC 5 1 Order Status "CM" = completed
ORC 7 1 Quantity/Timing "1" = a single delivery ORC 9 1 Date/Time of Transaction Date-time of delivery
ORC 12 Ordering Provider XCN structure of staff
ORC 21 1 Ordering Facility Name Source system =
"MergeAIMS"
ORC 21 3 Ordering Facility ID Source ID = Row ID from
database (GUID) Table 2-28: RXE Definition for Delivered Medications
Segment Field Subfield HL7 Definition Comment
RXE 2 1 Give Code - Identifier Charge Code as configured in AIMS Formulary
RXE 2 2 Give Code - Description Primary display name of medication
RXE 2 3 Give Code - Identifier Type "CHARGECODE"
RXE 2 4 Give Code - Alternate
Identifier
Identifier (varies based on installed Drug Information Framework) FDB = Routed Medication ID Multum = Synonym ID Micromedex = Generic Formulation Code
RXE 2 5 Give Code - Alternate Text Mapped Drug Name from Drug Information
Framework, as configured in AIMS Formulary
RXE 2 6 Give Code - Alternate Identifier Type
Varies based on installed Drug Information
Framework: FDB = "RMID" Multum = "SYN" Micromedex = "GFC"
RXE 3 1 Give Amount Delivery amount
Note: Will be 0 for "By Each" medications.
RXE 5 1 Give Units Delivery units; typically a
drug weight unit such as "mg"
RXE 7 1 Administration Instructions <null>
RXE 18 1 Date-Time of most recent
refill or dose
<null>
RXE 23 1 Give Rate Amount <null>
RXE 24 1 Give Rate Units <null>
RXE 25 1 Give Strength Alternate delivery amount.
If a "By Each" type of medication, this is the quantity; otherwise this is the delivery volume. RXE 26 1 Give Strength Units Alternate units; "Each" or
"mL"
RXE 31 1 Supplementary Code - ID NDC number, as configured in AIMS Formulary
RXE 31 2 Supplementary Code - Text NDC Description as configured in AIMS Formulary
RXE 31 3 Supplementary Code -
Identifier type
"NDC"
RXE 31 4 Supplementary Code -
Alternate ID
Billing NDC, as configured in AIMS Formulary
RXE 31 5 Supplementary Code -
Alternate Text
NDC Description as configured in AIMS Formulary
RXE 31 6 Supplementary Code -
Alternate Identifier type
"BILLINGNDC" Table 2-28: RXE Definition for Delivered Medications (Continued)
The patient's medication profile of anesthesia-delivered infusions (plain fluids and drug infusions) is sent in an ORM^O01 message. The MSH, PID, and PV1 segments are described above. Each delivery is sent in an ORC, RXE, RXC (if additives present), and RXR segment group. Multiple deliveries are included in a single Message. For infusions documented by rate, each change of rate is treated as a separate delivery.
Table 2-29: RXR Definition for Delivered Medications
Segment Field Subfield HL7 Definition Comment
RXR 1 1 Route - ID Route of delivery SWKey
RXR 1 2 Route - text Route of delivery name
Table 2-30: ORC Definition for Delivered Infusions
Segment Field Subfield HL7 Definition Comment
ORC 2 1 Placer Order Number Row ID from database
(GUID)
ORC 5 1 Order Status "CM" = completed
ORC 7 All Quantity/Timing TQ structure, defined below
ORC 9 1 Date/Time of Transaction Date-time of delivery, or end time if rate-based.
ORC 12 Ordering Provider XCN structure of staff
ORC 21 1 Ordering Facility Name Source system =
"MergeAIMS"
ORC 21 3 Ordering Facility ID Source ID = Row ID from
database (GUID) Table 2-31: RXE Definition for Delivered Infusions
Segment Field Subfield HL7 Definition Comment
RXE 2 1-6 Give Code If the infusion is a plain
fluid, then RXE-2 (subfields 1-6) is similar to medication delivery, above.
If the infusion includes drug additives, then RXE-2 is <null> and the RXC segment contains the detailed infusion definition.
RXE 18 1 Date-Time of most recent refill or dose
<null>
RXE 23 1 Give Rate Amount <null> if documented as a volume;
Rate value if documented as a rate
RXE 24 1 Give Rate Units <null> if documented as a volume;
"mL/hr" if documented as a rate
RXE 25 1 Give Strength <null>
RXE 26 1 Give Strength Units <null>
RXE 31 1 Supplementary Code - ID NDC number, as configured in AIMS Formulary (for infusion, not additive) RXE 31 2 Supplementary Code - Text NDC Description as
configured in AIMS Formulary
RXE 31 3 Supplementary Code -
Identifier type
"NDC"
RXE 31 4 Supplementary Code -
Alternate ID
Billing NDC, as configured in AIMS Formulary
RXE 31 5 Supplementary Code -
Alternate Text
NDC Description as configured in AIMS Formulary
RXE 31 6 Supplementary Code -
Alternate Identifier type
"BILLINGNDC"
Table 2-32: RXC Definition for Delivered Infusions - repeated for base solution and additive(s)
Segment Field Subfield HL7 Definition Comment
RXC 1 1 Rx Component Type "B" for base solution; "A" for additive(s)
RXC 2 1-6 Component Code Component (base solution
or additive) identifiers, similar to RXE-2 for medication deliveries Table 2-31: RXE Definition for Delivered Infusions (Continued)
RXC 3 1 Component Amount Infusion initial volume for base solution (bag volume); Additive initial amount (amount of additive in bag) RXC 4 1 Component Units Volume units, "mL" for base
solution
Additive units, typically a drug weight unit such as "mg"
RXC 5 1 Component Strength <null> for base solution; Original concentration of additive (before it was diluted into infusion) RXC 6 1 Component Strength Units <null> for base solution;
Original concentration units for additive
RXC 7 1 Supplementary Code NDC information for
component (base solution or additive), similar to RXE- 31
Table 2-33: RXR Definition for Delivered Infusions
Segment Field Subfield HL7 Definition Comment
RXR 1 1 Route - ID Route of delivery SWKey
RXR 1 2 Route - text Route of delivery name
Table 2-32: RXC Definition for Delivered Infusions - repeated for base solution and additive(s)
Segment Field Subfield HL7 Definition Comment
Table 2-34: TQ Definition (Timing/Quantity data structure for infusions)
Sequence HL7 Definition Comment
1 Quantity "1" one delivery
2 Interval <null> if documented as a volume "C" if documented as a rate 3 Duration <null> if documented as a volume
Diagnosis codes can be documented in the PAE and also in AIMS Anesthesia. Procedure coding can only be documented in AIMS Anesthesia. Coding data are sent when the PAE is signed and when the Anesthesia record is signed. Coding data consists of 1) zero to many DG1 diagnosis segments, 2) zero to many PR1 surgical procedure segments, and 3) zero to many PR1 procedure coding segments, which include both surgeon-performed and
personally-performed procedures.
4 Start date-time <null> if documented as a volume Rate start time if documented as a rate 5 End date-time Delivery time if documented as a volume
Rate end time if documented as a rate Table 2-34: TQ Definition (Timing/Quantity data structure for infusions)
Sequence HL7 Definition Comment
Table 2-35: DG1 Definition for Diagnosis Code(s)
Segment Field Subfield HL7 Definition Comment
DG1 1 Set ID Incremented counter
DG1 3 1 Diagnosis Code/ Identifier Diagnosis code (number)
DG1 3 2 Diagnosis Code/ Text Diagnosis description
DG1 3 3 Diagnosis Code/ Identifier
Type
"I9" = ICD-9
DG1 5 Diagnosis Date/Time PAE: when the PAE was
signed
AIMS Anesthesia: when the code was documented
DG1 6 Diagnosis Type "W" = Working
DG1 15 Diagnosis Priority "0" = not ranked
DG1 16 Diagnosing Clinician XCN structure of staff who
signed the anesthesia record; if record not yet signed (PAE signing trigger event) then this will be the PAE signer.
DG1 17 Diagnosis Classification "D" = Diagnosis
DG1 19 Attestation Date/Time PAE: when the PAE was
signed
AIMS Anesthesia: when the record was signed
Note: Associated with DG1-16. Either the anesthesia record signer/ signed time, or if that's not