Data Matrix – working with clinical data. What are barcodes

July 13, 2017

×

On July 11, the Data MATRIX team hosted Biotech Tuesday in Boston. About two hundred guests came to exchange the latest industry news and introduce each other to new partners.

Data MATRIX thanks all the participants who were able to join our team on this day. We hope many of them have discovered new business opportunities. “It was a great meeting, it was great to meet representatives from so many companies. The communication and interaction between the guests was wonderful! This was the best Biotech Tuesday I have attended,” said one of the guests.

Stay connected and join the next Data MATRIX meeting!

07 June 2017

The Future of Clinical Research: Data MATRIX Meeting

×

On June 2, a meeting of pharmaceutical industry specialists “The Future of Clinical Research: People and Technologies” was held at DI Telegraph (Moscow, Tverskaya St., 7). More than 100 people took part in it.

The first part of the event was devoted to discussion software solutions for clinical studies. Data MATRIX CEO Ivan Dobromyslov presented an overview of these products and talked about how modern regulatory and management requirements affect software, reviewed the features of patient-centered research. He also detailed new research opportunities using mobile devices and the specifics of working in projects with large databases.

Christina Leus, Executive Director of Data MATRIX, presented project management in the MATRIX Cloud system at all stages: creating a project, assigning a team, including research centers, creating and deploying an electronic CRF, maintaining a monitored product in the Pharmacovigilance module, working with the budget, planning project tasks and monitoring their implementation. On May 31, 2017, the Data MATRIX team organized a meeting with industry colleagues in a brewery in the Belgian commune of Gembloux.

Representatives of Data MATRIX spoke about services for collecting and processing clinical trial data using a self-developed, fully validated MATRIX EDC/IWRS application. Data MATRIX works with Phase I-IV studies and observational programs, helping clients conduct quality data processing, patient randomization, statistical analysis and more.

At the end of the Data MATRIX presentation, representatives of European biotechnology companies were invited on a tour of the brewery, after which guests of the event were able to discuss professional issues while tasting local beer and cheese.

Data MATRIX thanks all the guests of the meeting and hopes to see them in the near future.

Representing black and white elements or elements of several different degrees of brightness, usually in the shape of a square, placed in a rectangular or square group. A matrix barcode is designed to encode text or other types of data. Most often in industry and commerce, bit matrices are used that encode from a few bytes to 2 kilobytes of data. If desired, you can print matrices with a capacity of hundreds of kilobytes on a printer and then read them with fairly high accuracy using cameras whose matrices contain millions of pixels. The prototype of barcodes in the form of matrices are punched cards.

DataMatrix Technical Specification

DataMatrix symbols are formed from modules located within the search pattern. They can encrypt up to 3116 ASCII table codes (including redundant information). A symbol consists of data areas that contain modules in the form of a periodic array. Each data area is limited by a search pattern and is surrounded on all four sides by free zone boundaries. (Note: modules can be round or square; a specific shape is not specified by the standard).

Data Matrix ECC 200

ECC 200 is newest version DataMatrix, which uses Reed-Solomon codes to prevent errors and restore erased information. ECC 200 makes it possible to recover the entire sequence of encoded information when a symbol contains 30% corruption, assuming that the matrix is ​​still positioned exactly right. DataMatrix has an error rate of less than 1 in 10 million characters scanned.

Symbols have an even number of rows and an even number of columns. Most symbols are square in size from 10x10 to 144x144 modules. However, some symbols are rectangular and range in size from 8x18 to 16x48 units (even values ​​only). All characters that support ECC 200 error correction can be identified by the top right corner unit being the same color as the background.

Can refer to: Matrix (mathematics) A rectangular array of elements Data matrix (computer) An encoded barcode. Data set A collection of data in tabular form. Data matrix (multivariate statistics) A mathematical matrix of data whose rows represent... ... Wikipedia

Data Matrix - An example of a Data Matrix code, encoding the text: Wikipedia, the free encyclopedia Reading Data … Wikipedia

Data Matrix

Data Matrix - 3.8 Data Matrix: Two-dimensional error-correcting matrix symbology encoding various character sets, including a set of numeric and alphanumeric data characters, all ISO/IEC 646 (ASCII) characters1), and special sets signs. 1) Link... ... Dictionary-reference book of terms of normative and technical documentation

data matrix - /deɪtə ˈmeɪtrɪks/ (say daytuh maytriks) noun (plural data matrixes or data matrices /deɪtə ˈmeɪtrəsiz/ (say daytuh maytruhseez)) a rectangular array of data, whether numbers, images, etc., to be used in computation … Australian English dictionary

- ... Wikipedia

Data matrix (computer) - A Data Matrix code is a two dimensional matrix barcode consisting of black and white square modules arranged in either a square or rectangular pattern. The information to be encoded can be text or raw data. Usual data size is from a few bytes up... ... Wikipedia

Data Matrix Code - DataMatrix Code als Teil von Stampit Mit dem zweidimensionalen Data Matrix Code (2D Code) kann im Vergleich zu eindimensionalen Barcodes (1D Code) die Informationsdichte pro Fläche deutlich erhöht werden. Entwickelt wurde der Data Matrix Code in… … Deutsch Wikipedia

Data matrix (multivariate statistics) - In multivariate statistics, a data matrix is ​​a mathematical matrix of data whose rows represent different repetition of an experiment, and whose columns represent different types of datum (say, the results from a particular probe). For example,... ... Wikipedia

Matrix code - The Matrix code can refer to: A two dimensional barcode (as opposed to linear and stacked symbologies), such as e.g. Data Matrix. The logo of The Matrix franchise. See Matrix digital rain. This disambiguation page lists articles associated with… … Wikipedia

Books
  • Failure Causes Analysis of Machine Tools using Matrix Method, Chitrakant Tiger,A.B. Andhare and Ashwin Patil. This book is based on the study of such failures to identify the critical sub systems of these machine tools. The failure analysis of machine tools was carried out using graph theory-matrix…

So-called Bar codes have been used all over the world for quite some time now, yes, these are pictures with stripes of different lengths and thicknesses that are glued to goods in the nearest supermarket ^_^ In general, Bar codes come in different forms, but for us the most interesting will be the so-called QR code (from Quick Response), the most widely used on the Internet. This two dimensional code, unlike stripes on goods, hence its very important property: information capacity. In general, I won’t quote Wikipedia; those who are interested can read it themselves. There is enough big number methods for presenting QR codes on the Web, the most common are based on generating images on the server side. However, my readers know how much I dislike such decisions.

Briefly about Bar codesQR code

There are 4 main classes of information presentation via QR code, differing in the type of stored data and maximum volume:

  • Digital information only - up to 7089 digits
  • Alphanumeric information - up to 4296 characters
  • Binary data (8-bit bytes) - up to 2953 bytes
  • Kanji/Kana - up to 1817 characters

The QR code has the following levels of error correction, characterized by the amount of information to be restored (from largest to smallest):

  • H(igh) - 30%
  • Q(uality) - 25%
  • M(edium) - 15%
  • L(low) - 7%

The error correction algorithm is based on the Reed-Solomon code.

In addition, there are several versions of data presentation (1-40), which differ maximum volume stored information and, accordingly, the size of the matrix.

DataMatrix code

This is another type of two-dimensional code, less common on the Internet, but more compact. The code also provides for storing information for recovery of up to 30%. Unlike QR, the application area does not have to be square.

So let's get started

Of course, I didn’t want to write an implementation of the code generation algorithm, so after googling, I found a completely suitable implementation of coding in JavaScript from Kazuhiko Arase http://www.d-project.com/qrcode/index.html. Only one type of encoding is implemented here: 8-bit bytes, that is, any data is parsed as it is into bytes, and in the same form they are read by scanners. In this way, we can encode any string in Unicode and any sane scanner should decode it correctly. In addition, in this implementation the standard is supported up to version 10 inclusive.

A little later I came across a jQuery plugin based on this development of the valiant Japanese https://github.com/jeromeetienne/jquery-qrcode. But the presentation in it was implemented exclusively through Canvas, and serious developers are obliged to write cross-browser wherever possible.

With DataMatrix codes, everything was more complicated until I came across the jQuery plugin BarCode http://barcode-coder.com/en/barcode-jquery-plugin-201.html, which actually contained the DataMatrix encoder from HOUREZ Jonathan. However, the plugin itself seemed to me too monstrous and difficult to expand in order to somehow use it.

Implementation

So, it was decided to implement various Bar code rendering engines, depending on client-side support for certain capabilities, as well as support various types encoders:

;(function($)( var $$ = $.barcode = ( defs: ( // Default options type:false // Code type ), clas: "bar-code", // CSS class conv: function(s )( // String conversion function return unescape(encodeURIComponent(s)); ), type: (), // Engine code types: () // Renderers ), T = function(t)( // Code type validator if( !$$.type[t])( for(var i in $$.type)( t = i; break; ) ) return t; ), R = Math.floor; // Rounding function $.fn.bar_code = function(opts)( // Plugin implementation return this.each(function())( var self = $(this); if(!self.hasClass($$.clas))( self.addClass($$.clas); // Setting the class ) var opt = $.extend(true, ( // Initializing options width: self.innerWidth(), height: self.innerHeight(), text: self.text() ), $$.defs, opts ), gene, inst, val = $$.conv(opt.text); // Data conversion opt.type = T(opt.type); // Init type self.empty(); if(!(gene = $ $.type))( // Finding the encoder return; ) if(!(inst = gene.init(opt, val)))( // Initializing the encoder instance return; ) var cnt = gene.read.call(inst), // Matrix dimensions est = [ // Matrix element dimensions R(opt.width/cnt), R(opt.height/cnt) ], p = ( // Adjustment padding w:opt.width-est*cnt, h:opt.height-est*cnt ); if(p.w > 0.01 || p.h > 0.01)( var cst = ( // Container padding width:opt.width-p.w, height:opt.height-p.h, paddingLeft:R(0.5*p.w), paddingTop:R(0.5 *p.h) ); cst.paddingRight=p.w-cst.paddingLeft; cst.paddingBottom=p.h-cst.paddingTop; self.css(cst); ) for(var n in $$.engine)( // Finding a suitable renderer if ($$.engine[n].check())( $$.engine[n].render.call(self, function(col, row)( // This lambda essentially queries the state of the matrix element return gene.read. call(inst, col, row); ), cnt, est); break; ) ) )); ); /* Renderers */ /* Code types */ ));

As it turned out, in many crooked browsers, such as the hated Internet Exploder and Opera, non-integer pixels work very strangely, so for compatibility, the sizes of each element of the matrix had to be rounded to a smaller integer, in order to avoid the matrix going beyond the area. For this reason, the matrix had to be separated from the container by indents.

Rendering

Now let's implement rendering engines. Since using Canvas will be a higher priority for us, let's start with it:

$$.engine.canvas = ( check: function())( // Check availability try( return !!window.CanvasRenderingContext2D && !!document.createElement("canvas"); )catch(e)( return false; ) ), render: function(chk, cnt, est)( // Rendering // First we need to get the colors so that the image looks according to the CSS var st = this.append("").find("span"), c = st.eq(0).css("backgroundColor"), d = st.eq(1).css("backgroundColor"), w = est.width, h = est.height; this.empty(); // Now let’s initialize Canvas var can = this.append("").find("canvas").get(0), ctx = can.getContext("2d"); can.width = cnt*est; can.height = cnt*est; // And color the matrix for(var y = 0; y< cnt; y++){ for(var x = 0; x < cnt; x++){ ctx.fillStyle = chk(x, y) ? d: c; ctx.fillRect(x*est, y*est, est, est); } } } };

If Canvas is not available, we will stupidly generate a matrix with HTML elements, it is slower, but it works:

$$.engine.html = ( check: function())( return true; ), render: function(chk, cnt, est)( var tab = ""; for(var y = 0; y< cnt; y++){ for(var x = 0; x < cnt; x++){ tab += ""; } } this.append(tab).find("span").css({ width:est, height:est }); } };

After testing in IE, as usual, it turned out that it doesn’t work there at all as intended, so in the absence of the desire to understand, we’ll write a table engine:

$$.engine.table = ( check: function())( return true; //$.browser.msie; ), render: function(chk, cnt, est)( var tab = ""; for(var y = 0 ;y< cnt; y++){ tab += ""; for(var x = 0; x< cnt; x++){ tab += ""; ) tab += ""; ) this.append("

"+tab+"
").find("table").css(( width:est*cnt, height:est*cnt )).find("td").css(( width:est, height:est )); ) );

As you can see, everything turned out quite trivial. All that remains is to write a style sheet:

Bar-code( /* Container */ overflow: hidden; margin: 10px; padding: 0; width: 100px; height: 100px; background: #fff; /* Background color. If you have a solid fill, you can not set this property */ ) .bar-code *( /* All elements by default */ display: inline-block; float: left; border: 0; padding: 0; margin: 0; border-collapse: collapse; ) .bar- code .dark( /* Darkened elements */ background: #000; /* You can set any color, as long as it differs well from the background, experiment */ )

Here I reset some properties just in case, you don’t have to do this if everything looks great anyway.

Coders

As mentioned above, we implement the generation of QR codes using an encoder from Kazuhiko Arase, and for the sake of example we will also add the DataMatrix code generator, this is an alternative to QR codes, but less common on the Internet and supported by fewer scanners. In the script we will check whether the encoder is available and only then initialize the engine.

Kazuhiko's encoder requires a mandatory indication of the code type, that is, a number from 0 to 10, which, together with the error correction level, constitutes the code version, however different types codes are capable of storing different amounts of information, so I decided to implement automatic selection of the type corresponding to the data if the type is not specified. So the QR encoder will look like this:

If(window.QRCode)( $$.defs.QR = ( // Default option values ​​level: "H", // Default level type: 0 // Default type // 1..10 // my extension : 0 or null - auto-selection); var QRAutoType = function(val, errorCorrectLevel)( // Automatic selection suitable type for(var typeNumber = 1; typeNumber