[372] | 1 | include OpenEHR::RM::Common::Resource
|
---|
[4] | 2 |
|
---|
[372] | 3 | module OpenEHR
|
---|
[4] | 4 | module AM
|
---|
| 5 | module Archetype
|
---|
[372] | 6 | module ADLDefinition
|
---|
| 7 | include OpenEHR::RM::Support::Terminology
|
---|
[4] | 8 | # include OpenEHR::RM::Support::Terminology::OpenEHR_Code_Set_Identifier
|
---|
[24] | 9 | CURRENT_ADL_VERSION = "1.4"
|
---|
[4] | 10 | end
|
---|
[21] | 11 |
|
---|
[372] | 12 | class Archetype < AuthoredResource
|
---|
| 13 | include ADLDefinition
|
---|
| 14 | attr_reader :archetype_id, :concept, :definition, :ontology
|
---|
| 15 | attr_accessor :uid, :adl_version, :parent_archetype_id, :invariants
|
---|
[4] | 16 |
|
---|
[21] | 17 | def initialize(args = {})
|
---|
[372] | 18 | super(args)
|
---|
| 19 | self.adl_version = args[:adl_version]
|
---|
| 20 | self.archetype_id = args[:archetype_id]
|
---|
| 21 | self.uid = args[:uid]
|
---|
| 22 | self.concept = args[:concept]
|
---|
| 23 | self.parent_archetype_id = args[:parent_archetype_id]
|
---|
| 24 | self.definition = args[:definition]
|
---|
| 25 | self.ontology = args[:ontology]
|
---|
| 26 | self.invariants = args[:invariants]
|
---|
[4] | 27 | end
|
---|
| 28 |
|
---|
[372] | 29 | def archetype_id=(archetype_id)
|
---|
| 30 | if archetype_id.nil?
|
---|
| 31 | raise ArgumentError, 'archetype_id is mandatory'
|
---|
| 32 | end
|
---|
| 33 | @archetype_id = archetype_id
|
---|
| 34 | end
|
---|
| 35 |
|
---|
| 36 | def concept=(concept)
|
---|
| 37 | if concept.nil?
|
---|
| 38 | raise ArgumentError, 'concept is mandatory'
|
---|
| 39 | end
|
---|
| 40 | @concept = concept
|
---|
| 41 | end
|
---|
| 42 |
|
---|
| 43 | def definition=(definition)
|
---|
| 44 | if definition.nil?
|
---|
| 45 | raise ArgumentError, 'definition is mandatory'
|
---|
| 46 | end
|
---|
| 47 | @definition = definition
|
---|
| 48 | end
|
---|
| 49 |
|
---|
| 50 | def ontology=(ontology)
|
---|
| 51 | if ontology.nil?
|
---|
| 52 | raise ArgumentError, 'ontology is mandatory'
|
---|
| 53 | end
|
---|
| 54 | @ontology = ontology
|
---|
| 55 | end
|
---|
| 56 |
|
---|
| 57 | def version
|
---|
| 58 | return @archetype_id.version_id
|
---|
| 59 | end
|
---|
| 60 |
|
---|
| 61 | def short_concept_name
|
---|
| 62 | return @archetype_id.concept_name
|
---|
| 63 | end
|
---|
| 64 |
|
---|
[4] | 65 | def concept_name(a_lang)
|
---|
[373] | 66 |
|
---|
[4] | 67 | end
|
---|
| 68 |
|
---|
| 69 | def constraint_references_valid?
|
---|
| 70 | end
|
---|
| 71 |
|
---|
| 72 | def internal_references_valid?
|
---|
| 73 | end
|
---|
| 74 |
|
---|
| 75 | def is_specialised?
|
---|
| 76 | end
|
---|
| 77 |
|
---|
| 78 | def is_valid?
|
---|
| 79 | end
|
---|
| 80 |
|
---|
| 81 | def logical_paths(a_lang)
|
---|
| 82 | end
|
---|
| 83 |
|
---|
| 84 | def node_ids_vaild?
|
---|
| 85 | end
|
---|
| 86 |
|
---|
| 87 | def physical_paths
|
---|
| 88 | end
|
---|
| 89 |
|
---|
| 90 | def previous_version
|
---|
| 91 | end
|
---|
| 92 |
|
---|
| 93 | def specialisation_depth
|
---|
| 94 | end
|
---|
| 95 |
|
---|
[373] | 96 | def self.create(args ={}, &block)
|
---|
| 97 | archetype = new(args)
|
---|
| 98 | if block_given?
|
---|
| 99 | yield archetype
|
---|
| 100 | end
|
---|
| 101 | return archetype
|
---|
| 102 | end
|
---|
| 103 |
|
---|
[372] | 104 | end # end of Archetype
|
---|
[4] | 105 | # original file:
|
---|
| 106 | # ref_imple_eiffel/components/adl_parser/src/interface/adl_definition.e
|
---|
[23] | 107 |
|
---|
| 108 | class VALIDITY_KIND
|
---|
[373] | 109 |
|
---|
[23] | 110 | end
|
---|
| 111 | end
|
---|
[372] | 112 | end # of AM
|
---|
| 113 | end # of OpenEHR
|
---|