def to_model
      mv = value.try(:to_model)
      met = effective_time.try(:to_model)
      mtr = temporal_references.collect(&:to_model)
      mso = subset_operators.collect(&:to_model)
      field_values = retrieve_field_values_model_for_model

      retrieve_title_and_description_for_model unless @variable || @derivation_operator

      @code_list_id = nil if @derivation_operator

      # prevent json model generation of empty children and comments
      cc = children_criteria.present? ? children_criteria : nil
      comments = @comments.present? ? @comments : nil

      HQMF::DataCriteria.new(id, title, nil, description, @code_list_id, cc, derivation_operator, @definition, status,
                             mv, field_values, met, retrieve_code_system_for_model, @negation, @negation_code_list_id,
                             mtr, mso, @specific_occurrence, @specific_occurrence_const, @source_data_criteria,
                             comments, @variable)
    end
def to_model
      mv = value.try(:to_model)
      met = effective_time.try(:to_model)
      mtr = temporal_references.collect(&:to_model)
      mso = subset_operators.collect(&:to_model)
      field_values = retrieve_field_values_model_for_model

      retrieve_title_and_description_for_model unless @variable || @derivation_operator

      @code_list_id = nil if @derivation_operator

      # prevent json model generation of empty children and comments
      cc = children_criteria.present? ? children_criteria : nil
      comments = @comments.present? ? @comments : nil

      HQMF::DataCriteria.new(id, title, nil, description, @code_list_id, cc, derivation_operator, @definition, status,
                             mv, field_values, met, retrieve_code_system_for_model, @negation, @negation_code_list_id,
                             mtr, mso, @specific_occurrence, @specific_occurrence_const, @source_data_criteria,
                             comments, @variable)
    end
Generates this classes hqmf-model equivalent