Changeset 167 for ruby/branches/0.5.0/lib/open_ehr/rm/common
- Timestamp:
- Aug 6, 2009, 1:20:05 AM (15 years ago)
- Location:
- ruby/branches/0.5.0/lib/open_ehr/rm/common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5.0/lib/open_ehr/rm/common/archetyped.rb
r162 r167 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 7 7 module Archetyped 8 module Locater _Constants8 module LocaterConstants 9 9 CURRENT_TRANSACTION_ID = "current" 10 10 FRAGMENT_SEPARATOR = "#" … … 43 43 44 44 class Locatable < Pathable 45 include Locater _Constants45 include LocaterConstants 46 46 attr_reader :archetype_node_id, :name, :links 47 47 attr_accessor :uid, :archetype_details, :feeder_audit … … 138 138 end # of Link 139 139 140 class Feeder _Audit140 class FeederAudit 141 141 attr_reader :originating_system_audit 142 142 attr_accessor :originating_system_item_ids, :feeder_system_audit, … … 157 157 @originating_system_audit = originating_system_audit 158 158 end 159 end # of Feeder _Audit159 end # of FeederAudit 160 160 161 class Feeder _Audit_Details161 class FeederAuditDetails 162 162 attr_reader :system_id 163 163 attr_accessor :provider, :location, :time, :subject, :version_id … … 176 176 @system_id = system_id 177 177 end 178 end # of Feeder _Audit_Details178 end # of FeederAudit_Details 179 179 end # of Archetyped 180 180 end # of Common -
ruby/branches/0.5.0/lib/open_ehr/rm/common/change_control.rb
r161 r167 3 3 # Ticket refs #64 4 4 5 module OpenE HR5 module OpenEhr 6 6 module RM 7 7 module Common 8 module Change _Control8 module ChangeControl 9 9 class Contribution 10 10 attr_reader :uid, :versions, :audit … … 93 93 94 94 def owner_id 95 return Hier _Object_ID.new(@uid.object_id.value)95 return HierObjectId.new(@uid.object_id.value) 96 96 end 97 97 … … 105 105 end 106 106 107 class Imported _Version < Version107 class ImportedVersion < Version 108 108 attr_reader :item 109 109 … … 126 126 end 127 127 128 class Original _Version < Version128 class OriginalVersion < Version 129 129 attr_reader :attestations, :other_input_version_uids 130 130 … … 155 155 end 156 156 157 class Versioned _Object157 class VersionedObject 158 158 attr_reader :uid, :owner_id, :time_created, :all_versions 159 159 … … 208 208 raise ArgumentError, 'invalid a_ver_id' 209 209 end 210 return @all_versions[self.all_version_ids.index(a_ver_id)].instance_of? Original _Version210 return @all_versions[self.all_version_ids.index(a_ver_id)].instance_of? OriginalVersion 211 211 end 212 212 … … 267 267 @all_versions.each do |ver| 268 268 audits = [ ] 269 if ver.instance_of? Original _Version269 if ver.instance_of? OriginalVersion 270 270 audits << ver.attestations 271 271 end 272 272 audits << ver.commit_audit 273 revision_history_items << Revision _History_Item.new(273 revision_history_items << RevisionHistoryItem.new( 274 274 :audits => audits, 275 275 :version_id => ver.uid) 276 276 end 277 return Revision _History.new(revision_history_items)277 return RevisionHistory.new(revision_history_items) 278 278 end 279 279 280 280 def commit_original_version(args={ }) 281 @all_versions << Original _Version.new(:uid => args[:uid],281 @all_versions << OriginalVersion.new(:uid => args[:uid], 282 282 :preceding_version_uid => args[:preceding_version_uid], 283 283 :contribution => args[:contribution], … … 290 290 291 291 def commit_original_merged_version(args = { }) 292 @all_versions << Original _Version.new(:uid => args[:uid],292 @all_versions << OriginalVersion.new(:uid => args[:uid], 293 293 :contribution => args[:contribution], 294 294 :preceding_version_uid => args[:preceding_version_uid], … … 302 302 303 303 def commit_imported_version(args = { }) 304 @all_versions << Imported _Version.new(:item => args[:item],304 @all_versions << ImportedVersion.new(:item => args[:item], 305 305 :contribution => args[:contribution], 306 306 :commit_audit => args[:commit_audit]) … … 319 319 end 320 320 end 321 end # of Change _Control321 end # of ChangeControl 322 322 end # of Common 323 323 end # of RM -
ruby/branches/0.5.0/lib/open_ehr/rm/common/directory.rb
r162 r167 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 OpenE HR::RM::Data_Types::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 … … 22 22 end 23 23 end 24 class Versioned _Folder < OpenEHR::RM::Common::Change_Control::Versioned_Object24 class VersionedFolder < OpenEhr::RM::Common::ChangeControl::VersionedObject 25 25 end 26 26 end # of Directory -
ruby/branches/0.5.0/lib/open_ehr/rm/common/generic.rb
r157 r167 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 OpenE HR::RM::Support::Identification5 include OpenE HR::RM::Data_Types::Basic6 module OpenE HR4 include OpenEhr::RM::Support::Identification 5 include OpenEhr::RM::DataTypes::Basic 6 module OpenEhr 7 7 module RM 8 8 module Common 9 9 module Generic 10 class Audit _Details10 class AuditDetails 11 11 attr_reader :system_id, :committer, :time_committed, :change_type 12 12 attr_accessor :description … … 45 45 end 46 46 47 class Revision _History47 class RevisionHistory 48 48 attr_reader :items 49 49 … … 66 66 return @items.last.audits.first.time_committed.value 67 67 end 68 end # of Revision _History68 end # of RevisionHistory 69 69 70 class Revision _History_Item70 class RevisionHistoryItem 71 71 attr_reader :version_id, :audits 72 72 … … 87 87 @version_id = version_id 88 88 end 89 end # of Revision _History_Item89 end # of RevisionHistory_Item 90 90 91 class Party _Proxy91 class PartyProxy 92 92 attr_accessor :external_ref 93 93 … … 97 97 end 98 98 99 class Party _Self < Party_Proxy99 class PartySelf < PartyProxy 100 100 101 101 end 102 102 103 class Party _Identified < Party_Proxy103 class PartyIdentified < PartyProxy 104 104 attr_reader :name, :identifier 105 105 def initialize(args = { }) … … 132 132 end 133 133 134 class Party _Related < Party_Identified134 class PartyRelated < PartyIdentified 135 135 attr_reader :relationship 136 136 def initialize(args = { }) … … 174 174 end 175 175 176 class Attestation < Audit _Details176 class Attestation < AuditDetails 177 177 attr_reader :reason 178 178 attr_accessor :proof, :items -
ruby/branches/0.5.0/lib/open_ehr/rm/common/resource.rb
r163 r167 1 1 require 'set' 2 module OpenE HR2 module OpenEhr 3 3 module RM 4 4 module Common 5 5 module Resource 6 class Authored _Resource6 class AuthoredResource 7 7 attr_reader :original_language, :translations 8 8 attr_accessor :description, :revision_history … … 42 42 end 43 43 44 class Translation _Details44 class TranslationDetails 45 45 attr_reader :language, :author 46 46 attr_accessor :accreditation, :other_details … … 64 64 end 65 65 66 class Resource _Description66 class ResourceDescription 67 67 attr_reader :original_author, :lifecycle_state, :details 68 68 attr_accessor :other_contributors, :resource_package_uri, … … 101 101 end 102 102 103 class Resource _Description_Item103 class ResourceDescriptionItem 104 104 attr_reader :language, :purpose, :use, :misuse, :copyright 105 105 attr_accessor :keywords, :original_resource_uri, :other_details
Note:
See TracChangeset
for help on using the changeset viewer.