Getting Sample HL7 Data

Introduction

This article was originally written for iguana 5 and may contain out of date references.

Getting ones hands on HL7 data is one of the biggest pains in the proverbial even for us. Even getting hold of test data can be difficult since companies can be embarrassed by how non-standard their data is.

Kind of reminds me when I was reading into genetics in my teens. It seems like it was all about E. Coli and you couldn’t find studies on anything else. This is a bit silly isn’t it? A company that provides HL7 tools ought to have a whole lot more HL7 test data to show people.

So do everyone a favour! Since everyone could do with more HL7 test data send me some of what you have and I promise to put it up here. (just make sure it’s not real data so we don’t all get sued…)

Random ADT data generator [top]

Need an incoming stream of sample message data? Try this Random ADT message generator in our Protocols Repo! The code is straightforward and easy to implement, but you can elaborate on it as needed.

Some sample messages [top]

  1. Athena Health
  2. Good lab result message
  3. EKG lab example

These are the sources of sample data that we have come across in our travels! If you know of other samples please contact us so we can add them to this page.

Athena health

Athena Health is very well organized, providing these handy resources:

Good lab result message

Here’s a nice realistic lab message contributed by Jim. Confidential patient information has been removed:

MSH|^~\&|FDHL7|JOHNSON LABS||P1055|201007231634||ORU^R01|P10550000047907|P|2.3|1||NE|NE
PID
|1|JQ4988|108512373||SAMPLES^JUNIOR||01/10/1948^53 Y|M|||^******^^||||||||
NTE
|1|P|****************************************************************************
ADD
|NON FASTING
OBR
|1||108512373|CHEM^——-* CHEMISTRY *——–||201007221041||||||||201007222312||P1055^SCI DULUTH/PHS^RTE 29,PO BOX 244^DULUTH, MN 19426^|(945)4431234|RECEPTION, NEW||||201007231634|||R||||
OBX
|1|NM|01354^TotalProtein||7.3|gm/dl|5.98.4||||F
OBX
|2|NM|00331^Albumin||3.9|gm/dl|3.25.2||||F
OBX
|3|NM|17533^Globulin||3.4|gm/dL|1.73.7||||F
OBX
|4|NM|06411^A/G Ratio||1.1||1.12.9||||F
OBX
|5|NM|19760^Glucose||296|mg/dL|7099|HI|||F
OBX
|6|NM|01487^Sodium||134|mmol/L|133145||||F
OBX
|7|NM|01297^Potassium||4.3|mmol/L|3.35.3||||F
OBX
|8|NM|00570^Chloride||96|mmol/L|96108||||F
OBX
|9|NM|00521^CO2||24|mmol/L|2129||||F
OBX
|10|NM|00497^BUN||17|mg/dl|725||||F
OBX
|11|NM|00703^Creatinine||1.1|mg/dl|0.61.3||||F
OBX
|12|NM|0900134^eGFR||70||>60 mL/min/1.73m2||||F
OBX
|13|NM|14274^BUN/CreatRatio||15.5||1028||||F
OBX
|14|NM|00505^Calcium||8.9|mg/dl|8.410.4||||F
OBX
|15|NM|01578^UricAcid||6.2|mg/dl|2.47.0||||F
OBX
|16|NM|01149^Iron||87|mcg/dl|30160||||F
OBX
|17|NM|00430^Bilirubin,Total||0.6|mg/dl|0.11.0||||F
OBX
|18|NM|01172^LDH||190|u/l|94250||||F
OBX
|19|NM|01859^AlkPhos||63|u/l|39120||||F
OBX
|20|NM|01461^AST (SGOT)||33|u/l|037||||F
OBX
|21|NM|01271^Phosphorous||2.8|mg/dl|2.64.5||||F
OBX
|22|NM|01479^ALT (SGPT)||55|u/L|040|HI|||F
OBX
|23|NM|00935^GGTP||33|u/L|751||||F
NTE
|1|L|****************************************************************************
ADD
|GFR (GlomerularFiltrationRate) calculation utilizes the MDRD formula
ADD
|(Modification of DietinRenalDiseaseStudyGroup)and assumes a normal
ADD
|adult body surface area of 1.73. If the patient isAfricanAmerican
ADD
|multiply result reported by1.21.(Ref.NationalKidneyDiseaseEduca.
ADD
|Program.)
ADD
| *****Male/Female reference range: >60 mL/min/1.73 m2 *****
ADD
|Note: A calculated GFR of <60 mL suggests chronic kidney disease, but
ADD
|only if found consistently over at least 3 months. A calculated
ADD
|result of <15 mL is consistent with renal failure.
OBR
|2||108512373|CARD^-* CARDIOVASCULAR/LIPIDS *–||201007221041||||||||201007222312||P1055^SCI DULUTH/PHS^RTE 29,PO BOX 244^DULUTH, MN 19426^|(945)4431234|RECEPTION, NEW||||201007231634|||R||||
OBX
|1|NM|00588^Cholesterol||124|mg/dl|<200||||F
OBX
|2|NM|01552^Triglycerides||73|mg/dl|<151||||F
OBX
|3|NM|00596^HDL CHOL.,DIRECT||39|mg/dl|>40|LO|||F
OBX
|4|NM|17640^HDL as% of Cholesterol||31|%|||||F
NTE
|1|L|Range/Evaluation: (>25) BELOW AVERAGE RISK
OBX
|5|NM|14217^Chol/HDL Ratio||3.18||||||F
NTE
|1|L|Range/Evaluation: (<4.2) BELOW AVERAGE RISK
OBX
|6|NM|02535^LDL/HDL Ratio||1.82||03.55||||F
OBX
|7|NM|05058^LDL Cholesterol||71||<100||||F
OBX
|8|NM|33456^VLDL, CALCULATED||14|mg/dl|732||||F
OBR
|3||108512373|HEMA^——* HEMATOLOGY *——–||201007221041||||||||201007222312||P1055^SCI DULUTH/PHS^RTE 29,PO BOX 244^DULUTH, MN 19426^|(945)4431234|RECEPTION, NEW||||201007231634|||R||||
OBX
|1|NM|14977^WBC||6.61|x10(3)/uL|3.4011.80||||F
OBX
|2|NM|14985^RBC||4.56|x10(6)/uL|4.205.90||||F
OBX
|3|NM|14993^HGB||13.6|gm/dL|12.317.0||||F
OBX
|4|NM|00190^HCT||39.9|%|39.352.5||||F
OBX
|5|NM|15032^MCV||87.5|fL|80.0100.0||||F
OBX
|6|NM|15040^MCH||29.8|pg|25.034.1||||F
OBX
|7|NM|15024^MCHC||34.1|gm/dL|29.035.0||||F
OBX
|8|NM|15982^RDW||14.1|%|10.916.9||||F
OBX
|9|NM|15057^POLYS||58.8|%|36.078.0||||F
OBX
|10|NM|31765^POLYS, ABS. COUNT||3.89|x10(3)/uL|1.229.20||||F
OBX
|11|NM|15073^LYMPHS||31.0|%|12.048.0||||F
OBX
|12|NM|31773^LYMPHS, ABS. COUNT||2.05|x10(3)/uL|0.415.66||||F
OBX
|13|NM|15115^MONOS||7.7|%|0.013.0||||F
OBX
|14|NM|31807^MONOS, ABS. COUNT||0.51|x10(3)/uL|0.171.42||||F
OBX
|15|NM|15099^EOS||2.0|%|0.08.0||||F
OBX
|16|NM|31781^EOS, ABS. COUNT||0.13|x10(3)/uL|0.030.94||||F
OBX
|17|NM|15107^BASOS||0.3|%|0.02.0||||F
OBX
|18|NM|31799^BASOS, ABS. COUNT||0.02|x10(3)/uL|0.000.24||||F
OBX
|19|NM|2700532^IMMATURE GRANULOCYTES||0.2|%|0.00.5||||F
OBX
|20|NM|01289^PLATELET COUNT||191|x10(3)/uL|144400||||F
OBX
|21|NM|4000535^MPV||10.6|fL|8.211.9||||F
OBR
|4||108512373|URIN^——* URINALYSIS *——–||201007221041||||||||201007222312||P1055^SCI DULUTH/PHS^RTE 29,PO BOX 244^DULUTH, MN 19426^|(945)4431234|RECEPTION, NEW||||201007231634|||R||||
OBX
|1|ST|63156^Color||YELLOW||YELLOW, STRAW, AMBER||||F
OBX
|2|ST|63164^Character||CLEAR||CLEAR||||F
OBX
|3|NM|15206^SpecificGravity URN||1.030||1.0031.030||||F
OBX
|4|NM|15214^pH Urine||5.5||5.08.0||||F
OBX
|5|ST|15222^Protein,Urine||NEGATIVE||NEGATIVE||||F
OBX
|6|ST|15230^Glucose,Urine||3+,>=1000 mg/dL||NEGATIVE|*|||F
OBX
|7|ST|15248^Ketone,Urine||NEGATIVE||NEGATIVE||||F
OBX
|8|NM|15255^UrobilinogenUrine||1.0|Units|0.21.0||||F
OBX
|9|ST|15263^Bilirubin,Urine||NEGATIVE||NEGATIVE||||F
OBX
|10|ST|15271^Blood,Urine||NEGATIVE||NEGATIVE||||F
OBX
|11|ST|15289^NitritesUrine||NEGATIVE||NEGATIVE||||F
OBX
|12|ST|63115^LeukocyteEsterase||NEGATIVE||NEGATIVE||||F
OBX
|13|ST|15297^CrystalsUrine||NONE||NONE||||F
OBX
|14|ST|21352^CrystalAmt.Urine||NONE||NONE||||F
OBX
|15|ST|15347^WBC,Urine||04|PER HPF|04||||F
OBX
|16|ST|15354^RBC,Urine||03|PER HPF|03||||F
OBX
|17|ST|15461^EpithelialCells,Ur||FEW||FEW||||F
OBX
|18|ST|15453^Cast,Hyaline,Urine||NONE SEEN|PER LPF|04||||F
OBX
|19|ST|15479^Cast,Granular,Urin||NONE SEEN|PER LPF|01||||F
OBX
|20|ST|15438^Cast, RBC,Urine||NONE SEEN|PER LPF|01||||F
OBX
|21|ST|15495^Bacteria,Urine||NONE||FEW||||F
NTE
|1|L|****************************************************************************
ADD
|NOTE: Significant quantities of epithelial cells will
ADD
|be identified if they are not squamous cell types.
OBR
|5||108512373|MISC^—–* MISCELLANEOUS *——||201007221041||||||||201007222312||P1055^SCI DULUTH/PHS^RTE 29,PO BOX 244^DULUTH, MN 19426^|(945)4431234|RECEPTION, NEW||||201007231634|||R||||
OBX
|1|NM|01537^TSH||1.930||0.274.2 uIU/mL||||F
OBX
|2|NM|01511^THYROXINE(T4)||9.3||4.512.0 ug/dL||||F
OBX
|3|NM|01529^T3 UPTAKE||29.7||24.339.0%||||F
OBX
|4|NM|06668^FREE T4 INDEX||2.8||1.14.5||||F
OBX
|5|ST|01420^RPR||NONREACT||NONREACTIVE||||F
NTE
|1|L|****************************************************************************
ADD
|NOTICE: IF the result of the RPR is reported as reactive with a titer
ADD
|of up to 1:8 please note that this level of reactivity can be caused
ADD
|by other, nonspecific constituents and may not be related to syphilis.
ADD
|Confirmation of positive RPRs can only be made via performance of the
ADD
|T.Pallidum confirmation test.
OBX
|6|NM|01024^HGB. A1c(glycohgb)||9.1||46%|HI|||F
OBX
|7|ST|16618^CREAT.URN.TIMED/RAND||.147||gms/dL||||F
OBX
|8|NM|26997^MICROALB/CREAT RATIO||4.1||<30mg/gm creat.||||F
OBX
|9|NM|31724^MICROALBUMIN,RANDOM||0.6||<2.9 mg/dL||||F
NTE
|2|L|****************************************************************************
ADD
|GLYCOHEMOGLOBIN(HgbA1c)Ranges% eAG ranges(mg/dL)* GLUCOSE CONTROL INDEX
ADD
|
ADD
| <46% <68126 NonDiabeticLevel
ADD
| <67% <126154 DiabeticControl
ADD
| >8% >183 Additional action suggested
ADD
|*Data adapted from the A1cDerivedAverageGlucose(ADAG)Study
ADD
|(20062008).Estimated average glucose (eAG) values (shown as ranges
ADD
|in the above table) can be reported as individual patient values if
ADD
|requested.
NTE
|3|L|****************************************************************************
ADD
|NOTE: SST tube submitted was inadequately spun.Serum was found to
ADD
|contain RBCs.Certain tests, e.g.Glucose, may be decreased while
ADD
|others e.g.Potassiumor LDH may be elevated.
FTS
|1|END OF FILE

EKG lab example

Anthony Julian from the Mayo clinic very kindly gave these test messages:

MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621050440||ORU^R01|20110621050440|P|2.1
PID|||999999999||TEST^PATIENT||18450101|F
OBR|||211088491|0^ADULT^ROCHECG|||20110620170631|||||||||M999999^^^^^^^RACFID||||||20110621060232||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|52|/SEC
OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|208|MSEC
OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|88|MSEC
OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|466|MSEC
OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|04254
OBX||CE|93000.17^^CPT4|7|21&101^Sinus bradycardia`T`with 1st degree A-V block^MEIECG
OBX||CE|93000.17^^CPT4|8|1687^Otherwise normal ECG^MEIECG
OBX||CE|93000&CMP^^CPT4|9|1301^When compared with ECG of^MEIECG
OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|10|201106171659
OBX||CE|93000&CMP^^CPT4|11|1305^No significant change was found^MEIECG
OBX||TX|93000.48^EKG COMMENT^CPT4|12|9917^LASTNAME MD^FIRSTNAME
OBX||FT|93000^ECG 12-LEAD^CPT4|13|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 17:06\par VENTRICULAR RATE 52\par Sinus bradycardia with 1st degree A-V block\par Otherwise normal ECG\par When compared with ECG of 17-JUN-2011 16:59,\par No significant change was found\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }
MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621051018||ORU^R01|20110621051018|P|2.1
PID|||999999999||TEST^PATIENT||18450101|F
OBR|||211088541|0^ADULT^ROCHECG|||20110620233535|||||||||M999999^^^^^^^RACFID||||||20110621060615||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|61|/SEC
OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|195|MSEC
OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|82|MSEC
OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|426|MSEC
OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|06336
OBX||CE|93000.15^^CPT4|7|19^Sinus rhythm^MEIECG
OBX||CE|93000.15^^CPT4|8|222^Premature atrial complexes^MEIECG
OBX||CE|93000.17^^CPT4|9|1687^Otherwise normal ECG^MEIECG
OBX||CE|93000&CMP^^CPT4|10|1301^When compared with ECG of^MEIECG
OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|11|201008041214
OBX||CE|93000&CMP^^CPT4|12|1305^No significant change was found^MEIECG
OBX||TX|93000.48^EKG COMMENT^CPT4|13|9920^LASTNAME MD^FIRSTNAME
OBX||FT|93000^ECG 12-LEAD^CPT4|14|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 23:35\par VENTRICULAR RATE 61\par Sinus rhythm\par Premature atrial complexes\par Otherwise normal ECG\par When compared with ECG of 04-AUG-2010 12:14,\par No significant change was found\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }
MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621051211||ORU^R01|20110621051211|P|2.1
PID|||999999999||TEST^PATIENT||18450101|F
OBR|||211088499|0^ADULT^ROCHECG|||20110620172851|||||||||M999999^^^^^^^RACFID||||||20110621061023||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|99|/SEC
OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|176|MSEC
OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|144|MSEC
OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|396|MSEC
OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|04732
OBX||CE|93000.15^^CPT4|7|22^Normal sinus rhythm^MEIECG
OBX||CE|93000.19^^CPT4|8|360^Left atrial enlargement^MEIECG
OBX||CE|93000.17^^CPT4|9|541&543^Left ventricular hypertrophy`T`with QRS widening^MEIECG
OBX||CE|93000.27^^CPT4|10|1160^T wave abnormality, consider lateral ischemia^MEIECG
OBX||CE|93000&CMP^^CPT4|11|1301^When compared with ECG of^MEIECG
OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|12|201106201640
OBX||CE|93000&CMP^^CPT4|13|1305^No significant change was found^MEIECG
OBX||TX|93000.48^EKG COMMENT^CPT4|14|9917^LASTNAME MD^FIRSTNAME
OBX||FT|93000^ECG 12-LEAD^CPT4|15|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 17:28\par VENTRICULAR RATE 99\par Normal sinus rhythm\par Left atrial enlargement\par Left ventricular hypertrophy with QRS widening\par T wave abnormality, consider lateral ischemia\par When compared with ECG of 20-JUN-2011 16:40,\par No significant change was found\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }
MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621051322||ORU^R01|20110621051322|P|2.1
PID|||999999999||TEST^PATIENT||18450101|F
OBR|||211088501|0^ADULT^ROCHECG|||20110620173416|||||||||M999999^^^^^^^RACFID||||||20110621061053||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|50|/SEC
OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|218|MSEC
OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|92|MSEC
OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|488|MSEC
OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|05730
OBX||CE|93000.17^^CPT4|7|21&101^Sinus bradycardia`T`with 1st degree A-V block^MEIECG
OBX||CE|93000.20^^CPT4|8|410^Low voltage QRS^MEIECG
OBX||CE|93000.27^^CPT4|9|1180^T wave abnormality, consider anterolateral ischemia^MEIECG
OBX||CE|93000&CMP^^CPT4|10|1301^When compared with ECG of^MEIECG
OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|11|201104200736
OBX||CE|93000.0^^CPT4|12|1100&1200&1412^ST and`T`T waves`T`have changed^MEIECG
OBX||TX|93000.48^EKG COMMENT^CPT4|13|9917^LASTNAME MD^FIRSTNAME
OBX||FT|93000^ECG 12-LEAD^CPT4|14|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 17:34\par VENTRICULAR RATE 50\par Sinus bradycardia with 1st degree A-V block\par Low voltage QRS\par T wave abnormality, consider anterolateral\par ischemia\par When compared with ECG of 20-APR-2011 07:36,\par ST and T waves have changed\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }

Using live test data [top]

If you are working closely with a health care provider they will probably be able to supply HL7 test data.

Most hospitals will have what is called an interface engine. This is a piece of software which is responsible for accepting streams of HL7, queuing them and routing them to various hosts. There are a number of common interface engines deployed in the market. Names you will typically come across are:

  • Cloverleaf
  • STC Datagate (Seebeyond eGate)
  • Neon (now owned by Sybase)
  • Mitra PACS Broker

To get a stream of HL7 data you will need to work with the administrator of one of these engines and get them to send a stream of HL7 data to you.

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.