class OpenEHR::RM::Composition::Content::Entry::Entry

Attributes

encoding[R]
language[R]
other_participations[RW]
provider[RW]
subject[R]
workflow_id[RW]

Public Class Methods

new(args = { }) click to toggle source
# File lib/openehr/rm/composition/content/entry.rb, line 19
def initialize(args = { })
  super(args)
  self.language = args[:language]
  self.encoding = args[:encoding]
  self.subject = args[:subject]
  self.provider = args[:provider]
  self.other_participations = args[:other_participations]
  self.workflow_id = args[:workflow_id]
end

Public Instance Methods

encoding=(encoding) click to toggle source
# File lib/openehr/rm/composition/content/entry.rb, line 37
def encoding=(encoding)
  if encoding.nil?
    raise ArgumentError, 'encoding is mandatory'
  end
  Encoding.find(encoding.code_string)
  @encoding = encoding
end
language=(language) click to toggle source
# File lib/openehr/rm/composition/content/entry.rb, line 29
def language=(language)
  raise ArgumentError, 'language is mandatory' if language.nil?
  unless Locale::Info.language_code? language.code_string
    raise ArgumentError, 'language code is invalid'
  end
  @language = language
end
subject=(subject) click to toggle source
# File lib/openehr/rm/composition/content/entry.rb, line 45
def subject=(subject)
  raise ArgumentError, 'subject is mandatory' if subject.nil?
  @subject = subject
end
subject_is_self?() click to toggle source
# File lib/openehr/rm/composition/content/entry.rb, line 50
def subject_is_self?
  return @subject.instance_of? PartySelf
end