Class: OpenEHR::RM::Demographic::Actor

Inherits:
Party show all
Defined in:
lib/openehr/rm/demographic.rb

Direct Known Subclasses

Agent, Group, Organisation, Person

Constant Summary collapse

LEAGAL_IDENTITY =
'legal identity'

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 Party

#contacts, #details, #identities, #relationships, #reverse_relationships, #uid

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 Party

#parent=

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 = { }) ⇒ Actor

Returns a new instance of Actor.



138
139
140
141
142
# File 'lib/openehr/rm/demographic.rb', line 138

def initialize(args = { })
  super(args)
  self.roles = args[:roles]
  self.languages = args[:languages]
end

Instance Attribute Details

#languagesObject

Returns the value of attribute languages.



136
137
138
# File 'lib/openehr/rm/demographic.rb', line 136

def languages
  @languages
end

#rolesObject

Returns the value of attribute roles.



136
137
138
# File 'lib/openehr/rm/demographic.rb', line 136

def roles
  @roles
end

Instance Method Details

Returns:

  • (Boolean)


151
152
153
154
155
156
157
158
# File 'lib/openehr/rm/demographic.rb', line 151

def has_legal_identity?
  @identities.each do |identity|
    if identity.purpose.value == LEAGAL_IDENTITY
      return true
    end
  end
  return false
end