Skip to content

Commit

Permalink
Merge pull request #55 from erwinspeybroeck/master
Browse files Browse the repository at this point in the history
Added mating recommendations and heat events
  • Loading branch information
cookeac authored Dec 13, 2019
2 parents 784bf30 + df12527 commit 959261d
Show file tree
Hide file tree
Showing 14 changed files with 353 additions and 14 deletions.
158 changes: 148 additions & 10 deletions Release Candidate Messages/exampleUrlScheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,11 +781,11 @@
}
}
},
"/locations/{location-scheme}/{location-id}/Pregnancy-Diagnosis": {
"/locations/{location-scheme}/{location-id}/pregnancy-checks": {
"get": {
"operationId": "get-pregnancy-diagnosis",
"summary": "Get the pregnancy diagnosis for a certain location",
"description": "# Purpose\nProvides the pregnancy diagnosis on a location\n",
"operationId": "get-pregnancy-checks",
"summary": "Get the pregnancy checks for a certain location",
"description": "# Purpose\nProvides the pregnancy checks on a location\n",
"tags": [
"release-candidate-reproduction"
],
Expand Down Expand Up @@ -822,7 +822,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "icarReproPregnancyDiagnosisEventResource.json"
"$ref": "icarReproPregnancyCheckEventResource.json"
}
}
}
Expand Down Expand Up @@ -850,7 +850,76 @@
}
}
},
"/locations/{location-scheme}/{location-id}/Inseminations": {
"/locations/{location-scheme}/{location-id}/heats": {
"get": {
"operationId": "get-Heats",
"summary": "Get the heats for a certain location",
"description": "# Purpose\nProvides the Heats on a location\n",
"tags": [
"release-candidate-reproduction"
],
"parameters": [
{
"name": "location-scheme",
"in": "path",
"description": "The scheme id for the location identifier.",
"required": true,
"schema": {
"type": "string",
"enum": [
"nl.ubn",
"de.farmid",
"be.pen"
]
}
},
{
"name": "location-id",
"in": "path",
"description": "The unique identifier for the location.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful. The response contains the heats for the given location",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "icarReproHeatEventResource.json"
}
}
}
}
},
"default": {
"description": "An error has occured while handling the request. Check the content of the message for the error details.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "A default response containing only a list of errors"
}
}
}
}
}
}
},
"/locations/{location-scheme}/{location-id}/inseminations": {
"get": {
"operationId": "get-Inseminations",
"summary": "Get the inseminations for a certain location",
Expand Down Expand Up @@ -919,7 +988,7 @@
}
}
},
"/locations/{location-scheme}/{location-id}/Drying-Offs": {
"/locations/{location-scheme}/{location-id}/drying-offs": {
"get": {
"operationId": "get-Drying-Offs",
"summary": "Get the drying off for a certain location",
Expand Down Expand Up @@ -988,7 +1057,7 @@
}
}
},
"/locations/{location-scheme}/{location-id}/Abortions": {
"/locations/{location-scheme}/{location-id}/abortions": {
"get": {
"operationId": "get-Abortions",
"summary": "Get the abortion events for a certain location",
Expand Down Expand Up @@ -1057,7 +1126,7 @@
}
}
},
"/locations/{location-scheme}/{location-id}/Parturitions": {
"/locations/{location-scheme}/{location-id}/parturitions": {
"get": {
"operationId": "get-Parturitions",
"summary": "Get the Parturition events for a certain location",
Expand Down Expand Up @@ -1119,11 +1188,80 @@
}
},
"description": "A default response containing only a list of errors"
}
}
}
}
}
}
},
"/locations/{location-scheme}/{location-id}/mating-recommendations": {
"get": {
"operationId": "get-mating-recommendations",
"summary": "Get the mating recommendations for a certain location",
"description": "# Purpose\nProvides the mating recommendations on a location\n",
"tags": [
"release-candidate-reproduction"
],
"parameters": [
{
"name": "location-scheme",
"in": "path",
"description": "The scheme id for the location identifier.",
"required": true,
"schema": {
"type": "string",
"enum": [
"nl.ubn",
"de.farmid",
"be.pen"
]
}
},
{
"name": "location-id",
"in": "path",
"description": "The unique identifier for the location.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful. The response contains the mating recommendations for the given location",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "icarReproMatingRecommendationResource.json"
}
}
}
}
},
"default": {
"description": "An error has occured while handling the request. Check the content of the message for the error details.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "A default response containing only a list of errors"
}
}
}
}
}
}
}
},
Expand All @@ -1140,4 +1278,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "string",
"description": "the defaults are described above, only use this field when differed from the default. Use UN/CEFACT codes."
},
"icarMeasuringDevice": {
"measuringDevice": {
"type": "string",
"description": "a more readable device class ID that contains manufacturer, device, hardware and software versions in a way that is similar to the USB specification. This will need more investigation."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"$ref": "icarAnimalMilkingSampleType.json"
}
},
"icarMilkCharacteristics": {
"milkCharacteristics": {
"type": "array",
"items": {
"$ref": "icarMilkCharacteristicsType.json"
Expand Down
10 changes: 10 additions & 0 deletions Release Candidate Messages/icarRecommendationType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "string",
"description": "the type of recommendation (SireRecommended, RecommendationImpossible, BeefSire, NoBreedingSire",
"enum": [
"SireRecommended",
"RecommendationImpossible",
"BeefSire",
"NoBreedingSire"
]
}
8 changes: 8 additions & 0 deletions Release Candidate Messages/icarReproHeatCertaintyType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "string",
"description": "The certainty of a specific heat",
"enum": [
"InHeat",
"Suspect"
]
}
10 changes: 10 additions & 0 deletions Release Candidate Messages/icarReproHeatDetectionMethodType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "string",
"description": "The method of detecting the heat of an animal",
"enum": [
"Chemical",
"Visual",
"Pedometer",
"Other"
]
}
77 changes: 77 additions & 0 deletions Release Candidate Messages/icarReproHeatEventResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"type": "object",

"description": "Event for recording heats.",

"required": [
"id",
"animal",
"eventDateTime"
],

"allOf": [{
"$ref": "icarEventCoreResource.json"
},
{
"properties": {
"heatDetectionMethod": {
"$ref": "icarReproHeatDetectionMethodType.json"
},
"certainty": {
"$ref": "icarReproHeatCertaintyType.json"
},
"expirationDateTime": {
"$ref": "icarDateTimeType.json",
"description": "Date Time when the heat will end. ISO8601 date and time. MUST contain time zone. UTC recommended."
},
"visualDetection": {
"type": "object",
"description": "Specific info when the heat was visually detected.",
"properties": {
"heatSigns": {
"type": "array",
"items": {
"$ref": "icarReproHeatSignType.json",
"description": "Array of heat signs."
}
},
"heatIntensity": {
"$ref": "icarReproHeatIntensityType.json"
}
}
},
"heatReportScrSenseTime": {
"type": "object",
"description": "Specific info when the heat was detected by SenseTime from SCR",
"properties": {
"breedingWindow": {
"type": "number",
"format": "integer",
"description": "Number of hours to AI."
},
"heatIndex": {
"type": "number",
"format": "integer",
"description": "Gives an indication of the certainty of the heat indication."
}
}
},
"heatReportNedapCowControl": {
"type": "object",
"description": "Specific info when the heat was detected by CowControl from NEDAP",
"properties": {
"expirationDateTime": {
"$ref": "icarDateTimeType.json",
"description": "Date Time when the heat will end. ISO8601 date and time. MUST contain time zone. UTC recommended."
},
"heatChance": {
"type": "number",
"format": "integer",
"description": "Gives an indication of the certainty of the heat indication."
}
}
}
}
}
]
}
11 changes: 11 additions & 0 deletions Release Candidate Messages/icarReproHeatIntensityType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "string",
"description": "The method of insemination (Very weak,Weak,Normal,Strong,Very strong)",
"enum": [
"VeryWeak",
"Weak",
"Normal",
"Strong",
"VeryStrong"
]
}
12 changes: 12 additions & 0 deletions Release Candidate Messages/icarReproHeatSignType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "string",
"description": "The signs of the heat (Slime,Clear slime,Interested in other animals,Stands under,Bawling,Blood)",
"enum": [
"Slime",
"ClearSlime",
"InterestedInOtherAnimals",
"Bawling",
"Blood",
"StandsUnder"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"$ref": "icarReproSemenStrawResource.json",
"description": "Details of the straw, which may also include sire details."
},
"eventEndDateTime": {
"$ref": "icarDateTimeType.json",
"description": "To be used in case of running with a bull to end the period. ISO8601 date and time. MUST contain time zone. UTC recommended."
},
"semenFromFarmStocks": {
"type": "boolean",
"description": "True if the semen is from the farmer's own stocks (false if supplied by technician)."
Expand Down
Loading

0 comments on commit 959261d

Please sign in to comment.