J Am Med Inform Assoc 20:409-412 doi:10.1136/amiajnl-2012-001275
  • Brief communication

Pharmacogenomics in the pocket of every patient? A prototype based on quick response codes

  1. Klaus-Peter Adlassnig1,3
  1. 1Section for Medical Expert and Knowledge-Based Systems, Center for Medical Statistics, Informatics, and Intelligent Systems, Medical University of Vienna, Vienna, Austria
  2. 2Information & Software Engineering Group, Institute of Software Technology and Interactive Systems, Vienna University of Technology, Vienna, Austria
  3. 3Medexter Healthcare GmbH, Vienna, Austria
  1. Correspondence to Dr Matthias Samwald, Section for Medical Expert and Knowledge-Based Systems, Center for Medical Statistics, Informatics, and Intelligent Systems, Medical University of Vienna, Spitalgasse 23, BT 88.03, Vienna 1090, Austria; matthias.samwald{at}
  • Received 18 August 2012
  • Revised 3 January 2013
  • Accepted 3 January 2013
  • Published Online First 23 January 2013


A sizable fraction of patients experiences adverse drug events or lack of drug efficacy. A part of this variability in drug response can be explained by genetic differences between patients. However, pharmacogenomic data as well as computational clinical decision support systems for interpreting such data are still unavailable in most healthcare settings. We address this problem by introducing the medicine safety code (MSC), which captures compressed pharmacogenomic data in a two-dimensional barcode that can be carried in a patient's wallet. We successfully encoded data about 385 genetic polymorphisms in MSC and were able to decode and interpret MSC quickly with common mobile devices. The MSC could make individual pharmacogenomic data and decision support available in a wide variety of healthcare settings without the set up of large-scale infrastructures or centralized databases.


A sizable fraction of patients undergoing drug treatment experiences adverse drug events or a lack of positive effects. A part of this variability in drug response can be explained by genetic differences between patients, which can strongly influence how medications are metabolized or are able to bind to their targets (pharmacogenomics). Genetic testing is rapidly becoming affordable, and some companies have started offering tests with single nucleotide polymorphism (SNP) microarrays for less than US$300 per person.1 When pharmacogenomic data of a patient are made available to physicians, it can significantly alter their prescribing behavior and lead to reduced hospitalization rates.2 Still, there are several issues that need to be addressed:

  1. Problems with integrating genetic testing into routine medical care: For common medications in which pharmacogenomic effects might be relatively subtle, the delay and financial overhead incurred by genetic testing before initiating treatment might not be deemed acceptable. Furthermore, severe adverse drug effects might occur rapidly after treatment initiation in some cases.3 These issues might be better addressed through prospective pharmacogenomic testing, ie, having pharmacogenomic patient data readily available when needed without delays or additional costs.

  2. Lack of efficient and widely accepted storage mechanisms: Interoperable electronic health records supporting pharmacogenomic data remain unavailable in major parts of the world, even though rapid advances are being made in some regions.4 Furthermore, genetic data are explicitly excluded from health records in some regions because of privacy concerns—for example, legal regulations in Austria disallow capturing personal genetic data in the country-wide electronic health record infrastructure.

  3. Lack of computational clinical decision support: Effective computational clinical decision support is required to make pharmacogenomic data useful for medical professionals. While some institutions are already spearheading the use of pharmacogenomic data to generate automated alerts and reminders,4–6 pharmacogenomic decision support remains unavailable in the healthcare system at large.

In this paper we address these issues by presenting a prototype of the medicine safety code (MSC) technology (, a lightweight approach to improving the availability and the interpretation of individual pharmacogenomic data in routine medical care.

A MSC is a standardized two-dimensional (2D) barcode that captures key pharmacogenomic traits of an individual patient. An example of an MSC is shown in figure 1. The 2D barcode is based on the quick response (QR) code standard7 that was published by Toyota in 1994. QR codes have recently become widely popular due to their fast readability, high information density and the ability to contain hyperlinks to pages on the worldwide web.

Figure 1

An example of a medicine safety code.

Like any QR code, MSC can be printed on paper and can be included in laboratory reports, paper-based health records or small cards that can be carried by patients in their wallets (figure 2). MSC can be decoded with common smartphones and other devices to yield a string in the form of a uniform resource locator (URL). This string has a twofold role: First, it contains the compressed, anonymous pharmacogenomic data of the individual. Using specialized software, these data can be decompressed and interpreted without requiring any internet or database access (this is an important difference to most common uses of QR codes). Second, when the URL is resolved with a standard web browser, the MSC web server decodes the data contained in the URL and generates a report, including quick access to clinical decision support algorithms that can help medical professionals optimize care based on the individual's pharmacogenomic data. This second option makes it possible to decode and use MSC with common smartphones, without necessitating the roll-out of a dedicated IT infrastructure for pharmacogenomic data storage, retrieval and interpretation. This simplicity and flexibility of the MSC could make pharmacogenomic data available and actionable in a multitude of healthcare settings.

Figure 2

A personal medicine safety code (MSC) can be generated from genetic test results and printed on a card carried in a patient's wallet. The MSC can be quickly decoded with common mobile devices, offering computer-based pharmacogenomic decision support services to medical professionals.

Materials and methods

The set of SNP captured by the MSC was compiled by merging lists of pharmacogenes and their polymorphisms from existing pharmacogenomics datasets. The following sources were used (based on snapshots of the source data taken in February 2012):

  1. The list of ‘very important pharmacogenes’ and their associated SNP hosted by the pharmacogenomics knowledge base (PharmGKB)8 ,9

  2. The PharmaADME core gene list10

  3. Markers mentioned in US Food and Drug Administration drug labels that were not already covered by PharmGKB or PharmaADME (excluding markers for mutations in cancer tissue).

Web services for encoding, decoding and interpreting MSC were made publicly available under the domain. The service for decoding and interpreting is called automatically when an MSC code is scanned with a mobile device. The current prototype offers clinical decision support recommendations for warfarin dosing, and shows raw data for all genetic markers.

We conducted a simple proof-of-concept test for evaluating the general plausibility of the technology with MSC printed on pocket-sized cards. The ease and speed of decoding the MSC was tested with a common smartphone (Galaxy Nexus, Samsung Group) with a camera sensor resolution of five megapixels and a pre-installed QR code reader application (‘Google Goggles’). The authors measured the minimal time needed from picking up a card with a printed MSC until viewing the individual recommendation for warfarin dosing.


Merging the key pharmacogenes listed in PharmGKB, PharmaADME and US Food and Drug Administration drug labels yielded a list of 58 pharmacogenes with 385 associated polymorphic loci (box 1). The list includes several enzymes from the cytochrome P450 family, which are determinants of the pharmacokinetics of most common medications.

Box 1

The key pharmacogenes of which variants can be encoded in a MSC

ABCB1 (7), ABCC2 (6), ABCG2 (1), ACE (1), ADRB1 (2), ADRB2 (3), AHR (1), ALOX5 (1), BRCA1 (16), COMT (4), CYP1A1 (4), CYP1A2 (20), CYP2A6 (12), CYP2B6 (36), CYP2C19 (37), CYP2C8 (4), CYP2C9 (20), CYP2D6 (16), CYP2J2 (1), CYP3A4 (13), CYP3A5 (15), DPYD (15), DRD2 (4), F5 (1), G6PD (6), GSTM1 (1), GSTP1 (2), HLA-B*1502 (2), HLA-B*5701 (1), HMGCR (11), IL28B (1), KCNH2 (5), KCNJ11 (1), MTHFR (2), NAT1 (7), NAT2 (8), NQO1 (2), NR1I2 (1), P2RY1 (2), P2RY12 (4), PTGIS (1), PTGS2 (3), SCN5A (3), SLC15A2 (4), SLC19A1 (5), SLC22A1 (9), SLC22A2 (5), SLC22A6 (1), SLCO1B1 (22), SLCO1B3 (2), SLCO2B1 (1), SULT1A1 (3), TPMT (5), TYMS (2), UGT1A1 (11), UGT2B15 (1), UGT2B7 (1), VKORC1 (10)

The number of different markers captured for each gene is listed in brackets. In total, 385 markers of polymorphic loci associated with 58 genes are captured.

QR codes of different sizes could be readily decoded with the testing device used. Even compact QR codes with a side length of only 1.15 cm (figure 3) were quickly recognized when holding the camera at a distance of approximately 10–15 cm from the code. However, older smartphone devices with lower camera resolutions and poorer ability for taking pictures at short distances will require larger QR code sizes to ensure successful decoding.

Figure 3

An example of a printed medicine safety code. The quick response code in this example had a side length of 1.15 cm and was readily decoded with the smartphone device used for proof-of-concept testing.

When using QR codes with a side length of 1.15 cm, the minimum time needed to pick up a card with a printed MSC, decode the QR code, select warfarin among the list of available medications and display the warfarin clinical decision support message (figure 4) was approximately 15 s.

Figure 4

An example of the online clinical decision support algorithms available through the medicine safety code (MSC) server. Through this service, a patient's MSC can be read and interpreted by most common smartphones without requiring the installation of dedicated software.


To our knowledge, the MSC is the first technology that has the potential to make individual pharmacogenomic data and decision support available in a wide variety of healthcare settings without the set up of large-scale IT infrastructures or centralized databases.

Potential benefits

Patients and medical professionals could profit from a reduction of adverse drug events, improvement in the effectiveness of treatment, improved transparency, privacy and individual control over data, as well as international availability of the system. Health insurance organizations could benefit from reduced costs associated with adverse drug events and lack of effectiveness, less genetic testing and fewer follow-up visits. It needs to be evaluated if such cost reduction could offset the cost of widespread genetic testing and the creation of MSC. It also needs to be assessed which patient groups should receive genetic testing, and when.

Improved availability of pharmacogenomic data in clinical routine could also harbor potential benefit for the pharmaceutical industry. Many promising drugs fail at late stages of clinical trials because of insufficient efficacy or safety in a broadly defined patient population. When both clinical trial designs and drug prescription practices can take individual pharmacogenomic markers into account it could be possible to bring drugs to market that would otherwise have failed requirements for safety.

Limitations and potential disadvantages

The most obvious technical limitation lies in the limited number of genetic traits and other data items that can be encoded in a QR code of any reasonable size. While all key pharmacokinetic genetic markers can currently be captured—and this list is likely to remain relatively stable throughout the next few years—it might nonetheless prove too limited in the long term. We expect that the current technology cannot contain data on more than 500–600 polymorphisms. However, these constraints may be addressed by further improvements in data compression, as well as by capturing alleles/haplotypes instead of fine-grained data items such as SNP variants. It should also be noted that a low-cost genotyping array geared towards clinical pharmacogenomics was recently developed, which tests for 256 polymorphisms.11 Data from such an array could easily be captured in an MSC with the current approach.

A significant barrier to adoption is that the MSC technology requires changes to existing medical workflows during medication prescription or dispensing. It has been shown that a good integration into existing workflows is a prerequisite to the success of clinical decision support systems.12

Data security and privacy

The security and privacy of personal genetic data are a reason for heavy concern among patients and medical professionals alike. Even though the relatively small set of genetic markers used by the MSC is only of limited value for determining disease risk, it could still be used as a biological ‘fingerprint’, making it possible for forensic laboratories to identify persons based on minute amounts of biological samples. The collection of such genetic fingerprints in large centralized repositories such as national electronic health record systems would probably be met by strong public opposition. The MSC technology provides a possible solution to this problem, as no centralized collection and storage of personal genetic data is necessary. Patients can be given full control over their genetic data, just as they have full control over the content of their wallets. Some security and privacy issues remain to be further analyzed, such as the possibility of unwanted scanning of MSCs by third parties.

Related work

A rapid, bedside pharmacogenomic assay for testing the presence of variants of the CYP2C19 gene has recently become available. This assay can generate results within 60 min, and preliminary clinical tests in patients undergoing angioplasty showed positive results.13 While this approach seems feasible for high-risk scenarios in inpatient settings, it is currently not clear if it will be applicable to commonly prescribed medications and outpatient settings. Pilot projects that integrate pharmacogenomic data in electronic health records have also been documented.5 ,6

Several biomedical applications of QR codes have been proposed recently, such as using QR codes for accurately transmitting prescription data from hospitals to pharmacies,14 providing paramedics with a link to a patient database with personal health histories and allergies in the case of an emergency15 ,16 and DNA barcoding of animal and plant species.17

Future work

More clinical decision support rules need to be curated and formalized. User testing with medical professionals needs to be done to evaluate and improve the practicality of the technology. Eventually, future versions of the MSC technology need to be evaluated in clinical trials.

The work presented in this paper is conducted in the context of the World Wide Web Consortium Health Care and Life Science Interest Group18 and we plan to integrate these developments with related work of this group.19–21 To ensure interoperability with forthcoming electronic health record systems, we will work on connecting the MSC to relevant health level 7 standards and the logical observation identifiers names and codes database.


The introduction of low-cost genetic testing combined with effective computational clinical decision support holds great potential for improving the safety and effectiveness of pharmacotherapy. We hope that the work presented here can help in realizing this potential.


The authors would like to thank Simon Lin, Harold Ye, Russ Altman, Joanne Luciano, Michel Dumontier, M Scott Marshall, Robert Freimuth and Richard Boyce for their valuable feedback.


  • Funding This work was supported in part by the Medical University of Vienna and by the medicine safety code initiative.

  • Competing interests None.

  • Provenance and peer review Not commissioned; externally peer reviewed.


Related Article

Free Sample

This recent issue is free to all users to allow everyone the opportunity to see the full scope and typical content of JAMIA.
View free sample issue >>

Access policy for JAMIA

All content published in JAMIA is deposited with PubMed Central by the publisher with a 12 month embargo. Authors/funders may pay an Open Access fee of $2,000 to make the article free on the JAMIA website and PMC immediately on publication.

All content older than 12 months is freely available on this website.

AMIA members can log in with their JAMIA user name (email address) and password or via the AMIA website.