Gains:
- Ability to monitor internal quality control, Levey-Jennings chart and Westgard rules with artificial intelligence support and interpret violations
- Ability to establish delta check logic (comparison with the previous result of the same patient) and distinguish artificial intelligence warnings for pre-analytical and clinical reasons
- Ability to understand that the artificial intelligence output is a statistical warning and that root cause analysis and corrective action belong to the expert.
The quietest but most vital job in a laboratory is making sure measurements are accurate. The device gives you a potassium value; But how do you know that that device is making accurate measurements today, at this time, with this reagent? Quality control (QC) is the answer to this question: measuring control samples of known value at regular intervals and monitoring whether the results of the device remain within the expected range. In addition, the delta check, which compares the same patient's outcome today with their outcome in the past, is a powerful second line of defense that catches errors such as sample mix-up. In both areas, AI can quickly scan for patterns and generate alerts; But what the warning means and what to do depends on the expert's interpretation.
In this unit, the logic of internal quality control, Levey-Jennings chart and Westgard rules; how delta check is set up and interpreted; and how to safely add artificial intelligence to these processes. Basic principle: AI produces a statistical alert; Root cause analysis and corrective action belong to the expert.
The logic of internal quality control
In internal quality control, control material with known content and expected value (usually at normal and pathological levels) is measured together with patient samples. Each control measurement is evaluated around a calculated mean and standard deviation (SD) for that analyte. Standard deviation is a statistical measure of how far measurements are spread around the mean; A small SD indicates that the measurement is consistent (precise).
The standard way to visualize these measurements is the Levey-Jennings chart: on the horizontal axis is the time (or control order), on the vertical axis is the control value; The mean is drawn in the middle, and ±1SD, ±2SD, ±3SD lines are drawn as bands. Control points should be randomly distributed within these bands. Certain patterns (one dot falling too far, many dots shifting in the same direction) indicate a problem.
Westgard rules are used to systematically evaluate these patterns. Most frequently used:
rule
Meaning
Typical comment
1-2s
One point outside ±2SD
Warning; not rejection alone
1-3s
One point outside ±3SD
Rejection; probability of random error
2-2s
Two consecutive points in the same direction outside ±2SD
Rejection; systematic error (drift)
R-4s
4SD difference between two controls
Refusal; random error
4-1s
Four consecutive points in the same direction outside ±1SD
Drift warning
10-x
Ten consecutive points are on the same side of the mean
systematic shift
Random error is an unpredictable one-time deviation (e.g. air bubble). Systematic error is a constant deviation in the same direction (e.g. calibration drift, deteriorated reagent). Westgard rules help distinguish these two types of errors.
Caution: A 1-2s warning alone does not negate the result; But a missed 1-2s may herald a subsequent 2-2s violation. Don't underestimate the warnings, follow the pattern.
How to add AI to QC
AI works where the human eye gets tired in QC data: it can scan the Levey-Jennings pattern of hundreds of analytes simultaneously, flag slow drifts early, list rule violations, and produce a checklist that reminds you of possible root causes (calibration time, reagent lot, instrument maintenance). But the sentence produced by the AI "the calibration may have shifted" is a hypothesis; It is the specialist's job to find the true root cause, replace the reagent, calibrate the device, and re-evaluate affected patient outcomes.
The critical rule is that when a Westgard rejection rule is violated, patient results for that analyte are not released until the problem is resolved. AI can remind this blocking, but the responsibility for implementation lies with the human.
Delta check: comparison with the patient's own history
Delta check is comparing the current result of the same patient with the previous result and marking an unexpected major change. The logic is simple: many analytes (e.g. blood group, hemoglobin, creatinine) do not change dramatically in a short time. If a patient's hemoglobin was 13 g/dL the day before and 8 g/dL today, there are three possible explanations: (1) true clinical change (bleeding), (2) pre-analytical error (wrong patient, sample mix-up), (3) analytical error. Delta check marks this difference; The expert investigates which explanation is correct.
Delta check is most valuable in catching sample mix-up (wrong label on wrong tube). When multiple parameters of a patient change unexpectedly at the same time, it is a strong signal of interference.
Attention when interpreting Delta check:
- Not every major change is a mistake; Real clinical events like bleeding, dialysis, transfusion create real big change.
- The time period is important: comparison with the result months ago can be misleading.
- Some analytes naturally fluctuate (e.g. CRP); The delta threshold should be adjusted according to the analyte.
Weak prompt / Strong prompt
Weak prompt:
Is there any problem with this QC data? [digits]
This claim does not specify which rules to apply, mean and SD, or what the analyte is. The AI makes a general comment, but cannot apply Westgard logic correctly and gives superficial answers instead of the root cause.
Powerful prompt:
Your role: assistant to laboratory specialist preparing QC assessment DRAFT.Analyte: Potassium. Control level 2. Target mean 6.0 mmol/L, SD 0.15. Last 12 control values: [list]. Task: (1) calculate and show how many SD away each point is, (2) check Westgard 1-3s, 2-2s, R-4s, 4-1s, 10-x rules one by one and write down which one is violated, (3) remind possible root causes (calibration, reagent lot, device) if there is a violation Present it as a list. The decision and corrective action are mine; You just calculate and check.
The strong prompt gives mean/SD, counts which rules to apply, asks for interim calculations, and states that the decision is up to the human.
three mini cases
Case 1 — Systematic error caught. In a biochemistry laboratory, glucose control is consistently above average at ten consecutive points (10-x rule). AI flags this pattern and presents the hypothesis of “new reagent lot or calibration drift”. The expert examines the records, finds the reagent lot that changed four days ago, and recalibrates the device. During this period, 340 patients' glucose results are reviewed. AI saw the pattern, expert found the root cause.
Case 2 — Sample mix-up with Delta check. A patient's hemoglobin was 12.8 g/dL yesterday, 9.1 g/dL today; At the same time, his creatinine increased from 0.9 to 2.4 mg/dL and his potassium increased from 4.2 to 5.9 mmol/L. AI flags multiple delta violations. The expert sees that simultaneous jumps of multiple parameters suggest sample mixing; checks the records and finds the tagging error. A new sample is requested. Not a single delta saved the pattern.
Case 3 — False alarm (real change). In one dialysis patient, urea decreased from 140 to 45 mg/dL in one day; delta check marks the big change. The AI produces alerts, but the specialist knows that the patient had dialysis yesterday; This is an expected, real change, not a mistake. The result is released. Lesson: the delta stimulus is a question mark, the clinical context provides the answer.
Copiable prompt templates
WESTGARD CONTROL TEMPLATEAnalyte: [name]. Average: [x]. SD: [x]. Control values: [list].Calculate and display (value - mean)/SD for each value. Check these rules one by one: 1-2s, 1-3s, 2-2s, R-4s, 4-1s, 10-x. For each rule, write "there is/is no violation" and the reason. If there is a rejection rule violation, add a "DO NOT RELEASE PATIENT RESULTS" warning. The decision is mine.
QC ROOT CAUSE CHECKLIST TEMPLATEA QC reject rule was violated. Produce me a sequential checklist for root cause investigation: reagent lot/expiration, calibration time, control material status, instrument maintenance, probe/pipette, ambient temperature. Write in one sentence what to check for each item. I have the final comment.
DELTA CHECK TEMPLATEPatient anonymous. Analyte: [name]. Previous result ([date]): [x]. Current: [y].Calculate absolute and percentage change. Which of three possible causes for this change might be consistent with: true clinical change, pre-analytical error (confounding), or analytical error? List me what additional information I need to check for the decision. Diagnosis/decision making.
MULTIPLE DELTA PATTERN TEMPLATEI will give previous and current values for multiple analytes of the same patient. Mark which analytes have unexpected large changes. If more than one analyte changes unexpectedly at the same time, warn of "possible sample mix-up" and write what I should check for confirmation. Data: [list].
Common mistakes
- Mistaking the 1-2 second warning as a rejection. 1-2s is a warning; By itself it does not negate the result, but it must be followed.
- Release patient result in violation of QC. If the rejection rule is violated, the relevant results are held until the root cause is found.
- Blindly considering the delta warning as a mistake. Conditions such as dialysis, transfusion, bleeding create real big change; context is taken into consideration.
- Mistaking AI's root cause hypothesis as proof. "The reagent may have shifted" is a hypothesis; The real cause is found by recording and examination.
- Taking the delta threshold the same for all analytes. The biological variability of each analyte is different; The threshold is set according to the analyte.
Tip: When giving QC data to YZ, be sure to include the mean and SD and ask it to show interim calculations. “How many SD away?” Have the AI calculate the question and verify it in your head; this catches both the AI's mistake and yours.
In summary
Quality control is about making sure the device measures correctly; Delta check is a way to catch errors at the sample and patient level. The Levey-Jennings chart and Westgard rules systematize QC; distinguishes between random and systematic error. Artificial intelligence can quickly scan these patterns and generate warnings and root cause hypotheses, but in case of rejection rule violation, the result of blocking, root cause finding and corrective action belongs to the expert. Delta check warnings are question marks; Clinical context and examination provide the answer.
Application task
Take the last 12 QC values (with mean and SD) for an analyte and evaluate to AI with the “Westgard Control” template. Independently check the SD distances calculated by AI. Then select two timed results for a patient, follow the “Delta Check” template, and evaluate the three possible reasons for the change using your own clinical knowledge and write down what additional information you would check.
checklist
- [ ] For QC, I gave the mean and SD to the prompt; I checked the intermediate accounts.
- [ ] I have clearly stated the Westgard rules that will apply.
- [ ] I confirmed that I will hold patient results in case of rejection rule violation.
- [ ] I evaluated the delta warning along with the real likelihood of clinical change.
- [ ] I checked for sample mix-up in multiple delta violations.
- [ ] I confirmed the AI's root cause hypothesis by recording/examination.