Changeset 167 for ruby/branches/0.0/models/rm
- Timestamp:
- Aug 6, 2009, 1:20:05 AM (15 years ago)
- Location:
- ruby/branches/0.0/models/rm
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.0/models/rm/common/archetyped.rb
r8 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Common 4 4 module Archetyped 5 module Locater _Constants5 module LocaterConstants 6 6 CURRENT_TRANSACTION_ID = "current" 7 7 FRAGMENT_SEPARATOR = "#" … … 32 32 end 33 33 class Locatable < Pathable 34 include Locater _Constants34 include LocaterConstants 35 35 attr_accessor :uid, :archetype_node_id, :archetype_details 36 36 attr_accessor :feeder_audit, :links, :parent -
ruby/branches/0.0/models/rm/common/generic.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Common 4 4 module Generic 5 class Revision _History6 end # of Revision _History5 class RevisionHistory 6 end # of RevisionHistory 7 7 end # of Generic 8 8 end # of Common -
ruby/branches/0.0/models/rm/common/resource.rb
r24 r167 1 1 require 'set' 2 module OpenE HR2 module OpenEhr 3 3 module RM 4 4 module Common -
ruby/branches/0.0/models/rm/composition/content/entry.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Content … … 5 5 class Entry < Content_Item 6 6 end 7 class Care _Entry < Entry7 class CareEntry < Entry 8 8 end 9 class Action < Care _Entry9 class Action < CareEntry 10 10 attr_accessor :description, :time 11 11 attr_accessor :ism_transition, :instruction_details -
ruby/branches/0.0/models/rm/data_types/basic.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 module Data _Types3 module DataTypes 4 4 module Basic 5 module Canonical _Fragment5 module CanonicalFragment 6 6 end 7 7 8 class Data _Value9 include OpenE HR::RM::Support::Definition::Basic_Definition8 class DataValue 9 include OpenEhr::RM::Support::Definition::BasicDefinition 10 10 end 11 11 12 class D V_Boolean < Data_Value12 class DvBoolean < DataValue 13 13 def initialize(value) 14 14 check_not_nil(value) … … 32 32 end 33 33 end 34 end # end of D V_Boolean34 end # end of DvBoolean 35 35 36 class D V_State < Data_Value36 class DvState < DataValue 37 37 attr_accessor :value 38 38 attr_writer :terminal … … 47 47 @terminal == true 48 48 end 49 end # end of D V_State49 end # end of DvState 50 50 51 class D V_Identifier51 class DvIdentifier 52 52 attr_accessor :issuer, :assigner, :id, :type 53 53 def initialize(assigner, id, issuer, type) … … 60 60 @type = type 61 61 end 62 end #end of D V_Identifier62 end #end of DvIdentifier 63 63 end # end of Basic 64 64 end # end of Data_types -
ruby/branches/0.0/models/rm/data_types/encapslated.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 module Data _Types3 module DataTypes 4 4 module Encapsulated 5 class D V_Encapsulated < OpenEHR::RM::Data_Types::Basic::Data_Value5 class DvEncapsulated < OpenEhr::RM::DataTypes::Basic::DataValue 6 6 attr_accessor :charset, :language 7 7 def size … … 13 13 end 14 14 end 15 class D V_Multimedia < DV_Encapsulated15 class DvMultimedia < DvEncapsulated 16 16 17 17 end 18 class D V_Parsable < DV_Encapsulated18 class DvParsable < DvEncapsulated 19 19 attr_reader :value, :formalism 20 20 def initialize(value, formalism, charset = nil, language = nil) -
ruby/branches/0.0/models/rm/data_types/quantity/data_time.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 module Data _Types3 module DataTypes 4 4 module Quantity 5 5 module Date_ -
ruby/branches/0.0/models/rm/data_types/text.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 module Data _Types3 module DataTypes 4 4 module Text 5 class Term _Mapping5 class TermMapping 6 6 attr_reader :match, :purpose, :target 7 7 def initialize(match, purpose, target) … … 23 23 match == '?' 24 24 end 25 def Term _Mapping.is_valid_mach_code?(c)25 def TermMapping.is_valid_mach_code?(c) 26 26 c == '>' or c == '=' or c == '<' or c == '?' 27 27 end … … 31 31 end 32 32 def purpose_valid(purpose) 33 if !purpose.nil? and !purpose.instance_of? D V_Coded_Text33 if !purpose.nil? and !purpose.instance_of? DvCodedText 34 34 raise ArgumentError, "purpose is not valid" 35 35 end … … 41 41 end 42 42 43 class Code _Phrase43 class CodePhrase 44 44 attr_reader :terminology_id, :code_string 45 45 def initialize(terminology_id, code_string) … … 50 50 raise Exception.new("empty codeString") 51 51 end 52 if terminology_id.instance_of?(Terminology _ID)52 if terminology_id.instance_of?(TerminologyId) 53 53 @terminology_id = terminology_id 54 54 else 55 @terminologyID = Terminology _ID.new(terminology_id)55 @terminologyID = TerminologyId.new(terminology_id) 56 56 end 57 57 @code_string = code_string 58 58 end 59 end # of Code _Phrase59 end # of CodePhrase 60 60 61 class D V_Text < OpenEHR::RM::Data_Types::Basic::Data_Value61 class DvText < OpenEhr::RM::DataTypes::Basic::DataValue 62 62 attr_reader :value, :formatting, :hyperlink, :mappings 63 63 attr_reader :language, :encoding … … 65 65 mappings = nil, language = nil, encoding = nil) 66 66 value_valid(value) 67 D V_Text.formatting_valid(formatting)68 D V_Text.encoding_valid(encoding)69 D V_Text.mapping_valid(mappings)70 D V_Text.language_valid(language)67 DvText.formatting_valid(formatting) 68 DvText.encoding_valid(encoding) 69 DvText.mapping_valid(mappings) 70 DvText.language_valid(language) 71 71 @value, @formatting, @encoding = value, formatting, encoding 72 72 @mappings, @language = mappings, language … … 77 77 end 78 78 def formatting=(formatting) 79 D V_Text.formatting_valid(formatting)79 DvText.formatting_valid(formatting) 80 80 @formatting = formatting 81 81 end 82 82 def encoding=(encoding) 83 D V_Text.encoding_valid(encoding)83 DvText.encoding_valid(encoding) 84 84 @encoding = encoding 85 85 end 86 86 def mappings=(mappings) 87 D V_Text.mapping_valid(mappings)87 DvText.mapping_valid(mappings) 88 88 @mappings = mappings 89 89 end 90 90 def language=(language) 91 D V_Text.language_valid(language)91 DvText.language_valid(language) 92 92 @language = language 93 93 end … … 96 96 if value.nil? or value.empty? or value.include? CR or value.include? LF 97 97 raise ArgumentError, "value is not valid" 98 # CR and LF are defined in Basic_Definition inherited Data _Value.98 # CR and LF are defined in Basic_Definition inherited DataValue. 99 99 end 100 100 end … … 125 125 end 126 126 127 class D V_Coded_Text < DV_Text127 class DvCodedText < DvText 128 128 attr_reader :defining_code 129 129 def initialize(value, defining_code, formatting = nil, … … 144 144 end 145 145 146 class D V_Paragraph < OpenEHR::RM::Data_Types::Basic::Data_Value146 class DvParagraph < OpenEhr::RM::DataTypes::Basic::DataValue 147 147 attr_reader :items 148 148 def initialize(items) -
ruby/branches/0.0/models/rm/data_types/time_specification.rb
r5 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 module Data _Types4 module Time _Specification5 class D V_Time_Specification < OpenEHR::RM::Data_Types::Basic::Data_Value3 module DataTypes 4 module TimeSpecification 5 class DvTimeSpecification < OpenEhr::RM::DataTypes::Basic::DataValue 6 6 def initialize(value) 7 7 @value = value … … 18 18 end 19 19 20 class D V_General_Time_Specification < DV_Time_Specification20 class DvGeneralTimeSpecification < DvTimeSpecification 21 21 attr_reader :value 22 22 def initialize(value) … … 34 34 end 35 35 36 class D V_Periodic_Time_Specification < DV_Time_Specification36 class DvPeriodicTimeSpecification < DvTimeSpecification 37 37 attr_reader :value 38 38 def initialize(value) -
ruby/branches/0.0/models/rm/data_types/uri.rb
r4 r167 1 1 require 'uri' 2 2 #require 'uri/generic' 3 module U RI4 class E HR< ::URI::Generic3 module Uri 4 class Ehr < ::URI::Generic 5 5 COMPONENT = [ 6 6 :scheme, :path, :fragment, :query … … 17 17 end 18 18 end 19 @@schemes['EHR'] = E HR19 @@schemes['EHR'] = Ehr 20 20 end 21 module OpenE HR21 module OpenEhr 22 22 module RM 23 module Data _Types24 module U RI25 class D V_URI < OpenEHR::RM::Data_Types::Basic::Data_Value23 module DataTypes 24 module Uri 25 class DvUri < OpenEhr::RM::DataTypes::Basic::DataValue 26 26 def initialize(value) 27 27 raise ArgumentError, "value is empty" if value.nil? … … 51 51 end 52 52 end 53 class D V_EHR_URI < DV_URI53 class DvEhrUri < DvUri 54 54 def initialize(value) 55 55 check_value(value) -
ruby/branches/0.0/models/rm/demographic.rb
r10 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Demogrphic 4 class Party < OpenE HR::RM::Common::Archetyped::Locatable4 class Party < OpenEhr::RM::Common::Archetyped::Locatable 5 5 attr_reader :details, :reverse_relationships, :uid 6 6 attr_reader :idetities, :contacts, :relationships -
ruby/branches/0.0/models/rm/support/assumed_types.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Support 4 module Assumed _Types4 module AssumedTypes 5 5 class Interval 6 6 attr_accessor :lower, :upper -
ruby/branches/0.0/models/rm/support/definition.rb
r4 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Support 4 4 module Definition 5 module Basic _Definition5 module BasicDefinition 6 6 CR = "\015" 7 7 LF = "\012" 8 8 end 9 class OpenEHR _Definitions10 include Basic _Definition9 class OpenEHRDefinitions 10 include BasicDefinition 11 11 end 12 12 end -
ruby/branches/0.0/models/rm/support/identification.rb
r26 r167 1 module OpenE HR1 module OpenEhr 2 2 module RM 3 3 module Support -
ruby/branches/0.0/models/rm/support/terminology.rb
r4 r167 1 1 2 module OpenE HR2 module OpenEhr 3 3 module RM 4 4 module Support 5 5 module Terminology 6 class Code _Set_Access6 class CodeSetAccess 7 7 def all_codes 8 8 raise NotImplementedError, "all_codes must be implemented" … … 18 18 end 19 19 end 20 module OpenE HR_Code_Set_Identifier20 module OpenEhrCodeSetIdentifier 21 21 CODE_SET_ID_CHARACER_SETS = "character sets".freeze 22 22 CODE_SET_ID_COMPRESSION_ALGORITHMS = "compression algorithms".freeze … … 29 29 end 30 30 end 31 module OpenE HR_Terminology_Group_Identifiers31 module OpenEhrTerminologyGroupIdentifiers 32 32 GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze 33 33 GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze … … 46 46 TERMINOLOGY_ID = "openehr".freeze 47 47 end 48 class Terminology _Access48 class TerminologyAccess 49 49 def all_codes 50 50 raise NotImplementedError, "all_codes is not implemented" … … 74 74 end 75 75 end 76 class Terminology _Service77 include OpenE HR_Code_Set_Identifier, OpenEHR_Terminology_Group_Identifiers76 class TerminologyService 77 include OpenEhrCodeSetIdentifier, OpenEhrTerminologyGroupIdentifiers 78 78 def code_set(name) 79 79 raise NotImplementedError, "code_set is not implemented"
Note:
See TracChangeset
for help on using the changeset viewer.