source: ruby/branches/TRY-open_ehr_gem/lib/am/archetype/ontology.rb@ 327

Last change on this file since 327 was 327, checked in by Tatsukawa, Akimichi, 15 years ago

add ARCHETYPE_ONTOLOGY constructor

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