From 41f8962288e75972eab82fe7d2870e540c8e7c4f Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:44:39 +1300 Subject: [PATCH 001/108] Revert "Revert "Added repro flushing event with type and enums"" --- ...carReproEmbryoFlushingEventCollection.json | 21 ++ enums/icarReproEmbryoFlushingMethodType.json | 7 + .../icarReproEmbryoFlushingEventResource.json | 27 +++ url-schemes/exampleUrlScheme.json | 43 +++- url-schemes/reproductionURLScheme.json | 196 +++++++++++++++++- 5 files changed, 291 insertions(+), 3 deletions(-) create mode 100644 collections/icarReproEmbryoFlushingEventCollection.json create mode 100644 enums/icarReproEmbryoFlushingMethodType.json create mode 100644 resources/icarReproEmbryoFlushingEventResource.json 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/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/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/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 1ea7e56..90ee371 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -3,7 +3,7 @@ "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/", @@ -1000,6 +1000,44 @@ } } }, + "/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", @@ -2206,6 +2244,9 @@ }, "icarGroupWeightEventCollection": { "$ref": "../collections/icarGroupWeightEventCollection.json" + }, + "icarReproEmbryoFlushingEventCollection" : { + "$ref": "../collections/icarReproEmbryoFlushingEventCollection.json" } }, "parameters": { diff --git a/url-schemes/reproductionURLScheme.json b/url-schemes/reproductionURLScheme.json index a4eb26d..ac78497 100644 --- a/url-schemes/reproductionURLScheme.json +++ b/url-schemes/reproductionURLScheme.json @@ -3,7 +3,7 @@ "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/", @@ -1072,6 +1072,111 @@ } } }, + "/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.json" + } + } + } + }, + "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", @@ -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 +} From b23f0cf558810804c473514c5e549b908cb50b8e Mon Sep 17 00:00:00 2001 From: Alexey Shelepaev Date: Mon, 6 Mar 2023 16:31:41 +0200 Subject: [PATCH 002/108] Added reference property to the icarAnimalSetResource. --- resources/icarAnimalSetResource.json | 4 ++++ 1 file changed, 4 insertions(+) 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." From a61a3e6889ba0c7e109da60768508c83f72f1b8d Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:45:54 +1300 Subject: [PATCH 003/108] Add organisations (identifiers, identity, type). --- types/icarOrganizationIdentifierType.json | 7 +++++ types/icarOrganizationIdentityType.json | 24 +++++++++++++++ types/icarOrganizationType.json | 37 +++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 types/icarOrganizationIdentifierType.json create mode 100644 types/icarOrganizationIdentityType.json create mode 100644 types/icarOrganizationType.json 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..a485316 --- /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", + "$id": "/types/icarOrganizationIdentityType", + "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..a86e9d8 --- /dev/null +++ b/types/icarOrganizationType.json @@ -0,0 +1,37 @@ +{ + "description": "Details for an organization that support its role in livestock systems or supply chains. Conceptually extends schema.org/organization.", + "$id": "/types/icarOrganizationType", + "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 From e8f7796c62040b66d5720526dd5dccc28431fc8c Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 9 Mar 2023 15:04:19 +1300 Subject: [PATCH 004/108] Extend consignment with org and declarations Extend the icarConsignmentType adding origin and destination organisations, and additional information needed for sending livestock for processing. --- types/icarConsignmentDeclarationType.json | 16 ++++++++ types/icarConsignmentType.json | 45 +++++++++++++++++++++++ types/icarDeclarationIdentifierType.json | 11 ++++++ types/icarInterestedPartyType.json | 23 ++++++++++++ types/icarOrganizationIdentityType.json | 1 - types/icarOrganizationType.json | 1 - 6 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 types/icarConsignmentDeclarationType.json create mode 100644 types/icarDeclarationIdentifierType.json create mode 100644 types/icarInterestedPartyType.json 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..c59179f 100644 --- a/types/icarConsignmentType.json +++ b/types/icarConsignmentType.json @@ -20,6 +20,10 @@ "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" }, @@ -32,6 +36,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 +71,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/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/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/icarOrganizationIdentityType.json b/types/icarOrganizationIdentityType.json index a485316..a057feb 100644 --- a/types/icarOrganizationIdentityType.json +++ b/types/icarOrganizationIdentityType.json @@ -1,7 +1,6 @@ { "description": "The identity of an organization in livestock supply chains. Based on a minimal set of identifiers from schema.org/organization.", "type": "object", - "$id": "/types/icarOrganizationIdentityType", "properties": { "name": { "type": "string", diff --git a/types/icarOrganizationType.json b/types/icarOrganizationType.json index a86e9d8..3996ea6 100644 --- a/types/icarOrganizationType.json +++ b/types/icarOrganizationType.json @@ -1,6 +1,5 @@ { "description": "Details for an organization that support its role in livestock systems or supply chains. Conceptually extends schema.org/organization.", - "$id": "/types/icarOrganizationType", "allOf": [ { "$ref": "../types/icarOrganizationIdentityType.json" From 82810884a83608d6adb10f7c514168772691b1be Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 9 Mar 2023 17:34:28 +1300 Subject: [PATCH 005/108] Add carcasses, processing lots, and observations Add `icarCarcassResource`, `icarProcessingLot`, and `icarCarcassObservationsEvent` and supporting types and enumerations. Resolves #360 Resolves #361 Resolves #362 --- collections/icarCarcassCollection.json | 21 +++ ...carCarcassObservationsEventCollection.json | 21 +++ collections/icarProcessingLotCollection.json | 21 +++ enums/icarCarcassPrimalType.json | 10 ++ enums/icarCarcassSideType.json | 9 ++ enums/icarCarcassStateType.json | 8 ++ enums/icarChainProcessType.json | 8 ++ enums/icarObservationStatusType.json | 11 ++ .../icarCarcassObservationsEventResource.json | 41 ++++++ resources/icarCarcassResource.json | 12 ++ resources/icarProcessingLotResource.json | 12 ++ types/icarCarcassMetricIdentifierType.json | 7 + types/icarCarcassMetricType.json | 19 +++ types/icarCarcassObservationType.json | 40 ++++++ types/icarCarcassType.json | 66 +++++++++ types/icarPlantChainType.json | 25 ++++ types/icarProcessingLotType.json | 65 +++++++++ url-schemes/exampleUrlScheme.json | 134 +++++++++++++++++- 18 files changed, 528 insertions(+), 2 deletions(-) create mode 100644 collections/icarCarcassCollection.json create mode 100644 collections/icarCarcassObservationsEventCollection.json create mode 100644 collections/icarProcessingLotCollection.json create mode 100644 enums/icarCarcassPrimalType.json create mode 100644 enums/icarCarcassSideType.json create mode 100644 enums/icarCarcassStateType.json create mode 100644 enums/icarChainProcessType.json create mode 100644 enums/icarObservationStatusType.json create mode 100644 resources/icarCarcassObservationsEventResource.json create mode 100644 resources/icarCarcassResource.json create mode 100644 resources/icarProcessingLotResource.json create mode 100644 types/icarCarcassMetricIdentifierType.json create mode 100644 types/icarCarcassMetricType.json create mode 100644 types/icarCarcassObservationType.json create mode 100644 types/icarCarcassType.json create mode 100644 types/icarPlantChainType.json create mode 100644 types/icarProcessingLotType.json 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/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/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/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/resources/icarCarcassObservationsEventResource.json b/resources/icarCarcassObservationsEventResource.json new file mode 100644 index 0000000..80bbcde --- /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 ('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/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/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..f2c30d2 --- /dev/null +++ b/types/icarCarcassMetricType.json @@ -0,0 +1,19 @@ +{ + "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" + }, + "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" + } + } +} \ No newline at end of file diff --git a/types/icarCarcassObservationType.json b/types/icarCarcassObservationType.json new file mode 100644 index 0000000..ec5e0d4 --- /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" + }, + "qualitativeGrade": { + "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" + }, + "problemDetail": { + "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..de94d93 --- /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" + }, + "killDate": { + "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" + }, + "refProcessorGrid": { + "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/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/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/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 90ee371..45e743c 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -3,7 +3,7 @@ "info": { "title": "Release Candidate Messages", "description": "The specifications of messages which are ready for ICAR approval and release", - "version": "1.4", + "version": "1.3", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -45,6 +45,10 @@ "name": "ADE-1.3-reproduction", "description": "Reproduction messages approved by the working group" }, + { + "name": "ADE-1.3-carcass", + "description": "Carcass messages approved by the working group" + }, { "name": "ADE-1.3-scheme", "description": "Scheme definitions approved by the working group" @@ -1006,7 +1010,7 @@ "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" + "ADE-1.3-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -2091,6 +2095,123 @@ } } } + }, + "/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.3-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.3-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.3-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" + } + } + } } }, "components": { @@ -2247,6 +2368,15 @@ }, "icarReproEmbryoFlushingEventCollection" : { "$ref": "../collections/icarReproEmbryoFlushingEventCollection.json" + }, + "icarProcessingLotCollection" : { + "$ref": "../collections/icarProcessingLotCollection.json" + }, + "icarCarcassCollection" : { + "$ref": "../collections/icarCarcassCollection.json" + }, + "icarCarcassObservationsEventCollection" : { + "$ref": "../collections/icarCarcassObservationsEventCollection.json" } }, "parameters": { From 593fe1b90c03a4eb9eb9392e279cef13939da920 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 20 Mar 2023 09:37:53 +1300 Subject: [PATCH 006/108] Correct quotation marks in descr. --- resources/icarCarcassObservationsEventResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/icarCarcassObservationsEventResource.json b/resources/icarCarcassObservationsEventResource.json index 80bbcde..1727a09 100644 --- a/resources/icarCarcassObservationsEventResource.json +++ b/resources/icarCarcassObservationsEventResource.json @@ -20,7 +20,7 @@ } }, "side": { - "description": "The side of the carcass observed in this event ('Both` if not split).", + "description": "The side of the carcass observed in this event (use Both if not split).", "$ref": "../enums/icarCarcassSideType.json" }, "primal": { From 01f81a81c1c7c2f930cf6e73cb69bfa32122be20 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 20 Mar 2023 09:39:19 +1300 Subject: [PATCH 007/108] Rename killDate to killDateTime for consistency --- types/icarCarcassType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarCarcassType.json b/types/icarCarcassType.json index de94d93..caabd87 100644 --- a/types/icarCarcassType.json +++ b/types/icarCarcassType.json @@ -14,7 +14,7 @@ "description": "The lot in which the carcass was processed. ", "$ref": "../types/icarProcessingLotType.json" }, - "killDate": { + "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" }, From 477ce56ac18120116496be57bbe5b8eec87ca5d9 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 20 Mar 2023 09:40:03 +1300 Subject: [PATCH 008/108] simplify processorGrid name --- types/icarCarcassType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarCarcassType.json b/types/icarCarcassType.json index caabd87..6cb0af8 100644 --- a/types/icarCarcassType.json +++ b/types/icarCarcassType.json @@ -58,7 +58,7 @@ "description": "Plant-specific destination codes that are used for company requirements and to link to boning run processing.", "type": "string" }, - "refProcessorGrid": { + "processorGrid": { "description": "Reference to a processor-specific grid used to calculate the price paid to the producer", "type": "string" } From 687e65ce58fc7afc307a38fe8fcb7c915f828257 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 20 Mar 2023 09:41:31 +1300 Subject: [PATCH 009/108] Make organization name required. --- types/icarOrganizationIdentityType.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/icarOrganizationIdentityType.json b/types/icarOrganizationIdentityType.json index a057feb..90a22f3 100644 --- a/types/icarOrganizationIdentityType.json +++ b/types/icarOrganizationIdentityType.json @@ -1,6 +1,7 @@ { "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", From 5898c35120a40e9f26c7fafd1260cee6f0b94d82 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:29:58 +1300 Subject: [PATCH 010/108] Fix Spectral linting errors in repro URL scheme --- url-schemes/reproductionURLScheme.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/url-schemes/reproductionURLScheme.json b/url-schemes/reproductionURLScheme.json index ac78497..a03d8bc 100644 --- a/url-schemes/reproductionURLScheme.json +++ b/url-schemes/reproductionURLScheme.json @@ -1078,7 +1078,7 @@ "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" + "ADE-1.3-reproduction" ], "parameters": [ { @@ -1115,7 +1115,7 @@ "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" + "ADE-1.3-reproduction" ], "parameters": [ { @@ -1142,7 +1142,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarReproEmbryoFlushingEventResource.json" + "$ref": "#/components/schemas/icarReproEmbryoFlushingEventResource" } } } @@ -1933,7 +1933,7 @@ "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" + "ADE-1.3-reproduction" ], "parameters": [ { From e0ae180a8e6be83528d4667033b159f8c161a93f Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Wed, 22 Mar 2023 12:55:44 +1300 Subject: [PATCH 011/108] Change problemDetail to remark for consistency --- types/icarCarcassObservationType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarCarcassObservationType.json b/types/icarCarcassObservationType.json index ec5e0d4..56efe99 100644 --- a/types/icarCarcassObservationType.json +++ b/types/icarCarcassObservationType.json @@ -32,7 +32,7 @@ "description": "The status of the observation.", "$ref": "../enums/icarObservationStatusType.json" }, - "problemDetail": { + "remark": { "description": "The reason if there is an issue with the observation", "type": "string" } From 39b15b91fdaffe8b6fbaa47d8c12da03fee9015d Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:52:38 +1300 Subject: [PATCH 012/108] Rename qualitativeGrade to qualitativeValue I've had feedback that grade is confusing if the text value is not specifically a grade but some other result (e.g. the presence of a defect). --- types/icarCarcassObservationType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarCarcassObservationType.json b/types/icarCarcassObservationType.json index 56efe99..893ab98 100644 --- a/types/icarCarcassObservationType.json +++ b/types/icarCarcassObservationType.json @@ -24,7 +24,7 @@ "description": "The smallest measurement difference that can be discriminated. Specified in the units, for instance 0.5 (kilograms).", "type": "number" }, - "qualitativeGrade": { + "qualitativeValue": { "description": "The observed value of the metric if it is a grade or other string.", "type": "string" }, From dc5a1bd859619bb5cc29b40a11d68cea32f6c8ca Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Thu, 23 Mar 2023 10:21:50 +0100 Subject: [PATCH 013/108] milk prediction changed test day result - added predictions added milk prediction resource --- .../icarMilkPredictionsCollection.json | 21 ++++++++++ resources/icarMilkPredictionResource.json | 27 ++++++++++++ resources/icarTestDayResultEventResource.json | 5 ++- types/icarMilkingPredictionType.json | 26 ++++++++++++ url-schemes/exampleUrlScheme.json | 42 +++++++++++++++++++ url-schemes/milkURLScheme.json | 42 +++++++++++++++++++ 6 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 collections/icarMilkPredictionsCollection.json create mode 100644 resources/icarMilkPredictionResource.json create mode 100644 types/icarMilkingPredictionType.json 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/resources/icarMilkPredictionResource.json b/resources/icarMilkPredictionResource.json new file mode 100644 index 0000000..3c997aa --- /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. Also a prediction of this production on the next testday is included and it eventually gives indication of when the peak production is reached.", + + "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/icarMilkingMilkWeightType.json" + }, + "PredictedProductionNextMR": { + "$ref": "../types/icarMilkingPredictionType.json" + } + } + } + ] +} \ No newline at end of file diff --git a/resources/icarTestDayResultEventResource.json b/resources/icarTestDayResultEventResource.json index e08475d..c91b492 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/types/icarMilkingPredictionType.json b/types/icarMilkingPredictionType.json new file mode 100644 index 0000000..13d2a72 --- /dev/null +++ b/types/icarMilkingPredictionType.json @@ -0,0 +1,26 @@ +{ + "description": "The amount of milk, fat and protein milked in a defined period of time", + + "type": "object", + + "required": [ + "unitCode", + "value" + ], + + "properties": { + "MilkWeight": { + "$ref": "../types/icarMilkingMilkWeightType.json" + }, + "FatWeight": { + "$ref": "../types/icarMilkingFatWeightType.json" + }, + "ProteinWeight": { + "$ref": "../types/icarMilkingProteinWeightType.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/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 45e743c..bd3fda5 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -252,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 additions" + ], + "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": { @@ -2225,6 +2264,9 @@ "icarWithdrawalEventCollection": { "$ref": "../collections/icarWithdrawalEventCollection.json" }, + "icarMilkPredictionsCollection": { + "$ref": "../collections/icarMilkPredictionsCollection.json" + }, "icarReproMatingRecommendationCollection": { "$ref": "../collections/icarReproMatingRecommendationCollection.json" }, diff --git a/url-schemes/milkURLScheme.json b/url-schemes/milkURLScheme.json index 2b5dcc8..0a02cc5 100644 --- a/url-schemes/milkURLScheme.json +++ b/url-schemes/milkURLScheme.json @@ -376,6 +376,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}/lactations": { "get": { "operationId": "get-lactations", @@ -900,6 +939,9 @@ }, "icarDailyMilkingAveragesCollection": { "$ref": "../collections/icarDailyMilkingAveragesCollection.json" + }, + "icarMilkPredictionsCollection": { + "$ref": "../collections/icarMilkPredictionsCollection.json" }, "icarLactationCollection": { "$ref": "../collections/icarLactationCollection.json" From c4bff1ebeb41da738fed045a4005204f7c2dbda4 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Thu, 23 Mar 2023 10:34:21 +0100 Subject: [PATCH 014/108] update some uppercase to lower case and missing types added --- resources/icarTestDayResultEventResource.json | 2 +- types/icarMilkingFatWeightType.json | 24 +++++++++++++++++++ types/icarMilkingPredictionType.json | 8 +++---- types/icarMilkingProteinWeightType.json | 24 +++++++++++++++++++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 types/icarMilkingFatWeightType.json create mode 100644 types/icarMilkingProteinWeightType.json diff --git a/resources/icarTestDayResultEventResource.json b/resources/icarTestDayResultEventResource.json index c91b492..3b504c1 100644 --- a/resources/icarTestDayResultEventResource.json +++ b/resources/icarTestDayResultEventResource.json @@ -20,7 +20,7 @@ "$ref": "../types/icarMilkCharacteristicsType.json" } }, - "PredictedProductionOnTestday": { + "predictedProductionOnTestday": { "$ref": "../types/icarMilkingPredictionType.json" } } diff --git a/types/icarMilkingFatWeightType.json b/types/icarMilkingFatWeightType.json new file mode 100644 index 0000000..4b55e0b --- /dev/null +++ b/types/icarMilkingFatWeightType.json @@ -0,0 +1,24 @@ +{ + "description": "The amount of fat milked", + + "type": "object", + + "required": [ + "unitCode", + "value" + ], + + "properties": { + "unitCode": { + "type": "string", + "description": "UN/CEFACT Common Code for Units of Measurement.", + "enum": [ + "KGM" + ] + }, + "value": { + "type": "number", + "format": "double" + } + } +} \ No newline at end of file diff --git a/types/icarMilkingPredictionType.json b/types/icarMilkingPredictionType.json index 13d2a72..ba38c59 100644 --- a/types/icarMilkingPredictionType.json +++ b/types/icarMilkingPredictionType.json @@ -9,16 +9,16 @@ ], "properties": { - "MilkWeight": { + "milkWeight": { "$ref": "../types/icarMilkingMilkWeightType.json" }, - "FatWeight": { + "fatWeight": { "$ref": "../types/icarMilkingFatWeightType.json" }, - "ProteinWeight": { + "proteinWeight": { "$ref": "../types/icarMilkingProteinWeightType.json" }, - "Hours": { + "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." } diff --git a/types/icarMilkingProteinWeightType.json b/types/icarMilkingProteinWeightType.json new file mode 100644 index 0000000..6e49807 --- /dev/null +++ b/types/icarMilkingProteinWeightType.json @@ -0,0 +1,24 @@ +{ + "description": "The amount of protein milked", + + "type": "object", + + "required": [ + "unitCode", + "value" + ], + + "properties": { + "unitCode": { + "type": "string", + "description": "UN/CEFACT Common Code for Units of Measurement.", + "enum": [ + "KGM" + ] + }, + "value": { + "type": "number", + "format": "double" + } + } +} \ No newline at end of file From b1a75e565ac2ee5491b70877f4bb061f9204a1ef Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Thu, 23 Mar 2023 10:40:37 +0100 Subject: [PATCH 015/108] last changes changed tag + one upper to lower case --- resources/icarMilkPredictionResource.json | 2 +- url-schemes/exampleUrlScheme.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/icarMilkPredictionResource.json b/resources/icarMilkPredictionResource.json index 3c997aa..9d60bd3 100644 --- a/resources/icarMilkPredictionResource.json +++ b/resources/icarMilkPredictionResource.json @@ -18,7 +18,7 @@ "lactationPeakProduction": { "$ref": "../types/icarMilkingMilkWeightType.json" }, - "PredictedProductionNextMR": { + "predictedProductionNextMR": { "$ref": "../types/icarMilkingPredictionType.json" } } diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index bd3fda5..ec7b2d1 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -259,7 +259,7 @@ "summary": "Get the milk predictions for a certain location", "description": "# Purpose\nProvides the milk predictions for a location\n", "tags": [ - "ADE-1.4 additions" + "ADE-1.3-milk" ], "parameters": [ { From 528d8aa8547bf3e7379981e3ce62411154d889b5 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Mon, 3 Apr 2023 16:30:06 +0200 Subject: [PATCH 016/108] changes description expanded - more clear removed fat weight en protein weight type --- resources/icarMilkPredictionResource.json | 2 +- types/icarMilkingFatWeightType.json | 24 ----------------------- types/icarMilkingPredictionType.json | 4 ++-- types/icarMilkingProteinWeightType.json | 24 ----------------------- 4 files changed, 3 insertions(+), 51 deletions(-) delete mode 100644 types/icarMilkingFatWeightType.json delete mode 100644 types/icarMilkingProteinWeightType.json diff --git a/resources/icarMilkPredictionResource.json b/resources/icarMilkPredictionResource.json index 9d60bd3..b538df8 100644 --- a/resources/icarMilkPredictionResource.json +++ b/resources/icarMilkPredictionResource.json @@ -1,5 +1,5 @@ { - "description": "This returns a prediction of the expected milk, fat and protein for a cow for the remaining the lactation. Also a prediction of this production on the next testday is included and it eventually gives indication of when the peak production is reached.", + "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" diff --git a/types/icarMilkingFatWeightType.json b/types/icarMilkingFatWeightType.json deleted file mode 100644 index 4b55e0b..0000000 --- a/types/icarMilkingFatWeightType.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "description": "The amount of fat milked", - - "type": "object", - - "required": [ - "unitCode", - "value" - ], - - "properties": { - "unitCode": { - "type": "string", - "description": "UN/CEFACT Common Code for Units of Measurement.", - "enum": [ - "KGM" - ] - }, - "value": { - "type": "number", - "format": "double" - } - } -} \ No newline at end of file diff --git a/types/icarMilkingPredictionType.json b/types/icarMilkingPredictionType.json index ba38c59..575ff2d 100644 --- a/types/icarMilkingPredictionType.json +++ b/types/icarMilkingPredictionType.json @@ -13,10 +13,10 @@ "$ref": "../types/icarMilkingMilkWeightType.json" }, "fatWeight": { - "$ref": "../types/icarMilkingFatWeightType.json" + "$ref": "../types/icarMilkingMilkWeightType.json" }, "proteinWeight": { - "$ref": "../types/icarMilkingProteinWeightType.json" + "$ref": "../types/icarMilkingMilkWeightType.json" }, "hours": { "type": "number", diff --git a/types/icarMilkingProteinWeightType.json b/types/icarMilkingProteinWeightType.json deleted file mode 100644 index 6e49807..0000000 --- a/types/icarMilkingProteinWeightType.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "description": "The amount of protein milked", - - "type": "object", - - "required": [ - "unitCode", - "value" - ], - - "properties": { - "unitCode": { - "type": "string", - "description": "UN/CEFACT Common Code for Units of Measurement.", - "enum": [ - "KGM" - ] - }, - "value": { - "type": "number", - "format": "double" - } - } -} \ No newline at end of file From 1eb1cff5274678ee48a7896d7fe42ea0af8bbf4a Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:34:41 +0200 Subject: [PATCH 017/108] Update url-schemes/milkURLScheme.json --- url-schemes/milkURLScheme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url-schemes/milkURLScheme.json b/url-schemes/milkURLScheme.json index 0a02cc5..638ee55 100644 --- a/url-schemes/milkURLScheme.json +++ b/url-schemes/milkURLScheme.json @@ -382,7 +382,7 @@ "summary": "Get the milk predictions for a certain location", "description": "# Purpose\nProvides the milk predictions for a location\n", "tags": [ - "ADE-1.4-milk" + "ADE-1.3-milk" ], "parameters": [ { From 92dba23f47b82cea3deec1d1290bf48d99a073e4 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:08:47 +0200 Subject: [PATCH 018/108] Update resources/icarTestDayResultEventResource.json --- resources/icarTestDayResultEventResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/icarTestDayResultEventResource.json b/resources/icarTestDayResultEventResource.json index 3b504c1..b5d9bbf 100644 --- a/resources/icarTestDayResultEventResource.json +++ b/resources/icarTestDayResultEventResource.json @@ -20,7 +20,7 @@ "$ref": "../types/icarMilkCharacteristicsType.json" } }, - "predictedProductionOnTestday": { + "predictedProductionOnTestDay": { "$ref": "../types/icarMilkingPredictionType.json" } } From d99c23a26f79fc9616d9009b0e229a05d5381fc3 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:08:53 +0200 Subject: [PATCH 019/108] Update types/icarMilkingPredictionType.json --- types/icarMilkingPredictionType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarMilkingPredictionType.json b/types/icarMilkingPredictionType.json index 575ff2d..1c95aa1 100644 --- a/types/icarMilkingPredictionType.json +++ b/types/icarMilkingPredictionType.json @@ -4,7 +4,7 @@ "type": "object", "required": [ - "unitCode", + "milkWeight" "value" ], From 6d464c78dbb378f8b5c54d22d03450133d642ca1 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:09:00 +0200 Subject: [PATCH 020/108] Update types/icarMilkingPredictionType.json --- types/icarMilkingPredictionType.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/icarMilkingPredictionType.json b/types/icarMilkingPredictionType.json index 1c95aa1..1e2a729 100644 --- a/types/icarMilkingPredictionType.json +++ b/types/icarMilkingPredictionType.json @@ -5,7 +5,6 @@ "required": [ "milkWeight" - "value" ], "properties": { From 30bf00085eacb91655f189300d056816aa47d3e7 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 13 Apr 2023 11:40:08 +1200 Subject: [PATCH 021/108] Inventory transaction resources Defines a generalised icarInventoryTransactionResource and its specific versions, icarFeedTransactionResource and icarMedicineTransactionResource. Resolves #369 --- .../icarFeedTransactionCollection.json | 21 + .../icarInventoryTransactionCollection.json | 21 + .../icarMedicineTransactionCollection.json | 21 + enums/icarInventoryTransactionKindType.json | 11 + enums/icarProductFamilyType.json | 16 + resources/icarFeedTransactionResource.json | 19 + .../icarInventoryTransactionResource.json | 19 + .../icarMedicineTransactionResource.json | 19 + types/icarFeedReferenceType.json | 20 + types/icarInventoryTransactionType.json | 53 +++ types/icarMedicineReferenceType.json | 7 +- types/icarProductIdentifierType.json | 9 + types/icarProductReferenceType.json | 44 ++ url-schemes/exampleUrlScheme.json | 194 +++++++- url-schemes/managementURLScheme.json | 444 ++++++++++++++++++ well-known/icarProductIdentifierType.md | 4 + 16 files changed, 916 insertions(+), 6 deletions(-) create mode 100644 collections/icarFeedTransactionCollection.json create mode 100644 collections/icarInventoryTransactionCollection.json create mode 100644 collections/icarMedicineTransactionCollection.json create mode 100644 enums/icarInventoryTransactionKindType.json create mode 100644 enums/icarProductFamilyType.json create mode 100644 resources/icarFeedTransactionResource.json create mode 100644 resources/icarInventoryTransactionResource.json create mode 100644 resources/icarMedicineTransactionResource.json create mode 100644 types/icarFeedReferenceType.json create mode 100644 types/icarInventoryTransactionType.json create mode 100644 types/icarProductIdentifierType.json create mode 100644 types/icarProductReferenceType.json create mode 100644 well-known/icarProductIdentifierType.md 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/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/enums/icarInventoryTransactionKindType.json b/enums/icarInventoryTransactionKindType.json new file mode 100644 index 0000000..fd94266 --- /dev/null +++ b/enums/icarInventoryTransactionKindType.json @@ -0,0 +1,11 @@ +{ + "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", + "StockTake", + "Use" + ] +} \ No newline at end of file diff --git a/enums/icarProductFamilyType.json b/enums/icarProductFamilyType.json new file mode 100644 index 0000000..894bba6 --- /dev/null +++ b/enums/icarProductFamilyType.json @@ -0,0 +1,16 @@ +{ + "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" + ] +} \ No newline at end of file diff --git a/resources/icarFeedTransactionResource.json b/resources/icarFeedTransactionResource.json new file mode 100644 index 0000000..2f3098b --- /dev/null +++ b/resources/icarFeedTransactionResource.json @@ -0,0 +1,19 @@ +{ + "description": "An inventory transaction resource for a feed product.", + "type": "object", + "$id": "types/icarFeedTransactionResource", + "allOf": [ + { + "$ref": "../types/icarInventoryTransactionType.json" + } + ], + "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/icarInventoryTransactionResource.json b/resources/icarInventoryTransactionResource.json new file mode 100644 index 0000000..26b8856 --- /dev/null +++ b/resources/icarInventoryTransactionResource.json @@ -0,0 +1,19 @@ +{ + "description": "Generic inventory transaction resource. Some product families have specific transaction resources (e.g. medicines, feeds).", + "type": "object", + "$id": "types/icarInventoryTransactionResource", + "allOf": [ + { + "$ref": "../types/icarInventoryTransactionType.json" + } + ], + "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..babdc70 --- /dev/null +++ b/resources/icarMedicineTransactionResource.json @@ -0,0 +1,19 @@ +{ + "description": "An inventory transaction resource for a medicine product.", + "type": "object", + "$id": "types/icarMedicineTransactionResource", + "allOf": [ + { + "$ref": "../types/icarInventoryTransactionType.json" + } + ], + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "../types/icarMedicineReferenceType.json", + "description": "The medicine product in this transaction." + } + } +} \ No newline at end of file diff --git a/types/icarFeedReferenceType.json b/types/icarFeedReferenceType.json new file mode 100644 index 0000000..041b9ec --- /dev/null +++ b/types/icarFeedReferenceType.json @@ -0,0 +1,20 @@ +{ + "description": "Feed Reference defines a feed product.", + "type": "object", + "$id": "types/icarFeedReferenceType", + "allOf": [ + { + "$ref": "../types/icarProductReferenceType.json" + } + ], + "properties": { + "category": { + "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/enums/icarFeedCategoryType.json", + "description": "Defines the category of the feed product." + }, + "type": { + "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/types/icarFeedIdentifierType.json", + "description": "The scheme + id identifying the type of feed." + } + } +} \ No newline at end of file diff --git a/types/icarInventoryTransactionType.json b/types/icarInventoryTransactionType.json new file mode 100644 index 0000000..148725b --- /dev/null +++ b/types/icarInventoryTransactionType.json @@ -0,0 +1,53 @@ +{ + "description": "Inventory Transaction defines a transaction on a product inventory where the transaction may be a receipt, disposal, on hand, stocktake, use", + "type": "object", + "$id": "types/icarInventoryTransactionType", + "allOf": [ + { + "$ref": "../resources/icarEventCoreResource.json" + } + ], + "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/icarMedicineReferenceType.json b/types/icarMedicineReferenceType.json index a08b42e..b14851b 100644 --- a/types/icarMedicineReferenceType.json +++ b/types/icarMedicineReferenceType.json @@ -2,15 +2,12 @@ "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" 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/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 45e743c..0f86a8c 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -2212,6 +2212,162 @@ } } } + }, + "/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.3-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.3-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.3-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" + } + } + } } }, "components": { @@ -2377,6 +2533,15 @@ }, "icarCarcassObservationsEventCollection" : { "$ref": "../collections/icarCarcassObservationsEventCollection.json" + }, + "icarInventoryTransactionCollection": { + "$ref": "../collections/icarInventoryTransactionCollection.json" + }, + "icarFeedTransactionCollection": { + "$ref": "../collections/icarFeedTransactionCollection.json" + }, + "icarMedicineTransactionCollection": { + "$ref": "../collections/icarMedicineTransactionCollection.json" } }, "parameters": { @@ -2448,7 +2613,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.", @@ -2501,6 +2675,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/managementURLScheme.json b/url-schemes/managementURLScheme.json index dd6fc99..ff9fd65 100644 --- a/url-schemes/managementURLScheme.json +++ b/url-schemes/managementURLScheme.json @@ -484,6 +484,162 @@ } } }, + "/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.3-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.3-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.3-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" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/animal-sets": { "post": { "operationId": "post-batch-animal-sets", @@ -783,6 +939,231 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/inventory-transactions": { + "post": { + "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" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "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/icarInventoryTransactionArray" + } + } + } + }, + "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}/feed-transactions": { + "post": { + "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" + ], + "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}/medicine-transactions": { + "post": { + "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" + ], + "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" + } + } + } + } + } + } } }, "components": { @@ -843,6 +1224,42 @@ "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" + } } }, "parameters": { @@ -908,6 +1325,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/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 | +| --- | --- | --- | --- | From 4301073f69540b897ebbd4f9c2db3ba39bbe2d8c Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 13 Apr 2023 11:49:22 +1200 Subject: [PATCH 022/108] Fix linting errors --- resources/icarFeedTransactionResource.json | 27 +++++++++++-------- .../icarMedicineTransactionResource.json | 26 ++++++++++-------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/resources/icarFeedTransactionResource.json b/resources/icarFeedTransactionResource.json index 2f3098b..ac416fc 100644 --- a/resources/icarFeedTransactionResource.json +++ b/resources/icarFeedTransactionResource.json @@ -1,19 +1,24 @@ { "description": "An inventory transaction resource for a feed product.", "type": "object", - "$id": "types/icarFeedTransactionResource", + "allOf": [ { "$ref": "../types/icarInventoryTransactionType.json" + }, + { + "type": "object", + + "required": [ + "product" + ], + + "properties": { + "product": { + "$ref": "../types/icarFeedReferenceType.json", + "description": "The feed product in this transaction." + } + } } - ], - "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/icarMedicineTransactionResource.json b/resources/icarMedicineTransactionResource.json index babdc70..ad117cc 100644 --- a/resources/icarMedicineTransactionResource.json +++ b/resources/icarMedicineTransactionResource.json @@ -1,19 +1,23 @@ { "description": "An inventory transaction resource for a medicine product.", - "type": "object", - "$id": "types/icarMedicineTransactionResource", + "allOf": [ { "$ref": "../types/icarInventoryTransactionType.json" + }, + { + "type": "object", + + "required": [ + "product" + ], + + "properties": { + "product": { + "$ref": "../types/icarMedicineReferenceType.json", + "description": "The medicine product in this transaction." + } + } } ], - "required": [ - "product" - ], - "properties": { - "product": { - "$ref": "../types/icarMedicineReferenceType.json", - "description": "The medicine product in this transaction." - } - } } \ No newline at end of file From 9cae01a827dcd8e3fc385fb09eff037459d49966 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:04:10 +1200 Subject: [PATCH 023/108] Fix linting errors Remove $id terms --- .../icarInventoryTransactionResource.json | 27 +++--- types/icarFeedReferenceType.json | 26 ++--- types/icarInventoryTransactionType.json | 95 ++++++++++--------- 3 files changed, 79 insertions(+), 69 deletions(-) diff --git a/resources/icarInventoryTransactionResource.json b/resources/icarInventoryTransactionResource.json index 26b8856..60af4f5 100644 --- a/resources/icarInventoryTransactionResource.json +++ b/resources/icarInventoryTransactionResource.json @@ -1,19 +1,22 @@ { "description": "Generic inventory transaction resource. Some product families have specific transaction resources (e.g. medicines, feeds).", - "type": "object", - "$id": "types/icarInventoryTransactionResource", + "allOf": [ { "$ref": "../types/icarInventoryTransactionType.json" + }, + { + "type": "object", + + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "../types/icarProductReferenceType.json", + "description": "The product in this inventory transaction." + } + } } - ], - "required": [ - "product" - ], - "properties": { - "product": { - "$ref": "../types/icarProductReferenceType.json", - "description": "The product in this inventory transaction." - } - } + ] } \ No newline at end of file diff --git a/types/icarFeedReferenceType.json b/types/icarFeedReferenceType.json index 041b9ec..c6c83d0 100644 --- a/types/icarFeedReferenceType.json +++ b/types/icarFeedReferenceType.json @@ -1,20 +1,22 @@ { "description": "Feed Reference defines a feed product.", - "type": "object", - "$id": "types/icarFeedReferenceType", + "allOf": [ { "$ref": "../types/icarProductReferenceType.json" - } - ], - "properties": { - "category": { - "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/enums/icarFeedCategoryType.json", - "description": "Defines the category of the feed product." }, - "type": { - "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/types/icarFeedIdentifierType.json", - "description": "The scheme + id identifying the type of feed." + { + "type": "object", + "properties": { + "category": { + "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/enums/icarFeedCategoryType.json", + "description": "Defines the category of the feed product." + }, + "type": { + "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/types/icarFeedIdentifierType.json", + "description": "The scheme + id identifying the type of feed." + } + } } - } + ] } \ No newline at end of file diff --git a/types/icarInventoryTransactionType.json b/types/icarInventoryTransactionType.json index 148725b..63a25f1 100644 --- a/types/icarInventoryTransactionType.json +++ b/types/icarInventoryTransactionType.json @@ -1,53 +1,58 @@ { "description": "Inventory Transaction defines a transaction on a product inventory where the transaction may be a receipt, disposal, on hand, stocktake, use", - "type": "object", - "$id": "types/icarInventoryTransactionType", + "allOf": [ { "$ref": "../resources/icarEventCoreResource.json" } - ], - "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." + , + { + "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 From 2e06b6ac2343b74e87fa6d7cc8874fead8adf31f Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:08:21 +1200 Subject: [PATCH 024/108] Fix linting error Removed extraneous comma --- resources/icarMedicineTransactionResource.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/icarMedicineTransactionResource.json b/resources/icarMedicineTransactionResource.json index ad117cc..a620fee 100644 --- a/resources/icarMedicineTransactionResource.json +++ b/resources/icarMedicineTransactionResource.json @@ -11,7 +11,7 @@ "required": [ "product" ], - + "properties": { "product": { "$ref": "../types/icarMedicineReferenceType.json", @@ -19,5 +19,5 @@ } } } - ], + ] } \ No newline at end of file From 28fb2c6534737d77f01c6c92c45979aa344ec47d Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Fri, 14 Apr 2023 08:59:07 +1200 Subject: [PATCH 025/108] Create icarCarcassMetricIdentifierType.md Create a well-known documentation for carcass metrics schemes and identifiers. Add a set under org.icar.carcass which are based on the beef recording guidelines and generally seen in other systems. Resolves #386 --- well-known/icarCarcassMetricIdentifierType.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 well-known/icarCarcassMetricIdentifierType.md diff --git a/well-known/icarCarcassMetricIdentifierType.md b/well-known/icarCarcassMetricIdentifierType.md new file mode 100644 index 0000000..56d8f25 --- /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 | | +| | | | | | | + From 50fbb1e188910ed74bc3e63f2b2fa1fbb51bdae1 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:47:37 +1200 Subject: [PATCH 026/108] Adjustment to dentition As proposed by @cvigorsICBF --- well-known/icarCarcassMetricIdentifierType.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/well-known/icarCarcassMetricIdentifierType.md b/well-known/icarCarcassMetricIdentifierType.md index 56d8f25..254cdaf 100644 --- a/well-known/icarCarcassMetricIdentifierType.md +++ b/well-known/icarCarcassMetricIdentifierType.md @@ -24,7 +24,7 @@ Each metric has: | 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 | 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 | | | | | | | | | From 1dbaebbd4622e770a74034cce2ac9e2f9a9fd8ac Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Wed, 14 Jun 2023 18:08:39 +0100 Subject: [PATCH 027/108] Add icarGroupFeedingEventResource Add a resource for group feeding or feed allowance. Resolves #382 --- resources/icarGroupFeedingEventResource.json | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 resources/icarGroupFeedingEventResource.json diff --git a/resources/icarGroupFeedingEventResource.json b/resources/icarGroupFeedingEventResource.json new file mode 100644 index 0000000..bed70ce --- /dev/null +++ b/resources/icarGroupFeedingEventResource.json @@ -0,0 +1,41 @@ +{ + "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" + } + ], + "required": [ + "feedingStartingDateTime", + "feedVisitDuration" + ], + "properties": { + "feedingStartingDateTime": { + "$ref": "../types/icarDateTimeType.json", + "description": "The RFC3339 UTC moment the feeding started. (Note that eventDateTime represents the end of feeding.)" + }, + "feedVisitDuration": { + "$ref": "../types/icarFeedDurationType.json", + "description": "The length of time of the feeding." + }, + "feedPerAnimal": { + "type": "array", + "items": { + "$ref": "../types/icarConsumedFeedType.json", + "description": "Gives the feed offered to and consumed per animal (average)." + } + }, + "rationPerAnimal": { + "type": "array", + "items": { + "$ref": "../types/icarConsumedRationType.json", + "description": "Gives the ration offered to and consumed per animal (average)." + } + }, + "device": { + "$ref": "../types/icarDeviceReferenceType.json", + "description": "Optional information about a device used for the feeding, if relevant." + } + } +} From 957b370164bf805b4649081fa35736e485acd7fc Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:27:00 +0100 Subject: [PATCH 028/108] Correct paths --- types/icarFeedReferenceType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarFeedReferenceType.json b/types/icarFeedReferenceType.json index c6c83d0..3386511 100644 --- a/types/icarFeedReferenceType.json +++ b/types/icarFeedReferenceType.json @@ -13,7 +13,7 @@ "description": "Defines the category of the feed product." }, "type": { - "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/types/icarFeedIdentifierType.json", + "$ref": "../types/icarFeedIdentifierType.json", "description": "The scheme + id identifying the type of feed." } } From e2339deb63fb48b31f7f7a2a84ae2133499e2393 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:28:11 +0100 Subject: [PATCH 029/108] Correct path in types/icarFeedReferenceType.json --- types/icarFeedReferenceType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarFeedReferenceType.json b/types/icarFeedReferenceType.json index 3386511..ba4e22d 100644 --- a/types/icarFeedReferenceType.json +++ b/types/icarFeedReferenceType.json @@ -9,7 +9,7 @@ "type": "object", "properties": { "category": { - "$ref": "https://raw.githubusercontent.com/Pure-Farming/ICAR/ADE-1/enums/icarFeedCategoryType.json", + "$ref": "../enums/icarFeedCategoryType.json", "description": "Defines the category of the feed product." }, "type": { From 45661402ab757fe2a4687272b0817d78f5ba51c5 Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:33:32 +0100 Subject: [PATCH 030/108] Added icarReproHeatWindowType.json --- types/icarReproHeatWindowType.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 types/icarReproHeatWindowType.json 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 From 33b41b097a260897d30e8a22dff748029742ea8f Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:37:15 +0100 Subject: [PATCH 031/108] Update icarReproHeatEventResource.json Added optimumBreedingWindow, commencementDateTime and deviceHeatProbability --- resources/icarReproHeatEventResource.json | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/resources/icarReproHeatEventResource.json b/resources/icarReproHeatEventResource.json index d219404..3dc459c 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,6 +39,17 @@ } } }, + "optimumInseminationWindow": { + "type": "array", + "description": "Details of the optimum breeding windows", + "items": { + "$ref": "../types/icarReproHeatWindowType.json" + } + }, + "deviceHeatProbability": { + "$ref": "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", @@ -69,4 +85,4 @@ } } ] -} \ No newline at end of file +} From 425484c1b8a076f2684cec8b054b1ab938534f8c Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:41:40 +0100 Subject: [PATCH 032/108] Update icarReproHeatCertaintyType.json Added "Potential" --- enums/icarReproHeatCertaintyType.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/enums/icarReproHeatCertaintyType.json b/enums/icarReproHeatCertaintyType.json index d5b63f2..05e8f77 100644 --- a/enums/icarReproHeatCertaintyType.json +++ b/enums/icarReproHeatCertaintyType.json @@ -5,6 +5,7 @@ "enum": [ "InHeat", - "Suspect" + "Suspect", + "Potential" ] -} \ No newline at end of file +} From b3bec7c6e834cf7f3edfc8a86a1893483067cf53 Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:42:50 +0100 Subject: [PATCH 033/108] Update icarReproHeatIntensityType.json Updated description --- enums/icarReproHeatIntensityType.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +} From e0ba68c72b3966f4679b0aab6f0388bd504ebdcc Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:43:45 +0100 Subject: [PATCH 034/108] Update icarReproHeatDetectionMethodType.json Added collar, eartag and bolus --- enums/icarReproHeatDetectionMethodType.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 +} From da0f024c2740de5d0ad470d9719441ef8f4486d9 Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Wed, 28 Jun 2023 17:32:51 +0100 Subject: [PATCH 035/108] Update icarReproHeatCertaintyType.json changed description --- enums/icarReproHeatCertaintyType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enums/icarReproHeatCertaintyType.json b/enums/icarReproHeatCertaintyType.json index 05e8f77..4262344 100644 --- a/enums/icarReproHeatCertaintyType.json +++ b/enums/icarReproHeatCertaintyType.json @@ -1,5 +1,5 @@ { - "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", From 793a3134a5fce20d3c4a80907e6e962771581d27 Mon Sep 17 00:00:00 2001 From: cvigorsICBF <70528846+cvigorsICBF@users.noreply.github.com> Date: Thu, 29 Jun 2023 17:37:48 +0100 Subject: [PATCH 036/108] Update icarReproHeatEventResource.json Added deprecated: true to heatReportNedapCowControl and heatReportScrSenseTime --- resources/icarReproHeatEventResource.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/icarReproHeatEventResource.json b/resources/icarReproHeatEventResource.json index 3dc459c..efff7a1 100644 --- a/resources/icarReproHeatEventResource.json +++ b/resources/icarReproHeatEventResource.json @@ -53,6 +53,7 @@ "heatReportScrSenseTime": { "type": "object", "description": "Specific info when the heat was detected by SenseTime from SCR", + "deprecated": true, "properties": { "breedingWindow": { "type": "integer", @@ -67,6 +68,7 @@ "heatReportNedapCowControl": { "type": "object", "description": "Specific info when the heat was detected by CowControl from NEDAP", + "deprecated": true, "properties": { "expirationDateTime": { "$ref": "../types/icarDateTimeType.json", From 1f562ea5ab22f8028c441b59c9f7c1c2cbb5cf1c Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Wed, 5 Jul 2023 08:58:02 +0200 Subject: [PATCH 037/108] Update icarMilkPredictionResource.json The peak production prediction is expanded with kg fat and kg protein --- resources/icarMilkPredictionResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/icarMilkPredictionResource.json b/resources/icarMilkPredictionResource.json index b538df8..3939f35 100644 --- a/resources/icarMilkPredictionResource.json +++ b/resources/icarMilkPredictionResource.json @@ -16,7 +16,7 @@ "description": "The days in milk in a lactation when the peak production is expected to occur." }, "lactationPeakProduction": { - "$ref": "../types/icarMilkingMilkWeightType.json" + "$ref": "../types/icarMilkingPredictionType.json" }, "predictedProductionNextMR": { "$ref": "../types/icarMilkingPredictionType.json" From a7783e7cc31f49c3f6054d46bffa273b33323f3c Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:18:50 +1200 Subject: [PATCH 038/108] Correct typo in icarReproHeatEventResource.json Corrected the definition of `deviceHeatProbability` to be a number, format integer. --- resources/icarReproHeatEventResource.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/icarReproHeatEventResource.json b/resources/icarReproHeatEventResource.json index efff7a1..90258b1 100644 --- a/resources/icarReproHeatEventResource.json +++ b/resources/icarReproHeatEventResource.json @@ -47,7 +47,8 @@ } }, "deviceHeatProbability": { - "$ref": "integer", + "type": "number", + "format": "integer", "description": "The manufacturer specific indication for the certainty of the heat" }, "heatReportScrSenseTime": { From 13fd8c2f8a18f884943e5f88bb3aa0eb6411a50c Mon Sep 17 00:00:00 2001 From: cookeac Date: Mon, 10 Jul 2023 17:29:56 +1200 Subject: [PATCH 039/108] Add inventory transactions to URL schemes Inventory transactions are already in the example URL scheme. Adding the medicines ones to the health scheme, and the feed ones to the feed scheme. --- url-schemes/feedURLscheme.json | 245 ++++++++++++++++++++++++++++++- url-schemes/healthURLScheme.json | 224 +++++++++++++++++++++++++++- 2 files changed, 466 insertions(+), 3 deletions(-) diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index adf5fae..cf7fe39 100644 --- a/url-schemes/feedURLscheme.json +++ b/url-schemes/feedURLscheme.json @@ -597,6 +597,123 @@ } } }, + "/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.3-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.3-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" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/feeds": { "post": { "operationId": "post-batch-feeds", @@ -971,6 +1088,81 @@ } } } + }, + "/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.3-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" + } + } + } + } + } + } } }, "components": { @@ -1043,7 +1235,19 @@ }, "icarFeedReportCollection": { "$ref": "../collections/icarFeedReportCollection.json" - } + }, + "icarFeedTransactionResource": { + "$ref": "../resources/icarFeedTransactionResource.json" + }, + "icarFeedTransactionCollection": { + "$ref": "../collections/icarFeedTransactionCollection.json" + }, + "icarFeedTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarFeedTransactionResource" + } + } }, "parameters": { "location-scheme": { @@ -1099,7 +1303,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..c5814a1 100644 --- a/url-schemes/healthURLScheme.json +++ b/url-schemes/healthURLScheme.json @@ -475,6 +475,105 @@ } } }, + "/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.3-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.3-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/icarHealthStatusObservedEvent" + } + } + } + }, + "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", @@ -849,6 +948,81 @@ } } } + }, + "/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.3-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" + } + } + } + } + } + } } }, "components": { @@ -918,7 +1092,19 @@ "items": { "$ref": "../resources/icarHealthStatusObservedEventResource.json" } - } + }, + "icarMedicineTransactionResource": { + "$ref": "../resources/icarMedicineTransactionResource.json" + }, + "icarMedicineTransactionCollection": { + "$ref": "../collections/icarMedicineTransactionCollection.json" + }, + "icarMedicineTransactionArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarMedicineTransactionResource" + } + } }, "parameters": { "location-scheme": { @@ -956,6 +1142,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": { From b5ab155e2bf950b43bcba329329b4d681699dfe1 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Fri, 28 Jul 2023 08:35:48 +0200 Subject: [PATCH 040/108] Update exampleUrlScheme.json added service-sires --- url-schemes/exampleUrlScheme.json | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 6e37583..c708a27 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -717,6 +717,38 @@ } } }, + "/service-sires": { + "get": { + "operationId": "get-service-sires", + "summary": "Get the service sires", + "description": "# Purpose\nProvides the service sires\n", + "tags": [ + "ADE-1.3-registration" + ], + "parameters": [{ + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animals for the given location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalCoreCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/locations/{location-scheme}/{location-id}/statistics": { "get": { "operationId": "get-statistics", @@ -2610,6 +2642,24 @@ "type": "string" } }, + "identifier": { + "name": "identifier", + "in": "query", + "description": "The identifier of an animal.", + "required": true, + "schema": { + "type": "string" + } + }, + "identifier-scheme": { + "name": "identifier-scheme", + "in": "query", + "description": "The scheme id for the animal identifier..", + "required": true, + "schema": { + "type": "string" + } + }, "meta-modified-from": { "name": "meta-modified-from", "in": "query", From efa2e82ad3b2b598def3a5129bf8da68df6ca52e Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Fri, 28 Jul 2023 08:42:16 +0200 Subject: [PATCH 041/108] Update exampleUrlScheme.json seems identifier-scheme already existed ;-) --- url-schemes/exampleUrlScheme.json | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index c708a27..37aba9a 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -729,7 +729,7 @@ "$ref": "#/components/parameters/identifier-scheme" }, { - "$ref": "#/components/parameters/identifier" + "$ref": "#/components/parameters/identifier-id" } ], "responses": { @@ -2642,24 +2642,6 @@ "type": "string" } }, - "identifier": { - "name": "identifier", - "in": "query", - "description": "The identifier of an animal.", - "required": true, - "schema": { - "type": "string" - } - }, - "identifier-scheme": { - "name": "identifier-scheme", - "in": "query", - "description": "The scheme id for the animal identifier..", - "required": true, - "schema": { - "type": "string" - } - }, "meta-modified-from": { "name": "meta-modified-from", "in": "query", From 1baf688dfd01a68f8f988fbff7adf0ca9d6ddfb2 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck Date: Fri, 28 Jul 2023 08:48:11 +0200 Subject: [PATCH 042/108] Update exampleUrlScheme.json tweaked some swagger comments --- url-schemes/exampleUrlScheme.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 37aba9a..1b88847 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -719,8 +719,8 @@ }, "/service-sires": { "get": { - "operationId": "get-service-sires", - "summary": "Get the service sires", + "operationId": "get-service-sires for a given id", + "summary": "Get the service sires matching your query parameters", "description": "# Purpose\nProvides the service sires\n", "tags": [ "ADE-1.3-registration" @@ -734,7 +734,7 @@ ], "responses": { "200": { - "description": "Successful. The response contains the animals for the given location", + "description": "Successful. The response contains the service sires matching your query parameters", "content": { "application/json": { "schema": { From 9cce289b7046188ca324a0be2029e145578118f5 Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Wed, 2 Aug 2023 16:24:39 +1200 Subject: [PATCH 043/108] Update icarProductFamilyType.json Add "Fuel" and "Other" to icarProductFamilyType enumeration. --- enums/icarProductFamilyType.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/enums/icarProductFamilyType.json b/enums/icarProductFamilyType.json index 894bba6..5e5aad0 100644 --- a/enums/icarProductFamilyType.json +++ b/enums/icarProductFamilyType.json @@ -11,6 +11,8 @@ "Other Animal Products", "Milking Supplies", "Fencing Supplies", - "Water System Supplies" + "Water System Supplies", + "Fuel", + "Other' ] -} \ No newline at end of file +} From 80ec70f8aecac1b1b267a6ffac2f4a6ba4969061 Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Wed, 2 Aug 2023 16:41:01 +1200 Subject: [PATCH 044/108] Update enums/icarProductFamilyType.json Co-authored-by: Andrew Cooke <45248509+cookeac@users.noreply.github.com> --- enums/icarProductFamilyType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enums/icarProductFamilyType.json b/enums/icarProductFamilyType.json index 5e5aad0..f92fed7 100644 --- a/enums/icarProductFamilyType.json +++ b/enums/icarProductFamilyType.json @@ -13,6 +13,6 @@ "Fencing Supplies", "Water System Supplies", "Fuel", - "Other' + "Other" ] } From f2b58879b949ef8eaf31e13b375b89f49409bb9f Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:00:17 +0200 Subject: [PATCH 045/108] Update exampleUrlScheme.json corrected operation id --- url-schemes/exampleUrlScheme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 1b88847..2d0a55b 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -719,7 +719,7 @@ }, "/service-sires": { "get": { - "operationId": "get-service-sires for a given id", + "operationId": "get-service-sires", "summary": "Get the service sires matching your query parameters", "description": "# Purpose\nProvides the service sires\n", "tags": [ From 6232f0a6be8fb67412ca2db3e35c9212335db50d Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 10 Aug 2023 18:01:41 +1200 Subject: [PATCH 046/108] Add icarAttentionEventResource Add icarAttentionEventResource and associated enumerations. TODO: Add to Example URL Scheme. Resolves #393 --- enums/icarAttentionCategoryType.json | 12 ++++++++ enums/icarAttentionCauseType.json | 28 ++++++++++++++++++ enums/icarAttentionPriorityType.json | 12 ++++++++ resources/icarAttentionEventResource.json | 36 +++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 enums/icarAttentionCategoryType.json create mode 100644 enums/icarAttentionCauseType.json create mode 100644 enums/icarAttentionPriorityType.json create mode 100644 resources/icarAttentionEventResource.json diff --git a/enums/icarAttentionCategoryType.json b/enums/icarAttentionCategoryType.json new file mode 100644 index 0000000..73bae78 --- /dev/null +++ b/enums/icarAttentionCategoryType.json @@ -0,0 +1,12 @@ +{ + "description": "Defines a category of device messages that may allow filtering of alerts.", + + "type": "string", + + "enum": [ + "Behaviour", + "Environment", + "Health", + "Other" + ] + } \ No newline at end of file diff --git a/enums/icarAttentionCauseType.json b/enums/icarAttentionCauseType.json new file mode 100644 index 0000000..4fd5604 --- /dev/null +++ b/enums/icarAttentionCauseType.json @@ -0,0 +1,28 @@ +{ + "description": "Defines causes of alerts from devices.", + + "type": "string", + + "enum": [ + "Activity", + "AnimalTemperature", + "Eating", + "EnvironmentTemperature", + "Disturbance", + "Health", + "Inactivity", + "Ketosis", + "Location", + "LyingTooLong", + "LyingTooShort", + "Mastitis", + "Parturition", + "PostParturition", + "ProlongedParturition", + "Rumination", + "Standing", + "StandingUp", + "Walking", + "Undefined" + ] + } \ No newline at end of file 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/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json new file mode 100644 index 0000000..cc3a30f --- /dev/null +++ b/resources/icarAttentionEventResource.json @@ -0,0 +1,36 @@ +{ + "description": "Extends icarEventCoreResource to add a single individual animal identifier.", + + "allOf": [ + { + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "type": "object", + "properties": { + "alertEndDateTime": { + "$ref": "../types/icarDateTimeType.json", + "nullable": true, + "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." + }, + "cause": { + "$ref": "../enums/icarAttentionCauseType.json", + "description": "The specific cause of the alert." + }, + "priority": { + "$ref": "../enums/icarAttentionPriorityType.json", + "description": "The relative priority of the alert." + }, + "device": { + "$ref": "../types/icarDeviceReferenceType.json", + "description": "Identifies the device that is raising the alert." + } + } + } + ] +} + \ No newline at end of file From 26436791bb3405041838f83a1fa67450457114c0 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 10 Aug 2023 19:04:16 +1200 Subject: [PATCH 047/108] Turn cause into causes and add required --- resources/icarAttentionEventResource.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json index cc3a30f..01c3b8e 100644 --- a/resources/icarAttentionEventResource.json +++ b/resources/icarAttentionEventResource.json @@ -1,5 +1,5 @@ { - "description": "Extends icarEventCoreResource to add a single individual animal identifier.", + "description": "Defines an alert for an animal that may require attention.", "allOf": [ { @@ -7,6 +7,9 @@ }, { "type": "object", + + "required" : ["category", "causes"], + "properties": { "alertEndDateTime": { "$ref": "../types/icarDateTimeType.json", @@ -17,9 +20,12 @@ "$ref": "../enums/icarAttentionCategoryType.json", "description": "A category that allows filtering of alerts by subject." }, - "cause": { - "$ref": "../enums/icarAttentionCauseType.json", - "description": "The specific cause of the alert." + "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", From 3562dd2fee6c03347caedce19bdbcd9d8d123875 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 10 Aug 2023 09:13:10 +0200 Subject: [PATCH 048/108] Update url-schemes/exampleUrlScheme.json Co-authored-by: Andrew Cooke <45248509+cookeac@users.noreply.github.com> --- url-schemes/exampleUrlScheme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 2d0a55b..5ba7c44 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -721,7 +721,7 @@ "get": { "operationId": "get-service-sires", "summary": "Get the service sires matching your query parameters", - "description": "# Purpose\nProvides the service sires\n", + "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.3-registration" ], From 3e14f123e89c2336961b159a9b728611e0586684 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 10 Aug 2023 09:15:43 +0200 Subject: [PATCH 049/108] Update url-schemes/exampleUrlScheme.json --- url-schemes/exampleUrlScheme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 5ba7c44..4136249 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -720,7 +720,7 @@ "/service-sires": { "get": { "operationId": "get-service-sires", - "summary": "Get the service sires matching your query parameters", + "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.3-registration" From e9ca400f8d50ebef4788c4833e6d716e1a41c62e Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:54:34 +1200 Subject: [PATCH 050/108] Update icarAnimalCoreResource.json Moved the description of "parentage" so that it is not under "items" and extended the description. --- resources/icarAnimalCoreResource.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/icarAnimalCoreResource.json b/resources/icarAnimalCoreResource.json index 9eebb1f..66ed107 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 +} From 004bcc7df36fd2222cee0c1e11d97a2e559d7a0a Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:57:45 +1200 Subject: [PATCH 051/108] Update icarGroupMovementBirthEventResource.json Added a description to "registrationReason" --- resources/icarGroupMovementBirthEventResource.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 +} From 6146194ff74efed3bb1795c60e3ad3c974e93faa Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:52:00 +1200 Subject: [PATCH 052/108] Update icarBreedFractionsType.json Descriptions added to "icarBreedFractionsType" and to the fields "fractions" and "breed". --- types/icarBreedFractionsType.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 +} From fe0479b49c9ae0117df6685e46275448ef81fc00 Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:54:13 +1200 Subject: [PATCH 053/108] Update icarCarcassMetricType.json Description added to "id" --- types/icarCarcassMetricType.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/icarCarcassMetricType.json b/types/icarCarcassMetricType.json index f2c30d2..490817b 100644 --- a/types/icarCarcassMetricType.json +++ b/types/icarCarcassMetricType.json @@ -5,7 +5,8 @@ "properties": { "id": { - "$ref": "../types/icarCarcassMetricIdentifierType.json" + "$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.", @@ -16,4 +17,4 @@ "type": "string" } } -} \ No newline at end of file +} From d42ba848de3ca6c942187da9db4b29a249cb71e0 Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Tue, 19 Sep 2023 12:57:19 +1200 Subject: [PATCH 054/108] Update icarConsignmentType.json Descriptions added to "originLocation" and "destinationLocation" --- types/icarConsignmentType.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/icarConsignmentType.json b/types/icarConsignmentType.json index c59179f..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.", @@ -25,7 +26,8 @@ "$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.", @@ -110,4 +112,4 @@ } } } -} \ No newline at end of file +} From e5c90635f4534c322e671e7bb66eed07edcaedb2 Mon Sep 17 00:00:00 2001 From: Wilson Date: Wed, 20 Sep 2023 11:38:21 +1200 Subject: [PATCH 055/108] Descriptions added or modified Most of the changes are adding descriptions where there were none. Also modified a small number where there was a spelling error or to expand the description. --- enums/icarPositionOnAnimalType.json | 2 +- resources/icarDeviceResource.json | 1 + resources/icarEventCoreResource.json | 2 +- resources/icarGroupMovementArrivalEventResource.json | 7 ++++--- resources/icarMovementArrivalEventResource.json | 9 ++++++--- resources/icarMovementBirthEventResource.json | 6 ++++-- resources/icarMovementDeathEventResource.json | 3 ++- resources/icarMovementDepartureEventResource.json | 9 ++++++--- resources/icarReproPregnancyCheckEventResource.json | 2 +- types/icarConsumedFeedType.json | 2 +- types/icarConsumedRationType.json | 2 +- types/icarDeviceReferenceType.json | 2 +- types/icarFeedDurationType.json | 3 ++- types/icarFeedQuantityType.json | 3 ++- types/icarMedicineReferenceType.json | 3 ++- types/icarPositionType.json | 2 +- types/icarStatisticsType.json | 5 +++-- 17 files changed, 39 insertions(+), 24 deletions(-) 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/resources/icarDeviceResource.json b/resources/icarDeviceResource.json index 53c5165..fc991d1 100644 --- a/resources/icarDeviceResource.json +++ b/resources/icarDeviceResource.json @@ -38,6 +38,7 @@ }, "supportedMessages": { "type": "array", + "description": "Identifies message types supported for the device", "items": { "type": "object", "properties": { 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/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/icarMovementArrivalEventResource.json b/resources/icarMovementArrivalEventResource.json index 6776804..501e238 100644 --- a/resources/icarMovementArrivalEventResource.json +++ b/resources/icarMovementArrivalEventResource.json @@ -9,13 +9,16 @@ "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." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal to the holding." } } } 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/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/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 9e2ac76..55452a0 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -12,7 +12,7 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to reveive" + "description": "The amount of feed the animal was entitled to receive" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index e7bec9e..2439a28 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -13,7 +13,7 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to reveive" + "description": "The amount of feed the animal was entitled to receive" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", diff --git a/types/icarDeviceReferenceType.json b/types/icarDeviceReferenceType.json index e8171c7..69f7766 100644 --- a/types/icarDeviceReferenceType.json +++ b/types/icarDeviceReferenceType.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Device reference details.", "allOf": [{ "$ref": "../types/icarResourceReferenceType.json" 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/icarMedicineReferenceType.json b/types/icarMedicineReferenceType.json index b14851b..60ee9d9 100644 --- a/types/icarMedicineReferenceType.json +++ b/types/icarMedicineReferenceType.json @@ -13,7 +13,8 @@ "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/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/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", From 6b9eed486d63db0f3253ff673d9ee5a88711f79c Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 21 Sep 2023 17:45:54 +1200 Subject: [PATCH 056/108] Extend causes enum, add deviceAttentionScore --- enums/icarAttentionCauseType.json | 13 ++++++++++--- resources/icarAttentionEventResource.json | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/enums/icarAttentionCauseType.json b/enums/icarAttentionCauseType.json index 4fd5604..e165947 100644 --- a/enums/icarAttentionCauseType.json +++ b/enums/icarAttentionCauseType.json @@ -6,23 +6,30 @@ "enum": [ "Activity", "AnimalTemperature", - "Eating", + "BodyCondition", + "EatingLess", "EnvironmentTemperature", "Disturbance", "Health", + "HeartRate", "Inactivity", "Ketosis", + "Lameness", "Location", + "LowerRumination", "LyingTooLong", "LyingTooShort", "Mastitis", + "MobilityScore", + "NoMovement", "Parturition", - "PostParturition", + "PostParturitionRisk", "ProlongedParturition", - "Rumination", + "RespirationRate", "Standing", "StandingUp", "Walking", + "Other", "Undefined" ] } \ No newline at end of file diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json index 01c3b8e..91b5800 100644 --- a/resources/icarAttentionEventResource.json +++ b/resources/icarAttentionEventResource.json @@ -31,6 +31,10 @@ "$ref": "../enums/icarAttentionPriorityType.json", "description": "The relative priority of the alert." }, + "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." From 03c58c1f6a31ffdcb107bfd1c7652563eda605ed Mon Sep 17 00:00:00 2001 From: Wilson Date: Tue, 26 Sep 2023 17:36:31 +1300 Subject: [PATCH 057/108] fix: value added to icarInventoryTransactionKindType Added value "Produce" to the enumeration icarInventoryTransactionKindType --- enums/icarInventoryTransactionKindType.json | 1 + 1 file changed, 1 insertion(+) diff --git a/enums/icarInventoryTransactionKindType.json b/enums/icarInventoryTransactionKindType.json index fd94266..65525e0 100644 --- a/enums/icarInventoryTransactionKindType.json +++ b/enums/icarInventoryTransactionKindType.json @@ -5,6 +5,7 @@ "Receipt", "Disposal", "OnHand", + "Produce", "StockTake", "Use" ] From 7211ae671dc9959944a10f34dc1e49602022d1cf Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Tue, 26 Sep 2023 17:39:30 +1300 Subject: [PATCH 058/108] Add a comma to fix error in icarAnimalCoreResource --- resources/icarAnimalCoreResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/icarAnimalCoreResource.json b/resources/icarAnimalCoreResource.json index 66ed107..d0b18ce 100644 --- a/resources/icarAnimalCoreResource.json +++ b/resources/icarAnimalCoreResource.json @@ -83,7 +83,7 @@ }, "parentage": { "type": "array", - "description": "Parents of the animal. The array can handle multiple generations by specifying the parent of a parent." + "description": "Parents of the animal. The array can handle multiple generations by specifying the parent of a parent.", "items": { "$ref": "../types/icarParentageType.json" } From c82749aa6299bc1a2230316e7ba41dc8ea14c53e Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 28 Sep 2023 17:34:52 +1300 Subject: [PATCH 059/108] Add reference to icarInventoryClassificationType --- types/icarInventoryClassificationType.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/icarInventoryClassificationType.json b/types/icarInventoryClassificationType.json index 3110fc3..f3c0b91 100644 --- a/types/icarInventoryClassificationType.json +++ b/types/icarInventoryClassificationType.json @@ -44,6 +44,10 @@ "description": "Array of production purposes.", "items": { "$ref": "../enums/icarProductionPurposeType.json" + }, + "reference": { + "type": "string", + "description": "An external reference (identifier or name) to further identify the group of animals." } } } From 70063a36355b4eb48e976c0ffb564982df8e3909 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 28 Sep 2023 17:37:49 +1300 Subject: [PATCH 060/108] Add dryMatterPercentage to consumed feed/rations --- types/icarConsumedFeedType.json | 4 ++++ types/icarConsumedRationType.json | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 9e2ac76..b538614 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -17,6 +17,10 @@ "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", "description": "The amount of feed the animal has consumed" + }, + "dryMatterPercentage": { + "type": "number", + "description": "The dry matter content of the feed provided or consumed, expressed as a percentage." } } } diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index e7bec9e..6e5d5eb 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 was entitled to. Amounts are real weights.", "type": "object", "required": [ @@ -18,6 +18,10 @@ "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", "description": "The amount of feed the animal has consumed" + }, + "dryMatterPercentage": { + "type": "number", + "description": "The dry matter content of the ration provided or consumed, expressed as a percentage." } } } From d0a256a8de1734998a5ebe87e16b1d894b52b7db Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 28 Sep 2023 17:47:32 +1300 Subject: [PATCH 061/108] icarGroupFeedingResource changes to match comments on #382 Update to match comments on #382 - Allow total as well as per-animal average feed and ration quantities - Remove start date-time and duration - eventDateTime is now start of feed availability for animals. - feedingEndingDateTime is time feed is no longer available for animals. --- resources/icarGroupFeedingEventResource.json | 26 ++++++++++++-------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/resources/icarGroupFeedingEventResource.json b/resources/icarGroupFeedingEventResource.json index bed70ce..f754a17 100644 --- a/resources/icarGroupFeedingEventResource.json +++ b/resources/icarGroupFeedingEventResource.json @@ -6,18 +6,10 @@ "$ref": "../resources/icarGroupEventCoreResource.json" } ], - "required": [ - "feedingStartingDateTime", - "feedVisitDuration" - ], "properties": { - "feedingStartingDateTime": { + "feedingEndingDateTime": { "$ref": "../types/icarDateTimeType.json", - "description": "The RFC3339 UTC moment the feeding started. (Note that eventDateTime represents the end of feeding.)" - }, - "feedVisitDuration": { - "$ref": "../types/icarFeedDurationType.json", - "description": "The length of time of the feeding." + "description": "The RFC3339 UTC moment from which animals could no longer consume the feed (eventDateTime represents the start of feed availability)." }, "feedPerAnimal": { "type": "array", @@ -26,6 +18,13 @@ "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": { @@ -33,6 +32,13 @@ "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." From d7406da339c066a06226f12abc5956a66412fc2a Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 28 Sep 2023 17:58:13 +1300 Subject: [PATCH 062/108] Fix icarInventoryClassificationType --- types/icarInventoryClassificationType.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/icarInventoryClassificationType.json b/types/icarInventoryClassificationType.json index f3c0b91..10153de 100644 --- a/types/icarInventoryClassificationType.json +++ b/types/icarInventoryClassificationType.json @@ -44,11 +44,11 @@ "description": "Array of production purposes.", "items": { "$ref": "../enums/icarProductionPurposeType.json" - }, - "reference": { - "type": "string", - "description": "An external reference (identifier or name) to further identify the group of animals." } + }, + "reference": { + "type": "string", + "description": "An external reference (identifier or name) to further identify the group of animals." } } } \ No newline at end of file From bd294fe95f20bdccb034d24881b5af2334ad4779 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 28 Sep 2023 18:03:03 +1300 Subject: [PATCH 063/108] Add URL schemes for Group Feeding Events Add URL Schemes for `icarGroupFeedingEventResource` to exampleURLScheme and feedURLscheme. --- .../icarGroupFeedingEventCollection.json | 21 ++ url-schemes/exampleUrlScheme.json | 42 ++++ url-schemes/feedURLscheme.json | 194 +++++++++++++++++- 3 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 collections/icarGroupFeedingEventCollection.json 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/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index ec7b2d1..b232107 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -1658,6 +1658,45 @@ } } }, + "/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.3-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", @@ -2372,6 +2411,9 @@ "icarFeedIntakeEventCollection": { "$ref": "../collections/icarFeedIntakeEventCollection.json" }, + "icarGroupFeedingEventCollection": { + "$ref": "../collections/icarGroupFeedingEventCollection.json" + }, "icarFeedReportCollection": { "$ref": "../collections/icarFeedReportCollection.json" }, diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index adf5fae..dace999 100644 --- a/url-schemes/feedURLscheme.json +++ b/url-schemes/feedURLscheme.json @@ -597,6 +597,111 @@ } } }, + "/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.3-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.3-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/icarFeedIntakeEventResource" + } + } + } + }, + "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", @@ -971,6 +1076,81 @@ } } } + }, + "/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.3-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 +1223,19 @@ }, "icarFeedReportCollection": { "$ref": "../collections/icarFeedReportCollection.json" - } + }, + "icarGroupFeedingEventResource": { + "$ref": "../resources/icarGroupFeedingEventResource.json" + }, + "icarGroupFeedingEventCollection": { + "$ref": "../collections/icarGroupFeedingEventCollection.json" + }, + "icarGroupFeedingEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } }, "parameters": { "location-scheme": { From 99a3d59bfba45cca058ccf7853496a5b3023a27d Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 28 Sep 2023 18:15:44 +1300 Subject: [PATCH 064/108] Merge with feed inventory transaction URL scheme --- url-schemes/feedURLscheme.json | 243 ++++++++++++++++++++++++++++++++- 1 file changed, 242 insertions(+), 1 deletion(-) diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index dace999..38cff21 100644 --- a/url-schemes/feedURLscheme.json +++ b/url-schemes/feedURLscheme.json @@ -597,6 +597,123 @@ } } }, + "/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.3-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.3-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", @@ -1077,6 +1194,81 @@ } } }, + "/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.3-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", @@ -1224,6 +1416,18 @@ "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" }, @@ -1291,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": { From 882eec9881d61cb62c93e6802b6488d854b878be Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:47:41 +1300 Subject: [PATCH 065/108] Rename feedingEndingDateTime to feedingEndDateTime (it was a typo converting from StartingDateTime. --- resources/icarGroupFeedingEventResource.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/icarGroupFeedingEventResource.json b/resources/icarGroupFeedingEventResource.json index f754a17..add60de 100644 --- a/resources/icarGroupFeedingEventResource.json +++ b/resources/icarGroupFeedingEventResource.json @@ -7,7 +7,8 @@ } ], "properties": { - "feedingEndingDateTime": { + "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)." }, From b9652f2ef4c735296b713bc353b9e7562d71b43f Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:57:26 +1300 Subject: [PATCH 066/108] Correct group feeding POST body content Correct from `icarFeedIntakeEventResource` to `icarGroupFeedingEventResource`. --- url-schemes/feedURLscheme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index 38cff21..3f02ba8 100644 --- a/url-schemes/feedURLscheme.json +++ b/url-schemes/feedURLscheme.json @@ -773,7 +773,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarFeedIntakeEventResource" + "$ref": "#/components/schemas/icarGroupFeedingEventResource" } } } From 9832af352b313f9aa29627c1ec1612107150a9c9 Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 19 Oct 2023 21:21:03 +1300 Subject: [PATCH 067/108] Add severity to icarAttentionEventResource Add an optional `severity` field that has the same values as that used in disease diagnosis. --- resources/icarAttentionEventResource.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json index 91b5800..958b8ee 100644 --- a/resources/icarAttentionEventResource.json +++ b/resources/icarAttentionEventResource.json @@ -31,6 +31,10 @@ "$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." From b5ea2678b7d0f1f59658e01a5c430c0a86720e14 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Wed, 25 Oct 2023 13:47:46 +1300 Subject: [PATCH 068/108] Add resourceType column to resourceTypeCatalog.md Add a resourceType column to the ICAR Resource Type Catalog list, to avoid confusion about what value should be implemented in the OpenAPI `resourceType` discriminator. Also add the new resource types that are in the Develop branch. Resolves #426 --- resources/resourceTypeCatalog.md | 108 +++++++++++++++++++------------ 1 file changed, 65 insertions(+), 43 deletions(-) diff --git a/resources/resourceTypeCatalog.md b/resources/resourceTypeCatalog.md index 1c0eaf6..5f4d50f 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, URI, `resourceType` discriminator link to resource resource type in github. To help with readability and conciseness the URIs are represnted as CURIs (concise URIs) where the prefix is: @@ -13,46 +13,68 @@ 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 | URI | Discriminator (resourceType) | JSON Resource Type Definition +--- | --- | --- | --- +Animal | icar:Animal | icarAnimalCoreResource | icarAnimalCoreResource.json +AnimalSetJoinEvent | icar:AnimalSetJoinEvent | icarAnimalSetJoinEventResource | icarAnimalSetJoinEventResource.json +AnimalSetLeaveEvent | icar:AnimalSetLeaveEvent | icarAnimalSetLeaveEventResource | icarAnimalSetLeaveEventResource.json +AnimalSet | icar:AnimalSet | icarAnimalSetResource | icarAnimalSetResource.json +BreedingValue | icar:BreedingValue | icarBreedingValueResource | icarBreedingValueResource.json +CarcassObservationsEvent | icar:CarcassObservations | icarCarcassObservationsEventResource | icarCarcassObservationsEventResource.json +Carcass | icar:Carcass | icarCarcassResource | icarCarcassResource.json +ConformationScoreEvent | icar:ConformationScoreEvent | icarConformationScoreEventResource | icarConformationScoreEventResource.json +DailyMilkingAverages | icar:DailyMilkingAverages | icarDailyMilkingAveragesResource | icarDailyMilkingAveragesResource.json +Device | icar:Device | icarDeviceResource | icarDeviceResource.json +DiagnosisEvent | icar:DiagnosisEvent | icarDiagnosisEventResource | icarDiagnosisEventResource.json +FeedIntakeEvent | icar:FeedIntakeEvent | icarFeedIntakeEventResource | icarFeedIntakeEventResource.json +FeedRecommendation | icar:FeedRecommendation | icarFeedRecommendationResource | icarFeedRecommendationResource.json +FeedReport | icar:FeedReport | icarFeedReportResource | icarFeedReportResource.json +Feed | icar:Feed | icarFeedResource | icarFeedResource.json +FeedStorage | icar:FeedStorage | icarFeedStorageResource | icarFeedStorageResource.json +Gestation | icar:Gestation | icarGestationResource | icarGestationResource.json +GroupFeedingEvent | icar:GroupFeedingEvent | icarGroupFeedingEventResource | icarGroupFeedingEventResource.json +GroupMovementArrivalEvent | icar:GroupMovementArrivalEvent | icarGroupMovementArrivalEventResource | icarGroupMovementArrivalEventResource.json +GroupMovementBirthEvent | icar:GroupMovementBirthEvent | icarGroupMovementBirthEventResource | icarGroupMovementBirthEventResource.json +GroupMovementDeathEvent | icar:GroupMovementDeathEvent | icarGroupMovementDeathEventResource | icarGroupMovementDeathEventResource.json +GroupMovementDepartureEvent | icar:GroupMovementDepartureEvent | icarGroupMovementDepartureEventResource | icarGroupMovementDepartureEventResource.json +GroupTreatmentEvent | icar:GroupTreatmentEvent | icarGroupTreatmentEventResource | icarGroupTreatmentEventResource.json +GroupWeightEvent | icar:GroupWeightEvent | icarGroupWeightEventResource | icarGroupWeightEventResource.json +HealthStatusObservedEvent | icar:HealthStatusObservedEvent | icarHealthStatusObservedEventResource | icarHealthStatusObservedEventResource.json +InventoryTransaction | icar:InventoryTransaction | icarInventoryTransactionResource | icarInventoryTransactionResource.json +Lactation | icar:Lactation | icarLactationResource| icarLactationResource.json +LactationStatusObservedEvent | icar:LactationStatusObservedEvent | icarLactationStatusObservedEventResource | icarLactationStatusObservedEventResource.json +Location | icar:Location | icarLocationResource | icarLocationResource.json +Medicine | icar:Medicine | icarMedicineResource | icarMedicineResource.json +MedicineTransaction | icar:MedicineTransaction | icarMedicineTransactionResource | icarMedicineTransactionResource.json +MilkPrediction | icar:MilkPrediction | icarMilkPredictionResource | icarMilkPredictionResource.json +MilkingDryOffEvent | icar:MilkingDryOffEvent | icarMilkingDryOffEventResource | icarMilkingDryOffEventResource.json +MilkingVisitEvent | icar:MilkingVisitEvent | icarMilkingVisitEventResource | icarMilkingVisitEventResource.json +MovementArrivalEvent | icar:MovementArrivalEvent | icarMovementArrivalEventResource | icarMovementArrivalEventResource.json +MovementBirthEvent | icar:MovementBirthEvent | icarMovementBirthEventResource | icarMovementBirthEventResource.json +MovementDeathEvent | icar:MovementDeathEvent | icarMovementDeathEventResource | icarMovementDeathEventResource.json +MovementDepartureEvent | icar:MovementDepartureEvent | icarMovementDepartureEventResource| icarMovementDepartureEventResource.json +ProcessingLot | icar:ProcessingLot | icarProcessingLotResource | icarProcessingLotResource.json +ProgenyDetails | icar:ProgenyDetails | icarProgenyDetailsResource | icarProgenyDetailsResource.json +Ration | icar:Ration | icarRationResource | icarRationResource.json +ReproAbortionEvent | icar:ReproAbortionEvent | icarReproAbortionEventResource | icarReproAbortionEventResource.json +ReproDoNotBreedEvent | icar:ReproDoNotBreedEvent | icarReproDoNotBreedEventResource | icarReproDoNotBreedEventResource.json +ReproEmbryoFlushingEvent | icar:ReproEmbryoFlushingEvent | icarReproEmbryoFlushingEventResource | icarReproEmbryoFlushingEventResource.json +ReproEmbryo | icar:ReproEmbryo | icarReproEmbryoResource | icarReproEmbryoResource.json +ReproHeatEvent | icar:ReproHeatEvent | icarReproHeatEventResource | icarReproHeatEventResource.json +ReproInseminationEvent | icar:ReproInsemonationEvent | icarReproInsemonationEventResource | icarReproInsemonationEventResource.json +ReproMatingRecommendation | icar:ReproMatingRecommendation | icarReproMatingRecommendationResource | icarReproMatingRecommendationResource.json +ReproParturitionEvent | icar:ReproParturitionEvent | icarReproParturitionEventResource | icarReproParturitionEventResource.json +ReproPregnancyCheckEvent | icar:ReproPregnancyCheckEvent | icarReproPregnancyCheckEventResource | icarReproPregnancyCheckEventResource.json +ReproSemenStraw | icar:ReproSemenStraw | icarReproSemenStrawResource | icarReproSemenStrawResource.json +ReproStatusObservedEvent | icar:ReproStatusObservedEvent | icarReproStatusObservedEventResource | icarReproStatusObservedEventResource.json +SchemeType | icar:SchemeType | icarSchemeTypeResource | icarSchemeTypeResource.json +SchemeValue | icar:SchemeValue | icarSchemeValueResource | icarSchemeValueResource.json +Statistics | icar:Statistics | icarStatisticsResource | icarStatisticsResource.json +TestDay | icar:TestDay | icarTestDayResource | icarTestDayResource.json +TestDayResult | icar:TestDayResult | icarTestDayResultResource | icarTestDayResultResource.json +TreatmentEvent | icar:TreatmentEvent | icarTreatmentEventResource | icarTreatmentEventResource.json +TreatmentProgramEvent | icar:TreatmentProgramEvent | icarTreatmentProgramEventResource | icarTreatmentProgramEventResource.json +WeightEvent | icar:WeightEvent | icarWeightEventResource| icarWeightEventResource.json +WithdrawalEvent | icar:WithdrawalEvent | icarWithdrawalEventResource | icarWithdrawalEventResource.json + From 60f66f90adb49b19e61756f783ed81ef88e7fedc Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:54:55 +1300 Subject: [PATCH 069/108] Add collection and insert into health URL scheme --- collections/icarAttentionEventCollection.json | 21 ++ url-schemes/healthURLScheme.json | 190 +++++++++++++++++- 2 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 collections/icarAttentionEventCollection.json 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/url-schemes/healthURLScheme.json b/url-schemes/healthURLScheme.json index c5814a1..ee0883a 100644 --- a/url-schemes/healthURLScheme.json +++ b/url-schemes/healthURLScheme.json @@ -557,7 +557,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarHealthStatusObservedEvent" + "$ref": "#/components/schemas/icarMedicineTransactionResource" } } } @@ -574,6 +574,105 @@ } } }, + "/locations/{location-scheme}/{location-id}/attention-event": { + "get": { + "operationId": "get-attention-event", + "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.3-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.3-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", @@ -1023,6 +1122,81 @@ } } } + }, + "/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.3-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": { @@ -1104,7 +1278,19 @@ "items": { "$ref": "#/components/schemas/icarMedicineTransactionResource" } - } + }, + "icarAttentionEventResource": { + "$ref": "../resources/icarAttentionEventResource.json" + }, + "icarAttentionEventCollection": { + "$ref": "../collections/icarAttentionEventCollection.json" + }, + "icarAttentionEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } + } }, "parameters": { "location-scheme": { From 8d2cebb18ea1b57082ab6a14f9e948fb30f9fa9d Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:05:15 +1300 Subject: [PATCH 070/108] Added attention events to example URL scheme --- url-schemes/exampleUrlScheme.json | 56 ++++++++++++++++++++++++++++++- url-schemes/healthURLScheme.json | 4 +-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 6e37583..3e7122d 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -2363,7 +2363,7 @@ "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.3-management" + "ADE-1.3-health" ], "parameters": [ { @@ -2407,6 +2407,57 @@ } } } + }, + "/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.3-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" + } + } + } } }, "components": { @@ -2584,6 +2635,9 @@ }, "icarMedicineTransactionCollection": { "$ref": "../collections/icarMedicineTransactionCollection.json" + }, + "icarAttentionEventCollection": { + "$ref": "../collections/icarAttentionEventCollection.json" } }, "parameters": { diff --git a/url-schemes/healthURLScheme.json b/url-schemes/healthURLScheme.json index ee0883a..5162ba3 100644 --- a/url-schemes/healthURLScheme.json +++ b/url-schemes/healthURLScheme.json @@ -574,9 +574,9 @@ } } }, - "/locations/{location-scheme}/{location-id}/attention-event": { + "/locations/{location-scheme}/{location-id}/attention-events": { "get": { - "operationId": "get-attention-event", + "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": [ From 1ee9e1b7d219e6b259ceb581866ac1fba6cad9d1 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:25:06 +1300 Subject: [PATCH 071/108] Add manufacturer and registration to device reference --- resources/icarDeviceResource.json | 4 ++++ types/icarDeviceReferenceType.json | 8 ++++++++ types/icarDeviceRegistrationIdentifierType.json | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 types/icarDeviceRegistrationIdentifierType.json diff --git a/resources/icarDeviceResource.json b/resources/icarDeviceResource.json index fc991d1..86555ae 100644 --- a/resources/icarDeviceResource.json +++ b/resources/icarDeviceResource.json @@ -51,6 +51,10 @@ "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)." } } } \ No newline at end of file diff --git a/types/icarDeviceReferenceType.json b/types/icarDeviceReferenceType.json index 69f7766..291c711 100644 --- a/types/icarDeviceReferenceType.json +++ b/types/icarDeviceReferenceType.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 From a51ebb81c5f90eb50451a181392530b6c4178866 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:32:41 +1300 Subject: [PATCH 072/108] Add well-known markdown file. --- well-known/icarDeviceRegistrationIdentifierType.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 well-known/icarDeviceRegistrationIdentifierType.md 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. | + From 25c0ce544ebda9a96eb626d83d74b9256218df4d Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 16 Nov 2023 21:08:00 +1300 Subject: [PATCH 073/108] Update descriptions re meta and sourceId Update the descriptions of meta and sourceId to show that they SHOULD be filled, stored, and retained if at all possible. Will be required in future major release. Resolves #366 (sort of) --- resources/icarResource.json | 3 ++- types/icarMetaDataType.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/icarResource.json b/resources/icarResource.json index 0decd45..c9c73da 100644 --- a/resources/icarResource.json +++ b/resources/icarResource.json @@ -22,7 +22,8 @@ }, "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.", + "$comment": "ICAR ADE working group intend meta to be required in the next major release of ADE." }, "location": { "$ref": "../types/icarLocationIdentifierType.json", diff --git a/types/icarMetaDataType.json b/types/icarMetaDataType.json index 88bdab0..89ebe31 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -14,7 +14,8 @@ }, "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 or composite ID if needed) for the resource in the original source system. \n Systems are expected to populate, store, and return sourceId if at all possible.", + "$comment": "ICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release." }, "isDeleted": { "type": "boolean", From 77453c11b2bf48c96460d271288ce8bf0cc3fb10 Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 16 Nov 2023 21:52:26 +1300 Subject: [PATCH 074/108] Define position observations Define position observation events (group and animal) that allow you to record that an animal (or group/mob) was seen (observed) at a given named position or geospatial location. Resolves #383 --- ...oupPositionObservationEventCollection.json | 21 + ...carPositionObservationEventCollection.json | 21 + ...GroupPositionObservationEventResource.json | 12 + .../icarPositionObservationEventResource.json | 12 + types/icarPositionObservationType.json | 16 + url-schemes/exampleUrlScheme.json | 108 +++++ url-schemes/managementURLScheme.json | 409 ++++++++++++++++++ 7 files changed, 599 insertions(+) create mode 100644 collections/icarGroupPositionObservationEventCollection.json create mode 100644 collections/icarPositionObservationEventCollection.json create mode 100644 resources/icarGroupPositionObservationEventResource.json create mode 100644 resources/icarPositionObservationEventResource.json create mode 100644 types/icarPositionObservationType.json 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/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/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/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/types/icarPositionObservationType.json b/types/icarPositionObservationType.json new file mode 100644 index 0000000..be19bfd --- /dev/null +++ b/types/icarPositionObservationType.json @@ -0,0 +1,16 @@ +{ + "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." + }, + "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/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 8412e59..6e6dde1 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -2529,6 +2529,108 @@ } } } + }, + "/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.3-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.3-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": { @@ -2712,6 +2814,12 @@ }, "icarAttentionEventCollection": { "$ref": "../collections/icarAttentionEventCollection.json" + }, + "icarPositionObservationEventCollection": { + "$ref": "../collections/icarPositionObservationEventCollection.json" + }, + "icarGroupPositionObservationEventCollection": { + "$ref": "../collections/icarGroupPositionObservationEventCollection.json" } }, "parameters": { diff --git a/url-schemes/managementURLScheme.json b/url-schemes/managementURLScheme.json index ff9fd65..c1750aa 100644 --- a/url-schemes/managementURLScheme.json +++ b/url-schemes/managementURLScheme.json @@ -639,7 +639,242 @@ } } } + }, + "/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.3-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.3-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.3-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.3-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", @@ -1164,6 +1399,156 @@ } } } + }, + "/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.3-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.3-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" + } + } + } + }, + "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": { @@ -1260,6 +1645,30 @@ "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": { From 6f9c0d53d28e913095713197530b082b57b3e2ad Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Fri, 17 Nov 2023 08:25:55 +0100 Subject: [PATCH 075/108] added parity, lastCalvingDate, lastInseminationDate, lastDryingOffDate --- .../icarMovementArrivalEventResource.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/icarMovementArrivalEventResource.json b/resources/icarMovementArrivalEventResource.json index 501e238..d442e7f 100644 --- a/resources/icarMovementArrivalEventResource.json +++ b/resources/icarMovementArrivalEventResource.json @@ -19,8 +19,24 @@ "consignment": { "$ref": "../types/icarConsignmentType.json", "description": "Identifies the consignment of the animal to the holding." + }, + "parity": { + "type": "number", + "description": "The parity of the animal during this lactation." + }, + "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/)." } } } ] -} \ No newline at end of file +} From dd4ec6240789c5268fe349768487c47f0226e318 Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Thu, 30 Nov 2023 07:07:15 +0100 Subject: [PATCH 076/108] move the additional attributes from MovementEvent to AnimalCoreResource --- resources/icarAnimalCoreResource.json | 16 ++++++++++++++++ resources/icarMovementArrivalEventResource.json | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/resources/icarAnimalCoreResource.json b/resources/icarAnimalCoreResource.json index d0b18ce..f8aa40a 100644 --- a/resources/icarAnimalCoreResource.json +++ b/resources/icarAnimalCoreResource.json @@ -81,6 +81,22 @@ "$ref": "../enums/icarAnimalLactationStatusType.json", "description": "Lactation status of the animal." }, + "parity": { + "type": "number", + "description": "The parity of the animal during this lactation." + }, + "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/)." + }, "parentage": { "type": "array", "description": "Parents of the animal. The array can handle multiple generations by specifying the parent of a parent.", diff --git a/resources/icarMovementArrivalEventResource.json b/resources/icarMovementArrivalEventResource.json index d442e7f..e690d8d 100644 --- a/resources/icarMovementArrivalEventResource.json +++ b/resources/icarMovementArrivalEventResource.json @@ -19,22 +19,6 @@ "consignment": { "$ref": "../types/icarConsignmentType.json", "description": "Identifies the consignment of the animal to the holding." - }, - "parity": { - "type": "number", - "description": "The parity of the animal during this lactation." - }, - "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/)." } } } From 9890191ad1b0b85bd4a4601c102bd19b7ce6225e Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:13:24 +1300 Subject: [PATCH 077/108] Update description per feedback Update the description with feedback from the meeting 2023-11-30 --- types/icarMetaDataType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarMetaDataType.json b/types/icarMetaDataType.json index 89ebe31..c7d4eb3 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -14,7 +14,7 @@ }, "sourceId": { "type": "string", - "description": "Unique Id within Source (e.g. UUID or composite ID if needed) for the resource in the original source system. \n Systems are expected to populate, store, and return sourceId if at all possible.", + "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.", "$comment": "ICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release." }, "isDeleted": { From 0f094a45a3be30d3e3e4cbf58c7ba072f7f8c044 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:14:01 +1300 Subject: [PATCH 078/108] Update $comment per meeting Update the comment with the version number of the next update, based on feedback from the meeting 2023-11-30 --- types/icarMetaDataType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/icarMetaDataType.json b/types/icarMetaDataType.json index c7d4eb3..d1c2cc2 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -15,7 +15,7 @@ "sourceId": { "type": "string", "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.", - "$comment": "ICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release." + "$comment": "ICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release (2.0)." }, "isDeleted": { "type": "boolean", From 4592aa817a5e34bfc007d6d9d9355d8b351a5f0f Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Thu, 30 Nov 2023 10:08:06 +0100 Subject: [PATCH 079/108] added icarAnimalStateType to the MovementEvent --- resources/icarAnimalCoreResource.json | 16 ------------- .../icarMovementArrivalEventResource.json | 4 ++++ types/icarAnimalStateType.json | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 types/icarAnimalStateType.json diff --git a/resources/icarAnimalCoreResource.json b/resources/icarAnimalCoreResource.json index f8aa40a..d0b18ce 100644 --- a/resources/icarAnimalCoreResource.json +++ b/resources/icarAnimalCoreResource.json @@ -81,22 +81,6 @@ "$ref": "../enums/icarAnimalLactationStatusType.json", "description": "Lactation status of the animal." }, - "parity": { - "type": "number", - "description": "The parity of the animal during this lactation." - }, - "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/)." - }, "parentage": { "type": "array", "description": "Parents of the animal. The array can handle multiple generations by specifying the parent of a parent.", diff --git a/resources/icarMovementArrivalEventResource.json b/resources/icarMovementArrivalEventResource.json index e690d8d..82b2e83 100644 --- a/resources/icarMovementArrivalEventResource.json +++ b/resources/icarMovementArrivalEventResource.json @@ -16,6 +16,10 @@ "$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", "description": "Identifies the consignment of the animal to the holding." 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/)." + } + } +} From 153ac723e3f095fe0aa7d672b09209b948d3a03e Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:26:41 +1300 Subject: [PATCH 080/108] Update OpenAPI API schemes to 3.1.0 and ADE 1.4 --- url-schemes/exampleUrlScheme.json | 148 ++++++++++++------------- url-schemes/feedURLscheme.json | 50 ++++----- url-schemes/healthURLScheme.json | 48 ++++---- url-schemes/managementURLScheme.json | 44 ++++---- url-schemes/milkURLScheme.json | 38 +++---- url-schemes/performanceURLScheme.json | 30 ++--- url-schemes/registrationURLScheme.json | 62 +++++------ url-schemes/reproductionURLScheme.json | 70 ++++++------ 8 files changed, 245 insertions(+), 245 deletions(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 8412e59..ea27000 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,43 +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-carcass", + "name": "ADE-1.4-carcass", "description": "Carcass messages approved by the working group" }, { - "name": "ADE-1.3-scheme", + "name": "ADE-1.4-scheme", "description": "Scheme definitions approved by the working group" } ], @@ -61,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": { @@ -91,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": [ { @@ -130,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" @@ -173,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" @@ -216,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" @@ -259,7 +259,7 @@ "summary": "Get the milk predictions for a certain location", "description": "# Purpose\nProvides the milk predictions for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -298,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" @@ -336,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" @@ -368,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" @@ -406,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" @@ -444,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" @@ -482,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" @@ -525,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" @@ -563,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" @@ -595,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" @@ -635,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": [ { @@ -679,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": [ { @@ -723,7 +723,7 @@ "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.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/identifier-scheme" @@ -755,7 +755,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": [ { @@ -797,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" @@ -840,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" @@ -878,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" @@ -921,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" @@ -967,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" @@ -1005,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" @@ -1043,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" @@ -1081,7 +1081,7 @@ "summary": "Get the embryo flushing events for a certain location", "description": "# Purpose\nProvides the embryo flushing events on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1119,7 +1119,7 @@ "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" @@ -1157,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" @@ -1195,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" @@ -1238,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" @@ -1276,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" @@ -1314,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" @@ -1352,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": [ { @@ -1391,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" @@ -1429,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" @@ -1467,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" @@ -1505,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": [ { @@ -1544,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" @@ -1582,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" @@ -1620,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" @@ -1658,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" @@ -1696,7 +1696,7 @@ "summary": "Get the group feeding events for a certain location", "description": "# Purpose\nProvides the group feeding events for a location.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1735,7 +1735,7 @@ "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" @@ -1773,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" @@ -1817,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" @@ -1855,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" @@ -1892,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" @@ -1935,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" @@ -1978,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": [ { @@ -2017,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": [ { @@ -2056,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": [ { @@ -2095,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": [ { @@ -2134,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": [ { @@ -2173,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": [ { @@ -2212,7 +2212,7 @@ "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.3-carcass" + "ADE-1.4-carcass" ], "parameters": [ { @@ -2251,7 +2251,7 @@ "summary": "Get the carcasses that relate to a certain location", "description": "# Purpose\nProvides the carcasses relating to a location\n", "tags": [ - "ADE-1.3-carcass" + "ADE-1.4-carcass" ], "parameters": [ { @@ -2290,7 +2290,7 @@ "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.3-carcass" + "ADE-1.4-carcass" ], "parameters": [ { @@ -2329,7 +2329,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -2383,7 +2383,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -2434,7 +2434,7 @@ "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.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -2485,7 +2485,7 @@ "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.3-health" + "ADE-1.4-health" ], "parameters": [ { diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index 3f02ba8..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": [ { @@ -603,7 +603,7 @@ "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.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -652,7 +652,7 @@ "summary": "Add a single new feed inventory transaction.", "description": "# Purpose\nAllows a client to add a single feed inventory transaction.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -720,7 +720,7 @@ "summary": "Get the group feeding events for a certain location", "description": "# Purpose\nProvides the group feeding events for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -757,7 +757,7 @@ "summary": "Add a single new group feeding event.", "description": "# Purpose\nAllows a client to add a single group feeding event.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -825,7 +825,7 @@ "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": [ { @@ -900,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": [ { @@ -975,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": [ { @@ -1050,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": [ { @@ -1125,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": [ { @@ -1200,7 +1200,7 @@ "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-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -1275,7 +1275,7 @@ "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.3-feed" + "ADE-1.4-feed" ], "parameters": [ { diff --git a/url-schemes/healthURLScheme.json b/url-schemes/healthURLScheme.json index 5162ba3..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": [ { @@ -481,7 +481,7 @@ "summary": "Get medicine inventory transactions.", "description": "# Purpose\nProvides the medicine inventory transactions for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -530,7 +530,7 @@ "summary": "Add a single new medicine inventory transaction.", "description": "# Purpose \nAllows a client to add a single medicine inventory transaction.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -580,7 +580,7 @@ "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.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -629,7 +629,7 @@ "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.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -679,7 +679,7 @@ "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": [ { @@ -754,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": [ { @@ -829,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": [ { @@ -904,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": [ { @@ -979,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": [ { @@ -1054,7 +1054,7 @@ "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-health" + "ADE-1.4-health" ], "parameters": [ { @@ -1129,7 +1129,7 @@ "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.3-health" + "ADE-1.4-health" ], "parameters": [ { diff --git a/url-schemes/managementURLScheme.json b/url-schemes/managementURLScheme.json index ff9fd65..6d3cf94 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": [ { @@ -490,7 +490,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -544,7 +544,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -595,7 +595,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -646,7 +646,7 @@ "summary": "Add an array of animal-sets.", "description": "# Purpose \nAllows a client to add a collection of animal-sets.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -721,7 +721,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -796,7 +796,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -871,7 +871,7 @@ "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": [ { @@ -946,7 +946,7 @@ "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": [ { @@ -1021,7 +1021,7 @@ "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": [ { @@ -1096,7 +1096,7 @@ "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": [ { diff --git a/url-schemes/milkURLScheme.json b/url-schemes/milkURLScheme.json index 638ee55..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": [ { @@ -382,7 +382,7 @@ "summary": "Get the milk predictions for a certain location", "description": "# Purpose\nProvides the milk predictions for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -421,7 +421,7 @@ "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": [ { @@ -454,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": [ { @@ -491,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": [ { @@ -559,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": [ { @@ -598,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": [ { @@ -673,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": [ { @@ -748,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": [ { @@ -823,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": [ { 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 a03d8bc..01517e7 100644 --- a/url-schemes/reproductionURLScheme.json +++ b/url-schemes/reproductionURLScheme.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Reproduction API Specifications", "description": "Specifications for messages that support livestock reproduction recording.", @@ -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": [ { @@ -1078,7 +1078,7 @@ "summary": "Get the embryo flushings for a certain location", "description": "# Purpose\nProvides the animal embryo flushings for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1115,7 +1115,7 @@ "summary": "Add a single new embyro flushing.", "description": "# Purpose\nAllows a client to add a single embryo flushing event.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1183,7 +1183,7 @@ "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": [ { @@ -1258,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": [ { @@ -1333,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": [ { @@ -1408,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": [ { @@ -1483,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": [ { @@ -1558,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": [ { @@ -1633,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": [ { @@ -1708,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": [ { @@ -1783,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": [ { @@ -1858,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": [ { @@ -1933,7 +1933,7 @@ "summary": "Add an array of embryo-flushings.", "description": "# Purpose \nAllows a client to add a collection of embryo-flushings.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { From a494b5273a822031550123d661ec0ecf3f140b98 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:53:12 +1300 Subject: [PATCH 081/108] Replace nullable with array types with "null" --- resources/icarAttentionEventResource.json | 2 +- resources/icarBatchResult.json | 5 ++--- .../icarHealthStatusObservedEventResource.json | 3 +-- resources/icarProgenyDetailsResource.json | 16 +++++++--------- resources/icarReproDoNotBreedEventResource.json | 3 +-- resources/icarReproParturitionEventResource.json | 6 ++---- resources/icarResponseMessageResource.json | 10 ++++------ types/icarGroupSpecifierType.json | 12 ++++-------- types/icarIndividualWeightType.json | 9 ++++----- types/icarInventoryClassificationType.json | 5 ++--- types/icarMedicineCourseSummaryType.json | 10 ++++------ types/icarMetaDataType.json | 6 +++--- types/icarQuarterMilkingType.json | 9 +++------ types/icarStatisticsGroupType.json | 3 +-- 14 files changed, 39 insertions(+), 60 deletions(-) diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json index 958b8ee..477c32d 100644 --- a/resources/icarAttentionEventResource.json +++ b/resources/icarAttentionEventResource.json @@ -12,8 +12,8 @@ "properties": { "alertEndDateTime": { + "type": ["string", "null"], "$ref": "../types/icarDateTimeType.json", - "nullable": true, "description": "RFC3339 date time that represents the end time of an alert (start time is the eventDateTime) if it has ended." }, "category": { 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/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/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/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/icarResponseMessageResource.json b/resources/icarResponseMessageResource.json index 8f50b02..a97c2f8 100644 --- a/resources/icarResponseMessageResource.json +++ b/resources/icarResponseMessageResource.json @@ -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/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/icarInventoryClassificationType.json b/types/icarInventoryClassificationType.json index 10153de..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", 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/icarMetaDataType.json b/types/icarMetaDataType.json index d1c2cc2..f0083d7 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -27,7 +27,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" @@ -40,7 +40,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" @@ -49,7 +49,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/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/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": { From 919f4c9667c65d54d1d4a80bbea3e3d5984f20da Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Fri, 1 Dec 2023 18:07:23 +1300 Subject: [PATCH 082/108] Remove Speccy (does not support OpenAPI 3.1) --- .github/workflows/ValidateWithSpeccy.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/workflows/ValidateWithSpeccy.yml 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 - From 526aec5c187fd1824ec88c20a8865f48306237dd Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 25 Jan 2024 21:23:12 +1300 Subject: [PATCH 083/108] Update icarDeviceResource.json Change `icarDeviceResource` to inherit from `icarResource`. --- resources/icarDeviceResource.json | 107 ++++++++++++++++-------------- 1 file changed, 56 insertions(+), 51 deletions(-) diff --git a/resources/icarDeviceResource.json b/resources/icarDeviceResource.json index 86555ae..623086a 100644 --- a/resources/icarDeviceResource.json +++ b/resources/icarDeviceResource.json @@ -1,60 +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", - "description": "Identifies message types supported for the device", - "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." - }, - "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)." } - } + }] } \ No newline at end of file From 1f9341658e87e5d60449dfe54961f08145eebd66 Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 4 Apr 2024 19:02:53 +1300 Subject: [PATCH 084/108] Add type classification and attentions --- resources/resourceTypeCatalog.md | 131 ++++++++++++++++--------------- 1 file changed, 67 insertions(+), 64 deletions(-) diff --git a/resources/resourceTypeCatalog.md b/resources/resourceTypeCatalog.md index 5f4d50f..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, `resourceType` discriminator 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,68 +13,71 @@ and the expansion is: `http://data.adewg.icar.org/core/` -Short Name | URI | Discriminator (resourceType) | JSON Resource Type Definition ---- | --- | --- | --- -Animal | icar:Animal | icarAnimalCoreResource | icarAnimalCoreResource.json -AnimalSetJoinEvent | icar:AnimalSetJoinEvent | icarAnimalSetJoinEventResource | icarAnimalSetJoinEventResource.json -AnimalSetLeaveEvent | icar:AnimalSetLeaveEvent | icarAnimalSetLeaveEventResource | icarAnimalSetLeaveEventResource.json -AnimalSet | icar:AnimalSet | icarAnimalSetResource | icarAnimalSetResource.json -BreedingValue | icar:BreedingValue | icarBreedingValueResource | icarBreedingValueResource.json -CarcassObservationsEvent | icar:CarcassObservations | icarCarcassObservationsEventResource | icarCarcassObservationsEventResource.json -Carcass | icar:Carcass | icarCarcassResource | icarCarcassResource.json -ConformationScoreEvent | icar:ConformationScoreEvent | icarConformationScoreEventResource | icarConformationScoreEventResource.json -DailyMilkingAverages | icar:DailyMilkingAverages | icarDailyMilkingAveragesResource | icarDailyMilkingAveragesResource.json -Device | icar:Device | icarDeviceResource | icarDeviceResource.json -DiagnosisEvent | icar:DiagnosisEvent | icarDiagnosisEventResource | icarDiagnosisEventResource.json -FeedIntakeEvent | icar:FeedIntakeEvent | icarFeedIntakeEventResource | icarFeedIntakeEventResource.json -FeedRecommendation | icar:FeedRecommendation | icarFeedRecommendationResource | icarFeedRecommendationResource.json -FeedReport | icar:FeedReport | icarFeedReportResource | icarFeedReportResource.json -Feed | icar:Feed | icarFeedResource | icarFeedResource.json -FeedStorage | icar:FeedStorage | icarFeedStorageResource | icarFeedStorageResource.json -Gestation | icar:Gestation | icarGestationResource | icarGestationResource.json -GroupFeedingEvent | icar:GroupFeedingEvent | icarGroupFeedingEventResource | icarGroupFeedingEventResource.json -GroupMovementArrivalEvent | icar:GroupMovementArrivalEvent | icarGroupMovementArrivalEventResource | icarGroupMovementArrivalEventResource.json -GroupMovementBirthEvent | icar:GroupMovementBirthEvent | icarGroupMovementBirthEventResource | icarGroupMovementBirthEventResource.json -GroupMovementDeathEvent | icar:GroupMovementDeathEvent | icarGroupMovementDeathEventResource | icarGroupMovementDeathEventResource.json -GroupMovementDepartureEvent | icar:GroupMovementDepartureEvent | icarGroupMovementDepartureEventResource | icarGroupMovementDepartureEventResource.json -GroupTreatmentEvent | icar:GroupTreatmentEvent | icarGroupTreatmentEventResource | icarGroupTreatmentEventResource.json -GroupWeightEvent | icar:GroupWeightEvent | icarGroupWeightEventResource | icarGroupWeightEventResource.json -HealthStatusObservedEvent | icar:HealthStatusObservedEvent | icarHealthStatusObservedEventResource | icarHealthStatusObservedEventResource.json -InventoryTransaction | icar:InventoryTransaction | icarInventoryTransactionResource | icarInventoryTransactionResource.json -Lactation | icar:Lactation | icarLactationResource| icarLactationResource.json -LactationStatusObservedEvent | icar:LactationStatusObservedEvent | icarLactationStatusObservedEventResource | icarLactationStatusObservedEventResource.json -Location | icar:Location | icarLocationResource | icarLocationResource.json -Medicine | icar:Medicine | icarMedicineResource | icarMedicineResource.json -MedicineTransaction | icar:MedicineTransaction | icarMedicineTransactionResource | icarMedicineTransactionResource.json -MilkPrediction | icar:MilkPrediction | icarMilkPredictionResource | icarMilkPredictionResource.json -MilkingDryOffEvent | icar:MilkingDryOffEvent | icarMilkingDryOffEventResource | icarMilkingDryOffEventResource.json -MilkingVisitEvent | icar:MilkingVisitEvent | icarMilkingVisitEventResource | icarMilkingVisitEventResource.json -MovementArrivalEvent | icar:MovementArrivalEvent | icarMovementArrivalEventResource | icarMovementArrivalEventResource.json -MovementBirthEvent | icar:MovementBirthEvent | icarMovementBirthEventResource | icarMovementBirthEventResource.json -MovementDeathEvent | icar:MovementDeathEvent | icarMovementDeathEventResource | icarMovementDeathEventResource.json -MovementDepartureEvent | icar:MovementDepartureEvent | icarMovementDepartureEventResource| icarMovementDepartureEventResource.json -ProcessingLot | icar:ProcessingLot | icarProcessingLotResource | icarProcessingLotResource.json -ProgenyDetails | icar:ProgenyDetails | icarProgenyDetailsResource | icarProgenyDetailsResource.json -Ration | icar:Ration | icarRationResource | icarRationResource.json -ReproAbortionEvent | icar:ReproAbortionEvent | icarReproAbortionEventResource | icarReproAbortionEventResource.json -ReproDoNotBreedEvent | icar:ReproDoNotBreedEvent | icarReproDoNotBreedEventResource | icarReproDoNotBreedEventResource.json -ReproEmbryoFlushingEvent | icar:ReproEmbryoFlushingEvent | icarReproEmbryoFlushingEventResource | icarReproEmbryoFlushingEventResource.json -ReproEmbryo | icar:ReproEmbryo | icarReproEmbryoResource | icarReproEmbryoResource.json -ReproHeatEvent | icar:ReproHeatEvent | icarReproHeatEventResource | icarReproHeatEventResource.json -ReproInseminationEvent | icar:ReproInsemonationEvent | icarReproInsemonationEventResource | icarReproInsemonationEventResource.json -ReproMatingRecommendation | icar:ReproMatingRecommendation | icarReproMatingRecommendationResource | icarReproMatingRecommendationResource.json -ReproParturitionEvent | icar:ReproParturitionEvent | icarReproParturitionEventResource | icarReproParturitionEventResource.json -ReproPregnancyCheckEvent | icar:ReproPregnancyCheckEvent | icarReproPregnancyCheckEventResource | icarReproPregnancyCheckEventResource.json -ReproSemenStraw | icar:ReproSemenStraw | icarReproSemenStrawResource | icarReproSemenStrawResource.json -ReproStatusObservedEvent | icar:ReproStatusObservedEvent | icarReproStatusObservedEventResource | icarReproStatusObservedEventResource.json -SchemeType | icar:SchemeType | icarSchemeTypeResource | icarSchemeTypeResource.json -SchemeValue | icar:SchemeValue | icarSchemeValueResource | icarSchemeValueResource.json -Statistics | icar:Statistics | icarStatisticsResource | icarStatisticsResource.json -TestDay | icar:TestDay | icarTestDayResource | icarTestDayResource.json -TestDayResult | icar:TestDayResult | icarTestDayResultResource | icarTestDayResultResource.json -TreatmentEvent | icar:TreatmentEvent | icarTreatmentEventResource | icarTreatmentEventResource.json -TreatmentProgramEvent | icar:TreatmentProgramEvent | icarTreatmentProgramEventResource | icarTreatmentProgramEventResource.json -WeightEvent | icar:WeightEvent | icarWeightEventResource| icarWeightEventResource.json -WithdrawalEvent | icar:WithdrawalEvent | icarWithdrawalEventResource | icarWithdrawalEventResource.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 From 250489239ce7125d156d205e3abedcc78150f8e3 Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 4 Apr 2024 19:48:11 +1300 Subject: [PATCH 085/108] Add enum for milk characteristics type --- enums/icarMilkCharacteristicCodeType.json | 22 ++++++++++++++++++++++ types/icarMilkCharacteristicsType.json | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 enums/icarMilkCharacteristicCodeType.json 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/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", From 411fa8c4cad40acace5c4f805978f737234fc316 Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 4 Apr 2024 20:07:19 +1300 Subject: [PATCH 086/108] Remove use of $comment which breaks linting --- resources/icarResource.json | 5 ++--- types/icarMetaDataType.json | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/icarResource.json b/resources/icarResource.json index c9c73da..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,8 +22,7 @@ }, "meta": { "$ref": "../types/icarMetaDataType.json", - "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.", - "$comment": "ICAR ADE working group intend meta to be required in the next major release of ADE." + "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/types/icarMetaDataType.json b/types/icarMetaDataType.json index d1c2cc2..46956b9 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -14,8 +14,7 @@ }, "sourceId": { "type": "string", - "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.", - "$comment": "ICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release (2.0)." + "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", From 86556b2910723f915c5daec3c85108304ddc7837 Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Fri, 12 Apr 2024 08:38:19 +0200 Subject: [PATCH 087/108] added sorting --- collections/icarSortingAreaCollection.json | 20 ++ resources/icarAnimalSortingEventResource.json | 30 ++ resources/icarAnimalSortingResource.json | 20 ++ resources/icarSortingAreaResource.json | 31 +++ url-schemes/sortingURLScheme.json | 263 ++++++++++++++++++ 5 files changed, 364 insertions(+) create mode 100644 collections/icarSortingAreaCollection.json create mode 100644 resources/icarAnimalSortingEventResource.json create mode 100644 resources/icarAnimalSortingResource.json create mode 100644 resources/icarSortingAreaResource.json create mode 100644 url-schemes/sortingURLScheme.json diff --git a/collections/icarSortingAreaCollection.json b/collections/icarSortingAreaCollection.json new file mode 100644 index 0000000..a53d38c --- /dev/null +++ b/collections/icarSortingAreaCollection.json @@ -0,0 +1,20 @@ +{ + "description": "Represents a collection of areas. Based on icarResourceCollection to provide paging etc.", + "allOf": [ + { + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../gea-resources/icarSortingAreaResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-areas." + } + } + } + ] +} diff --git a/resources/icarAnimalSortingEventResource.json b/resources/icarAnimalSortingEventResource.json new file mode 100644 index 0000000..d6e399e --- /dev/null +++ b/resources/icarAnimalSortingEventResource.json @@ -0,0 +1,30 @@ +{ + "description": "Sorting data for a specific animal on a location.", + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "type": "object", + "required": [ + "animalId", + "areaId" + ], + "properties": { + "animalId": { + "$ref": "../types/icarAnimalIdentifierType.json", + "description": "Unique animal scheme and identifier combination." + }, + "areaId": { + "type": "string", + "description": "Unique identifier in the sorting system for this resource." + }, + "isPermanent": { + "type": "boolean", + "default": false, + "description": "Indicates, if this sorting should be a permanent- or a one-time-sorting" + } + } + } + ] +} diff --git a/resources/icarAnimalSortingResource.json b/resources/icarAnimalSortingResource.json new file mode 100644 index 0000000..6ba2f9c --- /dev/null +++ b/resources/icarAnimalSortingResource.json @@ -0,0 +1,20 @@ +{ + "description": "Sorting data for a specific animal on a location.", + "allOf": [ + { + "$ref": "../gea-resources/icarAnimalSortingEventResource.json" + }, + { + "type": "object", + "required": [ + "startDateTime" + ], + "properties": { + "startDateTime": { + "$ref": "../types/icarDateTimeType.json", + "description": "The RFC3339 UTC date time of the start of sorting (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + } + } + } + ] +} diff --git a/resources/icarSortingAreaResource.json b/resources/icarSortingAreaResource.json new file mode 100644 index 0000000..3ca3539 --- /dev/null +++ b/resources/icarSortingAreaResource.json @@ -0,0 +1,31 @@ +{ + "description": "Areas available on a location.", + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier in the area system for this resource." + }, + "name": { + "type": "string", + "description": "Name of the area as it is known on the location." + }, + "capacity": { + "type": "number", + "default": 0, + "description": "The maximum capacity of this area.", + "format": "int32" + } + } + } + ] +} diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json new file mode 100644 index 0000000..7fee599 --- /dev/null +++ b/url-schemes/sortingURLScheme.json @@ -0,0 +1,263 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Sorting-related messages API Specifications", + "description": "Specifications for messages that support livestock sorting management.", + "version": "1.3", + "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.3-sorting", + "description": "Sorting messages _not_ approved by the working group" + } + ], + "paths": { + "/locations/{location-scheme}/{location-id}/sorting-areas": { + "get": { + "operationId": "get-sorting-areas", + "summary": "Get the sorting-areas for a certain location", + "description": "# Purpose\nProvides the sorting-areas for a location\n", + "tags": [ + "ADE-1.3-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/icarSortingAreaCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/{animal-scheme}/{animal-id}/sorting": { + "get": { + "operationId": "get-sorting of an animal", + "summary": "Get the sorting of a certain animal for a certain location", + "description": "# Purpose\nProvides the sorting of a certain animal\n", + "tags": [ + "ADE-1.3-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/icarAnimalSortingResource" + } + } + } + }, + "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.3-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 sorting for the given location and given animal id." + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/sorting": { + "post": { + "operationId": "post-animal-sorting", + "summary": "Add an animal into a sorting-area.", + "description": "# Purpose\nAllows a client to add an animal to a sorting-area\n", + "tags": [ + "ADE-1.3-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/icarAnimalSortingEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modified by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingResource" + } + } + } + }, + "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": { + "icarSortingAreaCollection": { + "$ref": "../collections/icarSortingAreaCollection.json" + }, + "icarAnimalSortingResource": { + "$ref": "../resources/icarAnimalSortingResource.json" + }, + "icarAnimalSortingEventResource": { + "$ref": "../resources/icarAnimalSortingEventResource.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": {} + } +} From 87eed85484880084db94153a138e4e59d5f51973 Mon Sep 17 00:00:00 2001 From: cookeac Date: Thu, 18 Apr 2024 11:06:32 +1200 Subject: [PATCH 088/108] Remove enum from @type @type is already deprecated, but the use of "enum": ["Link"] to provide a constant value causes errors in code generation under OpenAPI 3.1. Fixes #451 --- types/icarResourceReferenceType.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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", From 5e3b780c28a6c50890982796f8ab2a55ff9f128d Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Fri, 19 Apr 2024 07:16:06 +0200 Subject: [PATCH 089/108] updates according to the discussion in the WG on 20240418 --- ...on.json => icarSortingSiteCollection.json} | 6 ++-- .../icarAnimalSortingCommandResource.json | 34 ++++++++++++++++++ resources/icarAnimalSortingEventResource.json | 30 ---------------- resources/icarAnimalSortingResource.json | 2 +- ...urce.json => icarSortingSiteResource.json} | 8 ++--- url-schemes/sortingURLScheme.json | 35 +++++++++---------- 6 files changed, 58 insertions(+), 57 deletions(-) rename collections/{icarSortingAreaCollection.json => icarSortingSiteCollection.json} (65%) create mode 100644 resources/icarAnimalSortingCommandResource.json delete mode 100644 resources/icarAnimalSortingEventResource.json rename resources/{icarSortingAreaResource.json => icarSortingSiteResource.json} (62%) diff --git a/collections/icarSortingAreaCollection.json b/collections/icarSortingSiteCollection.json similarity index 65% rename from collections/icarSortingAreaCollection.json rename to collections/icarSortingSiteCollection.json index a53d38c..1787aec 100644 --- a/collections/icarSortingAreaCollection.json +++ b/collections/icarSortingSiteCollection.json @@ -1,5 +1,5 @@ { - "description": "Represents a collection of areas. Based on icarResourceCollection to provide paging etc.", + "description": "Represents a collection of sites. Based on icarResourceCollection to provide paging etc.", "allOf": [ { "$ref": "../collections/icarResourceCollection.json" @@ -10,9 +10,9 @@ "member": { "type": "array", "items": { - "$ref": "../gea-resources/icarSortingAreaResource.json" + "$ref": "../resources/icarSortingSiteResource.json" }, - "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-areas." + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-sites." } } } diff --git a/resources/icarAnimalSortingCommandResource.json b/resources/icarAnimalSortingCommandResource.json new file mode 100644 index 0000000..44e4e9c --- /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": [ + "animalId", + "siteId", + "validFrom" + ], + "properties": { + "animalId": { + "$ref": "../types/icarAnimalIdentifierType.json", + "description": "Unique animal scheme and identifier combination." + }, + "siteId": { + "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 permanent. RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + } + } + } + ] +} diff --git a/resources/icarAnimalSortingEventResource.json b/resources/icarAnimalSortingEventResource.json deleted file mode 100644 index d6e399e..0000000 --- a/resources/icarAnimalSortingEventResource.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "description": "Sorting data for a specific animal on a location.", - "allOf": [ - { - "$ref": "../resources/icarResource.json" - }, - { - "type": "object", - "required": [ - "animalId", - "areaId" - ], - "properties": { - "animalId": { - "$ref": "../types/icarAnimalIdentifierType.json", - "description": "Unique animal scheme and identifier combination." - }, - "areaId": { - "type": "string", - "description": "Unique identifier in the sorting system for this resource." - }, - "isPermanent": { - "type": "boolean", - "default": false, - "description": "Indicates, if this sorting should be a permanent- or a one-time-sorting" - } - } - } - ] -} diff --git a/resources/icarAnimalSortingResource.json b/resources/icarAnimalSortingResource.json index 6ba2f9c..6ab0fee 100644 --- a/resources/icarAnimalSortingResource.json +++ b/resources/icarAnimalSortingResource.json @@ -2,7 +2,7 @@ "description": "Sorting data for a specific animal on a location.", "allOf": [ { - "$ref": "../gea-resources/icarAnimalSortingEventResource.json" + "$ref": "../resources/icarAnimalSortingCommandResource.json" }, { "type": "object", diff --git a/resources/icarSortingAreaResource.json b/resources/icarSortingSiteResource.json similarity index 62% rename from resources/icarSortingAreaResource.json rename to resources/icarSortingSiteResource.json index 3ca3539..8f0b184 100644 --- a/resources/icarSortingAreaResource.json +++ b/resources/icarSortingSiteResource.json @@ -1,5 +1,5 @@ { - "description": "Areas available on a location.", + "description": "Site available on a location.", "allOf": [ { "$ref": "../resources/icarResource.json" @@ -13,16 +13,16 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier in the area system for this resource." + "description": "Unique identifier in the system for this site." }, "name": { "type": "string", - "description": "Name of the area as it is known on the location." + "description": "Name of the site as it is known on the location." }, "capacity": { "type": "number", "default": 0, - "description": "The maximum capacity of this area.", + "description": "The maximum capacity of this site.", "format": "int32" } } diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json index 7fee599..0a93518 100644 --- a/url-schemes/sortingURLScheme.json +++ b/url-schemes/sortingURLScheme.json @@ -22,11 +22,11 @@ } ], "paths": { - "/locations/{location-scheme}/{location-id}/sorting-areas": { + "/locations/{location-scheme}/{location-id}/sorting-sites": { "get": { - "operationId": "get-sorting-areas", - "summary": "Get the sorting-areas for a certain location", - "description": "# Purpose\nProvides the sorting-areas for a location\n", + "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.3-sorting" ], @@ -44,7 +44,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarSortingAreaCollection" + "$ref": "#/components/schemas/icarSortingSiteCollection" } } } @@ -58,7 +58,7 @@ "/locations/{location-scheme}/{location-id}/{animal-scheme}/{animal-id}/sorting": { "get": { "operationId": "get-sorting of an animal", - "summary": "Get the sorting of a certain animal for a certain location", + "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.3-sorting" @@ -83,7 +83,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarAnimalSortingResource" + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" } } } @@ -116,7 +116,7 @@ ], "responses": { "200": { - "description": "Successful. The response contains the sorting for the given location and given animal id." + "description": "Successful." }, "default": { "$ref": "#/components/responses/default" @@ -127,8 +127,8 @@ "/locations/{location-scheme}/{location-id}/sorting": { "post": { "operationId": "post-animal-sorting", - "summary": "Add an animal into a sorting-area.", - "description": "# Purpose\nAllows a client to add an animal to a sorting-area\n", + "summary": "Add an animal into a sorting-site.", + "description": "# Purpose\nAllows a client to add an animal to a sorting-site", "tags": [ "ADE-1.3-sorting" ], @@ -146,7 +146,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarAnimalSortingEventResource" + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" } } } @@ -157,7 +157,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarAnimalSortingResource" + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" } } } @@ -198,14 +198,11 @@ }, "components": { "schemas": { - "icarSortingAreaCollection": { - "$ref": "../collections/icarSortingAreaCollection.json" + "icarSortingSiteCollection": { + "$ref": "../collections/icarSortingSiteCollection.json" }, - "icarAnimalSortingResource": { - "$ref": "../resources/icarAnimalSortingResource.json" - }, - "icarAnimalSortingEventResource": { - "$ref": "../resources/icarAnimalSortingEventResource.json" + "icarAnimalSortingCommandResource": { + "$ref": "../resources/icarAnimalSortingCommandResource.json" } }, "parameters": { From 4ffdac719b95eb9ea68a7a3c87b17773af53c678 Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Fri, 19 Apr 2024 07:17:25 +0200 Subject: [PATCH 090/108] updates according to the discussion in the WG on 20240418 --- resources/icarAnimalSortingResource.json | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 resources/icarAnimalSortingResource.json diff --git a/resources/icarAnimalSortingResource.json b/resources/icarAnimalSortingResource.json deleted file mode 100644 index 6ab0fee..0000000 --- a/resources/icarAnimalSortingResource.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Sorting data for a specific animal on a location.", - "allOf": [ - { - "$ref": "../resources/icarAnimalSortingCommandResource.json" - }, - { - "type": "object", - "required": [ - "startDateTime" - ], - "properties": { - "startDateTime": { - "$ref": "../types/icarDateTimeType.json", - "description": "The RFC3339 UTC date time of the start of sorting (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." - } - } - } - ] -} From d92b893dcfc41eb03b8feec9c96e1df146839751 Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Mon, 22 Apr 2024 06:53:37 +0200 Subject: [PATCH 091/108] removed the *Id-postfixes --- resources/icarAnimalSortingCommandResource.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/icarAnimalSortingCommandResource.json b/resources/icarAnimalSortingCommandResource.json index 44e4e9c..fd44f90 100644 --- a/resources/icarAnimalSortingCommandResource.json +++ b/resources/icarAnimalSortingCommandResource.json @@ -7,16 +7,16 @@ { "type": "object", "required": [ - "animalId", - "siteId", + "animal", + "site", "validFrom" ], "properties": { - "animalId": { + "animal": { "$ref": "../types/icarAnimalIdentifierType.json", "description": "Unique animal scheme and identifier combination." }, - "siteId": { + "site": { "type": "string", "description": "Unique identifier in the system for this site." }, From 2acfccc5faa6903a3809fa76f61e6384811178c4 Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Mon, 22 Apr 2024 06:54:52 +0200 Subject: [PATCH 092/108] minor optimization --- resources/icarAnimalSortingCommandResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/icarAnimalSortingCommandResource.json b/resources/icarAnimalSortingCommandResource.json index fd44f90..df762de 100644 --- a/resources/icarAnimalSortingCommandResource.json +++ b/resources/icarAnimalSortingCommandResource.json @@ -26,7 +26,7 @@ }, "validTo": { "$ref": "../types/icarDateTimeType.json", - "description": "Specifies until when the sort command should be active. Could be left empty, when the sorting should be permanent. RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + "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)." } } } From 8b9573cc4c8303db47acf9356aa0c25e0832c37a Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Mon, 22 Apr 2024 07:03:08 +0200 Subject: [PATCH 093/108] added an endpoint to request all known sortings --- .../icarAnimalSortingCommandCollection.json | 20 +++++++++++ url-schemes/sortingURLScheme.json | 36 ++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 collections/icarAnimalSortingCommandCollection.json diff --git a/collections/icarAnimalSortingCommandCollection.json b/collections/icarAnimalSortingCommandCollection.json new file mode 100644 index 0000000..ef65086 --- /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 sorting-sites." + } + } + } + ] +} diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json index 0a93518..764c571 100644 --- a/url-schemes/sortingURLScheme.json +++ b/url-schemes/sortingURLScheme.json @@ -124,7 +124,38 @@ } } }, - "/locations/{location-scheme}/{location-id}/sorting": { + "/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.3-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.", @@ -198,6 +229,9 @@ }, "components": { "schemas": { + "icarAnimalSortingCommandCollection": { + "$ref": "../collections/icarAnimalSortingCommandCollection.json" + }, "icarSortingSiteCollection": { "$ref": "../collections/icarSortingSiteCollection.json" }, From d1beca48676a75dfb85ab8bf426ae9e6e83ef04d Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Mon, 22 Apr 2024 07:07:19 +0200 Subject: [PATCH 094/108] minor optimization --- collections/icarAnimalSortingCommandCollection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/icarAnimalSortingCommandCollection.json b/collections/icarAnimalSortingCommandCollection.json index ef65086..a33ee52 100644 --- a/collections/icarAnimalSortingCommandCollection.json +++ b/collections/icarAnimalSortingCommandCollection.json @@ -12,7 +12,7 @@ "items": { "$ref": "../resources/icarAnimalSortingCommandResource.json" }, - "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-sites." + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case animal sorting commands (icarAnimalSortingCommandResource)." } } } From 58a637ddeb2f52f84ddac53e5b7e26f889ef296e Mon Sep 17 00:00:00 2001 From: "Schultz.Andreas" Date: Mon, 22 Apr 2024 15:47:31 +0200 Subject: [PATCH 095/108] minor optimization --- url-schemes/sortingURLScheme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json index 764c571..cbff7cf 100644 --- a/url-schemes/sortingURLScheme.json +++ b/url-schemes/sortingURLScheme.json @@ -18,7 +18,7 @@ "tags": [ { "name": "ADE-1.3-sorting", - "description": "Sorting messages _not_ approved by the working group" + "description": "Sorting messages approved by the working group" } ], "paths": { From 59e69c76600fd110d53dea3e21725876a5a2d581 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Tue, 30 Apr 2024 09:19:37 +1200 Subject: [PATCH 096/108] Improve description for icarGestationResource Clarify how the resource should be used and maintained. --- resources/icarGestationResource.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", From 679c13d13edc60d9a18d8691da8b8ba90a93fe8e Mon Sep 17 00:00:00 2001 From: cookeac Date: Tue, 30 Apr 2024 13:04:28 +1200 Subject: [PATCH 097/108] Add site id to icarPositionObservationType Add the icarSortingSiteResource identifier (site) to position observations, so you can record a position observation to confirm that an animal has been sorted into that site. --- types/icarPositionObservationType.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/icarPositionObservationType.json b/types/icarPositionObservationType.json index be19bfd..f6d89d5 100644 --- a/types/icarPositionObservationType.json +++ b/types/icarPositionObservationType.json @@ -8,6 +8,10 @@ "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." From 287445b974b5253206835658066307ad9a58f51e Mon Sep 17 00:00:00 2001 From: cookeac Date: Fri, 17 May 2024 08:51:38 +1200 Subject: [PATCH 098/108] Add milkingShiftNumber and milkingShiftLocalDate Add the milkingShiftNumber and milkingShiftLocalDate, as specified in #450. --- resources/icarMilkingVisitEventResource.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/icarMilkingVisitEventResource.json b/resources/icarMilkingVisitEventResource.json index b97728e..ffe7b3f 100644 --- a/resources/icarMilkingVisitEventResource.json +++ b/resources/icarMilkingVisitEventResource.json @@ -49,6 +49,14 @@ "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": { "type": "array", "items": { From 2ee111b4b9270b97c02f5ba2eb71cdafbcefb5dd Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Fri, 17 May 2024 09:05:47 +0200 Subject: [PATCH 099/108] Update icarAttentionCategoryType.json Added Reproduction, DeviceIsue and Weight as new categories --- enums/icarAttentionCategoryType.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/enums/icarAttentionCategoryType.json b/enums/icarAttentionCategoryType.json index 73bae78..97aeddd 100644 --- a/enums/icarAttentionCategoryType.json +++ b/enums/icarAttentionCategoryType.json @@ -7,6 +7,9 @@ "Behaviour", "Environment", "Health", + "Reproduction", + "DeviceIssue", + "Weight", "Other" ] - } \ No newline at end of file + } From 312e1ffa3a557549d0b9bf7d161a4ee53a48b247 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Fri, 17 May 2024 09:08:31 +0200 Subject: [PATCH 100/108] Update icarAttentionCauseType.json Added new causes for the attention (Heat, LowBattery, Offline, UnderWeight, OverWeight, AtTargetWeight) --- enums/icarAttentionCauseType.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/enums/icarAttentionCauseType.json b/enums/icarAttentionCauseType.json index e165947..368bab2 100644 --- a/enums/icarAttentionCauseType.json +++ b/enums/icarAttentionCauseType.json @@ -29,7 +29,13 @@ "Standing", "StandingUp", "Walking", + "Heat", + "LowBattery", + "Offline", + "UnderWeight", + "OverWeight", + "AtTargetWeight", "Other", "Undefined" ] - } \ No newline at end of file + } From 1963d2b370ac71c9e3957df9b87140b4a1ef9fbe Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 17 May 2024 08:14:36 +0000 Subject: [PATCH 101/108] Add delivered field to consumedRationType and consumedFeedType --- types/icarConsumedFeedType.json | 4 ++++ types/icarConsumedRationType.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 94cfc36..51cf5fe 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -14,6 +14,10 @@ "$ref": "../types/icarFeedQuantityType.json", "description": "The amount of feed the animal 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" diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index dbf3d30..c810b1a 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -15,6 +15,10 @@ "$ref": "../types/icarFeedQuantityType.json", "description": "The amount of feed the animal 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" From 3bad4c7ce1ffe23a7041211d8be273dc97da8217 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 17 May 2024 08:15:22 +0000 Subject: [PATCH 102/108] Add totatCost field to consumedRationType and consumedFeedType --- types/icarConsumedFeedType.json | 4 ++++ types/icarConsumedRationType.json | 4 ++++ types/icarCostType.json | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 types/icarCostType.json diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 51cf5fe..f905220 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -25,6 +25,10 @@ "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 c810b1a..81cd594 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -26,6 +26,10 @@ "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." + } + } +} From 52983341415df852263b51ef2d7ae9cf96bc9209 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 17 May 2024 08:15:57 +0000 Subject: [PATCH 103/108] Update consumedRationType and consumedFeedType descriptions. They can be applied to 1 or more animals --- types/icarConsumedFeedType.json | 6 +++--- types/icarConsumedRationType.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index f905220..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,7 +12,7 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to receive" + "description": "The amount of feed the animal/group was entitled to receive" }, "delivered": { "$ref": "../types/icarFeedQuantityType.json", @@ -20,7 +20,7 @@ }, "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", diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index 81cd594..d901609 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -1,5 +1,5 @@ { - "description": "Gives the consumed amount of a mixed ration, 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,7 +13,7 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to receive" + "description": "The amount of feed the animal/group was entitled to receive" }, "delivered": { "$ref": "../types/icarFeedQuantityType.json", @@ -21,7 +21,7 @@ }, "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", From 7041362e858cea49f8f11558a18c731de2f8b1b4 Mon Sep 17 00:00:00 2001 From: cookeac Date: Fri, 17 May 2024 23:35:14 +1200 Subject: [PATCH 104/108] Update OpenAPI tags to ADE-1.4-xxx --- url-schemes/exampleUrlScheme.json | 4 ++-- url-schemes/managementURLScheme.json | 12 ++++++------ url-schemes/sortingURLScheme.json | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 7a45dcd..4667c8a 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -2536,7 +2536,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -2587,7 +2587,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { diff --git a/url-schemes/managementURLScheme.json b/url-schemes/managementURLScheme.json index ed1ff2a..e5cd894 100644 --- a/url-schemes/managementURLScheme.json +++ b/url-schemes/managementURLScheme.json @@ -646,7 +646,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -695,7 +695,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -763,7 +763,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -812,7 +812,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -1406,7 +1406,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -1481,7 +1481,7 @@ "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.3-management" + "ADE-1.4-management" ], "parameters": [ { diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json index cbff7cf..f67116a 100644 --- a/url-schemes/sortingURLScheme.json +++ b/url-schemes/sortingURLScheme.json @@ -3,7 +3,7 @@ "info": { "title": "Sorting-related messages API Specifications", "description": "Specifications for messages that support livestock sorting 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-sorting", + "name": "ADE-1.4-sorting", "description": "Sorting messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the sorting-sites for a certain location", "description": "# Purpose\nProvides the sorting-sites for a location\n", "tags": [ - "ADE-1.3-sorting" + "ADE-1.4-sorting" ], "parameters": [ { @@ -61,7 +61,7 @@ "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.3-sorting" + "ADE-1.4-sorting" ], "parameters": [ { @@ -98,7 +98,7 @@ "summary": "Delete sorting for a certain animal of a location", "description": "# Purpose\nProvides the deletion of sorting for a location\n", "tags": [ - "ADE-1.3-sorting" + "ADE-1.4-sorting" ], "parameters": [ { @@ -130,7 +130,7 @@ "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.3-sorting" + "ADE-1.4-sorting" ], "parameters": [ { @@ -161,7 +161,7 @@ "summary": "Add an animal into a sorting-site.", "description": "# Purpose\nAllows a client to add an animal to a sorting-site", "tags": [ - "ADE-1.3-sorting" + "ADE-1.4-sorting" ], "parameters": [ { From acfcf738d89f27160ceb4fbef4c04b788e1947ee Mon Sep 17 00:00:00 2001 From: cookeac Date: Sat, 18 May 2024 00:21:35 +1200 Subject: [PATCH 105/108] Trying to fix Spectral OAS error not allowing array of string/null --- resources/icarResponseMessageResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/icarResponseMessageResource.json b/resources/icarResponseMessageResource.json index a97c2f8..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": { From 4e3df0a342a0b4f87a43cd2ad8d1ac304777ab29 Mon Sep 17 00:00:00 2001 From: cookeac Date: Sat, 18 May 2024 00:48:16 +1200 Subject: [PATCH 106/108] Fixed sorting URL scheme (spaces in operation, moved to 3.1) --- url-schemes/sortingURLScheme.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json index f67116a..2704c16 100644 --- a/url-schemes/sortingURLScheme.json +++ b/url-schemes/sortingURLScheme.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Sorting-related messages API Specifications", "description": "Specifications for messages that support livestock sorting management.", @@ -57,7 +57,7 @@ }, "/locations/{location-scheme}/{location-id}/{animal-scheme}/{animal-id}/sorting": { "get": { - "operationId": "get-sorting of an animal", + "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": [ @@ -289,6 +289,6 @@ } } }, - "examples": {} +"examples": {} } } From 5cafc9cbca7ca3649fd5f37c94cc98263444061a Mon Sep 17 00:00:00 2001 From: cookeac Date: Mon, 20 May 2024 17:09:16 +0200 Subject: [PATCH 107/108] Finished description improvements in icarMilkingVisitEventResource Added descriptions to improve documentation, especially about certified milk weight. Resolves #444 --- resources/icarMilkingVisitEventResource.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/icarMilkingVisitEventResource.json b/resources/icarMilkingVisitEventResource.json index ffe7b3f..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,7 +45,7 @@ }, "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", @@ -58,18 +60,21 @@ "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" From 98ca9c330e629793223ca6f3ae0a400ccb0609be Mon Sep 17 00:00:00 2001 From: cookeac Date: Tue, 21 May 2024 11:30:35 +0200 Subject: [PATCH 108/108] Update CHANGELOG for 1.4.0 --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) 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:**