def to_model
      lm = low.try(:to_model)
      hm = high.try(:to_model)
      wm = width.try(:to_model)
      model_type = type
      if @entry.at_xpath('./cda:uncertainRange', HQMF2::Document::NAMESPACES)
        model_type = 'IVL_PQ'
      end

      if generate_any_value?(lm, hm)
        # Generate AnyValue if the only elements in the range are AnyValues.
        HQMF::AnyValue.new
      elsif generate_value?(lm, hm)
        # Generate a singel value if both low and high are the same
        HQMF::Value.new(lm.type, nil, lm.value, lm.inclusive?, lm.derived?, lm.expression)
      else
        HQMF::Range.new(model_type, lm, hm, wm)
      end
    end
def to_model
      lm = low.try(:to_model)
      hm = high.try(:to_model)
      wm = width.try(:to_model)
      model_type = type
      if @entry.at_xpath('./cda:uncertainRange', HQMF2::Document::NAMESPACES)
        model_type = 'IVL_PQ'
      end

      if generate_any_value?(lm, hm)
        # Generate AnyValue if the only elements in the range are AnyValues.
        HQMF::AnyValue.new
      elsif generate_value?(lm, hm)
        # Generate a singel value if both low and high are the same
        HQMF::Value.new(lm.type, nil, lm.value, lm.inclusive?, lm.derived?, lm.expression)
      else
        HQMF::Range.new(model_type, lm, hm, wm)
      end
    end
Generates this classes hqmf-model equivalent