Class: OpenEHR::RM::Common::Generic::RevisionHistory

Inherits:
Object
  • Object
show all
Defined in:
lib/open_ehr/rm/common/generic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = { }) ⇒ RevisionHistory

Returns a new instance of RevisionHistory.



50
51
52
# File 'lib/open_ehr/rm/common/generic.rb', line 50

def initialize(args = { })
  self.items = args[:items]
end

Instance Attribute Details

#itemsObject

Returns the value of attribute items.



48
49
50
# File 'lib/open_ehr/rm/common/generic.rb', line 48

def items
  @items
end

Instance Method Details

#most_recent_versionObject



61
62
63
# File 'lib/open_ehr/rm/common/generic.rb', line 61

def most_recent_version
  return @items.last.version_id.value
end

#most_recent_version_time_committedObject



65
66
67
# File 'lib/open_ehr/rm/common/generic.rb', line 65

def most_recent_version_time_committed
  return @items.last.audits.first.time_committed.value
end