Add a date of death to a litter, and use it to calculate age. Accept whatever date of death is input as fact when calculating age, even if the age is completely impossible, it just keeps the logic simpler.
Also calculate the age if the rat is not dead. Use the following logic:
If the rat is under 3 years, display the age.
If the rat is 3-4 years, display the age with a question mark icon next to it and a tooltip reading something like "This rat seems very old, age will no longer be calculated after 4 years. Make sure to set a date of death if you know it.".
Add a date of death to a litter, and use it to calculate age. Accept whatever date of death is input as fact when calculating age, even if the age is completely impossible, it just keeps the logic simpler.
Also calculate the age if the rat is not dead. Use the following logic: