emsdocs

This document is commercial-in-confidence. The recipient of this document agrees to hold all information presented within as confidential and agree not to use or disclose, or allow to use or disclosure of the said information to unauthorized parties, directly or indirectly, irrespective of the acceptance or rejection of the presentation or at any time before, during or after an agreement has been reached, without prior written consent.

1. EMS Standard Segment Definitions

1.1. Version History

Version Date Who Notes
v0.1 - Draft 11th Jan 2021 Lee Dyson First Draft for Review - Scottish TrakCare
v0.2 - Draft 11th Jan 2021 Lee Dyson Updated for generic (non-Trakcare) referrals
v0.3 - Draft 9th May 2021 Lee Dyson Updated for Lorenzo mappings
v1.0 - Release 28th June 2021 Robert McNaught Consistency updates
v1.1 - Release 30th June 2021 Robert McNaught PID-13 and PID-14 clarity, consolidated from ADT message handling doc
v1.2 - Release 16th Jul 2021 Robert McNaught Disclaimer
v1.3 - Release 29th Sept 2021 Robert McNaught Formatting and fixes
v1.31 - Draft 1st November 2021 Lee Dyson Added note re: MSH:8 Security key
v1.32 - Release 4th January 2022 Lee Dyson Clarified use of phone numbers in PID-13/ PID-14

1.2. Introduction

This document describes the content of common HL7 segments for messages in and out of EMS. These are the base definitions for these segments. More detailed specifications per message type (e.g. REF, SIU etc.) may supercede or extend these definitions.

1.3. Standards

EMS’s interfaces are based on the Open Source HAPI Libraries for all HL7 message handling, both traditional “caret-and-pipe” and FHIR. HAPI is considered a reference standard implementation of the HL7 standards and applies detailed contraints and requirements on both message format and content. Some of these common constraints are described below.

1.3.1. Date Formats

ALL dates must be presented in a HL7-compliant format. YYYYMMDDhhmmss YYYYMMDDHHmmss.sss etc are VALID see Caristix. Any message containing a non-compliant date/time value will raise an exception, and will NOT be processed. DateTime values which DO NOT include a timezone offset (e.g. YYYYMMDDhhmmss+0000) are assumed to be local or “clock on the wall” time.

1.3.2. Escaped Characters

Special characters present in HL7 messages MUST be escaped. See HL7 Escape Sequences

1.4. INBOUND - to EMS

The following tables show the expected mapping of message INBOUND to EMS. e.g. Demographics, Referrals, Orders, Scheduling.

1.4.1. MSH

Field Name Required Example Notes
2 Delimiters Y ^~&\ standard delimiters
3 Sending Application Y PAS  
4 Sending Facility Y RJ7 ODS code of sending org.
5 Receiving Application Y EMS  
6 Receiving Facility Y RJ7 ODS code of receiving Org.
7 MsgDate Y 20191013013444 YYYYHHMMddhhmmss
8 Security Y XXXXX site specific interface key
9 Message Type Y ADT^A28  
10 Message ID Y A37GB45E1 Any alpha-numeric up to 30 chars
11 Processing ID N P  
12 Version Y 2.4  

Note:

1.4.2. MSA

Field Name Required Example Notes
1 Ack Code Y AA AE,AR
2 Msg Control Id Y    
3 Text Message N   Descriptive Error Text

1.4.3. EVN

Field Name Required Example Notes
0 Segment Type Y EVN  
1 Event Type Code N A04 not required
2 Recorded Date Time Y 20191012140001 YYYYMMDDhhmmss
3 Date/Time planned event N 20191012140001 YYYYMMDDhhmmss
4 Event Reason Code N OUT-C Can be used to inform message routing

1.4.4. PID

Field Name Required Example Notes
1 Set ID N 1 not used
2 Patient Identifiers N   See PID-3
3 Patient Identifiers Y 12345^^^RJ7^MR~1234567890^^^NHS^NH A repeating collection of identifiers. See note below.
3.4 Assigning Authority Y RJ7 Use ODS code of assigning authority
3.5 Identifier Type Code Y NH,MRN  
4 Identifiers N   NOT used
5 Patient Name Y EMS  
5.1 Surname Y Smith  
5.2 Given Name Y Jack  
5.3 Other name N EMS  
5.5 Title N    
7 DoB Y 19690402 ‘YYYYMMDD’ format
8 Sex Y M ‘M’,’F’ or ‘U’ see Default Reference Data
11 Patient Address N   Only first repeat of patient address is parsed. Four lines plus postcode.
11.1 Street N    
11.2 Other Designations N    
11.3 City N    
11.4 County N    
11.5 Postcode N    
13 Home Phone N   Repeating. Contains phone numbers & email addresses
13.1 Telephone Number     0115874245
13.2 Use Code N HOME, WORK, MOBILE How the number is to be used
13.3 System Code N PHONE, FAX , EMAIL MOBILE The apparatus / equipment used (e.g. for SMS)
13.4 Email Address   EMAIL^support@medilogik.co.uk  
14 Business Phone N   Repeating. Contains phone numbers & email addresses - format as per PID-13
16 Marital Status N M  
22 Ethnic Group N   See NHS data dictionary
29 Date of Death N YYYYMMDD Only parsed if PID-30 = Y
30 Deceased N   Must be explicitly set to Y - all other values indicate no

Note:

1.4.4.1. Example PID-3

12345^^^RJ7^MR~1234567890^^^NHS^NH

1.4.4.2. Example PID-13 / PID-14

0115874243^HOME^PHONE^~^WORK^EMAIL^support@medilogik.co.uk~0116874245^WORK^FAX

1.4.5. PD1

This segment is used to communciate patient’s registered GP details.

Field Name Required Example Notes
3 Patient Primary Facility Y   GP Practice Code & Address
3.1 Practice Name      
3.3 Practice Code      
4 Primary Care provider Name & ID Number Y   GP Code & Name
4.1 GP Code      
4.2 GP Surname      
4.3 Given Name      
4.4 GP Initials      
4.6 Title      
4.13 Identifier Type Code      
4.14 Assigning Authority      

Note: