Class: OpenEHR::RM::DataStructures::History::Event

Inherits:
Common::Archetyped::Locatable show all
Defined in:
lib/openehr/rm/data_structures/history.rb

Direct Known Subclasses

IntervalEvent, PointEvent

Constant Summary

Constants included from Common::Archetyped::LocaterConstants

Common::Archetyped::LocaterConstants::CONTENT_PATH_SEPARATOR, Common::Archetyped::LocaterConstants::CURRENT_TRANSACTION_ID, Common::Archetyped::LocaterConstants::FRAGMENT_SEPARATOR, Common::Archetyped::LocaterConstants::MULTIPART_ID_DELIMITER, Common::Archetyped::LocaterConstants::ORGANIZER_PATH_SEPARATOR

Instance Attribute Summary collapse

Attributes inherited from Common::Archetyped::Locatable

#archetype_details, #archetype_node_id, #feeder_audit, #links, #name, #uid

Attributes inherited from Common::Archetyped::Pathable

#parent

Instance Method Summary collapse

Methods inherited from Common::Archetyped::Locatable

#concept, #is_archetype_root?

Methods inherited from Common::Archetyped::Pathable

#item_at_path, #items_at_path, #path_exists?, #path_of_item, #path_unique?

Constructor Details

#initialize(args = { }) ⇒ Event

Returns a new instance of Event.



50
51
52
53
54
55
# File 'lib/openehr/rm/data_structures/history.rb', line 50

def initialize(args = { })
  super(args)
  self.data = args[:data]
  self.time = args[:time]
  self.state = args[:state]
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



47
48
49
# File 'lib/openehr/rm/data_structures/history.rb', line 47

def data
  @data
end

#stateObject

Returns the value of attribute state.



48
49
50
# File 'lib/openehr/rm/data_structures/history.rb', line 48

def state
  @state
end

#timeObject

Returns the value of attribute time.



47
48
49
# File 'lib/openehr/rm/data_structures/history.rb', line 47

def time
  @time
end

Instance Method Details

#offsetObject



67
68
69
# File 'lib/openehr/rm/data_structures/history.rb', line 67

def offset
  return @time.diff(@parent.origin)
end