lib/catissue/domain/specimen_collection_group.rb
def make_default_consent_tier_statuses
      return if registration.nil? or registration.consent_tier_responses.empty?
      
      # the consent tiers
      ctses = consent_tier_statuses.map { |cts| cts.consent_tier }
      # ensure that there is a CT status for each consent tier
      registration.consent_tier_responses.each do |ctr|
        ct = ctr.consent_tier
        # skip if there is a status for the response tier
        next if ctses.include?(ct)
        # make a new status
        cts = CaTissue::ConsentTierStatus.new(:consent_tier => ct)
        cts.add_defaults
        consent_tier_statuses << cts
        logger.debug { "Made default #{qp} #{cts.qp} for consent tier #{ct.qp}." }
      end
    end
def make_default_consent_tier_statuses
      return if registration.nil? or registration.consent_tier_responses.empty?
      
      # the consent tiers
      ctses = consent_tier_statuses.map { |cts| cts.consent_tier }
      # ensure that there is a CT status for each consent tier
      registration.consent_tier_responses.each do |ctr|
        ct = ctr.consent_tier
        # skip if there is a status for the response tier
        next if ctses.include?(ct)
        # make a new status
        cts = CaTissue::ConsentTierStatus.new(:consent_tier => ct)
        cts.add_defaults
        consent_tier_statuses << cts
        logger.debug { "Made default #{qp} #{cts.qp} for consent tier #{ct.qp}." }
      end
    end
def make_default_consent_tier_statuses return if registration . nil? or registration . consent_tier_responses . empty? # the consent tiers ctses = consent_tier_statuses . map { | cts | cts . consent_tier } # ensure that there is a CT status for each consent tier registration . consent_tier_responses . each do | ctr | ct = ctr . consent_tier # skip if there is a status for the response tier next if ctses . include? ( ct ) # make a new status cts = CaTissue :: ConsentTierStatus . new ( :consent_tier => ct ) cts . add_defaults consent_tier_statuses << cts logger . debug { "Made default #{qp} #{cts.qp} for consent tier #{ct.qp}." } end end
Makes a consent status for each registration consent.

 @quirk caTissue Bug #156: SCG without consent status displays error.
   A SCG consent tier status is required for each consent tier in the SCG registration.
Makes a consent status for each registration consent .