diff --git a/.github/workflows/ValidateWithSpeccy.yml b/.github/workflows/ValidateWithSpeccy.yml deleted file mode 100644 index 1b787f3..0000000 --- a/.github/workflows/ValidateWithSpeccy.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Speccy JSON Validation CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: validate JSON URL scheme - run: | - docker run wework/speccy lint -v -j https://raw.githubusercontent.com/${{github.repository}}/${GITHUB_REF##*/}/url-schemes/exampleUrlScheme.json --skip openapi-tags-alphabetical - diff --git a/CHANGELOG.md b/CHANGELOG.md index 56938ef..0fb2b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,59 @@ # Changelog -## [v1.3.2](https://github.com/adewg/ICAR/tree/HEAD) (2023-02-15) +## [v1.4.0](https://github.com/adewg/ICAR/tree/v1.4.0) (2024-05-21) -[Full Changelog](https://github.com/adewg/ICAR/compare/v1.3.1...HEAD) +[Full Changelog](https://github.com/adewg/ICAR/compare/v1.3.2...v1.4.0) + +**Closed issues:** + +- Improve descriptions in icarGestationResource [\#463](https://github.com/adewg/ICAR/issues/463) +- Expand icarAttentionCategoryType.json and icarAttentionCauseType.json to include more types [\#462](https://github.com/adewg/ICAR/issues/462) +- Add Animal property to AttentionEventResource [\#461](https://github.com/adewg/ICAR/issues/461) +- Add missing property "EventDateTime" in resource "icarGestationResource" [\#459](https://github.com/adewg/ICAR/issues/459) +- Add support for feeding costs and feed refusal [\#458](https://github.com/adewg/ICAR/issues/458) +- Sorting of animals [\#456](https://github.com/adewg/ICAR/issues/456) +- Remove "enum" attribute from deprecated "@type" property of icarResourceType [\#451](https://github.com/adewg/ICAR/issues/451) +- Add support for milking shifts or batch milking to icarMilkingVisitEventResource [\#450](https://github.com/adewg/ICAR/issues/450) +- Remaining items to be addressed for ADE 1.4 release [\#443](https://github.com/adewg/ICAR/issues/443) +- Update icarResourceTypeCatalog.md [\#440](https://github.com/adewg/ICAR/issues/440) +- icarDeviceResource is not correctly structured [\#439](https://github.com/adewg/ICAR/issues/439) +- Add Certified Milk Weight and Total Milk Weight to Milking Visit [\#436](https://github.com/adewg/ICAR/issues/436) +- Second ManagementTag in IcarAnimalCoreResource [\#435](https://github.com/adewg/ICAR/issues/435) +- IcarMovementArrivalEventResource: additional information about former events [\#432](https://github.com/adewg/ICAR/issues/432) +- Add Discriminator to resourceTypeCatalog.md [\#426](https://github.com/adewg/ICAR/issues/426) +- Extend feed inventory transactions to allow feeds to be manufactured or harvested on farm [\#422](https://github.com/adewg/ICAR/issues/422) +- Add \(ICAR\) certification identifier for devices [\#412](https://github.com/adewg/ICAR/issues/412) +- Improve device references in events [\#411](https://github.com/adewg/ICAR/issues/411) +- Fraction property in the icarBreedFractionsType model [\#410](https://github.com/adewg/ICAR/issues/410) +- service-sires API [\#402](https://github.com/adewg/ICAR/issues/402) +- Device Attentions message [\#393](https://github.com/adewg/ICAR/issues/393) +- Define metrics for carcass observations [\#386](https://github.com/adewg/ICAR/issues/386) +- Group feed utilisation/allowance event [\#382](https://github.com/adewg/ICAR/issues/382) +- Add Inventory to MedicineRessource? [\#369](https://github.com/adewg/ICAR/issues/369) +- Request to make Meta required on IcarEventCoreResource and SourceId on Meta required [\#366](https://github.com/adewg/ICAR/issues/366) +- Define icarCarcassObservationsEventResource [\#363](https://github.com/adewg/ICAR/issues/363) +- Define a generalised carcass observation [\#362](https://github.com/adewg/ICAR/issues/362) +- Define carcass type / resource for carcass data [\#361](https://github.com/adewg/ICAR/issues/361) +- Define Processing Lot for carcass data [\#360](https://github.com/adewg/ICAR/issues/360) +- Extensions to Consignment for animals being sent to a processor [\#359](https://github.com/adewg/ICAR/issues/359) +- "number" or "SetId" added the AnimalSet [\#356](https://github.com/adewg/ICAR/issues/356) +- Heat recording - standardise vendor-specific fields and make them extensible [\#354](https://github.com/adewg/ICAR/issues/354) +- Possible agenda for webinar January 2023 [\#343](https://github.com/adewg/ICAR/issues/343) +- Provide predictions for expected milk yield [\#285](https://github.com/adewg/ICAR/issues/285) +- Define carcase data feedback event and collection [\#155](https://github.com/adewg/ICAR/issues/155) + +**Merged pull requests:** + +- Add AU/NZ/UK medicine registers [\#447](https://github.com/adewg/ICAR/pull/447) ([cookeac](https://github.com/cookeac)) +- feat: add rearing, growing & finishing to animal set purposes enum [\#392](https://github.com/adewg/ICAR/pull/392) ([willsimmMOA](https://github.com/willsimmMOA)) +- Add well-known identifier documentation for Australian NLIS ID and PIC [\#388](https://github.com/adewg/ICAR/pull/388) ([cookeac](https://github.com/cookeac)) +- Update icarLocationIdentifierType.md [\#380](https://github.com/adewg/ICAR/pull/380) ([matheuscanalmoa](https://github.com/matheuscanalmoa)) +- Update icarAnimalIdentifierType.md [\#379](https://github.com/adewg/ICAR/pull/379) ([matheuscanalmoa](https://github.com/matheuscanalmoa)) +- Update icarBreedIdentifierType.md [\#378](https://github.com/adewg/ICAR/pull/378) ([matheuscanalmoa](https://github.com/matheuscanalmoa)) + +## [v1.3.2](https://github.com/adewg/ICAR/tree/v1.3.2) (2023-02-15) + +[Full Changelog](https://github.com/adewg/ICAR/compare/v1.3.1...v1.3.2) **Closed issues:** diff --git a/collections/icarAnimalSortingCommandCollection.json b/collections/icarAnimalSortingCommandCollection.json new file mode 100644 index 0000000..a33ee52 --- /dev/null +++ b/collections/icarAnimalSortingCommandCollection.json @@ -0,0 +1,20 @@ +{ + "description": "Represents a collection of animal-sorting-commands. Based on icarResourceCollection to provide paging etc.", + "allOf": [ + { + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarAnimalSortingCommandResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case animal sorting commands (icarAnimalSortingCommandResource)." + } + } + } + ] +} diff --git a/collections/icarAttentionEventCollection.json b/collections/icarAttentionEventCollection.json new file mode 100644 index 0000000..4cfa2fb --- /dev/null +++ b/collections/icarAttentionEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of attention events generated by devices. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarAttentionEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case attention events." + } + } + } + ] +} diff --git a/collections/icarCarcassCollection.json b/collections/icarCarcassCollection.json new file mode 100644 index 0000000..d9c2da3 --- /dev/null +++ b/collections/icarCarcassCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of carcass resources. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarCarcassResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case carcasses." + } + } + } + ] + } \ No newline at end of file diff --git a/collections/icarCarcassObservationsEventCollection.json b/collections/icarCarcassObservationsEventCollection.json new file mode 100644 index 0000000..f9880cd --- /dev/null +++ b/collections/icarCarcassObservationsEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of carcass observation events. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarCarcassObservationsEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case carcass observation events." + } + } + } + ] + } \ No newline at end of file diff --git a/collections/icarFeedTransactionCollection.json b/collections/icarFeedTransactionCollection.json new file mode 100644 index 0000000..caa4703 --- /dev/null +++ b/collections/icarFeedTransactionCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of feed inventory transactions. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarFeedTransactionResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case inventory transactions." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarGroupFeedingEventCollection.json b/collections/icarGroupFeedingEventCollection.json new file mode 100644 index 0000000..fc02330 --- /dev/null +++ b/collections/icarGroupFeedingEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of feed intakes. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarGroupFeedingEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case group feeding events." + } + } + } + ] +} diff --git a/collections/icarGroupPositionObservationEventCollection.json b/collections/icarGroupPositionObservationEventCollection.json new file mode 100644 index 0000000..0850a9f --- /dev/null +++ b/collections/icarGroupPositionObservationEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of group position observation events.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarGroupPositionObservationEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case group position observation events." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarInventoryTransactionCollection.json b/collections/icarInventoryTransactionCollection.json new file mode 100644 index 0000000..d80ef06 --- /dev/null +++ b/collections/icarInventoryTransactionCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of inventory transactions. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarInventoryTransactionResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case inventory transactions." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarMedicineTransactionCollection.json b/collections/icarMedicineTransactionCollection.json new file mode 100644 index 0000000..2977aa5 --- /dev/null +++ b/collections/icarMedicineTransactionCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of medicine inventory transactions. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarMedicineTransactionResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case inventory transactions." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarMilkPredictionsCollection.json b/collections/icarMilkPredictionsCollection.json new file mode 100644 index 0000000..3eb46a3 --- /dev/null +++ b/collections/icarMilkPredictionsCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of milk predictions per animal. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarMilkPredictionResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case milk prediction events." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarPositionObservationEventCollection.json b/collections/icarPositionObservationEventCollection.json new file mode 100644 index 0000000..c5de060 --- /dev/null +++ b/collections/icarPositionObservationEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of animal position observation events.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarPositionObservationEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case position observation events." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarProcessingLotCollection.json b/collections/icarProcessingLotCollection.json new file mode 100644 index 0000000..0adfa02 --- /dev/null +++ b/collections/icarProcessingLotCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of carcass processing lots. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarProcessingLotResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case carcass processing lots." + } + } + } + ] + } \ No newline at end of file diff --git a/collections/icarReproEmbryoFlushingEventCollection.json b/collections/icarReproEmbryoFlushingEventCollection.json new file mode 100644 index 0000000..e5ae28a --- /dev/null +++ b/collections/icarReproEmbryoFlushingEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of animal embryo flushing events. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarReproEmbryoFlushingEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case embryo flushing events." + } + } + } + ] + } \ No newline at end of file diff --git a/collections/icarSortingSiteCollection.json b/collections/icarSortingSiteCollection.json new file mode 100644 index 0000000..1787aec --- /dev/null +++ b/collections/icarSortingSiteCollection.json @@ -0,0 +1,20 @@ +{ + "description": "Represents a collection of sites. Based on icarResourceCollection to provide paging etc.", + "allOf": [ + { + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarSortingSiteResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-sites." + } + } + } + ] +} diff --git a/enums/icarAttentionCategoryType.json b/enums/icarAttentionCategoryType.json new file mode 100644 index 0000000..97aeddd --- /dev/null +++ b/enums/icarAttentionCategoryType.json @@ -0,0 +1,15 @@ +{ + "description": "Defines a category of device messages that may allow filtering of alerts.", + + "type": "string", + + "enum": [ + "Behaviour", + "Environment", + "Health", + "Reproduction", + "DeviceIssue", + "Weight", + "Other" + ] + } diff --git a/enums/icarAttentionCauseType.json b/enums/icarAttentionCauseType.json new file mode 100644 index 0000000..368bab2 --- /dev/null +++ b/enums/icarAttentionCauseType.json @@ -0,0 +1,41 @@ +{ + "description": "Defines causes of alerts from devices.", + + "type": "string", + + "enum": [ + "Activity", + "AnimalTemperature", + "BodyCondition", + "EatingLess", + "EnvironmentTemperature", + "Disturbance", + "Health", + "HeartRate", + "Inactivity", + "Ketosis", + "Lameness", + "Location", + "LowerRumination", + "LyingTooLong", + "LyingTooShort", + "Mastitis", + "MobilityScore", + "NoMovement", + "Parturition", + "PostParturitionRisk", + "ProlongedParturition", + "RespirationRate", + "Standing", + "StandingUp", + "Walking", + "Heat", + "LowBattery", + "Offline", + "UnderWeight", + "OverWeight", + "AtTargetWeight", + "Other", + "Undefined" + ] + } diff --git a/enums/icarAttentionPriorityType.json b/enums/icarAttentionPriorityType.json new file mode 100644 index 0000000..2db5c30 --- /dev/null +++ b/enums/icarAttentionPriorityType.json @@ -0,0 +1,12 @@ +{ + "description": "Defines the relative priority of alerts.", + + "type": "string", + + "enum": [ + "Informational", + "Normal", + "Urgent", + "Critical" + ] + } \ No newline at end of file diff --git a/enums/icarCarcassPrimalType.json b/enums/icarCarcassPrimalType.json new file mode 100644 index 0000000..b756eee --- /dev/null +++ b/enums/icarCarcassPrimalType.json @@ -0,0 +1,10 @@ +{ + "description": "Indicates the primal being observed. Use Total if no primal cuts have been made.", + "type": "string", + "enum": [ + "Total", + "Forequarter", + "Middle", + "Hindquarter" + ] +} \ No newline at end of file diff --git a/enums/icarCarcassSideType.json b/enums/icarCarcassSideType.json new file mode 100644 index 0000000..8ef6eaf --- /dev/null +++ b/enums/icarCarcassSideType.json @@ -0,0 +1,9 @@ +{ + "description": "Indicates the side of the carcass. Use Both for small carcasses that are not split, or before carcasses are split.", + "type": "string", + "enum": [ + "Left", + "Right", + "Both" + ] +} \ No newline at end of file diff --git a/enums/icarCarcassStateType.json b/enums/icarCarcassStateType.json new file mode 100644 index 0000000..2b7a76b --- /dev/null +++ b/enums/icarCarcassStateType.json @@ -0,0 +1,8 @@ +{ + "description": "Indicates whether an observation event is on the hot or cold carcass (before or after chilling).", + "type": "string", + "enum": [ + "Hot", + "Cold" + ] +} \ No newline at end of file diff --git a/enums/icarChainProcessType.json b/enums/icarChainProcessType.json new file mode 100644 index 0000000..ec9f80d --- /dev/null +++ b/enums/icarChainProcessType.json @@ -0,0 +1,8 @@ +{ + "description": "Identifies whether observations are made before or after animals are killed.", + "type": "string", + "enum": [ + "AnteMortem", + "PostMortem" + ] +} \ No newline at end of file diff --git a/enums/icarInventoryTransactionKindType.json b/enums/icarInventoryTransactionKindType.json new file mode 100644 index 0000000..65525e0 --- /dev/null +++ b/enums/icarInventoryTransactionKindType.json @@ -0,0 +1,12 @@ +{ + "description": "Defines the kinds of inventory transaction, which can represent items received, disposed of (including sale or destruction), used, counted in a stocktake or calculated on hand.", + "type": "string", + "enum": [ + "Receipt", + "Disposal", + "OnHand", + "Produce", + "StockTake", + "Use" + ] +} \ No newline at end of file diff --git a/enums/icarMilkCharacteristicCodeType.json b/enums/icarMilkCharacteristicCodeType.json new file mode 100644 index 0000000..32a2fbc --- /dev/null +++ b/enums/icarMilkCharacteristicCodeType.json @@ -0,0 +1,22 @@ +{ + "description": "ICAR Milk Characteristics Codes.\nThe following units have to be applied:\n\n|SCC|Somatic cell count|x1000 cells/ml|NCL\n|FAT|Fat|%|VP\n|PROTEIN|Protein|%|VP\n|LAC|Lactose|%|VP\n|UREA|Urea|mg/l|M1\n|BLOOD|Blood|true/false|A99\n|ACETONE|Acetone|mmol/l|M33\n|BHB|Beta hydroxybutyrate|mmol/l|M33\n|LDH|Lactate dehydrogenase|IU/l|\n|PRO|Progesteron|mmol/l|M33\n|AVGCOND|Average conductivity value of the milk at 25 ° C|mS/cm|H61\n|MAXCOND|Maximum conductivity value of the milk at 25 ° C|mS/cm|H61\n|AVGFLWR|Average flow rate|Kg/min|F31\n|MAXFLWR|Max flow rate|Kg/min|F31\n|WEIGHT|Weight of animal|Kg|KGM\n|PAG|Pregnancy associated glycoprotein|mmol/l|M33", + "type": "string", + "enum": [ + "SCC", + "FAT", + "PROTEIN", + "LAC", + "UREA", + "BLOOD", + "ACETONE", + "BHB", + "LDH", + "PRO", + "AVGCOND", + "MAXCOND", + "AVGFLWR", + "MAXFLWR", + "WEIGHT", + "TEMPERATURE" + ] +} \ No newline at end of file diff --git a/enums/icarObservationStatusType.json b/enums/icarObservationStatusType.json new file mode 100644 index 0000000..58546e1 --- /dev/null +++ b/enums/icarObservationStatusType.json @@ -0,0 +1,11 @@ +{ + "description": "Observations may be measured or calculated - but the measurement or calculation may fail. This describes the outcome.", + + "type": "string", + "enum": [ + "Measured", + "NotMeasured", + "Calculated", + "NotCalculated" + ] +} \ No newline at end of file diff --git a/enums/icarPositionOnAnimalType.json b/enums/icarPositionOnAnimalType.json index f2f90ef..8359c8e 100644 --- a/enums/icarPositionOnAnimalType.json +++ b/enums/icarPositionOnAnimalType.json @@ -1,5 +1,5 @@ { - "description": "Enumeration for treatment or diagnosed positions.", + "description": "Enumeration for the position on the animal where the diagnosis or treatment occurred.", "type": "string", diff --git a/enums/icarProductFamilyType.json b/enums/icarProductFamilyType.json new file mode 100644 index 0000000..f92fed7 --- /dev/null +++ b/enums/icarProductFamilyType.json @@ -0,0 +1,18 @@ +{ + "description": "Defines the families of products", + "type": "string", + "enum": [ + "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", + "Fuel", + "Other" + ] +} diff --git a/enums/icarReproEmbryoFlushingMethodType.json b/enums/icarReproEmbryoFlushingMethodType.json new file mode 100644 index 0000000..4bdd814 --- /dev/null +++ b/enums/icarReproEmbryoFlushingMethodType.json @@ -0,0 +1,7 @@ +{ + "description": "The method of embryo flushing.", + + "type": "string", + + "enum": ["OPU-IVF", "Superovulation"] +} diff --git a/enums/icarReproHeatCertaintyType.json b/enums/icarReproHeatCertaintyType.json index d5b63f2..4262344 100644 --- a/enums/icarReproHeatCertaintyType.json +++ b/enums/icarReproHeatCertaintyType.json @@ -1,10 +1,11 @@ { - "description": "The certainty of a specific heat", + "description": "The certainty of a specific heat. 'Potential' is very early in the heat cycle, e.g. first 2 hours, followed by 'Suspect', until the animal is most likely 'InHeat'.", "type": "string", "enum": [ "InHeat", - "Suspect" + "Suspect", + "Potential" ] -} \ No newline at end of file +} diff --git a/enums/icarReproHeatDetectionMethodType.json b/enums/icarReproHeatDetectionMethodType.json index 6504a81..fc656a6 100644 --- a/enums/icarReproHeatDetectionMethodType.json +++ b/enums/icarReproHeatDetectionMethodType.json @@ -7,6 +7,9 @@ "Chemical", "Visual", "Pedometer", + "Collar", + "EarTag", + "Bolus", "Other" ] -} \ No newline at end of file +} diff --git a/enums/icarReproHeatIntensityType.json b/enums/icarReproHeatIntensityType.json index adb4f7f..25548c4 100644 --- a/enums/icarReproHeatIntensityType.json +++ b/enums/icarReproHeatIntensityType.json @@ -1,5 +1,5 @@ { - "description": "The method of insemination (Very weak,Weak,Normal,Strong,Very strong)", + "description": "The intensity of the heat (Very weak,Weak,Normal,Strong,Very strong)", "type": "string", @@ -10,4 +10,4 @@ "Strong", "VeryStrong" ] -} \ No newline at end of file +} diff --git a/resources/icarAnimalCoreResource.json b/resources/icarAnimalCoreResource.json index 9eebb1f..d0b18ce 100644 --- a/resources/icarAnimalCoreResource.json +++ b/resources/icarAnimalCoreResource.json @@ -83,9 +83,9 @@ }, "parentage": { "type": "array", + "description": "Parents of the animal. The array can handle multiple generations by specifying the parent of a parent.", "items": { - "$ref": "../types/icarParentageType.json", - "description": "Array of parents." + "$ref": "../types/icarParentageType.json" } }, "healthStatus": { @@ -95,4 +95,4 @@ } } ] -} \ No newline at end of file +} diff --git a/resources/icarAnimalSetResource.json b/resources/icarAnimalSetResource.json index 1efda65..f98c088 100644 --- a/resources/icarAnimalSetResource.json +++ b/resources/icarAnimalSetResource.json @@ -22,6 +22,10 @@ "type": "string", "description": "Human readable name of the set." }, + "reference": { + "type": "string", + "description": "This property can be used by parties for any other reference information used to synchronise systems or display to the user." + }, "purpose": { "$ref": "../enums/icarSetPurposeType.json", "description": "Purpose of the animal set." diff --git a/resources/icarAnimalSortingCommandResource.json b/resources/icarAnimalSortingCommandResource.json new file mode 100644 index 0000000..df762de --- /dev/null +++ b/resources/icarAnimalSortingCommandResource.json @@ -0,0 +1,34 @@ +{ + "description": "Sorting data for a specific animal on a location.", + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "type": "object", + "required": [ + "animal", + "site", + "validFrom" + ], + "properties": { + "animal": { + "$ref": "../types/icarAnimalIdentifierType.json", + "description": "Unique animal scheme and identifier combination." + }, + "site": { + "type": "string", + "description": "Unique identifier in the system for this site." + }, + "validFrom": { + "$ref": "../types/icarDateTimeType.json", + "description": "Specifies from when the sort command should be active. RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + }, + "validTo": { + "$ref": "../types/icarDateTimeType.json", + "description": "Specifies until when the sort command should be active. Could be left empty, when the sorting should be ongoing (until replaced). RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + } + } + } + ] +} diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json new file mode 100644 index 0000000..477c32d --- /dev/null +++ b/resources/icarAttentionEventResource.json @@ -0,0 +1,50 @@ +{ + "description": "Defines an alert for an animal that may require attention.", + + "allOf": [ + { + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "type": "object", + + "required" : ["category", "causes"], + + "properties": { + "alertEndDateTime": { + "type": ["string", "null"], + "$ref": "../types/icarDateTimeType.json", + "description": "RFC3339 date time that represents the end time of an alert (start time is the eventDateTime) if it has ended." + }, + "category": { + "$ref": "../enums/icarAttentionCategoryType.json", + "description": "A category that allows filtering of alerts by subject." + }, + "causes": { + "type": "array", + "items": { + "$ref": "../enums/icarAttentionCauseType.json" + }, + "description": "The specific causes of the alert. This is an array and at least one cause must be specified." + }, + "priority": { + "$ref": "../enums/icarAttentionPriorityType.json", + "description": "The relative priority of the alert." + }, + "severity": { + "$ref": "../enums/icarDiagnosisSeverityType.json", + "description": "A structured set of severity values that align with those used in disease diagnosis." + }, + "deviceAttentionScore": { + "type": "number", + "description": "Provides a manufacturer- and device-specific score related to the alert." + }, + "device": { + "$ref": "../types/icarDeviceReferenceType.json", + "description": "Identifies the device that is raising the alert." + } + } + } + ] +} + \ No newline at end of file diff --git a/resources/icarBatchResult.json b/resources/icarBatchResult.json index e087e80..03c6ffa 100644 --- a/resources/icarBatchResult.json +++ b/resources/icarBatchResult.json @@ -11,9 +11,8 @@ "description": "Metadata for the posted resource. Allows specification of the source, source Id to synchronise data." }, "messages": { - "type": "array", - "description": "An arry of errors for this resource.", - "nullable": true, + "type": ["array", "null"], + "description": "An array of errors for this resource. The messages array may be unspecified OR null.", "items": { "$ref": "../resources/icarResponseMessageResource.json" } diff --git a/resources/icarCarcassObservationsEventResource.json b/resources/icarCarcassObservationsEventResource.json new file mode 100644 index 0000000..1727a09 --- /dev/null +++ b/resources/icarCarcassObservationsEventResource.json @@ -0,0 +1,41 @@ +{ + "description": "An individual animal event in which a set of observations on a carcass, side or primal are recorded by an operator at a specified date-time.", + + "allOf": [ + { + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "type": "object", + "properties": { + "carcass": { + "description": "The carcass being observed.", + "$ref": "../types/icarCarcassType.json" + }, + "observations": { + "type": "array", + "description": "The array of observations performed in this event", + "items": { + "$ref": "../types/icarCarcassObservationType.json" + } + }, + "side": { + "description": "The side of the carcass observed in this event (use Both if not split).", + "$ref": "../enums/icarCarcassSideType.json" + }, + "primal": { + "description": "Identifies the primal being observed (`Total` if not split).", + "$ref": "../enums/icarCarcassPrimalType.json" + }, + "carcassState": { + "description": "Indicates whether the observation event is on the hot or cold (chilled) carcass.", + "$ref": "../enums/icarCarcassStateType.json" + }, + "device": { + "description": "Identifies the device used for performing the observations in this event.", + "$ref": "../resources/icarDeviceResource.json" + } + } + } + ] +} diff --git a/resources/icarCarcassResource.json b/resources/icarCarcassResource.json new file mode 100644 index 0000000..989d60a --- /dev/null +++ b/resources/icarCarcassResource.json @@ -0,0 +1,12 @@ +{ + "description": "A carcass (also called carcase) identifies a single animal which is processed at a plant. A carcass has identifying information and attributes describing the animal from the processor perspective.", + + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "$ref": "../types/icarCarcassType.json" + } + ] +} diff --git a/resources/icarDeviceResource.json b/resources/icarDeviceResource.json index 53c5165..623086a 100644 --- a/resources/icarDeviceResource.json +++ b/resources/icarDeviceResource.json @@ -1,55 +1,65 @@ { - "description": "Describes the devices on a certain location.", + "description": "This resource is used to describe an instance of a device at a location.", - "type": "object", + "allOf": [{ + "$ref": "icarResource.json" + }, + { + "type": "object", - "required": [ - "id" - ], + "required": [ + "id" + ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier on location level in the source system for this device." - }, - "serial": { - "type": "string", - "description": "Optionally, the serial number of the device." - }, - "name": { - "type": "string", - "description": "Name given to the device by the farmer." - }, - "description": { - "type": "string", - "description": "Description of the device by the farmer." - }, - "softwareVersion": { - "type": "string", - "description": "Version of the software installed on the device." - }, - "hardwareVersion": { - "type": "string", - "description": "Version of the hardware installed in the device." - }, - "isActive": { - "type": "boolean", - "description": "Indicates whether the device is active at this moment." - }, - "supportedMessages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "messages": { - "$ref": "../enums/icarMessageType.json" + "properties": { + "id": { + "type": "string", + "description": "Unique identifier on location level in the source system for this device." + }, + "serial": { + "type": "string", + "description": "Optionally, the serial number of the device." + }, + "name": { + "type": "string", + "description": "Name given to the device by the farmer." + }, + "description": { + "type": "string", + "description": "Description of the device by the farmer." + }, + "softwareVersion": { + "type": "string", + "description": "Version of the software installed on the device." + }, + "hardwareVersion": { + "type": "string", + "description": "Version of the hardware installed in the device." + }, + "isActive": { + "type": "boolean", + "description": "Indicates whether the device is active at this moment." + }, + "supportedMessages": { + "type": "array", + "description": "Identifies message types supported for the device", + "items": { + "type": "object", + "properties": { + "messages": { + "$ref": "../enums/icarMessageType.json" + } } } + }, + "manufacturer": { + "$ref": "../types/icarDeviceManufacturerType.json", + "description": "The device data as defined by the manufacturer." + }, + "registration": { + "$ref": "../types/icarDeviceRegistrationIdentifierType.json", + "description": "A registration identifier for the device (most devices should eventually have a registration issued by `org.icar` or other entity)." } - }, - "manufacturer": { - "$ref": "../types/icarDeviceManufacturerType.json", - "description": "The device data as defined by the manufacturer." } - } + }] } \ No newline at end of file diff --git a/resources/icarEventCoreResource.json b/resources/icarEventCoreResource.json index f595516..ed7675a 100644 --- a/resources/icarEventCoreResource.json +++ b/resources/icarEventCoreResource.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Core schema for representing an event.", "allOf": [ { diff --git a/resources/icarFeedTransactionResource.json b/resources/icarFeedTransactionResource.json new file mode 100644 index 0000000..ac416fc --- /dev/null +++ b/resources/icarFeedTransactionResource.json @@ -0,0 +1,24 @@ +{ + "description": "An inventory transaction resource for a feed product.", + "type": "object", + + "allOf": [ + { + "$ref": "../types/icarInventoryTransactionType.json" + }, + { + "type": "object", + + "required": [ + "product" + ], + + "properties": { + "product": { + "$ref": "../types/icarFeedReferenceType.json", + "description": "The feed product in this transaction." + } + } + } + ] +} \ No newline at end of file diff --git a/resources/icarGestationResource.json b/resources/icarGestationResource.json index 4d339d2..32040cd 100644 --- a/resources/icarGestationResource.json +++ b/resources/icarGestationResource.json @@ -1,5 +1,5 @@ { - "description": "Gestation information of animals on a specific location.", + "description": "This resource holds computed or predicted gestation information for animals at a location.\n- Use this resource to understand potential sire and expected calving date.\n- This resource should be recomputed when a heat, repro-status observation, or pregnancy check event is recorded.", "allOf": [{ "$ref": "icarResource.json" @@ -16,7 +16,7 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier in the source system for this event." + "description": "Unique identifier in the source system for this computed resource." }, "animal": { "$ref": "../types/icarAnimalIdentifierType.json", diff --git a/resources/icarGroupFeedingEventResource.json b/resources/icarGroupFeedingEventResource.json new file mode 100644 index 0000000..add60de --- /dev/null +++ b/resources/icarGroupFeedingEventResource.json @@ -0,0 +1,48 @@ +{ + "description": "Event for recording group or mob feeding. Allowances represent averages so this cannot be used to populate individual animal events.", + "type": "object", + "allOf": [ + { + "$ref": "../resources/icarGroupEventCoreResource.json" + } + ], + "properties": { + "feedingEndDateTime": { + + "$ref": "../types/icarDateTimeType.json", + "description": "The RFC3339 UTC moment from which animals could no longer consume the feed (eventDateTime represents the start of feed availability)." + }, + "feedPerAnimal": { + "type": "array", + "items": { + "$ref": "../types/icarConsumedFeedType.json", + "description": "Gives the feed offered to and consumed per animal (average)." + } + }, + "feedTotal": { + "description": "Gives the feed offered to and consumed (total for all animals).", + "type": "array", + "items": { + "$ref": "../types/icarConsumedFeedType.json" + } + }, + "rationPerAnimal": { + "type": "array", + "items": { + "$ref": "../types/icarConsumedRationType.json", + "description": "Gives the ration offered to and consumed per animal (average)." + } + }, + "rationTotal": { + "description": "Gives the feed offered to and consumed (total for all animals).", + "type": "array", + "items": { + "$ref": "../types/icarConsumedRationType.json" + } + }, + "device": { + "$ref": "../types/icarDeviceReferenceType.json", + "description": "Optional information about a device used for the feeding, if relevant." + } + } +} diff --git a/resources/icarGroupMovementArrivalEventResource.json b/resources/icarGroupMovementArrivalEventResource.json index 03d9753..bfb6a99 100644 --- a/resources/icarGroupMovementArrivalEventResource.json +++ b/resources/icarGroupMovementArrivalEventResource.json @@ -10,11 +10,12 @@ "properties": { "arrivalReason": { - "$ref": "../enums/icarArrivalReasonType.json" + "$ref": "../enums/icarArrivalReasonType.json", + "description": "Reason the group of animals arrived on the holding." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" - + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the group of animals to the holding." } } } diff --git a/resources/icarGroupMovementBirthEventResource.json b/resources/icarGroupMovementBirthEventResource.json index 0d239b1..43deef3 100644 --- a/resources/icarGroupMovementBirthEventResource.json +++ b/resources/icarGroupMovementBirthEventResource.json @@ -10,10 +10,11 @@ "properties": { "registrationReason": { - "$ref": "../enums/icarRegistrationReasonType.json" + "$ref": "../enums/icarRegistrationReasonType.json", + "description": "Identifies whether this is a birth or registration event" } } } ] -} \ No newline at end of file +} diff --git a/resources/icarGroupPositionObservationEventResource.json b/resources/icarGroupPositionObservationEventResource.json new file mode 100644 index 0000000..727f512 --- /dev/null +++ b/resources/icarGroupPositionObservationEventResource.json @@ -0,0 +1,12 @@ +{ + "description": "This event records that a group of animals was observed in a specific position or location (either a named location or a geographic coordinate).", + + "allOf": [ + { + "$ref": "../resources/icarGroupEventCoreResource.json" + }, + { + "$ref": "../types/icarPositionObservationType.json" + } + ] +} \ No newline at end of file diff --git a/resources/icarHealthStatusObservedEventResource.json b/resources/icarHealthStatusObservedEventResource.json index 8dc4fdc..e43dd14 100644 --- a/resources/icarHealthStatusObservedEventResource.json +++ b/resources/icarHealthStatusObservedEventResource.json @@ -10,8 +10,7 @@ "properties": { "observedStatus": { "$ref": "../enums/icarAnimalHealthStatusType.json", - "description": "Health status of the animal (such as Healthy, Suspicious, Ill, InTreatment, ToBeCulled).", - "nullable": false + "description": "Health status of the animal (such as Healthy, Suspicious, Ill, InTreatment, ToBeCulled). A null value is not supported." } } } diff --git a/resources/icarInventoryTransactionResource.json b/resources/icarInventoryTransactionResource.json new file mode 100644 index 0000000..60af4f5 --- /dev/null +++ b/resources/icarInventoryTransactionResource.json @@ -0,0 +1,22 @@ +{ + "description": "Generic inventory transaction resource. Some product families have specific transaction resources (e.g. medicines, feeds).", + + "allOf": [ + { + "$ref": "../types/icarInventoryTransactionType.json" + }, + { + "type": "object", + + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "../types/icarProductReferenceType.json", + "description": "The product in this inventory transaction." + } + } + } + ] +} \ No newline at end of file diff --git a/resources/icarMedicineTransactionResource.json b/resources/icarMedicineTransactionResource.json new file mode 100644 index 0000000..a620fee --- /dev/null +++ b/resources/icarMedicineTransactionResource.json @@ -0,0 +1,23 @@ +{ + "description": "An inventory transaction resource for a medicine product.", + + "allOf": [ + { + "$ref": "../types/icarInventoryTransactionType.json" + }, + { + "type": "object", + + "required": [ + "product" + ], + + "properties": { + "product": { + "$ref": "../types/icarMedicineReferenceType.json", + "description": "The medicine product in this transaction." + } + } + } + ] +} \ No newline at end of file diff --git a/resources/icarMilkPredictionResource.json b/resources/icarMilkPredictionResource.json new file mode 100644 index 0000000..3939f35 --- /dev/null +++ b/resources/icarMilkPredictionResource.json @@ -0,0 +1,27 @@ +{ + "description": "This returns a prediction of the expected milk, fat and protein for a cow for the remaining the lactation. A prediction of this production on the next testday is included and it also gives indication of when the peak production is reached. The eventDateTime for this event is the date of the prediction is made.", + + "allOf": [{ + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "type": "object", + + "properties": { + "averagePredictedProduction": { + "$ref": "../types/icarMilkingPredictionType.json" + }, + "daysInMilkAtLactationPeak": { + "type": "integer", + "description": "The days in milk in a lactation when the peak production is expected to occur." + }, + "lactationPeakProduction": { + "$ref": "../types/icarMilkingPredictionType.json" + }, + "predictedProductionNextMR": { + "$ref": "../types/icarMilkingPredictionType.json" + } + } + } + ] +} \ No newline at end of file diff --git a/resources/icarMilkingVisitEventResource.json b/resources/icarMilkingVisitEventResource.json index b97728e..877da68 100644 --- a/resources/icarMilkingVisitEventResource.json +++ b/resources/icarMilkingVisitEventResource.json @@ -24,14 +24,16 @@ "$ref": "../types/icarMilkDurationType.json" }, "milkingType": { + "description": "This code allows organisations to distinguish between manual and automated milking.", "$ref": "../enums/icarMilkingTypeCode.json" }, "milkingMilkWeight": { + "description": "A certified milking weight that complies with the ICAR guidelines.", "$ref": "../types/icarMilkingMilkWeightType.json" }, "milkingComplete": { "type": "boolean", - "description": "indication whether this milking was completed normally" + "description": "indication whether this milking was completed normally." }, "milkingParlourUnit": { "type": "string", @@ -43,25 +45,36 @@ }, "milkingDeviceId": { "type": "string", - "description": "The ID of the device where the milking took place" + "description": "The ID of the device where the milking took place." }, "measureDeviceId": { "type": "string", "description": "The ID of the device where the measurement of the milking took place" }, + "milkingShiftLocalStartDate": { + "$ref": "../types/icarDateTimeType.json", + "description": "The ISO8601 date in local time zone to which this milking shift belongs. A time component is not expected or required." + }, + "milkingShiftNumber": { + "type": "integer", + "description": "For milkings supervised by humans, this number represents the shift within a local date in which this milking visit occurred." + }, "quarterMilkings": { + "description": "A set of milking results for up to four quarters in dairy cows, or two teats for sheep or goats.", "type": "array", "items": { "$ref": "../types/icarQuarterMilkingType.json" } }, "animalMilkingSample": { + "description": "An array of zero or more sample/bottle details if the animal is milk tested at this milking.", "type": "array", "items": { "$ref": "../types/icarAnimalMilkingSampleType.json" } }, "milkCharacteristics": { + "description": "An array of milk characteristics other than certified milk weight. See icarMilkCharacteristicsType for documentation.", "type": "array", "items": { "$ref": "../types/icarMilkCharacteristicsType.json" diff --git a/resources/icarMovementArrivalEventResource.json b/resources/icarMovementArrivalEventResource.json index 6776804..82b2e83 100644 --- a/resources/icarMovementArrivalEventResource.json +++ b/resources/icarMovementArrivalEventResource.json @@ -9,15 +9,22 @@ "properties": { "arrivalReason": { - "$ref": "../enums/icarArrivalReasonType.json" + "$ref": "../enums/icarArrivalReasonType.json", + "description": "Reason the animal arrived on the holding." }, "animalDetail": { - "$ref": "icarAnimalCoreResource.json" + "$ref": "icarAnimalCoreResource.json", + "description": "Core animal details. Can be used if the animal has not already been defined on the holding." + }, + "animalState": { + "$ref": "../types/icarAnimalStateType.json", + "description": "State information about an animal." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal to the holding." } } } ] -} \ No newline at end of file +} diff --git a/resources/icarMovementBirthEventResource.json b/resources/icarMovementBirthEventResource.json index ee64de2..f2b7c57 100644 --- a/resources/icarMovementBirthEventResource.json +++ b/resources/icarMovementBirthEventResource.json @@ -13,10 +13,12 @@ "properties": { "registrationReason": { - "$ref": "../enums/icarRegistrationReasonType.json" + "$ref": "../enums/icarRegistrationReasonType.json", + "description": "Identifies whether this is a birth or a registration event" }, "animalDetail": { - "$ref": "../resources/icarAnimalCoreResource.json" + "$ref": "../resources/icarAnimalCoreResource.json", + "description": "Core animal details. Can be used if the animal has not already been defined on the holding." } } } diff --git a/resources/icarMovementDeathEventResource.json b/resources/icarMovementDeathEventResource.json index 1e73223..d93bc2d 100644 --- a/resources/icarMovementDeathEventResource.json +++ b/resources/icarMovementDeathEventResource.json @@ -29,7 +29,8 @@ "description": "Reference (receipt, docket, or ID) for disposal." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal from the holding." }, "deathMethod": { "$ref": "../enums/icarDeathMethodType.json", diff --git a/resources/icarMovementDepartureEventResource.json b/resources/icarMovementDepartureEventResource.json index 5dc6d06..78286b7 100644 --- a/resources/icarMovementDepartureEventResource.json +++ b/resources/icarMovementDepartureEventResource.json @@ -9,13 +9,16 @@ "properties": { "departureKind": { - "$ref": "../enums/icarDepartureKindType.json" + "$ref": "../enums/icarDepartureKindType.json", + "description": "Identifies the kind of departure of the animal from the holding." }, "departureReason": { - "$ref": "../enums/icarDepartureReasonType.json" + "$ref": "../enums/icarDepartureReasonType.json", + "description": "Identifies the reason for the departure of the animal from the holding." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal from the holding." } } } diff --git a/resources/icarPositionObservationEventResource.json b/resources/icarPositionObservationEventResource.json new file mode 100644 index 0000000..d305d1f --- /dev/null +++ b/resources/icarPositionObservationEventResource.json @@ -0,0 +1,12 @@ +{ + "description": "This event records that an animal was observed in a specific position or location (either a named location or a geographic coordinate).", + + "allOf": [ + { + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "$ref": "../types/icarPositionObservationType.json" + } + ] +} \ No newline at end of file diff --git a/resources/icarProcessingLotResource.json b/resources/icarProcessingLotResource.json new file mode 100644 index 0000000..3a10a44 --- /dev/null +++ b/resources/icarProcessingLotResource.json @@ -0,0 +1,12 @@ +{ + "description": "A processing lot describes a group or batch of animals from a single consignment that are processed together.", + + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "$ref": "../types/icarProcessingLotType.json" + } + ] +} diff --git a/resources/icarProgenyDetailsResource.json b/resources/icarProgenyDetailsResource.json index 00ea968..966f828 100644 --- a/resources/icarProgenyDetailsResource.json +++ b/resources/icarProgenyDetailsResource.json @@ -16,7 +16,7 @@ "properties": { "identifier": { "description": "Unique animal scheme and identifier combination.", - "nullable": true, + "type": ["object", "null"], "allOf": [ { "$ref": "../types/icarAnimalIdentifierType.json" @@ -24,8 +24,7 @@ ] }, "alternativeIdentifiers": { - "nullable": true, - "type": "array", + "type": ["array","null"], "items": { "$ref": "../types/icarAnimalIdentifierType.json" }, @@ -40,8 +39,7 @@ "description": "Gender of the animal." }, "managementTag": { - "type": "string", - "nullable": true, + "type": ["string", "null"], "description": "The identifier used by the farmer in day to day operations. In many cases this could be the animal number." }, "name": { @@ -54,7 +52,7 @@ }, "taggingDate": { "description": "Progeny tagging date in RFC3339 UTC (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" @@ -63,7 +61,7 @@ }, "birthStatus": { "description": "Birth status of the progeny.", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../enums/icarParturitionBirthStatusType.json" @@ -72,7 +70,7 @@ }, "birthSize": { "description": "Size of the progeny.", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../enums/icarParturitionBirthSizeType.json" @@ -81,7 +79,7 @@ }, "birthWeight": { "description": "Weight of the progeny.", - "nullable": true, + "type": ["object", "null"], "allOf": [ { "$ref": "../types/icarMassMeasureType.json" diff --git a/resources/icarReproDoNotBreedEventResource.json b/resources/icarReproDoNotBreedEventResource.json index eaf4f9c..ce7fbb3 100644 --- a/resources/icarReproDoNotBreedEventResource.json +++ b/resources/icarReproDoNotBreedEventResource.json @@ -8,9 +8,8 @@ "type": "object", "properties": { "doNotBreed": { - "type": "boolean", + "type": ["boolean", "null"], "description": "Set this attribute to true if the animal should not be bred, false if it may now be bred.", - "nullable": true, "default": true } } diff --git a/resources/icarReproEmbryoFlushingEventResource.json b/resources/icarReproEmbryoFlushingEventResource.json new file mode 100644 index 0000000..7144b57 --- /dev/null +++ b/resources/icarReproEmbryoFlushingEventResource.json @@ -0,0 +1,27 @@ +{ + "description": "Event for recording embyro flushing", + + "allOf": [ + { + "$ref": "../resources/icarEventCoreResource.json" + }, + { + "type": "object", + + "required": ["flushingMethod"], + "properties": { + "flushingMethod": { + "$ref": "../enums/icarReproEmbryoFlushingMethodType.json" + }, + "embryoCount": { + "type": "integer", + "description": "The number of embryos extracted in the flushing." + }, + "collectionCentre": { + "type": "string", + "description": "The location where the embryo was flushed." + } + } + } + ] +} diff --git a/resources/icarReproHeatEventResource.json b/resources/icarReproHeatEventResource.json index d219404..90258b1 100644 --- a/resources/icarReproHeatEventResource.json +++ b/resources/icarReproHeatEventResource.json @@ -1,7 +1,8 @@ { "description": "Event for recording heats.", - "allOf": [{ + "allOf": [ + { "$ref": "../resources/icarAnimalEventCoreResource.json" }, { @@ -14,6 +15,10 @@ "certainty": { "$ref": "../enums/icarReproHeatCertaintyType.json" }, + "commencementDateTime": { + "$ref": "../types/icarDateTimeType.json", + "description": "RFC3339 UTC date/time when the heat will start (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + }, "expirationDateTime": { "$ref": "../types/icarDateTimeType.json", "description": "RFC3339 UTC date/time when the heat will end (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." @@ -34,9 +39,22 @@ } } }, + "optimumInseminationWindow": { + "type": "array", + "description": "Details of the optimum breeding windows", + "items": { + "$ref": "../types/icarReproHeatWindowType.json" + } + }, + "deviceHeatProbability": { + "type": "number", + "format": "integer", + "description": "The manufacturer specific indication for the certainty of the heat" + }, "heatReportScrSenseTime": { "type": "object", "description": "Specific info when the heat was detected by SenseTime from SCR", + "deprecated": true, "properties": { "breedingWindow": { "type": "integer", @@ -51,6 +69,7 @@ "heatReportNedapCowControl": { "type": "object", "description": "Specific info when the heat was detected by CowControl from NEDAP", + "deprecated": true, "properties": { "expirationDateTime": { "$ref": "../types/icarDateTimeType.json", @@ -69,4 +88,4 @@ } } ] -} \ No newline at end of file +} diff --git a/resources/icarReproParturitionEventResource.json b/resources/icarReproParturitionEventResource.json index e6a6f90..4208dd4 100644 --- a/resources/icarReproParturitionEventResource.json +++ b/resources/icarReproParturitionEventResource.json @@ -29,16 +29,14 @@ "description": "Calving ease (enum corresponds to traditional 1-5 values)." }, "progenyDetails": { - "type": "array", - "nullable": true, + "type": ["array","null"], "items": { "$ref": "../resources/icarProgenyDetailsResource.json" }, "description": "List of progeny details. May not be fully identified, but recommend that gender and status are supplied at least." }, "progeny": { - "type": "array", - "nullable": true, + "type": ["array", "null"], "deprecated": true, "items": { "$ref": "../resources/icarAnimalCoreResource.json" diff --git a/resources/icarReproPregnancyCheckEventResource.json b/resources/icarReproPregnancyCheckEventResource.json index 9224f70..d738952 100644 --- a/resources/icarReproPregnancyCheckEventResource.json +++ b/resources/icarReproPregnancyCheckEventResource.json @@ -14,7 +14,7 @@ }, "result": { "$ref": "../enums/icarReproPregnancyResultType.json", - "description": "Result - uknown, empty, pregnant." + "description": "Result - unknown, empty, pregnant." }, "foetalAge": { "type": "integer", diff --git a/resources/icarResource.json b/resources/icarResource.json index 0decd45..e56c441 100644 --- a/resources/icarResource.json +++ b/resources/icarResource.json @@ -14,7 +14,7 @@ "properties": { "resourceType" : { "type": "string", - "description": "Uniform resource identifier (URI) or shortname of the logical resourceType. The ResourceType catalog defines the set of allowed resourceTyps." + "description": "Uniform resource identifier (URI) or shortname of the logical resourceType. The ResourceType catalog defines the set of allowed resourceTypes." }, "@self": { "type": "string", @@ -22,7 +22,7 @@ }, "meta": { "$ref": "../types/icarMetaDataType.json", - "description": "Meta-data for the resource. Mandatory if you wish to support synchronisation." + "description": "Meta-data for the resource. Mandatory if you wish to support synchronisation.\n Systems should maintain and provide meta data if at all possible.\nICAR ADE working group intend meta to be required in the next major release of ADE." }, "location": { "$ref": "../types/icarLocationIdentifierType.json", diff --git a/resources/icarResponseMessageResource.json b/resources/icarResponseMessageResource.json index 8f50b02..d5816a3 100644 --- a/resources/icarResponseMessageResource.json +++ b/resources/icarResponseMessageResource.json @@ -1,6 +1,6 @@ { "description": "An RFC7807 compliant problem response for JSON APIs.", - + "type": "object", "properties": { @@ -13,10 +13,9 @@ "description": "Distinguish errors, warnings, and informational messages." }, "status": { - "type": "integer", + "type": ["integer", "null"], "description": "The HTTP status code applicable to this problem.", - "format": "int32", - "nullable": true + "format": "int32" }, "title": { "type": "string", @@ -27,9 +26,8 @@ "description": "A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized." }, "instance": { - "type": "string", - "description": "A URI reference or internal JSON document reference to the specific data item that caused the problem.", - "nullable": true + "type": ["string", "null"], + "description": "A URI reference or internal JSON document reference to the specific data item that caused the problem." } } } \ No newline at end of file diff --git a/resources/icarSortingSiteResource.json b/resources/icarSortingSiteResource.json new file mode 100644 index 0000000..8f0b184 --- /dev/null +++ b/resources/icarSortingSiteResource.json @@ -0,0 +1,31 @@ +{ + "description": "Site available on a location.", + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier in the system for this site." + }, + "name": { + "type": "string", + "description": "Name of the site as it is known on the location." + }, + "capacity": { + "type": "number", + "default": 0, + "description": "The maximum capacity of this site.", + "format": "int32" + } + } + } + ] +} diff --git a/resources/icarTestDayResultEventResource.json b/resources/icarTestDayResultEventResource.json index e08475d..b5d9bbf 100644 --- a/resources/icarTestDayResultEventResource.json +++ b/resources/icarTestDayResultEventResource.json @@ -19,7 +19,10 @@ "items": { "$ref": "../types/icarMilkCharacteristicsType.json" } - } + }, + "predictedProductionOnTestDay": { + "$ref": "../types/icarMilkingPredictionType.json" + } } } ] diff --git a/resources/resourceTypeCatalog.md b/resources/resourceTypeCatalog.md index 1c0eaf6..9baec88 100644 --- a/resources/resourceTypeCatalog.md +++ b/resources/resourceTypeCatalog.md @@ -2,7 +2,7 @@ This document defines a set of URI identifiers and string short codes and maps them to ICAR resource types. -The catalog is represented as a table with the columns, shortname, URI, link to resource resource type in github. +The catalog is represented as a table with the columns, shortname, `resourceType` discriminator, URI, and name of the resource schema file. To help with readability and conciseness the URIs are represnted as CURIs (concise URIs) where the prefix is: @@ -13,46 +13,71 @@ and the expansion is: `http://data.adewg.icar.org/core/` -Short Name | URI | JSON Resource Type Definition ---- | --- | --- -Animal | icar:Animal | icarAnimalCoreResource.json -AnimalSetJoinEvent | icar:AnimalSetJoinEvent | icarAnimalSetJoinEventResource.json -AnimalSetLeaveEvent | icar:AnimalSetLeaveEvent | icarAnimalSetLeaveEventResource.json -AnimalSet | icar:AnimalSet | icarAnimalSetResource.json -BreedingValue | icar:BreedingValue | icarBreedingValueResource.json -ConformationScoreEvent | icar:ConformationScoreEvent | icarConformationScoreEventResource.json -DailyMilkingAverages | icar:DailyMilkingAverages | icarDailyMilkingAveragesResource.json -Device | icar:Device | icarDeviceResource.json -DiagnosisEvent | icar:DiagnosisEvent | icarDiagnosisEventResource.json -FeedIntakeEvent | icar:FeedIntakeEvent | icarFeedIntakeEventResource.json -FeedRecommendation | icar:FeedRecommendation | icarFeedRecommendationResource.json -FeedReport | icar:FeedReport | icarFeedReportResource.json -Feed | icar:Feed | icarFeedResource.json -FeedStorage | icar:FeedStorage | icarFeedStorageResource.json -Gestation | icar:Gestation | icarGestationResource.json -Lactation | icar:Lactation | icarLactationResource.json -LactationStatusObservedEvent | icar:LactationStatusObservedEvent | icarLactationStatusObservedEventResource.json -Location | icar:Location | icarLocationResource.json -Medicine | icar:Medicine | icarMedicineResource.json -MilkingDryOffEvent | icar:MilkingDryOffEvent | icarMilkingDryOffEventResource.json -MilkingVisitEvent | icar:MilkingVisitEvent | icarMilkingVisitEventResource.json -MovementArrivalEvent | icar:MovementArrivalEvent | icarMovementArrivalEventResource.json -MovementBirthEvent | icar:MovementBirthEvent | icarMovementBirthEventResource.json -MovementDeathEvent | icar:MovementDeathEvent | icarMovementDeathEventResource.json -MovementDepartureEvent | icar:MovementDepartureEvent | icarMovementDepartureEventResource.json -Ration | icar:Ration | icarRationResource.json -ReproAbortionEvent | icar:ReproAbortionEvent | icarReproAbortionEventResource.json -ReproDoNotBreedEvent | icar:ReproDoNotBreedEvent | icarReproDoNotBreedEventResource.json -ReproEmbryo | icar:ReproEmbryo | icarReproEmbryoResource.json -ReproHeatEvent | icar:ReproHeatEvent | icarReproHeatEventResource.json -ReproInseminationEvent | icar:ReproInsemonationEvent | icarReproInsemonationEventResource.json -ReproMatingRecommendation | icar:ReproMatingRecommendation | icarReproMatingRecommendationResource.json -ReproParturitionEvent | icar:ReproParturitionEvent | icarReproParturitionEventResource.json -ReproSemenStraw | icar:ReproSemenStraw | icarReproSemenStrawResource.json -ReproStatusObservedEvent | icar:ReproStatusObservedEvent | icarReproStatusObservedEventResource.json -TestDay | icar:TestDay | icarTestDayResource.json -TestDayResult | icar:TestDayResult | icarTestDayResultResource.json -TreatmentEvent | icar:TreatmentEvent | icarTreatmentEventResource.json -TreatmentProgramEvent | icar:TreatmentProgramEvent | icarTreatmentProgramEventResource.json -WeightEvent | icar:WeightEvent | icarWeightEventResource.json +Short Name | Discriminator (resourceType) | URI (future use) | JSON Resource Type Definition +--- | --- | --- | --- +Animal | **icarAnimalCoreResource** | icar:Animal | icarAnimalCoreResource.json +AnimalSetJoinEvent | **icarAnimalSetJoinEventResource** | icar:AnimalSetJoinEvent | icarAnimalSetJoinEventResource.json +AnimalSetLeaveEvent | **icarAnimalSetLeaveEventResource** | icar:AnimalSetLeaveEvent | icarAnimalSetLeaveEventResource.json +AnimalSet | **icarAnimalSetResource** | icar:AnimalSet | icarAnimalSetResource.json +AttentionEvent | **icarAttentionEventResource** | icar:AttentionEvent | icarAttentionEventResource.json +BreedingValue | **icarBreedingValueResource** | icar:BreedingValue | icarBreedingValueResource.json +CarcassObservationsEvent | **icarCarcassObservationsEventResource** | icar:CarcassObservations | icarCarcassObservationsEventResource.json +Carcass | **icarCarcassResource** | icar:Carcass | icarCarcassResource.json +ConformationScoreEvent | **icarConformationScoreEventResource** | icar:ConformationScoreEvent | icarConformationScoreEventResource.json +DailyMilkingAverages | **icarDailyMilkingAveragesResource** | icar:DailyMilkingAverages | icarDailyMilkingAveragesResource.json +Device | **icarDeviceResource** | icar:Device | icarDeviceResource.json +DiagnosisEvent | **icarDiagnosisEventResource** | icar:DiagnosisEvent | icarDiagnosisEventResource.json +FeedIntakeEvent | **icarFeedIntakeEventResource** | icar:FeedIntakeEvent | icarFeedIntakeEventResource.json +FeedRecommendation | **icarFeedRecommendationResource** | icar:FeedRecommendation | icarFeedRecommendationResource.json +FeedReport | **icarFeedReportResource** | icar:FeedReport | icarFeedReportResource.json +Feed | **icarFeedResource** | icar:Feed | icarFeedResource.json +FeedStorage | **icarFeedStorageResource** | icar:FeedStorage | icarFeedStorageResource.json +FeedTransaction | **icarFeedTransactionResource** | icar:FeedTransaction | icarFeedTransactionResource.json +Gestation | **icarGestationResource** | icar:Gestation | icarGestationResource.json +GroupFeedingEvent | **icarGroupFeedingEventResource** | icar:GroupFeedingEvent | icarGroupFeedingEventResource.json +GroupMovementArrivalEvent | **icarGroupMovementArrivalEventResource**| icar:GroupMovementArrivalEvent | icarGroupMovementArrivalEventResource.json +GroupMovementBirthEvent | **icarGroupMovementBirthEventResource** | icar:GroupMovementBirthEvent | icarGroupMovementBirthEventResource.json +GroupMovementDeathEvent | **icarGroupMovementDeathEventResource** | icar:GroupMovementDeathEvent | icarGroupMovementDeathEventResource.json +GroupMovementDepartureEvent | **icarGroupMovementDepartureEventResource** | icar:GroupMovementDepartureEvent | icarGroupMovementDepartureEventResource.json +GroupTreatmentEvent | **icarGroupTreatmentEventResource** | icar:GroupTreatmentEvent | icarGroupTreatmentEventResource.json +GroupWeightEvent | **icarGroupWeightEventResource** | icar:GroupWeightEvent | icarGroupWeightEventResource.json +HealthStatusObservedEvent | **icarHealthStatusObservedEventResource** | icar:HealthStatusObservedEvent | icarHealthStatusObservedEventResource.json +InventoryTransaction | **icarInventoryTransactionResource** | icar:InventoryTransaction | icarInventoryTransactionResource.json +Lactation | **icarLactationResource** | icar:Lactation | icarLactationResource.json +LactationStatusObservedEvent | **icarLactationStatusObservedEventResource** | icar:LactationStatusObservedEvent | icarLactationStatusObservedEventResource.json +Location | **icarLocationResource** | icar:Location | icarLocationResource.json +Medicine | **icarMedicineResource** | icar:Medicine | icarMedicineResource.json +MedicineTransaction | **icarMedicineTransactionResource** | icar:MedicineTransaction | icarMedicineTransactionResource.json +MilkingDryOffEvent | **icarMilkingDryOffEventResource** | icar:MilkingDryOffEvent | icarMilkingDryOffEventResource.json +MilkingVisitEvent | **icarMilkingVisitEventResource** | icar:MilkingVisitEvent | icarMilkingVisitEventResource.json +MilkPrediction | **icarMilkPredictionResource** | icar:MilkPrediction | icarMilkPredictionResource.json +MovementArrivalEvent | **icarMovementArrivalEventResource** | icar:MovementArrivalEvent | icarMovementArrivalEventResource.json +MovementBirthEvent | **icarMovementBirthEventResource** | icar:MovementBirthEvent | icarMovementBirthEventResource.json +MovementDeathEvent | **icarMovementDeathEventResource** | icar:MovementDeathEvent | icarMovementDeathEventResource.json +MovementDepartureEvent | **icarMovementDepartureEventResource** | icar:MovementDepartureEvent | icarMovementDepartureEventResource.json +ProcessingLot | **icarProcessingLotResource** | icar:ProcessingLot | icarProcessingLotResource.json +ProgenyDetails | **icarProgenyDetailsResource** | icar:ProgenyDetails | icarProgenyDetailsResource.json +Ration | **icarRationResource** | icar:Ration | icarRationResource.json +ReproAbortionEvent | **icarReproAbortionEventResource** | icar:ReproAbortionEvent | icarReproAbortionEventResource.json +ReproDoNotBreedEvent | **icarReproDoNotBreedEventResource** | icar:ReproDoNotBreedEvent | icarReproDoNotBreedEventResource.json +ReproEmbryoFlushingEvent | **icarReproEmbryoFlushingEventResource** | icar:ReproEmbryoFlushingEvent | icarReproEmbryoFlushingEventResource.json +ReproEmbryo | **icarReproEmbryoResource** | icar:ReproEmbryo | icarReproEmbryoResource.json +ReproHeatEvent | **icarReproHeatEventResource** | icar:ReproHeatEvent | icarReproHeatEventResource.json +ReproInseminationEvent | **icarReproInsemonationEventResource** | icar:ReproInsemonationEvent | icarReproInsemonationEventResource.json +ReproMatingRecommendation | **icarReproMatingRecommendationResource** | icar:ReproMatingRecommendation | icarReproMatingRecommendationResource.json +ReproParturitionEvent | **icarReproParturitionEventResource** | icar:ReproParturitionEvent | icarReproParturitionEventResource.json +ReproPregnancyCheckEvent | **icarReproPregnancyCheckEventResource** | icar:ReproPregnancyCheckEvent | icarReproPregnancyCheckEventResource.json +ReproSemenStraw | **icarReproSemenStrawResource** | icar:ReproSemenStraw | icarReproSemenStrawResource.json +ReproStatusObservedEvent | **icarReproStatusObservedEventResource** | icar:ReproStatusObservedEvent | icarReproStatusObservedEventResource.json +SchemeType | **icarSchemeTypeResource** | icar:SchemeType | icarSchemeTypeResource.json +SchemeValue | **icarSchemeValueResource** | icar:SchemeValue | icarSchemeValueResource.json +Statistics | **icarStatisticsResource** | icar:Statistics | icarStatisticsResource.json +TestDay | **icarTestDayResource** | icar:TestDay | icarTestDayResource.json +TestDayResult | **icarTestDayResultResource** | icar:TestDayResult | icarTestDayResultResource.json +TreatmentEvent | **icarTreatmentEventResource** | icar:TreatmentEvent | icarTreatmentEventResource.json +TreatmentProgramEvent | **icarTreatmentProgramEventResource** | icar:TreatmentProgramEvent | icarTreatmentProgramEventResource.json +TypeClassificationEvent | **icarTypeClassificationEventResource** | icar:TypeClassificationEvent | icarTypeClassificationEventResource.json +WeightEvent | **icarWeightEventResource** | icar:WeightEvent | icarWeightEventResource.json +WithdrawalEvent | **icarWithdrawalEventResource** | icar:WithdrawalEvent | icarWithdrawalEventResource.json + diff --git a/types/icarAnimalStateType.json b/types/icarAnimalStateType.json new file mode 100644 index 0000000..0ed1ca9 --- /dev/null +++ b/types/icarAnimalStateType.json @@ -0,0 +1,24 @@ +{ + "description": "State information about an animal", + + "type": "object", + + "properties": { + "currentLactationParity": { + "type": "number", + "description": "The current parity of the animal." + }, + "lastCalvingDate": { + "$ref": "../types/icarDateType.json", + "description": "RFC3339 UTC date (see https://ijmacd.github.io/rfc3339-iso8601/)." + }, + "lastInseminationDate": { + "$ref": "../types/icarDateType.json", + "description": "RFC3339 UTC date (see https://ijmacd.github.io/rfc3339-iso8601/)." + }, + "lastDryingOffDate": { + "$ref": "../types/icarDateType.json", + "description": "RFC3339 UTC date (see https://ijmacd.github.io/rfc3339-iso8601/)." + } + } +} diff --git a/types/icarBreedFractionsType.json b/types/icarBreedFractionsType.json index 3cd7371..52909ae 100644 --- a/types/icarBreedFractionsType.json +++ b/types/icarBreedFractionsType.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Defines the breeds of the animal by fraction expressed as a denominator and, for each breed, a numerator.", "type": "object", @@ -14,11 +14,13 @@ }, "fractions": { "type": "array", + "description": "The numerators of breed fractions for each breed proportion.", "items": { "type": "object", "properties": { "breed": { - "$ref": "icarBreedIdentifierType.json" + "$ref": "icarBreedIdentifierType.json", + "description": "The breed for this breed fraction using a scheme and id." }, "fraction": { "type": "number", @@ -29,4 +31,4 @@ } } } -} \ No newline at end of file +} diff --git a/types/icarCarcassMetricIdentifierType.json b/types/icarCarcassMetricIdentifierType.json new file mode 100644 index 0000000..007ecec --- /dev/null +++ b/types/icarCarcassMetricIdentifierType.json @@ -0,0 +1,7 @@ +{ + "description": "Scheme and identifier based mechanism for identifying carcass metrics (things observed, measured, or graded about carcasses).", + + "allOf": [{ + "$ref": "../types/icarIdentifierType.json" + }] +} \ No newline at end of file diff --git a/types/icarCarcassMetricType.json b/types/icarCarcassMetricType.json new file mode 100644 index 0000000..490817b --- /dev/null +++ b/types/icarCarcassMetricType.json @@ -0,0 +1,20 @@ +{ + "description": "Identifies a metric (observation, measure, or assessment) for a carcass that has a scheme-based identifier, plus the method used and optionally a qualfier.", + + "type": "object", + + "properties": { + "id": { + "$ref": "../types/icarCarcassMetricIdentifierType.json", + "description": "The id of the metric expressed as a scheme and id." + }, + "method": { + "description": "The standard method used to determine the value of the metric.", + "type": "string" + }, + "qualifier": { + "description": "Qualifier applied to further describe the metric (if any).", + "type": "string" + } + } +} diff --git a/types/icarCarcassObservationType.json b/types/icarCarcassObservationType.json new file mode 100644 index 0000000..893ab98 --- /dev/null +++ b/types/icarCarcassObservationType.json @@ -0,0 +1,40 @@ +{ + "description": "A single observation (measurement or assessment) of a metric that is recorded for a carcase, side or primal. The observation may have a numeric value or a qualitative grade.", + + "type": "object", + + "required": [ + "metric" + ], + + "properties": { + "metric": { + "description": "The metric observed.", + "$ref": "../types/icarCarcassMetricType.json" + }, + "value": { + "description": "The observed value of the metric if it is numeric.", + "type": "number" + }, + "units": { + "description": "The units in which the value is measured. UN/CEFACT units SHOULD be used for metrics where these are applicable.", + "type": "string" + }, + "resolution": { + "description": "The smallest measurement difference that can be discriminated. Specified in the units, for instance 0.5 (kilograms).", + "type": "number" + }, + "qualitativeValue": { + "description": "The observed value of the metric if it is a grade or other string.", + "type": "string" + }, + "observationStatus": { + "description": "The status of the observation.", + "$ref": "../enums/icarObservationStatusType.json" + }, + "remark": { + "description": "The reason if there is an issue with the observation", + "type": "string" + } + } +} \ No newline at end of file diff --git a/types/icarCarcassType.json b/types/icarCarcassType.json new file mode 100644 index 0000000..6cb0af8 --- /dev/null +++ b/types/icarCarcassType.json @@ -0,0 +1,66 @@ +{ + "description": "A carcass (also called carcase) identifies a single animal which is processed at a plant. A carcass has identifying information and attributes describing the animal from the processor perspective.", + + "type": "object", + + "required": [ + "processingLot", + "bodyNo", + "identifiers" + ], + + "properties": { + "processingLot": { + "description": "The lot in which the carcass was processed. ", + "$ref": "../types/icarProcessingLotType.json" + }, + "killDateTime": { + "description": "Date/time the animal was killed. Ideally this should be a precise date and time. However, older systems may only be able to supply the date.", + "$ref": "../types/icarDateTimeType.json" + }, + "bodyNo": { + "type": "integer", + "description": "A unique identifier on the chain and kill date assigned to the carcass by the processor." + }, + "identifiers": { + "type": "array", + "description": "Identifiers for the carcass including the animal's id", + "items": { + "$ref": "../types/icarAnimalIdentifierType.json" + } + }, + "sex": { + "description": "The sex of the animal as assessed at the processing plant.", + "$ref": "../enums/icarAnimalGenderType.json" + }, + "birthDate": { + "description": "Assessed date of birth of the animal represented using RFC3339 (UTC).", + "$ref": "../types/icarDateTimeType.json" + }, + "birthDateConfidence": { + "description": "A 3-character string representing Year, Month, and Day (YMD). Each character can have the value A (actual), E (estimate), U (unknown). e.g. AEU.", + "type": "string", + "maxLength": 3 + }, + "primaryBreed": { + "description": "Primary breed of the animal as visually categorised by the plant, represented using ICAR breed codes.", + "$ref": "../types/icarBreedIdentifierType.json" + }, + "plantBoningRun": { + "description": "Allocation of the carcass to a plant boning run (if any).", + "type": "integer" + }, + "plantBoningRunTemplate": { + "description": "Where a Boning Run Template is allocated by the plant, the name or ID of the template.", + "type": "string" + }, + "destinationCode": { + "description": "Plant-specific destination codes that are used for company requirements and to link to boning run processing.", + "type": "string" + }, + "processorGrid": { + "description": "Reference to a processor-specific grid used to calculate the price paid to the producer", + "type": "string" + } + } +} \ No newline at end of file diff --git a/types/icarConsignmentDeclarationType.json b/types/icarConsignmentDeclarationType.json new file mode 100644 index 0000000..d6337a2 --- /dev/null +++ b/types/icarConsignmentDeclarationType.json @@ -0,0 +1,16 @@ +{ + "description": "A Consignment Declaration provides a claim or declaration, usually by the source of animals, regarding the assurance or other status of animals in the consignment.", + + "type": "object", + + "properties": { + "declarationId": { + "description": "Identifies the specific declaration being made using a scheme and an id.", + "$ref": "../types/icarDeclarationIdentifierType.json" + }, + "declaredValue": { + "type": "string", + "description": "The value of the declaration." + } + } +} \ No newline at end of file diff --git a/types/icarConsignmentType.json b/types/icarConsignmentType.json index 303587c..a9b84ce 100644 --- a/types/icarConsignmentType.json +++ b/types/icarConsignmentType.json @@ -9,7 +9,8 @@ "description": "Official identifier for the movement." }, "originLocation": { - "$ref": "../types/icarLocationIdentifierType.json" + "$ref": "../types/icarLocationIdentifierType.json", + "description": "The location of the origin of the consignment expressed as a scheme and id." }, "originAddress": { "description": "Origin address for movement.", @@ -20,8 +21,13 @@ "description": "A structured, schema.org-style address for the origin location.", "$ref": "../types/PostalAddress.json" }, + "originOrganization": { + "description": "The organisational details of the origin, including any necessary identifiers.", + "$ref": "../types/icarOrganizationType.json" + }, "destinationLocation": { - "$ref": "../types/icarLocationIdentifierType.json" + "$ref": "../types/icarLocationIdentifierType.json", + "description": "The location of the destination of the consignment expressed as a scheme and id." }, "destinationAddress": { "description": "Destination address for movement.", @@ -32,6 +38,10 @@ "description": "A structured, schema.org-style address for the destination location.", "$ref": "../types/PostalAddress.json" }, + "destinationOrganization": { + "description": "The organisational details of the destination, including any necessary identifiers.", + "$ref": "../types/icarOrganizationType.json" + }, "loadingDateTime": { "$ref": "../types/icarDateTimeType.json", "description": "RFC3339 UTC date and time animals were loaded for transport (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." @@ -63,6 +73,43 @@ "farmAssuranceReference": { "$ref": "../types/icarIdentifierType.json", "description": "Identification reference of a farm assurance operation." + }, + "countConsigned": { + "type": "integer", + "description": "The number of animals despatched or consigned from the origin." + }, + "countReceived": { + "type": "integer", + "description": "The number of animals received at the destination." + }, + "hoursOffFeed": { + "type": "integer", + "description": "The number of hours since animals in the consignment had access to feed." + }, + "hoursOffWater": { + "type": "integer", + "description": "The number of hours since animals in the consignment had access to water." + }, + "references": { + "type": "array", + "description": "References associated with the consignment. These may be additional to the single transport reference (for instance, to support multi-mode transport).", + "items": { + "$ref": "../types/icarIdentifierType.json" + } + }, + "interestedParties": { + "type": "array", + "description": "Identifies the parties and their interests in the consignment.", + "items": { + "$ref": "../types/icarInterestedPartyType.json" + } + }, + "declarations": { + "type": "array", + "description": "Country, species or scheme -specific declarations for the consignment.", + "items": { + "$ref": "../types/icarConsignmentDeclarationType.json" + } } } -} \ No newline at end of file +} diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 9e2ac76..a9b1ea9 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -1,5 +1,5 @@ { - "description": "gives the consumed feed and the amount the animal was entitled to. Amounts are real weights", + "description": "gives the consumed feed and the amount the animal/group was entitled to. Amounts are real weights", "type": "object", "required": [ "feedId" @@ -12,11 +12,23 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to reveive" + "description": "The amount of feed the animal/group was entitled to receive" + }, + "delivered": { + "$ref": "../types/icarFeedQuantityType.json", + "description": "The amount of feed the animal/group received. If not present, it can be assumed that the delivered will be equal to entitlement" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal has consumed" + "description": "The amount of feed the animal/group has consumed" + }, + "dryMatterPercentage": { + "type": "number", + "description": "The dry matter content of the feed provided or consumed, expressed as a percentage." + }, + "totalCost": { + "$ref": "../types/icarCostType.json", + "description": "Total cost applied to this feeding. Based on the delivered or entitled amount" } } } diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index e7bec9e..d901609 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -1,5 +1,5 @@ { - "description": "Gives the consumed amount of feed and the amount the animal was entitled to. Amounts are real weights.", + "description": "Gives the consumed amount of a mixed ration, and the amount the animal/group was entitled to. Amounts are real weights.", "type": "object", "required": [ @@ -13,11 +13,23 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to reveive" + "description": "The amount of feed the animal/group was entitled to receive" + }, + "delivered": { + "$ref": "../types/icarFeedQuantityType.json", + "description": "The amount of feed the animal/group received. If not present, it can be assumed that the delivered will be equal to entitlement" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal has consumed" + "description": "The amount of feed the animal/group has consumed" + }, + "dryMatterPercentage": { + "type": "number", + "description": "The dry matter content of the ration provided or consumed, expressed as a percentage." + }, + "totalCost": { + "$ref": "../types/icarCostType.json", + "description": "Total cost applied to this feeding. Based on the delivered or entitled amount" } } } diff --git a/types/icarCostType.json b/types/icarCostType.json new file mode 100644 index 0000000..b5ca07d --- /dev/null +++ b/types/icarCostType.json @@ -0,0 +1,22 @@ +{ + "description": "The amount of costs", + + "type": "object", + + "required": [ + "currency", + "value" + ], + + "properties": { + "currency": { + "type": "string", + "description": "The currency of the cost expressed using the ISO 4217 3-character code (such as AUD, GBP, USD, EUR)." + }, + "value": { + "type": "number", + "format": "double", + "description": "The costs in the units specified." + } + } +} diff --git a/types/icarDeclarationIdentifierType.json b/types/icarDeclarationIdentifierType.json new file mode 100644 index 0000000..631cb0b --- /dev/null +++ b/types/icarDeclarationIdentifierType.json @@ -0,0 +1,11 @@ +{ + "description": "A scheme and ID combination that uniquely identifies a claim or declaration in an assurance programme or equivalent.", + + "type": "object", + + "allOf": [ + { + "$ref": "../types/icarIdentifierType.json" + } + ] +} \ No newline at end of file diff --git a/types/icarDeviceReferenceType.json b/types/icarDeviceReferenceType.json index e8171c7..291c711 100644 --- a/types/icarDeviceReferenceType.json +++ b/types/icarDeviceReferenceType.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Device reference details.", "allOf": [{ "$ref": "../types/icarResourceReferenceType.json" @@ -15,6 +15,14 @@ "serial": { "type": "string", "description": "Optionally, the serial number of the device." + }, + "manufacturerName": { + "type": "string", + "description": "The manufacturer of the device. This is called `manufacturerName` to distinguish it from the manufacturer-specific parameters in icarDevice." + }, + "registration": { + "$ref": "../types/icarDeviceRegistrationIdentifierType.json", + "description": "A registration identifier for the device (most devices should eventually have a registration issued by `org.icar` or other entity)." } } } diff --git a/types/icarDeviceRegistrationIdentifierType.json b/types/icarDeviceRegistrationIdentifierType.json new file mode 100644 index 0000000..a6adcd4 --- /dev/null +++ b/types/icarDeviceRegistrationIdentifierType.json @@ -0,0 +1,11 @@ +{ + "description": "A device registration scheme and ID that identifies a registered device. The primary scheme used should be `org.icar`.", + + "type": "object", + + "allOf": [ + { + "$ref": "../types/icarIdentifierType.json" + } + ] +} \ No newline at end of file diff --git a/types/icarFeedDurationType.json b/types/icarFeedDurationType.json index 071a6b7..b4aedc4 100644 --- a/types/icarFeedDurationType.json +++ b/types/icarFeedDurationType.json @@ -14,7 +14,8 @@ }, "value": { "type": "number", - "format": "double" + "format": "double", + "description": "The duration of the feeding in the units specified." } } } diff --git a/types/icarFeedQuantityType.json b/types/icarFeedQuantityType.json index e6f899a..7b773e2 100644 --- a/types/icarFeedQuantityType.json +++ b/types/icarFeedQuantityType.json @@ -15,7 +15,8 @@ }, "value": { "type": "number", - "format": "double" + "format": "double", + "description": "The feed quantity in the units specified." } } } diff --git a/types/icarFeedReferenceType.json b/types/icarFeedReferenceType.json new file mode 100644 index 0000000..ba4e22d --- /dev/null +++ b/types/icarFeedReferenceType.json @@ -0,0 +1,22 @@ +{ + "description": "Feed Reference defines a feed product.", + + "allOf": [ + { + "$ref": "../types/icarProductReferenceType.json" + }, + { + "type": "object", + "properties": { + "category": { + "$ref": "../enums/icarFeedCategoryType.json", + "description": "Defines the category of the feed product." + }, + "type": { + "$ref": "../types/icarFeedIdentifierType.json", + "description": "The scheme + id identifying the type of feed." + } + } + } + ] +} \ No newline at end of file diff --git a/types/icarGroupSpecifierType.json b/types/icarGroupSpecifierType.json index 8e05016..4c6a4d3 100644 --- a/types/icarGroupSpecifierType.json +++ b/types/icarGroupSpecifierType.json @@ -5,23 +5,19 @@ "properties": { "lactationNumberRangeMin": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "minimum number of lactations for the animals in the group." }, "lactationNumberRangeMax": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "maximum number of lactations for the animals in the group." }, "daysInMilkRangeMin": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "minimum number of days in milk for the animals in the group." }, "daysInMilkRangeMax": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "maximum number of days in milk for the animals in the group." }, "animalSetId": { diff --git a/types/icarIndividualWeightType.json b/types/icarIndividualWeightType.json index 5bce0bd..501be0f 100644 --- a/types/icarIndividualWeightType.json +++ b/types/icarIndividualWeightType.json @@ -4,14 +4,13 @@ "properties": { "animal": { + "type": ["object", "null"], "$ref": "../types/icarAnimalIdentifierType.json", - "description": "Unique animal scheme and identifier combination.", - "nullable": true + "description": "Unique animal scheme and identifier combination." }, "weight": { - "type": "number", - "description": "The weight measurement", - "nullable": true + "type": ["number", "null"], + "description": "The weight measurement" } } } \ No newline at end of file diff --git a/types/icarInterestedPartyType.json b/types/icarInterestedPartyType.json new file mode 100644 index 0000000..bd12967 --- /dev/null +++ b/types/icarInterestedPartyType.json @@ -0,0 +1,23 @@ +{ + "description": "Identifies the interests an organization has in an entity, for example in a consignment or in a processingLot. Extends the organization object.", + + "type": "object", + + "allOf": [ + { + "$ref": "../types/icarOrganizationType.json" + }, + { + "required": ["interests"], + "properties": { + "interests": { + "type": "array", + "description": "Identifies the type of interest that the party has in a consignment or animal.", + "items": { + "type": "string" + } + } + } + } + ] +} \ No newline at end of file diff --git a/types/icarInventoryClassificationType.json b/types/icarInventoryClassificationType.json index 3110fc3..845e9e2 100644 --- a/types/icarInventoryClassificationType.json +++ b/types/icarInventoryClassificationType.json @@ -26,10 +26,9 @@ "description": "Primary breed defined using an identifier and scheme." }, "birthPeriod": { - "type": "string", + "type": ["string", "null"], "pattern": "^(([0-9]{4})|([0-9]{4}-[0-1][0-9])|([0-9]{4}-[0-1][0-9]-[0-3][0-9](Z?)(\/|--)[0-9]{4}-[0-1][0-9]-[0-3][0-9](Z?)))$", - "description": "The range of birth dates. Use YYYY (all one year), YYYY-MM (one month), or two RFC3339 date-times separated by / to represent a range.", - "nullable": true + "description": "The range of birth dates. Use YYYY (all one year), YYYY-MM (one month), or two RFC3339 date-times separated by / to represent a range." }, "reproductiveStatus": { "$ref": "../enums/icarAnimalReproductionStatusType.json", @@ -45,6 +44,10 @@ "items": { "$ref": "../enums/icarProductionPurposeType.json" } + }, + "reference": { + "type": "string", + "description": "An external reference (identifier or name) to further identify the group of animals." } } } \ No newline at end of file diff --git a/types/icarInventoryTransactionType.json b/types/icarInventoryTransactionType.json new file mode 100644 index 0000000..63a25f1 --- /dev/null +++ b/types/icarInventoryTransactionType.json @@ -0,0 +1,58 @@ +{ + "description": "Inventory Transaction defines a transaction on a product inventory where the transaction may be a receipt, disposal, on hand, stocktake, use", + + "allOf": [ + { + "$ref": "../resources/icarEventCoreResource.json" + } + , + { + "type": "object", + + "required": [ + "transactionKind", + "quantity", + "units" + ], + + "properties": { + "transactionKind": { + "$ref": "../enums/icarInventoryTransactionKindType.json", + "description": "Identifies the transaction kind." + }, + "quantity": { + "type": "number", + "description": "The overall volume, weight or count of the product in the transaction in the units defined." + }, + "units": { + "description": "The units of the quantity specified. Where applicable it is recommended that uncefact mass and volume units are used.", + "type": "string" + }, + "supplierName": { + "type": "string", + "description": "The supplier of the product in this transaction. This is particularly relevant if the transaction is a receipt." + }, + "expiryDate": { + "$ref": "../types/icarDateTimeType.json", + "description": "The expiry date of the product supplied in the transaction." + }, + "totalCost": { + "type": "number", + "description": "Total cost applied to this transaction" + }, + "currency": { + "type": "string", + "description": "The currency of the cost expressed using the ISO 4217 3-character code (such as AUD, GBP, USD, EUR)." + }, + "packSize": { + "type": "number", + "description": "The volume or weight of the product in a pack in the units defined. Especially relevant for Vet Medicines." + }, + "numberOfPacks": { + "type": "number", + "description": "The number of packs of the product in the transaction. Especially relevant for Vet Medicines. Could be a decimal number for a part-pack." + } + } + } + ] +} \ No newline at end of file diff --git a/types/icarMedicineCourseSummaryType.json b/types/icarMedicineCourseSummaryType.json index fcdad68..19c7757 100644 --- a/types/icarMedicineCourseSummaryType.json +++ b/types/icarMedicineCourseSummaryType.json @@ -33,14 +33,12 @@ "description": "Total dose proposed or administered." }, "numberOfTreatments": { - "type": "number", - "description": "The number of treatments included in the course.", - "nullable": true + "type": ["number", "null"], + "description": "The number of treatments included in the course." }, "treatmentInterval": { - "type": "integer", - "description": "The interval between treatments specified in HOURS.", - "nullable": true + "type": ["integer", "null"], + "description": "The interval between treatments specified in HOURS." }, "batches": { "type": "array", diff --git a/types/icarMedicineReferenceType.json b/types/icarMedicineReferenceType.json index a08b42e..60ee9d9 100644 --- a/types/icarMedicineReferenceType.json +++ b/types/icarMedicineReferenceType.json @@ -2,21 +2,19 @@ "description": "Provides basic details about a medicine and links to a medicine resource (if available).", "allOf": [ { - "$ref": "icarResourceReferenceType.json" + "$ref": "../types/icarProductReferenceType.json" }, { "type": "object", "properties": { - "name": { - "type": "string", - "description": "Name of the medicine or remedy given for this treatment" - }, + "approved": { "type": "string", "description": "An indicator whether the medicine or remedy is an approved medicine" }, "registeredIdentifier": { - "$ref": "../types/icarMedicineIdentifierType.json" + "$ref": "../types/icarMedicineIdentifierType.json", + "description": "The registered identifier of the medicine expressed as a scheme and id." } } } diff --git a/types/icarMetaDataType.json b/types/icarMetaDataType.json index 88bdab0..2be379a 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -14,7 +14,7 @@ }, "sourceId": { "type": "string", - "description": "Unique Id (ideally UUID) for the resource in the original source system. Treat source and sourceId as an icarIdentifierType." + "description": "Unique Id within Source (e.g. UUID, IRI, URI, or composite ID if needed) for the resource in the original source system. \n Systems should generate (if needed), store, and return sourceId if at all possible.\nICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release (2.0)." }, "isDeleted": { "type": "boolean", @@ -26,7 +26,7 @@ }, "created": { "description": "RFC3339 UTC date/time of creation (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" @@ -39,7 +39,7 @@ }, "validFrom": { "description": "RFC3339 UTC start of period when the resource is valid (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" @@ -48,7 +48,7 @@ }, "validTo": { "description": "RFC3339 UTC end of the period when the resoure is valid (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" diff --git a/types/icarMilkCharacteristicsType.json b/types/icarMilkCharacteristicsType.json index 9eeb63f..3286b1a 100644 --- a/types/icarMilkCharacteristicsType.json +++ b/types/icarMilkCharacteristicsType.json @@ -11,7 +11,7 @@ "properties": { "characteristic": { "type": "string", - "description": "ICAR Milk Characteristics Codes and values: SCC, FAT, PROTEIN, LAC, UREA, BLOOD, ACETONE, BHB, LDH, PRO, AVGCOND, MAXCOND, AVGFLWR, MAXFLWR, WEIGHT, TEMPERATURE.\nThe following units have to be applied:\n\n|SCC|Somatic cell count|x1000 cells/ml|NCL\n|FAT|Fat|%|VP\n|PROTEIN|Protein|%|VP\n|LAC|Lactose|%|VP\n|UREA|Urea|mg/l|M1\n|BLOOD|Blood|true/false|A99\n|ACETONE|Acetone|mmol/l|M33\n|BHB|Beta hydroxybutyrate|mmol/l|M33\n|LDH|Lactate dehydrogenase|IU/l|\n|PRO|Progesteron|mmol/l|M33\n|AVGCOND|Average conductivity value of the milk at 25 ° C|mS/cm|H61\n|MAXCOND|Maximum conductivity value of the milk at 25 ° C|mS/cm|H61\n|AVGFLWR|Average flow rate|Kg/min|F31\n|MAXFLWR|Max flow rate|Kg/min|F31\n|WEIGHT|Weight of animal|Kg|KGM\n|PAG|Pregnancy associated glycoprotein|mmol/l|M33" + "description": "Treat this field as an enum, with the list and units in https://github.com/adewg/ICAR/blob/ADE-1/enums/icarMilkCharacteristicCodeType.json." }, "value": { "type": "string", @@ -19,7 +19,7 @@ }, "unit": { "type": "string", - "description": "the defaults are described above, only use this field when differed from the default. Use UN/CEFACT codes." + "description": "Use the units for characteristics in https://github.com/adewg/ICAR/blob/ADE-1/enums/icarMilkCharacteristicCodeType.json. Only override when your units for a characteristic are different. Use UN/CEFACT codes." }, "measuringDevice": { "type": "string", diff --git a/types/icarMilkingPredictionType.json b/types/icarMilkingPredictionType.json new file mode 100644 index 0000000..1e2a729 --- /dev/null +++ b/types/icarMilkingPredictionType.json @@ -0,0 +1,25 @@ +{ + "description": "The amount of milk, fat and protein milked in a defined period of time", + + "type": "object", + + "required": [ + "milkWeight" + ], + + "properties": { + "milkWeight": { + "$ref": "../types/icarMilkingMilkWeightType.json" + }, + "fatWeight": { + "$ref": "../types/icarMilkingMilkWeightType.json" + }, + "proteinWeight": { + "$ref": "../types/icarMilkingMilkWeightType.json" + }, + "hours": { + "type": "number", + "description": "The number of hours in which the mentioned milk, fat and protein were produced. Most commonly used is a 24 hours production." + } + } +} \ No newline at end of file diff --git a/types/icarOrganizationIdentifierType.json b/types/icarOrganizationIdentifierType.json new file mode 100644 index 0000000..addd4b6 --- /dev/null +++ b/types/icarOrganizationIdentifierType.json @@ -0,0 +1,7 @@ +{ + "description": "Scheme and identifier based mechanism for identifying organisations, including registered establishments and scheme memberships.", + + "allOf": [{ + "$ref": "../types/icarIdentifierType.json" + }] +} \ No newline at end of file diff --git a/types/icarOrganizationIdentityType.json b/types/icarOrganizationIdentityType.json new file mode 100644 index 0000000..90a22f3 --- /dev/null +++ b/types/icarOrganizationIdentityType.json @@ -0,0 +1,24 @@ +{ + "description": "The identity of an organization in livestock supply chains. Based on a minimal set of identifiers from schema.org/organization.", + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "description": "Name of the organisation" + }, + "leiCode": { + "description": "An organization identifier that uniquely identifies a legal entity as defined in ISO 17442.", + "type": "string" + }, + "globalLocationNumber": { + "description": "The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.", + "type": "string" + }, + "uri": { + "description": "A uniform resource identifier that is the unique reference or for this organisation, such as its web site.", + "type": "string", + "format": "uri" + } + } +} \ No newline at end of file diff --git a/types/icarOrganizationType.json b/types/icarOrganizationType.json new file mode 100644 index 0000000..3996ea6 --- /dev/null +++ b/types/icarOrganizationType.json @@ -0,0 +1,36 @@ +{ + "description": "Details for an organization that support its role in livestock systems or supply chains. Conceptually extends schema.org/organization.", + "allOf": [ + { + "$ref": "../types/icarOrganizationIdentityType.json" + } + , + { + "type": "object", + "properties": { + "establishmentIdentifiers": { + "type": "array", + "description": "Scheme and identifier combinations that provide official registrations for a business or establishment", + "items": { + "$ref": "../types/icarOrganizationIdentifierType.json" + } + }, + "address": { + "$ref": "../types/PostalAddress.json", + "description": "Postal address or physical address in postal format, including country. Optional as this may already be specified in a consignment." + }, + "parentOrganization": { + "description": "The larger organization that this organization is a sub-organization of, if any.", + "$ref": "../types/icarOrganizationIdentityType.json" + }, + "membershipIdentifiers": { + "type": "array", + "description": "Scheme and identifier combinations that identity membership in programmes", + "items": { + "$ref": "../types/icarOrganizationIdentifierType.json" + } + } + } + } + ] +} \ No newline at end of file diff --git a/types/icarPlantChainType.json b/types/icarPlantChainType.json new file mode 100644 index 0000000..d9f5a7a --- /dev/null +++ b/types/icarPlantChainType.json @@ -0,0 +1,25 @@ +{ + "description": "Identifies a processing chain in the plant.", + + "type": "object", + + "required": [ + "plant", + "chainId" + ], + + "properties": { + "plant": { + "description": "Identifies the plant using an Organization object.", + "$ref": "../types/icarOrganizationType.json" + }, + "chainId": { + "description": "A within-plant identifier for the processing chain. This might be a name or numeric code.", + "type": "string" + }, + "chainProcess": { + "description": "Whether the part of the processing chain involved is before (Ante) or after (Post) mortem.", + "$ref": "../enums/icarChainProcessType.json" + } + } +} \ No newline at end of file diff --git a/types/icarPositionObservationType.json b/types/icarPositionObservationType.json new file mode 100644 index 0000000..f6d89d5 --- /dev/null +++ b/types/icarPositionObservationType.json @@ -0,0 +1,20 @@ +{ + "description": "This type may be included in a position observation event to identify either a named position (such as a barn or pen) or a geographic location.", + + "type": "object", + + "properties": { + "positionName": { + "type": "string", + "description": "The name of a location, such as a barn, pen, building, or field." + }, + "site": { + "type": "string", + "description": "Identifier for a sorting site (icarSortingSiteResource) for this position." + }, + "geometry": { + "$ref": "https://geojson.org/schema/Geometry.json", + "description": "A GeoJSON geometry (such as a latitude/longitude point) that specifies the position." + } + } +} diff --git a/types/icarPositionType.json b/types/icarPositionType.json index c1277e3..72ac79b 100644 --- a/types/icarPositionType.json +++ b/types/icarPositionType.json @@ -6,7 +6,7 @@ "properties": { "position": { - "description": "The position to be treated or diagnosed.", + "description": "Position on the animal where the diagnosis or treatment occurred.", "$ref": "../enums/icarPositionOnAnimalType.json" } } diff --git a/types/icarProcessingLotType.json b/types/icarProcessingLotType.json new file mode 100644 index 0000000..639f0f0 --- /dev/null +++ b/types/icarProcessingLotType.json @@ -0,0 +1,65 @@ +{ + "description": "A Processing Lot ('lot' for short) describes a group or batch of animals from a single consignment that are processed together.", + + "type": "object", + + "required": [ + "name", + "chain", + "species" + ], + + "properties": { + "id": { + "description": "A plant internal identifier to uniquely identify the processing lot. This should be a UUID or otherwise unique.", + "type": "string" + }, + "name": { + "description": "A name or visual identifier allocated by the plant to the lot.", + "type": "string" + }, + "chain": { + "description": "The processing plant and chain for this lot.", + "$ref": "../types/icarPlantChainType.json" + }, + "killDateTime": { + "description": "The date and time at which killing on the lot started", + "$ref": "../types/icarDateTimeType.json" + }, + "startBodyNumber": { + "description": "Ordinal of the first body or carcass in lot counting across same plant, chain and kill date", + "type": "integer" + }, + "endBodyNumber": { + "description": "Ordinal of the last body or carcass in lot counting across same plant, chain and kill date", + "type": "integer" + }, + "lotCount": { + "description": "The number of animals (bodies for a processor) processed in this lot.", + "type": "integer" + }, + "targetMarket": { + "description": "Represents the intended market for the stock. It is defined by the processor and may be mapped to industry grids or schedules.", + "type": "string" + }, + "killType": { + "description": "The processor's internal classification code", + "type": "string" + }, + "species": { + "description": "The animal species being processed in the lot", + "$ref": "../enums/icarAnimalSpecieType.json" + }, + "consignment": { + "description": "Details of the inbound consignment from which animals in this lot are drawn.", + "$ref": "../types/icarConsignmentType.json" + }, + "interestedParties": { + "type": "array", + "description": "Identifies the parties and their interests in the processing lot.", + "items": { + "$ref": "../types/icarInterestedPartyType.json" + } + } + } +} \ No newline at end of file diff --git a/types/icarProductIdentifierType.json b/types/icarProductIdentifierType.json new file mode 100644 index 0000000..dc7f4c9 --- /dev/null +++ b/types/icarProductIdentifierType.json @@ -0,0 +1,9 @@ +{ + "description": "Provides a scheme + identifier mechanism for product types.", + + "allOf": [ + { + "$ref": "../types/icarIdentifierType.json" + } + ] +} \ No newline at end of file diff --git a/types/icarProductReferenceType.json b/types/icarProductReferenceType.json new file mode 100644 index 0000000..c503b0b --- /dev/null +++ b/types/icarProductReferenceType.json @@ -0,0 +1,44 @@ +{ + "description": "Product Reference refers to a specific product. It is based on the generalised resource reference type.", + "type": "object", + + "allOf": [ + { + "$ref": "../types/icarResourceReferenceType.json" + }, + { + "type": "object", + + "required": [ + "identifier", + "family" + ], + + "properties": { + "identifiers": { + "type": "array", + "description": "An array of product identifiers. This allows a product to have multiple identifiers for manufacturers, distributors, official registrations, etc.", + "items": { + "$ref": "../types/icarProductIdentifierType.json" + } + }, + "family": { + "$ref": "../enums/icarProductFamilyType.json", + "description": "The product family to which this product belongs." + }, + "name": { + "type": "string", + "description": "The name of the product." + }, + "gtin": { + "type": "string", + "description": "GS1 global trade item number." + }, + "unspc": { + "type": "string", + "description": "UN service and product code (the code, not the accompanying description)." + } + } + } + ] +} \ No newline at end of file diff --git a/types/icarQuarterMilkingType.json b/types/icarQuarterMilkingType.json index 072e743..c08ae24 100644 --- a/types/icarQuarterMilkingType.json +++ b/types/icarQuarterMilkingType.json @@ -15,18 +15,15 @@ ] }, "xposition": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Optional milking robot X position. Vendors may choose not to provide this." }, "yposition": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Optional milking robot Y position. Vendors may choose not to provide this." }, "zposition": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Optional milking robot Z position. Vendors may choose not to provide this." }, "quarterMilkingDuration": { diff --git a/types/icarReproHeatWindowType.json b/types/icarReproHeatWindowType.json new file mode 100644 index 0000000..aea9eb6 --- /dev/null +++ b/types/icarReproHeatWindowType.json @@ -0,0 +1,24 @@ +{ + "description": "The optimum breeding window for an animal in heat", + + "type": "object", + + "required": [ + "startDateTime" + ], + + "properties": { + "startDateTime": { + "$ref": "../types/icarDateTimeType.json", + "description": "RFC3339 UTC date/time when the optimum insemination window starts (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + }, + "endDateTime": { + "$ref": "../types/icarDateTimeType.json", + "description": "RFC3339 UTC date/time when the optimum insemination window ends (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + }, + "windowName" : { + "type": "string", + "description": "The name of the optimum insemination breeding window." + } + } +} \ No newline at end of file diff --git a/types/icarResourceReferenceType.json b/types/icarResourceReferenceType.json index 09ed987..6634b26 100644 --- a/types/icarResourceReferenceType.json +++ b/types/icarResourceReferenceType.json @@ -15,8 +15,7 @@ }, "@type": { "type": "string", - "description": "Deprecated - use reltype. Specifies whether this is a single resource Link or a Collection.", - "enum": ["Link"] + "description": "Deprecated - use reltype. Specifies whether this is a single resource Link or a Collection." }, "identifier": { "$ref": "../types/icarIdentifierType.json", diff --git a/types/icarStatisticsGroupType.json b/types/icarStatisticsGroupType.json index 6992906..7fc789c 100644 --- a/types/icarStatisticsGroupType.json +++ b/types/icarStatisticsGroupType.json @@ -8,8 +8,7 @@ "$ref": "../enums/icarGroupType.json" }, "denominator": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Number of animals in the group." }, "icarGroupSpecifier": { diff --git a/types/icarStatisticsType.json b/types/icarStatisticsType.json index 13ce1fb..e00d3c3 100644 --- a/types/icarStatisticsType.json +++ b/types/icarStatisticsType.json @@ -6,14 +6,15 @@ "properties": { "metric": { "$ref": "../types/icarMetricType.json", - "description": "The metric code for a specific statitics. See https://github.com/adewg/ICAR/wiki/Schemes for more info" + "description": "The metric code for a specific statistics. See https://github.com/adewg/ICAR/wiki/Schemes for more info" }, "unit": { "type": "string", "description": "The unit of the metric. This must be appropriate to the metric and UN-CEFACT unit codes should be used where possible." }, "aggregation": { - "$ref": "../enums/icarAggregationType.json" + "$ref": "../enums/icarAggregationType.json", + "description": "The aggregation applied to the metric." }, "value": { "type": "number", diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 1ea7e56..4667c8a 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Release Candidate Messages", "description": "The specifications of messages which are ready for ICAR approval and release", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -14,39 +14,43 @@ "url": "https://icar-ade.standard.com" }], "tags": [{ - "name": "ADE-1.3 additions", + "name": "ADE-1.4 additions", "description": "new endpoints not yet approved" }, { - "name": "ADE-1.3-feed", + "name": "ADE-1.4-feed", "description": "Feed messages approved by the working group" }, { - "name": "ADE-1.3-health", + "name": "ADE-1.4-health", "description": "Health messages approved by the working group" }, { - "name": "ADE-1.3-management", + "name": "ADE-1.4-management", "description": "Management messages approved by the working group" }, { - "name": "ADE-1.3-milk", + "name": "ADE-1.4-milk", "description": "Milk messages approved by the working group" }, { - "name": "ADE-1.3-performance", + "name": "ADE-1.4-performance", "description": "Performance messages approved by the working group" }, { - "name": "ADE-1.3-registration", + "name": "ADE-1.4-registration", "description": "Registration messages approved by the working group" }, { - "name": "ADE-1.3-reproduction", + "name": "ADE-1.4-reproduction", "description": "Reproduction messages approved by the working group" }, { - "name": "ADE-1.3-scheme", + "name": "ADE-1.4-carcass", + "description": "Carcass messages approved by the working group" + }, + { + "name": "ADE-1.4-scheme", "description": "Scheme definitions approved by the working group" } ], @@ -57,7 +61,7 @@ "summary": "Get available schema/id combinations for locations.", "description": "# Purpose\nProvide a list of available locations.\nShould return only those combinations the user currently logged in has access to.", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "responses": { "200": { @@ -87,7 +91,7 @@ "summary": "Get the milking-withdrawals for a certain location", "description": "# Purpose\nProvides the milking-withdrawals for a certain location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -126,7 +130,7 @@ "summary": "Get the data for milking visits", "description": "# Purpose\nProvides data from visits of animals to a milking parlour.\n \nThis comprises all possible data. Anybody can choose to define API's that return less information in the response.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -169,7 +173,7 @@ "summary": "Get the test days", "description": "# Purpose\nProvides data from the test days on a farm that intersects with the given start/end date if provided. Otherwise returns all available entries.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -212,7 +216,7 @@ "summary": "Get the data for test day results", "description": "# Purpose\nProvides data from the test day for animals on a farm\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -248,6 +252,45 @@ } } } + }, + "/locations/{location-scheme}/{location-id}/milk-predictions": { + "get": { + "operationId": "get-milk-predictions", + "summary": "Get the milk predictions for a certain location", + "description": "# Purpose\nProvides the milk predictions for a location\n", + "tags": [ + "ADE-1.4-milk" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the milk predictions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMilkPredictionsCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } }, "/locations/{location-scheme}/{location-id}/daily-milking-averages": { "get": { @@ -255,7 +298,7 @@ "summary": "Get daily averages for milking-visits of a animals", "description": "# Purpose\nProvides daily averages of the milking-visits of per animal.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -293,7 +336,7 @@ "summary": "Get the data for lactations", "description": "# Purpose\nProvides data from lactations of animals.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -325,7 +368,7 @@ "summary": "Get the list of observed changes to lactation status for animals.", "description": "# Purpose\nProvides a list of events arising from observed changes to lactation status.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -363,7 +406,7 @@ "summary": "Get the births for a certain location", "description": "# Purpose\nProvides the born animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -401,7 +444,7 @@ "summary": "Get the deaths for a certain location", "description": "# Purpose\nProvides the died animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -439,7 +482,7 @@ "summary": "Get the arrivals for a certain location", "description": "# Purpose\nProvides the arrived animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -482,7 +525,7 @@ "summary": "Get the departures for a certain location", "description": "# Purpose\nProvides the departed animals from a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -520,7 +563,7 @@ "summary": "Get the animals for a certain location", "description": "# Purpose\nProvides the animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -552,7 +595,7 @@ "summary": "Get the animal sets for a certain location", "description": "# Purpose\nProvides the animal sets on a location. If animal-scheme and animal-id are provided, the sets containing that animal are returned.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -592,7 +635,7 @@ "summary": "Get the animal set join events for a certain location", "description": "# Purpose\nProvides the animal set join events on a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -636,7 +679,7 @@ "summary": "Get the animal set leave events for a certain location", "description": "# Purpose\nProvides the animal set leave events on a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -674,13 +717,45 @@ } } }, + "/service-sires": { + "get": { + "operationId": "get-service-sires", + "summary": "Get the service sires matching your query parameters - for now we only implement the query by some identifier, like lifetime number, ai-code, ... ", + "description": "# Purpose\nProvides the service sires.\nOnly animal fields relevant to service sires will be populated (location is not expected, for example).", + "tags": [ + "ADE-1.4-registration" + ], + "parameters": [{ + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the service sires matching your query parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalCoreCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/locations/{location-scheme}/{location-id}/statistics": { "get": { "operationId": "get-statistics", "summary": "Get the statistics for a certain location", "description": "# Purpose\nProvides the statistics for a location\n One can specify the period for which the statistics can be calculated by specifying a date to and date from parameter. Also the purpose can be provided to limit the purpose of the statistics", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -722,7 +797,7 @@ "summary": "Get the pregnancy checks for a certain location", "description": "# Purpose\nProvides the pregnancy checks on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -765,7 +840,7 @@ "summary": "Get the heats for a certain location", "description": "# Purpose\nProvides the Heats on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -803,7 +878,7 @@ "summary": "Get the inseminations for a certain location", "description": "# Purpose\nProvides the Inseminations on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -846,7 +921,7 @@ "summary": "Get the drying off for a certain location", "description": "# Purpose\nProvides the drying off on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -892,7 +967,7 @@ "summary": "Get the abortion events for a certain location", "description": "# Purpose\nProvides the abortion events on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -930,7 +1005,7 @@ "summary": "Get the animals that were assigned as do-not-breed for a certain location", "description": "# Purpose\nProvides the not be bred animals on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -968,7 +1043,7 @@ "summary": "Get the parturition events for a certain location", "description": "# Purpose\nProvides the Parturition events on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1000,13 +1075,51 @@ } } }, + "/locations/{location-scheme}/{location-id}/embryo-flushings": { + "get": { + "operationId": "get-embyro-flushings", + "summary": "Get the embryo flushing events for a certain location", + "description": "# Purpose\nProvides the embryo flushing events on a location\n", + "tags": [ + "ADE-1.4-reproduction" + ], + "parameters": [{ + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the flushing events for the given location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/locations/{location-scheme}/{location-id}/weights": { "get": { "operationId": "get-weights", "summary": "Get the weight data of animals", "description": "# Purpose\nProvides weight data from animals on a farm.", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1044,7 +1157,7 @@ "summary": "Get the device data for a location", "description": "# Purpose\nProvides device data for devices present on a farm.", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1082,7 +1195,7 @@ "summary": "Get the feed storage device data for a location", "description": "# Purpose\nProvides feed storage device data for storages present on a farm.", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1125,7 +1238,7 @@ "summary": "Get the breeding values of the animals of a location", "description": "# Purpose\nProvides breeding values of the animals present on a farm.", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1163,7 +1276,7 @@ "summary": "Get the mating recommendations for a certain location", "description": "# Purpose\nProvides the mating recommendations on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1201,7 +1314,7 @@ "summary": "Get the conformation scores for a certain location", "description": "# Purpose\nProvides the conformation scores on a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1239,7 +1352,7 @@ "summary": "Get the type classification events for a certain location", "description": "# Purpose\nProvides the animal type classification events for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -1278,7 +1391,7 @@ "summary": "Get the diagnoses for a certain location", "description": "# Purpose\nProvides the animal health diagnoses for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1316,7 +1429,7 @@ "summary": "Get the treatments for a certain location", "description": "# Purpose\nProvides the animal health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1354,7 +1467,7 @@ "summary": "Get the treatment programs for a certain location", "description": "# Purpose\nProvides the animal health treatment programs for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1392,7 +1505,7 @@ "summary": "Get the health-status-observed of an animal for a certain location", "description": "# Purpose\nProvides the animal health-status for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -1431,7 +1544,7 @@ "summary": "Get the gestations for a certain location", "description": "# Purpose\nProvides the gestations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1469,7 +1582,7 @@ "summary": "Get the feeds available on a certain location", "description": "# Purpose\nProvides the feeds for a location. We recommend using the fao.org scheme for the type of feeds and the icar.org scheme for the feed properties\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1507,7 +1620,7 @@ "summary": "Get the rations for a certain location", "description": "# Purpose\nProvides the rations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1545,7 +1658,7 @@ "summary": "Get the feed intakes for a certain location", "description": "# Purpose\nProvides the feed intakes for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1577,13 +1690,52 @@ } } }, + "/locations/{location-scheme}/{location-id}/group-feeding": { + "get": { + "operationId": "get-group-feeding", + "summary": "Get the group feeding events for a certain location", + "description": "# Purpose\nProvides the group feeding events for a location.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [{ + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the feed intakes for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/feed-recommendations": { "get": { "operationId": "get-Feed-Recommendations", "summary": "Get the feed recommendations for a certain location", "description": "# Purpose\nProvides the feed recommendations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1621,7 +1773,7 @@ "summary": "Get the feed reports for animals on a certain location for a certain period. One can use the report-start- and report-end-date-time paramters to get a daily feed report. ", "description": "# Purpose\nProvides the feed reports for animal on a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1665,7 +1817,7 @@ "summary": "Get the list of observed changes to animal reproductive status", "description": "# Purpose\nProvides a collection of events where a change to animal reproductive status has been observed.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1703,7 +1855,7 @@ "summary": "Get the list of schemata/schema types supported", "description": "# Purpose\nProvides a list of schemata/schema types supported.\n", "tags": [ - "ADE-1.3-scheme" + "ADE-1.4-scheme" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1740,7 +1892,7 @@ "summary": "Get the list of schema type schemes", "description": "# Purpose\nProvides a list of schemata/schema types supported.\n", "tags": [ - "ADE-1.3-scheme" + "ADE-1.4-scheme" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1783,7 +1935,7 @@ "summary": "Get the list of values for specidif sheme", "description": "# Purpose\nProvides a list of scheme values for specific scheme\n", "tags": [ - "ADE-1.3-scheme" + "ADE-1.4-scheme" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1826,7 +1978,7 @@ "summary": "Get the group treatments for a certain location", "description": "# Purpose\nProvides the group health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -1865,7 +2017,7 @@ "summary": "Get the weights for a certain location", "description": "# Purpose\nProvides the group weights for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -1904,7 +2056,7 @@ "summary": "Get the group arrival events for a certain location", "description": "# Purpose\nProvides the group arrival records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1943,7 +2095,7 @@ "summary": "Get the group birth or registration events for a certain location", "description": "# Purpose\nProvides the group birth records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1982,7 +2134,7 @@ "summary": "Get the group death events for a certain location", "description": "# Purpose\nProvides the group death records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -2021,7 +2173,7 @@ "summary": "Get the group departure events for a certain location", "description": "# Purpose\nProvides the group departure records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -2053,6 +2205,432 @@ } } } + }, + "/locations/{location-scheme}/{location-id}/carcass-processing-lots": { + "get": { + "operationId": "get-carcass-processing-lots", + "summary": "Get the processing lots that relate to a certain location", + "description": "# Purpose\nProvides the carcass processing lots relating to a location\n", + "tags": [ + "ADE-1.4-carcass" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the group departure events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarProcessingLotCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/carcass-carcasses": { + "get": { + "operationId": "get-carcass-carcasses", + "summary": "Get the carcasses that relate to a certain location", + "description": "# Purpose\nProvides the carcasses relating to a location\n", + "tags": [ + "ADE-1.4-carcass" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the group departure events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarCarcassCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/carcass-observations": { + "get": { + "operationId": "get-carcass-observations", + "summary": "Get the carcass observation events that relate to a certain location", + "description": "# Purpose\nProvides the carcass observation events relating to a location\n", + "tags": [ + "ADE-1.4-carcass" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the group departure events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarCarcassObservationsEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/inventory-transactions": { + "get": { + "operationId": "get-inventory-transactions", + "summary": "Get the inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/family" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarInventoryTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/feed-inventory-transactions": { + "get": { + "operationId": "get-feed-inventory-transactions", + "summary": "Get the feed inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the feed inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the feed inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarFeedTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/medicine-inventory-transactions": { + "get": { + "operationId": "get-medicine-inventory-transactions", + "summary": "Get the medicine inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the medicine inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the medicine inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMedicineTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/attention-events": { + "get": { + "operationId": "get-attention-events", + "summary": "Get attention events.", + "description": "# Purpose\nProvides the attention events for a location. These are individual animal events, typically generated by devices such as wearables and sensors.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the attention event resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/position-observations": { + "get": { + "operationId": "get-animal-position-observations", + "summary": "Get position observation events for animals that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for animals at the specified location.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/group-position-observations": { + "get": { + "operationId": "get-group-position-observations", + "summary": "Get position observation events for groups that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for groups at the specified location.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } } }, "components": { @@ -2066,6 +2644,9 @@ "icarWithdrawalEventCollection": { "$ref": "../collections/icarWithdrawalEventCollection.json" }, + "icarMilkPredictionsCollection": { + "$ref": "../collections/icarMilkPredictionsCollection.json" + }, "icarReproMatingRecommendationCollection": { "$ref": "../collections/icarReproMatingRecommendationCollection.json" }, @@ -2171,6 +2752,9 @@ "icarFeedIntakeEventCollection": { "$ref": "../collections/icarFeedIntakeEventCollection.json" }, + "icarGroupFeedingEventCollection": { + "$ref": "../collections/icarGroupFeedingEventCollection.json" + }, "icarFeedReportCollection": { "$ref": "../collections/icarFeedReportCollection.json" }, @@ -2206,6 +2790,36 @@ }, "icarGroupWeightEventCollection": { "$ref": "../collections/icarGroupWeightEventCollection.json" + }, + "icarReproEmbryoFlushingEventCollection" : { + "$ref": "../collections/icarReproEmbryoFlushingEventCollection.json" + }, + "icarProcessingLotCollection" : { + "$ref": "../collections/icarProcessingLotCollection.json" + }, + "icarCarcassCollection" : { + "$ref": "../collections/icarCarcassCollection.json" + }, + "icarCarcassObservationsEventCollection" : { + "$ref": "../collections/icarCarcassObservationsEventCollection.json" + }, + "icarInventoryTransactionCollection": { + "$ref": "../collections/icarInventoryTransactionCollection.json" + }, + "icarFeedTransactionCollection": { + "$ref": "../collections/icarFeedTransactionCollection.json" + }, + "icarMedicineTransactionCollection": { + "$ref": "../collections/icarMedicineTransactionCollection.json" + }, + "icarAttentionEventCollection": { + "$ref": "../collections/icarAttentionEventCollection.json" + }, + "icarPositionObservationEventCollection": { + "$ref": "../collections/icarPositionObservationEventCollection.json" + }, + "icarGroupPositionObservationEventCollection": { + "$ref": "../collections/icarGroupPositionObservationEventCollection.json" } }, "parameters": { @@ -2277,7 +2891,16 @@ "$ref": "../enums/icarStatisticsPurposeType.json" } }, - "report-start-date-time": { + "family": { + "name": "family", + "in": "query", + "description": "The family of products.", + "required": false, + "schema": { + "$ref": "../enums/icarProductFamilyType.json" + } + }, + "report-start-date-time": { "name": "report-start-date-time", "in": "query", "description": "The start of the date-time range for the data to get in the request based on the event date time.", @@ -2330,6 +2953,24 @@ "schema": { "type": "string" } + }, + "identifier-scheme": { + "name": "identifier-scheme", + "in": "query", + "description": "The scheme for an identifier.", + "required": false, + "schema": { + "type": "string" + } + }, + "identifier-id": { + "name": "identifier-id", + "in": "query", + "description": "The unique identifier within a scheme.", + "required": false, + "schema": { + "type": "string" + } } }, "responses": { diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index adf5fae..2d7d7d4 100644 --- a/url-schemes/feedURLscheme.json +++ b/url-schemes/feedURLscheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Feed-related events and messages API Specifications", "description": "Specifications for messages that support livestock feeding and feed management.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-feed", + "name": "ADE-1.4-feed", "description": "Feeding messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the feeds for a certain location", "description": "# Purpose\nProvides the animal feeds for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new feed.", "description": "# Purpose\nAllows a client to add a single feed.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the rations for a certain location", "description": "# Purpose\nProvides the animal rations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new ration.", "description": "# Purpose\nAllows a client to add a single ration.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the feed intake events for a certain location", "description": "# Purpose\nProvides the animal feed intake events for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new feed intake event.", "description": "# Purpose\nAllows a client to add a single feed intake event.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the feed recommendations for a certain location", "description": "# Purpose\nProvides the animal feed recommendations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -380,7 +380,7 @@ "summary": "Add a single new feed recommendation.", "description": "# Purpose\nAllows a client to add a single feed recommendation.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -448,7 +448,7 @@ "summary": "Get the feed reports for animals on a certain location for a certain period. One can use the report-start- and report-end-date-time paramters to get a daily feed report. If you need feed-reports for AnimalSets please refer to the WIKI pages : https://github.com/adewg/ICAR/wiki/Feed-Reporting", "description": "# Purpose\nProvides the feed reports for animal on a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -493,7 +493,7 @@ "summary": "Get the feed storage devices for a certain location", "description": "# Purpose\nProvides the animal feed storage devices for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -535,7 +535,7 @@ "summary": "Add a single new feed storage.", "description": "# Purpose\nAllows a client to add a single feed-storage.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -597,13 +597,235 @@ } } }, + "/locations/{location-scheme}/{location-id}/feed-inventory-transactions": { + "get": { + "operationId": "get-feed-inventory-transactions", + "summary": "Get the feed inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the feed inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the feed inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarFeedTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-feed-inventory-transaction", + "summary": "Add a single new feed inventory transaction.", + "description": "# Purpose\nAllows a client to add a single feed inventory transaction.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The feed inventory transaction to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarFeedTransactionResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarFeedTransactionResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/group-feeding": { + "get": { + "operationId": "get-group-feeding", + "summary": "Get the group feeding events for a certain location", + "description": "# Purpose\nProvides the group feeding events for a location\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-group-feeding", + "summary": "Add a single new group feeding event.", + "description": "# Purpose\nAllows a client to add a single group feeding event.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The group feeding event to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/feeds": { "post": { "operationId": "post-batch-feeds", "summary": "Add an array of feeds.", "description": "# Purpose \nAllows a client to add a collection of feeds.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -678,7 +900,7 @@ "summary": "Add an array of rations.", "description": "# Purpose \nAllows a client to add a collection of rations.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -753,7 +975,7 @@ "summary": "Add an array of feed intake events.", "description": "# Purpose \nAllows a client to add a collection of feed intake events.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -828,7 +1050,7 @@ "summary": "Add an array of feed recommendations.", "description": "# Purpose \nAllows a client to add a collection of feed recommendations.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -903,7 +1125,7 @@ "summary": "Add an array of feed storages.", "description": "# Purpose \nAllows a client to add a collection of feed storages.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -971,6 +1193,156 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/feed-inventory-transactions": { + "post": { + "operationId": "post-batch-feed-inventory-transactions", + "summary": "Add an array of feed inventory transactions.", + "description": "# Purpose \nAllows a client to add a collection of feed inventory transactions.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of feed inventory transactions to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarFeedTransactionArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/group-feedings": { + "post": { + "operationId": "post-batch-group-feedings", + "summary": "Add an array of group feeding events.", + "description": "# Purpose \nAllows a client to add a collection of group feeding events.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of group feeding events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } } }, "components": { @@ -1043,7 +1415,31 @@ }, "icarFeedReportCollection": { "$ref": "../collections/icarFeedReportCollection.json" - } + }, + "icarFeedTransactionResource": { + "$ref": "../resources/icarFeedTransactionResource.json" + }, + "icarFeedTransactionCollection": { + "$ref": "../collections/icarFeedTransactionCollection.json" + }, + "icarFeedTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarFeedTransactionResource" + } + }, + "icarGroupFeedingEventResource": { + "$ref": "../resources/icarGroupFeedingEventResource.json" + }, + "icarGroupFeedingEventCollection": { + "$ref": "../collections/icarGroupFeedingEventCollection.json" + }, + "icarGroupFeedingEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } }, "parameters": { "location-scheme": { @@ -1099,7 +1495,44 @@ "type": "string", "format": "date-time" } - } + }, + "date-from": { + "name": "date-to", + "in": "query", + "description": "The end of the date range for the period for which data is needed, the date inclusive.", + "schema": { + "type": "string", + "format": "date" + } + }, + "date-to": { + "name": "date-from", + "in": "query", + "description": "The start of the date range for the period for which data is needed, the date inclusive.", + "schema": { + "type": "string", + "format": "date" + } + }, + "identifier-scheme": { + "name": "identifier-scheme", + "in": "query", + "description": "The scheme for an identifier.", + "required": false, + "schema": { + "type": "string" + } + }, + "identifier-id": { + "name": "identifier-id", + "in": "query", + "description": "The unique identifier within a scheme.", + "required": false, + "schema": { + "type": "string" + } + } + }, "responses": { "default": { diff --git a/url-schemes/healthURLScheme.json b/url-schemes/healthURLScheme.json index ba7c4a8..e9ac3fa 100644 --- a/url-schemes/healthURLScheme.json +++ b/url-schemes/healthURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Health Diagnosis and Treatment API Specifications", "description": "Specifications for messages that support livestock health and disease diagnosis and treatments.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-health", + "name": "ADE-1.4-health", "description": "Health messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the diagnoses for a certain location", "description": "# Purpose\nProvides the animal health diagnoses for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new diagnosis event", "description": "# Purpose \nAllows a client to add a single animal health diagnosis event.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the treatments for a certain location", "description": "# Purpose\nProvides the animal health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new health treatment event", "description": "# Purpose \nAllows a client to add a single animal health treatment event.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -220,7 +220,7 @@ "summary": "Get the group treatments for a certain location", "description": "# Purpose\nProvides the group health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -257,7 +257,7 @@ "summary": "Add one group health treatment event", "description": "# Purpose \nAllows a client to add one group health treatment event.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -307,7 +307,7 @@ "summary": "Get the treatment programs for a certain location", "description": "# Purpose\nProvides the animal health treatment programs for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -344,7 +344,7 @@ "summary": "Add a single new health treatment programme.", "description": "# Purpose \nAllows a client to add a single animal health treatment programme.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -394,7 +394,7 @@ "summary": "Get the health-status-observed of an animal for a certain location", "description": "# Purpose\nProvides the animal health-status for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -431,7 +431,7 @@ "summary": "Add a single new health status observed.", "description": "# Purpose \nAllows a client to add a single animal health status observed.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -475,13 +475,211 @@ } } }, + "/locations/{location-scheme}/{location-id}/medicine-transaction": { + "get": { + "operationId": "get-medicine-inventory-transaction", + "summary": "Get medicine inventory transactions.", + "description": "# Purpose\nProvides the medicine inventory transactions for a location\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the medicine inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMedicineTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-medicine-inventory-transaction", + "summary": "Add a single new medicine inventory transaction.", + "description": "# Purpose \nAllows a client to add a single medicine inventory transaction.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The medicine transaction resource to create. \nA client MAY fill in the *ID* field with a client-generated UUID and the server MAY use this *ID*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\nThis applies to all resource *ID* and *meta* objects in the *icarTreatmentProgramEvent*.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMedicineTransactionResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the resource, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMedicineTransactionResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource." + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status." + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/attention-events": { + "get": { + "operationId": "get-attention-events", + "summary": "Get attention events.", + "description": "# Purpose\nProvides the attention events for a location. These are individual animal events, typically generated by devices such as wearables and sensors.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the attention event resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-attention-event", + "summary": "Add a single new attention event.", + "description": "# Purpose \nAllows a client to add a single attention event (typically generated by a device, wearable, or sensor).\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The attention event resource to create. \nA client MAY fill in the *ID* field with a client-generated UUID and the server MAY use this *ID*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\nThis applies to all resource *ID* and *meta* objects in the *icarTreatmentProgramEvent*.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the resource, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource." + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status." + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/diagnoses": { "post": { "operationId": "post-batch-Diagnosis", "summary": "Add a single new diagnosis event", "description": "# Purpose \nAllows a client to add a collection of animal health diagnosis events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -556,7 +754,7 @@ "summary": "Add a collection of health treatment events", "description": "# Purpose \nAllows a client to add a collection of animal health treatment events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -631,7 +829,7 @@ "summary": "Add a collection of group health treatment events", "description": "# Purpose \nAllows a client to add a collection of group health treatment events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -706,7 +904,7 @@ "summary": "Add a collection of animal health treatment program events.", "description": "# Purpose \nAllows a client to add a collection of animal health treatment program events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -781,7 +979,7 @@ "summary": "Add new health status observed events", "description": "# Purpose \nAllows a client to add a collection of animal health status observed events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -849,6 +1047,156 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/medicine-inventory-transactions": { + "post": { + "operationId": "post-batch-medicine-inventory-transactions", + "summary": "Add an array of medicine inventory transactions.", + "description": "# Purpose \nAllows a client to add a collection of medicine inventory transactions.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of medicine inventory transactions to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMedicineTransactionArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/attention-events": { + "post": { + "operationId": "post-batch-attention-events", + "summary": "Add an array of attention events.", + "description": "# Purpose \nAllows a client to add a collection of attention events for animals. These are typically generated by devices such as wearables and sensors.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of attention events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } } }, "components": { @@ -918,6 +1266,30 @@ "items": { "$ref": "../resources/icarHealthStatusObservedEventResource.json" } + }, + "icarMedicineTransactionResource": { + "$ref": "../resources/icarMedicineTransactionResource.json" + }, + "icarMedicineTransactionCollection": { + "$ref": "../collections/icarMedicineTransactionCollection.json" + }, + "icarMedicineTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarMedicineTransactionResource" + } + }, + "icarAttentionEventResource": { + "$ref": "../resources/icarAttentionEventResource.json" + }, + "icarAttentionEventCollection": { + "$ref": "../collections/icarAttentionEventCollection.json" + }, + "icarAttentionEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } } }, "parameters": { @@ -956,6 +1328,42 @@ "type": "string", "format": "date-time" } + }, + "date-from": { + "name": "date-to", + "in": "query", + "description": "The end of the date range for the period for which data is needed, the date inclusive.", + "schema": { + "type": "string", + "format": "date" + } + }, + "date-to": { + "name": "date-from", + "in": "query", + "description": "The start of the date range for the period for which data is needed, the date inclusive.", + "schema": { + "type": "string", + "format": "date" + } + }, + "identifier-scheme": { + "name": "identifier-scheme", + "in": "query", + "description": "The scheme for an identifier.", + "required": false, + "schema": { + "type": "string" + } + }, + "identifier-id": { + "name": "identifier-id", + "in": "query", + "description": "The unique identifier within a scheme.", + "required": false, + "schema": { + "type": "string" + } } }, "responses": { diff --git a/url-schemes/managementURLScheme.json b/url-schemes/managementURLScheme.json index dd6fc99..e5cd894 100644 --- a/url-schemes/managementURLScheme.json +++ b/url-schemes/managementURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Management events and messages API Specifications", "description": "Specifications for messages that support livestock management activities.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-management", + "name": "ADE-1.4-management", "description": "Management messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the animal sets for a certain location", "description": "# Purpose\nProvides the animal animal sets for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new animal set.", "description": "# Purpose\nAllows a client to add a single animal set.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the animal set joins events for a certain location", "description": "# Purpose\nProvides the animal animal set join events for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new animal set join event.", "description": "# Purpose\nAllows a client to add a single animal-set-join.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the animal set leave events for a certain location", "description": "# Purpose\nProvides the animal animal set leave events for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new animal set leave event.", "description": "# Purpose\nAllows a client to add a single animal set leave event.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the devices for a certain location", "description": "# Purpose\nProvides the animal devices for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -380,7 +380,7 @@ "summary": "Add a single new device.", "description": "# Purpose\nAllows a client to add a single device.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -448,7 +448,7 @@ "summary": "Get the statistics for a certain location", "description": "# Purpose\nProvides the statistics for a location\n One can specify the period for which the statistics can be calculated by specifying a date to and date from parameter. Also the purpose can be provided to limit the purpose of the statistics", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -484,13 +484,629 @@ } } }, + "/locations/{location-scheme}/{location-id}/inventory-transactions": { + "get": { + "operationId": "get-inventory-transactions", + "summary": "Get the inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/family" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarInventoryTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/feed-inventory-transactions": { + "get": { + "operationId": "get-feed-inventory-transactions", + "summary": "Get the feed inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the feed inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the feed inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarFeedTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/medicine-inventory-transactions": { + "get": { + "operationId": "get-medicine-inventory-transactions", + "summary": "Get the medicine inventory transactions that relate to a certain location", + "description": "# Purpose\nProvides the medicine inventory transactions relating to a location\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the medicine inventory transactions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMedicineTransactionCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/position-observations": { + "get": { + "operationId": "get-animal-position-observations", + "summary": "Get position observation events for animals that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for animals at the specified location.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-animal-position-observation", + "summary": "Add a single new animal position observation event.", + "description": "# Purpose\nAllows a client to add a single animal position observation event.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The device to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarDeviceResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/group-position-observations": { + "get": { + "operationId": "get-group-position-observations", + "summary": "Get position observation events for groups that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for groups at the specified location.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-group-position-observation", + "summary": "Add a single new group position observation event.", + "description": "# Purpose\nAllows a client to add a single group position observation event.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The device to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarDeviceResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + + }, "/batches/locations/{location-scheme}/{location-id}/animal-sets": { "post": { - "operationId": "post-batch-animal-sets", - "summary": "Add an array of animal-sets.", - "description": "# Purpose \nAllows a client to add a collection of animal-sets.\n", + "operationId": "post-batch-animal-sets", + "summary": "Add an array of animal-sets.", + "description": "# Purpose \nAllows a client to add a collection of animal-sets.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal-sets to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSetArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/animal-set-joins": { + "post": { + "operationId": "post-batch-animal-set-joins", + "summary": "Add an array of animal-set join events.", + "description": "# Purpose \nAllows a client to add a collection of animal-set join events.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal set join events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSetJoinEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/animal-set-leaves": { + "post": { + "operationId": "post-batch-animal-set-leaves", + "summary": "Add an array of animal set leave events.", + "description": "# Purpose \nAllows a client to add a collection of animal set leave events.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal set leave events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSetLeaveEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/devices": { + "post": { + "operationId": "post-batch-devices", + "summary": "Add an array of devices.", + "description": "# Purpose \nAllows a client to add a collection of devices.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -502,11 +1118,11 @@ ], "requestBody": { "required": true, - "description": "The collection of animal-sets to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "description": "The collection of devices to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarAnimalSetArray" + "$ref": "#/components/schemas/icarDeviceArray" } } } @@ -559,13 +1175,13 @@ } } }, - "/batches/locations/{location-scheme}/{location-id}/animal-set-joins": { + "/batches/locations/{location-scheme}/{location-id}/inventory-transactions": { "post": { - "operationId": "post-batch-animal-set-joins", - "summary": "Add an array of animal-set join events.", - "description": "# Purpose \nAllows a client to add a collection of animal-set join events.\n", + "operationId": "post-batch-inventory-transactions", + "summary": "Add an array of inventory transactions.", + "description": "# Purpose \nAllows a client to add a collection of inventory transactions.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -577,11 +1193,11 @@ ], "requestBody": { "required": true, - "description": "The collection of animal set join events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "description": "The collection of inventory transactions to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarAnimalSetJoinEventArray" + "$ref": "#/components/schemas/icarInventoryTransactionArray" } } } @@ -634,13 +1250,13 @@ } } }, - "/batches/locations/{location-scheme}/{location-id}/animal-set-leaves": { + "/batches/locations/{location-scheme}/{location-id}/feed-transactions": { "post": { - "operationId": "post-batch-animal-set-leaves", - "summary": "Add an array of animal set leave events.", - "description": "# Purpose \nAllows a client to add a collection of animal set leave events.\n", + "operationId": "post-batch-feed-transactions", + "summary": "Add an array of feed inventory transactions.", + "description": "# Purpose \nAllows a client to add a collection of feed inventory transactions.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -652,11 +1268,11 @@ ], "requestBody": { "required": true, - "description": "The collection of animal set leave events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "description": "The collection of feed inventory transactions to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarAnimalSetLeaveEventArray" + "$ref": "#/components/schemas/icarFeedTransactionArray" } } } @@ -709,13 +1325,13 @@ } } }, - "/batches/locations/{location-scheme}/{location-id}/devices": { + "/batches/locations/{location-scheme}/{location-id}/medicine-transactions": { "post": { - "operationId": "post-batch-devices", - "summary": "Add an array of devices.", - "description": "# Purpose \nAllows a client to add a collection of devices.\n", + "operationId": "post-batch-medicine-transactions", + "summary": "Add an array of medicine inventory transactions.", + "description": "# Purpose \nAllows a client to add a collection of medicine inventory transactions.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -727,11 +1343,161 @@ ], "requestBody": { "required": true, - "description": "The collection of devices to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "description": "The collection of medicine inventory transactions to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarDeviceArray" + "$ref": "#/components/schemas/icarMedicineTransactionArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/position-observations": { + "post": { + "operationId": "post-batch-animal-position-observations", + "summary": "Add an array of animal position observation events.", + "description": "# Purpose \nAllows a client to add a collection of position observation events for individual animals.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal position observation events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/group-position-observations": { + "post": { + "operationId": "post-batch-group-position-observations", + "summary": "Add an array of group position observation events.", + "description": "# Purpose \nAllows a client to add a collection of position observation events for groups.\n", + "tags": [ + "ADE-1.4-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal position observation events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventArray" } } } @@ -843,6 +1609,66 @@ "items": { "$ref": "#/components/schemas/icarDeviceResource" } + }, + "icarInventoryTransactionResource": { + "$ref": "../resources/icarInventoryTransactionResource.json" + }, + "icarInventoryTransactionCollection": { + "$ref": "../collections/icarInventoryTransactionCollection.json" + }, + "icarInventoryTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarInventoryTransactionResource" + } + }, + "icarFeedTransactionResource": { + "$ref": "../resources/icarFeedTransactionResource.json" + }, + "icarFeedTransactionCollection": { + "$ref": "../collections/icarFeedTransactionCollection.json" + }, + "icarFeedTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarFeedTransactionResource" + } + }, + "icarMedicineTransactionResource": { + "$ref": "../resources/icarMedicineTransactionResource.json" + }, + "icarMedicineTransactionCollection": { + "$ref": "../collections/icarMedicineTransactionCollection.json" + }, + "icarMedicineTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarMedicineTransactionResource" + } + }, + "icarGroupPositionObservationEventResource": { + "$ref": "../resources/icarGroupPositionObservationEventResource.json" + }, + "icarGroupPositionObservationEventCollection": { + "$ref": "../collections/icarGroupPositionObservationEventCollection.json" + }, + "icarGroupPositionObservationEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventResource" + } + }, + "icarPositionObservationEventResource": { + "$ref": "../resources/icarPositionObservationEventResource.json" + }, + "icarPositionObservationEventCollection": { + "$ref": "../collections/icarPositionObservationEventCollection.json" + }, + "icarPositionObservationEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarPositionObservationEventResource" + } } }, "parameters": { @@ -908,6 +1734,33 @@ "schema": { "$ref": "../enums/icarStatisticsPurposeType.json" } + }, + "family": { + "name": "family", + "in": "query", + "description": "The family of products.", + "required": false, + "schema": { + "$ref": "../enums/icarProductFamilyType.json" + } + }, + "identifier-scheme": { + "name": "identifier-scheme", + "in": "query", + "description": "The scheme for an identifier.", + "required": false, + "schema": { + "type": "string" + } + }, + "identifier-id": { + "name": "identifier-id", + "in": "query", + "description": "The unique identifier within a scheme.", + "required": false, + "schema": { + "type": "string" + } } }, "responses": { diff --git a/url-schemes/milkURLScheme.json b/url-schemes/milkURLScheme.json index 2b5dcc8..4513310 100644 --- a/url-schemes/milkURLScheme.json +++ b/url-schemes/milkURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Milk recording and lactation information API Specifications", "description": "Specifications for messages that support dairy milking visits, lactation, and related information.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-milk", + "name": "ADE-1.4-milk", "description": "Milking-related messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the milking-visits for a certain location", "description": "# Purpose\nProvides the animal milking-visits for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new milking-visits.", "description": "# Purpose\nAllows a client to add a single milking-visits.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the test-day for a certain location", "description": "# Purpose\nProvides the animal test-day for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new test-day.", "description": "# Purpose\nAllows a client to add a single test-day.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the test-day-result for a certain location", "description": "# Purpose\nProvides the animal test-day-result for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new test-day-result.", "description": "# Purpose\nAllows a client to add a single test-day-result.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the daily milking averages for a certain location", "description": "# Purpose\nProvides the animal daily milking averages for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -376,13 +376,52 @@ } } }, + "/locations/{location-scheme}/{location-id}/milk-predictions": { + "get": { + "operationId": "get-milk-predictions", + "summary": "Get the milk predictions for a certain location", + "description": "# Purpose\nProvides the milk predictions for a location\n", + "tags": [ + "ADE-1.4-milk" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the milk predictions for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarMilkPredictionsCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/locations/{location-scheme}/{location-id}/lactations": { "get": { "operationId": "get-lactations", "summary": "Get the lactations for a certain location", "description": "# Purpose\nProvides the animal lactation for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -415,7 +454,7 @@ "summary": "Get the lactation status observations for a certain location", "description": "# Purpose\nProvides the animal lactation status observations for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -452,7 +491,7 @@ "summary": "Add a single new lactation status observation event.", "description": "# Purpose\nAllows a client to add a single lactation status observation event.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -520,7 +559,7 @@ "summary": "Get the milking-withdrawals for a certain location", "description": "# Purpose\nProvides the milking-withdrawals for a certain location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -559,7 +598,7 @@ "summary": "Add a single new milking-visits event", "description": "# Purpose \nAllows a client to add a collection of milking visits.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -634,7 +673,7 @@ "summary": "Add batch of test-days.", "description": "# Purpose \nAllows a client to add a collection of test-days.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -709,7 +748,7 @@ "summary": "Add an array of test-day-results.", "description": "# Purpose \nAllows a client to add a collection of test-day-result.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -784,7 +823,7 @@ "summary": "Add an array of lactation status observations.", "description": "# Purpose \nAllows a client to add a collection of lactation status observations.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -900,6 +939,9 @@ }, "icarDailyMilkingAveragesCollection": { "$ref": "../collections/icarDailyMilkingAveragesCollection.json" + }, + "icarMilkPredictionsCollection": { + "$ref": "../collections/icarMilkPredictionsCollection.json" }, "icarLactationCollection": { "$ref": "../collections/icarLactationCollection.json" diff --git a/url-schemes/performanceURLScheme.json b/url-schemes/performanceURLScheme.json index 4ce0ccc..5a3873c 100644 --- a/url-schemes/performanceURLScheme.json +++ b/url-schemes/performanceURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Performance observation events and messages API Specifications", "description": "Specifications for messages that support livestock performance assessment other than milk production.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-performance", + "name": "ADE-1.4-performance", "description": "Performance messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the weights for a certain location", "description": "# Purpose\nProvides the animal weights for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new weight.", "description": "# Purpose\nAllows a client to add a single weight.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the weights for a certain location", "description": "# Purpose\nProvides the group weights for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single group weight.", "description": "# Purpose\nAllows a client to add a single group weight.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the breeding values for a certain location", "description": "# Purpose\nProvides the animal breeding values for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -277,7 +277,7 @@ "summary": "Get the conformation score events for a certain location", "description": "# Purpose\nProvides the animal conformation score events for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -314,7 +314,7 @@ "summary": "Add a single new conformation score.", "description": "# Purpose\nAllows a client to add a single conformation score.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -382,7 +382,7 @@ "summary": "Get the type classification events for a certain location", "description": "# Purpose\nProvides the animal type classification events for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -419,7 +419,7 @@ "summary": "Add a single new type classificatione.", "description": "# Purpose\nAllows a client to add a single type classification.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -487,7 +487,7 @@ "summary": "Add an array of weights.", "description": "# Purpose \nAllows a client to add a collection of weights.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -562,7 +562,7 @@ "summary": "Add an array of weights.", "description": "# Purpose \nAllows a client to add a collection of group weights.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -637,7 +637,7 @@ "summary": "Add an array of conformation-scores.", "description": "# Purpose \nAllows a client to add a collection of conformation scores.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { diff --git a/url-schemes/registrationURLScheme.json b/url-schemes/registrationURLScheme.json index 0caa7fc..ae3d573 100644 --- a/url-schemes/registrationURLScheme.json +++ b/url-schemes/registrationURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Animal Registration and Movement API Specifications", "description": "Specifications for messages that support livestock movement information and registration (sometimes called I&R).", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-registration", + "name": "ADE-1.4-registration", "description": "Registration and movement messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get available schema/id combinations for locations.", "description": "# Purpose\nProvide a list of available locations.\nShould return only those combinations the user currently logged in has access to.", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "responses": { "200": { @@ -58,7 +58,7 @@ "summary": "Get the animals for a certain location", "description": "# Purpose\nProvides the animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -89,7 +89,7 @@ "summary": "Add a single animal resource.", "description": "# Purpose \nAllows a client to add a single animal resource. Many servers do not support adding animals, requiring a registration event instead.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -157,7 +157,7 @@ "summary": "Get the births for a certain location", "description": "# Purpose\nProvides the animal birth records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -194,7 +194,7 @@ "summary": "Add a single new birth or initial registration event", "description": "# Purpose \nAllows a client to add a single animal birth or initial registration event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -262,7 +262,7 @@ "summary": "Get the group birth or registration events for a certain location", "description": "# Purpose\nProvides the group birth records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -299,7 +299,7 @@ "summary": "Add one group birth or registration event", "description": "# Purpose \nAllows a client to add one group birth or registration event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -367,7 +367,7 @@ "summary": "Get the group death events for a certain location", "description": "# Purpose\nProvides the group death records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -404,7 +404,7 @@ "summary": "Add one group death event", "description": "# Purpose \nAllows a client to add a group death event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -472,7 +472,7 @@ "summary": "Get the deaths for a certain location", "description": "# Purpose\nProvides the animal death records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -509,7 +509,7 @@ "summary": "Add a single new death event", "description": "# Purpose \nAllows a client to add a single animal death event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -577,7 +577,7 @@ "summary": "Get the arrivals for a certain location", "description": "# Purpose\nProvides the animal arrival records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -614,7 +614,7 @@ "summary": "Add a single new arrival event", "description": "# Purpose \nAllows a client to add a single animal arrival event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -682,7 +682,7 @@ "summary": "Get the group arrival events for a certain location", "description": "# Purpose\nProvides the group arrival records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -719,7 +719,7 @@ "summary": "Add a group arrival event", "description": "# Purpose \nAllows a client to add a group arrival event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -787,7 +787,7 @@ "summary": "Get the departures for a certain location", "description": "# Purpose\nProvides the animal departure records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -824,7 +824,7 @@ "summary": "Add a single new departure event", "description": "# Purpose \nAllows a client to add a single animal departure event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -892,7 +892,7 @@ "summary": "Get the group departure events for a certain location", "description": "# Purpose\nProvides the group departure records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -929,7 +929,7 @@ "summary": "Add a group departure event", "description": "# Purpose \nAllows a client to add a group departure event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -997,7 +997,7 @@ "summary": "Add an array of animal resources", "description": "# Purpose \nAllows a client to add a collection of animal resources. Many servers do not support adding animals, requiring registration events instead.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1072,7 +1072,7 @@ "summary": "Add an array of birth or initial registration events", "description": "# Purpose \nAllows a client to add a collection of animal birth events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1147,7 +1147,7 @@ "summary": "Add an array of group birth or initial registration events", "description": "# Purpose \nAllows a client to add an array of group birth events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1222,7 +1222,7 @@ "summary": "Add an array of death events", "description": "# Purpose \nAllows a client to add a collection of animal death events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1297,7 +1297,7 @@ "summary": "Add an array of group death events", "description": "# Purpose \nAllows a client to add an array of group death events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1372,7 +1372,7 @@ "summary": "Add an array of arrival events", "description": "# Purpose \nAllows a client to add a collection of animal arrival events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1447,7 +1447,7 @@ "summary": "Add an array of group arrival events", "description": "# Purpose \nAllows a client to add an array of group arrival events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1522,7 +1522,7 @@ "summary": "Add an array of departure events", "description": "# Purpose \nAllows a client to add a collection of animal departure events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1597,7 +1597,7 @@ "summary": "Add an array of group departure events", "description": "# Purpose \nAllows a client to add an array of group departure events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { diff --git a/url-schemes/reproductionURLScheme.json b/url-schemes/reproductionURLScheme.json index a4eb26d..01517e7 100644 --- a/url-schemes/reproductionURLScheme.json +++ b/url-schemes/reproductionURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Reproduction API Specifications", "description": "Specifications for messages that support livestock reproduction recording.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-reproduction", + "name": "ADE-1.4-reproduction", "description": "Reproduction messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the pregnancy-checks for a certain location", "description": "# Purpose\nProvides the animal pregnancy-checks for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new pregnancy-check.", "description": "# Purpose\nAllows a client to add a single pregnancy-check.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the heats for a certain location", "description": "# Purpose\nProvides the animal heats for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new heat.", "description": "# Purpose\nAllows a client to add a single heat.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the inseminations for a certain location", "description": "# Purpose\nProvides the animal inseminations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new insemination.", "description": "# Purpose\nAllows a client to add a single insemination.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the drying-off events for a certain location", "description": "# Purpose\nProvides the animal drying off events for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -380,7 +380,7 @@ "summary": "Add a single new drying off event.", "description": "# Purpose\nAllows a client to add a single drying-off.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -448,7 +448,7 @@ "summary": "Get the abortions for a certain location", "description": "# Purpose\nProvides the animal abortions for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -485,7 +485,7 @@ "summary": "Add a single new abortion.", "description": "# Purpose\nAllows a client to add a single abortion.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -553,7 +553,7 @@ "summary": "Get the do-not-breed events for a certain location", "description": "# Purpose\nProvides the animal do-not-breed events for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -590,7 +590,7 @@ "summary": "Add a single new do-not-breed.", "description": "# Purpose\nAllows a client to add a single do-not-breed.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -658,7 +658,7 @@ "summary": "Get the parturitions for a certain location", "description": "# Purpose\nProvides the animal parturition (birth) events for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -695,7 +695,7 @@ "summary": "Add a single new parturition.", "description": "# Purpose\nAllows a client to add a single parturition.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -763,7 +763,7 @@ "summary": "Get the mating recommendations for a certain location", "description": "# Purpose\nProvides the animal mating recommendations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -800,7 +800,7 @@ "summary": "Add a single new mating recommendation.", "description": "# Purpose\nAllows a client to add a single mating recommendation.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -868,7 +868,7 @@ "summary": "Get the gestations for a certain location", "description": "# Purpose\nProvides the animal gestations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -905,7 +905,7 @@ "summary": "Add a single new gestation.", "description": "# Purpose\nAllows a client to add a single gestation.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -973,7 +973,7 @@ "summary": "Get the reproductive status observations for a certain location", "description": "# Purpose\nProvides the animal reproductive status observations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1010,7 +1010,7 @@ "summary": "Add a single new repro-status-observation.", "description": "# Purpose\nAllows a client to add a single reproductive status observation.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1072,13 +1072,118 @@ } } }, + "/locations/{location-scheme}/{location-id}/repro-embyro-flushings": { + "get": { + "operationId": "get-repro-embyro-flushings", + "summary": "Get the embryo flushings for a certain location", + "description": "# Purpose\nProvides the animal embryo flushings for a location\n", + "tags": [ + "ADE-1.4-reproduction" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-embryo-flushing", + "summary": "Add a single new embyro flushing.", + "description": "# Purpose\nAllows a client to add a single embryo flushing event.\n", + "tags": [ + "ADE-1.4-reproduction" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The embryo-flushing to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventCollection" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/pregnancy-checks": { "post": { "operationId": "post-batch-pregnancy-checks", "summary": "Add an array of pregnancy-checks.", "description": "# Purpose \nAllows a client to add a collection of pregnancy-checks.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1153,7 +1258,7 @@ "summary": "Add an array of heats.", "description": "# Purpose \nAllows a client to add a collection of heats.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1228,7 +1333,7 @@ "summary": "Add an array of inseminations.", "description": "# Purpose \nAllows a client to add a collection of inseminations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1303,7 +1408,7 @@ "summary": "Add an array of drying-off events.", "description": "# Purpose \nAllows a client to add a collection of drying-off events.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1378,7 +1483,7 @@ "summary": "Add an array of abortions.", "description": "# Purpose \nAllows a client to add a collection of abortions.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1453,7 +1558,7 @@ "summary": "Add an array of do-not-breed events.", "description": "# Purpose \nAllows a client to add a collection of do-not-breed events.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1528,7 +1633,7 @@ "summary": "Add an array of parturitions.", "description": "# Purpose \nAllows a client to add a collection of parturitions.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1603,7 +1708,7 @@ "summary": "Add an array of mating recommendations.", "description": "# Purpose \nAllows a client to add a collection of mating recommendations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1678,7 +1783,7 @@ "summary": "Add an array of gestations.", "description": "# Purpose \nAllows a client to add a collection of gestations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1753,7 +1858,7 @@ "summary": "Add an array of reproductive status observations.", "description": "# Purpose \nAllows a client to add a collection of reproductive status observations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1821,6 +1926,81 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/embryo-flushings": { + "post": { + "operationId": "post-batch-embryo-flushings", + "summary": "Add an array of embryo-flushings.", + "description": "# Purpose \nAllows a client to add a collection of embryo-flushings.\n", + "tags": [ + "ADE-1.4-reproduction" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of embryo-flushings to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } } }, "components": { @@ -1950,6 +2130,18 @@ "items": { "$ref": "#/components/schemas/icarReproStatusObservedEventResource" } + }, + "icarReproEmbryoFlushingEventResource": { + "$ref": "../resources/icarReproEmbryoFlushingEventResource.json" + }, + "icarReproEmbryoFlushingEventCollection": { + "$ref": "../collections/icarReproEmbryoFlushingEventCollection.json" + }, + "icarReproEmbryoFlushingEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventResource" + } } }, "parameters": { @@ -2003,4 +2195,4 @@ } } } -} \ No newline at end of file +} diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json new file mode 100644 index 0000000..2704c16 --- /dev/null +++ b/url-schemes/sortingURLScheme.json @@ -0,0 +1,294 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Sorting-related messages API Specifications", + "description": "Specifications for messages that support livestock sorting management.", + "version": "1.4", + "contact": { + "name": "Animal Data Exchange Working Group", + "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", + "email": "icar@icar.org" + } + }, + "servers": [ + { + "url": "https://icar-ade.standard.com" + } + ], + "tags": [ + { + "name": "ADE-1.4-sorting", + "description": "Sorting messages approved by the working group" + } + ], + "paths": { + "/locations/{location-scheme}/{location-id}/sorting-sites": { + "get": { + "operationId": "get-sorting-sites", + "summary": "Get the sorting-sites for a certain location", + "description": "# Purpose\nProvides the sorting-sites for a location\n", + "tags": [ + "ADE-1.4-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarSortingSiteCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/{animal-scheme}/{animal-id}/sorting": { + "get": { + "operationId": "get-animal-sorting", + "summary": "Get the sorting of a certain animal for a certain site", + "description": "# Purpose\nProvides the sorting of a certain animal\n", + "tags": [ + "ADE-1.4-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/animal-scheme" + }, + { + "$ref": "#/components/parameters/animal-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "delete": { + "operationId": "delete-animal-sorting", + "summary": "Delete sorting for a certain animal of a location", + "description": "# Purpose\nProvides the deletion of sorting for a location\n", + "tags": [ + "ADE-1.4-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/animal-scheme" + }, + { + "$ref": "#/components/parameters/animal-id" + } + ], + "responses": { + "200": { + "description": "Successful." + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/sortings": { + "get": { + "operationId": "get-all-animal-sorting-commands", + "summary": "Get the known sorting-commands for all animals of a certain location", + "description": "# Purpose\nProvides the known sorting-commands for all animals of a location\n", + "tags": [ + "ADE-1.4-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-animal-sorting", + "summary": "Add an animal into a sorting-site.", + "description": "# Purpose\nAllows a client to add an animal to a sorting-site", + "tags": [ + "ADE-1.4-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The sorting of an animal to be create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modified by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "400": { + "$ref": "#/components/responses/default" + }, + "500": { + "$ref": "#/components/responses/default" + } + } + } + } + }, + "components": { + "schemas": { + "icarAnimalSortingCommandCollection": { + "$ref": "../collections/icarAnimalSortingCommandCollection.json" + }, + "icarSortingSiteCollection": { + "$ref": "../collections/icarSortingSiteCollection.json" + }, + "icarAnimalSortingCommandResource": { + "$ref": "../resources/icarAnimalSortingCommandResource.json" + } + }, + "parameters": { + "location-scheme": { + "name": "location-scheme", + "in": "path", + "description": "The scheme id for the location identifier.", + "required": true, + "schema": { + "type": "string" + } + }, + "location-id": { + "name": "location-id", + "in": "path", + "description": "The unique identifier for the location.", + "required": true, + "schema": { + "type": "string" + } + }, + "animal-scheme": { + "name": "animal-scheme", + "in": "path", + "description": "The scheme id for the animal identifier.", + "required": true, + "schema": { + "type": "string" + } + }, + "animal-id": { + "name": "animal-id", + "in": "path", + "description": "The unique identifier for the animal.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "responses": { + "default": { + "description": "An error has occured while handling the request. Check the content of the message for the error details.", + "content": { + "application/json": { + "schema": { + "$ref": "../collections/icarErrorCollection.json" + } + } + } + } + }, +"examples": {} + } +} diff --git a/well-known/icarCarcassMetricIdentifierType.md b/well-known/icarCarcassMetricIdentifierType.md new file mode 100644 index 0000000..254cdaf --- /dev/null +++ b/well-known/icarCarcassMetricIdentifierType.md @@ -0,0 +1,30 @@ +# Well-known Carcass Metric Schemes and Metrics +This file allows organisations to specify carcass (or carcase) observation identifiers (metrics) +Each metric has: +- A scheme (either a common scheme or a county- or organisation-specific scheme) +- A metric id (the id component of the identifer type) which identifies a specific metric within the scheme +- Typical Units (UN-CEFACT abbreviation where possible) +- Method of measurement (if multiple methods are supported) +- Additional qualifier for the metric or method if required for clarity. + +## Schemes +| Scheme Short URI | Resolvable URI | Organisation | Description | +| --- | --- | --- | --- | +| org.icar.carcass | https://www.icar.org/index.php/icar-recording-guidelines/ | ICAR | Common carcass metrics that are likely to be used internationally. Defined to save every country having to create its own. | + +## Well-known Metrics +| Scheme URI | Metric ID | Description | Units | Methods | Qualifiers | +| --- | --- | --- | --- | --- | --- | +| org.icar.carcass | liveWeight | Live animal weight immediately prior to slaughter. Should be recorded with a known time off feed. Desired accuracy to nearest kg or 0.5 kg. | KGM | weighScales | | +| org.icar.carcass | deadWeight | Animal weight immediately after slaughter and prior to cutting. Should be recorded with a known time off feed. Desired accuracy to nearest kg or 0.5 kg. | KGM | weighScales | | +| org.icar.carcass | hotCarcassWeight | Carcass weight of an animal after slaughter and trim, and before washing and chilling. Depending on species, may be recorded for the full carcass or each side. Desired accuracy to 1 decimal place. | KGM | weighScales | | +| org.icar.carcass | coldCarcassWeight | Carcass weight of an animal after slaughter, trim, washing, and chilling. Depending on species, may be recorded for the full carcass or each side. Desired accuracy to 1 decimal place. | KGM | weighScales | | +| org.icar.carcass | eyeMuscleArea | Area of the surface of the M.longissimus dorsi at the ribbing site. | CMK | visual, directMeasure, imaging, ultrasound | | +| org.icar.carcass | fatColor | The colour of intermuscular fat lateral to the eye muscle assessed on the chilled carcase; from 1 (pure white) to 9 (creamy yellow). | visual, imaging | | | +| org.icar.carcass | meatColor | The colour of the eye muscle assessed on the chilled carcase; from 1 (pink) to 7 (dark maroon) | visual, imaging | | | +| org.icar.carcass | fatDepth | One-dimensional measurement of subcutaneous fat over a quartered rib site. In cattle, the P8 site is used. In sheep, the GR site is typically used. | MMT | visual, directMeasure, imaging, ultrasound | P8, GR | +| org.icar.carcass | marbling | An assessment of intramuscular fat (IMF) within the lean of the ribeye muscle, scored from 0 (lean) to 9 (high marbling) | visual, imaging, ultrasound | | | +| org.icar.carcass | dentition | A measure of the eruption of permanent incisor teeth. Dentition is not a method to accurately measure chronological age, maturity, or eating quality, but may be used as a way to categorise carcasses. Assessed in even numbers (2-tooth, 4-tooth) | | visual | | +| org.icar.carcass | dressingPercentage | The mathematical relationship between animal liveweight immediately before slaughter (or deadweight) and the trimmed hot carcass weight, calculated as hot carcass weight, divided by liveweight, multiplied by 100. Usually expressed to 0 or 1 decimal place. | P1 | calculated | | +| | | | | | | + diff --git a/well-known/icarDeviceRegistrationIdentifierType.md b/well-known/icarDeviceRegistrationIdentifierType.md new file mode 100644 index 0000000..5863912 --- /dev/null +++ b/well-known/icarDeviceRegistrationIdentifierType.md @@ -0,0 +1,6 @@ +# Well-known Registration Schemes for measurement, sensing, imaging, wearable, or control devices. + +| Short URI | Resolvable URI | Organisation | Description | +| --- | --- | --- | --- | +| org.icar | https://www.icar.org/index.php/icar-recording-guidelines/#section11 | ICAR | A device registration scheme operated by ICAR. | + diff --git a/well-known/icarProductIdentifierType.md b/well-known/icarProductIdentifierType.md new file mode 100644 index 0000000..fffe3e9 --- /dev/null +++ b/well-known/icarProductIdentifierType.md @@ -0,0 +1,4 @@ +# Well-known Product Schemes + +| Short URI | Resolvable URI | Organisation | Description | +| --- | --- | --- | --- |