Need Regulatory Help? Try Our Platform
Post your regulatory questions or request quotations from verified pharmaceutical consultants worldwide. Get matched with experts who specialize in your market.
January 19, 2026
Approximately 5 minutes
Aggregation of Security Codes for Medicines in Spain – AEMPS Guidelines
Aggregation of Security Codes for Medicines in Spain – AEMPS Guidelines
Purpose and Legal Context
Aggregation of security codes refers to the hierarchical association of unique identifiers (2D DataMatrix codes) applied at different packaging levels (e.g., individual pack → case → pallet). This process supports efficient scanning and verification throughout the supply chain while complying with the EU Falsified Medicines Directive (Directive 2011/62/EU) and Delegated Regulation (EU) 2016/161, transposed in Spain via Royal Decree 782/2013 and subsequent provisions. The main objectives are:
- Enable accurate decommissioning of codes at higher levels without scanning every individual pack.
- Facilitate traceability and authentication from manufacturer to dispenser.
- Reduce operational burden while maintaining high security against falsification.
AEMPS publishes specific technical guidelines to ensure uniform implementation by marketing authorisation holders, manufacturers, wholesalers, and dispensers. Agregación de códigos - AEMPS
Technical Requirements for Aggregation
- Unique Identifier Composition: Each pack bears a 2D DataMatrix code containing GTIN (or NTIN), serial number, batch number, and expiry date.
- Aggregation Hierarchy: Codes are linked in a parent-child relationship (e.g., multiple individual packs aggregated into a case; multiple cases into a pallet).
- Aggregation Methods: Supported approaches include:
- Scanning individual codes and associating them to the parent code.
- Use of aggregation labels with parent codes that reference child codes.
- Automated vision systems or robotic aggregation lines.
- Data Structure: Parent codes must include a reference to aggregated children (often via SSCC – Serial Shipping Container Code – or equivalent).
- Commissioning and Decommissioning: Aggregated codes must be correctly commissioned at manufacturing and decommissioned only after legitimate dispensing or destruction.
AEMPS requires that aggregation data be accurate and transmitted to the national medicines verification system (SEVeM) in real time or near real time.
Implementation and Validation
- Validation of Aggregation: Manufacturers must validate the aggregation process to ensure no data loss or errors occur during scanning and association.
- Error Handling: Procedures must be in place to manage scanning failures, missing codes, or discrepancies.
- Traceability Records: Full aggregation records must be maintained and available for inspection.
- Transition and Legacy Packs: Special provisions apply during implementation phases or for legacy products.
AEMPS may request evidence of validated aggregation processes during GMP inspections or authorisation variations.
Benefits and Challenges
Aggregation significantly reduces the time and effort required for verification at wholesale and dispensing levels, especially for large shipments. However, it demands robust IT systems, reliable scanning equipment, and rigorous quality controls to avoid integrity breaches. Non-compliance can lead to verification failures, stock quarantines, or regulatory sanctions.
Stakeholders are encouraged to follow AEMPS technical notes and participate in national and EU working groups on serialisation and aggregation. This mechanism strengthens the overall security of the Spanish medicines supply chain while aligning with the European Medicines Verification System (EMVS).
Detailed technical specifications, examples of aggregation structures, validation expectations, and contact points for queries are provided on the AEMPS dedicated aggregation page. Agregación de códigos - AEMPS
Ask Anything
We'll follow up with you personally.
Related Articles
Approximately 5 minutes
Project for Elimination of Paper Package Inserts for Hospital Medicines in Spain
AEMPS launched a project to progressively eliminate paper package inserts for hospital-only human medicines in Spain, replacing them with electronic versions accessible via CIMA and DataMatrix codes, aiming to reduce environmental impact, improve information access, and maintain safety through controlled digital transition.
Approximately 5 minutes
Allergen-Based Medicines in Spain – AEMPS Regulatory Framework
AEMPS regulates allergen-based medicines in Spain as a special category of human medicines used for diagnosis and specific immunotherapy of IgE-mediated allergies, requiring strict compliance with quality, safety, and efficacy standards, including individualised production, batch release, and pharmacovigilance obligations.
Approximately 5 minutes
Notification of Suspected Falsified Medicines in Spain – AEMPS Procedure
AEMPS requires immediate notification of any suspicion of falsified human medicines through its dedicated channel, including detailed circumstances and product information, to enable rapid investigation, risk assessment, and protective measures such as recalls or market withdrawal while coordinating with national and EU authorities.