1 Introduction

Patient safety is one of the most important issues in worldwide health care. Drug compliance, minimal adverse drug reactions (ADR), and the elimination of medical errors are the primary goals to enhance patient care. Non-compliance occurs when a patient neglects to take the prescribed dosage at the recommended times or decides to discontinue treatment without consulting their physician. ADR occurs when a patient is taking several drugs and the combination of their pharmaceutical excipients causes harmful effects. The major reason that causes ADR and drug non-compliance is polypharmacy. Polypharmacy has been defined as the long-term use of more than two drugs [1]. Therefore, polypharmacy is frequent in hospitals where patients receive treatment for multiple illnesses and/or drugs for prevention. The incidences which occur in hospitals due to clinical errors and negligence are responsible for disabling injuries in approximately 1 out of every 25 admissions. Most of these injuries are caused by ADR, which prolong hospital stay, increase costs, and nearly double a patient’s risk of death [2]. Specifically, ADR and harmful effects of pharmaceutical excipients are important clinical issues due to high ADR rate prevalence in hospitals. Studies present an ADR ratio of 8 % in Spain, 6.5 % in United Kingdom, and an average of 6.7 % of severe cases with an average of 0.32 % of fatality of the total cases presented worldwide [3]. A recent study conducted by the Royal Liverpool University Hospital (United Kingdom) shows an example of the ADR consequences: 80 % of cases required hospital admission with an average bed stay of eight days and a cost of $847 m [4]. Polypharmacy and as a consequence ADR together with drug non-compliance are also common in Ambient Assisted Living (AAL) environments. The problem lays in that elderly people often have difficulty remembering the drug dosage and times of drug intake, and in addition, this population usually suffers multiple chronic diseases, requiring long-term medical treatment and consequently the use of several medications. Many studies show that elderly people are the largest per capita consumers of drugs and many suffer from chronic diseases with statistics up to 80 % [1]. Therefore, polypharmacy increases with age and causes risks of drug interactions, adverse effects, and toxicity. Clinically significant interactions have been found in up to 15 % of elderly people with polypharmacy [5]. Finally, these problems also exist in low-income countries, where diseases like tuberculosis (TB) are among some of the common chronic infectious diseases. TB causes serious ADR due to anti-tuberculosis (anti-TB) drug therapy [6].

All of the aforementioned problems are avoidable if prescribed drugs are reviewed to determinate possible interactions and complications. For this reason, several works have been carried out for the electronic prescribing (e-prescribing) of drugs and Electronic Health Records (EHR) [7], in order to keep a record of the prescribed drugs. But, it is yet required a solution for the interaction between the users and the drugs, which can be able to use these records in order to carry out the drugs checking tasks.

This paper proposes a drugs checker based on the Internet of Things (IoT) [8] to monitor treatment for drug compliance and to detect ADR. IoT has been deemed the solution because it presents a new vision for the new generation of services and communications. IoT extends the Internet to all parties involved in pharmaceutical transactions and aims to prevent patient non-compliance and ADR. This defines a new dimension, which will be made available to all pertinent parties in any location at any given time. This ubiquity and flexibility are our solution goals due to the fact that this concerns a global scale. Consequently, a flexible solution is required to support clinical environment’s heterogeneity. These environments can be from AAL with high capabilities to low-income countries with constrained resources and infrastructures.

The capabilities and opportunities of IoT have already been presented for the healthcare sector and mobile health (m-Health) solutions in [9], with solutions for diabetes monitoring and management [10].

The necessary requirements to manage drug compliance and ADR are implemented via IoT, which allows access to drug information and uses services provided by the Internet for checking ADR, synchronize drug therapy, and offering feedback about patient treatment adherence.

The main technologies utilized in IoT for drug identification range from existing technologies such as barcodes to new technologies such as Radio Frequency Identification (RFID) together with its version for smart-phones Near Field Communications (NFC). These technologies are ancillaries with the new communication capabilities of the Future Internet with IPv6 connectivity over Low Power Area Networks (6LoWPAN) [11]. They extend the Internet to the small and smart devices from IoT and make it feasible to identify, locate, and connect all the people to technological devices.

Regarding this technology, our solution comprises of an extended set to reach flexible and suitable solutions for possible dilemmas. Personal systems that check for drug suitability based on smart-phones, PDAs, PCs, and our IoT-based personal device, denominated Movital, which offers RFID and IrDA for identification, and 6LoWPAN for local connectivity, were considered. The mentioned mobile devices identify the drug via barcode, RFID, NFC, or IrDA. The use of NFC in pharmacy applications is starting to be considered relevant in the pharmacy business sector [12].

After the drug is identified by the mentioned technologies, compatibility with a patient’s profile is verified through the developed Pharmaceutical Intelligent Information System (PIIS). This is done via the Internet or through the embedded knowledge-based system in the personal device when Internet is not available. These systems check drug suitability according to allergy profile and patient medical history, such as Personal Health Record (PHR) or personal health cards also based on RFID [13]. For hospital use, each time a new drug is prescribed, it is added to the patient history, and the system checks it and warns the doctor of the possible drug interactions. For the AAL use, the system acts as reminder and drug checker. Finally, a low-cost solution is defined for TB treatment in low-income countries, since Directly Observed Treatment, Short course (DOTS) is not feasible for their resources. The architecture is presented in Fig. 1.

Fig. 1
figure 1

Architecture of the solution, composed of information systems and personal devices

Some initial approaches close to the PIIS for hospitals are found in [14]. The use of barcodes and RFID as a way to identify drugs for management is considered in [15, 16], and a medical care design solution commenting the possibilities for NFC is presented in [13, 17]. Finally, a previous version of our system is presented in [18], showing a prototype based on barcode, RFID, and NFC, which is extended to the development of two versions of a novel Internet of Things-based personal device. The first version for generic purpose is based on RFID and 6LoWPAN, and the second version for low-income countries is based on IrDA.

Moreover, an optimized PIIS is built to detect renal impairment complications, contradictions during pregnancy, breastfeeding (lactation), and problems with drug absorption.

Therefore, this paper proposes the integration of technologies to addressing the requirements to manage drug compliance and ADR using an approach based on IoT technologies such as RFID, and NFC and legacies such as barcode and IrDA. In that sense and different to other papers that covers only partially several aspects, here, we provide an integrated solutions which allow access to drug information and uses services provided by the Internet for checking ADR, synchronize drug therapy, and offering feedback about patient treatment adherence, using innovative use of IoT technologies.

The general solution has been tested with the non-steroidal anti-inflammatory drug (NSAID)-intolerant patient profile, a pharmacology specialist from United Kingdom, a pharmaceutical technician from Spain, both with their respective pharmacies, and finally, the solution for TB drug compliance has been verified and validated by the World Health Organization (WHO) office of the Western Pacific Region, to verify that the solution satisfies the requirements for low-income countries.

2 Pharmaceutical intelligent information system

The Pharmaceutical Intelligent Information System (PIIS) is focused on drug checking in order to detect ADR, and interactions related with renal absorption, side effects during pregnancy or during breastfeeding, and interactions for specific diseases like TB. Our proposal follows a ubiquity and global framework of the Future Internet and IoT. For that purpose, this solution offers a flexible design, with various ways to identify and check a drug; presented in Fig. 1. Drug verification can be carried out by an external PIIS, or in an embedded rule system included in its own software module of the developed personal device (Movital). Furthermore, the information from a patient’s health profile can be either from the Electronic Health Record (EHR) located at the Hospital Information System (HIS), a Personal Health Record (PHR) defined in the internal memory of the personal device, or from a personal health card based on RFID. The mentioned flexibility makes the proposed solution feasible in different domains. In hospitals, physicians prescribe drugs to patients and while at home, the patients can verify a drug before consumption. Verifying a drug before consumption is especially important for polypharmacy cases and among elderly patients with chronic diseases. The drug verification is done by means of a commercial device such as the smart-phone or the developed personal device. Even more, the patient is alerted when a drug should be consumed, and assured the drug is safe. Essentially, the patient reaches a suitable compliance with drug treatment. PIIS is composed of a database with drug information. It is knowledge-based System which contains a rule engine system to detect the possible interactions between prescribed drugs and ontology where the drug concepts and patients information are described. These parts are described in the next subsections and presented in Fig. 2.

Fig. 2
figure 2

Architecture of the information systems: PortalFarma database, pharmaceutical intelligent information system, and patient health card

2.1 Drug database

The database in Fig. 2 displays arrows which present links among the different tables. The content of this database contains a detailed drug description, including active ingredients and side effects.

The database is synchronized with the Spanish Pharmaceutical Association database (PortalFarma) Footnote 1, to embrace the whole set of current and future drugs and to keep it current. In addition, this presents the advantage that drugs are indexed by barcode numbers allowing for easy and scalable identification. Furthermore, in order to satisfy the requirements from the PIIS, several modifications have been made in order to extend the database.

2.2 Patient’s profile

The patient’s profile, presented in Fig. 1, contains the list of allergies and drug history. The profile is accessible through the PIIS database, or personal health RFID card, which contains the information from Fig. 2. RFID card is based on MiFare DesFire (ISO 14443 Type B), which provides extended security capabilities through 3DES (Triple Data Encryption Standard) cryptography, which is required since privacy is one of the most important issues in health care. In addition, the format and structure are optimized with a set of techniques and metadata to reduce access latency, optimize capacity, and guarantee integrity [13]. Finally, a patient profile can be set up, for example, in smart-phones, or pre-set in the Movital for the IrDA-based solution defined for third world.

2.3 Ontology

The ontology has been developed on Protg and is shown in Fig. 2, where the fields are as follows:

  • ATC: Anatomical, Therapeutic, and Chemical classification.

  • Dose, Number and Via: Information about the dosage recommended, measure used (e.g. mg, ml, units), and via to be used.

  • Drug name: Commercial name of the drug.

  • Renal interaction: Information related to renal interactions.

  • Active ingredient: It is the most important attribute about a drug. It is useful to detect allergies, and ADR.

  • Indications: This shows the drug indications. They are useful to detect other types of interactions.

  • Side effects: This shows the drug contradictions. It is useful to detect drug loops (described in following section).

  • Allergic ingredient: This indicates an allergy causing ingredient for a specific patient.

2.4 Rule-based system

Once a patient’s record has been collected and the drug information has been mapped on the ontology, a rule engine system detects drug interactions and allergies. It is based on Jess, and the connection between Protg and Jess is based on JessTab. The current system detects the interaction of drugs, the allergies caused by drugs or excipients, and the drug loops. In addition, the system detects complications from liver and kidney conditions and states such as pregnancy and breastfeeding. Some rules are shown in Fig. 2. The first rule detects drug interactions with the properties: Active Ingredient and Active Ingredient Incompatible. Thereby, it can detect when an active ingredient appears on the list of Active Ingredient Incompatibles to the other drug. The second rule detects patient allergies, and the main properties used are Active Ingredient and Patient Allergic Ingredients. Finally, the third rule detects drug loops, based on Side Effects and Indication properties. A light-embedded rule system is defined in the Movital IrDA-based version for low-income countries, able to check drugs without access to the PIIS. This system functionality is focused on TB drugs with the option for a tiny database with physician-selected drugs in the management application. Some examples are the following:

  • Allergies: Drugs may generate allergic reactions in hypersensitive patients such as skin rashes and breathing difficulties when taking Penicillin. This system warns the patient and the prescriber of risks.

  • Active ingredient interactions: This is a drug–drug interaction where one drug changes a previous drug’s effect. Many active ingredients and excipients adversely affect patients, for example, a person with depression being treated with a Selective Serotonin Reuptake Inhibitor (SSRI), such as Escitalopram (antidepressant), when also suffering from headache or joint inflammation, an NSAID can be bought without a prescription or Ibuprofen is prescribed. NSAID interacts with Escitalopram increasing the risk of bleeding in higher risk patients.

  • Drug loop: A frequent problem is drug loops. This occurs when a drug generates undesirable side effects which are solved by a second drug rather than changing the first. For example, Augmentine is a combination of Penicillins, including Beta-lactamase Inhibitor, when consumed by a patient it may generate nausea. Consequently, this system detects other prescribed drugs such as Bismuth Subsalicylate to treat nausea. It advises the health professionals that nausea is caused by Augmentine. Thereby, the prescriber should change the problematic drug.

  • Renal impairment: A number of drugs require dose adjustments according to renal and liver states especially those that are excreted by the kidney and liver. Some doses require adjustment based on biological tests. Thereby, the prescriber is able to adjust the dose when prescribing drugs simultaneously, for example, Lisinopril. Dosage needs to be calculated in function of the Glomerular Filtration Rate (GFR).

  • Pregnancy: Some drugs that must be either avoided or controlled during pregnancy and breastfeeding, due to potential damage produced to the fetus or the mother, for example, Captopril, Cilazapril, Ramipril.

  • Optimization of absorption: Some ADR or loss of drug efficacy happens when drugs are administered at the same time. In this case, the system schedules the drug administration at different times.

3 Technologies for identification and scenarios

An extended set of IoT technologies has been considered; from the legacy identification solution based on barcodes offering a feasible solution with the current drugs, to one based on RFID/NFC for next generation of drugs. Finally, a low-cost solution, based on IrDA, has been designed and developed in collaboration with WHO. This solution makes this kind of systems feasible for low-income countries. Nowadays, low-income countries present a high rate of mortality due to the non-treatment adherence for illnesses such as TB.

RFID is a main technology for IoT, and consequently, it is also the version of RFID integrated in smart-phones, that is, NFC. NFC/RFID tags and cards are chosen for identification from the new generation of solutions based on IoT. However, since devices with RFID/NFC are not very extended, this solution also considers the use of a legacy technology such as barcodes because all drugs use it. Moreover, the PortalFarma database index is based on drug barcodes. Also, the development of a personal device based on IoT offering RFID and Internet connectivity based on 6LoWPAN is called Movital. In addition, a low-cost version of Movital based on IrDA has been defined for low-income countries. Therefore, different scenarios are supported, which are presented in the next subsections.

3.1 Movital RFID: a personal device based on IoT

The concept of providing a hand-held electronic personal device which not only stores the patient’s health profile and drug history, but also reminds the patient when he or she needs medication while confirming that the drug is correct has been the main goal in the development of this solution. The main reason why IoT has been considered for our proposal is 6LoWPAN connectivity allows direct patient access to the Internet and to external information systems such as the defined PIIS. In addition, RFID allows patient identification and a medium to load the patient’s health record by nearing their personal health card to the reader. 6LoWPAN is a protocol defined by the Internet Engineering Task Force (IETF), which extends Wireless Sensor Networks (WSN) to the Internet adding an adaptation layer to IEEE 802.15.4 in order to support IPv6. It specifies a wireless link for low-power personal area networks (LoWPANs). Such are characterized by more limited capabilities than other WPANs (e.g. Bluetooth) and WLANs (e.g. WiFi). 6LoWPAN has small frame size, low data rate, limited bandwidth and power transmitter.

The purpose of these low capabilities is focused on making sensors with low power consumption and cost. Since the IoT-based devices are mainly focused on offering, on the one hand, high autonomy through optimization of the battery lifetime and, on the other hand, low cost in order to offer an economy of scale, it is being considered among more than 20 billion devices connected to Internet by 2020.

RFID is the evolution of the barcode, allowing easy identification of drugs and patient profiles. This improves the solutions based on barcodes because RFID cards and tags allow storing greater information, while barcodes only allow storing an ID. Extra memory is useful for storing information related to patients, that is, part of the EHR. This allows checking a patient’s health profile locally and to do so without internet connectivity.

The developed system’s name is Movital, which means mobile solution for vital sign monitoring. Movital is presented in the Fig. 3. It is the combination of the mentioned new generation technologies including the module SkyeModule M2 from SkyeTek (B) for contactless identification (RFID and NFC) to identify drugs and load health profile information from the MiFare DesFire card, and finally the module Jennic JN5139 for 6LoWPAN (C). Finally, this offers a native serial port based on RS232 (A) to communicate with the PC for configuration and follow-up tasks. The mode of functionality is chosen through the switcher (D).

Fig. 3
figure 3

Movital device to adapt the devices to the internet of Things, top picture is top view and bottom picture is cross view

Movital size is minimized to credit card size for easy integration. Furthermore, it is powered with rechargeable lithium batteries to optimize lifetime. As a result, this leads to a compact and autonomous module, which acts as an efficient information exchange gateway between clinicians, patients, and information infrastructures, that is, PIIS.

Movital offers security capabilities for user authentication, through Symmetric Key Cryptography, that is, AES 128 bits, Public Key Cryptographic, specifically Elliptic Curve Cryptography (ECC) 160 bits, and integrity based on CRC16-ITT and Elliptic Curve Digital Signature Algorithm (ECDSA).

This includes an application layer defining an intelligent system based on the model presented, in Fig. 1, to check drugs locally when there is no connectivity.

Finally, the integration of the RFID tags in the drugs box is presented in the Fig. 4. It is presented the little tag, which has an integrated circuit (IC) model MIFARE Ultralight (MF0ICU1) from NXP Semiconductors. This is compatible for RFID and NFC, that is, ISO/IEC 14443-2 and 14443-3 (Type A) compatible. This has a memory size of 512 bits (64 bytes) distributed throughout 16 pages, with 4 bytes per page. This tag is designed to store an identifier, or a URL through technology such as NDEF from NFC. In particular, we have chosen the plain text format, since originally it was considered the link to the PortalFarma description of the product, but the maximum URL size is 46 bytes, and the requirements are higher. For that reason, it is stored the Drug Code: 9038151.

Fig. 4
figure 4

Movital RFID module, with example of RFID tag and a box of drugs with RFID tag

In addition to the mentioned tag, a bigger tag has been also considered. Specifically, the I-Code SLI, which presents a doubled memory size, that is, 1,024 bits (128 bytes), divided into 32 blocks, with a user memory of 112 bytes. For this, it is suitable for the URL record and an extended storing of the drug information. An example of this tag is presented in the Sect. 3.5, and an analysis among the different tags and the rest of identification systems in the Sect. 4.

3.2 Movital IrDA: TB drug compliance in the third world

Treatment for tuberculosis (TB) requires a combination of antibiotics for up to six months. This causes ADR and side effects such as nausea, which commonly causes patients to discontinue drug use. To ensure TB drug compliance, the WHO recommends Directly Observed Treatment, Short course strategy (DOTS), where a health worker watches whether the patient takes antibiotics or not. DOTS’ strategy has helped improve TB control globally, but it is expensive and human resource intensive. Therefore, it is insufficient in poorer countries. In conclusion and following the words of Mario Raviglione, Director of WHO’s Stop TB Department: “The problem is enormous, and everything has to be done in order to prevent patients from defaulting” Footnote 2.

For this, disease control and technology specialists look toward new technologies for cost-effectiveness and problem solutions. The WHO has developed a project based on short message systems (SMS), but this presents problems like patients ignoring SMS. Furthermore, the system is not checking drug use and dosage, and patients need access to cellular infrastructure. To overcome this, another proposal was a complex SMS Pill [19] dispenser, with costs $200–300 USD. Therefore, it is not feasible for poorer countries. For that reason, and from the Western Pacific office, they are now focused on mobile Health (mHealth) solutions as an alternative and interesting solution, in order to carry out this supervision.

Our initial developed device Movital RFID offers the functionality of an alarm, buzzer, and/or light signals to remind patients to take their medication. This device also indicates drug color, for calling attention. This system detects ADR and does not require GSM, but the problem is cost. Therefore, an adapted solution is proposed, with similar functionality but based on IrDA instead of RFID, with optional 6LoWPAN module to reduce cost. The new tags based on IrDA are presented in Fig. 5. They have been optimized with a low-cost receiver which only turns on when it is externally stimulated in order to reach a lifetime of 12 years, making this feasible in low-income countries. In addition, IrDA tag size is similar to RFID tags (see Fig. 5). The cost is 10 times lower than solutions such as the previous solution from the WHO SMS Pill [19] or the presented Movital RFID.

Fig. 5
figure 5

Movital IrDA, with example of IrDA and box of drugs with IrDA-based tag

This solution has been reviewed and validated by the Patient Safety technical officer from the WHO Western Pacific Region, considering that it satisfies the economy and infrastructure of low-income countries. This is presented in the Fig. 5.

The Tag is presented in details in the Fig. 6. This is built with a low-cost IC, specifically the PIC model 12F617 which has a low power consumption features. It is powered with a battery 3V@220mA model CR2032. The functionality of this tag is based on the external stimulation from the reader, which generates an external interruption to turn on the PIC. Then, this transmits the identifier of the drug through a LED, note that while it is not stimulated, it is in stand by or sleep mode, the current in these modes is 50 nA, that is, practically zero. An analysis of the performance of the power consumption of this Tag is carried out in the Sect. 4.

Fig. 6
figure 6

Movital IrDA tag

3.3 Solution based on RFID/NFC using USB reader

This solution is also based on RFID/NFC such as the solution from the Pocket PC, in this case using a USB reader, specifically with the reader model ACS122 from Touchatag, this reader has been chosen since this offers a library to link the tags with the PIIS Web, and its extended compatibility with IoT applications. This has been used previously for reading patients’ profile cards in a solution for diabetes management [10], and for NFC communications in [13].

This scenario is oriented to pharmacists. The problem found among pharmacists is that they do not have access to patients’ profiles or EHR. This problem has been solved offering the option to store that information in the PIIS, and with a more flexible solution of patients’ health cards based on RFID such as mentioned in Sect. 2.2.

Figure 7 shows the PIIS web portal, where the patient or pharmacist is able to change the health profile, and consult drugs by name, or via USB reader, such as presented in the Fig. 7. This communication is carried out with the Smartcardio library from Java.

Fig. 7
figure 7

Top: Touchatag RFID USB reader connected to a laptop. Bottom: shows drug information and patient’s profile

Finally, all solutions have been evaluated by experts and volunteers. As mentioned above, a patient with NSAID sensitivity has been considered to test the system under real conditions with the smart-phone solution, which he is continuously using. In addition, the solution for Tuberculosis has been validated by the World Health Organization Technical Office from Philippines, and the solution for pharmaceutical purpose based on USB reader has been evaluated by two pharmaceutical technicians from Spain and the United Kingdom. The comments are presented in the Sect. 5.

3.4 Solution based on GS1 barcode using smart-phones

Nowadays most of the smart-phones are provided with a camera. Hence, a solution based on this may be used in order to scan barcodes. For this project, the smart-phone is Google Nexus One, which is based on Android and Zebra Crossing, ZXing library, an open source library to decode multi-format 1D/2D barcode. Therefore, drugs are identified by reading barcode. Specifically, it reads a GS1-13/with a proposed solution EAN-13, which is the main scheme used throughout Europe for retail article numbering. This offers a 12-byte code (since the last is for checksum). It is the code found on the drug boxes, and the most relevant of this number is that the last 7 numbers correspond with the official drug number used in the pharmaceutical databases. Therefore, this has a direct mapping.

For example, our solution is based on the PortalFarma WebPortal (see Fig. 8), which offers the drug code which is the same number in the last 7 values from the barcode (see Fig. 10).

Fig. 8
figure 8

Portalfarma WebPortal with the description for the Myambutol

Drug ID goes to the PIIS with the patient profile using the Internet (e.g. 3G or Wi-Fi). PIIS checks the drug ID with its knowledge-based system and the patient profile and replies with an informative explanation to the phone. This information verifies drug suitability for the patient with a proposed solution. Figure 9 shows an example for a NSAID-sensitive patient. The display indicates drug suitability when green, and if not suitable, it turns red. In addition, the smart-phone application provides extended drug information with advanced tailored recommendations, that is, it explains drug incompatibility to the patient. This represents the explanation of Aspirin problems with an NSAID patient. Furthermore, the smart-phone solution allows patients to define and update their own profile using an intuitive interface (see Fig. 9 screenshots).

Fig. 9
figure 9

Android OS-based solution for smart-phones. Top: reading barcode for an NSAID patient. Bottom-left: explanation of interactions. Bottom-middle: editing profile. Bottom-right: profile

This solution based on the smart-phone application has been evaluated with an NSAID’s sensitivity profile, which has been considered to test the system under real conditions.

3.5 Solution based on NFC using smart-phones and pocket PCs

This scenario uses the potential of IoT with NFC technology. Here, we added a tag to each drug box, containing a unique ID to precisely identify each drug, which is the same as the barcode in the little tags, such as in the Movital RFID, in order to use the same core in the PIIS.

The NFC solution can be used in Pocket PCs and smart-phones. It is not usual to find terminals with NFC technology, but on the one hand, an example of the Google Nexus S is shown, which is the unique smart-phone application from the market with support for NFC (see Fig. 10), and on the other hand, a Pocket PC with the SDID 1010 NFC Card (see Fig. 11).

Fig. 10
figure 10

Identification based on NFC with the Google Nexus S smart-phone

Fig. 11
figure 11

Top: pocket PC with SDiD 1010 RFID card. Bottom: showing drug information and interactions

The process is similar to the barcode, but in this case, the Pocket PC/smart-phone is placed near the NFC drug tag, which reads the tag and starts the communication with PIIS.

Figure 11 shows the Pocket PC reading a drug tag, and how the application indicates the drugs which are not compatible with this and extended information similar to that presented in the smart-phone solution.

Figure 10 presents how the data are stored and acceded for the I-Code SLI tag from UPM Rafsec [21]. This presents an inlay tag especially for the pharmaceutical industry [22]. This tag is ISO/IEC 15693 compatible, and it has a user memory of 112 bytes. This additional space allows more storage or the URL to PortalFarma with the extended information of the drug for the Myambutol Footnote 3, or an embedded description of the drug using Core Link Format [23]. This is the format that is being extended for the definition of attributes and services from for the smart things. Table 1 presents the considered attributes from the PortalFarma WebPortal presented in the Fig. 8.

Table 1 RFID tag data based on core link format [23] over a plain text record from NDEF

4 Technical evaluation

4.1 ID capabilities

In the previous section, three mediums to access the identifier of the drug have been presented, namely RFID, IrDA, and barcode.

These technologies present different capabilities and features. Table 2 summarizes this. First, barcode solutions found in the current drugs are based on GS1 barcodes with the EAN-13 format. It is the main scheme used throughout Europe for retail article numbering and is identical to UCC-13 used in the USA. It is a numeric-only coding scheme. EAN codes require 13 digits (12 if the check digit is calculated automatically). This offers advantages since the Official Drug Code corresponds with the last 7 digits from the barcode. Therefore, this makes mapping simple, and since it is already included on the box, it is free.

Table 2 ID capabilities and reference costs comparability

The second technology considered is RFID/NFC. In order to be compliant with NFC, the NDEF format is used, which also introduces an overload. For example, for a tag of 128 bytes, this only offers a data user capacity of 112 bytes. It has been found that it is not yet a cost-effective solution as was reached with the UHF Gen2 tags used for traceability solutions. This presents a cost from $1 USD Footnote 4 to $2 USD Footnote 5 for tags with the capacity of every log for a set of 46–112 bytes. In cases such as solutions with a high capacity in order to store patients’ profiles as required for the patient’s card, the cost is approximately $5 USD Footnote 6.

The smaller one, 512 b, presents advantages in aspects such as design and size, which make it more suitable for its integration in the box. This solution is also suitable when its purpose is the same as the barcode’s, that is, only for identification, and most relevantly, this is of a lower cost than RFID/NFC solutions, with its cost being lower than $1 USD, even around dollars and cents for big deployments. The next one, 1,024 b, presents the capability to store some in-line attributes, but this continues to be highly constrained. Therefore, the storage of high-level data solutions, such as the MiFare Desfire card, are required, but present a higher cost. It should also be noted that the MiFare Desfire tag is once per patient, while the other tags are one per drug.

Finally, a third technology is presented because the other problem found for the RFID solution is the cost of the RFID reader, which is around $100–200 USD. Furthermore, it is not yet very common in Pocket PCs and smart-phones. Considering the cost of a more expensive tag with a cheaper reader, a solution for the low-income countries was considered. Thereby, the full solution cost is lower. The problem of this tag is that it is not passive; therefore, this requires a battery and consequently has a limited lifetime. For that reason, it has been optimized to reach a good performance and a lifetime similar to passive solutions. The next section presents an analysis of the power consumption for the TBTag.

4.2 Lifetime

The TBTag has been designed to have a low power consumption, rate, a smaller size, and a lower cost. It is based on the PIC model 12F617 which has a low power consumption features. It is powered with a 3V@220 mA battery, model CR2032. This tag is only enabled to transmit the identifier when is stimulated by the external reader, then this turns on and starts to transmit the data with a RS232 protocol through an IrDA medium. Then, the RS232 sends 10 bits for each byte of data. It has a speed of 1,200 bits per second in order to reduce the ratio of errors by the medium conditions and light interferences. While the TBTag is not stimulated, this has a current of 50nA which is practically zero [20].

Figure 12 presents the transmission of an identifier of 3 bytes (“TB1”), that is, 30 bits, which requires

$$ {\hbox{30\,bits}}/{\hbox{1,200\,bps}} = {\hbox{0,025\,s}} = {\hbox{25\,ms}} $$
Fig. 12
figure 12

Power analysis for the transmission of a drug identifier of 3 bytes carried out with the Tektronix DPO-7104C

The power consumption for only the transmission is equal to 338.0763  mA. In addition, 10.2 ms for processing has been required to make the request. This means a total power consumption of 411.3886  mA.

Therefore, considering the mentioned power consumption, the lifetime of the device depends, on, on the one hand, the number of bytes for the identifier and, on the other hand, the number of measures per day.

Figure 13 presents the relation between the total power consumption and the identifier size for only one transmission. A relation between identifier size and the number of measures per day is presented in the Fig. 14.

Fig. 13
figure 13

Impact in the power consumption of the increase in the identifier size

Fig. 14
figure 14

Lifetime for the tag in function of the number of measures per day and identifier size

The result found is up to 12 years of lifetime, considering an identifier of 1 byte. 1-byte identifiers offer up to 255 different drugs to identify under a controlled environment such as the TB treatment, where the number of drugs is well known. Considering a treatment of 3 dosages per day for each drug, 4 years of lifetime are reached. This is also suitable and practically equivalent to the passive RFID tags, in terms of costs.

Finally, larger identifier sizes are also presented, but this means a direct impact on the power consumption. For example, identifier sizes of 6–7 bytes can also be considered as the Drug Code previously mentioned to reach a direct relation. Then, this means considering 3 dosages per day with a lifetime of approximately 1 year.

In conclusion, and for this solution, it is interesting to define pseudo-identifiers with the usual drugs from that country (1 or 2 bytes, i.e. 255–65,536 drugs) in order to extend autonomy.

5 Discussion

The different solutions have been analyzed and evaluated by a multidisciplinary group of experts.

The experts’ evaluations have been carried out by two pharmacies. The first pharmacy is in London (United Kingdom) and was under the supervision of Mona Alsaedy, who had adopted in the design and validation of the PIIS prototype. The second pharmacy is in Murcia (Spain) under the supervision of Consuelo Olmos.

Under the London pharmacy, the proposed solution was found interesting and it was noted that some drugs are delivered without a box, since they are prepared in the laboratory. This practice is even more common in USA. Therefore, the solution based on barcode is not suitable for these environments. However, the solution based on RFID/NFC is suitable, since they are able to set up the active ingredients and dosage with the PC application. In the same way, a problem with the barcode in Spain was discovered. The social security system in Spain, which supports part of the costs for the treatments, requires the barcode to justify it. Therefore, barcodes are removed from the boxes which are commonly found in the drugs prescribed by the physician. In this case, the use of RFID/NFC tags is also considered as the medium to identify the drugs and to follow-up the patient’s compliance.

The other issues commented were related with the costs. It was mentioned that it is not suitable for theses tags to be offered without an additional cost for the user. Therefore, it was agreed to be offered, and even invested in the additional time which requires the staff to write the RFID tags, but the $1–2 USD from the tag should be added to the bill. The option to reuse it was also brought up in order to make it more affordable for the users. And it was mentioned that of course, it could be interesting to define re-usable boxes for the usual drugs, instead of the original. Concluding that the re-use of the box is more suitable since the tag is stuck to the box and when it is removed breaks. Therefore, it is re-used the tag through the box where is attached.

Regarding, the system functionality in Spain the method of directly reading the barcode was defined and the tag information was written down directly when the information related from the barcode through the PIIS (connected to PortalFarma database) is collected by the PC application.

Also, the idea of checking a patient’s drugs for ADR purpose locally instead of at the patient’s house was presented. Thereby, a loyalty program could be created for their clients, since the drugs are only checked when purchased with the rest of drugs bought previously there. By checking drugs in the pharmacy, connectivity problems which can be found at the patient’s house, for example, patients without Internet can be limited. Even more, the pharmacy solution is relevant for the ADR checking, even for patients without their personal drug checker.

For the low-income countries, evaluation of patients is being conducted by the Philippines Department of Health (DOH) with support from World Health Organization and the patient safety technical officer in Western Pacific Region, who collaborated the design and evaluation of the solution for low-income countries and diseases such as TB. The TB system has been invited by the WHO to be presented in the Third International Conference for Improving Use of Medicines Footnote 7. In future evaluations, in order to consider this solution as an alternative to previous solutions such as SMS Pill [19], since SMS Pill is of high cost and needs high infrastructure requirements, these requirements cannot be easily addressed in low-income countries, making this unsuitable.

Finally, the solution based on smart-phone and barcodes has been evaluated with an NSAID’s sensitivity profile from our laboratory, which has been considered to test the system under real conditions.

6 Conclusions and ongoing works

This paper has presented the possibility of utilizing new technologies in order to improve quality assurance in drug delivery, to improve adherence to drug appropriate consumption, and to reduce clinical errors caused by dosage mistakes and drug interactions. Since these problems are of global concern, the solution requires feasibility and technological capabilities. Hence, implementing an approach that integrates several technologies and platforms to reach a truly ubiquitous system for drug identification is necessary. In addition, the diverse requirements of various scenarios present worldwide need to also be addressed. Specifically, the proposed solution is to consider new technologies for richer countries, like the use of personal systems such as smart-phones with NFC and the developed personal device, that is, Movital with RFID. With regard to low-income countries, where low-cost identification solutions are needed without requirements of infrastructure communications, the IrDA-based solution is proposed. Finally, considering the cases pharmacies and clinical environments, where management of drugs is required, the new identification technologies such as RFID/NFC are suggested in addition to the current identification technology, that is, barcode, since this technology is already employed and available with drugs.

Ongoing work is focused, on the one hand, and the proposed solution based on RFID is being carried out under a pilot with Mutua Terrasa from Barcelona (Spain) in collaboration with the SME Flowlab also from Spain, mainly for the treatment compliance of patients with breathing problems in Ambient Assisted Living environments. This collaboration is being carried out under the national Spanish project called AIRE (Architecture for Insufficient Respiratory Evaluation).

On the other hand, the evolution of this project has generated the idea of a drug dispenser and reminder, which makes the integration of the proposed solution more accessible to the patients. This dispenser is being carried out with the collaboration of Foundation AIITIP, who are experts in plastic injection modeling. Thereby, it offers a case for pill blister package which analyzes the number of pills consumed and pills available in the blister, in order to define even a deeper control of the drug compliance.