OK got it, The issue in the sheep drug case is that every drug has slaughter and milk withdrawal times. Most drugs are not approved for sheep so you must have a vet with a valid client and patient relationship to even use them and drug dosages are much more fluid. When giving a drug to any sheep there is an automatic hold placed on the animal based on the slaughter or milk withdrawal time. A prescription or at a minimum the vet prescribing the drug must be attached to each drug prescribed and if an approved drug is used at a non-approved dosage rate or frequency you need to document that as well. The lot numbers must be kept for every treatment as they can be required to be produced to any state or federal vet at any time.
I’ll have to think whether I can implement such a search system within the context of the links needed to all the various records that get added and updated whenever a drug is given. At a minimum there has to be some enforcement of finishing filling out the drug details within some specified time period. But if you do that how do you go back and edit the sheep record so that the alert for an animal on a slaughter withdrawal is active? things to ponder…
As an overall issue with LambTracker I do not do enough (read any) proper data validation on inputs. This has resulted in some spectacular failures/bugs in the field. A sheep with a ’ in their name fails on a name search due to the fact that Android uses ’ in multiline SQLite queries to denote new lines.
In many ways foreign key constraints are part and parcel of the overall issues with the fragile nature of LambTracker data input verification.
Going forward there needs to be much more robust data validity checking. When we get into things like adding registry data to register new lambs one critical thing is to check for gestational errors (gestation periods that are not normal for the species, or a lamb being born before the sire or dam was born, possibly indicating wrong sire or dam identified or more likely an error on entering in the birth date of the sire or dam). Pedigree errors, tag errors and tracking are also places where data needs to be verified before entry. This isn’t a problem for lambs born into the LambTracker system where the dam is scanned and the sire calculated from the records of both gestation period and the ram the mother was exposed to or the AI insemination date and time but is a problem when entering in historical data into a LambTracker system to complete the records. I’ve run into that in my own flock. Before LambTracker I used spreadsheeps and copying and pasting or re-entering in the data to be imported into LambTracker resulted in some errors. I probably should document the workflows I developed to identify and handle those situations and add them into the LambTracker manual.
This is EXACTLY the sort of programming discussion I am missing and really appreciate.
Thank you for continuing to discuss this here.