class OpenEHR::AM::Archetype::Archetype
Attributes
adl_version[RW]
archetype_id[R]
concept[R]
definition[R]
invariants[RW]
ontology[R]
parent_archetype_id[RW]
uid[RW]
Public Class Methods
create(args ={}) { |archetype| ... }
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 101 def self.create(args ={}, &block) archetype = new(args) if block_given? yield archetype end return archetype end
new(args = {})
click to toggle source
Calls superclass method
# File lib/open_ehr/am/archetype.rb, line 22 def initialize(args = {}) super(args) self.adl_version = args[:adl_version] self.archetype_id = args[:archetype_id] self.uid = args[:uid] self.concept = args[:concept] self.parent_archetype_id = args[:parent_archetype_id] self.definition = args[:definition] self.ontology = args[:ontology] self.invariants = args[:invariants] end
Public Instance Methods
archetype_id=(archetype_id)
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 34 def archetype_id=(archetype_id) if archetype_id.nil? raise ArgumentError, 'archetype_id is mandatory' end @archetype_id = archetype_id end
concept=(concept)
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 41 def concept=(concept) if concept.nil? raise ArgumentError, 'concept is mandatory' end @concept = concept end
concept_name(a_lang)
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 70 def concept_name(a_lang) return @ontology.term_definition(:lang => a_lang, :code => @concept).items[:text] end
constraint_references_valid?()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 74 def constraint_references_valid? end
definition=(definition)
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 48 def definition=(definition) if definition.nil? raise ArgumentError, 'definition is mandatory' end @definition = definition end
internal_references_valid?()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 77 def internal_references_valid? end
is_specialised?()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 80 def is_specialised? end
is_valid?()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 83 def is_valid? end
logical_paths(a_lang)
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 86 def logical_paths(a_lang) end
node_ids_vaild?()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 89 def node_ids_vaild? end
ontology=(ontology)
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 55 def ontology=(ontology) if ontology.nil? raise ArgumentError, 'ontology is mandatory' end @ontology = ontology end
physical_paths()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 92 def physical_paths end
previous_version()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 95 def previous_version end
short_concept_name()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 66 def short_concept_name return @archetype_id.concept_name end
specialisation_depth()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 98 def specialisation_depth end
version()
click to toggle source
# File lib/open_ehr/am/archetype.rb, line 62 def version return @archetype_id.version_id end