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