Birth Log Time/Date Stamp

Its Calving time :cow2: My favorite time of year on the farm, but there is plenty to record and I’m still trying to figure out some of my workflows.

Calves are registered with an app provided by Department of Ag and I later import them to farmOS using Node-Red and a CSV file. When creating a birth log the birthdate is the current time stamp, but I think it should be the birthdate already assigned to the asset since you need to create the asset first anyway and failing to update the time stamp to the correct birthdate overrides the birthdate already assigned increasing the chance of errors.

I think ultimately I will create a Node - Red flow specifically for importing batches of new born calves that will create the new asset and then add the birth log using the same data, but thought this might still be a feature change worth considering.

1 Like

Just realized its probably not that feasible with the way logs are assigned, perhaps there is just need of a quick form to make it simpler.

1 Like

When creating a birth log the birthdate is the current time stamp, but I think it should be the birthdate already assigned to the asset since you need to create the asset first anyway and failing to update the time stamp to the correct birthdate overrides the birthdate already assigned increasing the chance of errors.

This is true. The Birth log module actually has a bit of logic to automatically update child assets if a birth log is created for them. It will overwrite the child’s birthdate and mother info with what is in the birth log:

perhaps there is just need of a quick form to make it simpler.

Yea, this logic was actually added in farmOS v1 when we created the Birth quick form. The Birth quick form basically handled creating all the child assets, the birth log, and linking them all to the mother/father assets.

Just this morning I began the process of porting this quick form to v2:

https://github.com/farmOS/farmOS/compare/2.x...mstenta:2.x-quick-birth

Still more to do, but it’s a start. Remaining bits (if anyone wants to help):

  • Add Group membership logic (to match v1 form).
  • Form submission logic.
  • Automated tests.
  • Help text to point users to the quick form when they are adding a birth log directly.
1 Like

But it sounds like your workflow will be better to implement in Node Red, since you’re importing from another system…

1 Like

This is the bit that didn’t make sense to me since I’ve uploaded the asset with the correct birthdate, but I suppose the quick form will sort that for manual entries, and I should just include the birth log in my Node Red batch uploads.

One other thing I’ve noticed is the birth Log seems to only have a Mother Animal field and not a Father Animal field, but I see the quick form you are working on has both fields. Does an extra field need to be added to the birth log or is the father simply added to notes?

Also I think the terms Mother an Father are a little unusual for this purpose, all farming packages I’ve used previously would use Dam and Sire as would documentation from the Department of Agriculture. Nothing technically wrong with the terms maybe its a regional thing?

1 Like

This is probably what’s needed, my biggest issue was the records being imported from Department of Agriculture are actually missing parentage data, so I was trying to add the birth logs manually but it’s a bit of a pain. But I’ve just realized that as I have ICBF (Irish Cattle Breeding Federation) membership they actually have API access to my records and can generate far more detailed herd profile reports that I can use.

1 Like

Only the mother gives birth. :slight_smile: So a “birth” log really has no need to reference the father.

The quick form, however, includes a father reference which will be added to the Animal asset record’s “Parents” field. So the quick form saves the “Mother” in two places (the child asset + the birth log) and saves the “Father” only to the child asset, if that makes sense.

Also I think the terms Mother an Father are a little unusual for this purpose, all farming packages I’ve used previously would use Dam and Sire as would documentation from the Department of Agriculture. Nothing technically wrong with the terms maybe its a regional thing?

Hmm yea I think this is going to be a very regional thing - so it feels like “Mother” and “Father” is simplest - everyone understands exactly what that means.

1 Like

OMG… its 2022, you can’t say stuff like that anymore! :rofl:

Well I think there are probably 2 ways a birth log could be viewed, but there is probably no point in me reinventing the wheel, and since I’m only working out my workflow now, it’s probably best to follow that same logic as you have intended.

It may raise another issue though, the asset only has parents fields as opposed to mother and father, I know you’ll probably say the male one is the father but with embryo transfer the female one may not be the genetic mother, I can see that it’s probably possible to add a third parent but this will be too ambiguous for genetic lineage purposes. So dose the quick form you are working on allow for this scenario? I would think there should be a check box and field for surrogate mother that allows the birth log to be assigned to the animal which gave birth while adding only the 2 genetic parents to the Asset that is created.

When I register Claves using the Department of Agricultures App it has 3 fields, Dam, Genetic Dam and Sire.

1 Like

:speak_no_evil:

Curious to hear your thoughts! I think of a Birth log as “the event” - lineage more broadly can be tracked via the asset parents, etc.

Also for what it’s worth, historically the “birth log” came later in the farmOS v1 development history… originally it was just the “Birthdate” field on animals, without a log for it. So when we added Birth logs (along with the birth quick form), it seemed logical to try to tie those two things together via some automated logic.

but with embryo transfer the female one may not be the genetic mother, I can see that it’s probably possible to add a third parent but this will be too ambiguous for genetic lineage purposes. So dose the quick form you are working on allow for this scenario?

Ah great point! No the quick form did not allow for this scenario! But it could! How about if the v2 quick form have three fields: “Birth mother”, “Genetic mother”, and “Genetic father” - and when you submit it, it saves the “Birth mother” to the Birth log, but saves the “Genetic mother/father” to the child asset “Parents”? I think that would cover it nicely.

Here’s what it might look like:

What do you think?

Well it hardly matters as much now as I’ll just subscribe to your version of the “event” but my thoughts I suppose were the event was a log belonging to the calf rather than the cow, previously I was using software which had integration with the Department of Agricultures Database so calving events were centered around creating the calf asset and registering its birth and lineage. Which is not that different to what you will achieve with the quick form anyway (without the quick form it’s not as intuitive). The ease of registering calves was the main reason I used that software, but recently the Department of Agriculture has released their own stand alone calf registering app which helped my decision to move to farmOS, data now flows in the opposite direction with the calf being registered in the Departments database first and then exported to my farmOS database. All I really needed to know was where to store what using the API, so I think I have that sorted now.

That should cover it nicely I think.

1 Like