ID Server

The Bika / Senaite ID server generates unique sequential IDs for all new objects, Samples, ARs, Invoices, COAs and can be configured to fit most needs

ID Chunks

The Bika LIMS ID Server provides unique sequential IDs for objects such as Samples and Worksheets etc, based on a format specified for each content type.

The format is constructed similarly to the Python format syntax, using predefined variables per content type, and advancing the IDs through a sequence number, 'seq' and its padding as a number of digits, e.g. '03d' for a sequence of IDs from 001 to 999.

Alphanumeric prefixes for IDs are included as is in the formats, e.g. WS for Worksheet, and Year in WS{year}-{seq:03d} produces sequential Worksheet IDs: WS19-001, WS19-002, WS19-003 etc.

Variables that can be used include:

Content TypeVariableExample
Client{client}Client codeHH
Year{year}Two digit year19
Date{yymmdd}Date201231
Sample ID{sampleId}ID of parent Sample
Sample Type{sampleType}Sample Type abbreviationH20
Sampling Date{samplingDate}Date201231
Date Sampled{dateSampled}Date201231

Year

Including the year in IDs will see their counters reset on the first of January each new year. For these the split length has to be set to 2

Setting ID Counters

Sometimes it might be necessary to advance IDs to a new start, How to seed Bika object IDs. Be sure not to go back in the sequence numbering as it will trigger duplicate ID errors when trying to reuse an ID

ID Configuration

On the ID server tab on LIMS setup page

If an ID is to be Generated, it is put together from its prefix and split length. The latter defines where the sequence in the ID begins

IDs of type Counter uses back references or the object in which it is contained, e.g. in the default configuration for multiple Partitions per Sample, e.g. S19-0856-R1, S19-0856-R2, S19-0856-R3