labevents

Laboratory measurements sourced from patient derived specimens.

labevents

The labevents table stores the results of all laboratory measurements made for a single patient. These include hematology measurements, blood gases, chemistry panels, and less common tests such as genetic assays.

  • d_labitems on itemid

Important considerations

hadm_id is assigned to labs close to the hospital stay using the transfers table. However this does not always perfectly capture labs proximal to the hospital stay. To be specific, as of v2.1, it is possible to assign 59,327,830 observations with an hadm_id using a join to admissions withsubject_id, admittime, and dischtime. However, only 58,131,956 (98%) of these observations have an hadm_id actually stored in the labevents table. Users wishing to ensure capture of labs proximal to hospital stays should be aware of this, and use joins with time as necessary.

The following conditions must occur in order for this data to not have an hadm_id in the table:

  • the lab observation must fall outside of a row in transfers
  • the lab observation must not have an associated ED stay identifier

Table columns

Name Postgres data type
labevent_id INTEGER NOT NULL
subject_id INTEGER NOT NULL
hadm_id INTEGER
specimen_id INTEGER NOT NULL
itemid INTEGER NOT NULL
order_provider_id VARCHAR(10)
charttime TIMESTAMP(0)
storetime TIMESTAMP(0)
value VARCHAR(200)
valuenum DOUBLE PRECISION
valueuom VARCHAR(20)
ref_range_lower DOUBLE PRECISION
ref_range_upper DOUBLE PRECISION
flag VARCHAR(10)
priority VARCHAR(7)
comments TEXT

labevent_id

An integer which is unique for every row in the table.

subject_id

subject_id is a unique identifier which specifies an individual patient. Any rows associated with a single subject_id pertain to the same individual.

hadm_id

hadm_id is an integer identifier which is unique for each patient hospitalization.

specimen_id

Uniquely denoted the specimen from which the lab measurement was made. Most lab measurements are made on patient derived samples (specimens) such as blood, urine, and so on. Often multiple measurements are made on the same sample. The specimen_id will group measurements made on the same sample, e.g. blood gas measurements made on the same sample of blood.

itemid

An identifier which uniquely denotes laboratory concepts.

order_provider_id

order_provider_id provides an anonymous identifier for the provider who ordered the laboratory measurement. Provider identifiers follow a consistent pattern: the letter “P”, followed by either three numbers, followed by two letters or two numbers. For example, “P003AB”, “P00102”, “P1248B”, etc. Provider identifiers are randomly generated and do not have any inherent meaning aside from uniquely identifying the same provider across the database.

charttime

The time at which the laboratory measurement was charted. This is usually the time at which the specimen was acquired, and is usually significantly earlier than the time at which the measurement is available.

storetime

The time at which the measurement was made available in the laboratory system. This is when the information would have been available to care providers.

value, valuenum

The result of the laboratory measurement and, if it is numeric, the value cast as a numeric data type.

valueuom

The unit of measurement for the laboratory concept.

ref_range_lower, ref_range_upper

Upper and lower reference ranges indicating the normal range for the laboratory measurements. Values outside the reference ranges are considered abnormal.

flag

A brief string mainly used to indicate if the laboratory measurement is abnormal.

priority

The priority of the laboratory measurement: either routine or stat (urgent).

comments

Deidentified free-text comments associated with the laboratory measurement. Usually these provide information about the sample, whether any notifications were made to care providers regarding the results, considerations for interpretation, or in some cases the comments contain the result of the laboratory itself. Comments which have been fully deidentified (i.e. no information content retained) are present as three underscores: ___. A NULL comment indicates no comment was made for the row.


Last modified February 3, 2023 : add info regarding provider_id (8063775)