LIMS Admin Value Flags - hmislk/hmis GitHub Wiki
Value Flags
A value flag is a rule attached to an investigation parameter that triggers a custom message when a result falls within a defined threshold. Unlike a standard reference range indicator (which simply shows H or L), flags can carry clinical messages — for example, "Show this result to the doctor immediately" or "Repeat the sample — value is critically high." Flags support age-based and sex-based filtering, so the same parameter can trigger different messages for different patient groups.
When to Use Flags
Use flags when:
- A result value is not just abnormal, but clinically critical and requires immediate action.
- You want to display a specific advisory message on the report rather than just an H/L indicator.
- Different age groups or sexes warrant different alert levels for the same parameter.
Accessing Flag Configuration
- Go to Menu > Admin > LIMS > Investigations.
- Open the investigation and then open the specific item (parameter).
- Go to the Flags sub-tab (or click Add Flag).
Adding a Flag
- Click Add Flag.
- Fill in the following fields:
Trigger Conditions
| Field | Description |
|---|---|
| From value | The lower bound of the value range that triggers this flag |
| To value | The upper bound of the value range that triggers this flag |
| Sex | Male, Female, or Any — restricts the flag to a specific sex |
| From age | Minimum patient age for this flag to apply |
| To age | Maximum patient age for this flag to apply |
Example: A flag for critically high serum potassium in adults:
- From value: 6.0
- To value: 99.9 (no practical upper limit)
- Sex: Any
- From age: 18
- To age: 120
Messages
Configure up to four independent messages. Each message can be independently switched on or off using the corresponding display toggle:
| Message field | Toggle field | When displayed |
|---|---|---|
| Flag message | Display flag message | Whenever the flag condition is met |
| High message | Display high message | When the value is above the high threshold |
| Low message | Display low message | When the value is below the low threshold |
| Normal message | Display normal message | When the value is within the normal range (optional — rarely used) |
Example messages:
- Flag message: "CRITICAL VALUE — Notify the requesting physician immediately"
- High message: "Critically high potassium — risk of cardiac arrhythmia"
- Low message: "Critically low haemoglobin — consider urgent transfusion"
- Enable the display toggle for each message you want to appear.
- Click Save Flag.
Multiple Flags on One Parameter
You can add multiple flags to the same parameter to cover different value ranges or age/sex groups. For example, a haemoglobin parameter might have:
| Flag | From value | To value | Sex | Message |
|---|---|---|---|---|
| Critical low (female) | 0 | 7.0 | Female | "Critically low — urgent review required" |
| Critical low (male) | 0 | 8.0 | Male | "Critically low — urgent review required" |
| Critical high | 20.0 | 99.9 | Any | "Critically high — consider polycythaemia" |
How Flags Appear During Result Entry
When an MLT enters a value that meets a flag condition:
- The flag message appears next to the value field on the result entry screen.
- The message is highlighted (typically in red for critical high, or a contrasting colour for low).
- The MLT can still save and approve the report — flags are informational by default unless a validation rule also blocks approval.
Flags and the "Requires Immediate Doctor Review" Toggle
Flags are separate from the manual Requires Immediate Doctor Review toggle. Flags are automatic (triggered by value thresholds); the toggle is manual (set by an authorised user after reviewing the result). Both can be active on the same report.
See Result Flags & Critical Values for the user-facing explanation.