-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unknown" to be added in icarAnimalGenderType #199
Comments
This is because null is achieved in JSON by not specifying the field or leaving it blank.
Andrew Cooke, Managing Director, Rezare Systems
m: +64-27-5570822 p: +64-7-8570822
…________________________________
From: Ditlev Rosendahl Baun <notifications@github.com>
Sent: Friday, February 26, 2021 9:01:28 PM
To: adewg/ICAR <ICAR@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [adewg/ICAR] "Unknown" to be added in icarAnimalGenderType (#199)
Hi,
We are missing the opportunity to select "unknown" in gendertype.
in case of stillborn we have many registrations with unknown gender.
In generel we are missing the "unknown" (or NULL) opportunity in the Enum collection
BR
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#199>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKZG77NHQWNBNT7HZ6TRUJDTA5INRANCNFSM4YH7MQWQ>.
|
Hello Andrew Thankyou for fast reply. :) It should have nullable: true and null defined in the list of enum values. I understand that it is weird having null in ie. the gender enum, but if you don't take incomplete data into account, I only see 2 possible implementations for data providers:
Whether the enums are made nullable or an "unknown" enum is added doesn't matter to us as long as the case of missing data can be represented. BR David |
I think the point here is that the "gender" field on the animalCoreResource is mandatory. Hence, leaving the field out is not an option. Setting it to null would result in an error, I believe, we'll indeed have to allow null values there or make the field not mandatory. |
Yes, exactly, there is not a problem to define fields as nullable while implementing the standard, but would this then conflict with ADE definitions? Also an animal identifier should not be a mandatory while registering parturition, while for stillborn animal it is not required. |
The previous (XML-based) ADE specification had gender as a mandatory field, with values Male and Female. We brought that across into the JSON specification, and added MaleNeuter, FemaleNeuter, MaleCryptorchid, but we did not cater for Unknown (interestingly enough, the schema we took these additional values from, datalinker.org DID support unknown). The case of progeny listed in a parturition event is a valid case for unknown gender. It seems there are two solutions to the gender problem:
I believe the first of these options is easier, but will require documentation. Comments? The second issue is that when icarAnimalCoreResource is reused in the array of progeny for an icarReproParturitionEventResource, we might not have an identifier to provide if the animal is untagged. I can see three possible solutions (there may be more):
I'm not sure about any of these. The third item arguably avoids breaking changes and unintended side effects, but would require documentation and consistency of use! Thoughts from others? |
I have another comment on the issue with gender. In my opinion, adding an "Unknown" enum may be the best solution regarding communication, as it clearly specifies why there is no value and when it is okay to omit it. The documentation could help explain what nullable or optional really means, but I think it would be safer to have the enum describe it too and it forces developers to make an active decision. |
As for the first part, I'd also vote for adding "Unkown" to the enum. This should be a non-breaking change for existing communication. Newer clients could make trouble, of course, but we have the version identifier on the spec for that. So it isn't really backwards compatible, but at least it's just an extension that you can implement between to parties whenever you are ready. As for the reproParturitionEventResource: IMHO for a simple solution I wouldn't change anything at all. I think putting the burden onto the systems to generate an additional DB id for this animal is OK. Yes, that means another dead entry in the database, but there will be many anyway. |
I would vote for adding "Unknown" as a new value for icarAnimalGenderType -type. |
I think most I&R systems are using a STILLBIRTH event to have this reported. |
New value is added to enumeration in PR#204 , closing this ticket. |
Hi,
We are missing the opportunity to select "unknown" in gendertype.
in case of stillborn we have many registrations with unknown gender.
In generel we are missing the "unknown" (or NULL) opportunity in the Enum collection
BR
The text was updated successfully, but these errors were encountered: