Class: OpenEHR::AM::Archetype::Archetype

Inherits:
AuthoredResource
  • Object
show all
Includes:
ADLDefinition
Defined in:
lib/open_ehr/am/archetype.rb

Constant Summary

Constants included from ADLDefinition

OpenEHR::AM::Archetype::ADLDefinition::CURRENT_ADL_VERSION

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Archetype

Returns a new instance of Archetype.



22
23
24
25
26
27
28
29
30
31
32
# 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

Instance Attribute Details

#adl_versionObject

Returns the value of attribute adl_version.



20
21
22
# File 'lib/open_ehr/am/archetype.rb', line 20

def adl_version
  @adl_version
end

#archetype_idObject

Returns the value of attribute archetype_id.



19
20
21
# File 'lib/open_ehr/am/archetype.rb', line 19

def archetype_id
  @archetype_id
end

#conceptObject

Returns the value of attribute concept.



19
20
21
# File 'lib/open_ehr/am/archetype.rb', line 19

def concept
  @concept
end

#definitionObject

Returns the value of attribute definition.



19
20
21
# File 'lib/open_ehr/am/archetype.rb', line 19

def definition
  @definition
end

#invariantsObject

Returns the value of attribute invariants.



20
21
22
# File 'lib/open_ehr/am/archetype.rb', line 20

def invariants
  @invariants
end

#ontologyObject

Returns the value of attribute ontology.



19
20
21
# File 'lib/open_ehr/am/archetype.rb', line 19

def ontology
  @ontology
end

#parent_archetype_idObject

Returns the value of attribute parent_archetype_id.



20
21
22
# File 'lib/open_ehr/am/archetype.rb', line 20

def parent_archetype_id
  @parent_archetype_id
end

#uidObject

Returns the value of attribute uid.



20
21
22
# File 'lib/open_ehr/am/archetype.rb', line 20

def uid
  @uid
end

Class Method Details

.create(args = {}, &block) ⇒ Object



101
102
103
104
105
106
107
# 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

Instance Method Details

#concept_name(a_lang) ⇒ Object



70
71
72
# 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?Boolean

Returns:

  • (Boolean)


74
75
# File 'lib/open_ehr/am/archetype.rb', line 74

def constraint_references_valid?
end

#internal_references_valid?Boolean

Returns:

  • (Boolean)


77
78
# File 'lib/open_ehr/am/archetype.rb', line 77

def internal_references_valid?
end

#is_specialised?Boolean

Returns:

  • (Boolean)


80
81
# File 'lib/open_ehr/am/archetype.rb', line 80

def is_specialised?
end

#is_valid?Boolean

Returns:

  • (Boolean)


83
84
# File 'lib/open_ehr/am/archetype.rb', line 83

def is_valid?
end

#logical_paths(a_lang) ⇒ Object



86
87
# File 'lib/open_ehr/am/archetype.rb', line 86

def logical_paths(a_lang) 
end

#node_ids_vaild?Boolean

Returns:

  • (Boolean)


89
90
# File 'lib/open_ehr/am/archetype.rb', line 89

def node_ids_vaild?
end

#physical_pathsObject



92
93
# File 'lib/open_ehr/am/archetype.rb', line 92

def physical_paths
end

#previous_versionObject



95
96
# File 'lib/open_ehr/am/archetype.rb', line 95

def previous_version
end

#short_concept_nameObject



66
67
68
# File 'lib/open_ehr/am/archetype.rb', line 66

def short_concept_name
  return @archetype_id.concept_name
end

#specialisation_depthObject



98
99
# File 'lib/open_ehr/am/archetype.rb', line 98

def specialisation_depth
end

#versionObject



62
63
64
# File 'lib/open_ehr/am/archetype.rb', line 62

def version
  return @archetype_id.version_id
end