Best Practice

QR Codes vs. Data Matrix for Patient Information

This article is the first instalment of a three-part Solidblog series written by Charles Young.

Stefan Artlich argues that QR codes are superior to Data Matrix codes for electronic Patient Information. I agree, but it is important to understand why. This is not a head-to-head contest between alternative barcode standards in healthcare. It’s about the real-world trade-offs we make when we apply technology to its maximum advantage.

Data Matrix barcodes are equivalent to QR Codes in some ways.

  • Both barcode types are compact, compared to classic linear barcodes. You can print a lot more information in the same space.
  • You can encode any data you want, subject to size limitations, into either type of barcode. This includes GS1-formatted data. I should point out that, while this statement is true, the two standards employ quite different principles in terms of data representation.
  • Both barcode types support the same error correction algorithms.

Data Matrix barcodes are superior to QR Codes in some ways.

  • Although both barcode types are compact, Data Matrix barcodes compress data to make the barcode as small as possible. QR codes have almost no data compression, so they are generally larger, given the same content and error correction.
  • Error correction takes up space. The better the error correction, the bigger the barcode must be. Because Data Matrix barcodes compress data more than QR Codes, they generally use a higher level of error correction than QR codes. QR codes often use a lower level of error correction to save space and are therefore not as reliable as Data Matrix barcodes.

Data Matrix barcodes are inferior to QR Codes in some ways.

  • QR codes are widely supported by camera applications on mobile phones. Data Matrix barcodes do not have this level of support.
  • QR codes are a little easier and faster to decode than Data Matrix barcodes, although users cannot normally perceive the difference.
    • Error Correction in Barcodes

      Correct me if I'm Wrong...

      Error correction is very important when reading barcodes. Barcodes can easily be damaged or obscured. Without error correction, there is a greater risk that data may be reported incorrectly. This may not matter too much if your barcode contains a promotional web address. It matters more if the web address is for important patient information, or if the barcode is used to verify a medicinal pack at the point of dispense.

      Error correction allows the barcode scanner to determine if the data it reads is both correct and complete. It reduces the likelihood of the scanner reporting incorrect data. It ensures that the data can be read correctly and completely even if the barcode is damaged or obscured.

      Here is an example of a damaged Data Matrix code that contains a Unique Identifier used to identify and verify a medicine pack. I can still scan it reliably using my barcode scanner. My scanner implements a well-defined error correction algorithm which is mandated by the Data Matrix standard. However, the damage is at the limit of what barcode scanners can handle, and some scanners can’t scan this barcode.

Pharma_2024_Event_Solidsoft_Reply.png

QR Code - High error correction. Damaged but readable

Pharma_2024_Event_Solidsoft_Reply.png QR Code - Low error correction. Damaged and unreadable

Barcodes are rarely damaged to the extent illustrated here. However, they are often scanned in less-than-ideal conditions. Barcode scanners use cameras to obtain images of barcodes. Poor lighting, reflections and other issues may affect the camera, making it difficult to obtain a high-quality image of the entire barcode. Higher levels of error correction make it easier for the image processor to decode the data reliably.

If we increase the level of error correction in the QR Code, it gets bigger. Here is a QR Code that contains the same Unique Identifier, and which, like the Data Matrix barcode, uses the highest level or error correction.

Pharma_2024_Event_Solidsoft_Reply.png 

This QR Code has over twice the surface area as the Data Matrix barcode. That may be a problem when you have limited space to print the barcode. This is often the case on medicine packs. Because of their size, manufacturers may be more likely to place QR Codes in an area that could be used for other purposes – especially those areas on which the pharmacist may attach a sticky label with prescription information. Sticky labels also take up a lot of room, and they are often placed on top of existing barcodes. The larger the QR Code, the more likely it is to be obscured.

Pharma_2024_Event_Solidsoft_Reply.png 

Data Matrix in Healthcare

Electronic Patient Information

GS1 recommends the use of Data Matrix barcodes to represent Unique Identifiers in healthcare. We can see why. If you need to track or verify individual packs of medicine in healthcare settings, the barcode must be read reliably, and must be small enough to fit the available space on the medicine pack.

Stefan does not dispute this. He argues that QR Codes are the better option for electronic Patient Information (ePI). I agree with him, despite the error correction issue.

Patient Information (PI) is information about medicinal products that helps patients, carers and clinicians understand why a medicine is appropriate, how it should be consumed or administered safely, what side effects it may cause and any other risks it may pose. Manufacturers provide this information. It is an important part of medicine safety. The better people are informed, the more likely they are to comply with clinical guidance and to use the medicine correctly. This reduces risk and improves clinical outcomes.

Many regulatory authorities require patient information to be provided as a printed leaflet enclosed within the secondary packaging of each medicinal product. This approach has several drawbacks. In addition to the cost of printing and inserting these leaflets, they are limited with respect to languages, cannot be changed after the pack is placed into the supply chain and do not offer accessibility features – e.g., for partially sighted patients.

For these reasons, manufacturers may provide alternative ways of obtaining digital patient information. Thanks to widespread use of mobile phones and the Internet, it makes sense to support electronic Patient Information alongside paper inserts, and some countries have even started to move away from paper leaflets in favour of digital solutions.

The reason that QR Codes are the better option for ePI is the widespread ownership of smartphones. These devices provide general-purpose camera applications bundled with the operating system (Android or iOS). Almost all those apps support QR Code scanning. QR Codes can carry any data, but in most cases, they carry web addresses (URLs). Members of the public understand that they can read a QR code through their camera app and navigate directly to content on a web site.

QR Codes support the most convenient way to provide ePI to members of the public. They are the obvious and most appropriate technology to enable ePI. Technically, there is no reason why a Data Matrix barcode cannot be used the same way as a QR Code, and this would certainly offer some technical benefit, including greater reliability. However, that is not the point. QR Codes have widespread support in camera apps today whereas Data Matrix barcodes do not. The issue of ePI is unlikely to change that. QR codes work well enough for the purpose of conveying web addresses, so there is no obvious incentive for the status quo to change. If a scan fails, the user can just try again.

I agree with Stefan that QR Codes are the better choice for ePI. Given that the choice appears to be quite clear-cut, you might ask why any argument arises in the first place? The reason is that we would dearly like to use a single barcode on a medicine pack to support several different needs. That is where things get tricky, and certainly more controversial. This is a subject I will explore further in a second article.

Further reading:

Stefan Artlich’s post

Solidsoft Reply is a leading technology company creating award-winning solutions utilising the Microsoft Azure cloud platform. As a globally acclaimed Microsoft AI Cloud Solutions Partner, we specialise in GS1 traceability systems worldwide, crucially ensuring the authenticity, legality, and safety of our customers’ products and services. Serving non-profits, NGOs, healthcare, and the pharmaceutical industries, we deliver technology for positive social impact. Your products, safe in our hands.