lib/catissue/domain/specimen.rb
def create_default_collection_event_parameters(rep)
      cep = parent.collection_event_parameters if parent
      user = cep.user if cep
      user ||= scg_collector || rep.user || return
      cep = CaTissue::CollectionEventParameters.new(:specimen => self, :user => user)
      logger.debug { "Created default #{qp} collection event #{cep.qp}." }
      cep
    end
def create_default_collection_event_parameters(rep)
      cep = parent.collection_event_parameters if parent
      user = cep.user if cep
      user ||= scg_collector || rep.user || return
      cep = CaTissue::CollectionEventParameters.new(:specimen => self, :user => user)
      logger.debug { "Created default #{qp} collection event #{cep.qp}." }
      cep
    end
The default CEP user is, by order of preference:
 * this specimen's parent specimen collector
 * this specimen's SCG collector
 * the receiver

 @param [CaTissue::ReceivedEventParameters] the required REP
 @return [CaTissue::CollectionEventParameters] the default CEP