diff --git a/resources/icarReproEmbryoResource.json b/resources/icarReproEmbryoResource.json index e1375daf..6779fb4d 100644 --- a/resources/icarReproEmbryoResource.json +++ b/resources/icarReproEmbryoResource.json @@ -1,9 +1,13 @@ { "description": "Describes an implanted embryo.", - "allOf": [{ + "allOf": [ + { "$ref": "../resources/icarResource.json" }, + { + "$ref": "../types/icarReproSireInfoType.json" + }, { "type": "object", @@ -30,25 +34,6 @@ "donorURI": { "type": "string", "description": "URI to an AnimalCoreResource for the donor dam." - }, - "sireIdentifiers": { - "type": "array", - "items": { - "$ref": "../types/icarAnimalIdentifierType.json" - }, - "description": "One or more unique scheme/identifier combinations for the sire." - }, - "sireOfficialName": { - "type": "string", - "description": "Official herdbook name of the sire." - }, - "sireURI": { - "type": "string", - "description": "URI to an AnimalCoreResource for the sire." - }, - "sirePrimaryBreed": { - "$ref": "../types/icarBreedIdentifierType.json", - "description": "ICAR Breed code for the sire. The usage of this property is not reasonable if more than one sire is provided." } } } diff --git a/resources/icarReproInseminationEventResource.json b/resources/icarReproInseminationEventResource.json index 405d1e07..7807497d 100644 --- a/resources/icarReproInseminationEventResource.json +++ b/resources/icarReproInseminationEventResource.json @@ -1,9 +1,13 @@ { "description": "Event for recording natural or artificial insemination, including embryo transfer.", - "allOf": [{ + "allOf": [ + { "$ref": "../resources/icarAnimalEventCoreResource.json" }, + { + "$ref": "../types/icarReproSireInfoType.json" + }, { "type": "object", @@ -19,25 +23,6 @@ "inseminationType": { "$ref": "../enums/icarReproInseminationType.json" }, - "sireIdentifiers": { - "type": "array", - "items": { - "$ref": "../types/icarAnimalIdentifierType.json" - }, - "description": "Unique scheme/identifier combinations for the sire, including official ID and Herdbook." - }, - "sireOfficialName": { - "type": "string", - "description": "Official herdbook name of the sire." - }, - "sireURI": { - "type": "string", - "description": "URI to an AnimalCoreResource for the sire." - }, - "sirePrimaryBreed": { - "$ref": "../types/icarBreedIdentifierType.json", - "description": "ICAR Breed code for the sire. The usage of this property is not reasonable if more than one sire is provided." - }, "straw": { "$ref": "../resources/icarReproSemenStrawResource.json", "description": "Details of the straw, which may also include sire details." diff --git a/resources/icarReproSemenStrawResource.json b/resources/icarReproSemenStrawResource.json index 1e11c56f..1477fe79 100644 --- a/resources/icarReproSemenStrawResource.json +++ b/resources/icarReproSemenStrawResource.json @@ -1,9 +1,13 @@ { "description": "Describes a semen straw", - "allOf": [{ + "allOf": [ + { "$ref": "../resources/icarResource.json" }, + { + "$ref": "../types/icarReproSireInfoType.json" + }, { "type": "object", @@ -24,25 +28,6 @@ "description": "RFC3339 UTC date/time of collection (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", "$ref": "../types/icarDateTimeType.json" }, - "sireIdentifiers": { - "type": "array", - "items": { - "$ref": "../types/icarAnimalIdentifierType.json" - }, - "description": "One or more unique scheme/identifier combinations for the sire." - }, - "sireOfficialName": { - "type": "string", - "description": "Official herdbook name of the sire." - }, - "sireURI": { - "type": "string", - "description": "URI to an AnimalCoreResource for the sire." - }, - "sirePrimaryBreed": { - "$ref": "../types/icarBreedIdentifierType.json", - "description": "ICAR Breed code for the sire. The usage of this property is not reasonable if more than one sire is provided." - }, "preservationType": { "$ref": "../enums/icarReproSemenPreservationType.json", "description": "The method of preservation of the semen (liquid, frozen)." diff --git a/types/icarReproSireInfoType.json b/types/icarReproSireInfoType.json new file mode 100644 index 00000000..c551720c --- /dev/null +++ b/types/icarReproSireInfoType.json @@ -0,0 +1,27 @@ +{ + "description": "Describes sire information related to a reproductive event.", + + "type": "object", + + "properties": { + "sireIdentifiers": { + "type": "array", + "items": { + "$ref": "../types/icarAnimalIdentifierType.json" + }, + "description": "One or more unique scheme/identifier combinations for the sire." + }, + "sireOfficialName": { + "type": "string", + "description": "Official herdbook name of the sire." + }, + "sireURI": { + "type": "string", + "description": "URI to an AnimalCoreResource for the sire." + }, + "sirePrimaryBreed": { + "$ref": "../types/icarBreedIdentifierType.json", + "description": "ICAR Breed code for the sire. The usage of this property is not reasonable if more than one sire is provided." + } + } +} \ No newline at end of file diff --git a/types/icarSireRecommendationType.json b/types/icarSireRecommendationType.json index 796af142..f280c7bd 100644 --- a/types/icarSireRecommendationType.json +++ b/types/icarSireRecommendationType.json @@ -1,42 +1,34 @@ { "description": "Gives one possible sire recommended to use on an animal.", - "type": "object", - - "properties": { - "recommendationType": { - "$ref": "../enums/icarRecommendationType.json" - }, - "sireIdentifiers": { - "type": "array", - "items": { - "$ref": "../types/icarAnimalIdentifierType.json" - }, - "description": "Unique scheme/identifier combinations for the sire, including official ID and Herdbook." - }, - "sireOfficialName": { - "type": "string", - "description": "Official herdbook name of the sire." - }, - "sireURI": { - "type": "string", - "description": "URI to an AnimalCoreResource for the sire." + "allOf": [ + { + "$ref": "../types/icarReproSireInfoType.json" }, - "isSexedSemen": { - "type": "boolean", - "description": "True if this is sexed semen." - }, - "sexedGender": { - "$ref": "../enums/icarAnimalGenderType.json", - "description": "Specify Male or Female for sexed semen only." - }, - "parity": { - "type": "integer", - "description": "The parity of the cow for which the recommendation is valid." - }, - "sireRank": { - "type": "integer", - "description": "The rank of the sire in the recommendation, 1 = first choice, 2 = second, ...." + { + "type": "object", + + "properties": { + "recommendationType": { + "$ref": "../enums/icarRecommendationType.json" + }, + "isSexedSemen": { + "type": "boolean", + "description": "True if this is sexed semen." + }, + "sexedGender": { + "$ref": "../enums/icarAnimalGenderType.json", + "description": "Specify Male or Female for sexed semen only." + }, + "parity": { + "type": "integer", + "description": "The parity of the cow for which the recommendation is valid." + }, + "sireRank": { + "type": "integer", + "description": "The rank of the sire in the recommendation, 1 = first choice, 2 = second, ...." + } + } } - } + ] } \ No newline at end of file