Index: ruby/branches/0.5/lib/open_ehr/rm/common/archetyped.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/common/archetyped.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/common/archetyped.rb	(revision 216)
@@ -2,5 +2,5 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109318114715_211173_0Report.html
 # Ticket refs #65
-module OpenEhr
+module OpenEHR
   module RM
     module Common
Index: ruby/branches/0.5/lib/open_ehr/rm/common/change_control.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/common/change_control.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/common/change_control.rb	(revision 216)
@@ -2,6 +2,6 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109326589721_134411_997Report.html
 # Ticket refs #64
-include OpenEhr::RM::Common::Generic
-module OpenEhr
+include OpenEHR::RM::Common::Generic
+module OpenEHR
   module RM
     module Common
Index: ruby/branches/0.5/lib/open_ehr/rm/common/directory.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/common/directory.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/common/directory.rb	(revision 216)
@@ -2,10 +2,10 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140536622627_218703_7149Report.html
 # Ticket refs #63
-include OpenEhr::RM::DataTypes::Text
-module OpenEhr
+include OpenEHR::RM::DataTypes::Text
+module OpenEHR
   module RM
     module Common
       module Directory
-        class Folder < OpenEhr::RM::Common::Archetyped::Locatable
+        class Folder < OpenEHR::RM::Common::Archetyped::Locatable
           attr_accessor :items
           attr_reader :folders
@@ -22,5 +22,5 @@
           end
         end        
-        class VersionedFolder < OpenEhr::RM::Common::ChangeControl::VersionedObject
+        class VersionedFolder < OpenEHR::RM::Common::ChangeControl::VersionedObject
         end
       end # of Directory
Index: ruby/branches/0.5/lib/open_ehr/rm/common/generic.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/common/generic.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/common/generic.rb	(revision 216)
@@ -2,7 +2,7 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1140169202660_257304_813Report.html
 # Related to the ticket #62
-include OpenEhr::RM::Support::Identification
-include OpenEhr::RM::DataTypes::Basic
-module OpenEhr
+include OpenEHR::RM::Support::Identification
+include OpenEHR::RM::DataTypes::Basic
+module OpenEHR
   module RM
     module Common
Index: ruby/branches/0.5/lib/open_ehr/rm/common/resource.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/common/resource.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/common/resource.rb	(revision 216)
@@ -1,4 +1,4 @@
 require 'set'
-module OpenEhr
+module OpenEHR
   module RM
     module Common
Index: ruby/branches/0.5/lib/open_ehr/rm/composition/content/entry.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/composition/content/entry.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/composition/content/entry.rb	(revision 216)
@@ -1,3 +1,3 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Content
Index: ruby/branches/0.5/lib/open_ehr/rm/data_structures.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_structures.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_structures.rb	(revision 216)
@@ -4,8 +4,8 @@
 # refs #59
 
-module OpenEhr
+module OpenEHR
   module RM
     module DataStructures
-      class DataStructure < OpenEhr::RM::Common::Archetyped::Locatable
+      class DataStructure < OpenEHR::RM::Common::Archetyped::Locatable
         def initialize(args = { })
           super(args)
Index: ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure.rb	(revision 216)
@@ -4,6 +4,6 @@
 # refs #54
 require 'set'
-include OpenEhr::RM::DataStructures
-module OpenEhr
+include OpenEHR::RM::DataStructures
+module OpenEHR
   module RM
     module DataStructures
@@ -195,3 +195,3 @@
     end # of DataStructures
   end # of RM
-end # of OpenEhr
+end # of OpenEHR
Index: ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure/representation.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure/representation.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure/representation.rb	(revision 216)
@@ -3,10 +3,10 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109066789167_738055_2581Report.html
 # refs #53
-module OpenEhr
+module OpenEHR
   module RM
     module DataStructures
       module ItemStructure
         module Representation
-          class Item < OpenEhr::RM::Common::Archetyped::Locatable
+          class Item < OpenEHR::RM::Common::Archetyped::Locatable
             def initialize(args = {})
               super(args)
@@ -61,3 +61,3 @@
     end # of DataStructures
   end # of RM
-end # of OpenEhr
+end # of OpenEHR
Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/basic.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/basic.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/basic.rb	(revision 216)
@@ -2,5 +2,5 @@
 # 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 DataTypes
@@ -10,5 +10,12 @@
 
         class DataValue
-          include OpenEhr::RM::Support::Definition::BasicDefinition
+          include OpenEHR::RM::Support::Definition::BasicDefinition
+          attr_accessor :value
+          alias :v :value
+
+          def initialize(args = {})
+            self.value = args[:value]
+          end
+
           def ==(other)
             return self.value == other.value
@@ -17,7 +24,8 @@
 
         class DvBoolean < DataValue
-          def initialize(value)
-            self.value = value
+          def initialize(args)
+            super(args)
           end
+
           def value=(value)
             raise ArgumentError, "value must not be nil" if value.nil?
@@ -35,17 +43,20 @@
 
         class DvState < DataValue
-          attr_reader :value
+          attr_reader :is_terminal
 
-          def initialize(value, is_terminal)
-            self.value=value
-            self.is_terminal=is_terminal
+          def initialize(args)            
+            super(args)
+            self.is_terminal = args[:is_terminal]
           end
+
           def value=(v)
             raise ArgumentError, "value should not be nil" if v.nil?
             @value = v
           end
+
           def is_terminal?
             @is_terminal
           end
+
           def is_terminal=(s)
             raise ArgumentError, "terminal should not be nil" if s.nil?
@@ -55,6 +66,7 @@
 
         class DvIdentifier
-          attr_accessor :issuer, :assigner, :id, :type
-          def initialize(assigner, id, issuer, type)
+          attr_reader :issuer, :assigner, :id, :type
+
+          def initialize(args = {})
             if assigner.nil? or assigner.empty?\
               or id.nil? or id.empty? or issuer.nil? or issuer.empty?\
Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/encapsulated.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/encapsulated.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/encapsulated.rb	(revision 216)
@@ -5,9 +5,9 @@
 require 'locale/info'
 
-module OpenEhr
+module OpenEHR
   module RM
     module DataTypes
       module Encapsulated
-        class DvEncapsulated  < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DvEncapsulated  < OpenEHR::RM::DataTypes::Basic::DataValue
           attr_reader :language, :charset, :size
           def initialize(charset, language, size)
Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/quantity.rb	(revision 216)
@@ -3,20 +3,16 @@
 # Ticket refs #50
 #require 'assumed_library_types'
-module OpenEhr
+module OpenEHR
   module RM
     module DataTypes
       module Quantity
-
-#        autoload :Date_Time, "rm/data_types/quantity/date_time.rb"
-
-        class DvOrdered < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DvOrdered < OpenEHR::RM::DataTypes::Basic::DataValue
           include Comparable
           attr_accessor :normal_range, :other_refference_ranges, :normal_status
 
-          def initialize(normal_range=nil, normal_status = nil,
-                         other_reference_ranges=nil)
-            self.normal_range = normal_range
-            self.normal_status = normal_status
-            self.other_reference_ranges = other_reference_ranges
+          def initialize(args = {})
+            self.normal_range = args[:normal_range]
+            self.normal_status = args[:normal_status]
+            self.other_reference_ranges = args[:other_reference_ranges]
           end          
 
@@ -51,5 +47,5 @@
         end
 
-        class DvInterval < OpenEhr::AssumedLibraryTypes::Interval
+        class DvInterval < OpenEHR::AssumedLibraryTypes::Interval
 
         end
@@ -121,5 +117,5 @@
 
           def is_strictly_comparable_to?(others)
-            unless others.instance_of? OpenEhr::RM::DataTypes::Quantity::DvOrdinal
+            unless others.instance_of? OpenEHR::RM::DataTypes::Quantity::DvOrdinal
               return false
             end
Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/text.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/text.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/text.rb	(revision 216)
@@ -2,5 +2,5 @@
 # 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 DataTypes
@@ -62,5 +62,5 @@
         end # of CodePhrase
 
-        class DvText < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DvText < OpenEHR::RM::DataTypes::Basic::DataValue
           attr_reader :value, :formatting, :hyperlink, :mappings
           attr_reader :language, :encoding
@@ -146,5 +146,5 @@
         end
 
-        class DvParagraph < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DvParagraph < OpenEHR::RM::DataTypes::Basic::DataValue
           attr_reader :items
           def initialize(items)
Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/time_specification.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/time_specification.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/time_specification.rb	(revision 216)
@@ -1,9 +1,9 @@
 # This module is related to the ticket #47
 
-module OpenEhr
+module OpenEHR
   module RM
     module DataTypes
       module TimeSpecification
-        class DvTimeSpecification < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DvTimeSpecification < OpenEHR::RM::DataTypes::Basic::DataValue
           attr_reader :value
 
Index: ruby/branches/0.5/lib/open_ehr/rm/data_types/uri.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/data_types/uri.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/data_types/uri.rb	(revision 216)
@@ -24,9 +24,9 @@
 end
 
-module OpenEhr
+module OpenEHR
   module RM
     module DataTypes
       module Uri
-        class DvUri < OpenEhr::RM::DataTypes::Basic::DataValue
+        class DvUri < OpenEHR::RM::DataTypes::Basic::DataValue
           def initialize(value)
             self.value = value
Index: ruby/branches/0.5/lib/open_ehr/rm/security.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/security.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/security.rb	(revision 216)
@@ -2,5 +2,5 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_5_1_76d0249_1155650882301_836618_5314Report.html
 # Ticket refs #41
-module OpenEhr
+module OpenEHR
   module RM
     module Security
Index: ruby/branches/0.5/lib/open_ehr/rm/support/assumed_types.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/support/assumed_types.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/support/assumed_types.rb	(revision 216)
@@ -2,5 +2,5 @@
 # and am, I will integrated to /lib/models/assumed_types.rb.
 # By Shinji KOBAYASHI, 2008-07-20
-module OpenEhr
+module OpenEHR
   module RM
     module Support
Index: ruby/branches/0.5/lib/open_ehr/rm/support/definition.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/support/definition.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/support/definition.rb	(revision 216)
@@ -1,3 +1,3 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Support
Index: ruby/branches/0.5/lib/open_ehr/rm/support/identification.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/support/identification.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/support/identification.rb	(revision 216)
@@ -2,5 +2,5 @@
 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109331021343_528780_2066Report.html
 # Ticket refs #39
-module OpenEhr
+module OpenEHR
   module RM
     module Support
Index: ruby/branches/0.5/lib/open_ehr/rm/support/measurement.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/support/measurement.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/support/measurement.rb	(revision 216)
@@ -1,3 +1,3 @@
-module OpenEhr
+module OpenEHR
   module RM
     module Support
Index: ruby/branches/0.5/lib/open_ehr/rm/support/terminology.rb
===================================================================
--- ruby/branches/0.5/lib/open_ehr/rm/support/terminology.rb	(revision 215)
+++ ruby/branches/0.5/lib/open_ehr/rm/support/terminology.rb	(revision 216)
@@ -1,4 +1,4 @@
 
-module OpenEhr
+module OpenEHR
   module RM
     module Support
@@ -18,5 +18,5 @@
           end
         end
-        module OpenEhrCodeSetIdentifier
+        module OpenEHRCodeSetIdentifier
           CODE_SET_ID_CHARACER_SETS = "character sets".freeze
           CODE_SET_ID_COMPRESSION_ALGORITHMS = "compression algorithms".freeze
@@ -29,5 +29,5 @@
           end
         end
-        module OpenEhrTerminologyGroupIdentifiers
+        module OpenEHRTerminologyGroupIdentifiers
           GROUP_ID_ATTESTATION_REASON = "attestation reason".freeze
           GROUP_ID_AUDIT_CHANGE_TYPE = "audit change type".freeze
@@ -75,5 +75,5 @@
         end
         class TerminologyService
-          include OpenEhrCodeSetIdentifier, OpenEhrTerminologyGroupIdentifiers
+          include OpenEHRCodeSetIdentifier, OpenEHRTerminologyGroupIdentifiers
           def code_set(name)
             raise NotImplementedError, "code_set is not implemented"
