def delete(record)
      case record
      when Prescription
        delete_child(:prescriptions, record)
      when DoseTracking
        delete_child(:dose_trackings, record)
      when ExtendedPlan
        delete_extended_plan
      else
        logger.warn("Unknown class (record) given to Plan#delete: #{record.class}")
      end
    end
def delete(record)
      case record
      when Prescription
        delete_child(:prescriptions, record)
      when DoseTracking
        delete_child(:dose_trackings, record)
      when ExtendedPlan
        delete_extended_plan
      else
        logger.warn("Unknown class (record) given to Plan#delete: #{record.class}")
      end
    end
Removes the reference of the given instance from this instance.

 @param [ExtendedPlan, Prescription, DoseTracking] record a child record to be removed from this instance