Production Tracking Data Store
Events related to production tracking are stored in the Production Tracking Data Store in the MongoDB repository. Batch Production Records can be retrieved from the repository using the Calendar display in DataStudio or using the Lua and Web API interfaces.
Data Store Design
Batch Production Records are complex documents that can contain a number of different elements. The ISA-88 standard defines these elements as objects and also defines the structure of the Batch Record by assigning the elements/objects to containers (the containers can contain 0 to _n elements). In addition, each of the elements/objects contains attributes (also defined in ISA-88) and can also contain other elements/objects.

It is also possible that a Batch Record can also contain other Batch Production Records. Other elements/objects may also contain instances of their own type in a recursive manner such as Recipe Elements. This complicated document structure and the maintenance of the connections between all these separate but linked elements makes the design of a suitable repository data store challenging.
Storing an entire Batch Production Record in one document in MongoDB would place potential restrictions on the BPR size (MongoDB BSON documents have a size limit of 16MB) and imply an upper limit on the number of database indices (64). Instead, the BPR element/objects are stored as a separate documents and arranged in related collections with specially crafted indexes. The recursive relationships of objects are stored as a series of individual documents, using "parent links" to encode the original hierarchy. Their hierarchical relationship is reconstructed into JSON format after the individual documents have been fetched from the MongoDB production tracking data store.
A simple example of a Batch Production Record in JSON representation is shown below:
{
"EntryID": { "#": "5bea52133a6d4430600026c2" },
"ObjectType": { "#": "Batch Production Record" },
"Description": { "#": "Example record" },
"ID": { "#": "25d83a73-3f2e-42ed-b4b3-2a3ad7462b19", "@type": "uuid" },
"Events": [
{
"EntryID": { "#": "5c41c1733a6d4430600026c3" },
"ObjectType": { "#": "Event" },
"EventType": { "#": "Procedural Execution" },
"EventSubType": { "#": "Target Start Time" },
"Value": { "#": 1548151587 },
"EquipmentID": { "#": "/XI Pharma/Köln/Human Drugs/WSC/WSC-7/Coater", "@type": "InmationPath" }
},
{
"EntryID": { "#": "5c41c1733a6d4430600026c4" },
"ObjectType": { "#": "Event" },
"EventType": { "#": "Procedural Execution" },
"EventSubType": { "#": "Target End Time" },
"Value": { "#" : 1548281792 },
"EquipmentID": { "#": "/XI Pharma/Köln/Human Drugs/WSC/WSC-7/Coater", "@type": "InmationPath" }
}
]
}
Complete documentation of the ISA-88 schema used by inmation is documented here.
Batch Production Record Retrieval
Production Events and Batch Production Records can be retrieved from the Production Tracking data store in a number of ways.
Calendar Display in DataStudio
The Calendar display in DataStudio will display all production events by date. The production events are organised by the Equipment State (Starting, Aborted and Complete) and clicking on the event categories open all the corresponding batch records in a table below the calendar.
The Batch Production Records can be selected in the table and opened in the JSON viewer.

Lua API
The Production Tracking data store can also be queried and modified using the Lua API. The available functions are described in the Lua Scripting section of the documentation.
Web API
The Production Tracking data store can also be queried using the Web API endpoint. The available functions are described in the Web API section of the documentation.