class HQMF2::Coded

Represents a HQMF CD value which has a code and codeSystem

Public Class Methods

new(entry) click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 216
def initialize(entry)
  @entry = entry
end

Public Instance Methods

code() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 228
def code
  attr_val('./@code')
end
code_list_id() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 232
def code_list_id
  attr_val('./@valueSet')
end
derived?() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 244
def derived?
  false
end
system() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 224
def system
  attr_val('./@codeSystem')
end
title() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 236
def title
  attr_val('./*/@value')
end
to_model() click to toggle source

Generates this classes hqmf-model equivalent

# File lib/hqmf-parser/2.0/types.rb, line 253
def to_model
  HQMF::Coded.new(type, system, code, code_list_id, title)
end
type() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 220
def type
  attr_val('./@xsi:type') || 'CD'
end
unit() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 248
def unit
  nil
end
value() click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 240
def value
  code
end