Class: OpenehrRails::Rm::Node

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/openehr_rails/rm/node.rb

Overview

STI base for all LOCATABLE structure nodes of a stored composition (entries, histories, events, item structures, clusters, elements). The inheritance column rm_type stores openEHR type names ("OBSERVATION", "ITEM_TREE", ...) matching canonical JSON _type.

Class Method Summary collapse

Class Method Details

.find_sti_class(type_name) ⇒ Object



34
35
36
# File 'lib/openehr_rails/rm/node.rb', line 34

def find_sti_class(type_name)
  TypeMap.node_class_for(type_name)
end

.sti_class_for(type_name) ⇒ Object



38
39
40
# File 'lib/openehr_rails/rm/node.rb', line 38

def sti_class_for(type_name)
  TypeMap.node_class_for(type_name)
end

.sti_nameObject



30
31
32
# File 'lib/openehr_rails/rm/node.rb', line 30

def sti_name
  TypeMap.rm_type_for(self) || super
end