Documentation
Tutorials
Workflows
Kebab actions
Daily Work
Dashboard & Reports
Quality Control
ISO 17025
Reagents & Storage
Logs
Contacts
Billing
Analysis Setup
Settings
Initial Setup
Help & Reference
Standards
Architecture decisions
Positioning
Kebab actions
0:000:00

Handle a calibration-overdue block

Goal

When you try to approve an Analysis Record (AR) and approval is blocked because one of the linked instruments was out of calibration on the date the analysis was performed, this recipe describes the ELOT EN ISO/IEC 17025:2017-compliant resolution paths.

What counts is the instrument's status on the analysis date, not today (§6.4.13(e), §7.5.1: the status must be demonstrable for the date of the work). An instrument that was calibrated on the analysis date but has lapsed since does not block; one that was out of calibration that day stays blocked even after it is recalibrated today.

  • Option A — Correct the calibration record: the instrument was calibrated, but the record covering the analysis date is missing or has the wrong dates. Log or correct it from the certificate and re-run approval.
  • Option B — Repeat the analysis: the instrument really was out of calibration. The results are not covered; repeat the analysis on a calibrated instrument.
  • Option C — Documented override: the exception path. The Lab Director (LAB_DIRECTOR), Quality Manager (QUALITY_MANAGER), or Reviewer (REVIEWER) approves anyway, logging a justification of ≥20 characters. The override is audited.

No path is silent — every approval over an out-of-calibration instrument leaves a trace in the system.


Prerequisites

#PrerequisiteWhere verified
1The AR is in status REVIEWED, ready for transition to APPROVED.status field on the Analysis Detail page.
2At least one Measurement on the AR references an Instrument with requiresCalibration = true.Measurements tab on the AR.
3The calibration in force on the analysis date — the latest record on the instrument's Calibrations tab dated on or before it — has a next-due date before the analysis date. With no such record the instrument was not calibrated on that date (§6.4.4), and the approval is blocked as well.Calibrations tab of the instrument.
4For Option C, the user holds a role allowed by the "Quality System Override" role-permission entry — default: LAB_DIRECTOR, QUALITY_MANAGER, or REVIEWER.Settings → Role Permissions.
5For Option A, the user can create or edit a CalibrationRecord on that instrument.Role permissions.

Instruments with requiresCalibration = false (e.g. volumetric glassware, manual tools), and instruments whose record in force has no next-due date, are exempt and do not trigger the block.

Pre-flight check before picking a path

Before choosing between A and B, open the Measurements tab on the AR and note:

  • Which instruments block — usually one or two, rarely all. For each, first open its Calibrations tab and look for a record covering the analysis date: a missing or mis-dated record is the most common cause, and Option A fixes it.
  • How long before the analysis the calibration ran out — one day needs a different justification than one month.
  • Whether a CAPA is already open for the instrument — Option C should be linked to an existing or new corrective action.

Steps

  1. Attempt the approval. On the AR Detail page, click the "Approve" button in the action row — there is no kebab menu; it appears directly. If an instrument was out of calibration on the analysis date, the backend returns an error with extension code errors.approvalBlockedCalibration. The frontend recognises the code and opens the override dialog instead of a generic snackbar; the message names the analysis date and each instrument (name, serial number, the date its calibration ran out).
  2. Option A — Correct the calibration record (the instrument was in fact calibrated).
  • Dismiss the override dialog with Cancel.
  • Navigate to Instruments → select the instrument → Calibrations tab.
  • Log the missing CalibrationRecord, or correct the existing one, with its real dates from the certificate: calibrationDate on or before the analysis date, nextDueDate on or after it, the certificate number and withinTolerance. A date older than the late-entry threshold asks for a late-entry reason — say why the record is being entered now.
  • Return to the AR and re-run Approve. The guard now finds the record in force and the AR transitions to APPROVED with no override recorded.
  • Recalibrating the instrument today does not clear the block: that record is dated after the analysis.
  1. Option B — Repeat the analysis (the instrument really was out of calibration). The results were produced outside calibration and are not covered. Calibrate the instrument (or use another, calibrated one), repeat the analysis as a new analysis record, and cancel the original with the reason.
  2. Option C — Documented override (exception path).
  • In the override dialog (still open), fill in the override reason text field. The justification should cover:
  • why the analysis cannot be repeated (e.g. sample consumed, holding time exceeded),
  • why the results are metrologically defensible anyway (e.g. internal QC against a known reference material was in control on that day, the next calibration found the instrument within tolerance),
  • what corrective action is taken (CAPA, calibration programme review).
  • The field requires at least 20 characters; shorter submissions are rejected.
  • Click Submit. The AR transitions to APPROVED and an audit-trail event OVERRIDE_CALIBRATION_APPROVE is written with userId, entityType = 'AnalysisRecord', entityId, reason, timestamp, and the list of overdue instruments as changes.
  1. Confirm the audit entry. On the AR, the "Record History" tab shows the entry with the full justification and the approving user. It is never deleted — it forms part of the assessment record for the ESYD assessor.

That tab is a plain list — no filter or CSV export there. To filter by action (OVERRIDE_CALIBRATION_APPROVE) and export CSV for the internal-audit folder, use the standalone Audit Trail page (/audit-trail, gated by the "Audit Trail" permission). The export carries user, timestamp, justification, and the related data — exactly what §6.4.7 expects you to have available.

  1. Monitor exposure. From the Business Dashboard, the "Revenue at Risk (Calibration)" card shows the invoiced revenue of sample orders that touched an overdue instrument (not a queue of pending approvals) — if even one sample on an order was analysed on an overdue instrument, the whole order counts as exposed. Use it to prioritise which instruments to calibrate first.

Override-reason template

To avoid repeated rejections for insufficient documentation, structure the justification as:

"Calibration of <instrument name> (S/N <serial>) had expired on <date>, before the analysis date <date>. The analysis cannot be repeated because <reason — e.g. sample consumed, holding time exceeded>. Metrological confidence is maintained via <internal QC against reference material Lot XXX within limits / duplicate analysis on backup instrument>. CAPA-<number> has been opened and calibration is scheduled for <date>."

What happens behind the scenes

The block logic is implemented in the _enforceCalibrationGuard method of analysis-record.resolver.ts. For each Measurement on the AR, the distinct instrumentId values are collected and the Instrument rows with requiresCalibration = 1 are loaded. For those, calibrationsInForceAt() (calibrations/calibration-at-date.ts — the same lookup the vertical audit pack uses) returns the calibration record in force on the analysis date: the latest CalibrationRecord with calibrationDate <= the analysis date. The instrument blocks when that record's nextDueDate is before the analysis date, and also when there is no such record (not calibrated on that date). A record in force with no end date → exempt. The analysis date is taken as a date in the server's local timezone.

If nothing blocks, the guard passes immediately; otherwise, without an overrideReason, the method throws a GraphQLError with extension code errors.approvalBlockedCalibration and an instruments[] payload carrying id, name, serialNumber, and nextCalibrationDate — the date the calibration ran out (the record's nextDueDate; empty when the instrument had no calibration in force).

On the override path, the shared OverrideHelper.assertAndRecord() helper (common/override.helper.ts) performs these checks in order:

  1. The role passes isOverrideRole(role) — otherwise rejected with the message errors.overrideCalibrationDenied. This check is not hard-coded to the three named roles — it reads the tenant's QUALITY_SYSTEM_OVERRIDE role-permission entry (Settings → Role Permissions), whose default happens to be exactly LAB_DIRECTOR + QUALITY_MANAGER + REVIEWER, but can be changed.
  2. reason.trim().length >= 20 (the MIN_OVERRIDE_REASON_LENGTH constant) — otherwise rejected with the message errors.overrideReasonTooShort.
  3. Calls recordEvent({ action: 'OVERRIDE_CALIBRATION_APPROVE', ... }), which writes the entry to the shared AuditTrail table (not a separate "OverrideLog" — it's the same table every audit event in the tenant is written to).

The order is intentionally fail-fast: a user without the role will never see a "reason too short" message and therefore cannot probe the system for how to slip past the check.

A short Greek + English narrative is part of the guard's error message itself, so even tooling that does not surface extensions.instruments (e.g. raw curl) still shows which instrument is overdue.

On the frontend, the AnalysisDetail component (analysis-detail.ts, around lines 840-862) inspects err.errors[0].extensions.code (Apollo v4 shape) and opens the override dialog via showOverrideDialog.set(true), stashing the recordId in pendingApprovalRecordId. Submitting the reason calls the same mutation again, this time with overrideReason set — the guard re-runs, sees the reason, and proceeds to log it.

Edge cases

  • An instrument that has been used in a measurement cannot be deleted. The instrumentId column on Measurement has a foreign key to Instrument with no CASCADE — deleting the instrument fails with a foreign-key error as long as any measurement references it. The "deleted instrument, orphaned measurement" scenario therefore cannot occur through normal application use.
  • Multiple overdue instruments on the same AR: the override dialog lists all of them. A single reason covers the lot — you do not file one override per instrument.
  • Out-of-tolerance calibration (withinTolerance: false): the approval guard judges only the dates of the record in force; an out-of-tolerance or not-fit-for-use record is flagged by the vertical audit pack. Treat such results under §6.4.9 (Option B or C).
  • Instrument field vs records: the instrument's "Last Calibration" and "Next Calibration" are read-only; every save or deletion of a CalibrationRecord copies them from the latest record. The approval guard reads only the records in force on the analysis date; the instrument fields feed the lists, the badge and the work checks.

Important bulk-approve caveat. The bulk-approve path (analysis-record.resolver.ts, around line 1787) calls _enforceCalibrationGuard(r, undefined, userRole, userId) with overrideReason = undefined, so no override is allowed: every AR with an out-of-calibration instrument fails and must be fixed individually: a corrected record, a repeat, or an override with a reason. This is intentional — bulk approval must not become a shortcut for exceptions.

If you need to clear a large queue, the workflow is:

  1. Run bulk-approve to discover which ARs fail.
  2. Group failures by instrument.
  3. Check those instruments' Calibrations tabs for missing or mis-dated records covering the analysis dates, and fix them (Option A).
  4. Re-run bulk-approve; remaining failures are repeated (Option B) or handled one by one via the override dialog with full justification (Option C).

  • §6.4.6 — Calibration of measuring equipment for traceability. All equipment that affects measurement uncertainty must be calibrated according to a documented programme. Overdue calibration compromises the traceability claim.
  • §6.4.7 — Calibration programme and review. The lab documents calibration frequencies, intermediate checks, and reviews the programme when deviations are detected. The override path should feed a CAPA that informs the next programme review.

For the full clause text, see Reference → ISO/IEC 17025:2017.


Tip for ESYD assessments

ESYD assessors frequently spot-check override examples. A well-structured AuditTrail entry with a clear justification, a CAPA reference, and metrological-confidence evidence (QC charts, replicate measurements on a backup instrument) is strong evidence that the lab is not silently bypassing controls but handling the exception with maturity. Conversely, terse "emergency" justifications are a red flag.

Systematic use of Option C (for example more than 5 overrides per month on the same instrument) should trigger a review of the calibration programme under §6.4.7 and possibly an increase in frequency or a change of provider.