bg

Beckman Coulter DSC 700 AU Analyser Results into an SQL Server Table

Data
Result records from a Beckman Coulter DSC 700 AU biochemistry analyser: STX, a fixed-position record, ETX, a check character
Industry
Clinical laboratory
Country
Australia
Interface
RS-232
Product
Advanced Serial Data Logger, ASCII data parser and SQL Database Professional modules
Result
One row per record with system, rack, cup, sample type and number, specimen ID, job number and up to 20 test slot, result and flag columns

The task

A pathology lab in Western Australia already logged the serial output of its Beckman Coulter DSC 700 AU analyser with Advanced Serial Data Logger. The raw log was there; what the lab needed was each result record in an SQL Server table, with a column for every field of the record. The sample log showed the control characters the analyser uses and a quality-control run where the job number field carries a material name such as BIORAD1B instead of a number.

What the analyser sends

Every record is framed: STX (0x02), the record text, ETX (0x03) and one check character. A batch starts with a DB00 record followed by ENQ, ends with DE00, and the result records in between begin with D. An excerpt with the control characters shown as names (the quality-control record from the sample, results shortened):

<STX>DB00<ETX><ENQ>
<STX>D 00001501 0002            BIORAD1B    E001000000029        003000000103        005000000026 ...<ETX>7
<STX>DE00<ETX>

The record has a fixed layout. The header occupies the first 39 columns, column 40 holds the letter E, and from column 41 the results follow in groups of 20 characters: a three-digit test number, a nine-character value and a one-character flag.

column   1  D            record type
column   3  00           system number
column   5  0015         rack number
column   9  01           cup number
column  11  (space)      sample type
column  12  0002         sample number
column   3  00001501     specimen ID (system, rack and cup together)
column  24  BIORAD1B     job number, 14 characters, or the control material name
column  40  E            start of results
column  41  001          test number of result 1
column  44  000000029    value of result 1
column  54  (space)      flag of result 1
column  61  003          test number of result 2, and so on every 20 columns

In the sample every record appears twice, a few seconds apart. If your log shows the same, give the table a unique key on specimen ID, job number and the record time, or deduplicate on insert.

The parser configuration

The ASCII data parser module does the work with four settings:

  • Data packet start signature #02, end signature #03. The check character after ETX is dropped with the next frame's prefix.
  • A filter with the regular expression D \d{2}, so that only result records are parsed and the DB00 and DE00 block markers are ignored.
  • Variables by fixed position, with the column and length from the table above. The job number is a text variable because of the control material names.
  • Twenty result groups, each a slot, a value and a flag variable, named SLOT001 to FLAG020.

The configuration is here as the files that the parser's Load/Save button accepts: beckman-au-ascii-parser.ini (signatures, filter and the first three result groups) and beckman-au-parser-fields-20-results.txt (the full field list with 20 result groups, which you can paste into the variable list or extend to the number of tests your analyser reports). The same approach, fixed-position fields inside a framed record, is shown step by step in the PBX system data logger tutorial.

Into SQL Server

The SQL Database Professional module writes one row per parsed record through the native SQL Server driver. Create the table with one column per variable, text for the job number and the flags, numeric for the values, and map the variables to the columns in the module's settings. The result is the layout the lab asked for: a wide table whose row matches the incoming record. If you would rather have one row per test, the same data can be exported that way with a different variable layout; write to support with your table definition.

Try it yourself

The trial version of Advanced Serial Data Logger has every option described above. Configure it the same way and write to support if your device sends something different.

More customer cases