Testing laboratories · Food, water and environmentLaboratorios Microal

LIMS with process automation for Laboratorios Microal

Laboratorios Microal is an accredited testing laboratory analyzing food, water and environmental samples. It already had a commercial LIMS to register samples and results, but the work itself —what is pending, who is doing it, what has been prepared, which quality controls each method requires and whether they passed— lived on paper worksheets and spreadsheets. Sistema MICROAL closes that gap.

Fachada de las instalaciones de Laboratorios Microal, con el rótulo de la empresa sobre la entrada y la flota de furgonetas aparcada delante
Client
Laboratorios Microal, S.L. · accredited testing laboratory (Seville)
Sector
Food, water and environmental testing
Our role
Full development of Sistema MICROAL, from the database to the interface
Integration
Two-way REST integration with the LIMS the laboratory already used
Status
In production, with the execution modules being adopted line by line
  • Next.js
  • React
  • TypeScript
  • FastAPI
  • Python
  • PostgreSQL
Automation
In numbers

The whole laboratory, under one system

Production data as of October 20, 2026.
168,333sample-parameter linesAcross 19,455 samples, all synchronized from the laboratory's LIMS.
601analytical methods577 of them active, with 3,524 parameters and 5,645 method-parameter combinations.
71unattended synchronizationsThe nightly process that keeps the system in step with the LIMS, with nobody watching.
1,511instruments tracedEvery record keeps the serial number and the position each sample occupied.
5kinds of quality controlDuplicates, blanks, CRMs, spikes and temperature, all validated automatically.
1,111automated tests989 backend and 122 frontend, over 211 REST routes.
The challenge

A LIMS knows what was requested; it does not know how the work is going

A testing laboratory has two very different information problems, and most LIMS products only solve the first. Registry —a sample arrives, determinations are assigned to it, results come back and a report goes out— was already covered. Execution, which is where the laboratory spends its day, was not, and doing it by hand always ended the same way, with the evidence of quality living outside the system of record.

  • 01

    What is still to do

    Without a single definition of "pending", analysts repeat work or miss it.

  • 02

    Who is doing it today

    Splitting the day's work by line, method and task, by hand and on paper.

  • 03

    Whether the sample is prepared

    Nothing can be read until the right container holds the right volume with the right preservative.

  • 04

    Whether it fits in the instrument

    A digester has a fixed number of positions: 48 on the Metals line, 24 on others, 10 on some Agro ones. The failure the client described, word for word: a supervisor builds a 38-position worksheet and the technician discovers at the bench that the digester only takes 24.

  • 05

    Whether the controls were run and passed

    An accredited laboratory has to prove it batch by batch, not assert it.

  • 06

    What the calculation returns

    Many parameters are not read off an instrument; they are computed from others and need the dilution correction applied.

How it works

From the sample coming in to the result going back

  1. 01

    Samples arrive on their own

    Nobody types in a sample. A scheduled job pulls them from the LIMS with all their parameters and keeps matrices, clients, parameters, methods and equipment in step.

  2. 02

    Pending work becomes assignable work

    Every pending line is grouped by method and task and assigned to technicians, in bulk or one by one, with no way to build a worksheet that will not fit on the instrument.

  3. 03

    Preparation, one row per sample

    One box per container, with its volume, how many are still pending and which lines share the same physical container. It prints and exports to Excel.

  4. 04

    The primary record captures the reading

    One technician, one task, one instrument, a set of samples and the quality controls that batch requires, each with its position and its weighings.

  5. 05

    Validation sends the result back to the LIMS

    The supervisor reviews, approves and transmits. What is approved gets locked; what is rejected returns to the assignment screen with the note attached.

Architecture

The execution layer, beside the LIMS

Sistema MICROAL does not replace the laboratory's LIMS. It sits beside it and talks to it continuously, in both directions.

  1. 01 · Already in the lab

    The client's LIMS

    • Registry of samples and determinations
    • Results and reports to the end client
    • REST APIboth the source and the destination of the data
  2. 02 · Every night

    Synchronization

    • Samples and the parameters requested on each
    • Master datamatrices, clients, methods, equipment
    • Idempotent and under a lockthe nightly job and a manual run cannot collide
    • Never deletes pending workit marks it resolved
  3. 03 · Day to day

    Sistema MICROAL

    • Work assignmentby method, task and line
    • Search and preparationone box per container
    • Primary recordsinstrument, position, weighings and QC
    • Formula engine and dilution correction
  4. 04 · On the way back

    Validation and transmission

    • Supervisor reviewwith the states Blocked, Approved, QC missing and QC not approved
    • Transmission to the LIMS and locking of the values
    • Nightly close-out of transmitted records
    • QC alert on anything closed automatically without the required controls

The pattern that runs through the whole system: a rule is defined once, in code, and every screen that needs it uses that definition.

Bloque de control de calidad de un registro primario: contadores por tipo de control y una fila por muestra y por control, con su equipo, posición y pesadas
Quality control

Five kinds of control, validated on their own

When a reading is entered, the system finds the active QC rule for that method-parameter, applies the right check and writes back the result, the rule it used and a human-readable message — for example "Recovery 97.4% within [80%-120%]". The analyst does not compute it and cannot forget it. Recovery and CV limits are not one global number: they are held per method-parameter and, for CRMs and spikes, per concentration range, because an acceptable recovery at trace level is not acceptable at high concentration.

CV%
duplicates, against the method's limit
< LD
blanks, below the detection limit
% rec.
CRMs and spikes, per concentration range
± tol.
temperature, corrected by the calibration certificate
Detalle de una muestra con su matriz, sus observaciones de preparación y los parámetros solicitados con la tarea asignada a cada uno
Accreditation

Accreditation belongs to the parameter, not the method

The laboratory's convention is that a trailing double asterisk on a determination means "not accredited". But accreditation is not a property of the method: an accredited method can contain parameters that are not, and the other way round. The system holds the flag per parameter, taken from the LIMS, and composes the marker at display time instead of writing it into the name, so the parameter keeps its identity, its formulas, its controls and its history, and filters go on comparing clean names. Where the flag has not been reported yet, the marker is shown: an unknown falls on the cautious side, because a clean name would assert an accreditation the system cannot evidence.

3,524
parameters in the catalog
577
active methods
98
matrices
880
certified reference materials

The client

Laboratorios Microal is an accredited testing laboratory in Seville. Its analysts process food, water and environmental samples against a catalog of 601 analytical methods covering 3,524 parameters, with 1,511 instruments, for 1,134 clients.

The laboratory already had a commercial LIMS. What it did not have was anything that managed the work: which samples were pending, who was doing them, which containers had been prepared, which digester position each sample occupied, which quality controls the method required and whether they had passed. That layer lived on paper worksheets, on spreadsheets and in the memory of the people running each line.

Sistema MICROAL closes that gap. It ingests every sample from the LIMS automatically, turns the pending analyses into assignable work, guides the technician through preparation and reading, enforces the quality-control regime the method requires, applies the calculations and pushes validated results back to the LIMS without anybody re-typing a number.

A synchronization you can trust

Two engineering decisions are the difference between a reliable synchronization and one that is not.

The first: the import never deletes pending work. An earlier approach inferred that "if the sample is not in the LIMS pending list, the LIMS has closed it". The team measured that inference and found it false, because the endpoint returns what was received that day rather than what is pending. Work is now marked as resolved, never removed.

The second: the ingestion is idempotent and runs under a lock, so the nightly job and a manual "synchronize now" cannot collide or double-import.

A single definition of "pending"

What makes the assignment screen correct rather than merely convenient is a single shared definition of what "still to do" means. A reading line is live only when all three of these hold:

  1. The LIMS holds no result for it yet (an empty placeholder row is not a result).
  2. It has not been internally blocked.
  3. The inbound synchronization has not marked it complete.

That definition lives in exactly one place in the code and is shared by the assignment screen, the preparation grid and the "mother method" move. It had previously been written twice and the two copies had drifted — which is how three screens come to disagree about the same sample.

The assignment also refuses to create work that cannot physically be done: the capacity check knows how many positions each digester has and will not let a supervisor build a worksheet that will not fit on the bench.

The primary record, the regulated document

A primary record is the controlled document for one batch of work. Opening one shows how much metrological rigor the system carries: the analyst and the date; the instrument, chosen from the catalog with its serial number and position count; a sample count that explicitly includes the quality controls, because a control occupies a physical position exactly like a sample does; a supervisor observations field whose placeholder says what it is for ("justify in writing, e.g. accepting a record with a missing or failed QC"); and the digestion temperature control.

That last one deserves attention. The conformity limits are not a fixed band: they are computed as 120 °C ± 2 with a +0.1903 correction taken from the calibration certificate of the specific thermometer used on the specific digester, giving 118.1903 – 122.1903 °C. The record cannot be closed without the temperature, and the screen says so.

A record cannot quietly close with bad controls

The primary record's state is driven by an evaluator that reduces its linked controls to one of three signals: all passed, at least one definitively failed, or incomplete. A definitive failure outweighs incomplete siblings — the conservative choice. Records closed automatically with controls that do not meet the ratios the method requires generate a persisted QC alert that surfaces on the validation screen.

And where a supervisor decides to accept a record anyway, the system does not block them: it requires them to write down why, which is precisely what an auditor will ask for.

Traceability as a by-product

Every primary record carries the instruments used by serial number, the position each sample occupied, the weighings, the analyst, the timestamps, and who closed it and when. None of that is an extra form to fill in — it is the record the technician was already working through.

How we work on the code

Three practices are visible throughout the repository:

  • The documentation is in the code, and it records why. Modules open with an explanation of the decision they encode and, frequently, of the measurement that settled it — including the cases where an earlier assumption was tested and found false. That is what lets a rule survive the person who wrote it.
  • Every API route requires an authenticated session. The routers are mounted behind a single session dependency, with four deliberate public endpoints (login, logout, root and health check). A test walks the live route table and fails if any route is reachable without a session, and a second test asserts the walk itself still sees the four public routes — so the check cannot silently stop checking.
  • Changes are reviewed against a running copy of production. Every pull request is mounted together with the others on an integration environment, its migrations are rehearsed against a fresh copy of the production database and verified by value —rows touched, rows left pending, rows outside scope— before anything reaches the laboratory.

Where the project stands

The platform is in production and in daily use for sample ingestion, the method and equipment catalogs, preparation and work assignment. The execution and quality-control modules are deployed and are being adopted line by line as the laboratory takes each one off paper.

Development continues on a weekly cadence, with changes reaching production through a reviewed pull-request pipeline and a rehearsed migration path.

Sistema MICROAL

The screens where the work lives

Screenshots from the integration environment, which runs the same code against a recent copy of production data. Client and technician names are hidden.

  • Pantalla de asignación de trabajo, con las muestras pendientes agrupadas por método y tarea y filtradas por día de recepción

    Work assignment

    The screen the laboratory supervisor lives in: every pending line, grouped by method and task, filtered here to a single reception day and assigned to technicians in bulk or one by one.

  • Pantalla de inicio del Sistema MICROAL con sus seis módulos: registros primarios, muestras, matrices y expedientes, control de calidad, búsqueda y preparativa, y asignación de trabajo

    Six things, one screen

    Primary records, samples, matrices and case files, quality control, search and preparation, and work assignment.

  • Listado de muestras del Sistema MICROAL con los filtros por línea, método, parámetro y estado, y una fila por muestra con su matriz, fecha de recepción y número de parámetros

    Samples, exactly as they arrive

    The real catalog, filtered by line, method, parameter, parameter group, status, identifier, matrix, client and reception date range.

  • Rejilla de búsqueda y preparativa: una fila por muestra y una casilla por bote, con el volumen de cada tipo de bote y los que quedan pendientes

    Search and preparation

    One row per sample and one box per container, with its volume and how many are still pending. The "shared with" column shows which lines use the same physical container, so nothing is prepared twice.

  • Detalle de un registro primario con el analista, el equipo y su número de posiciones, y el control de temperatura de digestión con sus límites de conformidad

    The primary record

    The controlled document for a batch: analyst, date, instrument with its serial number and position count, a sample count that includes each control as one more, and the digestion temperature without which the record does not close.

  • Bloque de control de calidad de un registro primario: contadores por tipo de control y una fila por muestra y por control, con su equipo, posición y pesadas

    Controls take up space

    Counters by control type and one row per sample and per control, each carrying the instrument used, the position in the digester and the weighings. A control occupies a physical position exactly like a sample.

  • Catálogo de métodos del laboratorio con sus parámetros, su línea y la marca de acreditación de cada uno

    Method catalog

    Every method with its parameters, its laboratory line and whether it is accredited, filterable by state, line and accreditation.

  • Pantalla de validación de trabajo, con las alertas de QC y los filtros por cliente, tarea, técnico, completación, modo y estado

    Work validation

    The review that comes before anything goes back to the LIMS, with QC alerts at the top and filters by client, task, technician, completeness, mode and state.

Technology stack

One system, built in one piece

Developed and operated by DPI Systems, with every deployment reviewed against a copy of production.

  • FrontendNext.jsReactTypeScript
    • Next.js 15.5
    • React 19.1
    • TypeScript 5
    • Tailwind CSS 4
    • 133 components and pages
  • BackendPythonFastAPI
    • Python
    • FastAPI 0.115
    • SQLAlchemy 2.0
    • Pydantic 2.9
    • APScheduler
    • 165 modules · 211 REST routes
  • DataPostgreSQL
    • PostgreSQL
    • 55 versioned SQL migrations
    • Applied and recorded at startup
  • Integration and quality
    • Two-way REST API with the LIMS
    • 1,111 automated tests
    • An integration environment per pull request
    • Migrations rehearsed against a copy of production

More case studies

See all case studies
Let's talk

Does your system record the work, but not run it?

We build the missing layer between the software you already have and what actually happens on the shop floor, in the laboratory or in the office.