Skip to content

Commit

Permalink
Merge pull request #481 from cookeac/454-extended-reason-codes
Browse files Browse the repository at this point in the history
Add extended reason codes
  • Loading branch information
cookeac authored Aug 8, 2024
2 parents d35ada8 + 06870b7 commit d2412a4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
9 changes: 8 additions & 1 deletion resources/icarMovementDeathEventResource.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Event for recording animal death",
"description": "Event for recording animal death on farm.",

"allOf": [{
"$ref": "../resources/icarAnimalEventCoreResource.json"
Expand Down Expand Up @@ -35,6 +35,13 @@
"deathMethod": {
"$ref": "../enums/icarDeathMethodType.json",
"description": "Defines the method of death, including an accident, natural causes, or euthanised."
},
"extendedReasons": {
"description": "Extended reason codes why this animal has died.",
"type": "array",
"items": {
"$ref": "../types/icarReasonIdentifierType.json"
}
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion resources/icarMovementDepartureEventResource.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "Event for recording animal departure",
"description": "Event for recording live animal departure.",

"allOf": [{
"$ref": "../resources/icarAnimalEventCoreResource.json"
Expand All @@ -19,6 +19,13 @@
"consignment": {
"$ref": "../types/icarConsignmentType.json",
"description": "Identifies the consignment of the animal from the holding."
},
"extendedReasons": {
"description": "Extended reason codes why this animal has departed.",
"type": "array",
"items": {
"$ref": "../types/icarReasonIdentifierType.json"
}
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions resources/icarReproDoNotBreedEventResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"type": ["boolean", "null"],
"description": "Set this attribute to true if the animal should not be bred, false if it may now be bred.",
"default": true
},
"extendedReasons": {
"description": "Extended reason codes why this animal should not be bred.",
"type": "array",
"items": {
"$ref": "../types/icarReasonIdentifierType.json"
}
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions types/icarReasonIdentifierType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"description": "Extended reason identifier based on a scheme and ID.",

"allOf": [{
"$ref": "../types/icarIdentifierType.json"
}]
}
6 changes: 6 additions & 0 deletions well-known/icarReasonIdentifierType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Well-known Extended Reason Identifier Schemes

These schemes define country, region, or species-specific extended reason codes for departures, deaths, and do not breed events. If you represent a recording organisation or scheme operator, please edit and "Pull Request" this file to let others know about your extended reason code schemes.

| Short URI | Resolvable URI | Description | Example | Code list or format specification |
| --- | --- | --- | --- | --- |

0 comments on commit d2412a4

Please sign in to comment.