Showing posts with label HL7. Show all posts
Showing posts with label HL7. Show all posts

Wednesday, 22 January 2014

HL7 OBX - observation/result segment

The OBX segment is used to transmit a single observation

OBX Segment Structure

Sno Element Name Len Data type Usage Table
1 ID 4 SI O
2 Value Type 2 ID C 0125
3 Observation Identifier 250 CE R
4 Observation Sub ID 20 ST O
5 Observation Value 65536 C
6 Units 250 CE R
7 Reference Ranges 60 ST R
8 Abnormal Flag 5 IS R 0078
9 Probability 5 NM O  
10 Nature of Abnormal Test 2 ID O 0080
11 Observation Result Status 1 ID R 0085
12 Date Last Observation 26 TS O
13 User defined Access Checks 20 ST O
14 Date/Time of Observation 26 TS O
15 Producer ID 250 CE O
16 Responsible Observer 250 XCN O
17 Observation Method 250 CE O
18 Equipment Instance Identifier 22 EI O
19 Date/Time of the Analysis 26 TS O  


Usage Description:

R Required
RE Required but may be Empty
O Optional
C Conditional
CE Conditional but it may be empty
x Not Supported




OBX.1 – ID (SI)

This field contains the sequence number.

Examples:

OBX|1|NM|NA^Sodium^LA01^2951-2^Sodium^LN||140|mmol/L|135-146|N|||F||N|200807170527||RECHELTJ

image

OBX.2 – Value Type (ID)

This field contains the format of the observation value in OBX. Most Commonly Used values are

CE Coded Element
NM Numeric
SN Structured Numeric
ST String Data
TX Text Data
FT Formatted text

The Complete valid values for the value type of an observation are listed in HL7 Table 0125  as follows
Value Description
AD Address
CE Coded Entry
CF Coded Element With Formatted Values
CK Composite ID With Check Digit
CN Composite ID And Name
CP Composite Price
CX Extended Composite ID With Check Digit
DT Date
ED Encapsulated Data
FT Formatted Text (Display)
MO Money
NM Numeric
PN Person Name
RP Reference Pointer
SN Structured Numeric
ST String Data.
TM Time
TN Telephone Number
TS Time Stamp (Date & Time)
TX Text Data (Display)
XAD Extended Address
XCN Extended Composite Name And Number For Persons
XON Extended Composite Name And Number For Organizations
XPN Extended Person Number
XTN Extended Telecommunications Number
RP Reference pointer is used to Point to Image if the observation value is image. 

Examples:

OBX|1|TX|OXY^OXID|  ^F^D|-9.99|200 ug/ml|0.0-200||||F||2|201309250911||RBJ||
OBX|2|TX|2589M^KRATUM|  ^D^E|||-||||N||4|201309240000||...||
OBX|3|ST|GLYCOHEM^Hemoglob A1C^LA01^4548-4^Hemoglob A1C^LN||6.8|% of total Hgb||H|||F|||200806250452||IF
OBX|4|NM|PT^Prothrombin Time^LA01^5902-2^Prothrombin Time^LN||12.1|seconds|11.8-14.3|N|||F||N|200806260829||IF
OBX|5|NM|1000714^TROPONIN I||0.0|NG/ML|0.0-0.2||||F|||20080628023100
OBX|6|ST|90020090^B MICRO DESCRIPTION^^90020090^B MICRO DESCRIPTION^||DNR||||||X|||20050923130500|CA^^L|||



OBX.3 - Observation identifier (CE)


This field contains a unique identifier for the observation (i.e., the individual test for which the result is reported in this OBX segment). The format is that of the Coded Element (CE). Example: 8625-6^P-R interval^LN.

The LOINC coding system must be used to represent the observation (test) identifier for results reported. HL7 permits senders to include both the Universal LOINC code and the local code for a given observation.For easy understanding, here we display the universal code in red and the local code in Blue as follows:
Please remember it is not necessary that LOINC Code should come first and followed by Local Code. Some lab will send in the reverse order.
LOINC Code^Print Text^LN^Local Code^Print Text^L

Element Format

CE Components: <identifier (ST)> ^ <text (ST)> ^ <name of coding system (IS)> ^ <alternate identifier (ST)> ^ <alternate text
(ST)> ^ <name of alternate coding system (IS)>

Please remember that not all the Lab system transmit the LOINC Code for the test observed. They may just use the internal Test code (alternate code) to represent the test.

Component Usage
identifier (ST) R
text (ST) R
name of coding system (IS) R
alternate identifier (ST) RE
alternate text (ST) RE
name of alternate coding system (IS) RE

Examples:

2089-1^LDL Cholesterol^LN^576X^LDL Chol^L

[LOINC code for LDL Cholesterol, plus a lab-specific code]

7564ZZ^Hep B SAg^L

Lab-specific code for Hep B surface antigen, coded per lab’s
proprietary coding system; note that Hep.

CL^Chloride^LA01^2075-0^Chloride^LN
The above example, local code appear first and LOINC Code appear second (2075-0 IS LOINC Code for Chloride)

The following example contain only Local Code representation
OBX|1|NM|164858^Antinuclear Antibodies Direct^L||22|AU/mL|0-99|||N|F|20041222||200807311545|CB



OBX-8 Abnormal flags (IS)

We can extract the abnormal flag from this field i.e status of the result. The valid values are as follows

Value Description
L Below Low Normal
H Above High Normal
LL Below lower panic limits
HH Above upper panic limits
< Below absolute low-off instrument scale
> Above absolute high-off instrument scale
N Normal (applies to non-numeric results)
A Abnormal (applies to non-numeric results)
AA

Very abnormal (applies to non-numeric units, analogous to panic limits for numeric
units)

U Significant change up
D Significant change down
B Better--use when direction not relevant
W Worse--use when direction not relevant
S Susceptible. Indicates for microbiology susceptibilities only.
R Resistant. Indicates for microbiology susceptibilities only.
I Intermediate. Indicates for microbiology susceptibilities only.
MS Moderately susceptible. Indicates for microbiology susceptibilities only.
VS

Very susceptible. Indicates for microbiology susceptibilities only


Examples:

OBX|2|NM|35005420^PROTHROMBIN TIME^^35005420^PROTHROMBIN TIME^||23.8|Seconds||H|||F|||20090615165900|MH^^L|||
 
image

 



OBX-11 Observation Result Status (ID)
This field contains the observation result status. Refer to HL7 table 0085 as follows

Value Description
C Record coming over is a correction and thus replaces a final result
D Deletes the OBX record
F Final results; Can only be changed with a corrected result.
I Specimen in lab; results pending
P Preliminary results
R Results entered -- not verified
S Partial results
X Results cannot be obtained for this observation
U

Results status change to Final. without retransmitting results already sent as ‘preliminary.’ E.g., radiology changes status from preliminary to final

W Post original as wrong, e.g., transmitted for wrong patient


Examples:

OBX|10|NM|BCR^BUN / Creat Ratio^LA01^3097-3^BUN / Creat Ratio^LN||8||||||F||N|200807170527||RECHELTJ 

image


Complete OBX Segment Examples:

OBX|1|NM|NA^Sodium^LA01^2951-2^Sodium^LN||140|mmol/L|135-146|N|||F||N|200807170527||RECHELTJ
OBX|2|NM|K^Potassium^LA01^2823-3^Potassium^LN||5.8|mmol/L|3.5-5.3|H|||F||N|200807170527||RECHELTJ
OBX|3|NM|CL^Chloride^LA01^2075-0^Chloride^LN||101|mmol/L|98-110|N|||F||N|200807170527||RECHELTJ
OBX|4|NM|CO2^CO2^LA01^2028-9^CO2^LN||23|mmol/L|21-33|N|||F||N|200807170527||RECHELTJ
OBX|5|NM|GAP^Anion Gap^LA01^X330373^Anion Gap^LN||16|mmol/L|3-16|N|||F||N|200807170527||RECHELTJ
OBX|6|NM|BUN^BUN^LA01^3094-0^BUN^LN||52|mg/dL|7-25|H|||F||N|200807170527||RECHELTJ
OBX|7|NM|CREAT^Creatinine^LA01^2160-0^Creatinine^LN||6.22|mg/dL|0.50-1.20|H|||F||N|200807170527||RECHELTJ
OBX|8|NM|GLU^Glucose^LA01^6777-7^Glucose^LN||101|mg/dL|65-99|H|||F||N|200807170527||RECHELTJ
OBX|9|NM|CA^Calcium^LA01^2000-8^Calcium^LN||7.2|mg/dL|8.6-10.2|L|||F||N|200807170527||RECHELTJ
OBX|10|NM|BCR^BUN / Creat Ratio^LA01^3097-3^BUN / Creat Ratio^LN||8||||||F||N|200807170527||RECHELTJ
OBX|11|NM|GFRAA^GFR MDRD Af Amer^LA01^X33914^GFR MDRD Af Amer^LN||8|See Note|||||F||N|200807170527||RECHELTJ



References:
1.
What are LOINC Codes ?
2. HL7 Data Types
3. Complete set of LOINC codes and associated documentation

Tuesday, 14 January 2014

HL7 Data types

Data types in HL7 Message

Group Data type Code Data Type Name
Alphanumeric    
ST String
TX Text Data
FT Formatted text
Numerical CQ Composite Quantity with Units
MO Money
NM Numeric
SI Sequence
SN Structured Number
Identifier
ID Coded values from HL7 Look up List
IS Coded values from user defined
HD Hierarchic designator
EI Entity identifier
RP Reference pointer
PL Person location
PT Processing type
Date and Time DT Date Only
TM Time Only
TS Time Stamp
Code Values CE Coded Element
CF Coded element with formatted values
TN Telephone Number
XAD Extended Address
XPN Extended Person Name
XON Extended composite name and ID number for organizations
XTN Extended telecommunications number
     



Examples :
1. Example for TS Date and Time data type in MSH Segment as follows
MSH|^~\&|aaa|My CLINICAL LAB|aaa|A232|201309050000||ORU^R01||P|2.3|

Format:
yyyyMMddHHmmss.SZ

Other Examples :
200202150930
20040822143045 [indicates date/time of Aug. 22, 2004 2:30 PM and 45 seconds]
20040822143045-0800 [indicates date/time of Aug. 22, 2004 2:30 PM and 45 seconds PST]

Wednesday, 8 January 2014

MSH - Message Header Segment

The MSH segment defines the intent, source, destination, and some specifics of the syntax of a message.

MSH Segment Structure

Sno Element Name Len Data type Usage Table
1 Field Separator 1 ST R
2 Encoding Characters 4 ST R  
3 Sending Application 180 HD X
4 Sending Facility 180 HD R
5 Receiving Application 180 HD X
6 Receiving Facility 180 HD X
7 Date/Time of Message 26 TS R
8 Security 40 ST X  
9 Message Type 13 CM R
10 Message Control ID 20 ST R  
11 Processing ID 3 PT R  
12 Version ID 60 VID R 0104
13 Sequence Number 60 NM X
14 Continuation Pointer 180 ST X
15 Accept Acknowledgement Type 2 ID R 0155
16 Application Acknowledgement Type 2 ID O 0155
17 Country Code 3 ID X
18 Character Set 16 ID X
19 Principal Language of Message 250 CE X
20 Alternate Character Set Handling Scheme 20 ID X 0211
21 Conformance Statement ID 30 ID R  

Usage Description:

R Required
RE Required but may be Empty
O Optional
C Conditional
CE Conditional but it may be empty
x Not Supported


MSH.1 – Field Separator

This field contains the separator between the segment. The recommended character is |, (ASCII 124).
Data type is ST – String

Examples:

MSH|^~\&|LAB|QTE||30218|20090714023209||ORU^R01|20090714235298399160|P|2.3|||||||


MSH.2 – Encoding Characters

This field contains the four characters in the following order: the component separator, repetition separator, escape character, and subcomponent separator. Recommended values are ^~\& (ASCII 94, 126, 92, and 38, respectively).

Segment Terminator <cr> Terminates a segment record. This value cannot be changed by implementers.
Field Separator | Separates two adjacent data fields within a segment. It also separates the segment ID from the first data field in each segment.
Component Separator ^ Separates adjacent components of data fields where allowed.
Subcomponent Separator & Separates adjacent subcomponents of data fields where allowed. If there are no subcomponents, this character may be omitted.
Repetition Separator ~ Separates multiple occurrences of a field where allowed.
Escape Character \ Escape character for use with any field represented by an ST, TX or FT data type, or for use with the data (fourth) component of the ED data type If no escape characters are used in a message, this character may be omitted. However, it must be present if subcomponents are used in the message.



MSH.3 – Sending Application
This field uniquely identifies the sending application among all other applications within the network enterprise. The network enterprise consists of all those applications that participate in the exchange of HL7 messages within the enterprise. Entirely site-defined.
Data type is HD

Components: <namespace ID (IS)> ^ <universal ID (ST)> ^ <universal ID type (ID)>

CL^57768-2
CP^387564

The value of <namespace ID> represents the high-level naming authority that controls the assignment of laboratory identifiers that appear in the <universal ID> component. The preferred naming authority is CLIA, and laboratories with a CLIA identifier must send that identifier in the <universal ID> component, along with the value “CL” in the <namespace ID> component

Examples:
MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|
MSH|^~\&|SHIEL|SHIEL|H_Dx|999994|200904100656||ORU^R01|SH13857997|D|2.3|
MSH|^~\&|ELYSIUMCONNECT|THA-I||TUH|20080722001201||ORU^R01|22001202527|P|2.2



MSH.4 – Sending Facility

This field uniquely identifies the receiving application among all other applications within the network enterprise. The network enterprise consists of all those applications that participate in the exchange of HL7 messages within the enterprise. Entirely site-defined.
Data type is HD.

Components: <namespace ID (IS)> ^ <universal ID (ST)> ^ <universal ID type (ID)>


MSH.5 – Receiving Application

This field identifies the receiving application among multiple identical instances of the application running on behalf of different organizations.
Entirely site-defined.
Data type is HD.


MSH Segment Examples:

MSH|^~\&|Test|My CLINICAL LAB|Test|100|201309050000||ORU^R01||P|2.3|

image