RUFAS.routines.animal.life_cycle.hormone_delivery_schedule module#

class RUFAS.routines.animal.life_cycle.hormone_delivery_schedule.HormoneDeliverySchedule#

Bases: object

This class contains the hormone delivery schedule for the reproduction protocols that involves hormone delivery.

Notes#

The schedule is a dictionary of offset days to a dictionary of events that should happen on that day. The events are:

  • deliver_hormones: a list of hormones to deliver on that day. The supported hormones are: GnRH, PGF, CIDR.

  • set_ai_day: a boolean indicating whether to set the AI day to that day

  • set_conception_rate: a boolean indicating whether to set the conception rate to that day

The schedule is static and is not meant to be instantiated. It is based on the following protocols and their subprotocols:

  • Heifer reproduction protocols and subprotocols:
    • TAI
      • 5dCG2P

      • 5dCGP

    • SynchED
      • 2P

      • CP

  • Cow reproduction protocols and subprotocols:
    • TAI
      • OvSynch 48

      • OvSynch 56

      • CoSynch 72

      • 5d CoSynch

HEIFER_REPRO_PROTOCOLS = {'2P': {0: {'deliver_hormones': ['PGF']}, 14: {'deliver_hormones': ['PGF']}}, '5dCG2P': {0: {'deliver_hormones': ['CIDR']}, 5: {'deliver_hormones': ['PGF']}, 6: {'deliver_hormones': ['PGF']}, 8: {'deliver_hormones': ['GnRH']}, 9: {'set_ai_day': True, 'set_conception_rate': True}}, '5dCGP': {0: {'deliver_hormones': ['CIDR']}, 5: {'deliver_hormones': ['PGF']}, 8: {'deliver_hormones': ['GnRH']}, 9: {'set_ai_day': True, 'set_conception_rate': True}}, 'CP': {0: {'deliver_hormones': ['CIDR']}, 7: {'deliver_hormones': ['PGF']}}}#
COW_REPRO_PROTOCOLS = {'5d CoSynch': {0: {'deliver_hormones': ['GnRH']}, 5: {'deliver_hormones': ['PGF']}, 6: {'deliver_hormones': ['PGF']}, 8: {'deliver_hormones': ['GnRH'], 'set_ai_day': True, 'set_conception_rate': True, 'set_ovsynch_end': True}}, 'CoSynch 72': {0: {'deliver_hormones': ['GnRH']}, 7: {'deliver_hormones': ['PGF']}, 10: {'deliver_hormones': ['GnRH'], 'set_ai_day': True, 'set_conception_rate': True, 'set_ovsynch_end': True}}, 'Double OvSynch': {0: {'deliver_hormones': ['GnRH']}, 7: {'deliver_hormones': ['PGF']}, 10: {'deliver_hormones': ['GnRH']}, 16: {'set_presynch_end': True}}, 'G6G': {0: {'deliver_hormones': ['PGF']}, 2: {'deliver_hormones': ['GnRH']}, 8: {'set_presynch_end': True}}, 'OvSynch 48': {0: {'deliver_hormones': ['GnRH']}, 7: {'deliver_hormones': ['PGF']}, 9: {'deliver_hormones': ['GnRH']}, 10: {'set_ai_day': True, 'set_conception_rate': True, 'set_ovsynch_end': True}}, 'OvSynch 56': {0: {'deliver_hormones': ['GnRH']}, 7: {'deliver_hormones': ['PGF']}, 9: {'deliver_hormones': ['GnRH']}, 10: {'set_ai_day': True, 'set_conception_rate': True, 'set_ovsynch_end': True}}, 'PreSynch': {0: {'deliver_hormones': ['PGF']}, 14: {'deliver_hormones': ['PGF']}, 25: {'set_presynch_end': True}}}#
static get_schedule(animal_category: Literal['heifers', 'cows'], protocol_name: str) dict[int, dict] | None#

Get the hormone delivery schedule for the given animal category and protocol name.

Parameters#

animal_categoryLiteral[‘heifers’, ‘cows’]

The animal category to get the schedule for. Must be either ‘heifers’ or ‘cows’.

protocol_namestr

The name of the protocol to get the schedule for. Must be one of the protocols defined in HEIFER_REPRO_PROTOCOLS or COW_REPRO_PROTOCOLS.

Returns#

dict[int, dict] | None

The hormone delivery schedule for the given animal category and protocol name. None if the animal category or protocol name is invalid.

static get_adjusted_schedule(animal_category: Literal['heifers', 'cows'], protocol_name: str, start_day: int) dict[int, dict] | None#

Get the hormone delivery schedule for the given animal category and protocol name, adjusted to start on the given start day.

Parameters#

animal_categoryLiteral[‘heifers’, ‘cows’]

The animal category to get the schedule for. Must be either ‘heifers’ or ‘cows’.

protocol_namestr

The name of the protocol to get the schedule for. Must be one of the protocols defined in HEIFER_REPRO_PROTOCOLS or COW_REPRO_PROTOCOLS.

start_dayint

The day to start the schedule on.

Returns#

dict[int, dict] | None

The hormone delivery schedule for the given animal category and protocol name, adjusted to start on the given start day. None if the animal category or protocol name is invalid.