lib/catissue/domain/specimen.rb
def withdraw_consent(consent_tier=nil)
      if consent_tier.nil? then
        return specimen_collection_group.consent_tier_statuses.each { |cts| withdraw_consent(cts.consent_tier) }
      end
      tgt = consent_tier_statuses.detect { |cts| cts.consent_tier.matches?(consent_tier) }
      if tgt.nil? then
        consent_tier_statuses << tgt = ConsentTierStatus.new(:consent_tier => consent_tier)
      end
      tgt.status = 'Withdrawn'
    end
def withdraw_consent(consent_tier=nil)
      if consent_tier.nil? then
        return specimen_collection_group.consent_tier_statuses.each { |cts| withdraw_consent(cts.consent_tier) }
      end
      tgt = consent_tier_statuses.detect { |cts| cts.consent_tier.matches?(consent_tier) }
      if tgt.nil? then
        consent_tier_statuses << tgt = ConsentTierStatus.new(:consent_tier => consent_tier)
      end
      tgt.status = 'Withdrawn'
    end
Withdraws consent for this Specimen as follows:
 * If a consent tier is provided, then the SCG {CaTissue::ConsentTierStatus} with the
   given consent tier is withdrawn.
 * Otherwise, all SCG consents are withdrawn.

 @param [CaTissue::ConsentTier, nil] consent_tier the optional consent tier to withdraw
 @raise [Jinx::ValidationError] if there is no SCG consent status for the given consent tier