integritysystemscompany / animal_schema

Collaborative definition of JSON Schema to support individual animal data exchange. Builds on ICAR standard and focuses on Australian red meat needs.
6 stars 6 forks source link

Movement: consignment should be referenced as an ID, not embedded #58

Open Traksewt opened 4 years ago

Traksewt commented 4 years ago

Currently in arrivals and departures, the consignment is embedded in each animal. The consignment refers to a set of animals. This means that all animals will have the exact same consignment data embedded. This does not scale well as the number of animals transported increases.

It also adds more complexity in handling, ie what does it mean if 1 animal has slightly different consignment data to the others yet appear to be part of the same group?

We believe consignment should be created once, and referred to (e.g. by ID) for each animal in the arrival/departure.

cookeac commented 4 years ago

At face value, this proposal seems good:

  1. Consignment is meant to model a consignment of multiple animals moving together.
  2. Where a consignment maps to an official livestock registration and movement service (such as NLIS), its ID should map to the ID under that service, so again it should be unique for that transaction.

The primary reason why the ICAR team were hesitant about this is the additional API complexity this implied. It would imply that an implementer would need to provide separate API(s) to GET the consignment (and possibly a collection of consignments? this is not as clear).

For an application using the API to post data to a server:

We will definitely need to justify this one to the ICAR ADE working group.