Spinning this out as a standalone topic from Quick Gestation Calculator Form (1.x) - #6 by Skipper…
Generally speaking, we are developing a nice pattern around “planning” modules (eg: Crop Plan and Grazing Plan mentioned above), which center around a simple relationship between the “plan” object (of which you can have one or many each year), and relationships to the underlying assets and logs that are directly relevent (eg: Crop Plans link to Plant assets, Grazing Plans link to movement logs).
In this case, I’m imagining a new farm_breeding_plan
module that provides a breeding
plan type, and a gestation
plan record type. The latter would link the plan to an animal
asset (the mother), and have an insemination_date
field (representing the “planned” insemination date, similar to the seeding_date
field in crop
plans), and a gestation_days
field (representing the expected days of gestation, similar to the maturity_days
field in crop plans).
With this data model, we could display the information in a gantt chart similar to the ones in the Crop/Grazing plan screenshots links to in my quote above, where each row represents a single gestation. These could be grouped by Animal Type (similar to how the Crop Plan groups by Plant Type or Location, and the Grazing Plan groups by Animal Type or Location - in this case I’m not sure it makes sense to have a “by Location” grouping option, but curious if there are other ideas that would work similarly to the other plan types). Each row would display a colored bar on a timeline that starts with the “planned insemination date”, and ends where the “expected gestation period” ends. Within this colored bar, circles representing the actual logs associated with the mother animal asset would be displayed, giving you quick visibility and access to every relevant event.
In order to make the key events easier to create (I’m thinking specifically about insemination and birth), the plan UI could provide shortcut links to quick forms. The Birth quick form that comes with farmOS provides everything we need to record births. We don’t currently have an Insemination/Breeding quick form, but perhaps that could be added as well. Either way, manually adding logs that reference the mother would result in dots showing up on her timeline, so the quick forms are just handy shortcuts in that regard. We could build the Breeding Plan without a Breeding quick form as a first step, in other words, and work on that separately. This is the beauty of our modular approach to these things: they are all separate components that work together, but can also be built/used independently.
What do others think? If we consider this as the “core” framework for a Breeding Plan module, what other features would you like to see?