lib/catissue/domain/specimen.rb
def create_derived(params)
      spc = super
      spc.label ||= "#{label}_#{children.size}" if label
      spc.specimen_collection_group = specimen_collection_group
      # if the derived specimen is the same type as this parent specimen,
      # then decrement this parent's quantity by the derived specimen amount
      decrement_derived_quantity(spc) if specimen_type == spc.specimen_type
      spc
    end
def create_derived(params)
      spc = super
      spc.label ||= "#{label}_#{children.size}" if label
      spc.specimen_collection_group = specimen_collection_group
      # if the derived specimen is the same type as this parent specimen,
      # then decrement this parent's quantity by the derived specimen amount
      decrement_derived_quantity(spc) if specimen_type == spc.specimen_type
      spc
    end
def create_derived ( params ) spc = super spc . label ||= "#{label}_#{children.size}" if label spc . specimen_collection_group = specimen_collection_group # if the derived specimen is the same type as this parent specimen, # then decrement this parent's quantity by the derived specimen amount decrement_derived_quantity ( spc ) if specimen_type == spc . specimen_type spc end
Delegate to {AbstractSpecimen#create_derived} and add a default label if necessary. The default label
 is this Specimen label appended with an underscore and the number of children, e.g. +TB-0023434_1+
 for the first child of a parent with label +TB-0023434+.
Delegate to { AbstractSpecimen#create_derived } and add a default label if necessary . The default label is this Specimen label appended with an underscore and the number of children e . g . + TB - 0023434_1 + for the first child of a parent with label + TB - 0023434 + .