source: ruby/trunk/lib/open_ehr/am/archetype/ontology.rb@ 402

Last change on this file since 402 was 402, checked in by KOBAYASHI, Shinji, 14 years ago

refs #70

File size: 1.4 KB
Line 
1module OpenEHR
2 module AM
3 module Archetype
4 module Ontology
5 class ArchetypeOntology
6 attr_accessor :constraint_codes, :specialisation_depth
7 attr_accessor :term_attribute_names, :term_codes
8 attr_accessor :terminologies_available
9
10 def constraint_binding(a_terminology, a_code)
11 end
12
13 def constraint_definition(a_lang, a_code)
14 end
15
16 def has_language?(a_lang)
17 end
18
19 def has_terminology?(a_terminology)
20 end
21
22 def term_binding(a_terminology, a_code)
23 end
24
25 def term_definition(a_lang, a_code)
26 end
27 end
28
29 class ARCHETYPE_ONTOLOGY < ArchetypeOntology
30
31 end
32
33 class ArchetypeTerm
34 attr_accessor :items
35 attr_reader :code
36
37 def initialize(args = { })
38 self.code = args[:code]
39 self.items =args[:items]
40 end
41
42 def code=(code)
43 if code.nil? or code.empty?
44 raise ArgumentError, 'code is mandatory'
45 end
46 @code = code
47 end
48
49 def keys
50 if items.nil?
51 return Set.new
52 else
53 return Set.new(@items.keys)
54 end
55 end
56 end
57
58 class ARCHETYPE_TERM < ArchetypeTerm
59
60 end
61 end # end of Ontology
62 end # end of Archetype
63 end # end of AM
64end # end of OpenEHR
65
Note: See TracBrowser for help on using the repository browser.