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, #path_exists?, #path_of_item, #path_unique?

Constructor Details

#initialize(args = { }) ⇒ Locatable

Returns a new instance of Locatable.



49
50
51
52
53
54
55
56
57
# File 'lib/openehr/rm/common/archetyped.rb', line 49

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.



47
48
49
# File 'lib/openehr/rm/common/archetyped.rb', line 47

def archetype_details
  @archetype_details
end

#archetype_node_idObject

Returns the value of attribute archetype_node_id.



46
47
48
# File 'lib/openehr/rm/common/archetyped.rb', line 46

def archetype_node_id
  @archetype_node_id
end

#feeder_auditObject

Returns the value of attribute feeder_audit.



47
48
49
# File 'lib/openehr/rm/common/archetyped.rb', line 47

def feeder_audit
  @feeder_audit
end

Returns the value of attribute links.



46
47
48
# File 'lib/openehr/rm/common/archetyped.rb', line 46

def links
  @links
end

#nameObject

Returns the value of attribute name.



46
47
48
# File 'lib/openehr/rm/common/archetyped.rb', line 46

def name
  @name
end

#uidObject

Returns the value of attribute uid.



47
48
49
# File 'lib/openehr/rm/common/archetyped.rb', line 47

def uid
  @uid
end

Instance Method Details

#conceptObject



80
81
82
83
84
85
86
87
# File 'lib/openehr/rm/common/archetyped.rb', line 80

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

#is_archetype_root?Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/openehr/rm/common/archetyped.rb', line 89

def is_archetype_root?
  !archetype_details.nil?
end