adewg / ICAR

Standard messages and specifications for animal data exchange in livestock.
https://icar.org/
Apache License 2.0
47 stars 26 forks source link

Inventory transaction resources #385

Closed cookeac closed 1 year ago

cookeac commented 1 year ago

Defines a generalised icarInventoryTransactionResource and its specific versions, icarFeedTransactionResource and icarMedicineTransactionResource. Resolves #369

Note - update to exampleURLScheme included, but I know that I will need to merge these changes with the changes in #381 before this can be merged.

erwinspeybroeck commented 1 year ago

Andrew, a general remark from my side. You have a generic API for inventory-transactions: GET /locations/{location-scheme}/{location-id}/inventory-transactions and specific ones for feed and medicines. But in the specific ones also the complete list of family products is taken [ Animal Feeds, Animal Reproductive Products, Veterinary Supplies, Seed and Plant Material, Fertilisers and Nutrients, Pest Control Products, Other Animal Products, Milking Supplies, Fencing Supplies, Water System Supplies ], while one would expect this to be limited to e.g. Animal Feeds in case of feed. Not a blocking remark, I don't know if we can have a fixed family ...

cookeac commented 1 year ago

Andrew, a general remark from my side. You have a generic API for inventory-transactions: GET /locations/{location-scheme}/{location-id}/inventory-transactions and specific ones for feed and medicines. But in the specific ones also the complete list of family products is taken [ Animal Feeds, Animal Reproductive Products, Veterinary Supplies, Seed and Plant Material, Fertilisers and Nutrients, Pest Control Products, Other Animal Products, Milking Supplies, Fencing Supplies, Water System Supplies ], while one would expect this to be limited to e.g. Animal Feeds in case of feed. Not a blocking remark, I don't know if we can have a fixed family ...

You're exactly right, and I was aware of this. The only thing I could think was documentation - that if you were using the feed or medicine resource type, the family should be set to a constant value. I'll ask my team if there is any way to use the "default" keyword if the property is already defined.

cookeac commented 1 year ago

Reviewed at previous meetings; merging.