Overview (Researchers)

Medication Safety Code System

Ubiquitous clinical decision support

  • A small set of so-called pharmacogenes has an impact on the safety and efficacy of many common medications. The Medication Safety Code (MSC) is a QR code that makes data about these pharmacogenes available whenever needed during medical care.
  • The MSC can be quickly decoded with any smartphone and enables the quick retrieval of relevant pharmacogenomic drug dosing guidelines that are highly relevant for the patient based on his or her PGx test results. The Medication Safety Code is based on open standards and open-source software.

Privacy and data security

  • The MSC system does not require central data storage: all pharmacogenetic data are inside the QR code and remain anonymous.
  • Medication Safety Codes can be printed on personalized cards, that patients can carry in their wallet, or they can be incorporated in paper-based lab reports.
  • The MSC captures only PGx data that can be used to optimize a patient’s drug therapy. No other sensitive health data (e.g. current medication or diseases) are captured.


  • The Medication Safety Code (MSC), a standardized two-dimensional (2D) barcode that captures data about genetic variants in essential pharmacogenes for an individual patient. The 2D barcode is based on the Quick Response (QR) code standard, which has become widely popular in recent years because it can be decoded quickly and reliably, has relatively high information density and can encode hyperlinks to pages on the World Wide Web. In addition, the MSC data can also be embedded in electronic health records.
  • A curated knowledge base that contains drug dosing recommendations extracted from clinical pharmacogenomic guidelines. This knowledge base is used to match the phenotypes encoded within the 2D barcodes with relevant recommendations.

Benefits and applications of the MSC system

The MSC could act as an enabling technology for the widespread dissemination and clinical implementation of pharmacogenetic data and decision support for several reasons:

  • Immediately implementable. The MSC is based on technology that is low-cost and widely available, and implementations would require minimal integration with existing clinical infrastructure.
  • No specialized hardware or software is required to use the codes. The 2D barcodes used by the MSC can be printed on personalized cards that patients can carry in their wallets, or they can be incorporated in paper-based lab reports. The images can also be saved electronically and shared via e-mail. The 2D barcodes can be quickly decoded using common smartphone devices to yield clinical decision support messages that are pertinent to the individual’s genetic profile.
  • Providing access to decision support, anywhere. The MSC enables patients and care providers to access pharmacogenomic guidelines in all health care settings, including outpatient and emergency situations, regardless of whether the care facility has implemented a genome-enabled electronic medical record.
  • Patients can opt-in and opt-out at any time. Patients can choose whether or not to carry their anonymized pharmacogenomic data in their pockets and make their data available to care providers.
  • Independent of the genotyping platform. The MSC captures the result of genetic testing independently from the platform that was used to produce the results. Therefore, a wide variety of genotyping or sequencing platforms can be used to generate standardized representations of the most important test results on essential pharmacogenes.
  • Local implementations can be deployed. The MSC system aims to be independent from local technological platforms, since no specialized equipment is needed for creating, transporting and interpreting the pharmacogenetic information. No investment in a dedicated infrastructure is required to start using the system, but if a customized implementation is desired, the MSC can be deployed locally. The system specifications and source code will be made openly available.
  • Lowering costs through data re-use. The MSC provides a simple, effective means for sharing genetic test results at the point of care. Costs for pharmacogenetic testing could be reduced by facilitating the re-use of genetic test results and a reduction in redundant testing.
    Barcodes are customizable. Custom 2D barcodes can be created for specific gene panels, if needed.
  • Facilitating return of results. The MSC could be used as a simple, low-cost method for returning genetic test results to patients.
  • Facilitating the development of tailored therapeutics. Last but not least, a broad adoption of the MSC could also provide benefits for drug development. When data on a minimal set of essential pharmacogenes are made cheaply available for large patient populations, these pharmacogenes could be used for patient stratification during clinical trials (‘tailored therapeutics’). This could help to bring new therapies to market faster and with fewer losses caused by concerns about safety and efficacy, which are often encountered in the development of non-tailored therapeutics.

The MSC is intended to complement local pharmacogenomics initiatives by providing a simple method for making pharmacogenetic data more portable across geographic regions and health care networks.


Below you can see exemplary illustrations of the MSC pocket card and corresponding website that displays the patient-tailored drug dosing recommendations for a fictional patient named “Jane Doe”. If you want to try it out for yourself, you can either scan the QR code displayed below with your smart phone, or you access the site directly by clicking on this link: Demo site.

Pocket card

Front side

  • The front side of the pocket card contains the MSC QR code, contact details of the laboratory in charge and a short description of the MSC’s purpose and functionality.
  • The MSC can be decoded with any common QR code reader app on your smartphone or tablet. In many cases, such apps come pre-installed. For example, many Android devices come pre-installed with an application called Google Goggles. Simply activate the app and point the camera of your mobile phone towards the MSC QR code. iPhone/iPad users can try the QR Reader app.


Back side

  • The back side of the pocket card contains the patient’s indentifying information, the card number and printing date of the card, and a tabulated overview of the patient’s pharmacogenomic profile.
  • The table lists the patient’s atypical phenotypes (e.g. “CYP2C19 poor metabolizer”) and all drug substances for which essential therapy modifications are recommended based on the patient’s phenotype. These patient-specific recommendations are displayed on your smartphone after scanning the MSC code.
  • The bottom row lists all genes that were included in the PGx test but did not result in any significant therapeutic recommendations.


User interface

  • After scanning the MSC code you are led to a website that lists all drug substances for which important recommendations are available for the card owner. By clicking on the substance name the corresponding recommendation text folds out.
  • Each recommendation is also accompanied by the following information: reason for the recommendation (e.g. TPMT poor metabolizer), the publishing date of the recommendation, and a link to the Pharmacogenomics Knowledgebase (PharmGKB) website (‘Show guideline website’) for further reference.
  • The standard version of the MSC system displays clinical guidelines authored by the Dutch Pharmacogenetics Working Group (DPWG). An alternative version of the MSC system that displays guidelines authored by the Clinical Pharmacogenetics Implementation Consortium (CPIC) is also available.
  • The search field at the top can be used to search for drug substances and trade names.
  • To view the patient’s raw PGx test results simply scroll down to the bottom of the page and click on ‘Show pharmacogenomic data’.

Join to make ubiquitous personalized medicine a reality!

The MSC is a technologically-simple and intuitive system that could address many of the barriers that limit the ability to share and utilize pharmacogenetic test results in clinical practice, but the true potential of this project will not be realized until the MSC is tested in different scenarios. Partnerships with clinical institutions, researchers, pharmaceutical companies, genetic testing providers, health IT companies and governmental organizations are needed.

If you are interested in the Medication Safety Code system please contact us via the contact form on this website. You can also download additional infomaterial in the download section. If you are interested in the technical realization of the MSC system you can have a look at the MSC Quick Start Guide.

Downloads & References


Brochures, documentations and other infomaterials Link
MSC info folder for healthcare providers
MSC info folder for patients
Overview of drugs covered by the MSC system (standard version, DPWG guidelines)
Overview of drugs covered by the MSC system (alternative version, CPIC guidelines)


Selected peer-reviewed scientific papers

Blagec K, Romagnoli KM, Boyce RD, Samwald M. (2016) „Examining perceptions of the usefulness and usability of a mobile-based system for pharmacogenomics clinical decision support: a mixed methods study.” PeerJ 4:e1671
Matthias Samwald and Robert R Freimuth. „Making data on essential pharmacogenes available for every patient everywhere: the Medication Safety Code initiative“. Pharmacogenomics 14. Nr. 13 (October 2013)

Matthias Samwald, Klaus-Peter Adlassnig. „Pharmacogenomics in the pocket of every patient? A prototype based on Quick Response (QR) codes“ J Am Med Inform Assoc,Published Online First: 23 Jan 2013


[1] Bouvy, J. C., De Bruin, M. L. & Koopmanschap, M. A. Epidemiology of adverse drug reactions in europe: a review of recent observational studies. Drug Saf. 38, 437–453 (2015).
[2] US Food and Drug Administration (FDA); http://www.fda.gov