Skip to content

Commit

Permalink
Merge pull request #469 from adewg/Develop
Browse files Browse the repository at this point in the history
get to the develop branch
  • Loading branch information
erwinspeybroeck authored May 17, 2024
2 parents 3e14f12 + 68fa35b commit 8b7c653
Show file tree
Hide file tree
Showing 74 changed files with 2,243 additions and 453 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/ValidateWithSpeccy.yml

This file was deleted.

20 changes: 20 additions & 0 deletions collections/icarAnimalSortingCommandCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"description": "Represents a collection of animal-sorting-commands. Based on icarResourceCollection to provide paging etc.",
"allOf": [
{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",
"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarAnimalSortingCommandResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case animal sorting commands (icarAnimalSortingCommandResource)."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarAttentionEventCollection.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarGroupFeedingEventCollection.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarGroupPositionObservationEventCollection.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarPositionObservationEventCollection.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
]
}
20 changes: 20 additions & 0 deletions collections/icarSortingSiteCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"description": "Represents a collection of sites. Based on icarResourceCollection to provide paging etc.",
"allOf": [
{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",
"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarSortingSiteResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-sites."
}
}
}
]
}
12 changes: 12 additions & 0 deletions enums/icarAttentionCategoryType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"description": "Defines a category of device messages that may allow filtering of alerts.",

"type": "string",

"enum": [
"Behaviour",
"Environment",
"Health",
"Other"
]
}
35 changes: 35 additions & 0 deletions enums/icarAttentionCauseType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"description": "Defines causes of alerts from devices.",

"type": "string",

"enum": [
"Activity",
"AnimalTemperature",
"BodyCondition",
"EatingLess",
"EnvironmentTemperature",
"Disturbance",
"Health",
"HeartRate",
"Inactivity",
"Ketosis",
"Lameness",
"Location",
"LowerRumination",
"LyingTooLong",
"LyingTooShort",
"Mastitis",
"MobilityScore",
"NoMovement",
"Parturition",
"PostParturitionRisk",
"ProlongedParturition",
"RespirationRate",
"Standing",
"StandingUp",
"Walking",
"Other",
"Undefined"
]
}
12 changes: 12 additions & 0 deletions enums/icarAttentionPriorityType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"description": "Defines the relative priority of alerts.",

"type": "string",

"enum": [
"Informational",
"Normal",
"Urgent",
"Critical"
]
}
1 change: 1 addition & 0 deletions enums/icarInventoryTransactionKindType.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"Receipt",
"Disposal",
"OnHand",
"Produce",
"StockTake",
"Use"
]
Expand Down
22 changes: 22 additions & 0 deletions enums/icarMilkCharacteristicCodeType.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
2 changes: 1 addition & 1 deletion enums/icarPositionOnAnimalType.json
Original file line number Diff line number Diff line change
@@ -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",

Expand Down
6 changes: 4 additions & 2 deletions enums/icarProductFamilyType.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"Other Animal Products",
"Milking Supplies",
"Fencing Supplies",
"Water System Supplies"
"Water System Supplies",
"Fuel",
"Other"
]
}
}
3 changes: 3 additions & 0 deletions enums/icarSetPurposeType.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
"enum": [
"Enclosure",
"Feeding",
"Finishing",
"Growing",
"Health",
"Lactation",
"Movement",
"Rearing",
"Reproduction",
"Session",
"Other"
Expand Down
6 changes: 3 additions & 3 deletions resources/icarAnimalCoreResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -95,4 +95,4 @@
}
}
]
}
}
34 changes: 34 additions & 0 deletions resources/icarAnimalSortingCommandResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"description": "Sorting data for a specific animal on a location.",
"allOf": [
{
"$ref": "../resources/icarResource.json"
},
{
"type": "object",
"required": [
"animal",
"site",
"validFrom"
],
"properties": {
"animal": {
"$ref": "../types/icarAnimalIdentifierType.json",
"description": "Unique animal scheme and identifier combination."
},
"site": {
"type": "string",
"description": "Unique identifier in the system for this site."
},
"validFrom": {
"$ref": "../types/icarDateTimeType.json",
"description": "Specifies from when the sort command should be active. RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)."
},
"validTo": {
"$ref": "../types/icarDateTimeType.json",
"description": "Specifies until when the sort command should be active. Could be left empty, when the sorting should be ongoing (until replaced). RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)."
}
}
}
]
}
50 changes: 50 additions & 0 deletions resources/icarAttentionEventResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"description": "Defines an alert for an animal that may require attention.",

"allOf": [
{
"$ref": "../resources/icarAnimalEventCoreResource.json"
},
{
"type": "object",

"required" : ["category", "causes"],

"properties": {
"alertEndDateTime": {
"type": ["string", "null"],
"$ref": "../types/icarDateTimeType.json",
"description": "RFC3339 date time that represents the end time of an alert (start time is the eventDateTime) if it has ended."
},
"category": {
"$ref": "../enums/icarAttentionCategoryType.json",
"description": "A category that allows filtering of alerts by subject."
},
"causes": {
"type": "array",
"items": {
"$ref": "../enums/icarAttentionCauseType.json"
},
"description": "The specific causes of the alert. This is an array and at least one cause must be specified."
},
"priority": {
"$ref": "../enums/icarAttentionPriorityType.json",
"description": "The relative priority of the alert."
},
"severity": {
"$ref": "../enums/icarDiagnosisSeverityType.json",
"description": "A structured set of severity values that align with those used in disease diagnosis."
},
"deviceAttentionScore": {
"type": "number",
"description": "Provides a manufacturer- and device-specific score related to the alert."
},
"device": {
"$ref": "../types/icarDeviceReferenceType.json",
"description": "Identifies the device that is raising the alert."
}
}
}
]
}

5 changes: 2 additions & 3 deletions resources/icarBatchResult.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Loading

0 comments on commit 8b7c653

Please sign in to comment.