Class: OpenEHR::RM::DataStructures::ItemStructure::Representation::Element

Inherits:
Item show all
Defined in:
lib/openehr/rm/data_structures/item_structure/representation.rb

Constant Summary collapse

NULL_FLAVOUR_CODES =

openEHR "Null flavours" code set (terminology_id "openehr"): 271 no information, 272 masked, 273 not applicable, 253 unknown.

%w[271 272 273 253].freeze

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, normalize_path, path_attribute, path_attributes, #path_children, #path_exists?, #path_of_item, #path_unique?, select_by_predicate

Constructor Details

#initialize(args = {}) ⇒ Element

Returns a new instance of Element.



26
27
28
29
30
# File 'lib/openehr/rm/data_structures/item_structure/representation.rb', line 26

def initialize(args = {})
  super(args)
  self.value = args[:value]
  self.null_flavor= args[:null_flavor]
end

Instance Attribute Details

#null_flavorObject Also known as: null_flavour

Returns the value of attribute null_flavor.



24
25
26
# File 'lib/openehr/rm/data_structures/item_structure/representation.rb', line 24

def null_flavor
  @null_flavor
end

#valueObject

Returns the value of attribute value.



23
24
25
# File 'lib/openehr/rm/data_structures/item_structure/representation.rb', line 23

def value
  @value
end

Instance Method Details

#is_null?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/openehr/rm/data_structures/item_structure/representation.rb', line 43

def is_null?
  return @value.nil?
end