ElendiLabs Logo
Back to Articles

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.

Other

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

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.

100% response rate • Reply within 7 business days

Your email will not be published. We'll only use it to notify you when we respond.

Need Expert Guidance?

Contact us at contact@elendilabs.com / +852 4416 5550