## 1 Introduction  
The safety of the patient [1,2] is one of the factors which reflects the level of quality in health services and is considered a priority area in healthcare. Assuring this safety is becoming increasingly complicated given that there is a range of diverse potential risks, with no single method capable of guaranteeing a totally risk-free environment. It should be pointed out that healthcare tasks involve factors inherent to the environment combined with those factors relating to human behavior and actions [3, 4, 5, 6]. This is a possible cause for the occurrence of what are called adverse events: situations causing harm to the patient during the treatment process which do not originate in the base illness of the patient and can result in significant harm or even death. According to previous studies, 38% of adverse events happen during the prescription-elaboration-validation-dispersion-administration of medication to the patient [5,7,8]. This process, which involves all types of medical personnel, comprises various tasks: the doctor prescribes medications; the pharmacist validates and dispenses them and finally the nursing staff administers them to the patient. The strategies and risk management involved in the area of patient safety are directed at detecting errors and their systematic recording; the analysis of retrieved information and its transformation into pragmatic knowledge in order to make continued improvements to the services in question. To increase patient safety it is necessary to develop a range of complementary actions in order to:* prevent adverse events
* identify them
* mitigate the impact of adverse events when they occur  
Nowadays, one of the principal concerns in maintaining a high degree of safety in healthcare environments and minimise the occurrence of adverse events, is to obtain the traceability of patients and the binomial patient/medicine prescribed as it is validated, prepared, dispensed and administered. It is also necessary to register waiting times, patient diagnosis and tests, and identify, in real time, the whereabouts of the patient and their medicines (name of the medicine, time of preparation, transport and administration, lot number, expiry date, route, dose and scheduling of medication during the patient's stay [9]). This process is known as patient traceability and is one of the means that can contribute to guaranteeing patient safety which is equally as important as the obligations of doctors, pharmacists, dentists, nurses and other health professionals. The Spanish Royal Decree 577/2013, 26 July, legislates the regulation of pharmaceutical vigilance with respect to medication for human use. Thanks to a research project financed by the _Instituto de Salud Carlos III_ (Project PI07/90351), in January 2008 the Pharmacy and Computer Science services of the CHUAC started a research line oriented towards the integration of Radiofrequency Identification (RFID) technology in a healthcare environment. The main purpose of said project was to evaluate the application of RFID technology in tracing patients and medication in an Intensive Care Unit [9]. The experience gained allowed us to demonstrate the technical viability of RFID for the mentioned tasks; however, with regard to the economic viability of labelling the medication of the Intensive Care Unit, we concluded that the cost was too high, considering the price of most medications administered there. A very different case is obtaining the traceability of patients and medication in the case of those drugs which are considered to be of high risk and cost, given that their precise dosage control facilitates the sustainability of the public health service, as is the case with the Day Hospital. We were granted a second research project, also financed by the _Instituto de Salud Carlos III_ (Project PI10/02442), focused on medical treatments prepared in the Pharmatechnical Unit of the Pharmacy Service and administered by the Day Hospital at the CHUAC.