Class: OpenEHR::RM::Common::Archetyped::Locatable

Inherits:
Pathable
  • Object
show all
Includes:
LocaterConstants
Defined in:
lib/openehr/rm/common/archetyped.rb

Constant Summary

Constants included from LocaterConstants

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

Instance Attribute Summary collapse

Attributes inherited from Pathable

#parent

Instance Method Summary collapse

Methods inherited from Pathable

#item_at_path, #items_at_path, normalize_path, path_attribute, path_attributes, #path_children, #path_exists?, #path_of_item, #path_unique?, select_by_predicate

Constructor Details

#initialize(args = { }) ⇒ Locatable

Returns a new instance of Locatable.



156
157
158
159
160
161
162
163
164
# File 'lib/openehr/rm/common/archetyped.rb', line 156

def initialize(args = { })
  super(args)
  self.archetype_node_id = args[:archetype_node_id]
  self.name = args[:name]
  self.links = args[:links]
  self.uid = args[:uid]
  self.archetype_details = args[:archetype_details]
  self.feeder_audit = args[:feeder_audit]
end

Instance Attribute Details

#archetype_detailsObject

Returns the value of attribute archetype_details.



154
155
156
# File 'lib/openehr/rm/common/archetyped.rb', line 154

def archetype_details
  @archetype_details
end

#archetype_node_idObject

Returns the value of attribute archetype_node_id.



153
154
155
# File 'lib/openehr/rm/common/archetyped.rb', line 153

def archetype_node_id
  @archetype_node_id
end

#feeder_auditObject

Returns the value of attribute feeder_audit.



154
155
156
# File 'lib/openehr/rm/common/archetyped.rb', line 154

def feeder_audit
  @feeder_audit
end

Returns the value of attribute links.



153
154
155
# File 'lib/openehr/rm/common/archetyped.rb', line 153

def links
  @links
end

#nameObject

Returns the value of attribute name.



153
154
155
# File 'lib/openehr/rm/common/archetyped.rb', line 153

def name
  @name
end

#uidObject

Returns the value of attribute uid.



154
155
156
# File 'lib/openehr/rm/common/archetyped.rb', line 154

def uid
  @uid
end

Instance Method Details

#conceptObject



187
188
189
190
191
192
193
194
# File 'lib/openehr/rm/common/archetyped.rb', line 187

def concept
  if self.is_archetype_root?
    return OpenEHR::RM::DataTypes::Text::DvText.new(:value =>
                      @archetype_details.archetype_id.concept_name)
  else
    raise ArgumentError, 'this is not root'
  end
end

#is_archetype_root?Boolean

Returns:

  • (Boolean)


196
197
198
# File 'lib/openehr/rm/common/archetyped.rb', line 196

def is_archetype_root?
  !archetype_details.nil?
end