This topic covers how Lookups work and are used in LabKey EHR. Lookups can only be set or changed by administrators, but all users will benefit by better understanding some key points.

What Are Lookups in EHR?

Lookups are simple lists of all possible values for specific columns in your data tables. In practice, these become the values available in the dropdown options for forms to enter data into those columns.

The purpose of lookups is to make data entry faster, easier, and provide data consistency, generally facilitating greater data usage and reporting power when you're dealing with consistently entered data.

How Often Do Lookups Change?

The intent of the EHR Lookups is to change very infrequently. These are generally things like Sex, Buildings, Birth Type, or Species, that could have occasion to change but certainly not a daily or even a monthly occurrence.

What Happens When Lookups Change?

When a Lookup changes, will the data entered using that lookup also change?

No. Lookups are just reference tables used to restrict the possible values you can enter. The user sees/chooses the "human readable" value, but for performance and data size the value stored with the actual data is the lookup value (code) instead of the full lookup name, generally the "key" for that row in that reference table. Depending on the structure of that reference table this could be a number or character string.

If you delete a row from that reference table, you will no longer see the human readable value, and the key will appear in angle brackets indicating a broken link.

For example, if one of the Species options is "Baboon", and later that value is deleted from the reference table, any rows in a Demographics table for animals with that species assigned will not change. You would, however, lose the human readable name when viewing those records in LabKey. Here is an example of how that might appear, where "19" is the code the now deleted row for "Baboon" (we call it a broken link or broken reference).

What if I want to no longer allow the use of a lookup but I don't want the broken link in historical data?

Many of the EHR lookup reference tables have a Date Disabled column which can be used to disable new use of that value (in new data entry or data edits) but retain existing use of the term.

If the lookup you want to be able to 'filter' does not have a Date Disabled column, or that column does not successfully filter the values, please contact your account manager. This filtering must be configured for each lookup reference table where needed.

Once configured, when a disabled date for a value is passed, that will make that option no longer a valid input for that column and therefore not shown in data entry drop down lists. However, it will still resolve as a reference with the human readable name for data that was already entered before the Date Disabled.

What if I have a misspelling or something I want to change in a lookup without breaking links in historical data?

Generally with lookup references, admins can change most of the fields and since it's just a reference, the change will be displayed in both historical and future data. The one field that will cause the reference not to resolve anymore is the Value (key) field. Changing the Value will cause existing data using it to show a broken link.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all