[4] | 1 |
|
---|
[168] | 2 | module OpenEHR
|
---|
[4] | 3 | module RM
|
---|
| 4 | module Support
|
---|
| 5 | module Terminology
|
---|
[168] | 6 | class Code_Set_Access
|
---|
[4] | 7 | def all_codes
|
---|
| 8 | raise NotImplementedError, "all_codes must be implemented"
|
---|
| 9 | end
|
---|
| 10 | def has_code(a_code)
|
---|
| 11 | raise NotImplementedError, "has_code must be implemented"
|
---|
| 12 | end
|
---|
| 13 | def has_lang(a_lang)
|
---|
| 14 | raise NotImplementedError, "has_lang must be implemented"
|
---|
| 15 | end
|
---|
| 16 | def id
|
---|
| 17 | raise NotImplementedError, "id must be returned"
|
---|
| 18 | end
|
---|
| 19 | end
|
---|
[168] | 20 | module OpenEHR_Code_Set_Identifier
|
---|
[4] | 21 | CODE_SET_ID_CHARACER_SETS = "character sets".freeze
|
---|
| 22 | CODE_SET_ID_COMPRESSION_ALGORITHMS = "compression algorithms".freeze
|
---|
| 23 | CODE_SET_ID_COUNTRIES = "countries".freeze
|
---|
| 24 | CODE_SET_ID_INTEGRITY_CHECK_ALGORITHMS = "integrity check algorithms".freeze
|
---|
| 25 | CODE_SET_ID_LANGUAGES = "languages".freeze
|
---|
| 26 | CODE_SET_ID_MEDIA_TYPES = "media types".freeze
|
---|
| 27 | def valid_code_set_id(an_id)
|
---|
| 28 | !@an_id.nil?
|
---|
| 29 | end
|
---|
| 30 | end
|
---|
[168] | 31 | module OpenEHR_Terminology_Group_Identifiers
|
---|
[4] | 32 | GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze
|
---|
| 33 | GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze
|
---|
| 34 | GROUP_ID_COMPOSITION_CATEGORY = "composition category".freeze
|
---|
| 35 | GROUP_ID_MATH_FUNCTION = "event math function".freeze
|
---|
| 36 | GROUP_ID_INSTRUCTION_STATES = "instruction states".freeze
|
---|
| 37 | GROUP_ID_INSTRUCTION_TRANSITIONS = "instruction transitions".freeze
|
---|
| 38 | GROUP_ID_NULL_FLAVOURS = "null flavours".freeze
|
---|
| 39 | GROUP_ID_PARTICIPATION_FUNCTION = "participation function".freeze
|
---|
| 40 | GROUP_ID_PARTICIPATION_MODE = "participation mode".freeze
|
---|
| 41 | GROUP_ID_PROPERTY = "property".freeze
|
---|
| 42 | GROUP_ID_SETTING = "setting".freeze.freeze
|
---|
| 43 | GROUP_ID_SUBJECT_RELATIONSHIP = "subject relationship".freeze
|
---|
| 44 | GROUP_ID_TERM_MAPPING_PURPOSE = "term mapping purpose".freeze
|
---|
| 45 | GROUP_ID_VERSION_LIFECYCLE_STATE = "version lifecycle state".freeze
|
---|
| 46 | TERMINOLOGY_ID = "openehr".freeze
|
---|
| 47 | end
|
---|
[168] | 48 | class Terminology_Access
|
---|
[4] | 49 | def all_codes
|
---|
| 50 | raise NotImplementedError, "all_codes is not implemented"
|
---|
| 51 | end
|
---|
| 52 | def codes_for_group_id(group_id)
|
---|
| 53 | raise NotImplementedError, "codes_for_group_id is not implemented"
|
---|
| 54 | end
|
---|
| 55 | def codes_for_group_name(name, lang)
|
---|
| 56 | raise NotImplementedError, "codes_for_group_name is not implemented"
|
---|
| 57 | end
|
---|
| 58 | def has_code_for_group_id(group_id, a_code)
|
---|
| 59 | raise NotImplementedError, "has_code_for_group_id is not implemented"
|
---|
| 60 | end
|
---|
| 61 | def id
|
---|
| 62 | raise NotImplementedError, "id is not implemented"
|
---|
| 63 | end
|
---|
| 64 | def rubric_for_code(code, lang)
|
---|
| 65 | raise NotImplementedError, "rubic_for_code is not implemented"
|
---|
| 66 | end
|
---|
| 67 | private
|
---|
| 68 | def id_exists
|
---|
| 69 | if id.nil?
|
---|
| 70 | raise ArgumentError, "id must not be nil"
|
---|
| 71 | elsif id.empty?
|
---|
| 72 | raise ArgumentError, "id must not be empty"
|
---|
| 73 | end
|
---|
| 74 | end
|
---|
| 75 | end
|
---|
[168] | 76 | class Terminology_Service
|
---|
| 77 | include OpenEHR_Code_Set_Identifier, OpenEHR_Terminology_Group_Identifiers
|
---|
[4] | 78 | def code_set(name)
|
---|
| 79 | raise NotImplementedError, "code_set is not implemented"
|
---|
| 80 | end
|
---|
| 81 | def code_set_for_id(id)
|
---|
| 82 | raise NotImplementedError, "code_set_for_id is not implemented"
|
---|
| 83 | end
|
---|
| 84 | def code_set_identifiers
|
---|
| 85 | raise NotImplementedError, "code_set_for_identifiers is not implemented"
|
---|
| 86 | end
|
---|
| 87 | def has_code_set(name)
|
---|
| 88 | raise NotImplementedError, "has_code_set is not implemented"
|
---|
| 89 | end
|
---|
| 90 | def has_terminology?(name)
|
---|
| 91 | raise NotImplementedError, "has_terminology is not implemented"
|
---|
| 92 | end
|
---|
| 93 | def openehr_code_sets
|
---|
| 94 | raise NotImplementedError, "openehr_code_set is not implemented"
|
---|
| 95 | end
|
---|
| 96 | def terminology(name)
|
---|
| 97 | raise NotImplementedError, "terminology is not implemented"
|
---|
| 98 | end
|
---|
| 99 | def terminology_identifiers
|
---|
| 100 | raise NotImplementedError, "terminology_identiferes is not implemented"
|
---|
| 101 | end
|
---|
| 102 | end
|
---|
| 103 | end # of Terminology
|
---|
| 104 | end # of Support
|
---|
| 105 | end # of RM
|
---|
| 106 | end # of OpenEHR
|
---|