- Timestamp:
- Sep 27, 2009, 6:05:22 PM (15 years ago)
- Location:
- ruby/branches/TRY-open_ehr_gem
- Files:
-
- 2 added
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/TRY-open_ehr_gem/lib/assumed_library_types.rb
r304 r306 3 3 require 'time' 4 4 5 module OpenE HR5 module OpenEhr 6 6 module AssumedLibraryTypes 7 7 class Any < Object -
ruby/branches/TRY-open_ehr_gem/lib/rm/common/archetyped.rb
r297 r306 2 2 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109318114715_211173_0Report.html 3 3 # Ticket refs #65 4 module OpenE HR4 module OpenEhr 5 5 module RM 6 6 module Common -
ruby/branches/TRY-open_ehr_gem/lib/rm/common/directory.rb
r295 r306 2 2 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140536622627_218703_7149Report.html 3 3 # Ticket refs #63 4 include OpenEHR::RM::DataTypes::Text5 module OpenE HR4 #include OpenEhr::RM::DataTypes::Text 5 module OpenEhr 6 6 module RM 7 7 module Common 8 8 module Directory 9 class Folder < OpenE HR::RM::Common::Archetyped::Locatable9 class Folder < OpenEhr::RM::Common::Archetyped::Locatable 10 10 attr_accessor :items 11 11 attr_reader :folders … … 21 21 @folders = folders 22 22 end 23 end 24 class VersionedFolder < OpenEHR::RM::Common::ChangeControl::VersionedObject 23 end 24 25 class VersionedFolder < OpenEhr::RM::Common::ChangeControl::VersionedObject 25 26 end 26 27 end # of Directory -
ruby/branches/TRY-open_ehr_gem/lib/rm/common/generic.rb
r167 r306 2 2 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140169202660_257304_813Report.html 3 3 # Related to the ticket #62 4 include OpenEhr::RM::Support::Identification5 include OpenEhr::RM::DataTypes::Basic4 #include OpenEhr::RM::Support::Identification 5 #include OpenEhr::RM::DataTypes::Basic 6 6 module OpenEhr 7 7 module RM -
ruby/branches/TRY-open_ehr_gem/lib/rm/data_structures.rb
r299 r306 4 4 # refs #59 5 5 6 module OpenE HR6 module OpenEhr 7 7 module RM 8 8 module DataStructures 9 class DataStructure < OpenE HR::RM::Common::Archetyped::Locatable9 class DataStructure < OpenEhr::RM::Common::Archetyped::Locatable 10 10 def initialize(args = { }) 11 11 super(args) -
ruby/branches/TRY-open_ehr_gem/lib/rm/data_structures/item_structure.rb
r299 r306 3 3 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109346709572_859750_3810Report.html 4 4 # refs #54 5 require 'set'6 include OpenEHR::RM::DataStructures7 module OpenE HR5 #require 'set' 6 #include OpenEHR::RM::DataStructures 7 module OpenEhr 8 8 module RM 9 9 module DataStructures -
ruby/branches/TRY-open_ehr_gem/lib/rm/data_structures/item_structure/representation.rb
r216 r306 3 3 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109066789167_738055_2581Report.html 4 4 # refs #53 5 module OpenE HR5 module OpenEhr 6 6 module RM 7 7 module DataStructures 8 8 module ItemStructure 9 9 module Representation 10 class Item < OpenE HR::RM::Common::Archetyped::Locatable10 class Item < OpenEhr::RM::Common::Archetyped::Locatable 11 11 def initialize(args = {}) 12 12 super(args) -
ruby/branches/TRY-open_ehr_gem/lib/rm/demographic.rb
r167 r306 5 5 module RM 6 6 module Demogrphic 7 class Address < OpenE HR::RM::Common::Archetyped::Locatable7 class Address < OpenEhr::RM::Common::Archetyped::Locatable 8 8 attr_reader :details 9 9 … … 17 17 end 18 18 19 class Capability < OpenE HR::RM::Common::Archetyped::Locatable19 class Capability < OpenEhr::RM::Common::Archetyped::Locatable 20 20 attr_reader :credentials, :time_validity 21 21 22 22 end 23 23 24 class Party < OpenE HR::RM::Common::Archetyped::Locatable24 class Party < OpenEhr::RM::Common::Archetyped::Locatable 25 25 attr_reader :details, :reverse_relationships, :uid 26 26 attr_reader :idetities, :contacts, :relationships … … 38 38 relationships_valid(relationships) 39 39 end 40 40 41 def type 41 return name 42 end 42 name 43 end 44 43 45 def uid=(uid) 44 46 uid_valid(uid) 45 47 @uid = uid 46 48 end 49 47 50 def identities=(identities) 48 51 identities_vaild(identities) 49 52 @identities = identities 53 end 54 50 55 def contacts=(contacts) 51 56 contacts_valid(contacts) 52 57 @contacts = contacts 53 58 end 59 54 60 def parent=(parent) 55 61 @parent = nil 56 62 end 63 57 64 private 65 58 66 def uid_valid(uid) 59 67 raise ArgumentError, "uid is not valid" if uid.nil? 60 68 end 69 61 70 def identities_vaild(identities) 62 71 if identities.nil? … … 66 75 end 67 76 end 77 68 78 def contacts_valid(contacts) 69 79 if contacs.nil? … … 71 81 elsif contacts.empty? 72 82 raise ArgumentError, "contacts must not be empty" 73 end 74 end 75 end 76 77 class PartyIdentity < OpenE HR::RM::Common::Archetyped::Locatable83 end 84 end 85 end 86 87 class PartyIdentity < OpenEhr::RM::Common::Archetyped::Locatable 78 88 attr_reader :details 79 89 80 90 end 81 91 82 class PartyRelationship < OpenE HR::RM::Common::Archetyped::Locatable83 84 end 85 86 class Versioned_Party < OpenE HR::RM::Common::Archetyped::Locatable92 class PartyRelationship < OpenEhr::RM::Common::Archetyped::Locatable 93 94 end 95 96 class Versioned_Party < OpenEhr::RM::Common::Archetyped::Locatable 87 97 88 98 end … … 136 146 end 137 147 @values = values 138 end 139 class Contact < OpenEHR::RM::Common::Archetyped::Locatable 148 end 149 end 150 151 class Contact < OpenEhr::RM::Common::Archetyped::Locatable 140 152 attr_accessor :time_validity 141 153 attr_reader :addresses 154 142 155 def initialize(uid, archetype_node_id, name, archetype_details, 143 156 feeder_audit, links, parent, time_validity, addresses) … … 148 161 @time_validity = time_validity 149 162 end 163 150 164 def purpose 151 165 @name 152 166 end 167 153 168 def purpose=(purpose) 154 169 @name = purpose 155 170 end 171 156 172 def addresses=(addresses) 157 173 address_exists?(addresses) 158 174 @addresses = addresses 159 175 end 176 160 177 private 178 161 179 def address_exists?(addresses) 162 180 if addresses.nil? -
ruby/branches/TRY-open_ehr_gem/lib/rm/security.rb
r297 r306 2 2 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1155650882301_836618_5314Report.html 3 3 # Ticket refs #41 4 module OpenE HR4 module OpenEhr 5 5 module RM 6 6 module Security 7 7 class AccessControlSettings 8 8 9 9 end 10 10 end -
ruby/branches/TRY-open_ehr_gem/lib/rm/support/assumed_types.rb
r167 r306 12 12 def initialize(lower, upper, 13 13 lower_included = nil, upper_included = nil) 14 if ((lower !=nil) && (upper !=nil)) && lower>upper15 raise ArgumentError, "upper < lower"16 end14 # if ((lower !=nil) && (upper !=nil)) && lower>upper 15 # raise ArgumentError, "upper < lower" 16 # end 17 17 @lower = lower 18 18 @upper = upper -
ruby/branches/TRY-open_ehr_gem/lib/rm/support/definition.rb
r297 r306 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Support -
ruby/branches/TRY-open_ehr_gem/lib/rm/support/identification.rb
r297 r306 2 2 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109331021343_528780_2066Report.html 3 3 # Ticket refs #39 4 module OpenE HR4 module OpenEhr 5 5 module RM 6 6 module Support … … 15 15 def value=(value) 16 16 raise ArgumentError, "empty value" if value.nil? or value.empty? 17 @value = value 17 @value = value 18 18 end 19 19 … … 52 52 53 53 class ArchetypeID < ObjectID 54 attr_reader :rm_originator, :rm_name, :rm_entity, 55 :concept_name, :specialisation, :version_id 56 54 attr_accessor :rm_originator, :rm_name, :rm_entity, :concept_name, :specialisation, :version_id 55 57 56 def initialize(args = {}) 58 57 if args[:value].nil? 59 self.rm_originator = args[:rm_originator]60 self.rm_name = args[:rm_name]61 self.rm_entity = args[:rm_entity]62 self.concept_name = args[:concept_name]63 self.version_id = args[:version_id]64 self.specialisation = args[:specialisation]58 @rm_originator = args[:rm_originator] 59 @rm_name = args[:rm_name] 60 @rm_entity = args[:rm_entity] 61 @concept_name = args[:concept_name] 62 @version_id = args[:version_id] 63 @specialisation = args[:specialisation] 65 64 else 66 65 super(args) … … 98 97 end 99 98 100 def concept_name=(concept_name)101 if concept_name.nil? or concept_name.empty?102 raise ArgumentError, 'concept_name is mandatory'103 end104 @concept_name = concept_name105 end106 107 def domain_concept=(domain_concept)108 if domain_concept.nil? or domain_concept.empty?109 raise ArgumentError, "domain concept not valid"110 end111 if /([a-zA-Z]\w+)(-([a-zA-Z]\w))?/ =~ domain_concept112 self.concept_name = $1113 self.specialisation = $3114 else115 raise ArgumentError, 'invalid domain concept form'116 end117 end118 119 def rm_name=(rm_name)120 raise ArgumentError, "rm_name not valid" if rm_name.nil? or rm_name.empty?121 @rm_name = rm_name122 end123 124 def rm_entity=(rm_entity)125 if rm_entity.nil? or rm_entity.empty?126 raise ArgumentError, "rm_entity is mandatory"127 end128 @rm_entity = rm_entity129 end130 131 def rm_originator=(rm_originator)132 if rm_originator.nil? or rm_originator.empty?133 raise ArgumentError, "rm_originator not valid"134 end135 @rm_originator = rm_originator136 end137 138 def specialisation=(specialisation)139 if !specialisation.nil? and specialisation.empty?140 raise ArgumentError, "rm_specialisation not valid"141 end142 @specialisation = specialisation143 end144 145 def version_id=(version_id)146 raise ArgumentError, "version_id not valid" if version_id.nil? or version_id.empty?147 @version_id = version_id148 end99 # def concept_name=(concept_name) 100 # if concept_name.nil? or concept_name.empty? 101 # raise ArgumentError, 'concept_name is mandatory' 102 # end 103 # @concept_name = concept_name 104 # end 105 106 # def domain_concept=(domain_concept) 107 # if domain_concept.nil? or domain_concept.empty? 108 # raise ArgumentError, "domain concept not valid" 109 # end 110 # if /([a-zA-Z]\w+)(-([a-zA-Z]\w))?/ =~ domain_concept 111 # self.concept_name = $1 112 # self.specialisation = $3 113 # else 114 # raise ArgumentError, 'invalid domain concept form' 115 # end 116 # end 117 118 # def rm_name=(rm_name) 119 # raise ArgumentError, "rm_name not valid" if rm_name.nil? or rm_name.empty? 120 # @rm_name = rm_name 121 # end 122 123 # def rm_entity=(rm_entity) 124 # if rm_entity.nil? or rm_entity.empty? 125 # raise ArgumentError, "rm_entity is mandatory" 126 # end 127 # @rm_entity = rm_entity 128 # end 129 130 # def rm_originator=(rm_originator) 131 # if rm_originator.nil? or rm_originator.empty? 132 # raise ArgumentError, "rm_originator not valid" 133 # end 134 # @rm_originator = rm_originator 135 # end 136 137 # def specialisation=(specialisation) 138 # if !specialisation.nil? and specialisation.empty? 139 # raise ArgumentError, "rm_specialisation not valid" 140 # end 141 # @specialisation = specialisation 142 # end 143 144 # def version_id=(version_id) 145 # raise ArgumentError, "version_id not valid" if version_id.nil? or version_id.empty? 146 # @version_id = version_id 147 # end 149 148 end 150 149 -
ruby/branches/TRY-open_ehr_gem/lib/rm/support/measurement.rb
r295 r306 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Support -
ruby/branches/TRY-open_ehr_gem/lib/rm/support/terminology.rb
r298 r306 1 1 2 module OpenE HR2 module OpenEhr 3 3 module RM 4 4 module Support
Note:
See TracChangeset
for help on using the changeset viewer.