lib/catissue/domain/specimen_collection_group.rb
def default_collection_event
      return if registration.nil?
      pcl = registration.protocol || return
      # if no protocol event, then add the default event
      pcl.add_defaults if pcl.events.empty?
      ev = pcl.sorted_events.first || return
      logger.debug { "Default #{qp} collection event is the registration protocol #{pcl.qp} first event #{ev.qp}." }
      ev
    end
def default_collection_event
      return if registration.nil?
      pcl = registration.protocol || return
      # if no protocol event, then add the default event
      pcl.add_defaults if pcl.events.empty?
      ev = pcl.sorted_events.first || return
      logger.debug { "Default #{qp} collection event is the registration protocol #{pcl.qp} first event #{ev.qp}." }
      ev
    end
Returns the first event in the protocol registered with this SCG.