Introduction to HL7 V2.5
                                Standard




Tuesday, June 09, 2009                    Bhaski - T...
    Interoperability : Ability of two or systems or
     components to exchange information and use
     the information ...
    Computers work by matching
    Cannot handle the unexpected
    Easier to send than to receive
    Testing, Testin...
    Reduce Cost
    Reduce Risk
    Competition (avoidance of lock-in)
    Change control (real costs of upgrades)
  ...
    OSI Level 7
    Organization
    Standards
    HL7 is a Language (s)
    • Syntax (Grammar)
    • Semantics (Wor...
    Layer 7 - Application - network processes for
     application
    Layer 6 - Presentation - Data Representation
   ...
Tuesday, June 09, 2009   7
Tuesday, June 09, 2009   8
    1988 - present (backwards compatible)
    Very widely used in hospitals
    Position-dependent syntax
    EVN||200...
    Message
    Segment
    Field
    Data Type (may repeat)
    Component
    SubComponent



Tuesday, June 09, 200...
   MESSAGE SYNTAX
   SEG –1..1
   [ SEG ] – 0..1
   { SEG } – 1..*
   { [ SEG ] } – 0..*




Tuesday, June 09, 2009  ...
  DELIMITERS
• Defined at start of MSH segment
• Segment terminator is carriage return (hex 0D)
| (vertical bar): field s...
1. Introduction          11. Patient Referral
2. Control              12. Patient Care
3. ADT                   13. Labora...
     Data Definition Tables
     Lower Layer Protocols
     Network Management
     BNF Message Descriptions
     Glo...
    HL7 V2.4, V2.5, V2.5.1(Lab test results),
     V2.6, V2.7(Device communication)




Tuesday, June 09, 2009           ...
Chapter 2 of the HL7 V2.x Standard



Tuesday, June 09, 2009                                        16
 Defines the generic rules that apply to all
  messages
 The Key: How to read the rest of the
  specification
 HL7 Enco...
    Expects ISO OSI Level 7. If not, lower level
     protocols are available:
      Ad hoc w/o basic transport (RS-232)...
Tuesday, June 09, 2009   19
Tuesday, June 09, 2009   20
    A real world event that necessitates an
     exchange of information.




Tuesday, June 09, 2009                     ...
    An atomic unit of data transferred between
     systems.
    A Message Type defines its domain.
    A Trigger Event...
    A 3-character code contained within each
     message that identifies its type or domain.




Tuesday, June 09, 2009 ...
 One message type can have many different
  trigger event codes.
 A trigger event code may not be associated
  with
 mor...
  A message is comprised of a group
  of segments in a defined sequence.




Tuesday, June 09, 2009                 25
 Information about the message
 (MSH)
 Information about the patient
  PID, AL1, PV1)
 Information about the order
 (OR...
    Segments of a message:
      are identified by a unique three
       character code known as the
       Segment ID.
...
    A logical grouping of data field PID segment
     Definition (Partial)




Tuesday, June 09, 2009                    ...
    SEQuence – the order of an element within the
     segment
    Max LENgth
    Data Type
    OPTionality:
       R...
    RP/# = Repetition:
       N-No or Y-Yes; may designate number of repetitions
    TBL# = Table Number
       A uniq...
Messages are made up of segments
which are made up of fields which may have
components which may have sub-components.




...
    An HL7 field is a set of characters defined by an
    HL7 data type. For example, marital status.
    PID.15 (data ty...
    A field entry may also have parts called
     components. For example, the patient’s
     name has components such as...
Tuesday, June 09, 2009   34
    To determine the exact representation of an abstract
     message, one applies the HL7 encoding rules defined in
    ...
MSH|^~&|RegSys|Genhosp|LabSys|Genhosp|200812242336|
Security|ADT^A01^ADT_A01|MSG00001|P|2.6|||AL|NE<CR>
EVN|A01|2008122423...
    In a message certain encoding characters delimit the
     constructs.
      The Segment Terminator <CR>
      The F...
 The Encoding Characters are specified immediately
  following the segment ID in the MSH Segment.
 With the exception of...
 The HL7 field separator marks the beginning of a
 data field within an HL7 segment.
 It always follows the segment ID t...
    Used to separate adjacent components within a field.
    The data type defines whether a field has
     components.
...
     Used to separate occurrences of a repeating field.
     The “repetitions” are of a common structure (like rows
    ...
    Used in alphanumeric fields defined by data
     types ST, TX or FT
    Used for highlighting
    Used to escape th...
Tuesday, June 09, 2009   43
 Used to separate adjacent subcomponents.
 The data type defines whether the components of a
  field have subcomponents....
 Is the last character of EVERY segment.
 Is ALWAYS the ASCII CR character (hex 0D).
 Is NEVER omitted.
 Can NEVER be ...
Tuesday, June 09, 2009   46
Tuesday, June 09, 2009   47
Tuesday, June 09, 2009   48
    If components, subcomponents, or repetitions at the
     end of a data field are ‘not present’, their separators
    ...
    End each segment with the REQUIRED
     segment terminator




Tuesday, June 09, 2009                    50
    Rule 1: Ignore the unexpected

    Rule 2: If it’s not there, assume it’s not
     present.




Tuesday, June 09, 20...
    Ignore segments, fields, components,
     subcomponents, and repetitions of a field that
     are present but not exp...
    Treat fields, components, subcomponents, and
     repetitions that are expected but not sent as not
     present.
   ...
    New messages may be introduced in subsequent
     versions.
  New segments may be introduced and placed
     anywher...
    Retained for backwards compatibility only”
     designates fields no longer recommended for
     use, but retained as...
Data Types




Tuesday, June 09, 2009                56
Here are the ones that occur most frequently:
    Alphanumeric (ST TX FT SRT)
    Numeric (CQ MO NM SI SN)
    Identifi...
Tuesday, June 09, 2009   58
    Original Mode
       Application Level Acknowledgements
       Version 2.1
    Enhanced Mode
       Accept and Ap...
    Original Mode (only mode in V2.1)
    Application acknowledgment only




Tuesday, June 09, 2009                   60
    Enhanced Mode (available in V2.2 and later)
       Allows accept/commit and application
        acknowledgments
    ...
Tuesday, June 09, 2009   62
Upcoming SlideShare
Loading in...5
×

HL7 Interface

2,028

Published on

Published in: Technology, Health & Medicine
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,028
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

Transcript of "HL7 Interface "

  1. 1. Introduction to HL7 V2.5 Standard Tuesday, June 09, 2009 Bhaski - The Warrior Group 1
  2. 2.  Interoperability : Ability of two or systems or components to exchange information and use the information that has been exchanged [ source : IEEE Standard Computer Dictionary : A Compilation of IEEE Standard Computer Glossaries, IEEE, 1990]  Functional interoperability - Message format and content  Semantic interoperability - Terms (SNOMED-CT, LOINC), units  Service (Business) Interoperability – SOA, HISA  Vision : Plug and play (PnP) Tuesday, June 09, 2009 2
  3. 3.  Computers work by matching  Cannot handle the unexpected  Easier to send than to receive  Testing, Testing, Testing  (N2 - N)/2 = Number of interface N Benefits of Standards Tuesday, June 09, 2009 3
  4. 4.  Reduce Cost  Reduce Risk  Competition (avoidance of lock-in)  Change control (real costs of upgrades)  Quality (leveling up)  Compliance testing Tuesday, June 09, 2009 4
  5. 5.  OSI Level 7  Organization  Standards  HL7 is a Language (s)  • Syntax (Grammar)  • Semantics (Words) Tuesday, June 09, 2009 5
  6. 6.  Layer 7 - Application - network processes for application  Layer 6 - Presentation - Data Representation  Layer 5 - Session - Interhost communication  Layer 4 - Transport - End-to-end connections  Layer 3 - Network - Addresses and best path  Layer 2 - Data Link - Access to media  Layer 1 - Physical - Binary transmission Tuesday, June 09, 2009 6
  7. 7. Tuesday, June 09, 2009 7
  8. 8. Tuesday, June 09, 2009 8
  9. 9.  1988 - present (backwards compatible)  Very widely used in hospitals  Position-dependent syntax  EVN||20040627||||20040601  PID|||567890^^^CXH^PI~9999999484^^^NHS  Local tailoring of Z-segments  “If you have seen one implementation, then you have  seen one implementation” Tuesday, June 09, 2009 9
  10. 10.  Message  Segment  Field  Data Type (may repeat)  Component  SubComponent Tuesday, June 09, 2009 10
  11. 11.  MESSAGE SYNTAX  SEG –1..1  [ SEG ] – 0..1  { SEG } – 1..*  { [ SEG ] } – 0..* Tuesday, June 09, 2009 11
  12. 12.  DELIMITERS • Defined at start of MSH segment • Segment terminator is carriage return (hex 0D) | (vertical bar): field separator ~(tilde): repetition separator ^ (caret): component separator & (ampersand): subcomponent separator (backslash): escape character Always start MSH|^~&|MegaReg|XYZHospC|SuperOE| |2.5| Tuesday, June 09, 2009 12
  13. 13. 1. Introduction 11. Patient Referral 2. Control 12. Patient Care 3. ADT 13. Laboratory Automation 4. Orders 14. Application Management 5. Query 15. Personnel Management 6. Financial Management 7. Observation Reporting 8. Master Files 9. Medical Records 10. Scheduling Tuesday, June 09, 2009 13
  14. 14.  Data Definition Tables  Lower Layer Protocols  Network Management  BNF Message Descriptions  Glossary Tuesday, June 09, 2009 14
  15. 15.  HL7 V2.4, V2.5, V2.5.1(Lab test results), V2.6, V2.7(Device communication) Tuesday, June 09, 2009 15
  16. 16. Chapter 2 of the HL7 V2.x Standard Tuesday, June 09, 2009 16
  17. 17.  Defines the generic rules that apply to all messages  The Key: How to read the rest of the specification  HL7 Encoding Rules: what the !@#$ are those |^& in my data stream?  The programming procedures required to exchange all messages  Standard conformance profiling rules for message specification Tuesday, June 09, 2009 17
  18. 18.  Expects ISO OSI Level 7. If not, lower level protocols are available: Ad hoc w/o basic transport (RS-232) – LLP Robust export but not level 7(TCP-IP)-MLLP  Expects the following: Error free transmission Character conversion No assumed maximum message length Tuesday, June 09, 2009 18
  19. 19. Tuesday, June 09, 2009 19
  20. 20. Tuesday, June 09, 2009 20
  21. 21.  A real world event that necessitates an exchange of information. Tuesday, June 09, 2009 21
  22. 22.  An atomic unit of data transferred between systems.  A Message Type defines its domain.  A Trigger Event defines the reason for the exchange. Tuesday, June 09, 2009 22
  23. 23.  A 3-character code contained within each message that identifies its type or domain. Tuesday, June 09, 2009 23
  24. 24.  One message type can have many different trigger event codes.  A trigger event code may not be associated with more than one message type. Tuesday, June 09, 2009 24
  25. 25.  A message is comprised of a group of segments in a defined sequence. Tuesday, June 09, 2009 25
  26. 26.  Information about the message (MSH)  Information about the patient PID, AL1, PV1)  Information about the order (ORC, order detail segment, OBX, BLG) Tuesday, June 09, 2009 26
  27. 27.  Segments of a message: are identified by a unique three character code known as the Segment ID. Can be required MSH is ALWAYS required!  May be optional [..]  May repeat {…} Tuesday, June 09, 2009 27
  28. 28.  A logical grouping of data field PID segment Definition (Partial) Tuesday, June 09, 2009 28
  29. 29.  SEQuence – the order of an element within the segment  Max LENgth  Data Type  OPTionality:  R - Required - Too few of these!  O- Optional- Too many of these !  C- Conditional-Based on what?  X- Don’t use  B- Retained for backwards compatibility  W-Withdrawn Tuesday, June 09, 2009 29
  30. 30.  RP/# = Repetition:  N-No or Y-Yes; may designate number of repetitions  TBL# = Table Number  A unique identifier for a table of values used by the data element  HL7 defined values  User defined values  Externally defined values  ITEM# - a unique identifier for the HL7 data element  ELEMENT NAME Tuesday, June 09, 2009 30
  31. 31. Messages are made up of segments which are made up of fields which may have components which may have sub-components. Tuesday, June 09, 2009 31
  32. 32.  An HL7 field is a set of characters defined by an HL7 data type. For example, marital status. PID.15 (data type CWE) Tuesday, June 09, 2009 32
  33. 33.  A field entry may also have parts called components. For example, the patient’s name has components such as last name first name middle name or initial  Components may be further divided into sub-components. Tuesday, June 09, 2009 33
  34. 34. Tuesday, June 09, 2009 34
  35. 35.  To determine the exact representation of an abstract message, one applies the HL7 encoding rules defined in Chapter 2 to the abstract definition from the functional chapter (example - Chapter 3, Patient Administration). Tuesday, June 09, 2009 35
  36. 36. MSH|^~&|RegSys|Genhosp|LabSys|Genhosp|200812242336| Security|ADT^A01^ADT_A01|MSG00001|P|2.6|||AL|NE<CR> EVN|A01|200812242333<CR> PID|||ID12345^^^^MR~ID12345001^^^^AN~123456789^^^^SS|| Jones^William^A^III||19810615|M||C| 1200 N. Elm St.^Greensboro^NC^27401-1020|GL| (919)555-1212|(919)555-3434||S||ID12345001| 123-45-6789|987654^NC<CR> NK1|Jones^Barbara^K|Wife<CR> PV1|1|I|2000^2012^01||||004777^Lieber^Sidney^J.|||Sur<CR> Tuesday, June 09, 2009 36
  37. 37.  In a message certain encoding characters delimit the constructs.  The Segment Terminator <CR>  The Field Separator |  The Component Separator ^  The Sub-Component Separator &  The Repetition Character ~  The Escape Character Tuesday, June 09, 2009 37
  38. 38.  The Encoding Characters are specified immediately following the segment ID in the MSH Segment.  With the exception of the segment terminator, delimiter values are at the discretion of the sender.  Most senders use the suggested values. Tuesday, June 09, 2009 38
  39. 39.  The HL7 field separator marks the beginning of a data field within an HL7 segment.  It always follows the segment ID to indicate the first data field in the segment. | Tuesday, June 09, 2009 39
  40. 40.  Used to separate adjacent components within a field.  The data type defines whether a field has components. ^ Tuesday, June 09, 2009 40
  41. 41.  Used to separate occurrences of a repeating field.  The “repetitions” are of a common structure (like rows in a database) defined by the data type. The content of each repetition may be (and usually is) different. ~ Tuesday, June 09, 2009 41
  42. 42.  Used in alphanumeric fields defined by data types ST, TX or FT  Used for highlighting  Used to escape the other delimiters  Used for hex character representation  Must both precede and follow the character(s) being escaped Tuesday, June 09, 2009 42
  43. 43. Tuesday, June 09, 2009 43
  44. 44.  Used to separate adjacent subcomponents.  The data type defines whether the components of a field have subcomponents.  When a component of a data type is itself a data type with components, its parts will be expressed as subcomponents of the full data type. & Tuesday, June 09, 2009 44
  45. 45.  Is the last character of EVERY segment.  Is ALWAYS the ASCII CR character (hex 0D).  Is NEVER omitted.  Can NEVER be changed. <CR> Tuesday, June 09, 2009 45
  46. 46. Tuesday, June 09, 2009 46
  47. 47. Tuesday, June 09, 2009 47
  48. 48. Tuesday, June 09, 2009 48
  49. 49.  If components, subcomponents, or repetitions at the end of a data field are ‘not present’, their separators may be omitted If no more fields are present in a segment, the data field separators may be omitted Padding doesn’t violate the rules, it’s just not good practice! Tuesday, June 09, 2009 49
  50. 50.  End each segment with the REQUIRED segment terminator Tuesday, June 09, 2009 50
  51. 51.  Rule 1: Ignore the unexpected  Rule 2: If it’s not there, assume it’s not present. Tuesday, June 09, 2009 51
  52. 52.  Ignore segments, fields, components, subcomponents, and repetitions of a field that are present but not expected. Tuesday, June 09, 2009 52
  53. 53.  Treat fields, components, subcomponents, and repetitions that are expected but not sent as not present.  DON’T break the interface  DO return an ERR segment in the acknowledgment message for each required field that is missing  Treat segments that were expected but not sent as consisting entirely of fields that were not sent.  Example: If the PR1 procedure segment is not sent on a discharge, assume that procedure info is not present - do NOT assume it’s NULL. Tuesday, June 09, 2009 53
  54. 54.  New messages may be introduced in subsequent versions.  New segments may be introduced and placed anywhere in an existing message structure in subsequent versions.  In subsequent versions new F/C/S/R - can only be introduced at the end of a segment, field, component, or repetition list.  Data types can only be extended in subsequent versions by adding components to the end.  Non-repeating field can become repeating, but first repetition meaning should remain the same. Tuesday, June 09, 2009 54
  55. 55.  Retained for backwards compatibility only” designates fields no longer recommended for use, but retained as place holders. These fields may need to be valued to support prior versions.  Obsolete message elements may be withdrawn when they are no longer referred to by other parts of the Standard: e.g., superseded data types such as CE. Tuesday, June 09, 2009 55
  56. 56. Data Types Tuesday, June 09, 2009 56
  57. 57. Here are the ones that occur most frequently:  Alphanumeric (ST TX FT SRT)  Numeric (CQ MO NM SI SN)  Identifier (ID IS HD EI RP PL PT  VID)  Date/Time (DT TM DTM)  Coded Values (CF CN CX XCN  CNE CWE)  Demographics (XAD XPN  XON XTN SAD FN)  Price Data (CP)  ADT/Finance (FC)  Extended Queries (QSC QIP RCD)  Master Files (DLN JCC VH)  Medical Records (PPN)  Time Series (DR RI SCV TQ) Tuesday, June 09, 2009 57
  58. 58. Tuesday, June 09, 2009 58
  59. 59.  Original Mode  Application Level Acknowledgements  Version 2.1  Enhanced Mode  Accept and Application Level Acknowledgements  Version 2.2+ Tuesday, June 09, 2009 59
  60. 60.  Original Mode (only mode in V2.1)  Application acknowledgment only Tuesday, June 09, 2009 60
  61. 61.  Enhanced Mode (available in V2.2 and later)  Allows accept/commit and application acknowledgments  Supports interface engine use cases Tuesday, June 09, 2009 61
  62. 62. Tuesday, June 09, 2009 62

×