Skip to the lesson
CivOps AI Academy · M10Laboratory (LIMS): Samples, Specifications, Results, OOS and Certificates of Analysis
0%

Chapter 1 · Purpose, scope and standards

From sample to certificate

A laboratory information management system (LIMS) records every sample from collection to an approved result and a certificate of analysis. This chapter sets out what the module does, what it leaves to others, the standards behind it, and how a sample and its chain of custody are kept.

20 min14 lims_ tables8 sample statuses11 capabilities

By the end of this chapter you can

  • Describe the laboratory workflow from registering a sample to a signed certificate of analysis.
  • Say what M10 leaves to other modules, and which standards it is built to.
  • Name the sample types, sampling points, statuses and custody actions, and say what makes a chain of custody complete.

What a LIMS does

A laboratory tests samples and reports results that other people act on: release a lot, reject a delivery, change a process. A LIMS holds the whole path. A sample is registered and labelled, received, stored, assigned to an analyst and an instrument, tested, judged against a specification, reviewed, approved, and reported on a certificate of analysis (CoA). Every step names the person and the time, so a result can be traced back to the sample and forward to the lot it released [1][2].

From sample to certificateEight steps in two rows: register, receive, assign, enter result, review, approve, disposition and certificate of analysis. Registernumber given,spec version pinnedReceivecustody andstorage recordedAssignworklist andinstrument chosenEnter resultflags set bythe database ruleReviewfirst signatureApprovesecond signatureDispositionpass, fail orconditionalCertificatesigned PDFfor the lotEvery arrow is a status change, and every status change is a recorded step.
The workflow in eight steps. Register, receive, assign, enter the result, review, approve, set the disposition, issue the certificate. The specification version is fixed at the first step, and the flags are set when the result is entered.

The laboratory standard behind this is ISO/IEC 17025:2017, which sets general requirements for the competence of testing and calibration laboratories, including how results are recorded, data are controlled and results are reported [4]. ASTM E1578 is the Standard Guide for Laboratory Informatics, and the public LIMSpec requirement set is mapped to it [3].

Where the module stops

M10 owns the sample, the test and the result. It does not own the equipment's calibration, the analyst's training or the instrument's own data system. It reads their state before it lets work go ahead where those modules are installed; where they are not, the analyst records a manual check on the test.

Scope of the moduleTwo panels: inside M10 are samples, methods and specifications, worklists, evaluation, investigations, stability, environment and reagents; outside are calibration, training, the chromatography data system, deviations and CAPA, and controlled SOPs. Inside M10Samples, labels and chain of custodyMethods and versioned specificationsWorklists and result captureEvaluation: in spec, OOS, OOTOOS investigations, review, certificateStability, environment, reagentsCalibration executionM05 · the LIMS checks statusAnalyst training recordsM07 · the LIMS checks qualificationChromatography data systemintegrate it, do not replace itDeviation and CAPAquality module · OOS Phase IIControlled SOPsdocument module · soft linkOutside M10: each has an owner
Inside and outside M10. Calibration execution belongs to M05 and training records to M07; M10 checks calibration status and analyst qualification before a test is released, by reading M05 and M07 where installed and otherwise from a manual check recorded on the test. A chromatography data system is integrated, not replaced. Phase II of an OOS investigation hands off to the quality module.

The standards, and what each is used for

StandardUsed in this module for
ASTM E1578-18Standard Guide for Laboratory Informatics; the LIMSpec requirement set is mapped to it
ISO/IEC 17025:2017Competence of testing and calibration laboratories
21 CFR 211.160 to 211.194; 21 CFR Part 11; EU Annex 11Laboratory controls and records; electronic records and signatures
FDA guidance: Investigating OOS Test Results for Pharmaceutical Production (rev. 2022)Phase I laboratory and Phase II full-scale investigations
ICH Q1A(R2); ICH Q2(R2)Stability testing; validation of analytical procedures
SiLA 2 and ASTM AnIMLInstrument control and analytical data interchange
ISPE GAMP 5 (2nd ed.)Risk-based computerised system validation

You do not need to own every standard to build the module. You need to know which rule each design choice serves, and to ask your quality manager what your own accreditation body or regulator expects. ASTM and ISO standards are paid documents; their price and edition are on the publisher's own page, and ASTM's page for E1578 lists an earlier edition (-06) than the -18 this module maps to.

Eleven capabilities by tier

The module library marks each capability MVP (must have before a laboratory can replace its tool), STD (parity with mainstream tools) or BIC (a best-in-class difference).

CapabilityWhat it doesTier
Sample managementLog in single, batch or scheduled samples; labels; aliquots; storage; chain of custodyMVP
Methods and specificationsVersioned methods; specifications by item, stage and customer, effective-datedMVP
Result entry and calculationManual, instrument file or calculated; limits feedback; raw data attachedMVP
Spec evaluationAutomatic in spec, OOS and OOT flagsMVP
Review and approvalTwo levels with e-signatures; sample and lot dispositionMVP
Worklists and instrumentsAssign tests; check calibration status and analyst qualification (read from M05 and M07 where installed, otherwise a manual check noted on the test)STD
OOS investigationPhase I laboratory, Phase II escalation to the quality moduleSTD
Certificate of analysisPer lot and customer specification, signed, PDFSTD
Reagents and standardsReceipt, opening, preparation, expiry, traceability to resultsSTD
Stability studiesProtocols, conditions, pull points, scheduled samples, trendingBIC
Environmental monitoringLocations, alert and action limits, scheduled sampling, excursionsBIC

Samples, sampling points and custody

A sampling point is a place a sample is drawn: a tank outlet, a receiving dock, a water tap, an air or surface location. Its type is one of process, raw_receipt, finished, environmental, utility_water, air or surface. It may carry a schedule written as a recurrence rule, so sampling can be planned and not remembered.

A sample has a type: raw, in_process, finished, stability, environmental, water, retain, complaint or investigation. It has a priority (routine, rush or stat), a number issued by the system, and links to the item, the lot, the sampling point and the specification. A child sample (an aliquot, a portion taken for a separate test) points at its parent. Samples are logged in singly, in a batch (the same route once for each vial) or on a schedule (a planned sample created from the sampling point's recurrence rule, which moves to collected when it is drawn), and each gets a label that carries its number as a barcode.

Sample statusesSix statuses left to right: planned, collected, received, in_testing, in_review, approved. From in_review a sample can be rejected; approved and rejected samples end as disposed. plannedcollectedreceivedin_testingin_reviewapprovedrejecteddisposedApproval and rejection wait until every OOS investigation on the sample is closed.The disposition (pending, pass, fail, conditional) is a second column on the same sample.
A sample's statuses. It moves forward from planned to approved. A sample can be rejected from review; approved and rejected samples are finally disposed. Disposition (pending, pass, fail, conditional) is recorded separately and feeds the lot's release or hold.

The chain of custody is the unbroken record of who held a sample and where it was. Each hand-over is a row in lims_custody_event with one of seven actions: collected, transferred, received, stored, retrieved, consumed or disposed. Rows are added and never changed; a mistake is corrected by a new row. A chain is complete when the events begin with collected, include received and stored, run in time order, and each from-person equals the previous to-person.

Chain of custody for one sampleA time line from 07:00 to 10:00 drawn to scale with four custody events: collected at 07:30, received at 09:00, stored at 09:10 and retrieved at 09:40. 07:0008:0009:0010:00collected07:30to requesterreceived09:00requester to analyststored09:10to analyst, LAB-FR-01retrieved09:40to analystSMP-2026-0001 on 2026-06-10: four events in time order, each from-person the previous to-person.
Custody of one sample, drawn to scale. SMP-2026-0001 is collected at 07:30, received at 09:00, stored ten minutes later and retrieved at 09:40. Four events, no gaps.

Knowledge check

A balance is out of calibration. Which module owns fixing that, and what does the LIMS do?

Knowledge check

Which description of a complete chain of custody is right?

References

  1. LIMSwiki: LIMSpec primary laboratory workflow (mapped to ASTM E1578-18). https://limswiki.org/index.php/LII:LIMSpec/Primary_Laboratory_Workflow
  2. LIMSwiki: LIMSpec sample management. https://limswiki.org/index.php/Template:LIMSpec/Sample_management
  3. ASTM: E1578 Standard Guide for Laboratory Informatics. https://store.astm.org/e1578-06.html
  4. ISO/IEC 17025:2017 General requirements for the competence of testing and calibration laboratories. https://www.iso.org/standard/66912.html
  5. LIMSwiki: the most important features of a LIMS. https://limswiki.org/index.php/LIMS_Q%26A:What_are_the_most_important_features_of_a_laboratory_information_management_system_(LIMS)%3F

Chapter 2 · The data model

Methods, specifications and the pin

Fourteen tables hold the module. Two rules keep the results honest from the start: methods and specifications are versioned and never edited once in force, and every sample is pinned to the specification version in force when it was logged in.

25 min14 tables4 statuses of a specification1 pin

By the end of this chapter you can

  • Name the fourteen lims_ tables and say what each holds, including the columns that carry allowed values.
  • Explain how methods and specifications are versioned, and what each status means.
  • Say why a sample is pinned to one specification version and what goes wrong when it is not.

Fourteen tables on the shared spine

Every table starts with the standard columns every platform table has: id, tenant_id, created_at, created_by, updated_at, updated_by, row_version, archived_at and ext. The module keeps no item list, lot list, people table or signature store of its own. It points at core_item, core_lot, core_person, core_equipment, core_storage_location, core_party, core_uom, core_attachment and core_e_signature. Its own tables share the prefix lims_.

The fourteen lims_ tablesFour groups of tables: methods and specifications, samples, testing, and stability and release. Specifications have limits; samples point at one specification, have custody events and tests; tests have results; results have OOS investigations. Methods and specstest_methodspec_limitspecificationSamplessampling_pointsamplecustody_eventTestingworklisttestresultoos_investigationStability, releasestability_studystability_pullreagentcoaArrows run from the one side to the many side. Names drop the lims_ prefix. The amber arrow is the pin:a sample points at one specification version. The dashed cyan arrow: a stability pull creates a sample.
The fourteen tables. A specification has many limits, each tied to a method. A sample points at one specification, has custody events and tests; a test has results; a result can have an OOS investigation. Stability studies create samples through their pull points.

The table below is the full definition: every column the module adds to the standard ones, with its type and whether it is required (req). Types are text, int, num (a decimal number, never a float), bool, date, ts (a timestamp with time zone), uuid and json; an arrow means a hard foreign key to that table. Four columns are soft links, plain uuid columns with no foreign key, because the table they point to belongs to a module that may not be installed: sop_doc_ref and protocol_doc_ref (document control), production_order_ref (production) and quality_event_ref (quality).

TableHoldsColumns: type, req = required
lims_test_methodA versioned analytical methodcode text req; version text req; name text req; technique text; sop_doc_ref uuid (soft link); analytes json req; calculations json; status text req: draft, active or retired
lims_specificationOne version of a specification for an item, stage and customerspec_no text req; version text req; item_id → core_item req; stage text req: raw, in_process, release, stability, customer or environmental; customer_party_id → core_party; status text req: draft, approved, effective or superseded; effective_at ts; approved_signature_id → core_e_signature
lims_spec_limitThe limit for one analyte of a specificationspecification_id → lims_specification req; test_method_id → lims_test_method req; analyte text req; lsl num; usl num; target num; uom_id → core_uom; text_spec text; reportable bool req; oot_rule json
lims_sampling_pointWhere samples are drawncode text req, unique; name text req; equipment_id → core_equipment; storage_location_id → core_storage_location; point_type text req: process, raw_receipt, finished, environmental, utility_water, air or surface; schedule_rrule text; active bool req
lims_sampleA laboratory samplesample_no text req, unique; sample_type text req (nine values, previous section); item_id → core_item; lot_id → core_lot; sampling_point_id → lims_sampling_point; specification_id → lims_specification; production_order_ref uuid (soft link); parent_sample_id → lims_sample; collected_at ts; collected_by → core_person; received_at ts; received_by → core_person; status text req: planned, collected, received, in_testing, in_review, approved, rejected or disposed; priority text req: routine, rush or stat; storage_location_id → core_storage_location; disposition text: pending, pass, fail or conditional
lims_custody_eventOne step in the chain of custodysample_id → lims_sample req; action text req: collected, transferred, received, stored, retrieved, consumed or disposed; from_person_id → core_person; to_person_id → core_person; storage_location_id → core_storage_location; at ts req
lims_worklistA batch of tests for one analyst and instrument runworklist_no text req, unique; instrument_equipment_id → core_equipment; analyst_id → core_person; status text req: open, running, complete or cancelled; created_at_run ts
lims_testOne method applied to one samplesample_id → lims_sample req; test_method_id → lims_test_method req; worklist_id → lims_worklist; analyst_id → core_person; instrument_equipment_id → core_equipment; status text req: pending, assigned, in_progress, complete, reviewed, approved, cancelled or retest; started_at ts; completed_at ts
lims_resultOne analyte's result, its flags and its approvalstest_id → lims_test req; analyte text req; value_num num; value_text text; uom_id → core_uom; source text req: manual, instrument or calculated; raw_attachment_id → core_attachment; entered_by → core_person req; entered_at ts req; in_spec bool; oos bool; oot bool; reviewed_by → core_person; reviewed_at ts; approved_by → core_person; approved_at ts; review_signature_id and approval_signature_id → core_e_signature; superseded_by_id → lims_result
lims_oos_investigationA phased investigation of an OOS resultinvestigation_no text req, unique; result_id → lims_result req; phase text req: phase_1_lab or phase_2_full; hypothesis text; assignable_cause bool; conclusion text; retest_plan text; quality_event_ref uuid (soft link); status text req: open, phase_1_closed, escalated or closed
lims_stability_studyA stability protocol being runstudy_no text req, unique; item_id → core_item req; lot_id → core_lot; protocol_doc_ref uuid (soft link); conditions json req; timepoints_months json req; start_at date req; status text req: planned, active, complete or cancelled
lims_stability_pullA scheduled pull point that creates a samplestudy_id → lims_stability_study req; condition text req; timepoint_months num req; scheduled_at date req; sample_id → lims_sample; status text req: scheduled, pulled, tested or missed
lims_reagentA reagent, standard or prepared solutionname text req; grade text; lot_no text; supplier_party_id → core_party; received_at date; opened_at date; prepared_from json; expires_at date req; storage_location_id → core_storage_location; status text req: available, quarantine, expired or consumed
lims_coaA certificate of analysis for a lotcoa_no text req, unique; lot_id → core_lot req; specification_id → lims_specification req; customer_party_id → core_party; generated_at ts req; attachment_id → core_attachment; signature_id → core_e_signature

Look at the allowed values before you design a screen. They are check constraints, rules the database enforces on every row whatever program wrote it. lims_sample.specification_id is not marked required in the table definition, because a planned sample (one created from a sampling point's schedule) may not have one yet, but the rule written in Session 2 refuses any other sample without one, and a planned sample gets its one specification when it is collected.

Methods and specifications are versioned

A test method says how an analyte is measured and calculated. It has a code and a version. When a method changes, the old version is retired and a new one becomes active; results already recorded stay tied to the version they used. In the seed, ASSAY-01 version 1 is retired, version 2 is active, and PH-01 version 1 is active.

A specification says what a good result is, for one item at one stage (raw, in_process, release, stability, customer or environmental), optionally for one customer. Each version has a status that only moves forward: draft (being written, limits can still change), approved (signed by the approver), effective (in force from its effective date), superseded (replaced by a later version). Its limits live in lims_spec_limit: one row per analyte with a lower limit (lsl), an upper limit (usl), an optional target, a unit, and a flag saying whether the analyte is reportable. A limit may be one-sided, or text only (for example a colour or an appearance). Once a version leaves draft its limits do not change; a change is a new version.

AnalyteVersion 1 (from 1 January 2026)Version 2 (from 1 July 2026)
Assay (method ASSAY-01)98.0 to 102.0 % (method version 1)98.5 to 101.5 % (method version 2)
pH (method PH-01)6.5 to 7.56.5 to 7.5
Specification versions and the samples pinned to themA time line from 1 June to 1 August 2026 drawn to scale. Version 1 of the specification runs to 1 July, version 2 from 1 July. Sample 0001, collected on 10 June, is pinned to version 1; samples 0002 to 0006, collected from 8 July, are pinned to version 2. 1 June1 July1 AugustVersion 1 · from 1 Januaryassay 98.0 to 102.0 %Version 2 · from 1 Julyassay 98.5 to 101.5 %000100020003000400050006Samples SMP-2026-0001 to -0006 by collection date. Amber is pinned to version 1, green to version 2.
Two versions of SPEC-P100 and the samples pinned to them, drawn to scale. Sample 0001 was collected on 10 June, while version 1 was in force. Samples 0002 to 0006 were collected on or after 8 July, under version 2.

The pin

Pinning means the sample stores the id of the specification version that was in force when it was logged in, and that id can never change. Every later flag (in specification, OOS, OOT) is computed against that version, whatever is published afterwards. The database enforces it: a trigger refuses a sample with a specification of another item, one that is still draft or approved or takes effect after the collection time, and any later change to specification_id. Choosing the right version among those that could be in force, the latest one effective at the collection time, is the register route's job.

One result against two specification versionsA number line from 97.5 to 102.5 percent. Version 1 allows 98.0 to 102.0 and version 2 allows 98.5 to 101.5. The result 98.2 is inside version 1 and below version 2. 98.2 % · SMP-2026-0001Version 198.0 to 102.0 %Version 298.5 to 101.5 %in specOOS9899100101102The sample is pinned to version 1, so its stored result says in specification, and stays so.
One result, two verdicts. The assay 98.2 % is inside version 1 (98.0 to 102.0) and below version 2 (98.5 to 101.5). Because sample 0001 is pinned to version 1, the stored result is in specification. Judged against version 2 it would be OOS.
Exercise · Model one specification and pin a sample to it20 minutes

You need: docs/lims-tables.md (or the table in this chapter), a SQL console on a local or branch database, and your AI coding agent

Use made-up values, as in the seed: no real products, customers or readings. If you have not built the tables yet, do steps 1 to 3 on paper and the rest after Session 2.

Outcome: A two-version specification with limits, two samples each pinned to the version in force when they were collected, two refused changes, and a written explanation of why the stored flag follows the pin.

Knowledge check

Version 2 of a specification becomes effective on 1 July. A sample collected on 20 June is still being tested on 3 July. Which version judges it?

Knowledge check

A limit row has an upper limit of 7.5 and no lower limit. What is that, and is it allowed?

References

  1. ASTM: E1578 Standard Guide for Laboratory Informatics. https://store.astm.org/e1578-06.html
  2. LIMSwiki: LIMSpec sample management. https://limswiki.org/index.php/Template:LIMSpec/Sample_management
  3. ISO/IEC 17025:2017 General requirements for the competence of testing and calibration laboratories. https://www.iso.org/standard/66912.html
  4. eCFR: 21 CFR Part 211, Current Good Manufacturing Practice for Finished Pharmaceuticals (includes the laboratory controls and records). https://www.ecfr.gov/current/title-21/chapter-I/subchapter-C/part-211

Chapter 3 · From a value to a decision

Results, flags and corrections

A result is a number, a unit, a method, a person and a time, judged by a rule and never overwritten. This chapter covers entering results, the automatic in spec, OOS and OOT flags, how a wrong result is corrected, and how an out-of-specification result is investigated in two phases.

25 min3 flags2 investigation phases0 results overwritten

By the end of this chapter you can

  • Enter a result with its source, unit and raw data, and say why nobody types a flag.
  • Judge a value against a specification, and apply the OOT run rule to a series.
  • Correct a wrong result by superseding it, and walk an OOS result through Phase I and Phase II.

Entering a result

A result is a row in lims_result, tied to one test. It has an analyte, a numeric value (value_num) or, for a qualitative result, a text value (value_text), and a unit. Its source is manual (typed by an analyst), instrument (parsed from an instrument file) or calculated (worked out on the server from entered values by the formula in the method's calculations column). It always names the person who entered it and the time. Where an instrument file or a notebook page is the raw data, it is attached, and the platform stores the file with a checksum, a fingerprint that changes if one byte changes.

Values are numbers, not text, and not floating point: a float would store 99.1 as an approximation. How many figures are reported, and how a value is rounded, is a laboratory decision written in its own SOP. The module applies that rule; it does not invent one, so write the rule down where the agent can read it.

The flags are computed, not typed

When a result is inserted, a database trigger calls a function (lims_evaluate) that fills three flags from the limit row of the sample's pinned specification. Nobody can type them.

  • in_spec: the value is at least the lower limit and at most the upper limit, whichever are given.
  • oos (out of specification): the value is outside those limits.
  • oot (out of trend): the value is in specification, but the limit's trend rule says the series is drifting.
How a result is flaggedA number line from 90 to 104 percent with the in-specification band from 98.5 to 101.5 and two out-of-specification regions. The value 91.9 is OOS; 99.1 and 100.2 are in specification. below 98.5: OOS98.5 to 101.5 %above 101.5OOS91.9 · OOS99.1 · in spec100.2 · in spec9092949610010498.5101.5The database sets in_spec and oos from the specification pinned to the sample. Nobody types a flag.
Judging an assay against 98.5 to 101.5 %. 91.9 falls in the red region on the left and is OOS. 99.1 and 100.2 are in the green band and in specification. The limits themselves are in specification.

The trend rule is stored on the limit row as JSON. The rule used in this course is a run of three: a result is OOT when it is in specification and it and the two latest earlier results of the same item and analyte, in the order they were entered and leaving out superseded ones, all rise or all fall. Because it needs two earlier results, it cannot fire for the first results of an analyte, for example right after a cut-over.

The out-of-trend run ruleA chart of five assay results: 98.2, 99.0, 98.8, 99.1 and 99.5. The last three are three results in a row, each higher than the one before, so the fifth result is flagged out of trend although it is inside its limits. rising run of three: OOT98991001010001000200030004000598.299.098.899.199.5 · OOTAssay (%) by sample SMP-2026-, in the order entered. Green ticks are each sample's own pinned limits.
Five assay results in the order entered. The last three (98.8, 99.1, 99.5) are three results in a row, each higher than the one before, so the fifth is OOT although every value is inside its limits. The first sample is judged on version 1, the others on version 2.

A wrong result is never overwritten

A laboratory result is a record other people relied on. Corrections to electronic records must not hide what was there before: Part 11 expects secure, computer-generated, time-stamped audit trails and says a change must not obscure previously recorded information [2]. The FDA's data integrity guidance sets out its expectations for audit trails and original data in the same spirit [3].

So lims_result has database rules: a delete is refused, and an update may change only the review and approval columns and superseded_by_id. The value, analyte, test and who entered it can never change. A correction is a new result on the same test and analyte, with a signature whose reason is not empty, and the old result gets superseded_by_id pointing at the new one. Certificates and trends use only results that are not superseded; the old one stays retrievable with its reason and signer.

Correcting a result by superseding itResult 1, assay 91.9, stays on file and points to result 2, assay 99.1, through superseded_by_id. Result 2 carries a signed reason; the investigation records the transcription error. One query returns the old value, reason, signer and new value. Result 1 · assay 91.9 %OOS, entered in errornever edited or deletedResult 2 · assay 99.1 %in specificationsupersedes result 1superseded_by_idInvestigation OOS-2026-0001Phase I: transcription errorshown from the raw-data fileSigned reasonmeaning: authoredreason text is requiredOne query returnsold value 91.9, the reason, the signer's printed name and the new value 99.1
A digit-swap corrected. The analyst typed 91.9 and the raw-data file says 99.1. The new result carries a signed reason, the old one is linked to it, and the investigation records what happened.

Out of specification: two phases

An OOS result opens an investigation (lims_oos_investigation). The FDA's guidance on investigating OOS results for pharmaceutical production describes a Phase I laboratory investigation and, if that finds no assignable cause, a Phase II full-scale investigation [1]. In the module:

  1. Phase I, in the laboratory. The analyst writes a hypothesis and checks the raw data, instrument, reagents and calculation. The question is whether an assignable cause can be shown, from the raw data and not assumed. If so, the analyst writes the conclusion and closes Phase I (status phase_1_closed); the wrong result is then corrected by superseding it with a signed reason, and a different person closes the investigation.
  2. Phase II, full scale. If no assignable cause is shown, the investigation escalates (status escalated, phase phase_2_full) and a quality event or action item is raised in the quality module. It closes with a conclusion and a retest plan.
  3. Approval waits. While any investigation on a sample's results is not closed, none of its results can be approved and the sample cannot be approved or rejected. The sample is also refused approval or rejection while any of its results that is not superseded is still unapproved. The person who opened an investigation may not close it.
Phases of an out-of-specification investigationAn OOS flag opens Phase I in the laboratory. If an assignable cause is shown from the raw data, Phase I is closed, the wrong result is superseded and a different person closes the investigation. If not, it escalates to a Phase II full-scale investigation with a quality event, and closes with a conclusion. Approval waits until the investigation is closed. OOS flaggedcomputed on pinned specan investigation opensPhase I · laboratoryhypothesis, raw data,instrument, reagent,calculation checksAssignable cause?shown from the raw data,never assumedyesnoLaboratory error shownsupersede wrong resultEscalate to Phase IIstatus escalatedFull-scale investigationa quality event opensInvestigation closedby a different personApproval can go aheadonly when all are closed
The two phases. The investigation opens at the flag. Phase I looks for a laboratory cause shown from the raw data; if none, Phase II escalates to the quality module. Either way a different person closes it, and only then can approval go ahead.

Retesting is not a way to make an OOS result disappear. What may be retested, how many times, and who decides are set by the investigation plan and the guidance, and the original result and every retest stay on record [1].

Exercise · Judge five results by hand, then by the rule20 minutes

You need: Pen and paper, then the lims_evaluate function from Session 2 (or a spreadsheet formula if you have not built it yet)

Use the assay limits of SPEC-P100 version 2: at least 98.5 and at most 101.5 %. The values are made up.

Outcome: Five hand verdicts that match the function (91.9 OOS, 98.5 in, 101.5 in, 101.6 OOS, 99.1 in), the OOT mark on the fifth result of the original series and on the third result of the changed series, and a written rule for a correction.

Knowledge check

An analyst types 91.9 for an assay. The raw-data file says 99.1. What is the right correction?

Knowledge check

A result is in specification but is the third of three rising values under a run-of-three rule. What flags does it get?

References

  1. FDA: Investigating Out-of-Specification (OOS) Test Results for Pharmaceutical Production. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/investigating-out-specification-oos-test-results-pharmaceutical-production
  2. eCFR: 21 CFR Part 11, Electronic Records; Electronic Signatures. https://www.ecfr.gov/current/title-21/chapter-I/subchapter-A/part-11
  3. FDA: Data Integrity and Compliance With Drug CGMP, Questions and Answers. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/data-integrity-and-compliance-drug-cgmp-questions-and-answers
  4. ISO/IEC 17025:2017 General requirements for the competence of testing and calibration laboratories. https://www.iso.org/standard/66912.html

Chapter 4 · Approve, release, measure

Review, certificates and the four numbers

A result is not final until a second and a third person have looked at it. This chapter covers two-level review with signatures, the certificate of analysis, the lab's less routine work (stability, environment, reagents), and the four numbers that show whether the laboratory is working.

25 min2 review levels5 roles4 numbers

By the end of this chapter you can

  • Describe the roles and the rules between them: who enters, who reviews, who approves.
  • Say what a certificate of analysis may and may not contain, and what makes it refuse a lot.
  • Define turnaround, backlog, OOS rate and right-first-time, and count them by hand on the seed.

Two levels, three different people

Review and approval are separate steps by separate people. The reviewer checks the result against the raw data and the method; the approver, usually the laboratory lead, accepts it for release. Each signs, and the database refuses the shortcuts: the person who entered a result cannot review it, the reviewer cannot approve it, a review needs a review signature and an approval needs an approval signature and a prior review.

Two-level review with signaturesThree lanes. The analyst enters the result and is named in entered_by; a signed author statement is added only when a result corrects another. The reviewer and the approver each sign their own level, and the certificate is released with a further signature. No person signs for another level of the same result. AnalystReviewerApproverEnter resultentered_by and entered_atReviewsigns as reviewerApprovesigns as approverCertificatereleased signatureentered_by is not reviewed_by is not approved_byA reviewer cannot also approve.Approval waits for every OOS investigation to close.
Three lanes. The analyst enters the result and is named in entered_by; a signed author statement is added only when a result corrects another. The reviewer and the approver each sign their own level, and the certificate is released with a further signature. Approval waits for every OOS investigation to close.

An electronic signature is a row in core_e_signature: who signed, what it meant (authored, reviewed, approved, released or rejected), which record, a hash of the record's text, when, how they authenticated, their printed name and a comment. Part 11 expects a signed record to show the signer's printed name, the date and time, and the meaning of the signature [5]. The record hash is a fingerprint of the signed text: if the value is changed afterwards, it no longer matches.

RoleWhat it doesCannot
RequesterDraws a sample and asks for tests; sees own samplesSee other people's samples; update a sample once registered
AnalystReceives, stores, tests, enters results, opens investigationsReview or approve own results; change a value
ReviewerChecks results (first level); closes Phase I investigationsReview a result they entered; approve
ApproverSecond level; owns methods and specifications; releases certificatesApprove a result they entered or reviewed
ManagerReads the board: samples by status and ageChange anything

The module's seven screens follow the roles: /lims/request, /lims/bench, /lims/review, /lims/approve, /lims/investigations, /lims/methods and /lims/board. Your access matrix lists them in Session 3; a screen missing there is refused.

Disposition and the certificate of analysis

When every result of a sample is approved, the sample is approved with a disposition of pass, fail or conditional, and the module publishes two events for other modules: lims.sample.approved and lims.lot.disposition. The quality module can place a hold on a lot or release it from that event; the laboratory does not release stock itself.

A certificate of analysis (lims_coa) is built for one lot against one specification, optionally in the form a customer asks for. It has one line per approved result that is not superseded, with its limits, and is signed (meaning released) and stored as a PDF. Three rules make it trustworthy:

  • It is built only from approved results of an approved sample on the same specification. A rejected lot gets no certificate.
  • It never shows a superseded value. After the correction in chapter 3 the certificate for that lot has two lines and never the 91.9.
  • It is append-only: a correction is a new certificate row, never an edit of the old one.

Stability, environment and reagents

Three further capabilities complete the laboratory. They are marked BIC or STD in the capability table. For the features laboratories usually look for in a LIMS, see the LIMSwiki list [4].

Stability studies. A protocol names the item and lot, the storage conditions and the time points in months. Each point becomes a lims_stability_pull row with a scheduled date; when it is pulled, a sample of type stability is created, pinned to the specification of stage stability, tested, and trended. ICH Q1A(R2) sets the general testing frequencies for long-term studies: normally every 3 months over the first year, every 6 months over the second year, and annually thereafter through the proposed shelf life [2]. The module library also lists shelf-life estimation: using the trended stability results to propose how long the product stays within its specification. It is BIC and optional in this course; the statistical method is set by your protocol and the stability guidance, and the lessons do not build it.

Stability pull pointsA time line from 0 to 36 months drawn to scale with pull points at 0, 3, 6, 9, 12, 18, 24 and 36 months: every 3 months in the first year, every 6 months in the second, once a year after. Example: a 36-month proposed shelf life at the long-term storage condition036912182436monthsevery 3 monthsevery 6 monthsonce a yearEach dot is a lims_stability_pull row: scheduled, then pulled, then tested (or missed).The frequencies follow ICH Q1A(R2) for long-term testing; your protocol sets the actual points.
Pull points for a 36-month shelf life, drawn to scale: every three months to 12, every six months to 24, then once a year. Your protocol sets the real points.

Environmental monitoring. Rooms, air, water and surfaces are sampling points of types environmental, air, utility_water or surface, each with a recurrence rule so sampling is scheduled. Their results are judged against a specification of stage environmental. The module library lists alert and action limits for these locations; an excursion, a result beyond a limit, is flagged and followed up as any OOS result is.

Reagents and standards. Each reagent, standard or prepared solution has a lot number, an expiry date and a status (available, quarantine, expired or consumed). Before tests are assigned, the reagent a method uses must be available and expire after today, so a result can be traced back to the reagent that produced it. The instrument's calibration and the analyst's qualification are checked at the same point: read from M05 and M07 where they are installed, otherwise a manual check noted on the test.

The four numbers

NumberDefinition
Turnaround timeMedian hours from received_at to approval, by sample type
BacklogSamples received and not yet approved, by age
OOS rateOOS results divided by reportable results
Right-first-timeResults approved without retest or correction, divided by results entered (a superseded result and the one that corrects it both count as corrections)

Write these definitions before you compare two systems. A different start time for turnaround (collected, received or logged in) or calendar against working hours makes the old and new numbers disagree for no real reason. Test each query on the seed, where you can count the answer by hand.

Turnaround of five approved samplesFive horizontal bars drawn to scale: 30, 24, 30, 36 and 48 hours from receipt to approval, with the median of 30 hours marked. median 30 hSMP-2026-000130 hSMP-2026-000224 hSMP-2026-000330 hSMP-2026-000436 hSMP-2026-000548 h01020304050Sorted: 24, 30, 30, 36, 48. The middle value is 30 hours.Backlog at 2026-08-01 12:00 UTC: SMP-2026-0006, received 2026-07-30 09:00, 51 hours old.
Turnaround of the five approved seed samples, drawn to scale. Sorted, the hours are 24, 30, 30, 36 and 48, so the median is 30. The one sample not yet approved, SMP-2026-0006, makes the backlog one sample, 51 hours old on 1 August 2026 at 12:00 UTC.

Moving from the old LIMS

The module library's plan is: export methods, specifications and historical results; load them; and validate by re-evaluating a sample of history against the migrated specifications. Take the export yourself, count it, map each old value to an allowed value (never by guess), load the version in force with the approver's signature, and compare the new verdicts with the old tool's own flags. Every difference needs a cause. Computerised system validation should be risk-based; ISPE's GAMP 5 (second edition) is the guide the library names [3], and EU Annex 11 sets expectations for computerised systems in regulated settings [1].

Exercise · Hand-count the four numbers on the seed20 minutes

You need: Pen and paper or a spreadsheet, then your database console with the Session 2 seed loaded

Received and approved times (UTC) of the five approved samples: 0001 received 2026-06-10 09:00, approved 2026-06-11 15:00; 0002 received 2026-07-08 09:00, approved 2026-07-09 09:00; 0003 received 2026-07-15 10:00, approved 2026-07-16 16:00; 0004 received 2026-07-22 09:00, approved 2026-07-23 21:00; 0005 received 2026-07-29 09:00, approved 2026-07-31 09:00. SMP-2026-0006 was received on 2026-07-30 at 09:00 and is not approved.

Outcome: Hand counts that the queries reproduce: median turnaround 30 hours, backlog one sample of 51 hours, OOS rate 0 of 10, right-first-time 10 of 10, and a written note that counting from collection gives 31.5 hours for sample 0001, so the definition must be stated.

Knowledge check

An analyst enters a result. Who may review it?

Knowledge check

A certificate is requested for a lot whose sample was rejected after a closed OOS investigation. What should happen?

References

  1. European Commission: EudraLex Volume 4, EU GMP guidelines (includes Annex 11, computerised systems). https://health.ec.europa.eu/medicinal-products/eudralex/eudralex-volume-4_en
  2. ICH: Q1A(R2) Stability Testing of New Drug Substances and Products. https://database.ich.org/sites/default/files/Q1A%28R2%29%20Guideline.pdf
  3. ISPE: GAMP 5 Guide, 2nd Edition. https://ispe.org/publications/guidance-documents/gamp-5-guide-2nd-edition
  4. LIMSwiki: the most important features of a LIMS. https://limswiki.org/index.php/LIMS_Q%26A:What_are_the_most_important_features_of_a_laboratory_information_management_system_(LIMS)%3F
  5. eCFR: 21 CFR Part 11, Electronic Records; Electronic Signatures. https://www.ecfr.gov/current/title-21/chapter-I/subchapter-A/part-11

Chapter 5 · 12 questions · 80% passes

Final assessment

Twelve questions across the element. Score 80% (10 of 12) to pass. Your LMS records your score and each answer; you can review the chapters and try again.

15 min12 questions≈ 15 minutesRetake allowed

Choose one answer for each question, then submit. You will see the right answer and why for every question.

1. What does a LIMS hold that a spreadsheet of results usually does not?
2. Which of these does M10 leave to another module?
3. Stability studies and environmental monitoring are marked BIC in the capability map. What does BIC mean?
4. Why is each sample pinned to one specification version when it is logged in?
5. SPEC-P100 version 1 allows an assay of 98.0 to 102.0 % and version 2 allows 98.5 to 101.5 %. A sample pinned to version 1 has a result of 98.2 %. What does its stored result say?
6. An analyst typed 91.9 for an assay; the raw-data file shows 99.1. How is it corrected?
7. Under a run-of-three rule, when is a result out of trend (OOT)?
8. Who may approve a result?
9. A result is flagged OOS. What should the Phase I investigation look for first?
10. What does a certificate of analysis for a lot show?
11. Five approved samples took 30, 24, 30, 36 and 48 hours from receipt to approval. What is the median turnaround?
12. How is a migration of specifications from the old LIMS validated?