Skip to main content

Modeling Packaging and Serialization: GS1 and Unit Identity

📍 Where we are: Part V · Fill-Finish and Release, modeled — Chapter 19. The lot is released. This chapter models packaging it for the world — where the medicine finally becomes individually identified items, and the graph's identity system meets a second one built for the whole supply chain.

The fill-finish chapter warned that item-level identity was coming. Here it arrives. Serialization — required by track-and-trace regulation worldwide — gives every saleable unit a globally unique identifier, and aggregation records which units are packed into which carton, which cartons into which case, which cases onto which pallet [3]. For the first time, the model individuates below the lot, to the single item — and it must do so using GS1 standards, a global identity system that predates and stands apart from our bp: ontology. The interesting modeling work is not inventing item identity; it is reconciling two identity systems that were built for different purposes and now describe the same vial.

The simple version

Up to now we tracked the batch of vials, like tracking a print run of a book. Serialization is giving every individual copy its own barcode and recording which copies went in which box, which boxes on which pallet — so a single copy can be followed from the printer to the store shelf. Medicines must do this to fight counterfeits and enable recalls. The twist for our model: the world already has a barcode system for this (GS1), with its own way of naming things, and our ontology has its way. This chapter makes the two agree about the same vial without forcing either to surrender.

What this chapter covers

We model the serialized unit under GS1, the aggregation hierarchy (item → carton → case → pallet) as a containment structure, and the EPCIS events that record packing and shipping. We dissect a serialized unit, and spend the chapter's weight on reconciling two identity systems — the ontology's derivedFrom lineage and GS1's item keys — and on the event-volume and lot-versus-item tensions item-level tracking creates.

Serialization gives the unit a global identity

A GS1 serialized identifier for a drug unit combines a product identity — the GTIN (Global Trade Item Number) — with a unique serial number, forming a per-item key (an SGTIN in GS1 terms) [1]. Modeled, each serialized unit is a material entity that derivedFrom its drug-product lot — so the individuation that has lived at the lot level all book now extends, finally, to the item. Crucially, the serialized unit inherits its quality and lineage through the lot: the graph need not re-attach the release results to every vial, because each vial derivedFrom DP-001, and DP-001 carries the release verdict. This is the transitive derivedFrom doing exactly what it was declared for — a property proven once at the lot propagates to ten thousand items without ten thousand restatements.

Written out, one serialized vial is a real individual in the dataset — bp:VIAL-DP-001-000042, typed bp:SerializedUnit (deliberately not bp:DrugProduct, so the lot-level release gate never re-checks each vial) — that bp:derivedFrom the released lot bp:DP-001, carries its GS1 item key, and cross-links to the SGTIN URN with the safe skos:exactMatch:

@prefix bp: <https://example.org/bioproc#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

bp:VIAL-DP-001-000042 a bp:SerializedUnit ; rdfs:label "serialized vial 000042 of lot DP-001" ;
bp:derivedFrom bp:DP-001 ;
bp:hasIdentityKey bp:SGTIN-DP-001-000042 ;
skos:exactMatch <urn:epc:id:sgtin:0614141.812345.000042> . # SAFE cross-system match; the URN value is ILLUSTRATIVE (placeholder GS1 prefix/serial)
bp:SGTIN-DP-001-000042 a bp:GS1ItemKey ; rdfs:label "SGTIN for vial 000042" .

Because bp:derivedFrom is an owl:TransitiveProperty, this one edge is enough: a reasoner walks the vial back through bp:DP-001 to bp:DS-001, then through the real per-unit-operation intermediates — POLpool-001, VFpool-001, VIpool-001, PApool-001, CLAR-001, BATCH-2026-001, SEED-001, SEEDFLASK-001 — and on up through the cell banks WCB-CHO-001, MCB-CHO-001, and RCB-CHO-001. The lineage walk from DS-001 returns 11 ancestors, and the lot's bp:releaseStatus "PASS" and its 98.611 % monomer reading are reachable from the vial without being restated on it.

Aggregation is the second structure: serialized units are packed into cartons, cartons into cases, cases onto pallets, each level a parent-child containment relation distinct from derivedFrom (a carton does not derive from its vials; it contains them). In the dataset this is the real bp:contains property — itself an owl:TransitiveProperty, but deliberately not a sub-property of derivedFrom, because containment is mutable and is not lineage:

# Aggregation hierarchy: vial -> carton -> case -> pallet (containment, NOT lineage).
bp:CARTON-001 a bp:Carton ; rdfs:label "carton C-001" ; bp:contains bp:VIAL-DP-001-000042 .
bp:CASE-001 a bp:Case ; rdfs:label "case CS-001" ; bp:contains bp:CARTON-001 .
bp:PALLET-001 a bp:Pallet ; rdfs:label "pallet P-001" ; bp:contains bp:CASE-001 .

The packaging containment walk in queries/containment.rq answers "what is this packed inside, right now?" with bp:contains+, the mirror of the lineage walk's derivedFrom+. Modeling containment separately from lineage keeps two different questions answerable: "what was this made from?" (lineage) and "what is this packed inside, right now?" (containment) — and the latter changes as packages are opened and repacked, which lineage never does.

EPCIS events: the supply chain speaks in happenings

Track-and-trace is fundamentally about eventsthis unit was packed into that case, at this place, at this time; this pallet shipped to that distributor. GS1's EPCIS standard is the vocabulary for exactly these events, and it is, in ontology terms, a model of occurrents: each packing, shipping, or receiving is a happening with participants (the items), a location, and a time [2]. The dataset carries all three as real individuals — bp:COMMISSION-001 (a bp:CommissioningEvent), bp:AGGREGATE-001 (an bp:AggregationEvent), and bp:SHIPEVENT-001 (a bp:ShippingEvent) — each a subclass of bp:EPCISEvent, which is itself a subclass of bp:Process, and each tied to the vial through bp:eventHasParticipant:

# EPCIS events as occurrents continuous with the manufacturing processes.
bp:COMMISSION-001 a bp:CommissioningEvent ; rdfs:label "commission vial 000042" ;
bp:eventHasParticipant bp:VIAL-DP-001-000042 .
bp:AGGREGATE-001 a bp:AggregationEvent ; rdfs:label "aggregate vials into carton" ;
bp:eventHasParticipant bp:VIAL-DP-001-000042 .
bp:SHIPEVENT-001 a bp:ShippingEvent ; rdfs:label "ship pallet P-001" ;
bp:eventHasParticipant bp:VIAL-DP-001-000042 .

This aligns naturally with the spine's occurrent side — because bp:EPCISEvent is a bp:Process, an EPCIS commissioning or aggregation event sits alongside the manufacturing processes, so the same model spans making the medicine and moving it. The serialization story is thus not a separate system bolted on; it is the manufacturing graph's occurrents continuing past the factory wall into the supply chain.

Identity card dissecting a serialized drug unit: an identity row showing the GS1 SGTIN built from a GTIN (product identity) plus a unique serial number; a derivedFrom row to the drug-product lot DP-001, with a note that release quality is inherited transitively through the lot rather than re-attached per vial; an aggregation block showing containment edges up through carton, case, and pallet, marked as distinct from derivedFrom; an EPCIS-events row listing commissioning, aggregation, and shipping events as occurrents with location and time; and a two-identity-systems banner showing the GS1 key and the ontology IRI as cross-linked names for the same vial. A serialized unit, unpacked: a GS1 item key cross-linked to the ontology IRI, deriving from its lot (and inheriting release quality transitively), nested in a containment hierarchy distinct from lineage, with EPCIS events modeled as supply-chain occurrents. Original diagram by the authors, created with AI assistance.

The unsolved part: two identity systems, and the volume of items

The deep challenge is identity reconciliation, the unsolved half of identity from Part I, now in its sharpest form. GS1 keys and ontology IRIs are both legitimate global identity systems, designed by different communities for different jobs: GS1 for trade and track-and-trace, RDF IRIs for semantic interoperability. They are not interchangeable, and neither subsumes the other. The model must decide how they relate — is the SGTIN a property of the ontology individual, or are the SGTIN and the IRI two names a mapping declares co-referent? Get this wrong with an over-eager owl:sameAs and you risk the contamination Part I warned about; get it right and a vial is one thing with two interoperable names. There is no single settled pattern for bridging GS1 and RDF identity, and it is an active, real integration problem, not a solved import.

This is exactly the owl:sameAs-versus-skos:exactMatch choice the identifiers chapter drew, now between the vial's ontology IRI and its GS1 item key. The vial individual and its bp:GS1ItemKey are both real in the dataset; what stays a placeholder is the value of the SGTIN URN — its urn:epc:id:sgtin: company prefix, item reference, and serial are illustrative, since GS1 keys have no canonical resolvable IRI here. The reconciliation itself uses the safer skos:exactMatch, which records that the two names correspond without fusing every fact in both directions the way owl:sameAs would:

@prefix bp: <https://example.org/bioproc#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
# The SGTIN URN VALUE is ILLUSTRATIVE (placeholder GS1 prefix/serial);
# GS1 has no canonical resolvable IRI here.

# SAFE — the GS1 item key and the ontology IRI line up, without claiming
# entity identity, so a bad cross-system match degrades this one mapping
# rather than propagating false facts across the whole lineage.
bp:VIAL-DP-001-000042 skos:exactMatch <urn:epc:id:sgtin:0614141.812345.000042> .

The discipline is the identifiers chapter's, applied at the most consumer-facing edge in the whole process: reach for the weaker link unless you are certain the two systems denote the identical individual, because an over-eager owl:sameAs between a GS1 key and an ontology IRI is precisely how the most-scanned identifier in the supply chain could contaminate the lineage that gives it meaning.

The second difficulty is scale. Item-level tracking multiplies entities by orders of magnitude — a lot becomes tens of thousands of serialized items, each generating commissioning, aggregation, and shipping events, and aggregations are broken and remade down the supply chain (a case opened, units repacked), generating disaggregation events too. Holding all of that in one semantic graph is rarely practical; in reality, serialization data lives in dedicated high-volume track-and-trace systems (often EPCIS repositories), and the ontology graph references the lot and the aggregation structure rather than ingesting every item event. This is the index-versus-payload boundary again, now for supply-chain events: the graph holds the lineage and the lot-to-item bridge and points at the track-and-trace system for the event firehose. The honest standard is that item identity and aggregation are modelable and the manufacturing-to-supply-chain occurrent continuity is real, but the volume forces the same index-don't-swallow discipline, and the GS1-to-IRI reconciliation remains a genuine, unfinished piece of integration.

Why it matters

Serialization is where the genealogy reaches the individual unit a patient receives, completing the item-level individuation the whole downstream has been building toward, and it is where the manufacturing graph either connects to the supply chain or stops at the loading dock. Model the SGTIN-to-lot bridge so quality and lineage are inherited transitively, and a single scanned vial in the field can be traced back through its lot, its drug substance, and all the way to the cell bank — the full thread, from patient to origin. Model the GS1 and IRI identities as a clean reconciliation and the two worlds interoperate; botch it and the most consumer-facing identifier in the whole process either collides or floats free of the lineage that gives it meaning. This chapter is where traceability becomes per-unit and global.

In the real world

Serialization and aggregation under GS1, reported via EPCIS, are mandated by track-and-trace regulation — the US Drug Supply Chain Security Act and the EU Falsified Medicines Directive among them — and are live, daily operations for every commercial drug product [1][2][3]. The infrastructure exists at massive scale; what is not standard is binding it semantically to a manufacturing knowledge graph, so that the supply-chain identity of a unit and its production lineage are one connected story rather than two systems joined by a lot number in a spreadsheet. Reconciling GS1 and semantic-web identity is recognized in the standards community as real work, and it is exactly the frontier where this book's lineage graph and the world's track-and-trace systems have to meet. Part VII places GS1 in the wider ecosystem — the converged identification backbone (a GTIN, serial number, and GLN encoded in a 2D DataMatrix, with EPCIS for event exchange) that owns the package the way Allotrope owns the lab and the IOF ontologies own the process floor.

Key terms

  • Serialization — assigning each saleable unit a globally unique identifier (a GS1 SGTIN: a GTIN product key plus a unique serial number), required by track-and-trace regulation.
  • GTIN / SGTIN — the GS1 Global Trade Item Number (product identity) and its serialized, per-item form.
  • Aggregation / containment — the item → carton → case → pallet packing hierarchy, modeled as a containment relation distinct from derivedFrom lineage and mutable as packages are opened and repacked.
  • EPCIS — the GS1 standard for supply-chain events (commissioning, aggregation, shipping), modeled as occurrents continuous with manufacturing processes.
  • Two-identity reconciliation — the open problem of relating GS1 item keys and ontology IRIs (both global identity systems) without over-eager owl:sameAs, so a vial is one thing with two interoperable names.
  • Item-level scale — the order-of-magnitude entity and event explosion of per-item tracking, which forces the graph to index the lot and aggregation structure while referencing high-volume track-and-trace systems for the event firehose.

Where this leads

The medicine is serialized, aggregated, and ready to ship — every unit uniquely identified and bridged to its lineage. The final chapter of Part V, Modeling Distribution and the Cold Chain to the Patient, follows the units out of the factory entirely — into temperature-controlled distribution, across organizational boundaries, toward the patient — and confronts what happens to a digital thread when it leaves the graph that created it and must be carried by systems you do not control.