A contract analytical laboratory serving pharmaceutical and food clients tracked samples in spreadsheets, logged chain of custody on paper and retyped instrument results into reports. Every client audit meant a week of reconstructing records. Twenty-four weeks later, validated sample tracking software follows every sample from receipt to report in one system, instruments feed it directly, and the next client audit closed without a finding.
The situation
The lab had looked at commercial laboratory information management systems twice and walked away both times: the products were built for large pharma, priced accordingly, and would have forced the lab's workflows into someone else's shape. So the lab ran on spreadsheets, a barcode printer and discipline. Discipline does not scale, and a near miss in an audit made the owners decide to build.
The failure was not that records were missing. It was that they were scattered. Take an ordinary audit question: who handled a given sample between receipt and preparation, and when? Answering it meant finding the intake row in a spreadsheet, the matching line in a paper custody log, and the analyst's notebook entry. Then someone had to confirm all three agreed. Multiply that by the dozens of samples an auditor might pick, and a week disappears.
Retyping added a second risk. Results came off an instrument, went into a spreadsheet, then into a report. Each handoff was a chance for a digit to move. Review caught those errors, but review time spent on transcription is time not spent on the science.
The goal and the constraint
The goal was a single system covering intake, chain of custody, testing, review and reporting, with the audit trail and signatures regulators expect, and faster turnaround as the operational measure. The constraints: the system had to meet 21 CFR Part 11 and the lab's own quality manual, which meant validation documentation as a deliverable; the five instrument types each exported differently; and the lab could not stop taking samples during the change.
Each constraint shaped the plan. Part 11 meant every requirement had to be written, risk-assessed and traced to a test before go-live, so documentation could not be left for the end. Five export formats meant five parsers, each needing its own test data. And no downtime meant the old process had to keep running until the new one was proven on real samples, not test fixtures.
A good outcome here is boring: the auditor asks, the system answers, nobody reconstructs anything. A bad outcome is sample tracking software that looks modern but still needs a spreadsheet beside it to fill gaps.
What was built: validated sample tracking software
- Sample lifecycle: a React application with Node.js and PostgreSQL. Samples are registered at intake with client, matrix, tests and due date, labelled by barcode, and every transfer between people or locations is scanned, so chain of custody is a record rather than a signature on a sheet. A scan takes seconds. It records who, where and when without anyone writing it down.
- Testing and results: worklists per instrument, automatic ingestion of each instrument's export format into result records, with analyst review, second-person verification and electronic signature. Analysts see what is queued for their instrument and what is due first. Results arrive already linked to the sample, so review starts from the data, not from a copy of it.
- Part 11 controls: an append-only audit trail of every create, change and signature with user, timestamp and reason; unique logins with role-based access; electronic signatures bound to the record and the meaning of the signature; and controlled report templates. A change to a result does not overwrite it. It adds a new entry with a required reason, and the prior value stays visible.
- Reporting: certificates of analysis generated from signed results, versioned, and delivered through a client portal with its own access log. If a certificate is reissued, both versions remain, and the client can see which is current.
- Validation: a validation lead on the team produced the user requirements, risk assessment, test scripts and traceability matrix alongside the build, and the lab's quality manager executed the acceptance tests. Writing them in step with the sprints meant a requirement that could not be tested was found in the same sprint, not in month five.
- Team and timeline: three engineers, a designer and a validation lead across twelve sprints, running in parallel with the spreadsheets for the final six weeks. During the parallel run, the same samples went through both systems, and any disagreement was investigated before cutover.
The stack was chosen for ordinary reasons. PostgreSQL handles relational sample, test and result data well and is widely understood. React and Node.js meant one language across the application, which matters when the lab later hires someone to maintain it. Nothing in the stack was exotic, and that was deliberate for a system that has to be revalidated after changes.
The hard decision
How to migrate history. The spreadsheets held six years of records with inconsistent client names, test codes and units. Migrating them into the new system would have meant either cleaning six years of data or carrying inconsistencies into a validated environment. We migrated the open work and the last twelve months of completed samples after a cleaning pass, archived the rest as read-only exports with their own index, and documented the boundary in the validation package. The auditors accepted the approach because it was written down before they asked.
The reasoning was about risk, not effort alone. Data inside a validated system carries an implied claim that it is correct. Cleaning six years of records to that standard would have consumed weeks of quality-manager time on samples nobody was likely to query. Loading them uncleaned would have put known inconsistencies behind the same audit trail as new data.
The cleaning pass itself was mapping work. The same client spelled several ways became one client record. Test codes that meant the same method were merged. Units were normalized. Each mapping was reviewed and approved by the quality manager, and the mapping tables became part of the validation package. Older records stayed exactly as they were, searchable through the index and clearly outside the validated system.
Results
Median sample turnaround fell about 20 percent over the two quarters after go-live, measured from the system's own intake and report timestamps against the spreadsheet era's best estimate. Result retyping ended, and with it the transcription errors that had been found at review. The next client audit, by a pharmaceutical customer, closed with no findings; the auditor's request for a chain-of-custody record was answered in a minute. Analysts described the second-person verification step as faster than the paper version it replaced.
The turnaround figure deserves its caveat. The new system measures precisely. The old baseline was reconstructed from spreadsheets and is an estimate. The direction is clear; the exact size is less so, which is why we state it as approximate. The audit result and the end of retyping need no such qualification.
What we would do differently
Integrate the hardest instrument first. We started with the three instruments whose exports were tidy and left the oldest chromatography system for last; its export format turned out to need a parser of its own and pushed one sprint. The hard one first would have derisked the schedule.
The instinct to start with easy wins is understandable. Early progress builds confidence. But the easy integrations were never going to threaten the timeline. The old system was. Today we ask for sample exports from every instrument during discovery and write a throwaway parser for the worst one before committing to a schedule. Older instruments are the usual suspects, especially those with vendor-specific or inconsistently structured output.
How a project like this starts
With the quality manual and a week in the lab. The manual told us the controls; the week told us the workflow those controls had to fit. Discovery then fixes the instrument list, the validation approach and the migration boundary, and ends in a scope with a fixed price. If your lab runs on spreadsheets and discipline, tell us about it.
In practice, the week in the lab means following samples: receipt, login, storage, preparation, analysis, review, reporting. We watch where people write things down twice, where they wait, and where a spreadsheet is filling a gap. Those observations become requirements. Discovery for a lab of this size typically runs a few weeks, and its output is concrete: a requirements list, a risk assessment outline, instrument export samples in hand, and a written decision on what history moves into the new system.
Frequently asked questions
Why not buy a commercial LIMS?
The lab evaluated two and found them priced and shaped for much larger organizations. Building gave it a system that fits its workflows, that it owns, and that cost less over three years than the licences quoted. Buying still makes sense for some labs, particularly those whose workflows already match a product closely. The comparison should include licences, configuration services and the cost of changing your process to fit the software.
Who owns the validation documentation?
The lab. It was written as part of the project and lives with the quality manager, with a change-control procedure for every release since. Each change is assessed for impact, tested, and recorded before release, so the system stays in a validated state rather than drifting out of one.
Can the system add new instruments?
Yes. Each instrument has its own ingest parser; adding one is a small change plus a validation addendum. The addendum covers the new parser's requirements and test scripts. The rest of the validated system is untouched, which keeps the effort proportionate to the change.



