Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/basic.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/basic.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/basic.rb	(revision 167)
@@ -2,16 +2,16 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109067591791_562382_3151Report.html
 # Ticket refs #52
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
+    module DataTypes
       module Basic
-        module Canonical_Fragment
+        module CanonicalFragment
         end
 
-        class Data_Value
-          include OpenEHR::RM::Support::Definition::Basic_Definition
+        class DataValue
+          include OpenEhr::RM::Support::Definition::BasicDefinition
         end
 
-        class DV_Boolean < Data_Value
+        class DvBoolean < DataValue
           def initialize(value)
             self.value = value
@@ -28,7 +28,7 @@
             @value == true
           end
-        end  # end of DV_Boolean
+        end  # end of DvBoolean
 
-        class DV_State < Data_Value
+        class DvState < DataValue
           attr_reader :value
 
@@ -48,7 +48,7 @@
             @is_terminal = s
           end
-        end # end of DV_State
+        end # end of DvState
 
-        class DV_Identifier
+        class DvIdentifier
           attr_accessor :issuer, :assigner, :id, :type
           def initialize(assigner, id, issuer, type)
@@ -63,7 +63,7 @@
             @type = type
           end
-        end #end of DV_Identifier
+        end #end of DvIdentifier
       end # end of Basic
-    end # end of Data_types
+    end # end of DataTypes
   end # end of RM
 end # end of OpenEHR
Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/encapsulated.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/encapsulated.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/encapsulated.rb	(revision 167)
@@ -5,9 +5,9 @@
 require 'locale/info'
 
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
+    module DataTypes
       module Encapsulated
-        class DV_Encapsulated  < OpenEHR::RM::Data_Types::Basic::Data_Value
+        class DvEncapsulated  < OpenEhr::RM::DataTypes::Basic::DataValue
           attr_reader :language, :charset, :size
           def initialize(charset, language, size)
@@ -59,5 +59,5 @@
 
 # media type http://www.iana.org/assignments/media-types/text/
-        class DV_Multimedia < DV_Encapsulated
+        class DvMultimedia < DvEncapsulated
           attr_reader :media_type
           attr_accessor :uri, :data, :compression_algorithm,
@@ -84,5 +84,5 @@
         end
 
-        class DV_Parsable < DV_Encapsulated
+        class DvParsable < DvEncapsulated
           attr_reader :value, :formalism
           def initialize(charset, language, size, formalism, value)
@@ -107,5 +107,5 @@
         end
       end # of Encapsulated
-    end # of Data_Types
+    end # of DataTypes
   end # of RM
 end # of OpenEHR
Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/quantity.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/quantity.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/quantity.rb	(revision 167)
@@ -3,12 +3,12 @@
 # Ticket refs #50
 require 'assumed_library_types'
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
+    module DataTypes
       module Quantity
 
         autoload :Date_Time, "rm/data_types/quantity/date_time.rb"
 
-        class DV_Ordered < OpenEHR::RM::Data_Types::Basic::Data_Value
+        class DvOrdered < OpenEhr::RM::DataTypes::Basic::DataValue
           include Comparable
           attr_accessor :normal_range, :other_refference_ranges, :normal_status
@@ -51,9 +51,9 @@
         end
 
-        class DV_Interval < OpenEHR::Assumed_Library_Types::Interval
-
-        end
-
-        class DV_Quantified < DV_Ordered
+        class DvInterval < OpenEhr::AssumedLibraryTypes::Interval
+
+        end
+
+        class DvQuantified < DvOrdered
           attr_reader :magnitude, :magnitude_status
 
@@ -78,5 +78,5 @@
             if magnitude_status.nil?
               @magnitude_status = '='
-            elsif DV_Quantified.valid_magnitude_status?(magnitude_status)
+            elsif DvQuantified.valid_magnitude_status?(magnitude_status)
               @magnitude_status = magnitude_status
             else
@@ -99,5 +99,5 @@
         end
 
-        class DV_Ordinal < DV_Ordered
+        class DvOrdinal < DvOrdered
           attr_reader :value, :symbol, :limits
 
@@ -121,5 +121,5 @@
 
           def is_strictly_comparable_to?(others)
-            unless others.instance_of? OpenEHR::RM::Data_Types::Quantity::DV_Ordinal
+            unless others.instance_of? OpenEhr::RM::DataTypes::Quantity::DvOrdinal
               return false
             end
@@ -144,5 +144,5 @@
         end
 
-        class DV_Absolute_Quantity < DV_Quantified
+        class DvAbsoluteQuantity < DvQuantified
           attr_accessor :accuracy
 
@@ -168,5 +168,5 @@
         end
 
-        class DV_Amount < DV_Quantified
+        class DvAmount < DvQuantified
           attr_reader :accuracy, :accuracy_percent
           def initialize(magnitude, magnitude_status=nil, accuracy=nil,
@@ -186,5 +186,5 @@
               raise ArgumentError, 'type mismatch'
             end
-            return DV_Amount.new(@magnitude+other.magnitude, @magnitude_status,
+            return DvAmount.new(@magnitude+other.magnitude, @magnitude_status,
                                  @accuracy, @accuracy_percent, @normal_range,
                                  @normal_status, @other_reference_ranges)
@@ -210,5 +210,5 @@
         end
 
-        class DV_Quantity < DV_Amount
+        class DvQuantity < DvAmount
           attr_reader :units, :precision
           def initialize(magnitude, units, magnitude_status=nil, precision=nil,
@@ -235,5 +235,5 @@
           def is_strictly_comparable_to?(others)
             return false if others.nil?
-            if others.instance_of?(DV_Quantity) && others.units == @units
+            if others.instance_of?(DvQuantity) && others.units == @units
               return true
             else
@@ -252,5 +252,5 @@
           def +(other)
             dv_amount = super(other)
-            return DV_Quantity.new(dv_amount.magnitude, @units,
+            return DvQuantity.new(dv_amount.magnitude, @units,
                                    @magnitude_status, @precision,
                                    @accuracy, @accuracy_percent, @normal_range,
@@ -259,8 +259,8 @@
         end
 
-        class DV_Count < DV_Amount
+        class DvCount < DvAmount
           def is_strictly_comparable_to?(others)
             return false if others.nil?
-            if others.instance_of?(DV_Count)
+            if others.instance_of?(DvCount)
               return true
             else
@@ -270,5 +270,5 @@
         end
 
-        class Reference_Range
+        class ReferenceRange
           attr_reader :meaning, :range
 
@@ -297,5 +297,5 @@
         end
 
-        module Proportion_Kind
+        module ProportionKind
           PK_RATIO = 0
           PK_UNITARY = 1
@@ -304,12 +304,12 @@
           PK_INTEGER_FRACTION = 4
 
-          def Proportion_Kind.valid_proportion_kind?(kind)
+          def ProportionKind.valid_proportion_kind?(kind)
             return true if kind >= 0 && kind <= 4
             return false
           end
-        end # end of Proportion_Kind
-
-        class DV_Proportion < DV_Amount
-          include Proportion_Kind
+        end # end of ProportionKind
+
+        class DvProportion < DvAmount
+          include ProportionKind
           attr_reader :numerator, :denominator, :type, :precision
 
@@ -360,5 +360,5 @@
 
           def type=(type)
-            if Proportion_Kind.valid_proportion_kind?(type)
+            if ProportionKind.valid_proportion_kind?(type)
               @type = type
             else
@@ -386,5 +386,5 @@
 
           def is_strictly_comparable_to?(other)
-            unless other.instance_of?(DV_Proportion)
+            unless other.instance_of?(DvProportion)
               return false
             end
@@ -395,6 +395,5 @@
             end
           end
-        end # end of DV_Proportion
-
+        end # end of DvProportion
       end # of Quantity
     end # of Data_Types
Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/quantity/date_time.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/quantity/date_time.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/quantity/date_time.rb	(revision 167)
@@ -5,10 +5,10 @@
 require 'date'
 
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
+    module DataTypes
       module Quantity
-        module Date_Time
-          class DV_Temporal < OpenEHR::RM::Data_Types::Quantity::DV_Absolute_Quantity
+        module DateTime
+          class DvTemporal < OpenEhr::RM::DataTypes::Quantity::DvAbsoluteQuantity
             include Comparable
             attr_reader :value
@@ -37,6 +37,6 @@
           end
 
-          class DV_Date < DV_Temporal
-            include OpenEHR::Assumed_Library_Types::ISO8601_DATE_MODULE
+          class DvDate < DvTemporal
+            include OpenEhr::AssumedLibraryTypes::ISO8601_DATE_MODULE
 
             DAYS_IN_MONTH = [0,31,28,31,30,31,30,31,31,30,31,30,31]
@@ -51,5 +51,5 @@
             def value=(value)
               super(value)
-              iso8601_date = Assumed_Library_Types::ISO8601_DATE.new(value)
+              iso8601_date = AssumedLibraryTypes::ISO8601_DATE.new(value)
               @year = iso8601_date.year
               @month = iso8601_date.month
@@ -91,5 +91,5 @@
               end
               year += future.year - past.year
-              return DV_Duration.new(
+              return DvDuration.new(
                    'P' + year.to_s + 'Y' + month.to_s + 'M' + 
                          week.to_s + 'W' + day.to_s + 'D')
@@ -97,6 +97,6 @@
           end
           
-          class DV_Time < DV_Temporal
-            include OpenEHR::Assumed_Library_Types::ISO8601_TIME_MODULE
+          class DvTime < DvTemporal
+            include OpenEhr::AssumedLibraryTypes::ISO8601_TIME_MODULE
             def initialize(value, magnitude_status=nil, accuracy=nil,
                            normal_range=nil, normal_status=nil,
@@ -108,5 +108,5 @@
             def value=(value)
               super(value)
-              iso8601_time = Assumed_Library_Types::ISO8601_TIME.new(value)
+              iso8601_time = AssumedLibraryTypes::ISO8601_TIME.new(value)
               @hour = iso8601_time.hour
               @minute = iso8601_time.minute
@@ -125,5 +125,5 @@
               second = (diff - hour * 60 *60 - minute * 60).to_i
               fractional_second = ((diff - diff.to_i)*1000000.0).to_i/1000000.0
-              return DV_Duration.new('P0Y0M0W0DT' + hour.to_s + 'H' +
+              return DvDuration.new('P0Y0M0W0DT' + hour.to_s + 'H' +
                         minute.to_s + 'M' +
                         second.to_s + fractional_second.to_s[1..-1] + 'S')
@@ -131,6 +131,6 @@
           end
 
-          class DV_Date_Time < DV_Temporal
-            include OpenEHR::Assumed_Library_Types::ISO8601_DATE_TIME_MODULE
+          class DvDateTime < DvTemporal
+            include OpenEhr::AssumedLibraryTypes::ISO8601_DATE_TIME_MODULE
             attr_reader :value
 
@@ -144,5 +144,5 @@
             def value=(value)              
               super(value)
-              iso8601date_time = Assumed_Library_Types::ISO8601_DATE_TIME.new(value)
+              iso8601date_time = AssumedLibraryTypes::ISO8601_DATE_TIME.new(value)
               self.year = iso8601date_time.year
               self.month = iso8601date_time.month
@@ -186,5 +186,5 @@
               fractional_second = ((time_diff - time_diff.to_i)*1000000.0).to_i/1000000.0
 
-              return DV_Duration.new(date_duration.value + 'T' + 
+              return DvDuration.new(date_duration.value + 'T' +
                         hour.to_s + 'H' +
                         minute.to_s + 'M' +
@@ -197,10 +197,10 @@
             def split_date_time(date_time)
               /^(.*)T(.*)$/ =~ date_time.as_string
-              return DV_Date.new($1), DV_Time.new($2)             
-            end
-          end
-
-          class DV_Duration < DV_Amount
-            include Assumed_Library_Types::ISO8601_DURATION_MODULE
+              return DvDate.new($1), DvTime.new($2)
+            end
+          end
+
+          class DvDuration < DvAmount
+            include AssumedLibraryTypes::ISO8601_DURATION_MODULE
             attr_reader :value
             
@@ -214,5 +214,5 @@
               raise ArgumentError, 'value must be not nil' if value.nil?
               @value = value
-              iso8601_duration = Assumed_Library_Types::ISO8601_DURATION.new(value)
+              iso8601_duration = AssumedLibraryTypes::ISO8601_DURATION.new(value)
               self.years = iso8601_duration.years
               self.months = iso8601_duration.months
@@ -234,5 +234,5 @@
 
           end
-        end # of Date_Time
+        end # of DateTime
       end # of Quantity
     end # of Data_Types
Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/text.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/text.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/text.rb	(revision 167)
@@ -2,9 +2,9 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109067605961_209522_3179Report.html
 # Ticket refs #48
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
+    module DataTypes
       module Text
-        class Term_Mapping
+        class TermMapping
           attr_reader :match, :purpose, :target
           def initialize(match, purpose, target)
@@ -26,13 +26,13 @@
             match == '?'
           end
-          def Term_Mapping.is_valid_mach_code?(c)
+          def TermMapping.is_valid_mach_code?(c)
             c == '>' or c == '=' or c == '<' or c == '?'
           end
           private
           def match_valid(match)
-            raise ArgumentError, "match is not valid" if !Term_Mapping.is_valid_mach_code? match
+            raise ArgumentError, "match is not valid" if !TermMapping.is_valid_mach_code? match
           end
           def purpose_valid(purpose)
-            if purpose.nil? or !purpose.instance_of? DV_Coded_Text
+            if purpose.nil? or !purpose.instance_of? DvCodedText
               raise ArgumentError, "purpose is not valid"
             end
@@ -44,5 +44,5 @@
         end
 
-        class Code_Phrase
+        class CodePhrase
           attr_reader :terminology_id, :code_string
           def initialize(code_string, terminology_id)
@@ -60,7 +60,7 @@
             @code_string = code_string
           end 
-        end # of Code_Phrase
+        end # of CodePhrase
 
-        class DV_Text < OpenEHR::RM::Data_Types::Basic::Data_Value
+        class DvText < OpenEhr::RM::DataTypes::Basic::DataValue
           attr_reader :value, :formatting, :hyperlink, :mappings
           attr_reader :language, :encoding
@@ -68,8 +68,8 @@
                          mappings = nil, language = nil, encoding = nil)
             value_valid(value)
-            DV_Text.formatting_valid(formatting)
-            DV_Text.encoding_valid(encoding)
-            DV_Text.mapping_valid(mappings)
-            DV_Text.language_valid(language)
+            DvText.formatting_valid(formatting)
+            DvText.encoding_valid(encoding)
+            DvText.mapping_valid(mappings)
+            DvText.language_valid(language)
             @value, @formatting, @encoding = value, formatting, encoding
             @mappings, @language = mappings, language
@@ -80,17 +80,17 @@
           end
           def formatting=(formatting)
-            DV_Text.formatting_valid(formatting)
+            DvText.formatting_valid(formatting)
             @formatting = formatting
           end
           def encoding=(encoding)
-            DV_Text.encoding_valid(encoding)
+            DvText.encoding_valid(encoding)
             @encoding = encoding
           end
           def mappings=(mappings)
-            DV_Text.mapping_valid(mappings)
+            DvText.mapping_valid(mappings)
             @mappings = mappings
           end
           def language=(language)
-            DV_Text.language_valid(language)
+            DvText.language_valid(language)
             @language = language
           end
@@ -99,5 +99,5 @@
             if value.nil? or value.empty? or value.include? CR or value.include? LF
               raise ArgumentError, "value is not valid"
-              # CR and LF are defined in Basic_Definition inherited Data_Value.
+              # CR and LF are defined in Basic_Definition inherited DataValue.
             end
           end
@@ -128,5 +128,5 @@
         end
 
-        class DV_Coded_Text < DV_Text
+        class DvCodedText < DvText
           attr_reader :defining_code
 
@@ -146,5 +146,5 @@
         end
 
-        class DV_Paragraph < OpenEHR::RM::Data_Types::Basic::Data_Value
+        class DvParagraph < OpenEhr::RM::DataTypes::Basic::DataValue
           attr_reader :items
           def initialize(items)
@@ -167,5 +167,5 @@
 
       end # of Text
-    end # of Data_Type
+    end # of DataTypes
   end # of RM
 end # of OpenEHR
Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/time_specification.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/time_specification.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/time_specification.rb	(revision 167)
@@ -1,9 +1,9 @@
 # This module is related to the ticket #47
 
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
-      module Time_Specification
-        class DV_Time_Specification < OpenEHR::RM::Data_Types::Basic::Data_Value
+    module DataTypes
+      module TimeSpecification
+        class DvTimeSpecification < OpenEhr::RM::DataTypes::Basic::DataValue
           attr_reader :value
 
@@ -34,5 +34,5 @@
 
 
-        class DV_General_Time_Specification < DV_Time_Specification
+        class DvGeneralTimeSpecification < DvTimeSpecification
           attr_reader :value
           def initialize(value)
@@ -48,5 +48,5 @@
         end
 
-        class DV_Periodic_Time_Specification < DV_Time_Specification
+        class DvPeriodicTimeSpecification < DvTimeSpecification
           attr_reader :value, :calender_alignment, :event_alingment, :period
           def initialize(value)
Index: ruby/branches/0.5.0/lib/open_ehr/rm/data_types/uri.rb
===================================================================
--- ruby/branches/0.5.0/lib/open_ehr/rm/data_types/uri.rb	(revision 165)
+++ ruby/branches/0.5.0/lib/open_ehr/rm/data_types/uri.rb	(revision 167)
@@ -5,6 +5,6 @@
 require 'uri'
 #require 'uri/generic'
-module URI
-  class EHR < ::URI::Generic
+module Uri
+  class Ehr < ::URI::Generic
     COMPONENT = [
       :scheme, :path, :fragment, :query
@@ -21,12 +21,12 @@
     end
   end
-  @@schemes['EHR'] = EHR
+  @@schemes['EHR'] = Ehr
 end
 
-module OpenEHR
+module OpenEhr
   module RM
-    module Data_Types
-      module URI
-        class DV_URI < OpenEHR::RM::Data_Types::Basic::Data_Value
+    module DataTypes
+      module Uri
+        class DvUri < OpenEhr::RM::DataTypes::Basic::DataValue
           def initialize(value)
             self.value = value
@@ -57,5 +57,5 @@
         end
 
-        class DV_EHR_URI < DV_URI
+        class DvEhrUri < DvUri
           def initialize(value)
             super(value)
@@ -67,5 +67,5 @@
         end # of DV_EHR_URI
       end # of URI
-    end # of Data_Type
+    end # of DataTypes
   end # of RM
 end # of OpenEHR
