Class: OpenehrRails::Rm::DvOrdinal

Inherits:
DataValue
  • Object
show all
Defined in:
lib/openehr_rails/rm/data_values.rb

Instance Method Summary collapse

Methods inherited from DataValue

find_sti_class, matching, sti_class_for, sti_name

Instance Method Details

#to_canonical_hashObject



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/openehr_rails/rm/data_values.rb', line 72

def to_canonical_hash
  {
    '_type' => 'DV_ORDINAL',
    'value' => integer_value,
    'symbol' => {
      '_type' => 'DV_CODED_TEXT',
      'value' => text_value,
      'defining_code' => {
        '_type' => 'CODE_PHRASE',
        'terminology_id' => { 'value' => terminology_id || 'local' },
        'code_string' => code_string
      }
    }
  }
end

#valueObject



70
# File 'lib/openehr_rails/rm/data_values.rb', line 70

def value = integer_value